@lipsjs/lips 0.5.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 +12 -3
- package/dist/lips.js.map +3 -3
- package/dist/lips.min.js +7 -7
- package/dist/lips.min.js.map +3 -3
- package/dist/lynx.min.js +8 -8
- package/dist/lynx.min.js.map +5 -4
- package/dist/parts.min.js +7 -7
- package/dist/parts.min.js.map +3 -3
- 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 +3 -3
- package/dist/types/ir/facade.d.ts +9 -1
- package/dist/types/lynx/components.d.ts +3 -3
- package/dist/types/parts/combobox.d.ts +7 -0
- package/dist/types/plugins.d.ts +15 -0
- package/dist/types/precompile.d.ts +30 -1
- package/dist/types/types.d.ts +11 -0
- package/package.json +1 -1
package/dist/lips.js
CHANGED
|
@@ -2860,8 +2860,8 @@ class IRLips {
|
|
|
2860
2860
|
return this;
|
|
2861
2861
|
this.plugins.set(plugin.name, plugin);
|
|
2862
2862
|
plugin.requires?.forEach((each) => this.use(each));
|
|
2863
|
-
for (const [name,
|
|
2864
|
-
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);
|
|
2865
2865
|
if (held && held !== template)
|
|
2866
2866
|
throw new Error(`[lips] <${name}> of plugin <${plugin.name}> is registered already, by something else`);
|
|
2867
2867
|
this.register(name, template);
|
|
@@ -2869,6 +2869,15 @@ class IRLips {
|
|
|
2869
2869
|
plugin.install?.(this, options);
|
|
2870
2870
|
return this;
|
|
2871
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;
|
|
2872
2881
|
unregister(name) {
|
|
2873
2882
|
this.store.delete(name);
|
|
2874
2883
|
return this;
|
|
@@ -6519,4 +6528,4 @@ export {
|
|
|
6519
6528
|
untrack
|
|
6520
6529
|
};
|
|
6521
6530
|
|
|
6522
|
-
//# debugId=
|
|
6531
|
+
//# debugId=6C2621E463E9E43B64756E2164756E21
|