@happyvertical/smrt-svelte 0.55.7 → 0.55.8
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/AGENTS.md +7 -44
- package/README.md +112 -1
- package/agents/browser-ai.md +47 -0
- package/agents/command-palette.md +85 -0
- package/agents/import-export.md +62 -0
- package/agents/overview-surfaces.md +255 -0
- package/agents/screens.md +57 -0
- package/dist/browser-ai/adapters/tts/browser-synthesis.d.ts +5 -0
- package/dist/browser-ai/adapters/tts/browser-synthesis.d.ts.map +1 -1
- package/dist/browser-ai/adapters/tts/browser-synthesis.js +83 -55
- package/dist/components/command-palette/CommandPalette.svelte +75 -0
- package/dist/components/command-palette/CommandPalette.svelte.d.ts +22 -0
- package/dist/components/command-palette/CommandPalette.svelte.d.ts.map +1 -0
- package/dist/components/command-palette/CommandPaletteDialog.svelte +406 -0
- package/dist/components/command-palette/CommandPaletteDialog.svelte.d.ts +18 -0
- package/dist/components/command-palette/CommandPaletteDialog.svelte.d.ts.map +1 -0
- package/dist/components/command-palette/CommandPaletteTrigger.svelte +91 -0
- package/dist/components/command-palette/CommandPaletteTrigger.svelte.d.ts +17 -0
- package/dist/components/command-palette/CommandPaletteTrigger.svelte.d.ts.map +1 -0
- package/dist/components/command-palette/context.d.ts +18 -0
- package/dist/components/command-palette/context.d.ts.map +1 -0
- package/dist/components/command-palette/context.js +38 -0
- package/dist/components/command-palette/controller.svelte.d.ts +70 -0
- package/dist/components/command-palette/controller.svelte.d.ts.map +1 -0
- package/dist/components/command-palette/controller.svelte.js +379 -0
- package/dist/components/command-palette/hotkeys.d.ts +30 -0
- package/dist/components/command-palette/hotkeys.d.ts.map +1 -0
- package/dist/components/command-palette/hotkeys.js +161 -0
- package/dist/components/command-palette/index.d.ts +19 -0
- package/dist/components/command-palette/index.d.ts.map +1 -0
- package/dist/components/command-palette/index.js +17 -0
- package/dist/components/command-palette/match.d.ts +38 -0
- package/dist/components/command-palette/match.d.ts.map +1 -0
- package/dist/components/command-palette/match.js +172 -0
- package/dist/components/command-palette/providers.d.ts +159 -0
- package/dist/components/command-palette/providers.d.ts.map +1 -0
- package/dist/components/command-palette/providers.js +345 -0
- package/dist/components/command-palette/rank.d.ts +20 -0
- package/dist/components/command-palette/rank.d.ts.map +1 -0
- package/dist/components/command-palette/rank.js +74 -0
- package/dist/components/command-palette/types.d.ts +119 -0
- package/dist/components/command-palette/types.d.ts.map +1 -0
- package/dist/components/command-palette/types.js +10 -0
- package/dist/components/command-palette/use-provider.svelte.d.ts +14 -0
- package/dist/components/command-palette/use-provider.svelte.d.ts.map +1 -0
- package/dist/components/command-palette/use-provider.svelte.js +23 -0
- package/dist/components/import-export/ImportExport.svelte +678 -0
- package/dist/components/import-export/ImportExport.svelte.d.ts +5 -0
- package/dist/components/import-export/ImportExport.svelte.d.ts.map +1 -0
- package/dist/components/import-export/collection-adapter.d.ts +35 -0
- package/dist/components/import-export/collection-adapter.d.ts.map +1 -0
- package/dist/components/import-export/collection-adapter.js +42 -0
- package/dist/components/import-export/csv.d.ts +60 -0
- package/dist/components/import-export/csv.d.ts.map +1 -0
- package/dist/components/import-export/csv.js +192 -0
- package/dist/components/import-export/download.d.ts +4 -0
- package/dist/components/import-export/download.d.ts.map +1 -0
- package/dist/components/import-export/download.js +17 -0
- package/dist/components/import-export/export.d.ts +25 -0
- package/dist/components/import-export/export.d.ts.map +1 -0
- package/dist/components/import-export/export.js +68 -0
- package/dist/components/import-export/fields.d.ts +48 -0
- package/dist/components/import-export/fields.d.ts.map +1 -0
- package/dist/components/import-export/fields.js +103 -0
- package/dist/components/import-export/index.d.ts +12 -0
- package/dist/components/import-export/index.d.ts.map +1 -0
- package/dist/components/import-export/index.js +9 -0
- package/dist/components/import-export/mapping.d.ts +12 -0
- package/dist/components/import-export/mapping.d.ts.map +1 -0
- package/dist/components/import-export/mapping.js +38 -0
- package/dist/components/import-export/props.d.ts +34 -0
- package/dist/components/import-export/props.d.ts.map +1 -0
- package/dist/components/import-export/props.js +1 -0
- package/dist/components/import-export/report.d.ts +13 -0
- package/dist/components/import-export/report.d.ts.map +1 -0
- package/dist/components/import-export/report.js +50 -0
- package/dist/components/import-export/runner.d.ts +17 -0
- package/dist/components/import-export/runner.d.ts.map +1 -0
- package/dist/components/import-export/runner.js +39 -0
- package/dist/components/import-export/types.d.ts +100 -0
- package/dist/components/import-export/types.d.ts.map +1 -0
- package/dist/components/import-export/types.js +6 -0
- package/dist/components/import-export/validate.d.ts +39 -0
- package/dist/components/import-export/validate.d.ts.map +1 -0
- package/dist/components/import-export/validate.js +268 -0
- package/dist/components/overview/OverviewGrid.svelte +579 -0
- package/dist/components/overview/OverviewGrid.svelte.d.ts +5 -0
- package/dist/components/overview/OverviewGrid.svelte.d.ts.map +1 -0
- package/dist/components/overview/WidgetOptionsForm.svelte +193 -0
- package/dist/components/overview/WidgetOptionsForm.svelte.d.ts +5 -0
- package/dist/components/overview/WidgetOptionsForm.svelte.d.ts.map +1 -0
- package/dist/components/overview/controller.svelte.d.ts +92 -0
- package/dist/components/overview/controller.svelte.d.ts.map +1 -0
- package/dist/components/overview/controller.svelte.js +336 -0
- package/dist/components/overview/format.d.ts +13 -0
- package/dist/components/overview/format.d.ts.map +1 -0
- package/dist/components/overview/format.js +45 -0
- package/dist/components/overview/grid-types.d.ts +52 -0
- package/dist/components/overview/grid-types.d.ts.map +1 -0
- package/dist/components/overview/grid-types.js +1 -0
- package/dist/components/overview/index.d.ts +24 -0
- package/dist/components/overview/index.d.ts.map +1 -0
- package/dist/components/overview/index.js +22 -0
- package/dist/components/overview/load.d.ts +30 -0
- package/dist/components/overview/load.d.ts.map +1 -0
- package/dist/components/overview/load.js +92 -0
- package/dist/components/overview/markdown.d.ts +53 -0
- package/dist/components/overview/markdown.d.ts.map +1 -0
- package/dist/components/overview/markdown.js +203 -0
- package/dist/components/overview/model.d.ts +100 -0
- package/dist/components/overview/model.d.ts.map +1 -0
- package/dist/components/overview/model.js +460 -0
- package/dist/components/overview/recipe-widgets.d.ts +77 -0
- package/dist/components/overview/recipe-widgets.d.ts.map +1 -0
- package/dist/components/overview/recipe-widgets.js +151 -0
- package/dist/components/overview/registry.d.ts +45 -0
- package/dist/components/overview/registry.d.ts.map +1 -0
- package/dist/components/overview/registry.js +112 -0
- package/dist/components/overview/resize.d.ts +25 -0
- package/dist/components/overview/resize.d.ts.map +1 -0
- package/dist/components/overview/resize.js +41 -0
- package/dist/components/overview/schema.d.ts +34 -0
- package/dist/components/overview/schema.d.ts.map +1 -0
- package/dist/components/overview/schema.js +180 -0
- package/dist/components/overview/server.d.ts +14 -0
- package/dist/components/overview/server.d.ts.map +1 -0
- package/dist/components/overview/server.js +13 -0
- package/dist/components/overview/types.d.ts +235 -0
- package/dist/components/overview/types.d.ts.map +1 -0
- package/dist/components/overview/types.js +17 -0
- package/dist/components/overview/widgets/ChartWidget.svelte +111 -0
- package/dist/components/overview/widgets/ChartWidget.svelte.d.ts +6 -0
- package/dist/components/overview/widgets/ChartWidget.svelte.d.ts.map +1 -0
- package/dist/components/overview/widgets/MetricWidget.svelte +86 -0
- package/dist/components/overview/widgets/MetricWidget.svelte.d.ts +6 -0
- package/dist/components/overview/widgets/MetricWidget.svelte.d.ts.map +1 -0
- package/dist/components/overview/widgets/NoteWidget.svelte +61 -0
- package/dist/components/overview/widgets/NoteWidget.svelte.d.ts +5 -0
- package/dist/components/overview/widgets/NoteWidget.svelte.d.ts.map +1 -0
- package/dist/components/overview/widgets/RecordListWidget.svelte +91 -0
- package/dist/components/overview/widgets/RecordListWidget.svelte.d.ts +6 -0
- package/dist/components/overview/widgets/RecordListWidget.svelte.d.ts.map +1 -0
- package/dist/components/overview/widgets/ShortcutsWidget.svelte +80 -0
- package/dist/components/overview/widgets/ShortcutsWidget.svelte.d.ts +6 -0
- package/dist/components/overview/widgets/ShortcutsWidget.svelte.d.ts.map +1 -0
- package/dist/components/overview/widgets/core.d.ts +44 -0
- package/dist/components/overview/widgets/core.d.ts.map +1 -0
- package/dist/components/overview/widgets/core.js +222 -0
- package/dist/components/overview/widgets/data.d.ts +76 -0
- package/dist/components/overview/widgets/data.d.ts.map +1 -0
- package/dist/components/overview/widgets/data.js +40 -0
- package/dist/components/screens/DetailScreen.svelte +220 -0
- package/dist/components/screens/DetailScreen.svelte.d.ts +5 -0
- package/dist/components/screens/DetailScreen.svelte.d.ts.map +1 -0
- package/dist/components/screens/EditForm.svelte +313 -0
- package/dist/components/screens/EditForm.svelte.d.ts +5 -0
- package/dist/components/screens/EditForm.svelte.d.ts.map +1 -0
- package/dist/components/screens/ListScreen.svelte +191 -0
- package/dist/components/screens/ListScreen.svelte.d.ts +5 -0
- package/dist/components/screens/ListScreen.svelte.d.ts.map +1 -0
- package/dist/components/screens/RecipeScreens.svelte +237 -0
- package/dist/components/screens/RecipeScreens.svelte.d.ts +5 -0
- package/dist/components/screens/RecipeScreens.svelte.d.ts.map +1 -0
- package/dist/components/screens/fields.d.ts +54 -0
- package/dist/components/screens/fields.d.ts.map +1 -0
- package/dist/components/screens/fields.js +229 -0
- package/dist/components/screens/index.d.ts +8 -0
- package/dist/components/screens/index.d.ts.map +1 -0
- package/dist/components/screens/index.js +6 -0
- package/dist/components/screens/types.d.ts +215 -0
- package/dist/components/screens/types.d.ts.map +1 -0
- package/dist/components/screens/types.js +1 -0
- package/dist/components/screens/values.d.ts +62 -0
- package/dist/components/screens/values.d.ts.map +1 -0
- package/dist/components/screens/values.js +289 -0
- package/dist/components/sortable/controller.svelte.d.ts +10 -0
- package/dist/components/sortable/controller.svelte.d.ts.map +1 -1
- package/dist/components/sortable/controller.svelte.js +29 -7
- package/dist/components/workspace/manifest-nav.d.ts +20 -0
- package/dist/components/workspace/manifest-nav.d.ts.map +1 -1
- package/dist/components/workspace/manifest-nav.js +42 -13
- package/dist/i18n/server.d.ts +6 -0
- package/dist/i18n/server.d.ts.map +1 -1
- package/dist/i18n/server.js +6 -0
- package/dist/i18n/strings.import-export.d.ts +88 -0
- package/dist/i18n/strings.import-export.d.ts.map +1 -0
- package/dist/i18n/strings.import-export.js +88 -0
- package/dist/i18n/strings.overview.d.ts +100 -0
- package/dist/i18n/strings.overview.d.ts.map +1 -0
- package/dist/i18n/strings.overview.js +107 -0
- package/dist/i18n/strings.palette.d.ts +18 -0
- package/dist/i18n/strings.palette.d.ts.map +1 -0
- package/dist/i18n/strings.palette.js +18 -0
- package/dist/i18n/strings.screens.d.ts +31 -0
- package/dist/i18n/strings.screens.d.ts.map +1 -0
- package/dist/i18n/strings.screens.js +31 -0
- package/package.json +45 -16
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The widget registry (#3727): `registerWidget({ type, component, options,
|
|
3
|
+
* load, allowedIn, version, migrate })`. Registration is code, done once at
|
|
4
|
+
* module scope by the app or a package; what a user stores is only data that
|
|
5
|
+
* names a registered type, validated against it on save and on load.
|
|
6
|
+
*
|
|
7
|
+
* Svelte-free apart from type imports, so a server load can use it.
|
|
8
|
+
*/
|
|
9
|
+
import type { Component } from 'svelte';
|
|
10
|
+
import { type RegisteredWidget, type WidgetComponentProps, type WidgetDefinition } from './types.js';
|
|
11
|
+
/** Holds widget definitions by type. */
|
|
12
|
+
export declare class WidgetRegistry {
|
|
13
|
+
#private;
|
|
14
|
+
/**
|
|
15
|
+
* Register a widget. Registering the same type again throws unless
|
|
16
|
+
* `replace` is set; returns a disposer that removes this registration.
|
|
17
|
+
*/
|
|
18
|
+
register<Data>(def: WidgetDefinition<Data>, options?: {
|
|
19
|
+
replace?: boolean;
|
|
20
|
+
}): () => void;
|
|
21
|
+
get(type: string): RegisteredWidget | undefined;
|
|
22
|
+
has(type: string): boolean;
|
|
23
|
+
/** Registered types in registration order. */
|
|
24
|
+
types(): string[];
|
|
25
|
+
list(): RegisteredWidget[];
|
|
26
|
+
}
|
|
27
|
+
/** Create an isolated registry (tests, or an app with several surfaces). */
|
|
28
|
+
export declare function createWidgetRegistry(): WidgetRegistry;
|
|
29
|
+
/** The registry overview components and loaders use unless given another. */
|
|
30
|
+
export declare const defaultWidgetRegistry: WidgetRegistry;
|
|
31
|
+
/** Register a widget type on the default registry. */
|
|
32
|
+
export declare function registerWidget<Data>(def: WidgetDefinition<Data>, options?: {
|
|
33
|
+
replace?: boolean;
|
|
34
|
+
}): () => void;
|
|
35
|
+
/** A resolved component for each widget type that has one. */
|
|
36
|
+
export type WidgetComponents = Map<string, Component<WidgetComponentProps>>;
|
|
37
|
+
/**
|
|
38
|
+
* Resolve the components for `types`: eager components as is, lazy ones by
|
|
39
|
+
* awaiting `loadComponent`. Call it in a universal page load (or before
|
|
40
|
+
* mount) so the grid can render every widget synchronously on the server and
|
|
41
|
+
* hydrate without a mismatch; a type that fails to resolve is left out and
|
|
42
|
+
* renders as unavailable.
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveWidgetComponents(types: Iterable<string>, registry?: WidgetRegistry): Promise<WidgetComponents>;
|
|
45
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/components/overview/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAIL,KAAK,gBAAgB,EAGrB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACtB,MAAM,YAAY,CAAC;AAyCpB,wCAAwC;AACxC,qBAAa,cAAc;;IAGzB;;;OAGG;IACH,QAAQ,CAAC,IAAI,EACX,GAAG,EAAE,gBAAgB,CAAC,IAAI,CAAC,EAC3B,OAAO,GAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAO,GAClC,MAAM,IAAI;IAab,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAI/C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B,8CAA8C;IAC9C,KAAK,IAAI,MAAM,EAAE;IAIjB,IAAI,IAAI,gBAAgB,EAAE;CAG3B;AAED,4EAA4E;AAC5E,wBAAgB,oBAAoB,IAAI,cAAc,CAErD;AAED,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,EAAE,cAAuC,CAAC;AAE5E,sDAAsD;AACtD,wBAAgB,cAAc,CAAC,IAAI,EACjC,GAAG,EAAE,gBAAgB,CAAC,IAAI,CAAC,EAC3B,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAC9B,MAAM,IAAI,CAEZ;AAED,8DAA8D;AAC9D,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAQ5E;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EACvB,QAAQ,GAAE,cAAsC,GAC/C,OAAO,CAAC,gBAAgB,CAAC,CAyB3B"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { assertWidgetOptionFields } from './schema.js';
|
|
2
|
+
import { OVERVIEW_MAX_SPAN, OVERVIEW_MIN_SPAN, OVERVIEW_PAGE_ID_PATTERN, WIDGET_TYPE_PATTERN, } from './types.js';
|
|
3
|
+
function toRegistered(def) {
|
|
4
|
+
if (!WIDGET_TYPE_PATTERN.test(def.type)) {
|
|
5
|
+
throw new Error(`registerWidget: invalid widget type "${def.type}"`);
|
|
6
|
+
}
|
|
7
|
+
const version = def.version ?? 1;
|
|
8
|
+
if (!Number.isSafeInteger(version) || version < 1) {
|
|
9
|
+
throw new Error(`widget "${def.type}": version must be a positive integer`);
|
|
10
|
+
}
|
|
11
|
+
const minSpan = def.minSpan ?? OVERVIEW_MIN_SPAN;
|
|
12
|
+
const maxSpan = def.maxSpan ?? OVERVIEW_MAX_SPAN;
|
|
13
|
+
if (!Number.isInteger(minSpan) ||
|
|
14
|
+
!Number.isInteger(maxSpan) ||
|
|
15
|
+
minSpan < OVERVIEW_MIN_SPAN ||
|
|
16
|
+
maxSpan > OVERVIEW_MAX_SPAN ||
|
|
17
|
+
minSpan > maxSpan) {
|
|
18
|
+
throw new Error(`widget "${def.type}": invalid span range`);
|
|
19
|
+
}
|
|
20
|
+
const defaultSpan = Math.min(maxSpan, Math.max(minSpan, def.defaultSpan ?? minSpan));
|
|
21
|
+
for (const id of def.allowedIn ?? []) {
|
|
22
|
+
if (!OVERVIEW_PAGE_ID_PATTERN.test(id)) {
|
|
23
|
+
throw new Error(`widget "${def.type}": invalid allowedIn id "${id}"`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
assertWidgetOptionFields(def.type, def.options);
|
|
27
|
+
return Object.freeze({
|
|
28
|
+
...def,
|
|
29
|
+
options: Object.freeze([...def.options]),
|
|
30
|
+
version,
|
|
31
|
+
defaultSpan,
|
|
32
|
+
minSpan,
|
|
33
|
+
maxSpan,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/** Holds widget definitions by type. */
|
|
37
|
+
export class WidgetRegistry {
|
|
38
|
+
#widgets = new Map();
|
|
39
|
+
/**
|
|
40
|
+
* Register a widget. Registering the same type again throws unless
|
|
41
|
+
* `replace` is set; returns a disposer that removes this registration.
|
|
42
|
+
*/
|
|
43
|
+
register(def, options = {}) {
|
|
44
|
+
const registered = toRegistered(def);
|
|
45
|
+
if (this.#widgets.has(def.type) && !options.replace) {
|
|
46
|
+
throw new Error(`registerWidget: "${def.type}" is already registered`);
|
|
47
|
+
}
|
|
48
|
+
this.#widgets.set(def.type, registered);
|
|
49
|
+
return () => {
|
|
50
|
+
if (this.#widgets.get(def.type) === registered) {
|
|
51
|
+
this.#widgets.delete(def.type);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
get(type) {
|
|
56
|
+
return this.#widgets.get(type);
|
|
57
|
+
}
|
|
58
|
+
has(type) {
|
|
59
|
+
return this.#widgets.has(type);
|
|
60
|
+
}
|
|
61
|
+
/** Registered types in registration order. */
|
|
62
|
+
types() {
|
|
63
|
+
return [...this.#widgets.keys()];
|
|
64
|
+
}
|
|
65
|
+
list() {
|
|
66
|
+
return [...this.#widgets.values()];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/** Create an isolated registry (tests, or an app with several surfaces). */
|
|
70
|
+
export function createWidgetRegistry() {
|
|
71
|
+
return new WidgetRegistry();
|
|
72
|
+
}
|
|
73
|
+
/** The registry overview components and loaders use unless given another. */
|
|
74
|
+
export const defaultWidgetRegistry = createWidgetRegistry();
|
|
75
|
+
/** Register a widget type on the default registry. */
|
|
76
|
+
export function registerWidget(def, options) {
|
|
77
|
+
return defaultWidgetRegistry.register(def, options);
|
|
78
|
+
}
|
|
79
|
+
function isModule(value) {
|
|
80
|
+
return typeof value === 'object' && value !== null && 'default' in value;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Resolve the components for `types`: eager components as is, lazy ones by
|
|
84
|
+
* awaiting `loadComponent`. Call it in a universal page load (or before
|
|
85
|
+
* mount) so the grid can render every widget synchronously on the server and
|
|
86
|
+
* hydrate without a mismatch; a type that fails to resolve is left out and
|
|
87
|
+
* renders as unavailable.
|
|
88
|
+
*/
|
|
89
|
+
export async function resolveWidgetComponents(types, registry = defaultWidgetRegistry) {
|
|
90
|
+
const out = new Map();
|
|
91
|
+
await Promise.all([...new Set(types)].map(async (type) => {
|
|
92
|
+
const def = registry.get(type);
|
|
93
|
+
if (!def)
|
|
94
|
+
return;
|
|
95
|
+
if (def.component) {
|
|
96
|
+
out.set(type, def.component);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (!def.loadComponent)
|
|
100
|
+
return;
|
|
101
|
+
try {
|
|
102
|
+
const loaded = await def.loadComponent();
|
|
103
|
+
out.set(type, (isModule(loaded)
|
|
104
|
+
? loaded.default
|
|
105
|
+
: loaded));
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
// Left out: the grid shows the widget as unavailable.
|
|
109
|
+
}
|
|
110
|
+
}));
|
|
111
|
+
return out;
|
|
112
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure span math for resizing a widget by dragging its inline-end edge
|
|
3
|
+
* (#3727). The grid is a flow of equal columns; a span is a whole number of
|
|
4
|
+
* them, so a drag snaps to the nearest column boundary.
|
|
5
|
+
*/
|
|
6
|
+
export interface SpanFromPointerInput {
|
|
7
|
+
/** Pointer position along the inline axis (client coordinates). */
|
|
8
|
+
pointer: number;
|
|
9
|
+
/** The tile's inline-start edge (left in LTR, right in RTL). */
|
|
10
|
+
start: number;
|
|
11
|
+
rtl: boolean;
|
|
12
|
+
/** Width of the whole grid. */
|
|
13
|
+
gridWidth: number;
|
|
14
|
+
/** Columns currently drawn (1, 2 or 4 depending on the container). */
|
|
15
|
+
columns: number;
|
|
16
|
+
/** Gap between columns, in the same unit. */
|
|
17
|
+
gap: number;
|
|
18
|
+
min: number;
|
|
19
|
+
max: number;
|
|
20
|
+
}
|
|
21
|
+
/** The span a tile would have if its end edge were at `pointer`. */
|
|
22
|
+
export declare function spanFromPointer(input: SpanFromPointerInput): number;
|
|
23
|
+
/** The next span for an arrow key, or `null` for a key that does nothing. */
|
|
24
|
+
export declare function spanFromKey(key: string, span: number, min: number, max: number, rtl: boolean): number | null;
|
|
25
|
+
//# sourceMappingURL=resize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resize.d.ts","sourceRoot":"","sources":["../../../src/components/overview/resize.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,oBAAoB;IACnC,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;IACb,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAQnE;AAED,6EAA6E;AAC7E,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,OAAO,GACX,MAAM,GAAG,IAAI,CAyBf"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure span math for resizing a widget by dragging its inline-end edge
|
|
3
|
+
* (#3727). The grid is a flow of equal columns; a span is a whole number of
|
|
4
|
+
* them, so a drag snaps to the nearest column boundary.
|
|
5
|
+
*/
|
|
6
|
+
/** The span a tile would have if its end edge were at `pointer`. */
|
|
7
|
+
export function spanFromPointer(input) {
|
|
8
|
+
const { pointer, start, rtl, gridWidth, gap, min, max } = input;
|
|
9
|
+
const columns = Math.max(1, Math.floor(input.columns));
|
|
10
|
+
const width = rtl ? start - pointer : pointer - start;
|
|
11
|
+
const column = (gridWidth - gap * (columns - 1)) / columns;
|
|
12
|
+
const raw = column + gap > 0 ? Math.round((width + gap) / (column + gap)) : min;
|
|
13
|
+
return Math.max(min, Math.min(max, columns, raw));
|
|
14
|
+
}
|
|
15
|
+
/** The next span for an arrow key, or `null` for a key that does nothing. */
|
|
16
|
+
export function spanFromKey(key, span, min, max, rtl) {
|
|
17
|
+
let next;
|
|
18
|
+
switch (key) {
|
|
19
|
+
case 'ArrowRight':
|
|
20
|
+
next = span + (rtl ? -1 : 1);
|
|
21
|
+
break;
|
|
22
|
+
case 'ArrowLeft':
|
|
23
|
+
next = span + (rtl ? 1 : -1);
|
|
24
|
+
break;
|
|
25
|
+
case 'ArrowUp':
|
|
26
|
+
next = span + 1;
|
|
27
|
+
break;
|
|
28
|
+
case 'ArrowDown':
|
|
29
|
+
next = span - 1;
|
|
30
|
+
break;
|
|
31
|
+
case 'Home':
|
|
32
|
+
next = min;
|
|
33
|
+
break;
|
|
34
|
+
case 'End':
|
|
35
|
+
next = max;
|
|
36
|
+
break;
|
|
37
|
+
default:
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return Math.max(min, Math.min(max, next));
|
|
41
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Versioned widget option schemas (#3727). A widget's options are a flat list
|
|
3
|
+
* of typed fields; this module validates untrusted option values against it.
|
|
4
|
+
*
|
|
5
|
+
* The rule that keeps a stored overview from running arbitrary queries: an
|
|
6
|
+
* option value can only be a JSON primitive that passes its field's type, so
|
|
7
|
+
* there is no free-form filter, SQL, expression or URL field. A `model` option
|
|
8
|
+
* is a bare identifier (optionally confined to a page-declared list) and every
|
|
9
|
+
* other "which data" option is an `identifier` or a closed `enum`; the loader
|
|
10
|
+
* maps those to queries it owns and authorizes.
|
|
11
|
+
*
|
|
12
|
+
* Pure and Svelte-free: it runs on the server on save and on load, and in the
|
|
13
|
+
* browser for the option editor.
|
|
14
|
+
*/
|
|
15
|
+
import type { OverviewOptions, WidgetOptionField, WidgetOptionsContext, WidgetOptionsResult } from './types.js';
|
|
16
|
+
/** A field, preset or period id: short, no separators that form paths. */
|
|
17
|
+
export declare const IDENTIFIER_PATTERN: RegExp;
|
|
18
|
+
/** `Class`, `pkg:Class` or `@scope/pkg:Class`. */
|
|
19
|
+
export declare const MODEL_PATTERN: RegExp;
|
|
20
|
+
/** Throws when a schema is malformed: unsafe or duplicate keys, empty enums, invalid defaults. */
|
|
21
|
+
export declare function assertWidgetOptionFields(type: string, fields: readonly WidgetOptionField[]): void;
|
|
22
|
+
/** The options a new widget starts with: every field that has a default. */
|
|
23
|
+
export declare function defaultWidgetOptions(fields: readonly WidgetOptionField[]): OverviewOptions;
|
|
24
|
+
/**
|
|
25
|
+
* Validate untrusted options against a schema. Strict: an unknown key, a
|
|
26
|
+
* wrong type, an out-of-range number, a value outside a closed set, or a
|
|
27
|
+
* missing required field fails the whole object (all issues are reported).
|
|
28
|
+
* Missing optional fields take their default, or stay absent. A `null` value
|
|
29
|
+
* counts as missing. The result contains only schema keys, in schema order.
|
|
30
|
+
*/
|
|
31
|
+
export declare function validateWidgetOptions(fields: readonly WidgetOptionField[], raw: unknown, context?: WidgetOptionsContext): WidgetOptionsResult;
|
|
32
|
+
/** Structural equality of two option objects (primitives only). */
|
|
33
|
+
export declare function optionsEqual(a: OverviewOptions | undefined, b: OverviewOptions | undefined): boolean;
|
|
34
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/overview/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EACV,eAAe,EAEf,iBAAiB,EAEjB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAGpB,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,QAAoC,CAAC;AACpE,kDAAkD;AAClD,eAAO,MAAM,aAAa,QAC4D,CAAC;AAavF,kGAAkG;AAClG,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,SAAS,iBAAiB,EAAE,GACnC,IAAI,CAwBN;AAwED,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,iBAAiB,EAAE,GACnC,eAAe,CAQjB;AAuBD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,iBAAiB,EAAE,EACpC,GAAG,EAAE,OAAO,EACZ,OAAO,CAAC,EAAE,oBAAoB,GAC7B,mBAAmB,CA+BrB;AAED,mEAAmE;AACnE,wBAAgB,YAAY,CAC1B,CAAC,EAAE,eAAe,GAAG,SAAS,EAC9B,CAAC,EAAE,eAAe,GAAG,SAAS,GAC7B,OAAO,CAQT"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
const KEY_PATTERN = /^[A-Za-z][A-Za-z0-9]{0,31}$/;
|
|
2
|
+
/** A field, preset or period id: short, no separators that form paths. */
|
|
3
|
+
export const IDENTIFIER_PATTERN = /^[A-Za-z_][A-Za-z0-9_.-]{0,63}$/;
|
|
4
|
+
/** `Class`, `pkg:Class` or `@scope/pkg:Class`. */
|
|
5
|
+
export const MODEL_PATTERN = /^(?:(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*:)?[A-Za-z][A-Za-z0-9_]{0,63}$/;
|
|
6
|
+
const MODEL_MAX_LENGTH = 160;
|
|
7
|
+
const DEFAULT_TEXT_MAX = 200;
|
|
8
|
+
const DEFAULT_MARKDOWN_MAX = 10_000;
|
|
9
|
+
function isPlainRecord(value) {
|
|
10
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
const proto = Object.getPrototypeOf(value);
|
|
14
|
+
return proto === Object.prototype || proto === null;
|
|
15
|
+
}
|
|
16
|
+
/** Throws when a schema is malformed: unsafe or duplicate keys, empty enums, invalid defaults. */
|
|
17
|
+
export function assertWidgetOptionFields(type, fields) {
|
|
18
|
+
const seen = new Set();
|
|
19
|
+
for (const field of fields) {
|
|
20
|
+
if (!KEY_PATTERN.test(field.key)) {
|
|
21
|
+
throw new Error(`widget "${type}": invalid option key "${field.key}"`);
|
|
22
|
+
}
|
|
23
|
+
if (seen.has(field.key)) {
|
|
24
|
+
throw new Error(`widget "${type}": duplicate option key "${field.key}"`);
|
|
25
|
+
}
|
|
26
|
+
seen.add(field.key);
|
|
27
|
+
if (field.type === 'enum' && !field.choices?.length) {
|
|
28
|
+
throw new Error(`widget "${type}": enum option "${field.key}" needs choices`);
|
|
29
|
+
}
|
|
30
|
+
if (field.default !== undefined && field.default !== null) {
|
|
31
|
+
const check = validateField(field, field.default, undefined);
|
|
32
|
+
if (check.issue) {
|
|
33
|
+
throw new Error(`widget "${type}": default of option "${field.key}" is invalid`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function fail(key, code) {
|
|
39
|
+
return { issue: { key, code } };
|
|
40
|
+
}
|
|
41
|
+
function validateField(field, raw, context) {
|
|
42
|
+
const { key } = field;
|
|
43
|
+
switch (field.type) {
|
|
44
|
+
case 'text':
|
|
45
|
+
case 'markdown': {
|
|
46
|
+
if (typeof raw !== 'string')
|
|
47
|
+
return fail(key, 'invalid_type');
|
|
48
|
+
const max = field.maxLength ??
|
|
49
|
+
(field.type === 'markdown' ? DEFAULT_MARKDOWN_MAX : DEFAULT_TEXT_MAX);
|
|
50
|
+
if (raw.length > max)
|
|
51
|
+
return fail(key, 'too_long');
|
|
52
|
+
return { value: raw };
|
|
53
|
+
}
|
|
54
|
+
case 'identifier': {
|
|
55
|
+
if (typeof raw !== 'string')
|
|
56
|
+
return fail(key, 'invalid_type');
|
|
57
|
+
if (!IDENTIFIER_PATTERN.test(raw))
|
|
58
|
+
return fail(key, 'invalid_format');
|
|
59
|
+
return { value: raw };
|
|
60
|
+
}
|
|
61
|
+
case 'model': {
|
|
62
|
+
if (typeof raw !== 'string')
|
|
63
|
+
return fail(key, 'invalid_type');
|
|
64
|
+
if (raw.length > MODEL_MAX_LENGTH || !MODEL_PATTERN.test(raw)) {
|
|
65
|
+
return fail(key, 'invalid_format');
|
|
66
|
+
}
|
|
67
|
+
if (context?.models && !context.models.includes(raw)) {
|
|
68
|
+
return fail(key, 'not_allowed');
|
|
69
|
+
}
|
|
70
|
+
return { value: raw };
|
|
71
|
+
}
|
|
72
|
+
case 'enum': {
|
|
73
|
+
if (typeof raw !== 'string')
|
|
74
|
+
return fail(key, 'invalid_type');
|
|
75
|
+
if (!field.choices?.some((choice) => choice.value === raw)) {
|
|
76
|
+
return fail(key, 'not_in_choices');
|
|
77
|
+
}
|
|
78
|
+
return { value: raw };
|
|
79
|
+
}
|
|
80
|
+
case 'boolean': {
|
|
81
|
+
if (typeof raw !== 'boolean')
|
|
82
|
+
return fail(key, 'invalid_type');
|
|
83
|
+
return { value: raw };
|
|
84
|
+
}
|
|
85
|
+
case 'integer':
|
|
86
|
+
case 'number': {
|
|
87
|
+
if (typeof raw !== 'number' || !Number.isFinite(raw)) {
|
|
88
|
+
return fail(key, 'invalid_type');
|
|
89
|
+
}
|
|
90
|
+
if (field.type === 'integer' && !Number.isSafeInteger(raw)) {
|
|
91
|
+
return fail(key, 'invalid_type');
|
|
92
|
+
}
|
|
93
|
+
if ((field.min !== undefined && raw < field.min) ||
|
|
94
|
+
(field.max !== undefined && raw > field.max)) {
|
|
95
|
+
return fail(key, 'out_of_range');
|
|
96
|
+
}
|
|
97
|
+
return { value: raw };
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/** The options a new widget starts with: every field that has a default. */
|
|
102
|
+
export function defaultWidgetOptions(fields) {
|
|
103
|
+
const options = {};
|
|
104
|
+
for (const field of fields) {
|
|
105
|
+
if (field.default !== undefined && field.default !== null) {
|
|
106
|
+
options[field.key] = field.default;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return options;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Fill a missing or cleared field from its default, or report it required.
|
|
113
|
+
* A substituted default goes through the same check as a supplied value
|
|
114
|
+
* (including the page-confined `models` list): a default the page does not
|
|
115
|
+
* allow fails like any other disallowed value, so a loader never runs for it.
|
|
116
|
+
*/
|
|
117
|
+
function substituteDefault(field, context, options, issues) {
|
|
118
|
+
if (field.default !== undefined && field.default !== null) {
|
|
119
|
+
const check = validateField(field, field.default, context);
|
|
120
|
+
if (check.issue)
|
|
121
|
+
issues.push(check.issue);
|
|
122
|
+
else if (check.value !== undefined)
|
|
123
|
+
options[field.key] = check.value;
|
|
124
|
+
}
|
|
125
|
+
else if (field.required) {
|
|
126
|
+
issues.push({ key: field.key, code: 'required' });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Validate untrusted options against a schema. Strict: an unknown key, a
|
|
131
|
+
* wrong type, an out-of-range number, a value outside a closed set, or a
|
|
132
|
+
* missing required field fails the whole object (all issues are reported).
|
|
133
|
+
* Missing optional fields take their default, or stay absent. A `null` value
|
|
134
|
+
* counts as missing. The result contains only schema keys, in schema order.
|
|
135
|
+
*/
|
|
136
|
+
export function validateWidgetOptions(fields, raw, context) {
|
|
137
|
+
const issues = [];
|
|
138
|
+
const input = raw === undefined || raw === null ? {} : isPlainRecord(raw) ? raw : {};
|
|
139
|
+
if (raw !== undefined && raw !== null && !isPlainRecord(raw)) {
|
|
140
|
+
issues.push({ key: '', code: 'invalid_type' });
|
|
141
|
+
return { ok: false, issues };
|
|
142
|
+
}
|
|
143
|
+
const known = new Set(fields.map((field) => field.key));
|
|
144
|
+
for (const key of Object.keys(input)) {
|
|
145
|
+
if (!known.has(key))
|
|
146
|
+
issues.push({ key, code: 'unknown_option' });
|
|
147
|
+
}
|
|
148
|
+
const options = {};
|
|
149
|
+
for (const field of fields) {
|
|
150
|
+
const value = Object.hasOwn(input, field.key)
|
|
151
|
+
? input[field.key]
|
|
152
|
+
: undefined;
|
|
153
|
+
if (value === undefined || value === null) {
|
|
154
|
+
substituteDefault(field, context, options, issues);
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
// A cleared select or identifier box behaves as unset.
|
|
158
|
+
if (value === '' && field.type !== 'text' && field.type !== 'markdown') {
|
|
159
|
+
substituteDefault(field, context, options, issues);
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
const check = validateField(field, value, context);
|
|
163
|
+
if (check.issue)
|
|
164
|
+
issues.push(check.issue);
|
|
165
|
+
else if (check.value !== undefined)
|
|
166
|
+
options[field.key] = check.value;
|
|
167
|
+
}
|
|
168
|
+
return issues.length > 0 ? { ok: false, issues } : { ok: true, options };
|
|
169
|
+
}
|
|
170
|
+
/** Structural equality of two option objects (primitives only). */
|
|
171
|
+
export function optionsEqual(a, b) {
|
|
172
|
+
const left = a ?? {};
|
|
173
|
+
const right = b ?? {};
|
|
174
|
+
const keys = new Set([...Object.keys(left), ...Object.keys(right)]);
|
|
175
|
+
for (const key of keys) {
|
|
176
|
+
if ((left[key] ?? null) !== (right[key] ?? null))
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @happyvertical/smrt-svelte/overview/server
|
|
3
|
+
*
|
|
4
|
+
* The Svelte-free half of the overview surface (#3727): the data model, option
|
|
5
|
+
* schemas, widget registry, and the server load contract. Safe to import from
|
|
6
|
+
* a `+page.server.ts` or a save endpoint.
|
|
7
|
+
*/
|
|
8
|
+
export { type LoadOverviewOptions, loadOverview, type WidgetLoadInput, } from './load.js';
|
|
9
|
+
export { applyOverviewOverride, checkOverviewOverride, defineOverview, diffOverview, isEmptyOverride, nextWidgetId, type OverviewOverrideCheck, parseOverviewDocument, parseOverviewOverride, type ResolvedOverview, resolveOverview, type SanitizeOptions, sanitizeOverview, } from './model.js';
|
|
10
|
+
export { parseRecipeExportRef, type RecipeExportResolver, type RecipeWidgetRegistration, type RecipeWidgetSkip, type RecipeWidgetSkipReason, type RecipeWidgetSource, type RegisterRecipeWidgetsOptions, registerRecipeWidgets, } from './recipe-widgets.js';
|
|
11
|
+
export { createWidgetRegistry, defaultWidgetRegistry, registerWidget, resolveWidgetComponents, type WidgetComponents, WidgetRegistry, } from './registry.js';
|
|
12
|
+
export { assertWidgetOptionFields, defaultWidgetOptions, IDENTIFIER_PATTERN, MODEL_PATTERN, optionsEqual, validateWidgetOptions, } from './schema.js';
|
|
13
|
+
export * from './types.js';
|
|
14
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/components/overview/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,KAAK,mBAAmB,EACxB,YAAY,EACZ,KAAK,eAAe,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,KAAK,qBAAqB,EAC1B,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,eAAe,EACf,KAAK,eAAe,EACpB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EACjC,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,qBAAqB,GACtB,MAAM,aAAa,CAAC;AACrB,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @happyvertical/smrt-svelte/overview/server
|
|
3
|
+
*
|
|
4
|
+
* The Svelte-free half of the overview surface (#3727): the data model, option
|
|
5
|
+
* schemas, widget registry, and the server load contract. Safe to import from
|
|
6
|
+
* a `+page.server.ts` or a save endpoint.
|
|
7
|
+
*/
|
|
8
|
+
export { loadOverview, } from './load.js';
|
|
9
|
+
export { applyOverviewOverride, checkOverviewOverride, defineOverview, diffOverview, isEmptyOverride, nextWidgetId, parseOverviewDocument, parseOverviewOverride, resolveOverview, sanitizeOverview, } from './model.js';
|
|
10
|
+
export { parseRecipeExportRef, registerRecipeWidgets, } from './recipe-widgets.js';
|
|
11
|
+
export { createWidgetRegistry, defaultWidgetRegistry, registerWidget, resolveWidgetComponents, WidgetRegistry, } from './registry.js';
|
|
12
|
+
export { assertWidgetOptionFields, defaultWidgetOptions, IDENTIFIER_PATTERN, MODEL_PATTERN, optionsEqual, validateWidgetOptions, } from './schema.js';
|
|
13
|
+
export * from './types.js';
|