@bonsae/nrg-runtime 0.25.1 → 0.26.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.
Files changed (28) hide show
  1. package/package.json +3 -23
  2. package/server/index.cjs +48 -31
  3. package/server/resources/nrg-client.js +6 -6
  4. package/internal/README.md +0 -30
  5. package/internal/client/components.mjs +0 -1287
  6. package/internal/client/index.mjs +0 -229
  7. package/internal/server/index.cjs +0 -298
  8. package/types/client.d.ts +0 -266
  9. package/types/internal/client/components.d.ts +0 -9
  10. package/types/internal/client/index.d.ts +0 -9
  11. package/types/internal/server/index.d.ts +0 -422
  12. package/types/server.d.ts +0 -941
  13. package/types/shims/brands.d.ts +0 -32
  14. package/types/shims/client/form/components/node-red-config-input.vue.d.ts +0 -125
  15. package/types/shims/client/form/components/node-red-editor-input.vue.d.ts +0 -124
  16. package/types/shims/client/form/components/node-red-input-label.vue.d.ts +0 -34
  17. package/types/shims/client/form/components/node-red-input.vue.d.ts +0 -123
  18. package/types/shims/client/form/components/node-red-json-schema-form.vue.d.ts +0 -772
  19. package/types/shims/client/form/components/node-red-select-input.vue.d.ts +0 -132
  20. package/types/shims/client/form/components/node-red-toggle.vue.d.ts +0 -36
  21. package/types/shims/client/form/components/node-red-typed-input.vue.d.ts +0 -151
  22. package/types/shims/client/globals.d.ts +0 -320
  23. package/types/shims/client/types.d.ts +0 -227
  24. package/types/shims/components.d.ts +0 -23
  25. package/types/shims/constants.d.ts +0 -4
  26. package/types/shims/schema-options.d.ts +0 -24
  27. package/types/shims/shims-vue.d.ts +0 -5
  28. package/types/shims/typebox.d.ts +0 -10
