@sepveneto/dnde-core 0.6.4 → 0.6.5

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 (43) hide show
  1. package/dist/{Node-CnqlVnWy.d.cts → capability-Ce3qGTm3.d.cts} +184 -107
  2. package/dist/{Node-CnqlVnWy.d.ts → capability-Ce3qGTm3.d.ts} +184 -107
  3. package/dist/capability.cjs +172 -0
  4. package/dist/capability.d.cts +4 -0
  5. package/dist/capability.d.ts +4 -0
  6. package/dist/capability.js +15 -0
  7. package/dist/{chunk-PRK4NPVH.js → chunk-62FPS6PZ.js} +2 -0
  8. package/dist/chunk-W7WBD3NX.js +360 -0
  9. package/dist/chunk-XXR7SKZ3.js +132 -0
  10. package/dist/class/Container.d.cts +2 -2
  11. package/dist/class/Container.d.ts +2 -2
  12. package/dist/class/Node.d.cts +1 -1
  13. package/dist/class/Node.d.ts +1 -1
  14. package/dist/class/Widget.d.cts +1 -1
  15. package/dist/class/Widget.d.ts +1 -1
  16. package/dist/class/index.d.cts +2 -2
  17. package/dist/class/index.d.ts +2 -2
  18. package/dist/class/index.js +3 -3
  19. package/dist/dsl.cjs +405 -0
  20. package/dist/dsl.d.cts +85 -0
  21. package/dist/dsl.d.ts +85 -0
  22. package/dist/dsl.js +12 -0
  23. package/dist/helper/index.cjs +2 -0
  24. package/dist/helper/index.d.cts +1 -1
  25. package/dist/helper/index.d.ts +1 -1
  26. package/dist/helper/index.js +1 -1
  27. package/dist/helper/schema.cjs +2 -0
  28. package/dist/helper/schema.d.cts +3 -1
  29. package/dist/helper/schema.d.ts +3 -1
  30. package/dist/helper/schema.js +1 -1
  31. package/dist/helper/widget.d.cts +1 -1
  32. package/dist/helper/widget.d.ts +1 -1
  33. package/dist/index.cjs +484 -0
  34. package/dist/index.d.cts +3 -2
  35. package/dist/index.d.ts +3 -2
  36. package/dist/index.js +24 -4
  37. package/dist/internal.d.cts +2 -2
  38. package/dist/internal.d.ts +2 -2
  39. package/dist/tokens.d.cts +1 -1
  40. package/dist/tokens.d.ts +1 -1
  41. package/dist/types.d.cts +1 -1
  42. package/dist/types.d.ts +1 -1
  43. package/package.json +1 -1
