@rinova/playground 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/{App-CK1Q_fap.js → App-DUVLlDOI.js} +235 -139
- package/dist/{dist-g9u4q-9e.js → dist-B0hittbo.js} +1 -1
- package/dist/{editor.api-BtqJ5Bxw.js → editor.api-YVDhnHI-.js} +1 -1
- package/dist/editor.css +1 -0
- package/dist/index.js +3 -3
- package/dist/{monaco.contribution-GLS4-bVF.js → monaco.contribution-CaO2YABh.js} +3 -3
- package/dist/output-CGawAeuu.js +80 -0
- package/dist/style.css +142 -8569
- package/dist/{tsMode-ezle9bSI.js → tsMode-BOlRJVVo.js} +2 -2
- package/dist/types/app/PlaygroundGroupIndex.vue.d.ts +16 -0
- package/dist/types/config.d.ts +17 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/payload/args.d.ts +19 -2
- package/dist/types/payload/output.d.ts +16 -3
- package/dist/types/shims.d.ts +3 -0
- package/dist/types/types.d.ts +5 -0
- package/package.json +4 -3
- package/dist/output-Dx3ubog9.js +0 -51
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as QuickCommandNLS, $a as alert, $c as debouncedObservable, $d as BugIndicatingError, $i as diffInserted, $l as isFirefox, $n as ClickAction, $o as Mimes, $r as getGoodIndentForLine, $s as Separator, $t as isLocalizedString, $u as CancellationTokenSource, A as observableSignalFromEvent, Aa as overviewRulerSelectionHighlightForeground, Ac as getDomNodeZoomLevel, Ad as isWeb, Ai as Gesture, Al as thisEqualsC, An as openLinkFromMarkdown, Ao as LineRange, Ar as ViewGpuContext, As as relativePath, At as RegexToggle, Au as InlineCompletionEndOfLifeReasonKind, Ba as darken, Bc as isAncestorOfActiveElement, Bd as assertType, Bi as buttonBackground, Bl as Delayer, Bn as isEmptyMarkdownString, Bo as GlyphMarginLane, Br as isModelDecorationInString, Bs as SubmenuItemAction, Bt as IDataChannelService, Bu as getAriaLabelForSymbol, C as WorkbenchToolBar, Ca as editorSelectionBackground, Cc as clearNode, Cd as createSingleCallFunction, Ci as generateUuid, Cl as DebugLocation, Cn as ItemActivation, Co as lineRangeMappingFromRangeMappings, Cr as EditDeltaInfo, Cs as basenameOrAuthority, Ct as WorkbenchAsyncDataTree, Cu as Command, D as LineSource, Da as editorWidgetBackground, Dc as getClientArea, Dd as isLittleEndian, Di as ScrollableElement, Dl as equalsIfDefinedC, Dn as ILayoutService, Do as StringText, Dr as IUserInteractionService, Ds as isEqual, Dt as FindInput, Du as FoldingRangeKind, E as rangeIsSingleLine, Ea as editorWarningForeground, Ec as getActiveWindow, Ed as isLinux, Ei as DomScrollableElement, El as equalsIfDefined, En as IDialogService, Eo as AbstractText, Er as groupByMap, Es as extname, Et as WorkbenchTreeElementCanExpand, Eu as DocumentPasteTriggerKind, F as bindContextKey, Fa as contrastBorder, Fc as getWindow, Fd as localize2, Fi as DynamicCssRules, Fl as Schemas, Fn as renderLabelWithIcons, Fo as findLastMax, Fr as Severity, Fs as Action2, Ft as SplitView, Fu as ProviderId, G as IconLabel, Ga as createCSSRule, Gc as reset, Gd as isObject, Gi as inputBackground, Gl as disposableTimeout, Gn as anyScore, Go as safeIntl, Gr as overviewRulerRangeHighlight, Gs as ContextKeyEqualsExpr, Gt as getActionBarActions, Gu as Position, H as widgetClose, Ha as registerColor, Hc as isHTMLElement, Hd as isDefined, Hi as inputActiveOptionBackground, Hl as TimeoutTimer, Hn as stripIcons, Ho as OverviewRulerLane, Hr as computeIndentLevel, Hs as registerAction2, Ht as MenuEntryActionViewItem, Hu as Codicon, I as observableConfigValue, Ia as descriptionForeground, Ic as h, Id as cloneAndChange, Ii as EditorMouseEvent, Il as matchesScheme, In as IdGenerator, Io as mapFindFirst, Ir as Severity$1, Is as IMenuService, It as OrthogonalEdge, Iu as SelectedSuggestionInfo, J as Button, Ja as CONTEXT_ACCESSIBILITY_MODE_ENABLED, Jc as scheduleAtNextAnimationFrame, Jd as upcast, Ji as editorActionListForeground, Jl as raceCancellationError, Jn as fuzzyScoreGracefulAggressive, Jo as StringDiffSequence, Jr as themeColorFromId, Js as RawContextKey, Jt as defaultInputBoxStyles, Ju as dirname$1, K as HighlightedLabel, Ka as createStyleSheetFromObservable, Kc as runAtThisOrScheduleAtNextAnimationFrame, Kd as isString, Ki as inputBorder, Kl as first, Kn as createMatches, Ko as CharacterSet, Kr as IThemeService, Ks as ContextKeyExpr, Kt as getFlatActionBarActions, Ku as URI, L as createHotClass, La as foreground, Lc as hide, Ld as deepClone, Li as quickInputListFocusBackground, Ll as matchesSomeScheme, Ln as defaultGenerator, Lo as OffsetRange, Lr as GlyphRasterizer, Ls as MenuId, Lt as Sash, Lu as SignatureHelpTriggerKind, M as DisposableCancellationTokenSource, Ma as widgetShadow, Mc as getTopLeftOffset, Md as language, Mi as getColumnOfNodeOffset, Ml as ConstantStringHash, Mn as withSelection, Mo as findFirstMax, Mr as runOnChangeWithCancellationToken, Ms as LRUCache, Mt as navigateToggles, Mu as InlineCompletionTriggerKind, N as appendRemoveOnDispose, Na as scrollbarShadow, Nc as getTotalHeight, Nd as setTimeout0, Ni as isDark, Nl as hash, Nn as renderMarkdown$1, No as findFirstMin, Nr as runOnChangeWithStore, Ns as ResourceMap, Nt as Toggle, Nu as NewSymbolNameTag, O as RenderOptions, Oa as editorWidgetBorder, Oc as getComputedStyle, Od as isMacintosh, Oi as Widget, Ol as strictEquals, On as getAnchorRect, Oo as PositionOffsetTransformerBase, Or as NativeEditContextRegistry, Os as joinPath, Ot as HistoryInputBox, Ou as HoverVerbosityAction, P as StableEditorScrollState, Pa as activeContrastBorder, Pc as getTotalWidth, Pd as localize, Pi as isHighContrast, Pl as VSBuffer, Pn as renderIcon, Po as findLast, Pr as INotificationService, Ps as ITelemetryService, Pt as Sizing, Pu as NewSymbolNameTriggerKind, Q as InspectTokensNLS, Qa as IEditorWorkerService, Qc as trackFocus, Qd as checkAdjacentItems, Qi as minimapSelectionOccurrenceHighlight, Ql as StandardKeyboardEvent, Qn as or, Qo as product$1, Qr as EnterOperation, Qs as Action, Qt as getListStyles, Qu as CancellationToken, R as HC_BLACK_THEME_NAME, Ra as iconForeground, Rc as isActiveElement, Rd as mixin, Ri as quickInputListFocusForeground, Rl as AsyncIterableProducer, Rn as MarkdownString, Ro as UnicodeTextModelHighlighter, Rr as ensureNonNullable, Rs as MenuItemAction, Rt as ILabelService, Ru as SymbolKinds, S as MenuWorkbenchToolBar, Sa as editorInlayHintTypeForeground, Sc as append, Sd as Iterable, Sf as sum, Si as DataTransfers, Sl as DebugNameData, Sn as IQuickInputService, So as RangeMapping, Sr as lengthGetColumnCountIfZeroLineCount, Ss as basename, St as IListService, Su as mainWindow, T as Point, Ta as editorWarningBorder, Tc as getActiveElement, Td as isIOS, Ti as DomEmitter, Tl as equals$2, Tn as isKeyModified, To as TextReplacement, Tr as countEOL, Ts as extUri, Tt as WorkbenchTreeElementCanCollapse, Tu as DocumentHighlightKind, U as KeybindingLabel, Ua as transparent, Uc as isMouseEvent, Ud as isFunction, Ui as inputActiveOptionBorder, Ul as createCancelableAsyncIterableProducer, Un as FuzzyScore, Uo as shouldSynchronizeModel, Ur as editorBracketMatchForeground, Us as KeybindingsRegistry, Ut as TextOnlyMenuEntryActionViewItem, Uu as Selection, V as registerIcon, Va as oneOf, Vc as isEditableElement, Vd as isArrayOf, Vi as buttonForeground, Vl as RunOnceScheduler, Vn as isMarkdownString, Vo as InjectedTextCursorStops, Vr as isModelDecorationVisible, Vs as isIMenuItem, Vt as ActionBar, Vu as isLocationLink, W as unthemedKeybindingLabelOptions, Wa as GlobalPointerMoveMonitor, Wc as n, Wd as isNumber, Wi as inputActiveOptionForeground, Wl as createCancelablePromise, Wn as FuzzyScoreOptions, Wo as getMapForWordSeparators, Wr as ghostTextForeground, Ws as Registry, Wt as createActionViewItem, Wu as Range, X as IStandaloneThemeService, Xa as TabFocus, Xc as show, Xd as assertFn, Xi as listHighlightForeground, Xl as timeout, Xn as matchesSubString, Xo as PLAINTEXT_LANGUAGE_ID, Xr as EditorContextKeys, Xs as ICommandService, Xt as defaultListStyles, Xu as KeyChord, Y as Extensions$1, Ya as IAccessibilityService, Yc as setVisibility, Yd as assert, Yi as listFocusHighlightForeground, Yl as raceTimeout, Yn as matchesBaseContiguousSubString, Yo as ILanguageConfigurationService, Yr as CoreEditingCommands, Ys as CommandsRegistry, Yt as defaultKeybindingLabelStyles, Yu as sep, Z as GoToLineNLS, Za as IMarkerDecorationsService, Zc as size, Zd as assertNever, Zi as minimapFindMatch, Zl as StandardMouseEvent, Zn as matchesWords, Zo as Extensions, Zr as TypeOperations, Zs as ThemeIcon, Zt as defaultToggleStyles, Zu as isModifierKey, _ as isCodeEditor, _a as editorInlayHintBackground, _c as addDisposableGenericMouseDownListener, _d as RefCountedDisposable, _f as isNonEmptyArray, _i as LocalSelectionTransfer, _l as derived, _n as CancelSnoozeInlineCompletion, _o as RGBA, _r as parseDocument, _s as ILogService, _t as IProgressService, _u as lastNonWhitespaceIndex, a as Uri, aa as editorErrorForeground, ac as IInstantiationService, ad as unicodeHighlightConfigKeys, af as Permutation, ai as WordOperations, al as observableSignal, an as InputFocusedContext, ao as TokenArray, ar as IContextViewService, as as EditorAction, at as editorConfigurationBaseNode, au as containsRTL, b as HideUnchangedRegionsFeature, ba as editorInlayHintParameterForeground, bc as addStandardDisposableGenericMouseDownListener, bd as isDisposable, bf as quickSelect, bi as createStringDataTransferItem, bl as derivedOpts, bn as IStorageService, bo as StringReplacement, br as DenseKeyProvider, bs as canLog, bt as IMarkerService, bu as Lazy, c as languages, ca as editorFindMatchHighlightBorder, cc as PixelRatio, cd as EditorZoom, cf as binarySearch2, ci as ReplaceCommand, cl as disposableObservableValue, cn as TernarySearchTree, co as createTrustedTypesPolicy$1, cr as nativeHoverDelegate, cs as MultiCommand, ct as ResourceTextEdit, cu as firstNonWhitespaceIndex, d as getOnTypeFormattingEdits, da as editorForeground, dc as DisposableResizeObserver, dd as PauseableEmitter, df as compareBy, di as CursorState$1, dl as subtransaction, dn as IAccessibilitySignalService, do as nullTokenizeEncoded, dr as ModelDecorationInjectedTextOptions, ds as registerEditorCommand, dt as WORKSPACE_EXTENSION, du as isBasicASCII, ea as diffInsertedLine, ec as SubmenuAction, ed as cancelOnDispose, ef as CancellationError, ei as getIndentMetadata, el as debouncedObservable2, en as ActionViewItem, eo as status, er as HoverAction, es as registerSingleton, et as QuickHelpNLS, eu as InvisibleCharacters, f as FormattingEdit, fa as editorHoverBackground, fc as EventHelper, fd as StopWatch, ff as compareUndefinedSmallest, fi as normalizeIndentation, fl as transaction, fn as ISemanticTokensStylingService, fo as isCompletionsEnabledFromObject, fr as ModelDecorationOptions, fs as registerEditorContribution, ft as isEmptyWorkspaceIdentifier, fu as isFalsyOrWhitespace, g as getCodeEditor, ga as editorInfoForeground, gc as WindowIdleValue, gd as MutableDisposable, gf as isFalsyOrEmpty, gi as toExternalVSDataTransfer, gl as registerAutorunSelfDisposable, gn as IEnvironmentService, go as HSVA, gr as offsetEditFromContentChanges, gs as TriggerInlineEditCommandsRegistry, gt as IEditorProgressService, gu as isUpperAsciiLetter, h as TextModelCancellationTokenSource, ha as editorInfoBorder, hc as SafeTriangle, hd as DisposableStore, hf as groupBy, hi as generateDataToCopyAndStoreInMemory, hl as autorunWithStore, hn as ILanguageFeatureDebounceService, ho as Color, hr as recordChangesLazy, hs as registerMultiEditorAction, ht as toWorkspaceIdentifier, hu as isLowerAsciiLetter, i as Range$1, ia as editorErrorBorder, ic as ICodeEditorService, if as onUnexpectedExternalError, ii as CursorMoveCommands, il as recomputeInitiallyAndOnChange, in as getDefaultHoverDelegate, io as LineTokens, ir as IContextMenuService, is as IndentAction, it as EditOperation, iu as compareIgnoreCase, j as waitForState, ja as widgetBorder, jc as getShadowRoot, jd as isWindows, ji as CursorColumns, jl as clamp, jn as IOpenerService, jo as findFirstIdxMonotonousOrArrLen, jr as runOnChange, js as hasDriveLetter, jt as WholeWordsToggle, ju as InlineCompletionHintStyle, k as renderLines$1, ka as overviewRulerFindMatchForeground, kc as getDomNodePagePosition, kd as isNative, ki as EventType$1, kl as structuralEquals, kn as IMarkdownRendererService, ko as TextLength, kr as IKeybindingService, ks as originalFSPath, kt as CaseSensitiveToggle, ku as InlayHintKind, l as formatDocumentRangesWithSelectedProvider, la as editorFindMatchHighlightForeground, lc as $$1, ld as Emitter, lf as booleanComparator, li as ReplaceCommandThatPreservesSelection, ll as observableValue, ln as IClipboardService, lo as NullState, lr as CodeEditorWidget, ls as MultiEditorAction, lt as IWorkspaceTrustManagementService, lu as format, m as EditorStateCancellationTokenSource, ma as editorHoverForeground, mc as ModifierKeyEmitter, md as Disposable, mf as equals, mi as InMemoryClipboardMetadataManager, ml as autorunDelta, mn as score, mo as ITextResourceConfigurationService, mr as indentOfLine, ms as registerModelAndPositionCommand, mt as isStandaloneEditorWorkspace, mu as isLowSurrogate, n as MarkerSeverity$1, na as editorActiveLinkForeground, nc as ITextModelService, nd as EditorOptions, nf as isCancellationError, ni as getEnterAction, nl as mapObservableArrayCached, nn as constObservable, no as renderViewLine, nr as KeyDownAction, ns as IConfigurationService, nt as ToggleHighContrastNLS, nu as commonSuffixLength, o as editor, oa as editorFindMatchForeground, oc as createDecorator, od as USUAL_WORD_SEPARATORS, of as asArray, oi as WordPartOperations, ol as observableFromEvent, on as IsWebContext, oo as getStandardTokenTypeAtPosition, or as IHoverService, os as EditorAction2, ot as IRenameSymbolTrackerService, ou as containsUppercaseCharacter, p as EditorState$2, pa as editorHoverBorder, pc as EventType, pd as LinkedList, pf as distinct, pi as CopyOptions, pl as autorun, pn as toMultilineTokens2, po as ILanguageFeaturesService, pr as TextModel, ps as registerInstantiatedEditorAction, pt as isSingleFolderWorkspaceIdentifier, pu as isHighSurrogate, q as CountBadge, qa as removeCSSRulesContainingSelector, qc as runWhenWindowIdle, qd as isUndefined, qi as inputForeground, ql as raceCancellation, qn as fuzzyScore, qo as LcsDiff, qr as registerThemingParticipant, qs as IContextKeyService, qt as defaultCountBadgeStyles, qu as basename$1, r as MarkerTag, ra as editorBackground, rc as IModelService, rd as ShowLightbulbIconMode, rf as onUnexpectedError, ri as ProcessedIndentRulesSupport, rl as observableFromPromise, rn as getBaseLayerHoverDelegate, ro as LineDecoration, rr as getHoverAccessibleViewHint, rs as StringBuilder, rt as registerEditorFeature, ru as compare, sa as editorFindMatchHighlight, sc as applyFontInfo, sd as EDITOR_FONT_DEFAULTS, sf as binarySearch, si as MoveOperations, sl as observableFromEventOpts, sn as IsWindowsContext, so as TokenMetadata, sr as WorkbenchHoverDelegate, ss as EditorCommand, st as IBulkEditService, su as escapeRegExpCharacters, ta as diffRemoved, tc as toAction, td as EditorFontLigatures, tf as illegalArgument, ti as ShiftCommand, tl as derivedObservableWithCache, tn as List, to as RenderLineInput, tr as HoverWidget, ts as ILanguageService, tt as QuickOutlineNLS, tu as commonPrefixLength, u as formatDocumentWithSelectedProvider, ua as editorFindRangeHighlightBorder, uc as Dimension, ud as Event, uf as coalesce, ui as ReplaceCommandThatSelectsText, ul as asyncTransaction, un as AccessibilitySignal, uo as nullTokenize, ur as InlineDecoration, us as registerEditorAction, ut as IWorkspaceContextService, uu as getLeadingWhitespace, v as isDiffEditor, va as editorInlayHintForeground, vc as addDisposableGenericMouseUpListener, vd as combinedDisposable, vf as mapFilter, vi as UriList, vl as derivedDisposable, vn as IInlineCompletionsService, vo as linesDiffComputers, vr as LanguageAgnosticBracketTokens, vs as ILoggerService, vt as Progress, vu as splitLines, w as observableCodeEditor, wa as editorSelectionHighlight, wc as getActiveDocument, wd as OS, wi as prefixedUuid, wl as arrayEqualsC, wn as QuickInputButtonLocation, wo as TextEdit, wr as EditSources, ws as dirname, wt as WorkbenchListFocusContextKey, wu as CompletionItemKinds, x as TextModelText, xa as editorInlayHintTypeBackground, xc as addStandardDisposableListener, xd as toDisposable, xf as reverseOrder, xi as matchesMimeType, xl as DerivedWithSetter, xn as WillSaveStateReason, xo as applyEditsToRanges, xr as lengthAdd, xs as DataUri, xt as MarkerSeverity, xu as CachedFunction, y as DiffEditorWidget, ya as editorInlayHintParameterBackground, yc as addDisposableListener, yd as dispose, yf as numberComparator, yi as VSDataTransfer, yl as derivedHandleChanges, yn as SnoozeInlineCompletion, yo as StringEdit, yr as TextBufferTokenizer, ys as LogLevel, yt as IMarkerData, yu as trim, z as HC_LIGHT_THEME_NAME, za as asCssVariable, zc as isAncestor, zd as assertReturnsDefined, zi as quickInputListFocusIconForeground, zl as DeferredPromise, zn as createCommandUri, zo as SearchParams, zr as isModelDecorationInComment, zs as MenuRegistry, zt as IDefaultAccountService, zu as TokenizationRegistry } from "./editor.api-BtqJ5Bxw.js";
|
|
2
|
-
import { typescriptDefaults } from "./monaco.contribution-
|
|
1
|
+
import { $ as QuickCommandNLS, $a as alert, $c as debouncedObservable, $d as BugIndicatingError, $i as diffInserted, $l as isFirefox, $n as ClickAction, $o as Mimes, $r as getGoodIndentForLine, $s as Separator, $t as isLocalizedString, $u as CancellationTokenSource, A as observableSignalFromEvent, Aa as overviewRulerSelectionHighlightForeground, Ac as getDomNodeZoomLevel, Ad as isWeb, Ai as Gesture, Al as thisEqualsC, An as openLinkFromMarkdown, Ao as LineRange, Ar as ViewGpuContext, As as relativePath, At as RegexToggle, Au as InlineCompletionEndOfLifeReasonKind, Ba as darken, Bc as isAncestorOfActiveElement, Bd as assertType, Bi as buttonBackground, Bl as Delayer, Bn as isEmptyMarkdownString, Bo as GlyphMarginLane, Br as isModelDecorationInString, Bs as SubmenuItemAction, Bt as IDataChannelService, Bu as getAriaLabelForSymbol, C as WorkbenchToolBar, Ca as editorSelectionBackground, Cc as clearNode, Cd as createSingleCallFunction, Ci as generateUuid, Cl as DebugLocation, Cn as ItemActivation, Co as lineRangeMappingFromRangeMappings, Cr as EditDeltaInfo, Cs as basenameOrAuthority, Ct as WorkbenchAsyncDataTree, Cu as Command, D as LineSource, Da as editorWidgetBackground, Dc as getClientArea, Dd as isLittleEndian, Di as ScrollableElement, Dl as equalsIfDefinedC, Dn as ILayoutService, Do as StringText, Dr as IUserInteractionService, Ds as isEqual, Dt as FindInput, Du as FoldingRangeKind, E as rangeIsSingleLine, Ea as editorWarningForeground, Ec as getActiveWindow, Ed as isLinux, Ei as DomScrollableElement, El as equalsIfDefined, En as IDialogService, Eo as AbstractText, Er as groupByMap, Es as extname, Et as WorkbenchTreeElementCanExpand, Eu as DocumentPasteTriggerKind, F as bindContextKey, Fa as contrastBorder, Fc as getWindow, Fd as localize2, Fi as DynamicCssRules, Fl as Schemas, Fn as renderLabelWithIcons, Fo as findLastMax, Fr as Severity, Fs as Action2, Ft as SplitView, Fu as ProviderId, G as IconLabel, Ga as createCSSRule, Gc as reset, Gd as isObject, Gi as inputBackground, Gl as disposableTimeout, Gn as anyScore, Go as safeIntl, Gr as overviewRulerRangeHighlight, Gs as ContextKeyEqualsExpr, Gt as getActionBarActions, Gu as Position, H as widgetClose, Ha as registerColor, Hc as isHTMLElement, Hd as isDefined, Hi as inputActiveOptionBackground, Hl as TimeoutTimer, Hn as stripIcons, Ho as OverviewRulerLane, Hr as computeIndentLevel, Hs as registerAction2, Ht as MenuEntryActionViewItem, Hu as Codicon, I as observableConfigValue, Ia as descriptionForeground, Ic as h, Id as cloneAndChange, Ii as EditorMouseEvent, Il as matchesScheme, In as IdGenerator, Io as mapFindFirst, Ir as Severity$1, Is as IMenuService, It as OrthogonalEdge, Iu as SelectedSuggestionInfo, J as Button, Ja as CONTEXT_ACCESSIBILITY_MODE_ENABLED, Jc as scheduleAtNextAnimationFrame, Jd as upcast, Ji as editorActionListForeground, Jl as raceCancellationError, Jn as fuzzyScoreGracefulAggressive, Jo as StringDiffSequence, Jr as themeColorFromId, Js as RawContextKey, Jt as defaultInputBoxStyles, Ju as dirname$1, K as HighlightedLabel, Ka as createStyleSheetFromObservable, Kc as runAtThisOrScheduleAtNextAnimationFrame, Kd as isString, Ki as inputBorder, Kl as first, Kn as createMatches, Ko as CharacterSet, Kr as IThemeService, Ks as ContextKeyExpr, Kt as getFlatActionBarActions, Ku as URI, L as createHotClass, La as foreground, Lc as hide, Ld as deepClone, Li as quickInputListFocusBackground, Ll as matchesSomeScheme, Ln as defaultGenerator, Lo as OffsetRange, Lr as GlyphRasterizer, Ls as MenuId, Lt as Sash, Lu as SignatureHelpTriggerKind, M as DisposableCancellationTokenSource, Ma as widgetShadow, Mc as getTopLeftOffset, Md as language, Mi as getColumnOfNodeOffset, Ml as ConstantStringHash, Mn as withSelection, Mo as findFirstMax, Mr as runOnChangeWithCancellationToken, Ms as LRUCache, Mt as navigateToggles, Mu as InlineCompletionTriggerKind, N as appendRemoveOnDispose, Na as scrollbarShadow, Nc as getTotalHeight, Nd as setTimeout0, Ni as isDark, Nl as hash, Nn as renderMarkdown$1, No as findFirstMin, Nr as runOnChangeWithStore, Ns as ResourceMap, Nt as Toggle, Nu as NewSymbolNameTag, O as RenderOptions, Oa as editorWidgetBorder, Oc as getComputedStyle, Od as isMacintosh, Oi as Widget, Ol as strictEquals, On as getAnchorRect, Oo as PositionOffsetTransformerBase, Or as NativeEditContextRegistry, Os as joinPath, Ot as HistoryInputBox, Ou as HoverVerbosityAction, P as StableEditorScrollState, Pa as activeContrastBorder, Pc as getTotalWidth, Pd as localize, Pi as isHighContrast, Pl as VSBuffer, Pn as renderIcon, Po as findLast, Pr as INotificationService, Ps as ITelemetryService, Pt as Sizing, Pu as NewSymbolNameTriggerKind, Q as InspectTokensNLS, Qa as IEditorWorkerService, Qc as trackFocus, Qd as checkAdjacentItems, Qi as minimapSelectionOccurrenceHighlight, Ql as StandardKeyboardEvent, Qn as or, Qo as product$1, Qr as EnterOperation, Qs as Action, Qt as getListStyles, Qu as CancellationToken, R as HC_BLACK_THEME_NAME, Ra as iconForeground, Rc as isActiveElement, Rd as mixin, Ri as quickInputListFocusForeground, Rl as AsyncIterableProducer, Rn as MarkdownString, Ro as UnicodeTextModelHighlighter, Rr as ensureNonNullable, Rs as MenuItemAction, Rt as ILabelService, Ru as SymbolKinds, S as MenuWorkbenchToolBar, Sa as editorInlayHintTypeForeground, Sc as append, Sd as Iterable, Sf as sum, Si as DataTransfers, Sl as DebugNameData, Sn as IQuickInputService, So as RangeMapping, Sr as lengthGetColumnCountIfZeroLineCount, Ss as basename, St as IListService, Su as mainWindow, T as Point, Ta as editorWarningBorder, Tc as getActiveElement, Td as isIOS, Ti as DomEmitter, Tl as equals$2, Tn as isKeyModified, To as TextReplacement, Tr as countEOL, Ts as extUri, Tt as WorkbenchTreeElementCanCollapse, Tu as DocumentHighlightKind, U as KeybindingLabel, Ua as transparent, Uc as isMouseEvent, Ud as isFunction, Ui as inputActiveOptionBorder, Ul as createCancelableAsyncIterableProducer, Un as FuzzyScore, Uo as shouldSynchronizeModel, Ur as editorBracketMatchForeground, Us as KeybindingsRegistry, Ut as TextOnlyMenuEntryActionViewItem, Uu as Selection, V as registerIcon, Va as oneOf, Vc as isEditableElement, Vd as isArrayOf, Vi as buttonForeground, Vl as RunOnceScheduler, Vn as isMarkdownString, Vo as InjectedTextCursorStops, Vr as isModelDecorationVisible, Vs as isIMenuItem, Vt as ActionBar, Vu as isLocationLink, W as unthemedKeybindingLabelOptions, Wa as GlobalPointerMoveMonitor, Wc as n, Wd as isNumber, Wi as inputActiveOptionForeground, Wl as createCancelablePromise, Wn as FuzzyScoreOptions, Wo as getMapForWordSeparators, Wr as ghostTextForeground, Ws as Registry, Wt as createActionViewItem, Wu as Range, X as IStandaloneThemeService, Xa as TabFocus, Xc as show, Xd as assertFn, Xi as listHighlightForeground, Xl as timeout, Xn as matchesSubString, Xo as PLAINTEXT_LANGUAGE_ID, Xr as EditorContextKeys, Xs as ICommandService, Xt as defaultListStyles, Xu as KeyChord, Y as Extensions$1, Ya as IAccessibilityService, Yc as setVisibility, Yd as assert, Yi as listFocusHighlightForeground, Yl as raceTimeout, Yn as matchesBaseContiguousSubString, Yo as ILanguageConfigurationService, Yr as CoreEditingCommands, Ys as CommandsRegistry, Yt as defaultKeybindingLabelStyles, Yu as sep, Z as GoToLineNLS, Za as IMarkerDecorationsService, Zc as size, Zd as assertNever, Zi as minimapFindMatch, Zl as StandardMouseEvent, Zn as matchesWords, Zo as Extensions, Zr as TypeOperations, Zs as ThemeIcon, Zt as defaultToggleStyles, Zu as isModifierKey, _ as isCodeEditor, _a as editorInlayHintBackground, _c as addDisposableGenericMouseDownListener, _d as RefCountedDisposable, _f as isNonEmptyArray, _i as LocalSelectionTransfer, _l as derived, _n as CancelSnoozeInlineCompletion, _o as RGBA, _r as parseDocument, _s as ILogService, _t as IProgressService, _u as lastNonWhitespaceIndex, a as Uri, aa as editorErrorForeground, ac as IInstantiationService, ad as unicodeHighlightConfigKeys, af as Permutation, ai as WordOperations, al as observableSignal, an as InputFocusedContext, ao as TokenArray, ar as IContextViewService, as as EditorAction, at as editorConfigurationBaseNode, au as containsRTL, b as HideUnchangedRegionsFeature, ba as editorInlayHintParameterForeground, bc as addStandardDisposableGenericMouseDownListener, bd as isDisposable, bf as quickSelect, bi as createStringDataTransferItem, bl as derivedOpts, bn as IStorageService, bo as StringReplacement, br as DenseKeyProvider, bs as canLog, bt as IMarkerService, bu as Lazy, c as languages, ca as editorFindMatchHighlightBorder, cc as PixelRatio, cd as EditorZoom, cf as binarySearch2, ci as ReplaceCommand, cl as disposableObservableValue, cn as TernarySearchTree, co as createTrustedTypesPolicy$1, cr as nativeHoverDelegate, cs as MultiCommand, ct as ResourceTextEdit, cu as firstNonWhitespaceIndex, d as getOnTypeFormattingEdits, da as editorForeground, dc as DisposableResizeObserver, dd as PauseableEmitter, df as compareBy, di as CursorState$1, dl as subtransaction, dn as IAccessibilitySignalService, do as nullTokenizeEncoded, dr as ModelDecorationInjectedTextOptions, ds as registerEditorCommand, dt as WORKSPACE_EXTENSION, du as isBasicASCII, ea as diffInsertedLine, ec as SubmenuAction, ed as cancelOnDispose, ef as CancellationError, ei as getIndentMetadata, el as debouncedObservable2, en as ActionViewItem, eo as status, er as HoverAction, es as registerSingleton, et as QuickHelpNLS, eu as InvisibleCharacters, f as FormattingEdit, fa as editorHoverBackground, fc as EventHelper, fd as StopWatch, ff as compareUndefinedSmallest, fi as normalizeIndentation, fl as transaction, fn as ISemanticTokensStylingService, fo as isCompletionsEnabledFromObject, fr as ModelDecorationOptions, fs as registerEditorContribution, ft as isEmptyWorkspaceIdentifier, fu as isFalsyOrWhitespace, g as getCodeEditor, ga as editorInfoForeground, gc as WindowIdleValue, gd as MutableDisposable, gf as isFalsyOrEmpty, gi as toExternalVSDataTransfer, gl as registerAutorunSelfDisposable, gn as IEnvironmentService, go as HSVA, gr as offsetEditFromContentChanges, gs as TriggerInlineEditCommandsRegistry, gt as IEditorProgressService, gu as isUpperAsciiLetter, h as TextModelCancellationTokenSource, ha as editorInfoBorder, hc as SafeTriangle, hd as DisposableStore, hf as groupBy, hi as generateDataToCopyAndStoreInMemory, hl as autorunWithStore, hn as ILanguageFeatureDebounceService, ho as Color, hr as recordChangesLazy, hs as registerMultiEditorAction, ht as toWorkspaceIdentifier, hu as isLowerAsciiLetter, i as Range$1, ia as editorErrorBorder, ic as ICodeEditorService, if as onUnexpectedExternalError, ii as CursorMoveCommands, il as recomputeInitiallyAndOnChange, in as getDefaultHoverDelegate, io as LineTokens, ir as IContextMenuService, is as IndentAction, it as EditOperation, iu as compareIgnoreCase, j as waitForState, ja as widgetBorder, jc as getShadowRoot, jd as isWindows, ji as CursorColumns, jl as clamp, jn as IOpenerService, jo as findFirstIdxMonotonousOrArrLen, jr as runOnChange, js as hasDriveLetter, jt as WholeWordsToggle, ju as InlineCompletionHintStyle, k as renderLines$1, ka as overviewRulerFindMatchForeground, kc as getDomNodePagePosition, kd as isNative, ki as EventType$1, kl as structuralEquals, kn as IMarkdownRendererService, ko as TextLength, kr as IKeybindingService, ks as originalFSPath, kt as CaseSensitiveToggle, ku as InlayHintKind, l as formatDocumentRangesWithSelectedProvider, la as editorFindMatchHighlightForeground, lc as $$1, ld as Emitter, lf as booleanComparator, li as ReplaceCommandThatPreservesSelection, ll as observableValue, ln as IClipboardService, lo as NullState, lr as CodeEditorWidget, ls as MultiEditorAction, lt as IWorkspaceTrustManagementService, lu as format, m as EditorStateCancellationTokenSource, ma as editorHoverForeground, mc as ModifierKeyEmitter, md as Disposable, mf as equals, mi as InMemoryClipboardMetadataManager, ml as autorunDelta, mn as score, mo as ITextResourceConfigurationService, mr as indentOfLine, ms as registerModelAndPositionCommand, mt as isStandaloneEditorWorkspace, mu as isLowSurrogate, n as MarkerSeverity$1, na as editorActiveLinkForeground, nc as ITextModelService, nd as EditorOptions, nf as isCancellationError, ni as getEnterAction, nl as mapObservableArrayCached, nn as constObservable, no as renderViewLine, nr as KeyDownAction, ns as IConfigurationService, nt as ToggleHighContrastNLS, nu as commonSuffixLength, o as editor, oa as editorFindMatchForeground, oc as createDecorator, od as USUAL_WORD_SEPARATORS, of as asArray, oi as WordPartOperations, ol as observableFromEvent, on as IsWebContext, oo as getStandardTokenTypeAtPosition, or as IHoverService, os as EditorAction2, ot as IRenameSymbolTrackerService, ou as containsUppercaseCharacter, p as EditorState$2, pa as editorHoverBorder, pc as EventType, pd as LinkedList, pf as distinct, pi as CopyOptions, pl as autorun, pn as toMultilineTokens2, po as ILanguageFeaturesService, pr as TextModel, ps as registerInstantiatedEditorAction, pt as isSingleFolderWorkspaceIdentifier, pu as isHighSurrogate, q as CountBadge, qa as removeCSSRulesContainingSelector, qc as runWhenWindowIdle, qd as isUndefined, qi as inputForeground, ql as raceCancellation, qn as fuzzyScore, qo as LcsDiff, qr as registerThemingParticipant, qs as IContextKeyService, qt as defaultCountBadgeStyles, qu as basename$1, r as MarkerTag, ra as editorBackground, rc as IModelService, rd as ShowLightbulbIconMode, rf as onUnexpectedError, ri as ProcessedIndentRulesSupport, rl as observableFromPromise, rn as getBaseLayerHoverDelegate, ro as LineDecoration, rr as getHoverAccessibleViewHint, rs as StringBuilder, rt as registerEditorFeature, ru as compare, sa as editorFindMatchHighlight, sc as applyFontInfo, sd as EDITOR_FONT_DEFAULTS, sf as binarySearch, si as MoveOperations, sl as observableFromEventOpts, sn as IsWindowsContext, so as TokenMetadata, sr as WorkbenchHoverDelegate, ss as EditorCommand, st as IBulkEditService, su as escapeRegExpCharacters, ta as diffRemoved, tc as toAction, td as EditorFontLigatures, tf as illegalArgument, ti as ShiftCommand, tl as derivedObservableWithCache, tn as List, to as RenderLineInput, tr as HoverWidget, ts as ILanguageService, tt as QuickOutlineNLS, tu as commonPrefixLength, u as formatDocumentWithSelectedProvider, ua as editorFindRangeHighlightBorder, uc as Dimension, ud as Event, uf as coalesce, ui as ReplaceCommandThatSelectsText, ul as asyncTransaction, un as AccessibilitySignal, uo as nullTokenize, ur as InlineDecoration, us as registerEditorAction, ut as IWorkspaceContextService, uu as getLeadingWhitespace, v as isDiffEditor, va as editorInlayHintForeground, vc as addDisposableGenericMouseUpListener, vd as combinedDisposable, vf as mapFilter, vi as UriList, vl as derivedDisposable, vn as IInlineCompletionsService, vo as linesDiffComputers, vr as LanguageAgnosticBracketTokens, vs as ILoggerService, vt as Progress, vu as splitLines, w as observableCodeEditor, wa as editorSelectionHighlight, wc as getActiveDocument, wd as OS, wi as prefixedUuid, wl as arrayEqualsC, wn as QuickInputButtonLocation, wo as TextEdit, wr as EditSources, ws as dirname, wt as WorkbenchListFocusContextKey, wu as CompletionItemKinds, x as TextModelText, xa as editorInlayHintTypeBackground, xc as addStandardDisposableListener, xd as toDisposable, xf as reverseOrder, xi as matchesMimeType, xl as DerivedWithSetter, xn as WillSaveStateReason, xo as applyEditsToRanges, xr as lengthAdd, xs as DataUri, xt as MarkerSeverity, xu as CachedFunction, y as DiffEditorWidget, ya as editorInlayHintParameterBackground, yc as addDisposableListener, yd as dispose, yf as numberComparator, yi as VSDataTransfer, yl as derivedHandleChanges, yn as SnoozeInlineCompletion, yo as StringEdit, yr as TextBufferTokenizer, ys as LogLevel, yt as IMarkerData, yu as trim, z as HC_LIGHT_THEME_NAME, za as asCssVariable, zc as isAncestor, zd as assertReturnsDefined, zi as quickInputListFocusIconForeground, zl as DeferredPromise, zn as createCommandUri, zo as SearchParams, zr as isModelDecorationInComment, zs as MenuRegistry, zt as IDefaultAccountService, zu as TokenizationRegistry } from "./editor.api-YVDhnHI-.js";
|
|
2
|
+
import { typescriptDefaults } from "./monaco.contribution-CaO2YABh.js";
|
|
3
3
|
// ../../node_modules/.pnpm/monaco-editor@0.57.0/node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditor/commands.js
|
|
4
4
|
var ToggleCollapseUnchangedRegions = class extends Action2 {
|
|
5
5
|
constructor() {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 分组落地页:由 `groupIndex: true` 时框架合成的条目使用。
|
|
3
|
+
* 没有源文件,只是把该组其它场景列出来。
|
|
4
|
+
*/
|
|
5
|
+
import type { SceneDescriptor } from '../types';
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
group: string;
|
|
8
|
+
items: SceneDescriptor[];
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
select: (id: string) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onSelect?: ((id: string) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
package/dist/types/config.d.ts
CHANGED
|
@@ -18,13 +18,29 @@ export interface PlaygroundConfig {
|
|
|
18
18
|
};
|
|
19
19
|
/** 扫描时排除的 glob(相对 scenes 根) */
|
|
20
20
|
exclude?: string[];
|
|
21
|
-
/**
|
|
21
|
+
/** 部署子路径(写入 Vite 的 base,影响资源路径;同时作为路由前缀的默认值) */
|
|
22
22
|
base?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 只作用于场景 URL 的前缀,不会写进 Vite 的 base。
|
|
25
|
+
* 多入口(MPA)部署时用:资源和主应用共享根路径,但场景路由要落在自己的子路径下,如 '/playground/'。
|
|
26
|
+
* 不配时回落 base ?? '/'。
|
|
27
|
+
*/
|
|
28
|
+
routeBase?: string;
|
|
23
29
|
/** dev server 端口 */
|
|
24
30
|
port?: number;
|
|
25
31
|
/** 契约清单要扫描的组件 glob(如 src/components 下所有 .vue);不配则不生成 manifest */
|
|
26
32
|
components?: string[];
|
|
27
33
|
/** 组件契约提取用的 tsconfig,默认项目根的 tsconfig.json */
|
|
28
34
|
tsconfig?: string;
|
|
35
|
+
/**
|
|
36
|
+
* 分组(scenes 下的一级目录名)→ 侧栏显示名。
|
|
37
|
+
* 例如 `{ 'tao-common': 'Tao 通用组件' }`;不配时用目录名首字母大写化。
|
|
38
|
+
*/
|
|
39
|
+
groups?: Record<string, string>;
|
|
40
|
+
/**
|
|
41
|
+
* 是否为每个分组自动合成一个「概览」落地页(列出该组所有场景)。
|
|
42
|
+
* 合成页没有源文件,不算进「N 个场景」的计数。默认 false。
|
|
43
|
+
*/
|
|
44
|
+
groupIndex?: boolean;
|
|
29
45
|
}
|
|
30
46
|
export declare const defineConfig: (config: PlaygroundConfig) => PlaygroundConfig;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,10 +5,10 @@ export { defineSceneMeta } from './scene-meta';
|
|
|
5
5
|
export type { SceneMeta } from './scene-meta';
|
|
6
6
|
export type { SceneDescriptor } from './types';
|
|
7
7
|
export { toast } from './components/toast';
|
|
8
|
-
export { useSceneArgs, currentArgs } from './payload/args';
|
|
9
|
-
export type { SceneArgs, SceneArgsOptions } from './payload/args';
|
|
10
|
-
export { useSceneOutput, currentOutput } from './payload/output';
|
|
11
|
-
export type { SceneSnapshot } from './payload/output';
|
|
8
|
+
export { useSceneArgs, currentArgs, currentArgsSlots } from './payload/args';
|
|
9
|
+
export type { SceneArgs, SceneArgsOptions, SceneArgsBinding } from './payload/args';
|
|
10
|
+
export { useSceneOutput, currentOutput, currentOutputSlots } from './payload/output';
|
|
11
|
+
export type { SceneSnapshot, SceneOutputBinding } from './payload/output';
|
|
12
12
|
export interface CreatePlaygroundOptions {
|
|
13
13
|
/** 挂载点,默认 `#app` */
|
|
14
14
|
el?: string | HTMLElement;
|
|
@@ -4,16 +4,33 @@ export interface SceneArgsOptions {
|
|
|
4
4
|
options?: Record<string, Array<string | number>>;
|
|
5
5
|
/** 字段标签,缺省用 key */
|
|
6
6
|
labels?: Record<string, string>;
|
|
7
|
+
/**
|
|
8
|
+
* 槽位名。一个场景里多次调用 `useSceneArgs` 时,每块入参各占一个槽位,
|
|
9
|
+
* 面板按名字分块显示。只调用一次时可以省略。
|
|
10
|
+
*/
|
|
11
|
+
slot?: string;
|
|
7
12
|
}
|
|
8
13
|
export interface SceneArgsBinding {
|
|
14
|
+
/** 槽位标识,缺省 `default` */
|
|
15
|
+
key: string;
|
|
16
|
+
/** 面板上显示的名字,等于 `options.slot` */
|
|
17
|
+
label: string;
|
|
9
18
|
values: SceneArgs;
|
|
10
19
|
defaults: SceneArgs;
|
|
11
20
|
options: SceneArgsOptions;
|
|
12
21
|
}
|
|
13
|
-
/**
|
|
14
|
-
export declare const
|
|
22
|
+
/** 当前场景挂载的全部入参槽位(同一时刻只有一个场景挂载) */
|
|
23
|
+
export declare const currentArgsSlots: import("vue").ShallowRef<SceneArgsBinding[], SceneArgsBinding[]>;
|
|
24
|
+
/** 兼容旧接口:第一个槽位 */
|
|
25
|
+
export declare const currentArgs: import("vue").ComputedRef<SceneArgsBinding | null>;
|
|
15
26
|
/**
|
|
16
27
|
* 在场景的 `<script setup>` 里声明可变入参,返回响应式对象:
|
|
17
28
|
* 面板改表单 → 这里同步变化 → 组件跟着重渲染。纯浏览器能力,生产环境同样可用。
|
|
29
|
+
*
|
|
30
|
+
* 一个场景里有多个 demo 时,各自调用一次并传 `slot` 区分:
|
|
31
|
+
* ```ts
|
|
32
|
+
* const primary = useSceneArgs({ size: 'md' }, { slot: '主按钮' })
|
|
33
|
+
* const ghost = useSceneArgs({ size: 'sm' }, { slot: '次按钮' })
|
|
34
|
+
* ```
|
|
18
35
|
*/
|
|
19
36
|
export declare const useSceneArgs: <T extends SceneArgs>(defaults: T, options?: SceneArgsOptions) => T;
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
export type SceneSnapshot = Record<string, unknown>;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export interface SceneOutputBinding {
|
|
3
|
+
/** 槽位标识,缺省 `default` */
|
|
4
|
+
key: string;
|
|
5
|
+
/** 面板上显示的名字,等于传进来的 slot */
|
|
6
|
+
label: string;
|
|
7
|
+
getter: () => SceneSnapshot;
|
|
8
|
+
}
|
|
9
|
+
/** 当前场景挂载的全部出参槽位;由面板轮询调用,纯前端实现 */
|
|
10
|
+
export declare const currentOutputSlots: import("vue").ShallowRef<SceneOutputBinding[], SceneOutputBinding[]>;
|
|
11
|
+
/** 兼容旧接口:第一个槽位 */
|
|
12
|
+
export declare const currentOutput: import("vue").ComputedRef<(() => SceneSnapshot) | null>;
|
|
13
|
+
/**
|
|
14
|
+
* 把场景里的响应式状态暴露成「出参」快照。
|
|
15
|
+
* 一个场景多个 demo 时传 `slot` 区分,例如 `useSceneOutput(() => ({ ... }), '主按钮')`。
|
|
16
|
+
*/
|
|
17
|
+
export declare const useSceneOutput: (getter: () => SceneSnapshot, slot?: string) => void;
|
package/dist/types/shims.d.ts
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
// monaco 的 TS 语言贡献是纯副作用模块,没有 d.ts
|
|
4
4
|
declare module 'monaco-editor/language/typescript/monaco.contribution'
|
|
5
5
|
|
|
6
|
+
// 编辑器样式由使用方的打包器在打开代码面板时按需加载
|
|
7
|
+
declare module '@rinova/playground/editor.css'
|
|
8
|
+
|
|
6
9
|
declare module 'virtual:playground/config' {
|
|
7
10
|
import type { PlaygroundConfig } from './config'
|
|
8
11
|
const config: PlaygroundConfig & { sceneCount: number }
|
package/dist/types/types.d.ts
CHANGED
|
@@ -3,6 +3,11 @@ import type { Component } from 'vue';
|
|
|
3
3
|
export interface SceneDescriptor {
|
|
4
4
|
/** 场景 id,等于相对 scenes 根目录的路径(不含扩展名),如 `button/basic` */
|
|
5
5
|
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* 条目类型:普通场景 / 由框架合成的分组落地页(`groupIndex: true` 时每个分组自动有一个)。
|
|
8
|
+
* 落地页没有源文件,`load` / `raw` 不会被调用。
|
|
9
|
+
*/
|
|
10
|
+
kind?: 'scene' | 'group-index';
|
|
6
11
|
/** 侧栏显示的标题,默认由文件名推导 */
|
|
7
12
|
title: string;
|
|
8
13
|
/** 一级分组名,等于场景所在目录名(按目录首字母大写化) */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rinova/playground",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "面向 Vue3 的「文件即场景」组件演示框架",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"default": "./dist/index.js"
|
|
11
11
|
},
|
|
12
12
|
"./style.css": "./dist/style.css",
|
|
13
|
+
"./editor.css": "./dist/editor.css",
|
|
13
14
|
"./package.json": "./package.json"
|
|
14
15
|
},
|
|
15
16
|
"files": [
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
"shiki": "4.6.0"
|
|
28
29
|
},
|
|
29
30
|
"scripts": {
|
|
30
|
-
"build": "vue-tsc --noEmit -p tsconfig.build.json && vite build && vue-tsc -p tsconfig.types.json && node --experimental-strip-types scripts/finalize-types.ts",
|
|
31
|
+
"build": "vue-tsc --noEmit -p tsconfig.build.json && vite build && node --experimental-strip-types scripts/copy-editor-css.ts && vue-tsc -p tsconfig.types.json && node --experimental-strip-types scripts/finalize-types.ts",
|
|
31
32
|
"typecheck": "vue-tsc --noEmit -p tsconfig.json"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
package/dist/output-Dx3ubog9.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { onBeforeUnmount, onMounted, reactive, shallowRef } from "vue";
|
|
2
|
-
// src/components/toast.ts
|
|
3
|
-
var toastState = reactive([]);
|
|
4
|
-
var seed = 0;
|
|
5
|
-
/** 轻提示。用法:toast('已复制'), toast('保存失败', 'error') */
|
|
6
|
-
var toast = (text, type = "info", duration = 2400) => {
|
|
7
|
-
const id = ++seed;
|
|
8
|
-
toastState.push({
|
|
9
|
-
id,
|
|
10
|
-
text,
|
|
11
|
-
type
|
|
12
|
-
});
|
|
13
|
-
window.setTimeout(() => {
|
|
14
|
-
const index = toastState.findIndex((item) => item.id === id);
|
|
15
|
-
if (index > -1) toastState.splice(index, 1);
|
|
16
|
-
}, duration);
|
|
17
|
-
};
|
|
18
|
-
// src/payload/args.ts
|
|
19
|
-
/** 同一时刻只有一个场景挂载,所以只需要一个"当前入参"槽位 */
|
|
20
|
-
var currentArgs = shallowRef(null);
|
|
21
|
-
/**
|
|
22
|
-
* 在场景的 `<script setup>` 里声明可变入参,返回响应式对象:
|
|
23
|
-
* 面板改表单 → 这里同步变化 → 组件跟着重渲染。纯浏览器能力,生产环境同样可用。
|
|
24
|
-
*/
|
|
25
|
-
var useSceneArgs = (defaults, options = {}) => {
|
|
26
|
-
const values = reactive({ ...defaults });
|
|
27
|
-
const binding = {
|
|
28
|
-
values,
|
|
29
|
-
defaults: { ...defaults },
|
|
30
|
-
options
|
|
31
|
-
};
|
|
32
|
-
onMounted(() => {
|
|
33
|
-
currentArgs.value = binding;
|
|
34
|
-
});
|
|
35
|
-
onBeforeUnmount(() => {
|
|
36
|
-
if (currentArgs.value === binding) currentArgs.value = null;
|
|
37
|
-
});
|
|
38
|
-
return values;
|
|
39
|
-
};
|
|
40
|
-
// src/payload/output.ts
|
|
41
|
-
/** 出参快照:由面板轮询调用,纯前端实现 */
|
|
42
|
-
var currentOutput = shallowRef(null);
|
|
43
|
-
var useSceneOutput = (getter) => {
|
|
44
|
-
onMounted(() => {
|
|
45
|
-
currentOutput.value = getter;
|
|
46
|
-
});
|
|
47
|
-
onBeforeUnmount(() => {
|
|
48
|
-
if (currentOutput.value === getter) currentOutput.value = null;
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
export { toast as a, useSceneArgs as i, useSceneOutput as n, toastState as o, currentArgs as r, currentOutput as t };
|