@@ -1,32 +0,0 @@
1
- /**
2
- * Type-level contract shared by the server and client planes.
3
- *
4
- * `Static<>` of NRG's special schemas (NodeRef, TypedInput) produces these
5
- * brand shapes. Each plane maps them differently:
6
- *
7
- * - server `ResolvedStatic` (server/schemas/types): brand → runtime value
8
- * (NodeRef → the node instance, TypedInput → the resolving wrapper)
9
- * - client `EditorStatic` (client/types): brand → editor form value
10
- * (NodeRef → the referenced node id string, TypedInput → { value, type })
11
- *
12
- * Both planes import the brands from here, type-only, so renaming or
13
- * reshaping a brand is a compile error on both sides instead of silent
14
- * type drift. Keep this module free of runtime code and imports from
15
- * either plane.
16
- */
17
- /** Brand produced by `Static` of a NodeRef schema. */
18
- interface NodeRefResolved<T = any> {
19
- readonly __nrg_node_ref: true;
20
- readonly __instance: T;
21
- }
22
- /**
23
- * Structural shape of a resolved TypedInput (the server's TypedInput class
24
- * instance). The client matches this shape to map the field to its raw
25
- * editor value pair.
26
- */
27
- interface TypedInputResolved {
28
- resolve(...args: any[]): any;
29
- value: unknown;
30
- type: string;
31
- }
32
- export type { NodeRefResolved, TypedInputResolved };
@@ -1,125 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- modelValue: {
3
- type: StringConstructor;
4
- default: undefined;
5
- };
6
- value: {
7
- type: StringConstructor;
8
- default: string;
9
- };
10
- type: {
11
- type: StringConstructor;
12
- required: true;
13
- };
14
- node: {
15
- type: () => NodeRED.BaseNode;
16
- required: true;
17
- };
18
- propName: {
19
- type: StringConstructor;
20
- required: true;
21
- };
22
- label: {
23
- type: StringConstructor;
24
- default: string;
25
- };
26
- icon: {
27
- type: StringConstructor;
28
- default: string;
29
- };
30
- required: {
31
- type: BooleanConstructor;
32
- default: boolean;
33
- };
34
- error: {
35
- type: StringConstructor;
36
- default: string;
37
- };
38
- }>, {
39
- jqInput: import("vue").ShallowRef<any, any>;
40
- }, {}, {
41
- inputId(): string;
42
- effectiveValue(): string;
43
- }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:value")[], "update:modelValue" | "update:value", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
44
- modelValue: {
45
- type: StringConstructor;
46
- default: undefined;
47
- };
48
- value: {
49
- type: StringConstructor;
50
- default: string;
51
- };
52
- type: {
53
- type: StringConstructor;
54
- required: true;
55
- };
56
- node: {
57
- type: () => NodeRED.BaseNode;
58
- required: true;
59
- };
60
- propName: {
61
- type: StringConstructor;
62
- required: true;
63
- };
64
- label: {
65
- type: StringConstructor;
66
- default: string;
67
- };
68
- icon: {
69
- type: StringConstructor;
70
- default: string;
71
- };
72
- required: {
73
- type: BooleanConstructor;
74
- default: boolean;
75
- };
76
- error: {
77
- type: StringConstructor;
78
- default: string;
79
- };
80
- }>> & Readonly<{
81
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
82
- "onUpdate:value"?: ((...args: any[]) => any) | undefined;
83
- }>, {
84
- label: string;
85
- icon: string;
86
- required: boolean;
87
- modelValue: string;
88
- value: string;
89
- error: string;
90
- }, {}, {
91
- NodeRedInputLabel: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
92
- label: {
93
- type: StringConstructor;
94
- default: string;
95
- };
96
- icon: {
97
- type: StringConstructor;
98
- default: string;
99
- };
100
- required: {
101
- type: BooleanConstructor;
102
- default: boolean;
103
- };
104
- }>, {}, {}, {
105
- iconClass(): string;
106
- }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
107
- label: {
108
- type: StringConstructor;
109
- default: string;
110
- };
111
- icon: {
112
- type: StringConstructor;
113
- default: string;
114
- };
115
- required: {
116
- type: BooleanConstructor;
117
- default: boolean;
118
- };
119
- }>> & Readonly<{}>, {
120
- label: string;
121
- icon: string;
122
- required: boolean;
123
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
124
- }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
125
- export default _default;
@@ -1,124 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- modelValue: {
3
- type: StringConstructor;
4
- default: undefined;
5
- };
6
- value: {
7
- type: StringConstructor;
8
- default: string;
9
- };
10
- language: {
11
- type: StringConstructor;
12
- default: string;
13
- validator: (value: string) => boolean;
14
- };
15
- label: {
16
- type: StringConstructor;
17
- default: string;
18
- };
19
- icon: {
20
- type: StringConstructor;
21
- default: string;
22
- };
23
- required: {
24
- type: BooleanConstructor;
25
- default: boolean;
26
- };
27
- error: {
28
- type: StringConstructor;
29
- default: string;
30
- };
31
- }>, {
32
- editorInstance: import("vue").ShallowRef<any, any>;
33
- expandedEditorTray: import("vue").ShallowRef<any, any>;
34
- }, {
35
- editorId: string;
36
- stateId: string;
37
- trayElement: HTMLElement | null;
38
- }, {
39
- effectiveValue(): string;
40
- }, {
41
- mountEditor(): void;
42
- createEditorInstance(): void;
43
- createExpandeEditorTray(): void;
44
- onClickExpand(): void;
45
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:value" | "editor-ready" | "tray-open" | "tray-close")[], "update:modelValue" | "update:value" | "editor-ready" | "tray-open" | "tray-close", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
46
- modelValue: {
47
- type: StringConstructor;
48
- default: undefined;
49
- };
50
- value: {
51
- type: StringConstructor;
52
- default: string;
53
- };
54
- language: {
55
- type: StringConstructor;
56
- default: string;
57
- validator: (value: string) => boolean;
58
- };
59
- label: {
60
- type: StringConstructor;
61
- default: string;
62
- };
63
- icon: {
64
- type: StringConstructor;
65
- default: string;
66
- };
67
- required: {
68
- type: BooleanConstructor;
69
- default: boolean;
70
- };
71
- error: {
72
- type: StringConstructor;
73
- default: string;
74
- };
75
- }>> & Readonly<{
76
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
77
- "onUpdate:value"?: ((...args: any[]) => any) | undefined;
78
- "onEditor-ready"?: ((...args: any[]) => any) | undefined;
79
- "onTray-open"?: ((...args: any[]) => any) | undefined;
80
- "onTray-close"?: ((...args: any[]) => any) | undefined;
81
- }>, {
82
- label: string;
83
- icon: string;
84
- required: boolean;
85
- modelValue: string;
86
- value: string;
87
- error: string;
88
- language: string;
89
- }, {}, {
90
- NodeRedInputLabel: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
91
- label: {
92
- type: StringConstructor;
93
- default: string;
94
- };
95
- icon: {
96
- type: StringConstructor;
97
- default: string;
98
- };
99
- required: {
100
- type: BooleanConstructor;
101
- default: boolean;
102
- };
103
- }>, {}, {}, {
104
- iconClass(): string;
105
- }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
106
- label: {
107
- type: StringConstructor;
108
- default: string;
109
- };
110
- icon: {
111
- type: StringConstructor;
112
- default: string;
113
- };
114
- required: {
115
- type: BooleanConstructor;
116
- default: boolean;
117
- };
118
- }>> & Readonly<{}>, {
119
- label: string;
120
- icon: string;
121
- required: boolean;
122
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
123
- }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
124
- export default _default;
@@ -1,34 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- label: {
3
- type: StringConstructor;
4
- default: string;
5
- };
6
- icon: {
7
- type: StringConstructor;
8
- default: string;
9
- };
10
- required: {
11
- type: BooleanConstructor;
12
- default: boolean;
13
- };
14
- }>, {}, {}, {
15
- iconClass(): string;
16
- }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
17
- label: {
18
- type: StringConstructor;
19
- default: string;
20
- };
21
- icon: {
22
- type: StringConstructor;
23
- default: string;
24
- };
25
- required: {
26
- type: BooleanConstructor;
27
- default: boolean;
28
- };
29
- }>> & Readonly<{}>, {
30
- label: string;
31
- icon: string;
32
- required: boolean;
33
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
34
- export default _default;
@@ -1,123 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- modelValue: {
3
- type: (StringConstructor | NumberConstructor)[];
4
- default: undefined;
5
- };
6
- value: {
7
- type: (StringConstructor | NumberConstructor)[];
8
- default: string;
9
- };
10
- type: {
11
- type: StringConstructor;
12
- default: string;
13
- };
14
- placeholder: {
15
- type: StringConstructor;
16
- default: string;
17
- };
18
- label: {
19
- type: StringConstructor;
20
- default: string;
21
- };
22
- icon: {
23
- type: StringConstructor;
24
- default: string;
25
- };
26
- required: {
27
- type: BooleanConstructor;
28
- default: boolean;
29
- };
30
- error: {
31
- type: StringConstructor;
32
- default: string;
33
- };
34
- }>, {}, {
35
- internalValue: string;
36
- }, {
37
- effectiveValue(): string;
38
- }, {
39
- onInput(event: any): void;
40
- onFocus(): void;
41
- onBlur(): void;
42
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "update:modelValue" | "update:value")[], "input" | "update:modelValue" | "update:value", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
43
- modelValue: {
44
- type: (StringConstructor | NumberConstructor)[];
45
- default: undefined;
46
- };
47
- value: {
48
- type: (StringConstructor | NumberConstructor)[];
49
- default: string;
50
- };
51
- type: {
52
- type: StringConstructor;
53
- default: string;
54
- };
55
- placeholder: {
56
- type: StringConstructor;
57
- default: string;
58
- };
59
- label: {
60
- type: StringConstructor;
61
- default: string;
62
- };
63
- icon: {
64
- type: StringConstructor;
65
- default: string;
66
- };
67
- required: {
68
- type: BooleanConstructor;
69
- default: boolean;
70
- };
71
- error: {
72
- type: StringConstructor;
73
- default: string;
74
- };
75
- }>> & Readonly<{
76
- onInput?: ((...args: any[]) => any) | undefined;
77
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
78
- "onUpdate:value"?: ((...args: any[]) => any) | undefined;
79
- }>, {
80
- label: string;
81
- type: string;
82
- icon: string;
83
- required: boolean;
84
- modelValue: string | number;
85
- value: string | number;
86
- placeholder: string;
87
- error: string;
88
- }, {}, {
89
- NodeRedInputLabel: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
90
- label: {
91
- type: StringConstructor;
92
- default: string;
93
- };
94
- icon: {
95
- type: StringConstructor;
96
- default: string;
97
- };
98
- required: {
99
- type: BooleanConstructor;
100
- default: boolean;
101
- };
102
- }>, {}, {}, {
103
- iconClass(): string;
104
- }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
105
- label: {
106
- type: StringConstructor;
107
- default: string;
108
- };
109
- icon: {
110
- type: StringConstructor;
111
- default: string;
112
- };
113
- required: {
114
- type: BooleanConstructor;
115
- default: boolean;
116
- };
117
- }>> & Readonly<{}>, {
118
- label: string;
119
- icon: string;
120
- required: boolean;
121
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
122
- }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
123
- export default _default;