@yahoo/uds-create-config 4.36.0 → 4.37.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/configs/CanvasConfig.d.ts +68 -5167
- package/dist/configs/CanvasConfig.js +0 -76
- package/dist/configs/documentation.d.ts +11 -251
- package/dist/configs/documentation.js +0 -1
- package/dist/configs/react-native-system.d.ts +39 -4239
- package/dist/configs/react-native-system.js +0 -11
- package/dist/configs/system.d.ts +44 -4209
- package/dist/configs/system.js +2 -9
- package/dist/entities/documentation/Documentation.d.ts +5 -18
- package/dist/entities/documentation/Documentation.js +0 -1
- package/dist/entities/native/NativeModifier.d.ts +6 -3
- package/dist/entities/native/NativeSettings.d.ts +6 -3
- package/dist/entities/native/NativeSettings.js +0 -1
- package/dist/entities/native/NativeStyleProperty.d.ts +1 -20
- package/dist/entities/native/NativeToken.d.ts +2 -6
- package/dist/entities/system/CanvasRole.d.ts +6 -7
- package/dist/entities/system/Component.d.ts +86 -1588
- package/dist/entities/system/Component.js +0 -9
- package/dist/entities/system/Composite.d.ts +8 -6
- package/dist/entities/system/Composite.js +0 -1
- package/dist/entities/system/Device.d.ts +6 -3
- package/dist/entities/system/Device.js +0 -6
- package/dist/entities/system/File.d.ts +43 -8
- package/dist/entities/system/File.js +0 -51
- package/dist/entities/system/Font.d.ts +10 -11
- package/dist/entities/system/Font.js +0 -21
- package/dist/entities/system/GlobalStyle.d.ts +6 -3
- package/dist/entities/system/Guidance.d.ts +6 -3
- package/dist/entities/system/GuidanceStyle.d.ts +6 -3
- package/dist/entities/system/Icon.d.ts +8 -8
- package/dist/entities/system/Icon.js +0 -16
- package/dist/entities/system/LinkedSystem.d.ts +13 -155
- package/dist/entities/system/LinkedSystem.js +22 -12
- package/dist/entities/system/Modifier.d.ts +8 -8
- package/dist/entities/system/Motion.d.ts +6 -3
- package/dist/entities/system/Operation.d.ts +5 -2
- package/dist/entities/system/Package.d.ts +24 -4
- package/dist/entities/system/Package.js +0 -46
- package/dist/entities/system/Settings.d.ts +18 -7
- package/dist/entities/system/Settings.js +0 -6
- package/dist/entities/system/StyleProperty.d.ts +14 -27
- package/dist/entities/system/StyleProperty.js +0 -6
- package/dist/entities/system/Token.d.ts +12 -9
- package/dist/entities/system/Tool.d.ts +7 -90
- package/dist/entities/system/composed-values.d.ts +1 -1
- package/dist/entities/system/copy-plan.d.ts +2 -2
- package/dist/entities/system/copy-plan.js +32 -10
- package/dist/entities/system/defineComponent.d.ts +1 -1
- package/dist/entities/system/icon-metadata.d.ts +2 -6
- package/dist/entities/system/link-plan.d.ts +26 -5
- package/dist/entities/system/link-plan.js +71 -15
- package/dist/entities/system/style-bag.d.ts +27 -1
- package/dist/entities/system/style-bag.js +0 -10
- package/dist/framework/Config.d.ts +19 -3
- package/dist/framework/Config.js +71 -16
- package/dist/framework/class-names.js +1 -0
- package/dist/framework/defineConfig.d.ts +2 -2
- package/dist/framework/defineEntity.d.ts +27 -7
- package/dist/framework/named.d.ts +9 -0
- package/dist/framework/plan.d.ts +3 -0
- package/dist/framework/plan.js +4 -1
- package/dist/framework/schema-version.d.ts +1 -1
- package/dist/framework/schema-version.js +5 -5
- package/dist/framework/utils/group.d.ts +15 -5
- package/dist/index.d.ts +47 -46
- package/dist/migrations/2.0.0/v1-artifact.d.ts +38 -2109
- package/dist/migrations/20260928180801_link_on_linked.d.ts +10 -0
- package/dist/migrations/20260928180801_link_on_linked.js +8 -0
- package/dist/renderer/wrappers/html-aliases.js +1 -0
- package/dist/spec/cell.d.ts +1 -1
- package/dist/spec/preview-content.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { CopyPlan } from "./copy-plan.js";
|
|
2
1
|
import { SourceResolver, SourceState } from "../../framework/sources.js";
|
|
3
2
|
import { ComputedInput } from "../../framework/registry.js";
|
|
4
3
|
import { RegisteredEntities } from "../../framework/registered.js";
|
|
5
4
|
import { EntityClass, ItemOf } from "../../framework/defineEntity.js";
|
|
6
5
|
import { PartialBodyOf } from "../../framework/defineConfig.js";
|
|
7
|
-
import {
|
|
6
|
+
import { Named } from "../../framework/named.js";
|
|
8
7
|
import { Config } from "../../framework/Config.js";
|
|
9
8
|
import { z } from "zod";
|
|
10
9
|
|
|
@@ -86,38 +85,6 @@ declare const sourceUnavailable: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
86
85
|
code: z.ZodLiteral<"unreachable">;
|
|
87
86
|
}, z.core.$strip>], "code">;
|
|
88
87
|
type SourceUnavailable = z.infer<typeof sourceUnavailable>;
|
|
89
|
-
/** A `link` or `unlink` example: one entity the source offers, under the accessor this config files it by. */
|
|
90
|
-
declare function linkExample({
|
|
91
|
-
config,
|
|
92
|
-
path
|
|
93
|
-
}: {
|
|
94
|
-
config: Config;
|
|
95
|
-
path: string;
|
|
96
|
-
}): Record<string, unknown> | undefined;
|
|
97
|
-
/** An example for an op that takes the pin alone, shown once the pin has a source to read. */
|
|
98
|
-
declare function pinExample({
|
|
99
|
-
config,
|
|
100
|
-
path
|
|
101
|
-
}: {
|
|
102
|
-
config: Config;
|
|
103
|
-
path: string;
|
|
104
|
-
}): Record<string, unknown> | undefined;
|
|
105
|
-
/** A break's example, shown once the pin has a source to read. */
|
|
106
|
-
declare function breakExample({
|
|
107
|
-
config,
|
|
108
|
-
path
|
|
109
|
-
}: {
|
|
110
|
-
config: Config;
|
|
111
|
-
path: string;
|
|
112
|
-
}): Record<string, unknown> | undefined;
|
|
113
|
-
/** A copy's example: one entity the source offers, under the accessor this config files it by. */
|
|
114
|
-
declare function copyExample({
|
|
115
|
-
config,
|
|
116
|
-
path
|
|
117
|
-
}: {
|
|
118
|
-
config: Config;
|
|
119
|
-
path: string;
|
|
120
|
-
}): Record<string, unknown> | undefined;
|
|
121
88
|
/**
|
|
122
89
|
* The bridging cast, and the annotation that survives declaration emit.
|
|
123
90
|
*
|
|
@@ -127,7 +94,7 @@ declare function copyExample({
|
|
|
127
94
|
* would then change nothing.
|
|
128
95
|
*/
|
|
129
96
|
type PinOptionsField = z.ZodOptional<z.ZodType<PinOptions, PinOptions>>;
|
|
130
|
-
declare const
|
|
97
|
+
declare const LinkedSystemDefinition: EntityClass<z.ZodObject<{
|
|
131
98
|
configPath: z.ZodOptional<z.ZodString>;
|
|
132
99
|
link: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>>]>>;
|
|
133
100
|
options: PinOptionsField;
|
|
@@ -136,87 +103,43 @@ declare const LinkedSystem: EntityClass<z.ZodObject<{
|
|
|
136
103
|
name: z.ZodOptional<z.ZodString>;
|
|
137
104
|
version: z.ZodOptional<z.ZodString>;
|
|
138
105
|
}, z.core.$strict>, z.ZodObject<Record<never, never>, z.core.$strip>, "linked-system", {
|
|
139
|
-
/**
|
|
140
|
-
* Draw entities from a linked system: the pin's `link` declaration grows to cover them and the
|
|
141
|
-
* build mints a pointer row per entity, in this one op. A row of this config's own at a covered
|
|
142
|
-
* path is deleted so theirs shows through; a row held through another pin becomes an extension
|
|
143
|
-
* through this one. `link-plan` says what that replaces before anything is written.
|
|
144
|
-
*/
|
|
145
106
|
readonly link: {
|
|
146
107
|
readonly input: z.ZodObject<{
|
|
147
108
|
path: z.ZodType<string, string | undefined, z.core.$ZodTypeInternals<string, string | undefined>>;
|
|
148
109
|
data: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>>]>;
|
|
110
|
+
onLinked: z.ZodOptional<z.ZodEnum<{
|
|
111
|
+
keep: "keep";
|
|
112
|
+
take: "take";
|
|
113
|
+
}>>;
|
|
149
114
|
}, z.core.$strip>;
|
|
150
|
-
readonly readOnly: false;
|
|
151
|
-
readonly label: "Link from";
|
|
152
|
-
readonly description: "Draw entities from a linked system, following the source: `data` names them by accessor — `{ tokens: ['color/brand', 'color'] }` takes an entity and a folder's members, `{ tokens: '*' }` every token, and `'*'` the whole system. What this config already holds at those paths is replaced by theirs, so run `linked-system/link-plan` with the same input first to see what that is. To hold their values as your own instead, `copy`.";
|
|
153
|
-
readonly scope: "item";
|
|
154
|
-
readonly approval: "reference-change";
|
|
155
|
-
readonly title: (entity: string) => string;
|
|
156
|
-
readonly example: typeof linkExample;
|
|
157
|
-
readonly handler: (input: Record<string, unknown>, config: Config) => Config;
|
|
158
115
|
};
|
|
159
116
|
readonly 'link-plan': {
|
|
160
117
|
readonly input: z.ZodObject<{
|
|
161
118
|
path: z.ZodType<string, string | undefined, z.core.$ZodTypeInternals<string, string | undefined>>;
|
|
162
119
|
data: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>>]>;
|
|
120
|
+
onLinked: z.ZodOptional<z.ZodEnum<{
|
|
121
|
+
keep: "keep";
|
|
122
|
+
take: "take";
|
|
123
|
+
}>>;
|
|
163
124
|
}, z.core.$strip>;
|
|
164
|
-
readonly readOnly: true;
|
|
165
|
-
readonly label: "Plan a link";
|
|
166
|
-
readonly description: "What `link` with the same input replaces — rows of yours deleted so the source shows through, rows held through another pin turned into extensions, and members left alone because they are already here from the same origin. Writes nothing.";
|
|
167
|
-
readonly scope: "item";
|
|
168
|
-
readonly title: (entity: string) => string;
|
|
169
|
-
readonly example: typeof linkExample;
|
|
170
|
-
readonly handler: (input: Record<string, unknown>, config: Config) => Omit<LinkPlan, "patches">;
|
|
171
125
|
};
|
|
172
|
-
/**
|
|
173
|
-
* Stop drawing from a linked system, whole or in part. The declaration narrows and the rows it
|
|
174
|
-
* minted retire in the same op; the pin stays, so it can be linked again.
|
|
175
|
-
*/
|
|
176
126
|
readonly unlink: {
|
|
177
127
|
readonly input: z.ZodObject<{
|
|
178
128
|
path: z.ZodType<string, string | undefined, z.core.$ZodTypeInternals<string, string | undefined>>;
|
|
179
129
|
data: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>>]>>;
|
|
180
130
|
}, z.core.$strip>;
|
|
181
|
-
readonly readOnly: false;
|
|
182
|
-
readonly label: "Unlink from";
|
|
183
|
-
readonly description: "Stop following a linked system's entities, in `link`'s shape or everything when `data` is omitted. The rows the declaration minted go with it, and so do the linked rows that point at them, since left linked they would bring them back; nothing of yours moves. A row of yours pointing at one of theirs refuses this — `copy` what is used first, or `break` with `keep: true`. `unlink-plan` names everything that goes.";
|
|
184
|
-
readonly scope: "item";
|
|
185
|
-
readonly approval: "reference-change";
|
|
186
|
-
readonly title: (entity: string) => string;
|
|
187
|
-
readonly example: typeof pinExample;
|
|
188
|
-
readonly handler: (input: Record<string, unknown>, config: Config) => Config;
|
|
189
131
|
};
|
|
190
132
|
readonly 'unlink-plan': {
|
|
191
133
|
readonly input: z.ZodObject<{
|
|
192
134
|
path: z.ZodType<string, string | undefined, z.core.$ZodTypeInternals<string, string | undefined>>;
|
|
193
135
|
data: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>>]>>;
|
|
194
136
|
}, z.core.$strip>;
|
|
195
|
-
readonly readOnly: true;
|
|
196
|
-
readonly label: "Plan an unlink";
|
|
197
|
-
readonly description: "What `unlink` with the same input removes — the minted rows the narrower declaration no longer reaches, with the linked rows taken along because they point at them named in `cascade` — and why the config would refuse it. Writes nothing.";
|
|
198
|
-
readonly scope: "item";
|
|
199
|
-
readonly title: (entity: string) => string;
|
|
200
|
-
readonly example: typeof pinExample;
|
|
201
|
-
readonly handler: (input: Record<string, unknown>, config: Config) => Omit<UnlinkPlan, "patches">;
|
|
202
137
|
};
|
|
203
|
-
/**
|
|
204
|
-
* Break the link: the pin goes, and everything drawn through it either becomes this config's own
|
|
205
|
-
* or goes with it.
|
|
206
|
-
*/
|
|
207
138
|
readonly break: {
|
|
208
139
|
readonly input: z.ZodObject<{
|
|
209
140
|
path: z.ZodType<string, string | undefined, z.core.$ZodTypeInternals<string, string | undefined>>;
|
|
210
141
|
keep: z.ZodBoolean;
|
|
211
142
|
}, z.core.$strip>;
|
|
212
|
-
readonly readOnly: false;
|
|
213
|
-
readonly label: "Break link";
|
|
214
|
-
readonly description: "Remove a linked system. With `keep: true` every value drawn through it is copied in as your own first, and a row of yours that pointed through the pin points at the copies; with `keep: false` the rows it minted go, and a row of yours still pointing through it refuses the break. Run `linked-system/break-plan` first to see every row it reaches.";
|
|
215
|
-
readonly scope: "item";
|
|
216
|
-
readonly approval: "destructive";
|
|
217
|
-
readonly title: (entity: string) => string;
|
|
218
|
-
readonly example: typeof breakExample;
|
|
219
|
-
readonly handler: (input: Record<string, unknown>, config: Config) => Config;
|
|
220
143
|
};
|
|
221
144
|
readonly 'break-plan': {
|
|
222
145
|
readonly input: z.ZodObject<{
|
|
@@ -224,57 +147,12 @@ declare const LinkedSystem: EntityClass<z.ZodObject<{
|
|
|
224
147
|
keep: z.ZodOptional<z.ZodBoolean>;
|
|
225
148
|
data: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>>]>>;
|
|
226
149
|
}, z.core.$strip>;
|
|
227
|
-
readonly readOnly: true;
|
|
228
|
-
readonly label: "Plan a break";
|
|
229
|
-
readonly description: "Every row a break reaches, and why the config would refuse it. `keep` plans `break` with the same input; `data` in `copy`'s shape plans detaching those entities alone — the rows the copy lands, the rows of yours it points at the copies, and the rows still linked that reference what moves. Writes nothing.";
|
|
230
|
-
readonly scope: "item";
|
|
231
|
-
readonly title: (entity: string) => string;
|
|
232
|
-
readonly example: typeof breakExample;
|
|
233
|
-
readonly handler: (input: Record<string, unknown>, config: Config) => Omit<BreakPlan, "patches">;
|
|
234
150
|
};
|
|
235
|
-
/**
|
|
236
|
-
* The source's catalogue read against this config: one row per top-level folder or item the
|
|
237
|
-
* source offers, saying whether it is linked here and what linking it would replace.
|
|
238
|
-
*/
|
|
239
151
|
readonly rows: {
|
|
240
152
|
readonly input: z.ZodObject<{
|
|
241
153
|
path: z.ZodType<string, string | undefined, z.core.$ZodTypeInternals<string, string | undefined>>;
|
|
242
154
|
}, z.core.$strip>;
|
|
243
|
-
readonly readOnly: true;
|
|
244
|
-
readonly label: "Source rows";
|
|
245
|
-
readonly description: "Every top-level folder and item the linked system offers, read against this config: whether every member is linked through this pin, how many rows of yours a `link` would replace, and how many members are already here from the source's own origin. Needs the source attached; empty otherwise.";
|
|
246
|
-
readonly scope: "item";
|
|
247
|
-
readonly title: (entity: string) => string;
|
|
248
|
-
readonly example: typeof pinExample;
|
|
249
|
-
readonly handler: (input: Record<string, unknown>, config: Config) => SourceRowState[];
|
|
250
155
|
};
|
|
251
|
-
/**
|
|
252
|
-
* Take entities from a linked system as this config's own — the source's bodies, written once.
|
|
253
|
-
* A pin puts a system within reach and its `link` mints pointers; `copy` stores the value. A copied
|
|
254
|
-
* row is an ordinary authored row from the moment it lands: the source's later versions never reach
|
|
255
|
-
* it, and it renames and deletes like anything else here.
|
|
256
|
-
*
|
|
257
|
-
* A copy stands on its own. What a copied row points at comes with it — a component brings the
|
|
258
|
-
* style properties and tokens it names, a style property brings the token folder its values
|
|
259
|
-
* range over, a code component brings the files its module reaches — and every one of those refs
|
|
260
|
-
* lands bare, on the local copy. A path this config already holds as its own is reused rather
|
|
261
|
-
* than copied, and refs bind to it. Only a ref to a kind this config can't hold stays qualified,
|
|
262
|
-
* and the pin survives to answer it. Someone who wants theirs by reference writes `Button@slug`
|
|
263
|
-
* instead.
|
|
264
|
-
*
|
|
265
|
-
* A pointer at the path, minted through this pin, becomes the literal it stood for with its
|
|
266
|
-
* `extend` laid over the source's body. A folder's meta comes with its members, so a label the
|
|
267
|
-
* folder was inheriting becomes its own.
|
|
268
|
-
*
|
|
269
|
-
* `data` is keyed the way the pin's `link` is: by accessor, then `'*'` for every entry of the kind
|
|
270
|
-
* or the source's paths — an item, or a folder, which takes its members. `'*'` alone takes every
|
|
271
|
-
* kind the source offers and this config can hold. Kinds taken in one edit are copied together,
|
|
272
|
-
* which is what lets a copied component point at the copied tokens rather than back through the
|
|
273
|
-
* pin.
|
|
274
|
-
*
|
|
275
|
-
* Every row lands in one derive (`Config.applyAll`), and each is its own `create` or `replace`
|
|
276
|
-
* patch carrying the literal body, so a draft replays a copy onto a base with nothing attached.
|
|
277
|
-
*/
|
|
278
156
|
readonly copy: {
|
|
279
157
|
readonly input: z.ZodObject<{
|
|
280
158
|
path: z.ZodType<string, string | undefined, z.core.$ZodTypeInternals<string, string | undefined>>;
|
|
@@ -284,22 +162,7 @@ declare const LinkedSystem: EntityClass<z.ZodObject<{
|
|
|
284
162
|
skip: "skip";
|
|
285
163
|
}>>;
|
|
286
164
|
}, z.core.$strip>;
|
|
287
|
-
readonly readOnly: false;
|
|
288
|
-
readonly label: "Copy from";
|
|
289
|
-
readonly description: "Take entities from a linked system as your own, holding the values the source has now and no longer following it. `data` names them by accessor: `{ tokens: ['color/brand', 'color'] }` takes an entity and a folder's members, `{ tokens: '*' }` every token, and `'*'` the whole system. What a copied entity points at comes with it, so run `linked-system/copy-plan` with the same input first and see everything that lands. To use theirs without owning it, declare it in the pin's `link` instead. A whole-system copy is thousands of rows, and on a repo-backed system each one is written into `uds.config.ts`.";
|
|
290
|
-
readonly scope: "item";
|
|
291
|
-
readonly approval: "reference-change";
|
|
292
|
-
readonly title: (entity: string) => string;
|
|
293
|
-
readonly example: typeof copyExample;
|
|
294
|
-
readonly handler: (input: Record<string, unknown>, config: Config) => Config;
|
|
295
165
|
};
|
|
296
|
-
/**
|
|
297
|
-
* What that same `copy` call would do, without doing it — the rows that land, what comes along
|
|
298
|
-
* because something named points at it, and the rows of yours a copied ref binds to instead.
|
|
299
|
-
*
|
|
300
|
-
* A read, taking `copy`'s own input verbatim, so a surface plans the invocation it is about to
|
|
301
|
-
* send. The op is this plan applied, so the two cannot disagree.
|
|
302
|
-
*/
|
|
303
166
|
readonly 'copy-plan': {
|
|
304
167
|
readonly input: z.ZodObject<{
|
|
305
168
|
path: z.ZodType<string, string | undefined, z.core.$ZodTypeInternals<string, string | undefined>>;
|
|
@@ -309,13 +172,6 @@ declare const LinkedSystem: EntityClass<z.ZodObject<{
|
|
|
309
172
|
skip: "skip";
|
|
310
173
|
}>>;
|
|
311
174
|
}, z.core.$strip>;
|
|
312
|
-
readonly readOnly: true;
|
|
313
|
-
readonly label: "Plan a copy";
|
|
314
|
-
readonly description: "See what copying would bring before you do it — what lands as yours, what comes along because it is pointed at, and what you already hold that the copies will point at. Takes exactly the same input as `copy` and writes nothing. Run it before `copy`, and always before a `'*'` copy.";
|
|
315
|
-
readonly scope: "item";
|
|
316
|
-
readonly title: (entity: string) => string;
|
|
317
|
-
readonly example: typeof copyExample;
|
|
318
|
-
readonly handler: (input: Record<string, unknown>, config: Config) => Omit<CopyPlan, "patches">;
|
|
319
175
|
};
|
|
320
176
|
}, {
|
|
321
177
|
/**
|
|
@@ -330,6 +186,8 @@ declare const LinkedSystem: EntityClass<z.ZodObject<{
|
|
|
330
186
|
path
|
|
331
187
|
}: ComputedInput) => string;
|
|
332
188
|
}, false, Record<never, never>, Record<never, never>>;
|
|
189
|
+
interface LinkedSystemClass extends Named<typeof LinkedSystemDefinition> {}
|
|
190
|
+
declare const LinkedSystem: LinkedSystemClass;
|
|
333
191
|
/**
|
|
334
192
|
* What a pin's `options` may say, checked against the config type it is declared in — one record per
|
|
335
193
|
* accessor, keyed by the path the source spells, valued by what this config does to it.
|
|
@@ -501,4 +359,4 @@ declare function suggestLinkSlug({
|
|
|
501
359
|
taken: ReadonlySet<string>;
|
|
502
360
|
}): string;
|
|
503
361
|
//#endregion
|
|
504
|
-
export { LINK_SLUG, LINK_SLUG_MESSAGE, LinkDeclaration, LinkedSystem, LinkedSystemResolver, LinkedSystemState, PinDirective, PinOptions, PinOptionsField, ResolvedSource, Source, SourceUnavailable, borrowedGroup, borrowedItem, isLinkSlug, resolvedSource, sourceOfGroup, sourceOfItem, sourceSlugFor, sourceUnavailable, suggestLinkSlug };
|
|
362
|
+
export { LINK_SLUG, LINK_SLUG_MESSAGE, LinkDeclaration, LinkedSystem, LinkedSystemClass, LinkedSystemResolver, LinkedSystemState, PinDirective, PinOptions, PinOptionsField, ResolvedSource, Source, SourceUnavailable, borrowedGroup, borrowedItem, isLinkSlug, resolvedSource, sourceOfGroup, sourceOfItem, sourceSlugFor, sourceUnavailable, suggestLinkSlug };
|
|
@@ -146,7 +146,10 @@ const linkInput = z.object({
|
|
|
146
146
|
path: pathInput("linked-system"),
|
|
147
147
|
/** What to draw, keyed by accessor the way the pin's `link` is, or `'*'` for everything the source
|
|
148
148
|
* offers. A path that names a folder in the source covers its members. */
|
|
149
|
-
data: z.union([z.literal("*"), z.record(z.string(), copyPaths)])
|
|
149
|
+
data: z.union([z.literal("*"), z.record(z.string(), copyPaths)]),
|
|
150
|
+
/** What to do at a path another linked system provides: `'take'` makes it follow this source,
|
|
151
|
+
* `'keep'` leaves it where it comes from. Required when there is one; `link-plan` lists them. */
|
|
152
|
+
onLinked: z.enum(["keep", "take"]).optional()
|
|
150
153
|
});
|
|
151
154
|
const unlinkInput = z.object({
|
|
152
155
|
path: pathInput("linked-system"),
|
|
@@ -173,6 +176,14 @@ function copyInputOf(input) {
|
|
|
173
176
|
...input.onConflict === void 0 ? {} : { onConflict: input.onConflict }
|
|
174
177
|
};
|
|
175
178
|
}
|
|
179
|
+
/** The parsed `link` input as the plan takes it. */
|
|
180
|
+
function linkPlanInputOf(input) {
|
|
181
|
+
return {
|
|
182
|
+
path: String(input.path),
|
|
183
|
+
data: input.data,
|
|
184
|
+
...input.onLinked === void 0 ? {} : { onLinked: input.onLinked }
|
|
185
|
+
};
|
|
186
|
+
}
|
|
176
187
|
/** A `link` or `unlink` example: one entity the source offers, under the accessor this config files it by. */
|
|
177
188
|
function linkExample({ config, path }) {
|
|
178
189
|
const target = exampleBorrowable(config, path);
|
|
@@ -243,7 +254,8 @@ const LinkedSystem = defineEntity({
|
|
|
243
254
|
* Draw entities from a linked system: the pin's `link` declaration grows to cover them and the
|
|
244
255
|
* build mints a pointer row per entity, in this one op. A row of this config's own at a covered
|
|
245
256
|
* path is deleted so theirs shows through; a row held through another pin becomes an extension
|
|
246
|
-
* through this one
|
|
257
|
+
* through this one when `onLinked` is `'take'`. `link-plan` says what that replaces before anything
|
|
258
|
+
* is written.
|
|
247
259
|
*/
|
|
248
260
|
link: {
|
|
249
261
|
input: linkInput,
|
|
@@ -255,13 +267,14 @@ const LinkedSystem = defineEntity({
|
|
|
255
267
|
title: (entity) => `Link something from ${entity}`,
|
|
256
268
|
example: linkExample,
|
|
257
269
|
handler: (input, config) => {
|
|
258
|
-
const { patches } = planLink({
|
|
270
|
+
const { linked, patches } = planLink({
|
|
259
271
|
config,
|
|
260
|
-
input:
|
|
261
|
-
path: String(input.path),
|
|
262
|
-
data: input.data
|
|
263
|
-
}
|
|
272
|
+
input: linkPlanInputOf(input)
|
|
264
273
|
});
|
|
274
|
+
if (linked.length > 0 && input.onLinked === void 0) {
|
|
275
|
+
const named = linked.map((at) => `${at.path} (from ${at.from})`);
|
|
276
|
+
rejectData(`Linking through "${String(input.path)}" reaches what another linked system provides: ${named.join(", ")}. Say whether to take them (\`onLinked: 'take'\`) or keep them where they come from (\`onLinked: 'keep'\`).`, ["onLinked"]);
|
|
277
|
+
}
|
|
265
278
|
if (patches.length === 0) return config;
|
|
266
279
|
return config.applyAll(patches).withDerivedRows();
|
|
267
280
|
}
|
|
@@ -270,17 +283,14 @@ const LinkedSystem = defineEntity({
|
|
|
270
283
|
input: linkInput,
|
|
271
284
|
readOnly: true,
|
|
272
285
|
label: "Plan a link",
|
|
273
|
-
description: "What `link` with the same input replaces — rows of yours deleted so the source shows through,
|
|
286
|
+
description: "What `link` with the same input replaces — rows of yours deleted so the source shows through, every path another linked system provides (`linked`, turned into extensions when `onLinked` says take), and members left alone because they are already here from the same origin. Writes nothing.",
|
|
274
287
|
scope: "item",
|
|
275
288
|
title: (entity) => `Plan a link from ${entity}`,
|
|
276
289
|
example: linkExample,
|
|
277
290
|
handler: (input, config) => {
|
|
278
291
|
const { patches: _patches, ...plan } = planLink({
|
|
279
292
|
config,
|
|
280
|
-
input:
|
|
281
|
-
path: String(input.path),
|
|
282
|
-
data: input.data
|
|
283
|
-
}
|
|
293
|
+
input: linkPlanInputOf(input)
|
|
284
294
|
});
|
|
285
295
|
return plan;
|
|
286
296
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SubEntityClass } from "../../framework/defineSubEntity.js";
|
|
2
1
|
import { EntityClass } from "../../framework/defineEntity.js";
|
|
2
|
+
import { Named } from "../../framework/named.js";
|
|
3
3
|
import { Config } from "../../framework/Config.js";
|
|
4
|
-
import {
|
|
4
|
+
import { CompositeClass } from "./Composite.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/entities/system/Modifier.d.ts
|
|
@@ -38,15 +38,13 @@ type ModifierGroupMeta = z.infer<typeof modifierGroupFields> & {
|
|
|
38
38
|
label?: string;
|
|
39
39
|
description?: string;
|
|
40
40
|
};
|
|
41
|
-
declare const
|
|
41
|
+
declare const ModifierDefinition: EntityClass<z.ZodObject<{
|
|
42
42
|
type: z.ZodEnum<{
|
|
43
43
|
composite: "composite";
|
|
44
44
|
selector: "selector";
|
|
45
45
|
"media-query": "media-query";
|
|
46
46
|
}>;
|
|
47
|
-
value: z.ZodUnion<readonly [z.ZodString, z.ZodLazy<
|
|
48
|
-
styles: SubEntityClass<z.ZodType<StyleValue, unknown, z.core.$ZodTypeInternals<StyleValue, unknown>>>;
|
|
49
|
-
}, z.core.$strip>, z.ZodObject<Record<never, never>, z.core.$strip>, "composite", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>>]>;
|
|
47
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodLazy<CompositeClass>]>;
|
|
50
48
|
}, z.core.$strip>, z.ZodObject<{
|
|
51
49
|
type: z.ZodOptional<z.ZodEnum<{
|
|
52
50
|
mode: "mode";
|
|
@@ -55,7 +53,9 @@ declare const Modifier: EntityClass<z.ZodObject<{
|
|
|
55
53
|
default: z.ZodOptional<z.ZodObject<{
|
|
56
54
|
__ref: z.ZodString;
|
|
57
55
|
}, z.core.$strip>>;
|
|
58
|
-
}, z.core.$strip>, "modifier",
|
|
56
|
+
}, z.core.$strip>, "modifier", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
|
|
57
|
+
interface ModifierClass extends Named<typeof ModifierDefinition> {}
|
|
58
|
+
declare const Modifier: ModifierClass;
|
|
59
59
|
/** A path's last segment. */
|
|
60
60
|
declare function modifierLeaf(path: string): string;
|
|
61
61
|
/**
|
|
@@ -89,4 +89,4 @@ declare function modeAxes(config: Config): {
|
|
|
89
89
|
*/
|
|
90
90
|
declare function modifierInvariants(config: Config): string[];
|
|
91
91
|
//#endregion
|
|
92
|
-
export { MODIFIER_CATEGORIES, Modifier, ModifierCategory, ModifierGroupMeta, WEB_ACTIVATIONS, WebActivation, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf };
|
|
92
|
+
export { MODIFIER_CATEGORIES, Modifier, ModifierCategory, ModifierClass, ModifierGroupMeta, WEB_ACTIVATIONS, WebActivation, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { EntityClass } from "../../framework/defineEntity.js";
|
|
2
|
+
import { Named } from "../../framework/named.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
|
|
4
5
|
//#region src/entities/system/Motion.d.ts
|
|
5
|
-
declare const
|
|
6
|
+
declare const MotionDefinition: EntityClass<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
7
|
runtime: z.ZodLiteral<"css">;
|
|
7
8
|
keyframes: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
8
9
|
duration: z.ZodOptional<z.ZodString>;
|
|
@@ -23,6 +24,8 @@ declare const Motion: EntityClass<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
23
24
|
drag: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
24
25
|
dragConstraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
25
26
|
dragElastic: z.ZodOptional<z.ZodNumber>;
|
|
26
|
-
}, z.core.$strict>], "runtime">, z.ZodObject<Record<never, never>, z.core.$strip>, "motion",
|
|
27
|
+
}, z.core.$strict>], "runtime">, z.ZodObject<Record<never, never>, z.core.$strip>, "motion", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
|
|
28
|
+
interface MotionClass extends Named<typeof MotionDefinition> {}
|
|
29
|
+
declare const Motion: MotionClass;
|
|
27
30
|
//#endregion
|
|
28
|
-
export { Motion };
|
|
31
|
+
export { Motion, MotionClass };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ComputedInput } from "../../framework/registry.js";
|
|
2
2
|
import { DerivedEntityClass } from "../../framework/defineDerivedEntity.js";
|
|
3
|
+
import { Named } from "../../framework/named.js";
|
|
3
4
|
import { Config } from "../../framework/Config.js";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
|
|
6
7
|
//#region src/entities/system/Operation.d.ts
|
|
7
|
-
declare const
|
|
8
|
+
declare const OperationDefinition: DerivedEntityClass<z.ZodObject<{
|
|
8
9
|
kind: z.ZodString;
|
|
9
10
|
verb: z.ZodString;
|
|
10
11
|
readOnly: z.ZodBoolean;
|
|
@@ -96,5 +97,7 @@ declare const Operation: DerivedEntityClass<z.ZodObject<{
|
|
|
96
97
|
};
|
|
97
98
|
}) => Record<string, unknown> | undefined;
|
|
98
99
|
}>;
|
|
100
|
+
interface OperationClass extends Named<typeof OperationDefinition> {}
|
|
101
|
+
declare const Operation: OperationClass;
|
|
99
102
|
//#endregion
|
|
100
|
-
export { Operation };
|
|
103
|
+
export { Operation, OperationClass };
|
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
import { SubEntityClass } from "../../framework/defineSubEntity.js";
|
|
2
2
|
import { EntityClass } from "../../framework/defineEntity.js";
|
|
3
|
+
import { Named } from "../../framework/named.js";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
|
|
5
6
|
//#region src/entities/system/Package.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* One export a system renders through — `package:react-native#Pressable`.
|
|
9
|
+
*
|
|
10
|
+
* A member rather than an entity of its own, because a `/` cannot separate the module from the export
|
|
11
|
+
* and nothing else can either. `react-native/Pressable` reads as a module and an export only by the
|
|
12
|
+
* CONVENTION that the last segment is the export, and that convention has cases it gets wrong:
|
|
13
|
+
* `motion/react` is a module (`import { motion } from 'motion/react'`) but parses as `motion` plus an
|
|
14
|
+
* export called `react`, and `@phosphor-icons/core` — a catalogue named by an icon library's
|
|
15
|
+
* `metadata` and imported by nobody — parsed as a `core` export of `@phosphor-icons`. The grammar
|
|
16
|
+
* already has the separator that says which is which, so it is used.
|
|
17
|
+
*
|
|
18
|
+
* A member's fields are empty because its identity IS its name: there is nothing else this system
|
|
19
|
+
* knows to be true about somebody else's export. `default` for a default import, `Animated.View` for
|
|
20
|
+
* a dotted one — the name as the TARGET spells it, which is what an emitted import has to write.
|
|
21
|
+
*/
|
|
22
|
+
declare const PackageExportDefinition: SubEntityClass<z.ZodObject<{}, z.core.$strict>>;
|
|
23
|
+
interface PackageExportClass extends Named<typeof PackageExportDefinition> {}
|
|
6
24
|
/**
|
|
7
25
|
* Package (`react-native`, `@ariakit/react`, `motion/react`) — one MODULE a system renders through.
|
|
8
26
|
*
|
|
@@ -34,9 +52,11 @@ import { z } from "zod";
|
|
|
34
52
|
* and build collection updates rather than replaces it, so that metadata survives. What authoring
|
|
35
53
|
* cannot do is choose the path.
|
|
36
54
|
*/
|
|
37
|
-
declare const
|
|
55
|
+
declare const PackageDefinition: EntityClass<z.ZodObject<{
|
|
38
56
|
version: z.ZodOptional<z.ZodString>;
|
|
39
|
-
exports: z.ZodOptional<
|
|
40
|
-
}, z.core.$strict>, z.ZodObject<Record<never, never>, z.core.$strip>, "package",
|
|
57
|
+
exports: z.ZodOptional<PackageExportClass>;
|
|
58
|
+
}, z.core.$strict>, z.ZodObject<Record<never, never>, z.core.$strip>, "package", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
|
|
59
|
+
interface PackageClass extends Named<typeof PackageDefinition> {}
|
|
60
|
+
declare const Package: PackageClass;
|
|
41
61
|
//#endregion
|
|
42
|
-
export { Package };
|
|
62
|
+
export { Package, PackageClass };
|
|
@@ -2,58 +2,12 @@ import { defineEntity } from "../../framework/defineEntity.js";
|
|
|
2
2
|
import { defineSubEntity } from "../../framework/defineSubEntity.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/entities/system/Package.ts
|
|
5
|
-
/**
|
|
6
|
-
* One export a system renders through — `package:react-native#Pressable`.
|
|
7
|
-
*
|
|
8
|
-
* A member rather than an entity of its own, because a `/` cannot separate the module from the export
|
|
9
|
-
* and nothing else can either. `react-native/Pressable` reads as a module and an export only by the
|
|
10
|
-
* CONVENTION that the last segment is the export, and that convention has cases it gets wrong:
|
|
11
|
-
* `motion/react` is a module (`import { motion } from 'motion/react'`) but parses as `motion` plus an
|
|
12
|
-
* export called `react`, and `@phosphor-icons/core` — a catalogue named by an icon library's
|
|
13
|
-
* `metadata` and imported by nobody — parsed as a `core` export of `@phosphor-icons`. The grammar
|
|
14
|
-
* already has the separator that says which is which, so it is used.
|
|
15
|
-
*
|
|
16
|
-
* A member's fields are empty because its identity IS its name: there is nothing else this system
|
|
17
|
-
* knows to be true about somebody else's export. `default` for a default import, `Animated.View` for
|
|
18
|
-
* a dotted one — the name as the TARGET spells it, which is what an emitted import has to write.
|
|
19
|
-
*/
|
|
20
5
|
const PackageExport = defineSubEntity({
|
|
21
6
|
name: "exports",
|
|
22
7
|
label: "Export",
|
|
23
8
|
labelPlural: "Exports",
|
|
24
9
|
fields: z.strictObject({})
|
|
25
10
|
});
|
|
26
|
-
/**
|
|
27
|
-
* Package (`react-native`, `@ariakit/react`, `motion/react`) — one MODULE a system renders through.
|
|
28
|
-
*
|
|
29
|
-
* **The path IS the specifier**, verbatim, subpath and all — the same choice `File` makes for its src.
|
|
30
|
-
* So there is no `module` field: a second copy of the path could disagree with it, which is the
|
|
31
|
-
* reason a `File` computes its `binary` rather than storing one.
|
|
32
|
-
*
|
|
33
|
-
* Verbatim matters because the stored form has to regenerate the import an author wrote. `motion` and
|
|
34
|
-
* `motion/react` are ONE npm package and TWO modules; emitting `from 'motion'` for a source that
|
|
35
|
-
* wrote `from 'motion/react'` names a different entry point that resolves to a different file. That
|
|
36
|
-
* the two are one thing to INSTALL is a separate question, and the seal is the only place it is asked
|
|
37
|
-
* — `packageName` collapses them there.
|
|
38
|
-
*
|
|
39
|
-
* A key derived from the module — a slug like `ariakit` — is what this replaced. The slug was
|
|
40
|
-
* resolved over the whole import SET so two specifiers sharing a scope could both qualify away from
|
|
41
|
-
* it, which made a key depend on what else happened to be imported: `@phosphor-icons/core` arriving
|
|
42
|
-
* beside `@phosphor-icons/react` renamed the latter and stranded every ref that named it. npm has
|
|
43
|
-
* already made a module name unique; nothing here has to.
|
|
44
|
-
*
|
|
45
|
-
* The same shape `Icon` uses for a glyph library, with one difference in where membership comes from.
|
|
46
|
-
* An icon group lists every glyph the package exports, because a person picks one from a picker and
|
|
47
|
-
* all of them are candidates. A package's exports are only what a render actually placed in JSX,
|
|
48
|
-
* because nobody browses a component library's exports; the build registers them from JSX usage. The
|
|
49
|
-
* MODULE set is broader: it records every external module the render closure needs, which is what
|
|
50
|
-
* makes the portable config the source of truth for consumer install requirements.
|
|
51
|
-
*
|
|
52
|
-
* Ordinary component authoring does not maintain this graph: the build derives modules and exports
|
|
53
|
-
* from the source it walked. A human may still author one — to carry a label, or to pin a `version` —
|
|
54
|
-
* and build collection updates rather than replaces it, so that metadata survives. What authoring
|
|
55
|
-
* cannot do is choose the path.
|
|
56
|
-
*/
|
|
57
11
|
const Package = defineEntity({
|
|
58
12
|
kind: "package",
|
|
59
13
|
label: "Package",
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import { SubEntityClass } from "../../framework/defineSubEntity.js";
|
|
2
2
|
import { ComputedInput } from "../../framework/registry.js";
|
|
3
3
|
import { EntityClass } from "../../framework/defineEntity.js";
|
|
4
|
+
import { Named } from "../../framework/named.js";
|
|
4
5
|
import { Config } from "../../framework/Config.js";
|
|
5
6
|
import { z } from "zod";
|
|
6
7
|
|
|
7
8
|
//#region src/entities/system/Settings.d.ts
|
|
8
9
|
/** The `system` section — what this config is in Create. */
|
|
9
|
-
declare const
|
|
10
|
+
declare const SystemSectionDefinition: SubEntityClass<z.ZodObject<{
|
|
10
11
|
id: z.ZodOptional<z.ZodString>;
|
|
11
12
|
}, z.core.$strict>>;
|
|
13
|
+
interface SystemSectionClass extends Named<typeof SystemSectionDefinition> {}
|
|
14
|
+
declare const SystemSection: SystemSectionClass;
|
|
12
15
|
/** The `build` section — where a repo keeps this system's sources, where `uds build` writes, and
|
|
13
16
|
* where linked systems are materialised. */
|
|
14
|
-
declare const
|
|
17
|
+
declare const BuildSectionDefinition: SubEntityClass<z.ZodObject<{
|
|
15
18
|
inputDir: z.ZodOptional<z.ZodString>;
|
|
16
19
|
outDir: z.ZodOptional<z.ZodString>;
|
|
17
20
|
registryDir: z.ZodOptional<z.ZodString>;
|
|
18
21
|
}, z.core.$strict>>;
|
|
22
|
+
interface BuildSectionClass extends Named<typeof BuildSectionDefinition> {}
|
|
23
|
+
declare const BuildSection: BuildSectionClass;
|
|
19
24
|
/**
|
|
20
25
|
* One prefix for both namespaces, or one each. A string names classes and variables alike; the object
|
|
21
26
|
* names them apart, for a host page that already owns one of the two. Either form may be `''`, which
|
|
@@ -34,7 +39,7 @@ declare const CSS_DEFAULTS: {
|
|
|
34
39
|
};
|
|
35
40
|
/** The `css` section — how a web system names what it emits and where its stylesheet applies. A
|
|
36
41
|
* native system declares no such section, so a native config setting one is refused. */
|
|
37
|
-
declare const
|
|
42
|
+
declare const CssSectionDefinition: SubEntityClass<z.ZodObject<{
|
|
38
43
|
prefix: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
39
44
|
classNames: z.ZodString;
|
|
40
45
|
variables: z.ZodString;
|
|
@@ -44,6 +49,8 @@ declare const CssSection: SubEntityClass<z.ZodObject<{
|
|
|
44
49
|
rem: z.ZodOptional<z.ZodString>;
|
|
45
50
|
safelist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
46
51
|
}, z.core.$strict>>;
|
|
52
|
+
interface CssSectionClass extends Named<typeof CssSectionDefinition> {}
|
|
53
|
+
declare const CssSection: CssSectionClass;
|
|
47
54
|
/** The two namespaces a prefix names, whichever form it was written in, defaulted when unset. */
|
|
48
55
|
declare function cssPrefixes(value: CssPrefix | undefined): {
|
|
49
56
|
classNames: string;
|
|
@@ -66,11 +73,13 @@ declare const PLAYGROUND_DEFAULTS: {
|
|
|
66
73
|
readonly port: 4321;
|
|
67
74
|
};
|
|
68
75
|
/** The `playground` section — dev-server settings for `uds dev --playground`. */
|
|
69
|
-
declare const
|
|
76
|
+
declare const PlaygroundSectionDefinition: SubEntityClass<z.ZodObject<{
|
|
70
77
|
pagesDir: z.ZodOptional<z.ZodString>;
|
|
71
78
|
port: z.ZodOptional<z.ZodNumber>;
|
|
72
79
|
}, z.core.$strict>>;
|
|
73
|
-
|
|
80
|
+
interface PlaygroundSectionClass extends Named<typeof PlaygroundSectionDefinition> {}
|
|
81
|
+
declare const PlaygroundSection: PlaygroundSectionClass;
|
|
82
|
+
declare const SettingsDefinition: EntityClass<z.ZodObject<{
|
|
74
83
|
system: z.ZodOptional<z.ZodObject<{
|
|
75
84
|
id: z.ZodOptional<z.ZodString>;
|
|
76
85
|
}, z.core.$strict>>;
|
|
@@ -93,7 +102,7 @@ declare const Settings: EntityClass<z.ZodObject<{
|
|
|
93
102
|
pagesDir: z.ZodOptional<z.ZodString>;
|
|
94
103
|
port: z.ZodOptional<z.ZodNumber>;
|
|
95
104
|
}, z.core.$strict>>;
|
|
96
|
-
}, z.core.$strict>, z.ZodObject<Record<never, never>, z.core.$strip>, "settings",
|
|
105
|
+
}, z.core.$strict>, z.ZodObject<Record<never, never>, z.core.$strip>, "settings", {}, {
|
|
97
106
|
/**
|
|
98
107
|
* The directory this system's component files are laid out beneath, always defined:
|
|
99
108
|
* `build.inputDir` when authored, else derived from where the files live. Every reader of the
|
|
@@ -104,5 +113,7 @@ declare const Settings: EntityClass<z.ZodObject<{
|
|
|
104
113
|
config
|
|
105
114
|
}: ComputedInput) => string;
|
|
106
115
|
}, true, Record<never, never>, Record<never, never>>;
|
|
116
|
+
interface SettingsClass extends Named<typeof SettingsDefinition> {}
|
|
117
|
+
declare const Settings: SettingsClass;
|
|
107
118
|
//#endregion
|
|
108
|
-
export { BuildSection, CSS_DEFAULTS, CssPrefix, CssSection, PLAYGROUND_DEFAULTS, PlaygroundSection, Settings, SystemSection, classPrefixOf, cssPrefixes, varPrefixOf };
|
|
119
|
+
export { BuildSection, BuildSectionClass, CSS_DEFAULTS, CssPrefix, CssSection, CssSectionClass, PLAYGROUND_DEFAULTS, PlaygroundSection, PlaygroundSectionClass, Settings, SettingsClass, SystemSection, SystemSectionClass, classPrefixOf, cssPrefixes, varPrefixOf };
|
|
@@ -38,15 +38,12 @@ id: z.string().uuid().meta({
|
|
|
38
38
|
title: "System ID",
|
|
39
39
|
description: "This system's id in Create. The default target for `uds push` and remote agent edits, and what lets a build refuse a link back to itself. `uds connect` records the repo binding on the server; this is the copy the repo carries."
|
|
40
40
|
}).optional() });
|
|
41
|
-
/** The `system` section — what this config is in Create. */
|
|
42
41
|
const SystemSection = defineSubEntity({
|
|
43
42
|
name: "system",
|
|
44
43
|
label: "System",
|
|
45
44
|
singleton: true,
|
|
46
45
|
fields: systemFields
|
|
47
46
|
});
|
|
48
|
-
/** The `build` section — where a repo keeps this system's sources, where `uds build` writes, and
|
|
49
|
-
* where linked systems are materialised. */
|
|
50
47
|
const BuildSection = defineSubEntity({
|
|
51
48
|
name: "build",
|
|
52
49
|
label: "Build",
|
|
@@ -102,8 +99,6 @@ const cssFields = z.strictObject({
|
|
|
102
99
|
description: "Classes the stylesheet always keeps, whether or not a scanned file names them, as in `uds-bg-brand`. For a class assembled at runtime, or one used by a file the build does not scan."
|
|
103
100
|
}).optional()
|
|
104
101
|
});
|
|
105
|
-
/** The `css` section — how a web system names what it emits and where its stylesheet applies. A
|
|
106
|
-
* native system declares no such section, so a native config setting one is refused. */
|
|
107
102
|
const CssSection = defineSubEntity({
|
|
108
103
|
name: "css",
|
|
109
104
|
label: "CSS",
|
|
@@ -149,7 +144,6 @@ const playgroundFields = z.strictObject({
|
|
|
149
144
|
default: PLAYGROUND_DEFAULTS.port
|
|
150
145
|
}).optional()
|
|
151
146
|
});
|
|
152
|
-
/** The `playground` section — dev-server settings for `uds dev --playground`. */
|
|
153
147
|
const PlaygroundSection = defineSubEntity({
|
|
154
148
|
name: "playground",
|
|
155
149
|
label: "Playground",
|