@luna-park/plugin 1.0.5 → 1.0.7
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/index.cjs +1 -1
- package/dist/index.d.ts +8 -7
- package/dist/index.js +18 -16
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-DmZsz62R.cjs");var n=(i=>(i.Color="color",i.FontSize="font-size",i.FontWeight="font-weight",i.FontFamily="font-family",i.Length="length",i.Time="time",i))(n||{});function e(i){return i}async function r(i,o){return typeof i=="function"?i({app:o.app,config:o.config,internal:o.internal,mode:o.mode||"editor"}):i}exports.ELogicScope=t.J;exports.ELogicType=t._;exports.EVarType=t.i;exports.LogicType=t.u;exports.LogicUtil=t.x;exports.makeLogicNode=t.T;exports.ETokenType=n;exports.getPluginParam=r;exports.makePlugin=e;
|
package/dist/index.d.ts
CHANGED
|
@@ -122,7 +122,7 @@ declare enum EThemeMode {
|
|
|
122
122
|
Auto = "auto"
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
declare enum ETokenType {
|
|
125
|
+
export declare enum ETokenType {
|
|
126
126
|
Color = "color",
|
|
127
127
|
FontSize = "font-size",
|
|
128
128
|
FontWeight = "font-weight",
|
|
@@ -344,9 +344,6 @@ declare type TCanvasExport = {
|
|
|
344
344
|
|
|
345
345
|
export declare type TComponent = {
|
|
346
346
|
component: Component;
|
|
347
|
-
custom?: {
|
|
348
|
-
slots: (attributes: Record<string, unknown>) => Record<string, false | TSchema>;
|
|
349
|
-
};
|
|
350
347
|
emits?: Record<string, TSchema>;
|
|
351
348
|
import?: Array<{
|
|
352
349
|
name: string;
|
|
@@ -355,7 +352,7 @@ export declare type TComponent = {
|
|
|
355
352
|
models?: Record<string, TSchema>;
|
|
356
353
|
name: string;
|
|
357
354
|
properties?: Record<string, TSchema>;
|
|
358
|
-
slots?: Record<string,
|
|
355
|
+
slots?: Record<string, TSlot> | ((attributes: Record<string, unknown>) => Record<string, TSlot>);
|
|
359
356
|
};
|
|
360
357
|
|
|
361
358
|
declare type TComponentExport = {
|
|
@@ -764,7 +761,7 @@ export declare type TPlugin<TConfig extends TSchema = TSchema, TInternal = unkno
|
|
|
764
761
|
editor?: {
|
|
765
762
|
components?: TOption<TEnv<TConfig, TInternal>, Array<TComponent>>;
|
|
766
763
|
nodes?: TOption<TEnv<TConfig, TInternal>, Array<TLogicNode>>;
|
|
767
|
-
tokens?: TOption<TEnv<TConfig, TInternal>,
|
|
764
|
+
tokens?: TOption<TEnv<TConfig, TInternal>, Array<TToken>>;
|
|
768
765
|
wrapper?: TOption<TEnv<TConfig, TInternal>, Component>;
|
|
769
766
|
};
|
|
770
767
|
icon: string;
|
|
@@ -821,6 +818,8 @@ declare type TScriptExport = {
|
|
|
821
818
|
state: TStateExport;
|
|
822
819
|
};
|
|
823
820
|
|
|
821
|
+
declare type TSlot = TSchema<TObject> | TSchema<TVoid>;
|
|
822
|
+
|
|
824
823
|
declare type TStateExport = Record<string, unknown>;
|
|
825
824
|
|
|
826
825
|
declare type TStoreExport = {
|
|
@@ -852,8 +851,10 @@ declare type TTextExport = {
|
|
|
852
851
|
state: TStateExport;
|
|
853
852
|
};
|
|
854
853
|
|
|
855
|
-
declare type TToken = {
|
|
854
|
+
export declare type TToken = {
|
|
855
|
+
id: string;
|
|
856
856
|
name?: string;
|
|
857
|
+
type: ETokenType;
|
|
857
858
|
value: string;
|
|
858
859
|
};
|
|
859
860
|
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import { J as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { J as e, _ as f, i as g, u as l, x as m, T as u } from "./index-CxGB_fZK.js";
|
|
2
|
+
var t = /* @__PURE__ */ ((i) => (i.Color = "color", i.FontSize = "font-size", i.FontWeight = "font-weight", i.FontFamily = "font-family", i.Length = "length", i.Time = "time", i))(t || {});
|
|
3
|
+
function n(i) {
|
|
4
|
+
return i;
|
|
4
5
|
}
|
|
5
|
-
async function a(
|
|
6
|
-
return typeof
|
|
7
|
-
app:
|
|
8
|
-
config:
|
|
9
|
-
internal:
|
|
10
|
-
mode:
|
|
11
|
-
}) :
|
|
6
|
+
async function a(i, o) {
|
|
7
|
+
return typeof i == "function" ? i({
|
|
8
|
+
app: o.app,
|
|
9
|
+
config: o.config,
|
|
10
|
+
internal: o.internal,
|
|
11
|
+
mode: o.mode || "editor"
|
|
12
|
+
}) : i;
|
|
12
13
|
}
|
|
13
14
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
t as
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
e as ELogicScope,
|
|
16
|
+
f as ELogicType,
|
|
17
|
+
t as ETokenType,
|
|
18
|
+
g as EVarType,
|
|
19
|
+
l as LogicType,
|
|
20
|
+
m as LogicUtil,
|
|
19
21
|
a as getPluginParam,
|
|
20
|
-
|
|
22
|
+
u as makeLogicNode,
|
|
21
23
|
n as makePlugin
|
|
22
24
|
};
|