package/dist/dsl.d.cts ADDED
@@ -0,0 +1,85 @@
1
+ import { j as CapabilityCatalog, i as WidgetCapability, F as FieldScope } from './capability-Ce3qGTm3.cjs';
2
+ import 'element-plus';
3
+ import 'vue';
4
+ import 'async-validator';
5
+
6
+ type DslScopeMode = 'style_only' | 'content_only' | 'layout_only' | 'any';
7
+ interface DslScope {
8
+ mode: DslScopeMode;
9
+ targets: string[];
10
+ }
11
+ interface DslPlacement {
12
+ afterUuid?: string;
13
+ beforeUuid?: string;
14
+ afterKey?: string;
15
+ beforeKey?: string;
16
+ group?: string;
17
+ }
18
+ interface DslCustomOperation {
19
+ type: string;
20
+ capability: string;
21
+ args: Record<string, unknown>;
22
+ }
23
+ interface DslAddOperation {
24
+ op: 'add';
25
+ key: string;
26
+ widget: string;
27
+ placement?: DslPlacement;
28
+ props?: Record<string, unknown>;
29
+ style?: Record<string, unknown>;
30
+ custom?: DslCustomOperation[];
31
+ }
32
+ interface DslUpdateOperation {
33
+ op: 'update';
34
+ uuid: string;
35
+ props?: Record<string, unknown>;
36
+ style?: Record<string, unknown>;
37
+ custom?: DslCustomOperation[];
38
+ }
39
+ interface DslDeleteOperation {
40
+ op: 'delete';
41
+ uuid: string;
42
+ confirmToken?: string;
43
+ }
44
+ type DslOperation = DslAddOperation | DslUpdateOperation | DslDeleteOperation;
45
+ interface EditorDsl {
46
+ dslVersion: '1.1';
47
+ baseRevision: number;
48
+ scope: DslScope;
49
+ operations: DslOperation[];
50
+ }
51
+ interface DslNodeSummary {
52
+ uuid: string;
53
+ type: string;
54
+ parentUuid?: string;
55
+ }
56
+ interface DslDocumentSnapshot {
57
+ revision: number;
58
+ nodes: DslNodeSummary[];
59
+ /** Tokens issued by the host after previewing destructive operations. */
60
+ confirmTokens?: string[];
61
+ }
62
+ interface DslIssue {
63
+ code: string;
64
+ path: string;
65
+ message: string;
66
+ }
67
+ interface DslValidationResult {
68
+ ok: boolean;
69
+ issues: DslIssue[];
70
+ normalized?: EditorDsl;
71
+ }
72
+ interface DslValidationOptions {
73
+ catalog: CapabilityCatalog;
74
+ snapshot: DslDocumentSnapshot;
75
+ }
76
+ /**
77
+ * Deterministic, side-effect-free validation for the versioned editor DSL.
78
+ * The host must validate before applying; the executor repeats critical checks
79
+ * against the live document.
80
+ */
81
+ declare function validateEditorDsl(input: unknown, options: DslValidationOptions): DslValidationResult;
82
+ declare function isStyleField(widget: WidgetCapability, key: string): boolean;
83
+ declare function isKnownScope(value: unknown): value is FieldScope;
84
+
85
+ export { type DslAddOperation, type DslCustomOperation, type DslDeleteOperation, type DslDocumentSnapshot, type DslIssue, type DslNodeSummary, type DslOperation, type DslPlacement, type DslScope, type DslScopeMode, type DslUpdateOperation, type DslValidationOptions, type DslValidationResult, type EditorDsl, isKnownScope, isStyleField, validateEditorDsl };
package/dist/dsl.d.ts ADDED
@@ -0,0 +1,85 @@
1
+ import { j as CapabilityCatalog, i as WidgetCapability, F as FieldScope } from './capability-Ce3qGTm3.js';
2
+ import 'element-plus';
3
+ import 'vue';
4
+ import 'async-validator';
5
+
6
+ type DslScopeMode = 'style_only' | 'content_only' | 'layout_only' | 'any';
7
+ interface DslScope {
8
+ mode: DslScopeMode;
9
+ targets: string[];
10
+ }
11
+ interface DslPlacement {
12
+ afterUuid?: string;
13
+ beforeUuid?: string;
14
+ afterKey?: string;
15
+ beforeKey?: string;
16
+ group?: string;
17
+ }
18
+ interface DslCustomOperation {
19
+ type: string;
20
+ capability: string;
21
+ args: Record<string, unknown>;
22
+ }
23
+ interface DslAddOperation {
24
+ op: 'add';
25
+ key: string;
26
+ widget: string;
27
+ placement?: DslPlacement;
28
+ props?: Record<string, unknown>;
29
+ style?: Record<string, unknown>;
30
+ custom?: DslCustomOperation[];
31
+ }
32
+ interface DslUpdateOperation {
33
+ op: 'update';
34
+ uuid: string;
35
+ props?: Record<string, unknown>;
36
+ style?: Record<string, unknown>;
37
+ custom?: DslCustomOperation[];
38
+ }
39
+ interface DslDeleteOperation {
40
+ op: 'delete';
41
+ uuid: string;
42
+ confirmToken?: string;
43
+ }
44
+ type DslOperation = DslAddOperation | DslUpdateOperation | DslDeleteOperation;
45
+ interface EditorDsl {
46
+ dslVersion: '1.1';
47
+ baseRevision: number;
48
+ scope: DslScope;
49
+ operations: DslOperation[];
50
+ }
51
+ interface DslNodeSummary {
52
+ uuid: string;
53
+ type: string;
54
+ parentUuid?: string;
55
+ }
56
+ interface DslDocumentSnapshot {
57
+ revision: number;
58
+ nodes: DslNodeSummary[];
59
+ /** Tokens issued by the host after previewing destructive operations. */
60
+ confirmTokens?: string[];
61
+ }
62
+ interface DslIssue {
63
+ code: string;
64
+ path: string;
65
+ message: string;
66
+ }
67
+ interface DslValidationResult {
68
+ ok: boolean;
69
+ issues: DslIssue[];
70
+ normalized?: EditorDsl;
71
+ }
72
+ interface DslValidationOptions {
73
+ catalog: CapabilityCatalog;
74
+ snapshot: DslDocumentSnapshot;
75
+ }
76
+ /**
77
+ * Deterministic, side-effect-free validation for the versioned editor DSL.
78
+ * The host must validate before applying; the executor repeats critical checks
79
+ * against the live document.
80
+ */
81
+ declare function validateEditorDsl(input: unknown, options: DslValidationOptions): DslValidationResult;
82
+ declare function isStyleField(widget: WidgetCapability, key: string): boolean;
83
+ declare function isKnownScope(value: unknown): value is FieldScope;
84
+
85
+ export { type DslAddOperation, type DslCustomOperation, type DslDeleteOperation, type DslDocumentSnapshot, type DslIssue, type DslNodeSummary, type DslOperation, type DslPlacement, type DslScope, type DslScopeMode, type DslUpdateOperation, type DslValidationOptions, type DslValidationResult, type EditorDsl, isKnownScope, isStyleField, validateEditorDsl };
package/dist/dsl.js ADDED
@@ -0,0 +1,12 @@
1
+ import {
2
+ isKnownScope,
3
+ isStyleField,
4
+ validateEditorDsl
5
+ } from "./chunk-W7WBD3NX.js";
6
+ import "./chunk-XXR7SKZ3.js";
7
+ import "./chunk-6FNC3XMI.js";
8
+ export {
9
+ isKnownScope,
10
+ isStyleField,
11
+ validateEditorDsl
12
+ };
@@ -89,6 +89,8 @@ var schema = {
89
89
  _role: config._role,
90
90
  label: config.label,
91
91
  key: config.key,
92
+ scope: config.scope,
93
+ readOnly: config.readOnly,
92
94
  type,
93
95
  formItem: config.formItem,
94
96
  rules: normalizeRules(config),
@@ -2,6 +2,6 @@ export { EventEmitter } from './EventEmitter.cjs';
2
2
  export { schema } from './schema.cjs';
3
3
  export { widget, widgetType } from './widget.cjs';
4
4
  import 'element-plus';
5
- import '../Node-CnqlVnWy.cjs';
5
+ import '../capability-Ce3qGTm3.cjs';
6
6
  import 'vue';
7
7
  import 'async-validator';
@@ -2,6 +2,6 @@ export { EventEmitter } from './EventEmitter.js';
2
2
  export { schema } from './schema.js';
3
3
  export { widget, widgetType } from './widget.js';
4
4
  import 'element-plus';
5
- import '../Node-CnqlVnWy.js';
5
+ import '../capability-Ce3qGTm3.js';
6
6
  import 'vue';
7
7
  import 'async-validator';
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-W776G2UQ.js";
5
5
  import {
6
6
  schema
7
- } from "../chunk-PRK4NPVH.js";
7
+ } from "../chunk-62FPS6PZ.js";
8
8
  import {
9
9
  widget,
10
10
  widgetType
@@ -53,6 +53,8 @@ var schema = {
53
53
  _role: config._role,
54
54
  label: config.label,
55
55
  key: config.key,
56
+ scope: config.scope,
57
+ readOnly: config.readOnly,
56
58
  type,
57
59
  formItem: config.formItem,
58
60
  rules: normalizeRules(config),
@@ -1,5 +1,5 @@
1
1
  import { FormItemProps, InputProps, InputNumberProps, CheckboxProps, SelectProps, RadioProps, RadioButtonProps, SwitchProps, DatePickerProps, ColorPickerProps } from 'element-plus';
2
- import { b as SchemaItem, O as Option, R as RadioOption, a as RadioButtonOption } from '../Node-CnqlVnWy.cjs';
2
+ import { b as SchemaItem, F as FieldScope, O as Option, R as RadioOption, a as RadioButtonOption } from '../capability-Ce3qGTm3.cjs';
3
3
  import 'vue';
4
4
  import 'async-validator';
5
5
 
@@ -8,6 +8,8 @@ interface BaseConfig {
8
8
  _role?: string;
9
9
  label: SchemaItem['label'];
10
10
  key: SchemaItem['key'];
11
+ scope?: FieldScope;
12
+ readOnly?: boolean;
11
13
  tips?: string;
12
14
  formItem?: Partial<FormItemProps>;
13
15
  required?: boolean | string;
@@ -1,5 +1,5 @@
1
1
  import { FormItemProps, InputProps, InputNumberProps, CheckboxProps, SelectProps, RadioProps, RadioButtonProps, SwitchProps, DatePickerProps, ColorPickerProps } from 'element-plus';
2
- import { b as SchemaItem, O as Option, R as RadioOption, a as RadioButtonOption } from '../Node-CnqlVnWy.js';
2
+ import { b as SchemaItem, F as FieldScope, O as Option, R as RadioOption, a as RadioButtonOption } from '../capability-Ce3qGTm3.js';
3
3
  import 'vue';
4
4
  import 'async-validator';
5
5
 
@@ -8,6 +8,8 @@ interface BaseConfig {
8
8
  _role?: string;
9
9
  label: SchemaItem['label'];
10
10
  key: SchemaItem['key'];
11
+ scope?: FieldScope;
12
+ readOnly?: boolean;
11
13
  tips?: string;
12
14
  formItem?: Partial<FormItemProps>;
13
15
  required?: boolean | string;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  schema
3
- } from "../chunk-PRK4NPVH.js";
3
+ } from "../chunk-62FPS6PZ.js";
4
4
  import "../chunk-XJ2IJHKH.js";
5
5
  import "../chunk-6FNC3XMI.js";
6
6
  export {
@@ -1,4 +1,4 @@
1
- import { I as IWidget, b as SchemaItem, c as WidgetPos, e as WidgetAgent, B as Base } from '../Node-CnqlVnWy.cjs';
1
+ import { I as IWidget, b as SchemaItem, p as WidgetPos, t as WidgetAgent, B as Base } from '../capability-Ce3qGTm3.cjs';
2
2
  import * as vue from 'vue';
3
3
  import 'element-plus';
4
4
  import 'async-validator';
@@ -1,4 +1,4 @@
1
- import { I as IWidget, b as SchemaItem, c as WidgetPos, e as WidgetAgent, B as Base } from '../Node-CnqlVnWy.js';
1
+ import { I as IWidget, b as SchemaItem, p as WidgetPos, t as WidgetAgent, B as Base } from '../capability-Ce3qGTm3.js';
2
2
  import * as vue from 'vue';
3
3
  import 'element-plus';
4
4
  import 'async-validator';