@vue/repl
Advanced tools
Comparing version 3.3.0 to 4.0.0-alpha.0
@@ -25,2 +25,4 @@ import { ComponentOptionsMixin } from 'vue'; | ||
declare type EditorMode = 'js' | 'css' | 'ssr'; | ||
declare interface EditorProps { | ||
@@ -30,7 +32,5 @@ value: string; | ||
readonly?: boolean; | ||
mode?: PreviewMode; | ||
mode?: EditorMode; | ||
} | ||
declare type PreviewMode = 'js' | 'css' | 'ssr'; | ||
export { } |
@@ -25,2 +25,4 @@ import { ComponentOptionsMixin } from 'vue'; | ||
declare type EditorMode = 'js' | 'css' | 'ssr'; | ||
declare interface EditorProps { | ||
@@ -30,7 +32,5 @@ value: string; | ||
readonly?: boolean; | ||
mode?: PreviewMode; | ||
mode?: EditorMode; | ||
} | ||
declare type PreviewMode = 'js' | 'css' | 'ssr'; | ||
export { } |
import './monaco-editor.css' | ||
export { _ as default } from './chunks/MonacoEditor-zbZVrXDT.js'; | ||
export { _ as default } from './chunks/MonacoEditor-NkgYyLcM.js'; | ||
import 'vue'; | ||
import './chunks/_commonjsHelpers-9Q-OoQuc.js'; | ||
import './chunks/types-LDokmScJ.js'; |
@@ -0,2 +1,4 @@ | ||
import type { Component } from 'vue'; | ||
import { ComponentOptionsMixin } from 'vue'; | ||
import { ComputedRef } from 'vue'; | ||
import * as defaultCompiler from 'vue/compiler-sfc'; | ||
@@ -8,5 +10,8 @@ import { DefineComponent } from 'vue'; | ||
import { PublicProps } from 'vue'; | ||
import { SFCAsyncStyleCompileOptions } from 'vue/compiler-sfc'; | ||
import { SFCScriptCompileOptions } from 'vue/compiler-sfc'; | ||
import { SFCTemplateCompileOptions } from 'vue/compiler-sfc'; | ||
import { Ref } from 'vue'; | ||
import type { SFCAsyncStyleCompileOptions } from 'vue/compiler-sfc'; | ||
import type { SFCScriptCompileOptions } from 'vue/compiler-sfc'; | ||
import type { SFCTemplateCompileOptions } from 'vue/compiler-sfc'; | ||
import { ToRefs } from 'vue'; | ||
import { UnwrapRef } from 'vue'; | ||
@@ -17,6 +22,2 @@ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T; | ||
declare type __VLS_NonUndefinedable_3<T> = T extends undefined ? never : T; | ||
declare type __VLS_NonUndefinedable_4<T> = T extends undefined ? never : T; | ||
declare type __VLS_Prettify<T> = { | ||
@@ -44,20 +45,2 @@ [K in keyof T]: T[K]; | ||
declare type __VLS_TypePropsToRuntimeProps_3<T> = { | ||
[K in keyof T]-?: {} extends Pick<T, K> ? { | ||
type: PropType<__VLS_NonUndefinedable_3<T[K]>>; | ||
} : { | ||
type: PropType<T[K]>; | ||
required: true; | ||
}; | ||
}; | ||
declare type __VLS_TypePropsToRuntimeProps_4<T> = { | ||
[K in keyof T]-?: {} extends Pick<T, K> ? { | ||
type: PropType<__VLS_NonUndefinedable_4<T[K]>>; | ||
} : { | ||
type: PropType<T[K]>; | ||
required: true; | ||
}; | ||
}; | ||
declare type __VLS_WithDefaults<P, D> = { | ||
@@ -71,16 +54,6 @@ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & { | ||
declare const _default: DefineComponent<__VLS_TypePropsToRuntimeProps_2<EditorProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { | ||
change: (code: string) => void; | ||
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_2<EditorProps>>> & { | ||
onChange?: ((code: string) => any) | undefined; | ||
}, {}, {}>; | ||
declare type EditorComponentType = Component<EditorProps>; | ||
declare const _default_2: DefineComponent<__VLS_TypePropsToRuntimeProps_3<EditorProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { | ||
change: (code: string) => void; | ||
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_3<EditorProps>>> & { | ||
onChange?: ((code: string) => any) | undefined; | ||
}, {}, {}>; | ||
declare type EditorMode = 'js' | 'css' | 'ssr'; | ||
declare type EditorComponentType = typeof _default | typeof _default_2; | ||
declare interface EditorProps { | ||
@@ -90,3 +63,3 @@ value: string; | ||
readonly?: boolean; | ||
mode?: PreviewMode; | ||
mode?: EditorMode; | ||
} | ||
@@ -109,5 +82,12 @@ | ||
export declare type OutputModes = 'preview' | 'js' | 'css' | 'ssr'; | ||
export declare interface ImportMap { | ||
imports?: Record<string, string | undefined>; | ||
scopes?: Record<string, Record<string, string>>; | ||
} | ||
export declare const Preview: DefineComponent<__VLS_TypePropsToRuntimeProps_4<{ | ||
export declare function mergeImportMap(a: ImportMap, b: ImportMap): ImportMap; | ||
export declare type OutputModes = 'preview' | EditorMode; | ||
export declare const Preview: DefineComponent<__VLS_TypePropsToRuntimeProps_2<{ | ||
show: boolean; | ||
@@ -117,3 +97,3 @@ ssr: boolean; | ||
reload: typeof reload_2; | ||
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_4<{ | ||
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_2<{ | ||
show: boolean; | ||
@@ -123,4 +103,2 @@ ssr: boolean; | ||
declare type PreviewMode = 'js' | 'css' | 'ssr'; | ||
/** | ||
@@ -155,2 +133,3 @@ * Reload the preview iframe | ||
}; | ||
layout: string; | ||
}>, { | ||
@@ -177,6 +156,8 @@ reload: typeof reload; | ||
}; | ||
layout: string; | ||
}>>>, { | ||
ssr: boolean; | ||
store: Store; | ||
theme: "dark" | "light"; | ||
store: Store; | ||
layout: "horizontal" | "vertical"; | ||
previewOptions: { | ||
@@ -208,3 +189,2 @@ headHTML?: string | undefined; | ||
clearConsole?: boolean; | ||
sfcOptions?: SFCOptions; | ||
layout?: 'horizontal' | 'vertical'; | ||
@@ -224,42 +204,14 @@ layoutReverse?: boolean; | ||
export declare class ReplStore implements Store { | ||
state: StoreState; | ||
compiler: typeof defaultCompiler; | ||
vueVersion?: string; | ||
productionMode: boolean; | ||
options?: SFCOptions; | ||
initialShowOutput: boolean; | ||
initialOutputMode: OutputModes; | ||
reloadLanguageTools: undefined | (() => void); | ||
customElement: boolean | string | RegExp | (string | RegExp)[]; | ||
private defaultVueRuntimeDevURL; | ||
private defaultVueRuntimeProdURL; | ||
private defaultVueServerRendererURL; | ||
private pendingCompiler; | ||
private welcomeFileTemplate?; | ||
private newSFCTemplate?; | ||
constructor({ serializedState, defaultVueRuntimeURL, defaultVueRuntimeProdURL, defaultVueServerRendererURL, showOutput, outputMode, productionMode, customElement, welcomeFileTemplate, newSFCTemplate, }?: StoreOptions); | ||
get defaultVueRuntimeURL(): string; | ||
export declare interface ReplStore extends UnwrapRef<StoreState> { | ||
init(): void; | ||
private initTsConfig; | ||
setTsConfig(config: any): void; | ||
getTsConfig(): any; | ||
setActive(filename: string): void; | ||
addFile(fileOrFilename: string | File_2): void; | ||
addFile(filename: string | File_2): void; | ||
deleteFile(filename: string): void; | ||
renameFile(oldFilename: string, newFilename: string): void; | ||
getImportMap(): ImportMap; | ||
getTsConfig(): Record<string, any>; | ||
serialize(): string; | ||
deserialize(serializedState: string): void; | ||
getFiles(): Record<string, string>; | ||
setFiles(newFiles: Record<string, string>, mainFile?: string): Promise<void>; | ||
private forceSandboxReset; | ||
private initImportMap; | ||
getImportMap(): any; | ||
setImportMap(map: { | ||
imports: Record<string, string>; | ||
scopes?: Record<string, Record<string, string>>; | ||
}): void; | ||
setTypeScriptVersion(version: string): void; | ||
setVueVersion(version: string): Promise<void>; | ||
resetVueVersion(): void; | ||
toggleProduction(): void; | ||
} | ||
@@ -273,49 +225,41 @@ | ||
export declare interface Store { | ||
state: StoreState; | ||
options?: SFCOptions; | ||
compiler: typeof defaultCompiler; | ||
vueVersion?: string; | ||
init: () => void; | ||
setActive: (filename: string) => void; | ||
addFile: (filename: string | File_2) => void; | ||
deleteFile: (filename: string) => void; | ||
renameFile: (oldFilename: string, newFilename: string) => void; | ||
getImportMap: () => any; | ||
getTsConfig?: () => any; | ||
reloadLanguageTools?: undefined | (() => void); | ||
initialShowOutput: boolean; | ||
initialOutputMode: OutputModes; | ||
customElement: boolean | string | RegExp | (string | RegExp)[]; | ||
} | ||
export declare type Store = Pick<ReplStore, 'files' | 'activeFile' | 'mainFile' | 'errors' | 'showOutput' | 'outputMode' | 'sfcOptions' | 'compiler' | 'vueVersion' | 'locale' | 'typescriptVersion' | 'dependencyVersion' | 'reloadLanguageTools' | 'init' | 'setActive' | 'addFile' | 'deleteFile' | 'renameFile' | 'getImportMap' | 'getTsConfig'>; | ||
export declare interface StoreOptions { | ||
serializedState?: string; | ||
showOutput?: boolean; | ||
outputMode?: OutputModes | string; | ||
productionMode?: boolean; | ||
defaultVueRuntimeURL?: string; | ||
defaultVueRuntimeProdURL?: string; | ||
defaultVueServerRendererURL?: string; | ||
customElement?: boolean | string | RegExp | (string | RegExp)[]; | ||
welcomeFileTemplate?: string; | ||
newSFCTemplate?: string; | ||
} | ||
export declare interface StoreState { | ||
mainFile: string; | ||
export declare type StoreState = ToRefs<{ | ||
files: Record<string, File_2>; | ||
activeFile: File_2; | ||
mainFile: string; | ||
template: { | ||
welcomeSFC?: string; | ||
newSFC?: string; | ||
}; | ||
builtinImportMap: ImportMap; | ||
errors: (string | Error)[]; | ||
vueRuntimeURL: string; | ||
vueServerRendererURL: string; | ||
showOutput: boolean; | ||
outputMode: OutputModes; | ||
sfcOptions: SFCOptions; | ||
/** `@vue/compiler-sfc` */ | ||
compiler: typeof defaultCompiler; | ||
vueVersion: string | undefined; | ||
locale: string | undefined; | ||
typescriptVersion: string; | ||
/** @deprecated use `locale` instead */ | ||
typescriptLocale?: string | undefined; | ||
locale?: string | undefined; | ||
resetFlip: boolean; | ||
/** \{ dependencyName: version \} */ | ||
dependencyVersion?: Record<string, string>; | ||
} | ||
dependencyVersion: Record<string, string>; | ||
reloadLanguageTools?: (() => void) | undefined; | ||
}>; | ||
export declare function useStore({ files, activeFile, // set later | ||
mainFile, template, builtinImportMap, errors, showOutput, outputMode, sfcOptions, compiler, vueVersion, locale, typescriptVersion, dependencyVersion, reloadLanguageTools, }?: Partial<StoreState>, serializedState?: string): ReplStore; | ||
export declare function useVueImportMap(defaults?: { | ||
runtimeDev?: string | (() => string); | ||
runtimeProd?: string | (() => string); | ||
serverRenderer?: string | (() => string); | ||
}): { | ||
productionMode: Ref<boolean>; | ||
importMap: ComputedRef<ImportMap>; | ||
vueVersion: Ref<string | undefined>; | ||
defaultVersion: string; | ||
}; | ||
export { } |
{ | ||
"name": "@vue/repl", | ||
"version": "3.3.0", | ||
"version": "4.0.0-alpha.0", | ||
"description": "Vue component for editing Vue components", | ||
@@ -29,2 +29,3 @@ "packageManager": "pnpm@8.14.0", | ||
}, | ||
"./package.json": "./package.json", | ||
"./style.css": "./dist/vue-repl.css", | ||
@@ -63,3 +64,5 @@ "./dist/style.css": "./dist/vue-repl.css" | ||
"@types/codemirror": "^5.60.15", | ||
"@types/hash-sum": "^1.0.2", | ||
"@types/node": "^20.10.6", | ||
"@typescript-eslint/eslint-plugin": "^6.18.1", | ||
"@vitejs/plugin-vue": "^5.0.2", | ||
@@ -73,2 +76,4 @@ "@volar/cdn": "~1.11.1", | ||
"conventional-changelog-cli": "^4.1.0", | ||
"eslint": "^8.56.0", | ||
"eslint-plugin-vue": "^9.20.0", | ||
"fflate": "^0.8.1", | ||
@@ -94,2 +99,4 @@ "hash-sum": "^2.0.0", | ||
"format": "prettier --write .", | ||
"lint": "eslint --ext .ts,.vue .", | ||
"typecheck": "vue-tsc --noEmit", | ||
"release": "bumpp --all", | ||
@@ -96,0 +103,0 @@ "version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
21
18330052
30
69721
1