@glasshome/widget-sdk 1.32.4 → 1.33.1
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/dist/export-history.json +300 -0
- package/dist/framework/dialogs/WidgetDialog.d.ts +6 -2
- package/dist/framework/dialogs/index.d.ts +1 -1
- package/dist/framework/dialogs/warm-dialogs.d.ts +8 -0
- package/dist/framework/index.d.ts +1 -1
- package/dist/index.js +805 -771
- package/dist/vite/index.d.ts +4 -15
- package/dist/vite/index.js +860 -126
- package/guide/widgets.md +1 -1
- package/package.json +6 -3
package/dist/vite/index.d.ts
CHANGED
|
@@ -69,25 +69,14 @@ export declare function createUiImportTracker(warned?: Set<string>): {
|
|
|
69
69
|
take(): string[];
|
|
70
70
|
};
|
|
71
71
|
export declare function dropSelfReferencingVars(css: string): string;
|
|
72
|
-
/**
|
|
73
|
-
* Widgets render inside a closed shadow root in the host, which cuts them off
|
|
74
|
-
* from the host document stylesheet. Every widget bundle must therefore carry
|
|
75
|
-
* its own complete CSS: the ui theme + component styles, the SDK shell
|
|
76
|
-
* classes, and the Tailwind utilities its own JSX uses. This writes a
|
|
77
|
-
* generated css entry (a Tailwind pass over exactly those sources) plus a
|
|
78
|
-
* wrapper module that imports it ahead of the real widget entry, so Vite lib
|
|
79
|
-
* mode emits it as the widget's `<name>.css`.
|
|
80
|
-
*
|
|
81
|
-
* `source(none)` disables Tailwind's automatic project-root scan — without it
|
|
82
|
-
* every widget in a multi-widget repo gets the superset of all widgets'
|
|
83
|
-
* classes. The dark variant is redefined shadow-aware: `.dark *` cannot match
|
|
84
|
-
* across a shadow boundary, so the host mirrors the document's `dark` class
|
|
85
|
-
* onto the shadow host element and `:host(.dark)` picks it up.
|
|
86
|
-
*/
|
|
87
72
|
/** The widget's own folder plus the project's shared folders: Tailwind only
|
|
88
73
|
* emits utilities for files it is pointed at, and a widget's shared component
|
|
89
74
|
* is as much its source as its entry. A sibling widget's folder stays out. */
|
|
90
75
|
export declare function widgetProjectScanDirs(srcDir: string, widgetEntry: string): string[];
|
|
76
|
+
/** True when every host the range admits adopts ui's compiled CSS into each widget root, so the widget's sheet need not carry ui. */
|
|
77
|
+
export declare function hostStylesUi(sdkRange: string | undefined): boolean;
|
|
78
|
+
/** The Tailwind entry a widget's CSS compiles from: its own and the SDK's classes, plus all of ui while an older host it admits does not style ui itself. */
|
|
79
|
+
export declare function widgetTailwindEntry(scanDirs: string[], uiDir: string | null): string;
|
|
91
80
|
interface DiscoveredWidget {
|
|
92
81
|
name: string;
|
|
93
82
|
entry: string;
|