@yahoo/uds-create-config 4.10.5 → 4.12.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/dist/capture/capture-to-spec.d.ts +69 -0
- package/dist/capture/capture-to-spec.js +433 -0
- package/dist/capture/captured-tree.d.ts +65 -0
- package/dist/capture/captured-tree.js +201 -0
- package/dist/capture/class-grammar.d.ts +64 -0
- package/dist/capture/class-grammar.js +131 -0
- package/dist/capture/fixtures/tree-from-html.d.ts +3 -0
- package/dist/capture/icon-resolver.d.ts +59 -0
- package/dist/capture/icon-resolver.js +205 -0
- package/dist/capture/node-ops.d.ts +2 -0
- package/dist/capture/node-ops.js +146 -0
- package/dist/capture/node-patches.d.ts +32 -0
- package/dist/capture/node-patches.js +99 -0
- package/dist/configs/CanvasConfig.d.ts +1 -1
- package/dist/configs/CanvasConfig.js +3 -1
- package/dist/configs/react-native-system.d.ts +20 -20
- package/dist/configs/react-native-system.js +1 -1
- package/dist/configs/system.d.ts +4 -4
- package/dist/configs/system.js +2 -2
- package/dist/entities/native/NativeModifier.d.ts +1 -1
- package/dist/entities/native/NativeStyleProperty.d.ts +15 -15
- package/dist/entities/system/Component.js +3 -3
- package/dist/entities/system/Modifier.d.ts +2 -2
- package/dist/entities/system/copy-plan.js +1 -1
- package/dist/entities/system/element.d.ts +2 -1
- package/dist/entities/system/element.js +3 -1
- package/dist/entities/system/icon-library.js +1 -1
- package/dist/entities/system/link-plan.js +1 -1
- package/dist/framework/Config.js +1 -1
- package/dist/framework/defineEntity.js +1 -1
- package/dist/framework/inline-sources.js +1 -1
- package/dist/framework/plan.js +1 -1
- package/dist/framework/projections.js +2 -2
- package/dist/framework/render-spec.js +2 -2
- package/dist/index.d.ts +9 -4
- package/dist/index.js +13 -8
- package/dist/migrations/2.0.0/v1-artifact.d.ts +3 -3
- package/dist/spec/cell.js +1 -1
- package/dist/spec/prop-conditions.js +1 -1
- package/dist/spec/slot.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { CapturedNode } from "./captured-tree.js";
|
|
2
|
+
import { pathOf } from "../framework/utils/refs.js";
|
|
3
|
+
import { rejectData } from "../framework/rejection.js";
|
|
4
|
+
import { pathInput } from "../framework/schemas.js";
|
|
5
|
+
import { specFromCapture } from "./capture-to-spec.js";
|
|
6
|
+
import { specToNodePatches } from "./node-patches.js";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
//#region src/capture/node-ops.ts
|
|
9
|
+
/**
|
|
10
|
+
* The capture op on a canvas node: a captured page becomes an artboard's rows. It reads the system
|
|
11
|
+
* the canvas draws on, so a component's classes, layers and slots map back through the same config
|
|
12
|
+
* that emitted them.
|
|
13
|
+
*/
|
|
14
|
+
const DEFAULT_WIDTH = 1600;
|
|
15
|
+
const frameSchema = z.object({
|
|
16
|
+
type: z.string().min(1),
|
|
17
|
+
props: z.record(z.string(), z.unknown()).optional()
|
|
18
|
+
});
|
|
19
|
+
const fromHtmlData = z.object({
|
|
20
|
+
/** The captured page, parsed by the host into the captured-tree shape. */
|
|
21
|
+
tree: CapturedNode,
|
|
22
|
+
/** The artboard's name. */
|
|
23
|
+
label: z.string().min(1).max(200).optional(),
|
|
24
|
+
/** The page to place the artboard on. */
|
|
25
|
+
page: z.string().min(1).optional(),
|
|
26
|
+
x: z.number().optional(),
|
|
27
|
+
y: z.number().optional(),
|
|
28
|
+
/** The frame width; also recorded on the spec, and what `100vw` measures inside it. */
|
|
29
|
+
width: z.number().min(100).max(4e3).optional(),
|
|
30
|
+
/** The captured viewport's height, what `100vh` measures inside the frame. */
|
|
31
|
+
height: z.number().min(100).max(8e3).optional(),
|
|
32
|
+
/** Wraps the capture's top-level components; required when there are several. */
|
|
33
|
+
frame: frameSchema.optional(),
|
|
34
|
+
/** Convert only the subtree this selector finds. */
|
|
35
|
+
selector: z.string().optional(),
|
|
36
|
+
/** Children kept per element; `0` keeps every child. */
|
|
37
|
+
childCap: z.number().int().nonnegative().optional()
|
|
38
|
+
});
|
|
39
|
+
const fromHtmlInput = z.object({
|
|
40
|
+
path: pathInput("node"),
|
|
41
|
+
data: fromHtmlData
|
|
42
|
+
});
|
|
43
|
+
/** The system this canvas draws on, with the slug node types are qualified by. */
|
|
44
|
+
function attachedSystem(config) {
|
|
45
|
+
const [source] = config.list("system-source");
|
|
46
|
+
const system = source ? config.sourceFor(source.path) : void 0;
|
|
47
|
+
if (!source || !system) return rejectData("This canvas has no system attached, so there is no component grammar to read a capture with.");
|
|
48
|
+
return {
|
|
49
|
+
slug: source.path,
|
|
50
|
+
system
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function pageOf(body) {
|
|
54
|
+
return body.page ? pathOf(body.page) : void 0;
|
|
55
|
+
}
|
|
56
|
+
/** The placed nodes holding content on `page`, earliest first by stacking order. */
|
|
57
|
+
function artboardsOn(config, page) {
|
|
58
|
+
const out = [];
|
|
59
|
+
for (const node of config.list("node")) {
|
|
60
|
+
const body = node.body;
|
|
61
|
+
if (pageOf(body) !== page) continue;
|
|
62
|
+
if (!body.type && body.linkedSource == null) continue;
|
|
63
|
+
out.push({
|
|
64
|
+
id: node.path,
|
|
65
|
+
order: body.order ?? Number.NEGATIVE_INFINITY
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return out.sort((a, b) => a.order - b.order || a.id.localeCompare(b.id));
|
|
69
|
+
}
|
|
70
|
+
function convert(config, input) {
|
|
71
|
+
const { slug, system } = attachedSystem(config);
|
|
72
|
+
const data = input.data;
|
|
73
|
+
if (config.resolve("node", input.path)) return rejectData(`Node "${input.path}" already exists; pick a path that is free.`, ["path"]);
|
|
74
|
+
if (!data.page) return rejectData(`Pass \`page\` (and \`label\`) to place node "${input.path}".`, ["data", "page"]);
|
|
75
|
+
if (!config.resolve("page", data.page)) return rejectData(`Page "${data.page}" does not exist.`, ["data", "page"]);
|
|
76
|
+
let converted;
|
|
77
|
+
try {
|
|
78
|
+
converted = specFromCapture({
|
|
79
|
+
tree: data.tree,
|
|
80
|
+
config: system,
|
|
81
|
+
selector: data.selector,
|
|
82
|
+
root: data.frame,
|
|
83
|
+
width: data.width ?? DEFAULT_WIDTH,
|
|
84
|
+
height: data.height,
|
|
85
|
+
childCap: data.childCap ?? 0
|
|
86
|
+
});
|
|
87
|
+
} catch (error) {
|
|
88
|
+
return rejectData(error instanceof Error ? error.message : String(error));
|
|
89
|
+
}
|
|
90
|
+
const front = artboardsOn(config, data.page).at(-1);
|
|
91
|
+
const placement = {
|
|
92
|
+
page: data.page,
|
|
93
|
+
x: data.x,
|
|
94
|
+
y: data.y,
|
|
95
|
+
width: data.width ?? DEFAULT_WIDTH,
|
|
96
|
+
label: data.label ?? input.path,
|
|
97
|
+
order: front && Number.isFinite(front.order) ? front.order + 1 : 1
|
|
98
|
+
};
|
|
99
|
+
return specToNodePatches({
|
|
100
|
+
config,
|
|
101
|
+
nodeId: input.path,
|
|
102
|
+
spec: converted.spec,
|
|
103
|
+
slug,
|
|
104
|
+
placement
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
const fromHtmlExample = () => ({
|
|
108
|
+
path: "screen-home",
|
|
109
|
+
data: {
|
|
110
|
+
label: "Home",
|
|
111
|
+
page: "home",
|
|
112
|
+
width: 1600,
|
|
113
|
+
frame: {
|
|
114
|
+
type: "component:Box",
|
|
115
|
+
props: { position: "relative" }
|
|
116
|
+
},
|
|
117
|
+
tree: {
|
|
118
|
+
tag: "body",
|
|
119
|
+
children: [{
|
|
120
|
+
tag: "div",
|
|
121
|
+
attrs: {
|
|
122
|
+
"data-uds-component": "Box",
|
|
123
|
+
"data-uds-layer": "root",
|
|
124
|
+
class: "uds-primitives-box-root uds-p-4"
|
|
125
|
+
},
|
|
126
|
+
children: ["Hello"]
|
|
127
|
+
}]
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
const captureNodeOps = { "from-html": {
|
|
132
|
+
input: fromHtmlInput,
|
|
133
|
+
readOnly: false,
|
|
134
|
+
label: "Artboard from a captured page",
|
|
135
|
+
description: "Turn a captured page into this node's content: each rendered component becomes an element with the props its classes, inline style and stamps say, its layers become slots, and the whole becomes the node's rows. `tree` is the page parsed into the captured-tree shape (a host that accepts raw HTML parses it first). The node is placed on `page` with `label`; a path that already exists is refused.",
|
|
136
|
+
scope: "item",
|
|
137
|
+
approval: "destructive",
|
|
138
|
+
title: (entity) => `Fill ${entity} from a captured page`,
|
|
139
|
+
example: fromHtmlExample,
|
|
140
|
+
handler: (input, config) => {
|
|
141
|
+
const patches = convert(config, fromHtmlInput.parse(input));
|
|
142
|
+
return patches.length === 0 ? config : config.applyAll(patches);
|
|
143
|
+
}
|
|
144
|
+
} };
|
|
145
|
+
//#endregion
|
|
146
|
+
export { captureNodeOps };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Config, Patch } from "../framework/Config.js";
|
|
2
|
+
import { Spec } from "./capture-to-spec.js";
|
|
3
|
+
|
|
4
|
+
//#region src/capture/node-patches.d.ts
|
|
5
|
+
interface Placement {
|
|
6
|
+
readonly page: string;
|
|
7
|
+
readonly x?: number;
|
|
8
|
+
readonly y?: number;
|
|
9
|
+
readonly width: number;
|
|
10
|
+
readonly label?: string;
|
|
11
|
+
readonly order?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The patches that place `nodeId` holding `spec`: a create per subtree row, children before the
|
|
15
|
+
* rows that point at them, then the placed node itself with its placement. The node must not exist
|
|
16
|
+
* yet; a paste mints a fresh id, so a path that is taken is the caller's mistake, not a refill.
|
|
17
|
+
*/
|
|
18
|
+
declare function specToNodePatches({
|
|
19
|
+
config,
|
|
20
|
+
nodeId,
|
|
21
|
+
spec,
|
|
22
|
+
slug,
|
|
23
|
+
placement
|
|
24
|
+
}: {
|
|
25
|
+
readonly config: Config;
|
|
26
|
+
readonly nodeId: string;
|
|
27
|
+
readonly spec: Spec;
|
|
28
|
+
readonly slug: string;
|
|
29
|
+
readonly placement: Placement;
|
|
30
|
+
}): Patch[];
|
|
31
|
+
//#endregion
|
|
32
|
+
export { specToNodePatches };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { ref } from "../framework/utils/refs.js";
|
|
2
|
+
//#region src/capture/node-patches.ts
|
|
3
|
+
/**
|
|
4
|
+
* A spec as the node rows of one new placed node. A placed node's content is its subtree rows, one
|
|
5
|
+
* per element, at `<node>/<element key>`, each pointing at its children by ref; the root element's
|
|
6
|
+
* content lives on the placed node itself beside its placement.
|
|
7
|
+
*/
|
|
8
|
+
const INTRINSIC_TAG = /^[a-z][a-zA-Z0-9-]*$/;
|
|
9
|
+
const SPEC_PRIMITIVES = new Set(["Slot", "Fragment"]);
|
|
10
|
+
/** A spec element's `type` as the ref a node row stores, qualified with the system's slug. */
|
|
11
|
+
function elementTypeRef({ type, slug }) {
|
|
12
|
+
const colon = type.indexOf(":");
|
|
13
|
+
if (colon !== -1) return ref(type.slice(0, colon), type.slice(colon + 1), slug);
|
|
14
|
+
if (INTRINSIC_TAG.test(type)) return ref("html", type);
|
|
15
|
+
if (SPEC_PRIMITIVES.has(type)) return ref("spec", type);
|
|
16
|
+
return ref("component", type, slug);
|
|
17
|
+
}
|
|
18
|
+
/** The content fields of one element as a node row holds them. */
|
|
19
|
+
function elementNodeFields({ element, nodeId, slug }) {
|
|
20
|
+
const sub = (key) => ref("node", `${nodeId}/${key}`);
|
|
21
|
+
const slots = {};
|
|
22
|
+
for (const [name, fills] of Object.entries(element.slots ?? {})) slots[name] = fills.map(sub);
|
|
23
|
+
return {
|
|
24
|
+
type: elementTypeRef({
|
|
25
|
+
type: element.type,
|
|
26
|
+
slug
|
|
27
|
+
}),
|
|
28
|
+
props: element.props ?? {},
|
|
29
|
+
...element.children?.length ? { children: element.children.map(sub) } : {},
|
|
30
|
+
...Object.keys(slots).length > 0 ? { slots } : {},
|
|
31
|
+
...element.ref !== void 0 ? { ref: element.ref } : {},
|
|
32
|
+
...element.visible !== void 0 ? { visible: element.visible } : {},
|
|
33
|
+
...element.repeat !== void 0 ? { repeat: element.repeat } : {}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/** Element keys in the order a write needs: children before the element that points at them. */
|
|
37
|
+
function postOrder(spec) {
|
|
38
|
+
const out = [];
|
|
39
|
+
const seen = /* @__PURE__ */ new Set();
|
|
40
|
+
const visit = (key) => {
|
|
41
|
+
if (seen.has(key)) return;
|
|
42
|
+
seen.add(key);
|
|
43
|
+
const el = spec.elements[key];
|
|
44
|
+
if (!el) return;
|
|
45
|
+
for (const child of el.children ?? []) visit(child);
|
|
46
|
+
for (const fills of Object.values(el.slots ?? {})) for (const child of fills) visit(child);
|
|
47
|
+
out.push(key);
|
|
48
|
+
};
|
|
49
|
+
visit(spec.root);
|
|
50
|
+
return out;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The patches that place `nodeId` holding `spec`: a create per subtree row, children before the
|
|
54
|
+
* rows that point at them, then the placed node itself with its placement. The node must not exist
|
|
55
|
+
* yet; a paste mints a fresh id, so a path that is taken is the caller's mistake, not a refill.
|
|
56
|
+
*/
|
|
57
|
+
function specToNodePatches({ config, nodeId, spec, slug, placement }) {
|
|
58
|
+
if (config.resolve("node", nodeId)) throw new Error(`Node "${nodeId}" already exists; pick a path that is free.`);
|
|
59
|
+
const patches = [];
|
|
60
|
+
for (const key of postOrder(spec)) {
|
|
61
|
+
if (key === spec.root) continue;
|
|
62
|
+
patches.push({
|
|
63
|
+
kind: "node",
|
|
64
|
+
operation: "create",
|
|
65
|
+
path: `${nodeId}/${key}`,
|
|
66
|
+
data: elementNodeFields({
|
|
67
|
+
element: spec.elements[key],
|
|
68
|
+
nodeId,
|
|
69
|
+
slug
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
patches.push({
|
|
74
|
+
kind: "node",
|
|
75
|
+
operation: "create",
|
|
76
|
+
path: nodeId,
|
|
77
|
+
data: {
|
|
78
|
+
...elementNodeFields({
|
|
79
|
+
element: spec.elements[spec.root],
|
|
80
|
+
nodeId,
|
|
81
|
+
slug
|
|
82
|
+
}),
|
|
83
|
+
meta: spec.meta,
|
|
84
|
+
page: ref("page", placement.page),
|
|
85
|
+
x: placement.x ?? 0,
|
|
86
|
+
y: placement.y ?? 0,
|
|
87
|
+
size: {
|
|
88
|
+
type: "custom",
|
|
89
|
+
width: placement.width,
|
|
90
|
+
height: 0
|
|
91
|
+
},
|
|
92
|
+
...placement.label !== void 0 ? { label: placement.label } : {},
|
|
93
|
+
...placement.order !== void 0 ? { order: placement.order } : {}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
return patches;
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
99
|
+
export { specToNodePatches };
|
|
@@ -6,11 +6,11 @@ import { ComponentContractOf, PathOf } from "../framework/registered.js";
|
|
|
6
6
|
import { EntityClass, GroupComputedInput } from "../framework/defineEntity.js";
|
|
7
7
|
import { ConfigClass, ConfigInstance } from "../framework/defineConfig.js";
|
|
8
8
|
import { Config } from "../framework/Config.js";
|
|
9
|
+
import { GlyphNamespace } from "../entities/system/glyph-identity.js";
|
|
9
10
|
import { StoredPreviewCondition } from "../framework/preview-store.js";
|
|
10
11
|
import { listSlots, namedSlots, slotHostedBy, slotOf } from "../spec/slot.js";
|
|
11
12
|
import { cellAt } from "../spec/cell.js";
|
|
12
13
|
import { instanceAt } from "../spec/instance.js";
|
|
13
|
-
import { GlyphNamespace } from "../entities/system/glyph-identity.js";
|
|
14
14
|
import { ReactNativeSystem } from "./react-native-system.js";
|
|
15
15
|
import { System } from "./system.js";
|
|
16
16
|
import { AnySystemConfig } from "./platform.js";
|
|
@@ -2,8 +2,9 @@ import { AI_LANES } from "../ai-lanes.js";
|
|
|
2
2
|
import { defineEntity } from "../framework/defineEntity.js";
|
|
3
3
|
import { Package } from "../entities/system/Package.js";
|
|
4
4
|
import { Component } from "../entities/system/Component.js";
|
|
5
|
-
import { Device } from "../entities/system/Device.js";
|
|
6
5
|
import { Icon } from "../entities/system/Icon.js";
|
|
6
|
+
import { captureNodeOps } from "../capture/node-ops.js";
|
|
7
|
+
import { Device } from "../entities/system/Device.js";
|
|
7
8
|
import { Operation } from "../entities/system/Operation.js";
|
|
8
9
|
import { Tool } from "../entities/system/Tool.js";
|
|
9
10
|
import { defineConfig } from "../framework/defineConfig.js";
|
|
@@ -211,6 +212,7 @@ const Size = z.discriminatedUnion("type", [z.object({
|
|
|
211
212
|
*/
|
|
212
213
|
const Node = defineEntity({
|
|
213
214
|
kind: "node",
|
|
215
|
+
schemas: captureNodeOps,
|
|
214
216
|
fields: z.object({
|
|
215
217
|
/** A real ref, never a bare name — dependents()/rename-cascade need a real edge, and a bare
|
|
216
218
|
* `kind:path` string the framework never walks gives neither. Absent only on a placeholder
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Ref } from "../framework/utils/ref-grammar.js";
|
|
2
1
|
import { CopyPlan } from "../entities/system/copy-plan.js";
|
|
2
|
+
import { Ref } from "../framework/utils/ref-grammar.js";
|
|
3
3
|
import { SubEntityClass } from "../framework/defineSubEntity.js";
|
|
4
4
|
import { ComputedInput } from "../framework/registry.js";
|
|
5
5
|
import { DerivedEntityClass } from "../framework/defineDerivedEntity.js";
|
|
@@ -9,12 +9,12 @@ import { ConfigClass } from "../framework/defineConfig.js";
|
|
|
9
9
|
import { PinOptionsField } from "../entities/system/LinkedSystem.js";
|
|
10
10
|
import { BreakPlan, LinkPlan, SourceRowState, UnlinkPlan } from "../entities/system/link-plan.js";
|
|
11
11
|
import { Config } from "../framework/Config.js";
|
|
12
|
+
import { GlyphNamespace } from "../entities/system/glyph-identity.js";
|
|
12
13
|
import { StylePropValue } from "../entities/system/StyleProperty.js";
|
|
13
14
|
import { StoredPreviewCondition } from "../framework/preview-store.js";
|
|
14
15
|
import { listSlots, namedSlots, slotHostedBy, slotOf } from "../spec/slot.js";
|
|
15
16
|
import { cellAt } from "../spec/cell.js";
|
|
16
17
|
import { instanceAt } from "../spec/instance.js";
|
|
17
|
-
import { GlyphNamespace } from "../entities/system/glyph-identity.js";
|
|
18
18
|
import { DerivedColor, Gradient } from "../entities/system/color.js";
|
|
19
19
|
import { StyleValue } from "../entities/system/style-bag.js";
|
|
20
20
|
import { ComponentElementBody, ComponentReference, ComponentStyleBody } from "../entities/system/Component.js";
|
|
@@ -1144,8 +1144,8 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
1144
1144
|
value: _$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber]>;
|
|
1145
1145
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
1146
1146
|
type: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
1147
|
-
mode: "mode";
|
|
1148
1147
|
state: "state";
|
|
1148
|
+
mode: "mode";
|
|
1149
1149
|
}>>;
|
|
1150
1150
|
default: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
1151
1151
|
__ref: _$zod.ZodString;
|
|
@@ -1159,7 +1159,7 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
1159
1159
|
arbitrary: _$zod.ZodDefault<_$zod.ZodBoolean>;
|
|
1160
1160
|
negates: _$zod.ZodDefault<_$zod.ZodBoolean>;
|
|
1161
1161
|
opacityOf: _$zod.ZodOptional<_$zod.ZodLazy<_$zod.ZodType<Ref, unknown, _$zod_v4_core0.$ZodTypeInternals<Ref, unknown>>>>;
|
|
1162
|
-
}, "values" | "
|
|
1162
|
+
}, "values" | "classPrefix" | "properties"> & {
|
|
1163
1163
|
properties: _$zod.ZodArray<_$zod.ZodPipe<_$zod.ZodPipe<_$zod.ZodString, _$zod.ZodTransform<string, string>>, _$zod.ZodEnum<{
|
|
1164
1164
|
filter: "filter";
|
|
1165
1165
|
transform: "transform";
|
|
@@ -1184,7 +1184,14 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
1184
1184
|
overflow: "overflow";
|
|
1185
1185
|
padding: "padding";
|
|
1186
1186
|
width: "width";
|
|
1187
|
+
elevation: "elevation";
|
|
1187
1188
|
fontFamily: "fontFamily";
|
|
1189
|
+
fontSize: "fontSize";
|
|
1190
|
+
fontStyle: "fontStyle";
|
|
1191
|
+
fontVariant: "fontVariant";
|
|
1192
|
+
fontWeight: "fontWeight";
|
|
1193
|
+
letterSpacing: "letterSpacing";
|
|
1194
|
+
pointerEvents: "pointerEvents";
|
|
1188
1195
|
alignContent: "alignContent";
|
|
1189
1196
|
alignItems: "alignItems";
|
|
1190
1197
|
alignSelf: "alignSelf";
|
|
@@ -1226,7 +1233,6 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
1226
1233
|
boxShadow: "boxShadow";
|
|
1227
1234
|
boxSizing: "boxSizing";
|
|
1228
1235
|
columnGap: "columnGap";
|
|
1229
|
-
elevation: "elevation";
|
|
1230
1236
|
experimental_backgroundImage: "experimental_backgroundImage";
|
|
1231
1237
|
experimental_backgroundPosition: "experimental_backgroundPosition";
|
|
1232
1238
|
experimental_backgroundRepeat: "experimental_backgroundRepeat";
|
|
@@ -1236,10 +1242,6 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
1236
1242
|
flexGrow: "flexGrow";
|
|
1237
1243
|
flexShrink: "flexShrink";
|
|
1238
1244
|
flexWrap: "flexWrap";
|
|
1239
|
-
fontSize: "fontSize";
|
|
1240
|
-
fontStyle: "fontStyle";
|
|
1241
|
-
fontVariant: "fontVariant";
|
|
1242
|
-
fontWeight: "fontWeight";
|
|
1243
1245
|
includeFontPadding: "includeFontPadding";
|
|
1244
1246
|
insetBlock: "insetBlock";
|
|
1245
1247
|
insetBlockEnd: "insetBlockEnd";
|
|
@@ -1248,7 +1250,6 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
1248
1250
|
insetInlineEnd: "insetInlineEnd";
|
|
1249
1251
|
insetInlineStart: "insetInlineStart";
|
|
1250
1252
|
justifyContent: "justifyContent";
|
|
1251
|
-
letterSpacing: "letterSpacing";
|
|
1252
1253
|
lineHeight: "lineHeight";
|
|
1253
1254
|
marginBlock: "marginBlock";
|
|
1254
1255
|
marginBlockEnd: "marginBlockEnd";
|
|
@@ -1289,7 +1290,6 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
1289
1290
|
paddingStart: "paddingStart";
|
|
1290
1291
|
paddingTop: "paddingTop";
|
|
1291
1292
|
paddingVertical: "paddingVertical";
|
|
1292
|
-
pointerEvents: "pointerEvents";
|
|
1293
1293
|
resizeMode: "resizeMode";
|
|
1294
1294
|
rotation: "rotation";
|
|
1295
1295
|
rowGap: "rowGap";
|
|
@@ -2970,8 +2970,8 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
2970
2970
|
value: _$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber]>;
|
|
2971
2971
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
2972
2972
|
type: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
2973
|
-
mode: "mode";
|
|
2974
2973
|
state: "state";
|
|
2974
|
+
mode: "mode";
|
|
2975
2975
|
}>>;
|
|
2976
2976
|
default: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
2977
2977
|
__ref: _$zod.ZodString;
|
|
@@ -2985,7 +2985,7 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
2985
2985
|
arbitrary: _$zod.ZodDefault<_$zod.ZodBoolean>;
|
|
2986
2986
|
negates: _$zod.ZodDefault<_$zod.ZodBoolean>;
|
|
2987
2987
|
opacityOf: _$zod.ZodOptional<_$zod.ZodLazy<_$zod.ZodType<Ref, unknown, _$zod_v4_core0.$ZodTypeInternals<Ref, unknown>>>>;
|
|
2988
|
-
}, "values" | "
|
|
2988
|
+
}, "values" | "classPrefix" | "properties"> & {
|
|
2989
2989
|
properties: _$zod.ZodArray<_$zod.ZodPipe<_$zod.ZodPipe<_$zod.ZodString, _$zod.ZodTransform<string, string>>, _$zod.ZodEnum<{
|
|
2990
2990
|
filter: "filter";
|
|
2991
2991
|
transform: "transform";
|
|
@@ -3010,7 +3010,14 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
3010
3010
|
overflow: "overflow";
|
|
3011
3011
|
padding: "padding";
|
|
3012
3012
|
width: "width";
|
|
3013
|
+
elevation: "elevation";
|
|
3013
3014
|
fontFamily: "fontFamily";
|
|
3015
|
+
fontSize: "fontSize";
|
|
3016
|
+
fontStyle: "fontStyle";
|
|
3017
|
+
fontVariant: "fontVariant";
|
|
3018
|
+
fontWeight: "fontWeight";
|
|
3019
|
+
letterSpacing: "letterSpacing";
|
|
3020
|
+
pointerEvents: "pointerEvents";
|
|
3014
3021
|
alignContent: "alignContent";
|
|
3015
3022
|
alignItems: "alignItems";
|
|
3016
3023
|
alignSelf: "alignSelf";
|
|
@@ -3052,7 +3059,6 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
3052
3059
|
boxShadow: "boxShadow";
|
|
3053
3060
|
boxSizing: "boxSizing";
|
|
3054
3061
|
columnGap: "columnGap";
|
|
3055
|
-
elevation: "elevation";
|
|
3056
3062
|
experimental_backgroundImage: "experimental_backgroundImage";
|
|
3057
3063
|
experimental_backgroundPosition: "experimental_backgroundPosition";
|
|
3058
3064
|
experimental_backgroundRepeat: "experimental_backgroundRepeat";
|
|
@@ -3062,10 +3068,6 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
3062
3068
|
flexGrow: "flexGrow";
|
|
3063
3069
|
flexShrink: "flexShrink";
|
|
3064
3070
|
flexWrap: "flexWrap";
|
|
3065
|
-
fontSize: "fontSize";
|
|
3066
|
-
fontStyle: "fontStyle";
|
|
3067
|
-
fontVariant: "fontVariant";
|
|
3068
|
-
fontWeight: "fontWeight";
|
|
3069
3071
|
includeFontPadding: "includeFontPadding";
|
|
3070
3072
|
insetBlock: "insetBlock";
|
|
3071
3073
|
insetBlockEnd: "insetBlockEnd";
|
|
@@ -3074,7 +3076,6 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
3074
3076
|
insetInlineEnd: "insetInlineEnd";
|
|
3075
3077
|
insetInlineStart: "insetInlineStart";
|
|
3076
3078
|
justifyContent: "justifyContent";
|
|
3077
|
-
letterSpacing: "letterSpacing";
|
|
3078
3079
|
lineHeight: "lineHeight";
|
|
3079
3080
|
marginBlock: "marginBlock";
|
|
3080
3081
|
marginBlockEnd: "marginBlockEnd";
|
|
@@ -3115,7 +3116,6 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
3115
3116
|
paddingStart: "paddingStart";
|
|
3116
3117
|
paddingTop: "paddingTop";
|
|
3117
3118
|
paddingVertical: "paddingVertical";
|
|
3118
|
-
pointerEvents: "pointerEvents";
|
|
3119
3119
|
resizeMode: "resizeMode";
|
|
3120
3120
|
rotation: "rotation";
|
|
3121
3121
|
rowGap: "rowGap";
|
|
@@ -3,8 +3,8 @@ import { Composite } from "../entities/system/Composite.js";
|
|
|
3
3
|
import { Package } from "../entities/system/Package.js";
|
|
4
4
|
import { File } from "../entities/system/File.js";
|
|
5
5
|
import { Component } from "../entities/system/Component.js";
|
|
6
|
-
import { Device } from "../entities/system/Device.js";
|
|
7
6
|
import { Icon } from "../entities/system/Icon.js";
|
|
7
|
+
import { Device } from "../entities/system/Device.js";
|
|
8
8
|
import { Operation } from "../entities/system/Operation.js";
|
|
9
9
|
import { Tool } from "../entities/system/Tool.js";
|
|
10
10
|
import { registerSchemaMigrations, registeredSchemaMigrations } from "../framework/schema-version.js";
|
package/dist/configs/system.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Ref } from "../framework/utils/ref-grammar.js";
|
|
2
1
|
import { CopyPlan } from "../entities/system/copy-plan.js";
|
|
2
|
+
import { Ref } from "../framework/utils/ref-grammar.js";
|
|
3
3
|
import { SubEntityClass } from "../framework/defineSubEntity.js";
|
|
4
4
|
import { ComputedInput } from "../framework/registry.js";
|
|
5
5
|
import { DerivedEntityClass } from "../framework/defineDerivedEntity.js";
|
|
@@ -9,12 +9,12 @@ import { ConfigClass } from "../framework/defineConfig.js";
|
|
|
9
9
|
import { PinOptionsField } from "../entities/system/LinkedSystem.js";
|
|
10
10
|
import { BreakPlan, LinkPlan, SourceRowState, UnlinkPlan } from "../entities/system/link-plan.js";
|
|
11
11
|
import { Config } from "../framework/Config.js";
|
|
12
|
+
import { GlyphNamespace } from "../entities/system/glyph-identity.js";
|
|
12
13
|
import { StylePropValue } from "../entities/system/StyleProperty.js";
|
|
13
14
|
import { StoredPreviewCondition } from "../framework/preview-store.js";
|
|
14
15
|
import { listSlots, namedSlots, slotHostedBy, slotOf } from "../spec/slot.js";
|
|
15
16
|
import { cellAt } from "../spec/cell.js";
|
|
16
17
|
import { instanceAt } from "../spec/instance.js";
|
|
17
|
-
import { GlyphNamespace } from "../entities/system/glyph-identity.js";
|
|
18
18
|
import { DerivedColor, Gradient } from "../entities/system/color.js";
|
|
19
19
|
import { StyleValue } from "../entities/system/style-bag.js";
|
|
20
20
|
import { ComponentElementBody, ComponentReference, ComponentStyleBody } from "../entities/system/Component.js";
|
|
@@ -1133,8 +1133,8 @@ declare const System: ConfigClass<{
|
|
|
1133
1133
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "composite", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>>]>;
|
|
1134
1134
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
1135
1135
|
type: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
1136
|
-
mode: "mode";
|
|
1137
1136
|
state: "state";
|
|
1137
|
+
mode: "mode";
|
|
1138
1138
|
}>>;
|
|
1139
1139
|
default: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
1140
1140
|
__ref: _$zod.ZodString;
|
|
@@ -2831,8 +2831,8 @@ declare const System: ConfigClass<{
|
|
|
2831
2831
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "composite", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>>]>;
|
|
2832
2832
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
2833
2833
|
type: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
2834
|
-
mode: "mode";
|
|
2835
2834
|
state: "state";
|
|
2835
|
+
mode: "mode";
|
|
2836
2836
|
}>>;
|
|
2837
2837
|
default: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
2838
2838
|
__ref: _$zod.ZodString;
|
package/dist/configs/system.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { Settings } from "../entities/system/Settings.js";
|
|
1
2
|
import { Font } from "../entities/system/Font.js";
|
|
2
3
|
import { Composite } from "../entities/system/Composite.js";
|
|
3
4
|
import { Modifier } from "../entities/system/Modifier.js";
|
|
4
|
-
import { Settings } from "../entities/system/Settings.js";
|
|
5
5
|
import { StyleProperty } from "../entities/system/StyleProperty.js";
|
|
6
6
|
import { Package } from "../entities/system/Package.js";
|
|
7
7
|
import { File } from "../entities/system/File.js";
|
|
8
8
|
import { Component } from "../entities/system/Component.js";
|
|
9
|
-
import { Device } from "../entities/system/Device.js";
|
|
10
9
|
import { Icon } from "../entities/system/Icon.js";
|
|
10
|
+
import { Device } from "../entities/system/Device.js";
|
|
11
11
|
import { Operation } from "../entities/system/Operation.js";
|
|
12
12
|
import { Tool } from "../entities/system/Tool.js";
|
|
13
13
|
import { registerSchemaMigrations, registeredSchemaMigrations } from "../framework/schema-version.js";
|
|
@@ -14,8 +14,8 @@ declare const NativeModifier: EntityClass<z.ZodObject<{
|
|
|
14
14
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
15
15
|
}, z.core.$strip>, z.ZodObject<{
|
|
16
16
|
type: z.ZodOptional<z.ZodEnum<{
|
|
17
|
-
mode: "mode";
|
|
18
17
|
state: "state";
|
|
18
|
+
mode: "mode";
|
|
19
19
|
}>>;
|
|
20
20
|
default: z.ZodOptional<z.ZodObject<{
|
|
21
21
|
__ref: z.ZodString;
|
|
@@ -30,7 +30,14 @@ declare const rnStyleKey: z.ZodEnum<{
|
|
|
30
30
|
overflow: "overflow";
|
|
31
31
|
padding: "padding";
|
|
32
32
|
width: "width";
|
|
33
|
+
elevation: "elevation";
|
|
33
34
|
fontFamily: "fontFamily";
|
|
35
|
+
fontSize: "fontSize";
|
|
36
|
+
fontStyle: "fontStyle";
|
|
37
|
+
fontVariant: "fontVariant";
|
|
38
|
+
fontWeight: "fontWeight";
|
|
39
|
+
letterSpacing: "letterSpacing";
|
|
40
|
+
pointerEvents: "pointerEvents";
|
|
34
41
|
alignContent: "alignContent";
|
|
35
42
|
alignItems: "alignItems";
|
|
36
43
|
alignSelf: "alignSelf";
|
|
@@ -72,7 +79,6 @@ declare const rnStyleKey: z.ZodEnum<{
|
|
|
72
79
|
boxShadow: "boxShadow";
|
|
73
80
|
boxSizing: "boxSizing";
|
|
74
81
|
columnGap: "columnGap";
|
|
75
|
-
elevation: "elevation";
|
|
76
82
|
experimental_backgroundImage: "experimental_backgroundImage";
|
|
77
83
|
experimental_backgroundPosition: "experimental_backgroundPosition";
|
|
78
84
|
experimental_backgroundRepeat: "experimental_backgroundRepeat";
|
|
@@ -82,10 +88,6 @@ declare const rnStyleKey: z.ZodEnum<{
|
|
|
82
88
|
flexGrow: "flexGrow";
|
|
83
89
|
flexShrink: "flexShrink";
|
|
84
90
|
flexWrap: "flexWrap";
|
|
85
|
-
fontSize: "fontSize";
|
|
86
|
-
fontStyle: "fontStyle";
|
|
87
|
-
fontVariant: "fontVariant";
|
|
88
|
-
fontWeight: "fontWeight";
|
|
89
91
|
includeFontPadding: "includeFontPadding";
|
|
90
92
|
insetBlock: "insetBlock";
|
|
91
93
|
insetBlockEnd: "insetBlockEnd";
|
|
@@ -94,7 +96,6 @@ declare const rnStyleKey: z.ZodEnum<{
|
|
|
94
96
|
insetInlineEnd: "insetInlineEnd";
|
|
95
97
|
insetInlineStart: "insetInlineStart";
|
|
96
98
|
justifyContent: "justifyContent";
|
|
97
|
-
letterSpacing: "letterSpacing";
|
|
98
99
|
lineHeight: "lineHeight";
|
|
99
100
|
marginBlock: "marginBlock";
|
|
100
101
|
marginBlockEnd: "marginBlockEnd";
|
|
@@ -135,7 +136,6 @@ declare const rnStyleKey: z.ZodEnum<{
|
|
|
135
136
|
paddingStart: "paddingStart";
|
|
136
137
|
paddingTop: "paddingTop";
|
|
137
138
|
paddingVertical: "paddingVertical";
|
|
138
|
-
pointerEvents: "pointerEvents";
|
|
139
139
|
resizeMode: "resizeMode";
|
|
140
140
|
rotation: "rotation";
|
|
141
141
|
rowGap: "rowGap";
|
|
@@ -172,7 +172,7 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
|
|
|
172
172
|
arbitrary: z.ZodDefault<z.ZodBoolean>;
|
|
173
173
|
negates: z.ZodDefault<z.ZodBoolean>;
|
|
174
174
|
opacityOf: z.ZodOptional<z.ZodLazy<z.ZodType<Ref, unknown, z.core.$ZodTypeInternals<Ref, unknown>>>>;
|
|
175
|
-
}, "values" | "
|
|
175
|
+
}, "values" | "classPrefix" | "properties"> & {
|
|
176
176
|
properties: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodEnum<{
|
|
177
177
|
filter: "filter";
|
|
178
178
|
transform: "transform";
|
|
@@ -197,7 +197,14 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
|
|
|
197
197
|
overflow: "overflow";
|
|
198
198
|
padding: "padding";
|
|
199
199
|
width: "width";
|
|
200
|
+
elevation: "elevation";
|
|
200
201
|
fontFamily: "fontFamily";
|
|
202
|
+
fontSize: "fontSize";
|
|
203
|
+
fontStyle: "fontStyle";
|
|
204
|
+
fontVariant: "fontVariant";
|
|
205
|
+
fontWeight: "fontWeight";
|
|
206
|
+
letterSpacing: "letterSpacing";
|
|
207
|
+
pointerEvents: "pointerEvents";
|
|
201
208
|
alignContent: "alignContent";
|
|
202
209
|
alignItems: "alignItems";
|
|
203
210
|
alignSelf: "alignSelf";
|
|
@@ -239,7 +246,6 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
|
|
|
239
246
|
boxShadow: "boxShadow";
|
|
240
247
|
boxSizing: "boxSizing";
|
|
241
248
|
columnGap: "columnGap";
|
|
242
|
-
elevation: "elevation";
|
|
243
249
|
experimental_backgroundImage: "experimental_backgroundImage";
|
|
244
250
|
experimental_backgroundPosition: "experimental_backgroundPosition";
|
|
245
251
|
experimental_backgroundRepeat: "experimental_backgroundRepeat";
|
|
@@ -249,10 +255,6 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
|
|
|
249
255
|
flexGrow: "flexGrow";
|
|
250
256
|
flexShrink: "flexShrink";
|
|
251
257
|
flexWrap: "flexWrap";
|
|
252
|
-
fontSize: "fontSize";
|
|
253
|
-
fontStyle: "fontStyle";
|
|
254
|
-
fontVariant: "fontVariant";
|
|
255
|
-
fontWeight: "fontWeight";
|
|
256
258
|
includeFontPadding: "includeFontPadding";
|
|
257
259
|
insetBlock: "insetBlock";
|
|
258
260
|
insetBlockEnd: "insetBlockEnd";
|
|
@@ -261,7 +263,6 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
|
|
|
261
263
|
insetInlineEnd: "insetInlineEnd";
|
|
262
264
|
insetInlineStart: "insetInlineStart";
|
|
263
265
|
justifyContent: "justifyContent";
|
|
264
|
-
letterSpacing: "letterSpacing";
|
|
265
266
|
lineHeight: "lineHeight";
|
|
266
267
|
marginBlock: "marginBlock";
|
|
267
268
|
marginBlockEnd: "marginBlockEnd";
|
|
@@ -302,7 +303,6 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
|
|
|
302
303
|
paddingStart: "paddingStart";
|
|
303
304
|
paddingTop: "paddingTop";
|
|
304
305
|
paddingVertical: "paddingVertical";
|
|
305
|
-
pointerEvents: "pointerEvents";
|
|
306
306
|
resizeMode: "resizeMode";
|
|
307
307
|
rotation: "rotation";
|
|
308
308
|
rowGap: "rowGap";
|