@lipsjs/lips 0.4.0 → 0.6.0
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/lips.js +14 -3
- package/dist/lips.js.map +4 -4
- package/dist/lips.min.js +7 -7
- package/dist/lips.min.js.map +4 -4
- package/dist/lynx-background.min.js +2 -2
- package/dist/lynx-background.min.js.map +3 -3
- package/dist/lynx.min.js +8 -8
- package/dist/lynx.min.js.map +6 -4
- package/dist/parts.min.js +89 -8
- package/dist/parts.min.js.map +13 -5
- package/dist/precompile.min.js +13 -13
- package/dist/precompile.min.js.map +5 -4
- package/dist/runtime.min.js +3 -3
- package/dist/runtime.min.js.map +4 -4
- package/dist/types/ir/facade.d.ts +9 -1
- package/dist/types/lynx/components.d.ts +28 -0
- package/dist/types/lynx.d.ts +1 -0
- package/dist/types/parts/combobox.d.ts +47 -0
- package/dist/types/parts/date.d.ts +75 -0
- package/dist/types/parts/dialog.d.ts +42 -0
- package/dist/types/parts/icon.d.ts +31 -0
- package/dist/types/parts/layer.d.ts +28 -0
- package/dist/types/parts/list.d.ts +45 -0
- package/dist/types/parts/popover.d.ts +3 -5
- package/dist/types/parts/reveal.d.ts +24 -0
- package/dist/types/parts/toast.d.ts +36 -0
- package/dist/types/parts.d.ts +8 -0
- package/dist/types/plugins.d.ts +15 -0
- package/dist/types/precompile.d.ts +30 -1
- package/dist/types/types.d.ts +18 -0
- package/package.json +1 -1
package/dist/lips.js
CHANGED
|
@@ -2185,6 +2185,7 @@ class IRRenderer {
|
|
|
2185
2185
|
input,
|
|
2186
2186
|
static: statics,
|
|
2187
2187
|
context: benv.context,
|
|
2188
|
+
refs: {},
|
|
2188
2189
|
setContext(arg, value) {
|
|
2189
2190
|
const write = (k, v) => writeContext(benv.context, k, v, irr.options.expose?.setContext);
|
|
2190
2191
|
typeof arg === "string" ? write(arg, value) : Object.entries(arg || {}).forEach(([k, v]) => write(k, v));
|
|
@@ -2385,6 +2386,7 @@ function renderIR(ir, setup = {}, options = {}) {
|
|
|
2385
2386
|
state,
|
|
2386
2387
|
input,
|
|
2387
2388
|
static: statics,
|
|
2389
|
+
refs: {},
|
|
2388
2390
|
...options.expose || {},
|
|
2389
2391
|
...setup.expose || {}
|
|
2390
2392
|
}), () => rootInst);
|
|
@@ -2858,8 +2860,8 @@ class IRLips {
|
|
|
2858
2860
|
return this;
|
|
2859
2861
|
this.plugins.set(plugin.name, plugin);
|
|
2860
2862
|
plugin.requires?.forEach((each) => this.use(each));
|
|
2861
|
-
for (const [name,
|
|
2862
|
-
const held = this.store.get(name);
|
|
2863
|
+
for (const [name, source] of Object.entries(plugin.components || {})) {
|
|
2864
|
+
const template = this.built(name, source), held = this.store.get(name);
|
|
2863
2865
|
if (held && held !== template)
|
|
2864
2866
|
throw new Error(`[lips] <${name}> of plugin <${plugin.name}> is registered already, by something else`);
|
|
2865
2867
|
this.register(name, template);
|
|
@@ -2867,6 +2869,15 @@ class IRLips {
|
|
|
2867
2869
|
plugin.install?.(this, options);
|
|
2868
2870
|
return this;
|
|
2869
2871
|
}
|
|
2872
|
+
built(name, source) {
|
|
2873
|
+
const made = !source.ir && this.config?.precompiled?.[name];
|
|
2874
|
+
if (!made)
|
|
2875
|
+
return source;
|
|
2876
|
+
let template = this.withIR.get(source);
|
|
2877
|
+
!template && this.withIR.set(source, template = { ...source, ...made });
|
|
2878
|
+
return template;
|
|
2879
|
+
}
|
|
2880
|
+
withIR = new WeakMap;
|
|
2870
2881
|
unregister(name) {
|
|
2871
2882
|
this.store.delete(name);
|
|
2872
2883
|
return this;
|
|
@@ -6517,4 +6528,4 @@ export {
|
|
|
6517
6528
|
untrack
|
|
6518
6529
|
};
|
|
6519
6530
|
|
|
6520
|
-
//# debugId=
|
|
6531
|
+
//# debugId=6C2621E463E9E43B64756E2164756E21
|