@arkcit/engine-schema 0.3.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/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # @arkcit/engine-schema
2
+
3
+ Canonical schema contract for the Arkcit platform.
4
+
5
+ ## Position In The Flow
6
+
7
+ ```text
8
+ @arkcit/studio
9
+ ↓ authors schema JSON
10
+ @arkcit/engine-schema
11
+ ↓ defines the canonical document shape
12
+ @arkcit/engine-runtime
13
+ @arkcit/engine-core
14
+ @arkcit/engine-render-layer
15
+ ↓ consume the same contract
16
+ @arkcit/engine*
17
+ ↓ adapt it to concrete targets
18
+ @arkcit/*-ui
19
+ ```
20
+
21
+ ## What Goes In
22
+
23
+ - node definitions
24
+ - layout definitions
25
+ - schema metadata
26
+ - long-lived persisted document concerns
27
+
28
+ ## What Comes Out
29
+
30
+ - portable schema types
31
+ - shared node and layout contracts
32
+ - the stable shape consumed by studio, engine layers, and adapters
33
+
34
+ ## Responsibilities
35
+
36
+ - own the canonical schema contract
37
+ - stay framework-neutral
38
+ - protect persistence from target-specific forks
39
+
40
+ ## Do Not Put Here
41
+
42
+ - JSX
43
+ - DOM concepts
44
+ - React Native widget semantics
45
+ - Angular component details
46
+ - authoring-only overlay state
47
+
48
+ ## Used By
49
+
50
+ - `@arkcit/studio`
51
+ - `@arkcit/engine-runtime`
52
+ - `@arkcit/engine-core`
53
+ - `@arkcit/engine-render-layer`
54
+ - `@arkcit/engine`
55
+ - all target adapters
@@ -0,0 +1,2 @@
1
+ export { UIExprValue, UII18nValue, UINode, UINodeActionRef, UINodeEventName, UINodeLayout, UINodeProps, UIRefValue, UIRenderBindingMeta, UISchema, UISchemaNodeMeta, UIValue } from './index.js';
2
+ import '@arkcit/engine-runtime';
File without changes
@@ -0,0 +1,70 @@
1
+ import { UIActionRef } from '@arkcit/engine-runtime';
2
+
3
+ type UII18nValue = {
4
+ $t: string;
5
+ values?: Record<string, string | number>;
6
+ defaultValue?: string;
7
+ };
8
+ type UIRefValue = {
9
+ $ref: string;
10
+ };
11
+ type UIExprValue = {
12
+ $expr: string;
13
+ };
14
+ type UIValue = string | number | boolean | null | UII18nValue | UIRefValue | UIExprValue;
15
+ type UINodeLayout = {
16
+ widthPct?: number;
17
+ heightPct?: number;
18
+ heightPx?: number;
19
+ colSpan?: number;
20
+ wrapperClassName?: string;
21
+ cardSection?: "header" | "body" | "footer";
22
+ wizardStep?: boolean;
23
+ wizardStepRole?: "title" | "description";
24
+ wizardContent?: boolean;
25
+ accordionItem?: boolean;
26
+ formRole?: "field" | "title" | "submit" | "reset" | "step" | "step-content" | "trigger" | "content";
27
+ tabId?: string;
28
+ };
29
+ type UIRenderBindingMeta = {
30
+ bindingEnabled?: boolean;
31
+ valueBindingKey?: string;
32
+ optionsBindingKey?: string;
33
+ useBindingData?: boolean;
34
+ entitiesBindingKey?: string;
35
+ videoBindingKey?: string;
36
+ mapBindingKey?: string;
37
+ productBindingKey?: string;
38
+ useTranslationKeys?: boolean;
39
+ tagContentTranslationKey?: string;
40
+ tagContentTranslationValue?: string;
41
+ hrefTranslationKey?: string;
42
+ hrefTranslationValue?: string;
43
+ mediaSource?: string;
44
+ mediaSrc?: string;
45
+ mediaAlt?: string;
46
+ rowsBindingKey?: string;
47
+ columnsBindingKey?: string;
48
+ };
49
+ type UISchemaNodeMeta = UIRenderBindingMeta;
50
+ type UINodeActionRef = UIActionRef;
51
+ type UINodeProps = Record<string, unknown> & {
52
+ layout?: UINodeLayout;
53
+ __studio?: UISchemaNodeMeta & Record<string, unknown>;
54
+ };
55
+ type UINodeEventName = "onClick" | "onChange" | "onSubmit" | "onOpenChange";
56
+ type UINode = {
57
+ id: string;
58
+ type: string;
59
+ props?: UINodeProps;
60
+ children?: UINode[];
61
+ visibleIf?: unknown;
62
+ events?: Partial<Record<UINodeEventName, UINodeActionRef>>;
63
+ };
64
+ type UISchema = {
65
+ version: 1;
66
+ title?: string;
67
+ nodes: UINode[];
68
+ };
69
+
70
+ export type { UIExprValue, UII18nValue, UINode, UINodeActionRef, UINodeEventName, UINodeLayout, UINodeProps, UIRefValue, UIRenderBindingMeta, UISchema, UISchemaNodeMeta, UIValue };
package/dist/index.js ADDED
File without changes
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@arkcit/engine-schema",
3
+ "private": false,
4
+ "version": "0.3.0",
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "description": "Staging extraction package for Arkcit schema contracts.",
8
+ "license": "UNLICENSED",
9
+ "keywords": [
10
+ "arkcit",
11
+ "engine",
12
+ "schema",
13
+ "contracts"
14
+ ],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/Arkcit/ui-orchestrator.git"
18
+ },
19
+ "homepage": "https://github.com/Arkcit/ui-orchestrator",
20
+ "bugs": {
21
+ "url": "https://github.com/Arkcit/ui-orchestrator/issues"
22
+ },
23
+ "main": "./dist/index.js",
24
+ "module": "./dist/index.js",
25
+ "types": "./dist/index.d.ts",
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/index.js",
36
+ "default": "./dist/index.js"
37
+ },
38
+ "./contracts": {
39
+ "types": "./dist/contracts.d.ts",
40
+ "import": "./dist/contracts.js",
41
+ "default": "./dist/contracts.js"
42
+ }
43
+ },
44
+ "engines": {
45
+ "node": ">=20.0.0"
46
+ },
47
+ "scripts": {
48
+ "build": "tsup --config tsup.config.ts",
49
+ "typecheck": "tsc --noEmit -p tsconfig.json",
50
+ "test:smoke": "node tests/run-all.mjs",
51
+ "test": "npm run test:smoke"
52
+ },
53
+ "dependencies": {
54
+ "@arkcit/engine-runtime": "^0.3.0"
55
+ },
56
+ "devDependencies": {
57
+ "tsup": "^8.5.1",
58
+ "typescript": "~5.9.3"
59
+ }
60
+ }