@kurot/ui-document 0.1.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 (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +152 -0
  3. package/dist/index.d.ts +8 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +8 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/kurot/catalog/index.d.ts +2 -0
  8. package/dist/kurot/catalog/index.d.ts.map +1 -0
  9. package/dist/kurot/catalog/index.js +2 -0
  10. package/dist/kurot/catalog/index.js.map +1 -0
  11. package/dist/kurot/catalog/kurot-ui-foundation.d.ts +10 -0
  12. package/dist/kurot/catalog/kurot-ui-foundation.d.ts.map +1 -0
  13. package/dist/kurot/catalog/kurot-ui-foundation.js +91 -0
  14. package/dist/kurot/catalog/kurot-ui-foundation.js.map +1 -0
  15. package/dist/kurot/catalog/properties/basic-component-properties.d.ts +22 -0
  16. package/dist/kurot/catalog/properties/basic-component-properties.d.ts.map +1 -0
  17. package/dist/kurot/catalog/properties/basic-component-properties.js +171 -0
  18. package/dist/kurot/catalog/properties/basic-component-properties.js.map +1 -0
  19. package/dist/kurot/catalog/properties/foundation-properties.d.ts +14 -0
  20. package/dist/kurot/catalog/properties/foundation-properties.d.ts.map +1 -0
  21. package/dist/kurot/catalog/properties/foundation-properties.js +215 -0
  22. package/dist/kurot/catalog/properties/foundation-properties.js.map +1 -0
  23. package/dist/kurot/document/create.d.ts +46 -0
  24. package/dist/kurot/document/create.d.ts.map +1 -0
  25. package/dist/kurot/document/create.js +33 -0
  26. package/dist/kurot/document/create.js.map +1 -0
  27. package/dist/kurot/document/index.d.ts +4 -0
  28. package/dist/kurot/document/index.d.ts.map +1 -0
  29. package/dist/kurot/document/index.js +3 -0
  30. package/dist/kurot/document/index.js.map +1 -0
  31. package/dist/kurot/document/query.d.ts +10 -0
  32. package/dist/kurot/document/query.d.ts.map +1 -0
  33. package/dist/kurot/document/query.js +23 -0
  34. package/dist/kurot/document/query.js.map +1 -0
  35. package/dist/kurot/model/UIDocument.d.ts +27 -0
  36. package/dist/kurot/model/UIDocument.d.ts.map +1 -0
  37. package/dist/kurot/model/UIDocument.js +5 -0
  38. package/dist/kurot/model/UIDocument.js.map +1 -0
  39. package/dist/kurot/model/UINode.d.ts +23 -0
  40. package/dist/kurot/model/UINode.d.ts.map +1 -0
  41. package/dist/kurot/model/UINode.js +2 -0
  42. package/dist/kurot/model/UINode.js.map +1 -0
  43. package/dist/kurot/model/UIPropertyValue.d.ts +16 -0
  44. package/dist/kurot/model/UIPropertyValue.d.ts.map +1 -0
  45. package/dist/kurot/model/UIPropertyValue.js +2 -0
  46. package/dist/kurot/model/UIPropertyValue.js.map +1 -0
  47. package/dist/kurot/model/index.d.ts +5 -0
  48. package/dist/kurot/model/index.d.ts.map +1 -0
  49. package/dist/kurot/model/index.js +2 -0
  50. package/dist/kurot/model/index.js.map +1 -0
  51. package/dist/kurot/schema/UIComponentDefinition.d.ts +130 -0
  52. package/dist/kurot/schema/UIComponentDefinition.d.ts.map +1 -0
  53. package/dist/kurot/schema/UIComponentDefinition.js +2 -0
  54. package/dist/kurot/schema/UIComponentDefinition.js.map +1 -0
  55. package/dist/kurot/schema/UIComponentRegistry.d.ts +33 -0
  56. package/dist/kurot/schema/UIComponentRegistry.d.ts.map +1 -0
  57. package/dist/kurot/schema/UIComponentRegistry.js +127 -0
  58. package/dist/kurot/schema/UIComponentRegistry.js.map +1 -0
  59. package/dist/kurot/schema/UIComponentResolutionError.d.ts +19 -0
  60. package/dist/kurot/schema/UIComponentResolutionError.d.ts.map +1 -0
  61. package/dist/kurot/schema/UIComponentResolutionError.js +20 -0
  62. package/dist/kurot/schema/UIComponentResolutionError.js.map +1 -0
  63. package/dist/kurot/schema/index.d.ts +6 -0
  64. package/dist/kurot/schema/index.d.ts.map +1 -0
  65. package/dist/kurot/schema/index.js +4 -0
  66. package/dist/kurot/schema/index.js.map +1 -0
  67. package/dist/kurot/schema/validateComponentDefinition.d.ts +6 -0
  68. package/dist/kurot/schema/validateComponentDefinition.d.ts.map +1 -0
  69. package/dist/kurot/schema/validateComponentDefinition.js +145 -0
  70. package/dist/kurot/schema/validateComponentDefinition.js.map +1 -0
  71. package/dist/kurot/schema/validateUIDocumentComponents.d.ts +9 -0
  72. package/dist/kurot/schema/validateUIDocumentComponents.d.ts.map +1 -0
  73. package/dist/kurot/schema/validateUIDocumentComponents.js +135 -0
  74. package/dist/kurot/schema/validateUIDocumentComponents.js.map +1 -0
  75. package/dist/kurot/serialization/UIDocumentParseError.d.ts +12 -0
  76. package/dist/kurot/serialization/UIDocumentParseError.d.ts.map +1 -0
  77. package/dist/kurot/serialization/UIDocumentParseError.js +16 -0
  78. package/dist/kurot/serialization/UIDocumentParseError.js.map +1 -0
  79. package/dist/kurot/serialization/UIDocumentValidationError.d.ts +12 -0
  80. package/dist/kurot/serialization/UIDocumentValidationError.d.ts.map +1 -0
  81. package/dist/kurot/serialization/UIDocumentValidationError.js +16 -0
  82. package/dist/kurot/serialization/UIDocumentValidationError.js.map +1 -0
  83. package/dist/kurot/serialization/index.d.ts +4 -0
  84. package/dist/kurot/serialization/index.d.ts.map +1 -0
  85. package/dist/kurot/serialization/index.js +4 -0
  86. package/dist/kurot/serialization/index.js.map +1 -0
  87. package/dist/kurot/serialization/json.d.ts +10 -0
  88. package/dist/kurot/serialization/json.d.ts.map +1 -0
  89. package/dist/kurot/serialization/json.js +78 -0
  90. package/dist/kurot/serialization/json.js.map +1 -0
  91. package/dist/kurot/validation/UIDiagnostic.d.ts +30 -0
  92. package/dist/kurot/validation/UIDiagnostic.d.ts.map +1 -0
  93. package/dist/kurot/validation/UIDiagnostic.js +2 -0
  94. package/dist/kurot/validation/UIDiagnostic.js.map +1 -0
  95. package/dist/kurot/validation/index.d.ts +3 -0
  96. package/dist/kurot/validation/index.d.ts.map +1 -0
  97. package/dist/kurot/validation/index.js +2 -0
  98. package/dist/kurot/validation/index.js.map +1 -0
  99. package/dist/kurot/validation/validateUIDocument.d.ts +11 -0
  100. package/dist/kurot/validation/validateUIDocument.d.ts.map +1 -0
  101. package/dist/kurot/validation/validateUIDocument.js +143 -0
  102. package/dist/kurot/validation/validateUIDocument.js.map +1 -0
  103. package/dist/kurot/version.d.ts +5 -0
  104. package/dist/kurot/version.d.ts.map +1 -0
  105. package/dist/kurot/version.js +5 -0
  106. package/dist/kurot/version.js.map +1 -0
  107. package/package.json +50 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kelvin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,152 @@
1
+ # @kurot/ui-document
2
+
3
+ Headless semantic document foundation for Kurot UI tooling. It is intended to
4
+ provide one format and one mutation model shared by the future visual UI
5
+ builder, `@kurot/cli`, and Agent-driven UI generation.
6
+
7
+ > **Early development (0.1.0).** The first document model, validation, query,
8
+ > and deterministic JSON APIs are implemented. The schema is not stable yet.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ pnpm add @kurot/ui-document
14
+ ```
15
+
16
+ The package has no runtime dependency on `@kurot/core` or `@kurot/ui`. It
17
+ models UI documents but does not instantiate or render runtime components.
18
+
19
+ ## Quick Start
20
+
21
+ ```ts
22
+ import {
23
+ createUIDocument,
24
+ createUINode,
25
+ serializeUIDocument,
26
+ validateUIDocument,
27
+ } from '@kurot/ui-document';
28
+
29
+ const document = createUIDocument({
30
+ id: 'main-screen',
31
+ root: createUINode({
32
+ id: 'root',
33
+ type: 'kui.Group',
34
+ properties: { width: 1280, height: 720 },
35
+ children: [
36
+ createUINode({
37
+ id: 'title',
38
+ type: 'kui.Label',
39
+ properties: { text: 'Kurot' },
40
+ }),
41
+ ],
42
+ }),
43
+ });
44
+
45
+ const diagnostics = validateUIDocument(document);
46
+ const source = serializeUIDocument(document);
47
+ ```
48
+
49
+ `UIDocument` and `UINode` are runtime-independent semantic data. A component
50
+ `type` is an external registry key; this package does not import or instantiate
51
+ the corresponding `@kurot/ui` class.
52
+
53
+ ## Current capabilities
54
+
55
+ - explicit `UIDocument`, `UINode`, and recursive `UIPropertyValue` types;
56
+ - constructors that assign the current format discriminator and version;
57
+ - deterministic pre-order traversal and node lookup;
58
+ - strict validation of schema keys, versions, identifiers, unique node IDs,
59
+ plain property values, finite numbers, and acyclic trees;
60
+ - structured diagnostics with stable codes and JSON-style paths;
61
+ - validated JSON parsing and deterministic serialization with sorted property
62
+ keys;
63
+ - runtime-independent component definitions and an isolated component registry;
64
+ - abstract base definitions, single-parent inheritance, deterministic schema
65
+ resolution, and derived property overrides;
66
+ - optional validation of registered component types, known property categories,
67
+ required properties, child policies, and abstract types.
68
+ - union-valued properties, enum values, numeric ranges, integer constraints,
69
+ serializable defaults, and editor-facing semantic formats.
70
+
71
+ Component definitions can remain intentionally incomplete while their runtime
72
+ properties are reviewed:
73
+
74
+ ```ts
75
+ import { UIComponentRegistry } from '@kurot/ui-document';
76
+
77
+ const registry = new UIComponentRegistry();
78
+ registry.register({
79
+ type: 'schema.UIComponent',
80
+ abstract: true,
81
+ allowUnknownProperties: true,
82
+ });
83
+
84
+ registry.register({
85
+ type: 'game.ProfileCard',
86
+ extends: 'schema.UIComponent',
87
+ });
88
+
89
+ const resolved = registry.resolve('game.ProfileCard');
90
+ ```
91
+
92
+ Base definitions can be registered after their derived definitions. Resolution
93
+ does not depend on registration order and reports missing bases or inheritance
94
+ cycles explicitly. A complete `@kurot/ui` component catalog is not included yet.
95
+
96
+ ## Kurot UI foundation catalog
97
+
98
+ The first audited catalog subset is available through an explicit registry
99
+ factory:
100
+
101
+ ```ts
102
+ import { createKurotUIFoundationRegistry } from '@kurot/ui-document';
103
+
104
+ const registry = createKurotUIFoundationRegistry();
105
+ ```
106
+
107
+ It defines the abstract semantic bases `kurot.DisplayObject`,
108
+ `kui.UIComponent`, and `kui.Component`, plus the concrete `kui.Group`,
109
+ `kui.Label`, `kui.Image`, `kui.Rect`, and `kui.Button` nodes. `Group` accepts
110
+ ordered children; the other four concrete nodes are leaves.
111
+
112
+ `kui.*` is the canonical Kurot UI namespace. EUI names belong only to legacy
113
+ EXML adapters and are not stored in the semantic document.
114
+
115
+ The foundation catalog declares the serializable authoring properties inherited
116
+ from Kurot display objects and UI layout elements, then adds the audited direct
117
+ properties of all five concrete components. Unknown properties are rejected.
118
+
119
+ Runtime-owned values are deliberately excluded. For example, `Image.source`
120
+ stores an asset key or URL rather than a `Texture`, and readonly objects such as
121
+ `Image.bitmap` are not document properties. `Group.layout` and
122
+ `Image.scale9Grid` currently accept semantic objects; their nested shapes will
123
+ be tightened when the layout and structured-value catalogs are introduced.
124
+ State declarations and bindings are also reserved for their own semantic
125
+ layers rather than being accepted as untyped component properties.
126
+
127
+ See [Architecture](./docs/architecture.md) for the current contracts and
128
+ package boundaries.
129
+
130
+ ## Intended boundary
131
+
132
+ The package owns the serializable UI document model and its deterministic
133
+ operations. Planned layers include:
134
+
135
+ - the remaining component catalog, nested structured-value constraints, states,
136
+ bindings, and resource-reference schemas;
137
+ - commands, transactions, undo, and redo;
138
+ - document migrations;
139
+ - adapters for formats such as EXML.
140
+
141
+ It will not own rendering, runtime UI components, editor panels, filesystem
142
+ or network I/O, or model-provider integration. Those concerns belong to
143
+ `@kurot/ui`, the visual builder, CLI orchestration, and Agent adapters
144
+ respectively.
145
+
146
+ ## Development
147
+
148
+ ```bash
149
+ pnpm install
150
+ pnpm build
151
+ pnpm test
152
+ ```
@@ -0,0 +1,8 @@
1
+ export * from './kurot/model/index.js';
2
+ export * from './kurot/document/index.js';
3
+ export * from './kurot/validation/index.js';
4
+ export * from './kurot/serialization/index.js';
5
+ export * from './kurot/schema/index.js';
6
+ export * from './kurot/catalog/index.js';
7
+ export { UI_DOCUMENT_FORMAT_VERSION } from './kurot/version.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ export * from './kurot/model/index.js';
2
+ export * from './kurot/document/index.js';
3
+ export * from './kurot/validation/index.js';
4
+ export * from './kurot/serialization/index.js';
5
+ export * from './kurot/schema/index.js';
6
+ export * from './kurot/catalog/index.js';
7
+ export { UI_DOCUMENT_FORMAT_VERSION } from './kurot/version.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { createKurotUIFoundationRegistry, registerKurotUIFoundation, } from './kurot-ui-foundation.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/kurot/catalog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,+BAA+B,EAC/B,yBAAyB,GACzB,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { createKurotUIFoundationRegistry, registerKurotUIFoundation, } from './kurot-ui-foundation.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/kurot/catalog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,+BAA+B,EAC/B,yBAAyB,GACzB,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { UIComponentRegistry } from '../schema/UIComponentRegistry.js';
2
+ /**
3
+ * Registers the audited foundation subset of the Kurot UI component catalog.
4
+ */
5
+ export declare function registerKurotUIFoundation(registry: UIComponentRegistry): void;
6
+ /**
7
+ * Creates an isolated registry containing the audited Kurot UI foundation subset.
8
+ */
9
+ export declare function createKurotUIFoundationRegistry(): UIComponentRegistry;
10
+ //# sourceMappingURL=kurot-ui-foundation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kurot-ui-foundation.d.ts","sourceRoot":"","sources":["../../../src/kurot/catalog/kurot-ui-foundation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAiFvE;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAS7E;AAED;;GAEG;AACH,wBAAgB,+BAA+B,IAAI,mBAAmB,CAIrE"}
@@ -0,0 +1,91 @@
1
+ import { UIComponentRegistry } from '../schema/UIComponentRegistry.js';
2
+ import { COMPONENT_PROPERTIES, DISPLAY_OBJECT_PROPERTIES, UI_COMPONENT_PROPERTIES, } from './properties/foundation-properties.js';
3
+ import { BUTTON_PROPERTIES, GROUP_PROPERTIES, IMAGE_PROPERTIES, LABEL_PROPERTIES, RECT_PROPERTIES, } from './properties/basic-component-properties.js';
4
+ const DEFINITIONS = [
5
+ {
6
+ type: 'kurot.DisplayObject',
7
+ abstract: true,
8
+ displayName: 'Display Object',
9
+ description: 'Shared semantic base for visual objects in Kurot UI documents.',
10
+ properties: DISPLAY_OBJECT_PROPERTIES,
11
+ allowUnknownProperties: false,
12
+ },
13
+ {
14
+ type: 'kui.UIComponent',
15
+ extends: 'kurot.DisplayObject',
16
+ abstract: true,
17
+ displayName: 'UI Component',
18
+ description: 'Shared semantic base for objects participating in Kurot UI layout.',
19
+ properties: UI_COMPONENT_PROPERTIES,
20
+ },
21
+ {
22
+ type: 'kui.Component',
23
+ extends: 'kui.UIComponent',
24
+ abstract: true,
25
+ displayName: 'Component',
26
+ description: 'Semantic base for skinnable Kurot UI controls.',
27
+ properties: COMPONENT_PROPERTIES,
28
+ },
29
+ {
30
+ type: 'kui.Group',
31
+ extends: 'kui.UIComponent',
32
+ displayName: 'Group',
33
+ description: 'Layout-aware container for ordered visual children.',
34
+ children: 'multiple',
35
+ properties: GROUP_PROPERTIES,
36
+ },
37
+ {
38
+ type: 'kui.Label',
39
+ extends: 'kui.Component',
40
+ displayName: 'Label',
41
+ description: 'Non-interactive text display component.',
42
+ children: 'none',
43
+ properties: LABEL_PROPERTIES,
44
+ },
45
+ {
46
+ type: 'kui.Image',
47
+ extends: 'kui.Component',
48
+ displayName: 'Image',
49
+ description: 'Bitmap display component backed by a texture or asset source.',
50
+ children: 'none',
51
+ properties: IMAGE_PROPERTIES,
52
+ },
53
+ {
54
+ type: 'kui.Rect',
55
+ extends: 'kui.Component',
56
+ displayName: 'Rect',
57
+ description: 'Rectangular vector shape with fill and stroke support.',
58
+ children: 'none',
59
+ properties: RECT_PROPERTIES,
60
+ },
61
+ {
62
+ type: 'kui.Button',
63
+ extends: 'kui.Component',
64
+ displayName: 'Button',
65
+ description: 'Interactive skinnable button with label, icon, and view states.',
66
+ children: 'none',
67
+ properties: BUTTON_PROPERTIES,
68
+ },
69
+ ];
70
+ /**
71
+ * Registers the audited foundation subset of the Kurot UI component catalog.
72
+ */
73
+ export function registerKurotUIFoundation(registry) {
74
+ for (const definition of DEFINITIONS) {
75
+ if (registry.has(definition.type)) {
76
+ throw new Error(`Component type "${definition.type}" is already registered.`);
77
+ }
78
+ }
79
+ for (const definition of DEFINITIONS) {
80
+ registry.register(definition);
81
+ }
82
+ }
83
+ /**
84
+ * Creates an isolated registry containing the audited Kurot UI foundation subset.
85
+ */
86
+ export function createKurotUIFoundationRegistry() {
87
+ const registry = new UIComponentRegistry();
88
+ registerKurotUIFoundation(registry);
89
+ return registry;
90
+ }
91
+ //# sourceMappingURL=kurot-ui-foundation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kurot-ui-foundation.js","sourceRoot":"","sources":["../../../src/kurot/catalog/kurot-ui-foundation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EACN,oBAAoB,EACpB,yBAAyB,EACzB,uBAAuB,GACvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACN,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GACf,MAAM,4CAA4C,CAAC;AAEpD,MAAM,WAAW,GAAqC;IACrD;QACC,IAAI,EAAE,qBAAqB;QAC3B,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,gBAAgB;QAC7B,WAAW,EAAE,gEAAgE;QAC7E,UAAU,EAAE,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CAAC,QAA6B;IACtE,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACtC,IAAI,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACnC,MAAM,IAAI,KAAK,CAAC,mBAAmB,UAAU,CAAC,IAAI,0BAA0B,CAAC,CAAC;QAC/E,CAAC;IACF,CAAC;IACD,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACtC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,+BAA+B;IAC9C,MAAM,QAAQ,GAAG,IAAI,mBAAmB,EAAE,CAAC;IAC3C,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IACpC,OAAO,QAAQ,CAAC;AACjB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { UIPropertyDefinition } from '../../schema/UIComponentDefinition.js';
2
+ /**
3
+ * Authoring properties declared directly by Group.
4
+ */
5
+ export declare const GROUP_PROPERTIES: Readonly<Record<string, UIPropertyDefinition>>;
6
+ /**
7
+ * Authoring properties declared directly by Label.
8
+ */
9
+ export declare const LABEL_PROPERTIES: Readonly<Record<string, UIPropertyDefinition>>;
10
+ /**
11
+ * Authoring properties declared directly by Image.
12
+ */
13
+ export declare const IMAGE_PROPERTIES: Readonly<Record<string, UIPropertyDefinition>>;
14
+ /**
15
+ * Authoring properties declared directly by Rect.
16
+ */
17
+ export declare const RECT_PROPERTIES: Readonly<Record<string, UIPropertyDefinition>>;
18
+ /**
19
+ * Authoring properties declared directly by Button.
20
+ */
21
+ export declare const BUTTON_PROPERTIES: Readonly<Record<string, UIPropertyDefinition>>;
22
+ //# sourceMappingURL=basic-component-properties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic-component-properties.d.ts","sourceRoot":"","sources":["../../../../src/kurot/catalog/properties/basic-component-properties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CA+B3E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAsD3E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAkB3E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAQ1E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAa5E,CAAC"}
@@ -0,0 +1,171 @@
1
+ /**
2
+ * Authoring properties declared directly by Group.
3
+ */
4
+ export const GROUP_PROPERTIES = {
5
+ currentState: {
6
+ valueType: 'string',
7
+ defaultValue: '',
8
+ description: 'Explicit group state used when applying state overrides.',
9
+ },
10
+ layout: {
11
+ valueType: 'object',
12
+ format: 'layout',
13
+ description: 'Serializable layout descriptor; omission uses BasicLayout at runtime.',
14
+ },
15
+ scrollEnabled: {
16
+ valueType: 'boolean',
17
+ defaultValue: false,
18
+ description: 'Whether the group clips and offsets content using its scroll position.',
19
+ },
20
+ scrollH: {
21
+ valueType: 'number',
22
+ defaultValue: 0,
23
+ description: 'Horizontal content scroll offset in pixels.',
24
+ },
25
+ scrollV: {
26
+ valueType: 'number',
27
+ defaultValue: 0,
28
+ description: 'Vertical content scroll offset in pixels.',
29
+ },
30
+ touchThrough: {
31
+ valueType: 'boolean',
32
+ defaultValue: false,
33
+ description: 'Whether empty group regions allow hit testing to continue behind the group.',
34
+ },
35
+ };
36
+ /**
37
+ * Authoring properties declared directly by Label.
38
+ */
39
+ export const LABEL_PROPERTIES = {
40
+ bold: booleanProperty(false, 'Whether the text uses a bold font weight.'),
41
+ displayAsPassword: booleanProperty(false, 'Whether text is rendered as password glyphs.'),
42
+ fontFamily: {
43
+ valueType: 'string',
44
+ defaultValue: 'Arial',
45
+ description: 'CSS font-family name used to render the label.',
46
+ },
47
+ italic: booleanProperty(false, 'Whether the text uses an italic font style.'),
48
+ lineSpacing: {
49
+ valueType: 'number',
50
+ defaultValue: 0,
51
+ description: 'Additional spacing in pixels between text lines.',
52
+ },
53
+ maxChars: {
54
+ valueType: 'number',
55
+ minimum: 0,
56
+ integer: true,
57
+ defaultValue: 0,
58
+ description: 'Maximum character count; zero means no limit.',
59
+ },
60
+ multiline: booleanProperty(false, 'Whether the label permits multiple rendered lines.'),
61
+ size: {
62
+ valueType: 'number',
63
+ minimum: 0,
64
+ defaultValue: 30,
65
+ description: 'Font size in pixels.',
66
+ },
67
+ stroke: {
68
+ valueType: 'number',
69
+ minimum: 0,
70
+ defaultValue: 0,
71
+ description: 'Text outline thickness in pixels.',
72
+ },
73
+ strokeColor: colorProperty(0x000000, 'Text outline RGB color.'),
74
+ text: {
75
+ valueType: 'string',
76
+ defaultValue: '',
77
+ description: 'Plain text displayed by the label; newline characters create hard line breaks.',
78
+ },
79
+ textAlign: {
80
+ valueType: 'string',
81
+ enumValues: ['left', 'right', 'center', 'justify', 'contentJustify'],
82
+ defaultValue: 'left',
83
+ description: 'Horizontal alignment within the label bounds.',
84
+ },
85
+ textColor: colorProperty(0xffffff, 'Text fill RGB color.'),
86
+ verticalAlign: {
87
+ valueType: 'string',
88
+ enumValues: ['top', 'bottom', 'middle', 'justify', 'contentJustify'],
89
+ defaultValue: 'top',
90
+ description: 'Vertical alignment within the label bounds.',
91
+ },
92
+ wordWrap: booleanProperty(false, 'Whether text wraps at the available width.'),
93
+ };
94
+ /**
95
+ * Authoring properties declared directly by Image.
96
+ */
97
+ export const IMAGE_PROPERTIES = {
98
+ fillMode: {
99
+ valueType: 'string',
100
+ enumValues: ['scale', 'repeat', 'clip'],
101
+ defaultValue: 'scale',
102
+ description: 'How the source bitmap fills the assigned image bounds.',
103
+ },
104
+ scale9Grid: {
105
+ valueType: 'object',
106
+ format: 'rectangle',
107
+ description: 'Nine-slice center rectangle with x, y, width, and height numbers.',
108
+ },
109
+ smoothing: booleanProperty(true, 'Whether scaled bitmap sampling uses interpolation.'),
110
+ source: {
111
+ valueType: 'string',
112
+ format: 'resource',
113
+ description: 'Serializable asset key or URL resolved by the UI asset adapter.',
114
+ },
115
+ };
116
+ /**
117
+ * Authoring properties declared directly by Rect.
118
+ */
119
+ export const RECT_PROPERTIES = {
120
+ ellipseHeight: numberProperty(0, 0, 'Vertical corner ellipse diameter.'),
121
+ ellipseWidth: numberProperty(0, 0, 'Horizontal corner ellipse diameter.'),
122
+ fillAlpha: alphaProperty(1, 'Fill opacity.'),
123
+ fillColor: colorProperty(0x000000, 'Fill RGB color.'),
124
+ strokeAlpha: alphaProperty(1, 'Stroke opacity.'),
125
+ strokeColor: colorProperty(0x444444, 'Stroke RGB color.'),
126
+ strokeWeight: numberProperty(0, 0, 'Stroke thickness in pixels.'),
127
+ };
128
+ /**
129
+ * Authoring properties declared directly by Button.
130
+ */
131
+ export const BUTTON_PROPERTIES = {
132
+ icon: {
133
+ valueType: 'string',
134
+ format: 'resource',
135
+ description: 'Serializable icon asset key or URL passed to the skin icon part.',
136
+ },
137
+ label: {
138
+ valueType: 'string',
139
+ defaultValue: '',
140
+ description: 'Text passed to the skin label part.',
141
+ },
142
+ selected: booleanProperty(false, 'Whether the button uses its selected view state.'),
143
+ toggle: booleanProperty(false, 'Whether activation automatically toggles selected.'),
144
+ };
145
+ function alphaProperty(defaultValue, description) {
146
+ return {
147
+ valueType: 'number',
148
+ minimum: 0,
149
+ maximum: 1,
150
+ defaultValue,
151
+ description,
152
+ };
153
+ }
154
+ function booleanProperty(defaultValue, description) {
155
+ return { valueType: 'boolean', defaultValue, description };
156
+ }
157
+ function colorProperty(defaultValue, description) {
158
+ return {
159
+ valueType: 'number',
160
+ format: 'color',
161
+ minimum: 0,
162
+ maximum: 0xffffff,
163
+ integer: true,
164
+ defaultValue,
165
+ description,
166
+ };
167
+ }
168
+ function numberProperty(defaultValue, minimum, description) {
169
+ return { valueType: 'number', minimum, defaultValue, description };
170
+ }
171
+ //# sourceMappingURL=basic-component-properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic-component-properties.js","sourceRoot":"","sources":["../../../../src/kurot/catalog/properties/basic-component-properties.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAmD;IAC/E,YAAY,EAAE;QACb,SAAS,EAAE,QAAQ;QACnB,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,0DAA0D;KACvE;IACD,MAAM,EAAE;QACP,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,QAAQ;QAChB,WAAW,EAAE,uEAAuE;KACpF;IACD,aAAa,EAAE;QACd,SAAS,EAAE,SAAS;QACpB,YAAY,EAAE,KAAK;QACnB,WAAW,EAAE,wEAAwE;KACrF;IACD,OAAO,EAAE;QACR,SAAS,EAAE,QAAQ;QACnB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,6CAA6C;KAC1D;IACD,OAAO,EAAE;QACR,SAAS,EAAE,QAAQ;QACnB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,2CAA2C;KACxD;IACD,YAAY,EAAE;QACb,SAAS,EAAE,SAAS;QACpB,YAAY,EAAE,KAAK;QACnB,WAAW,EAAE,6EAA6E;KAC1F;CACD,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAmD;IAC/E,IAAI,EAAE,eAAe,CAAC,KAAK,EAAE,2CAA2C,CAAC;IACzE,iBAAiB,EAAE,eAAe,CAAC,KAAK,EAAE,8CAA8C,CAAC;IACzF,UAAU,EAAE;QACX,SAAS,EAAE,QAAQ;QACnB,YAAY,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AQ;QACnB,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,qCAAqC;KAClD;IACD,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,kDAAkD,CAAC;IACpF,MAAM,EAAE,eAAe,CAAC,KAAK,EAAE,oDAAoD,CAAC;CACpF,CAAC;AAEF,SAAS,aAAa,CAAC,YAAoB,EAAE,WAAmB;IAC/D,OAAO;QACN,SAAS,EAAE,QAAQ;QACnB,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;QACV,YAAY;QACZ,WAAW;KACX,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,YAAqB,EAAE,WAAmB;IAClE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AAC5D,CAAC;AAED,SAAS,aAAa,CAAC,YAAoB,EAAE,WAAmB;IAC/D,OAAO;QACN,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE,IAAI;QACb,YAAY;QACZ,WAAW;KACX,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CACtB,YAAoB,EACpB,OAAe,EACf,WAAmB;IAEnB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AACpE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { UIPropertyDefinition } from '../../schema/UIComponentDefinition.js';
2
+ /**
3
+ * Serializable authoring properties inherited by every Kurot display node.
4
+ */
5
+ export declare const DISPLAY_OBJECT_PROPERTIES: Readonly<Record<string, UIPropertyDefinition>>;
6
+ /**
7
+ * Layout and container properties inherited by every Kurot UI component.
8
+ */
9
+ export declare const UI_COMPONENT_PROPERTIES: Readonly<Record<string, UIPropertyDefinition>>;
10
+ /**
11
+ * Authoring properties inherited by skinnable Kurot controls.
12
+ */
13
+ export declare const COMPONENT_PROPERTIES: Readonly<Record<string, UIPropertyDefinition>>;
14
+ //# sourceMappingURL=foundation-properties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foundation-properties.d.ts","sourceRoot":"","sources":["../../../../src/kurot/catalog/properties/foundation-properties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CA+HpF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAiClF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAoB/E,CAAC"}