@yahoo/uds-create-config 4.57.1 → 4.58.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/react-native-system.d.ts +1 -1
- package/dist/configs/system.d.ts +2 -2
- package/dist/configs/system.js +2 -0
- package/dist/entities/system/GlobalStyle.d.ts +2 -0
- package/dist/entities/system/GlobalStyle.js +10 -1
- package/dist/entities/system/Modifier.d.ts +1 -1
- package/dist/entities/system/Token.js +1 -1
- package/dist/entities/system/modifier-axis.d.ts +1 -1
- package/dist/framework/Config.d.ts +1 -1
- package/dist/framework/Config.js +1 -1
- package/dist/framework/projections.d.ts +7 -3
- package/dist/framework/projections.js +10 -3
- package/dist/framework/schema-version.d.ts +1 -1
- package/dist/framework/schema-version.js +5 -5
- package/dist/framework/source-integrity.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/migrations/2.0.0/v1-artifact.d.ts +2 -2
- package/dist/migrations/20261005212405_global_style_on.d.ts +11 -0
- package/dist/migrations/20261005212405_global_style_on.js +10 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -7,6 +7,7 @@ import { EntityClass } from "../framework/defineEntity.js";
|
|
|
7
7
|
import { ConfigClass } from "../framework/defineConfig.js";
|
|
8
8
|
import { Named } from "../framework/named.js";
|
|
9
9
|
import { PackageClass } from "../entities/system/Package.js";
|
|
10
|
+
import { CompositeClass } from "../entities/system/Composite.js";
|
|
10
11
|
import { OverrideCondition } from "../entities/system/Token.js";
|
|
11
12
|
import { StylePropValue } from "../entities/system/StyleProperty.js";
|
|
12
13
|
import { ComponentClass } from "../entities/system/Component.js";
|
|
@@ -14,7 +15,6 @@ import { LinkedSystemClass } from "../entities/system/LinkedSystem.js";
|
|
|
14
15
|
import { IconClass } from "../entities/system/Icon.js";
|
|
15
16
|
import { NativeModifierClass } from "../entities/native/NativeModifier.js";
|
|
16
17
|
import { CanvasRoleClass } from "../entities/system/CanvasRole.js";
|
|
17
|
-
import { CompositeClass } from "../entities/system/Composite.js";
|
|
18
18
|
import { DeviceClass } from "../entities/system/Device.js";
|
|
19
19
|
import { FileClass } from "../entities/system/File.js";
|
|
20
20
|
import { FontClass } from "../entities/system/Font.js";
|
package/dist/configs/system.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { ConfigClass } from "../framework/defineConfig.js";
|
|
2
2
|
import { Named } from "../framework/named.js";
|
|
3
3
|
import { PackageClass } from "../entities/system/Package.js";
|
|
4
|
+
import { CompositeClass } from "../entities/system/Composite.js";
|
|
5
|
+
import { ModifierClass } from "../entities/system/Modifier.js";
|
|
4
6
|
import { TokenClass } from "../entities/system/Token.js";
|
|
5
7
|
import { StylePropertyClass } from "../entities/system/StyleProperty.js";
|
|
6
8
|
import { ComponentClass } from "../entities/system/Component.js";
|
|
7
9
|
import { LinkedSystemClass } from "../entities/system/LinkedSystem.js";
|
|
8
10
|
import { IconClass } from "../entities/system/Icon.js";
|
|
9
11
|
import { CanvasRoleClass } from "../entities/system/CanvasRole.js";
|
|
10
|
-
import { CompositeClass } from "../entities/system/Composite.js";
|
|
11
12
|
import { DeviceClass } from "../entities/system/Device.js";
|
|
12
13
|
import { FileClass } from "../entities/system/File.js";
|
|
13
14
|
import { FontClass } from "../entities/system/Font.js";
|
|
14
15
|
import { GlobalStyleClass } from "../entities/system/GlobalStyle.js";
|
|
15
16
|
import { GuidanceClass } from "../entities/system/Guidance.js";
|
|
16
17
|
import { GuidanceStyleClass } from "../entities/system/GuidanceStyle.js";
|
|
17
|
-
import { ModifierClass } from "../entities/system/Modifier.js";
|
|
18
18
|
import { MotionClass } from "../entities/system/Motion.js";
|
|
19
19
|
import { OperationClass } from "../entities/system/Operation.js";
|
|
20
20
|
import { SettingsClass } from "../entities/system/Settings.js";
|
package/dist/configs/system.js
CHANGED
|
@@ -54,6 +54,7 @@ import { styleRulesAsListMigration } from "../migrations/20261001112308_style_ru
|
|
|
54
54
|
import { motionExitAndElementDuplicateMigration } from "../migrations/20261001130958_motion_exit_and_element_duplicate.js";
|
|
55
55
|
import { layerStyleAndForwardOpsMigration } from "../migrations/20261001131000_layer_style_and_forward_ops.js";
|
|
56
56
|
import { oklchAndEmitFieldsMigration } from "../migrations/20261001162046_oklch_and_emit_fields.js";
|
|
57
|
+
import { globalStyleOnMigration } from "../migrations/20261005212405_global_style_on.js";
|
|
57
58
|
const System = defineConfig({
|
|
58
59
|
name: WEB_CONFIG_NAME,
|
|
59
60
|
description: "A design system: the values, primitives and compositions an app is built from. A ref is written `{ \"__ref\": \"<kind>:<path>\" }`, so a token is `{ \"__ref\": \"token:<group>/<name>\" }` and a token group is `{ \"__ref\": \"token:<group>\" }`. Build it in this order. Tokens first, in groups by purpose (colors, spacing, radii, type sizes), since everything else names them. Then style properties, each with `values` holding one ref to the token group whose members it accepts (`{ \"__ref\": \"token:color\" }`), so a prop takes token names rather than raw CSS; add a string keyword only for a value no token holds. A style rule's bag holds a prop's values (`\"padding\": \"4\"`, `\"bg\": \"brand\"`), never raw CSS. Then a few primitive components, one layer each, whose props are style properties (a box for layout and surface, a text for type, a pressable for interaction). Then every other component composed from those primitives: its layers name a primitive or an element, its anatomy places them (a node renders a layer, a tag or `Slot` where a slot prop's content lands; `children` is the edge list; `visible` is `{ \"$state\": \"<prop>\" }`; a prop shown in a nested layer is a `forward` route, and `$state` never sits in a node's props), and its style rules set style-property values per layer, keyed by prop values when a variant changes them. Modes (a dark mode is `{ type: \"selector\", value: \".dark\" }`) change token values through a token's `overrides`, so a component never restyles for a mode; modifiers (hover, focus, disabled) name a state, and a style rule applies under one as a `_hover` block inside a layer bag. Composites bundle style values that recur. Last, register canvas roles: the canvas draws with them, one entity per tool (`frame` for the layout primitive, `text` for the text primitive, `image`) whose entries name the components that tool inserts, and a tool whose role is unregistered is disabled. Give each component a `preview` entry under `*` so it shows content, and never write a CSS property name where a style-property name belongs.",
|
|
@@ -119,5 +120,6 @@ if (!registeredSchemaMigrations().has(20261001112308)) registerSchemaMigrations(
|
|
|
119
120
|
if (!registeredSchemaMigrations().has(20261001130958)) registerSchemaMigrations(motionExitAndElementDuplicateMigration);
|
|
120
121
|
if (!registeredSchemaMigrations().has(20261001131e3)) registerSchemaMigrations(layerStyleAndForwardOpsMigration);
|
|
121
122
|
if (!registeredSchemaMigrations().has(20261001162046)) registerSchemaMigrations(oklchAndEmitFieldsMigration);
|
|
123
|
+
if (!registeredSchemaMigrations().has(20261005212405)) registerSchemaMigrations(globalStyleOnMigration);
|
|
122
124
|
//#endregion
|
|
123
125
|
export { System };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DerivedColor, OklchColor } from "./color.js";
|
|
2
2
|
import { EntityClass } from "../../framework/defineEntity.js";
|
|
3
3
|
import { Named } from "../../framework/named.js";
|
|
4
|
+
import { ModifierClass } from "./Modifier.js";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
|
|
6
7
|
//#region src/entities/system/GlobalStyle.d.ts
|
|
@@ -17,6 +18,7 @@ declare const GlobalStyleDefinition: EntityClass<z.ZodObject<{
|
|
|
17
18
|
selector: z.ZodString;
|
|
18
19
|
declarations: z.ZodRecord<z.ZodString, z.ZodType<Declared, unknown, z.core.$ZodTypeInternals<Declared, unknown>>>;
|
|
19
20
|
important: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
on: z.ZodOptional<z.ZodUnion<readonly [ModifierClass, z.ZodArray<ModifierClass>]>>;
|
|
20
22
|
}, z.core.$strict>, z.ZodObject<Record<never, never>, z.core.$strip>, "global-style", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
|
|
21
23
|
interface GlobalStyleClass extends Named<typeof GlobalStyleDefinition> {}
|
|
22
24
|
declare const GlobalStyle: GlobalStyleClass;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { refSchema } from "../../framework/utils/refs.js";
|
|
2
2
|
import { derivedColor, oklchColor } from "./color.js";
|
|
3
3
|
import { defineEntity } from "../../framework/defineEntity.js";
|
|
4
|
+
import { overrideConditionSchema } from "./Token.js";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
//#region src/entities/system/GlobalStyle.ts
|
|
6
7
|
/**
|
|
@@ -41,7 +42,15 @@ const GlobalStyle = defineEntity({
|
|
|
41
42
|
* layered and a third party's stylesheet (React Flow, CodeMirror's injected theme) is not, so a
|
|
42
43
|
* rule meant to beat one has to say so; the flag lets it while its values stay refs.
|
|
43
44
|
*/
|
|
44
|
-
important: z.boolean().optional().describe("Emit every declaration `!important`, to beat a third party's unlayered stylesheet.")
|
|
45
|
+
important: z.boolean().optional().describe("Emit every declaration `!important`, to beat a third party's unlayered stylesheet."),
|
|
46
|
+
/**
|
|
47
|
+
* The modifier the rule applies under, or several that all hold at once — the same shape as a
|
|
48
|
+
* token override's `on`. The rule is written through each modifier's own activation, as a
|
|
49
|
+
* component rule is: a state composes onto the selector, a selector mode stands before it as its
|
|
50
|
+
* ancestor (`:root` takes the mode's selector itself), and a media query wraps it. A ref, so
|
|
51
|
+
* renaming the modifier cascades into the rule instead of leaving a hand-copied `.dark` behind.
|
|
52
|
+
*/
|
|
53
|
+
on: overrideConditionSchema.optional().describe("The modifier the rule applies under, or a list that all hold at once: `{ \"__ref\": \"modifier:colorMode/dark\" }`. A state composes onto the selector, a selector mode is its ancestor (`:root` takes the mode itself), a media query wraps the rule. Rules inside `@media` or `@supports` take it too; `@keyframes` and `@font-face` are written as they are.")
|
|
45
54
|
})
|
|
46
55
|
});
|
|
47
56
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EntityClass } from "../../framework/defineEntity.js";
|
|
2
2
|
import { Named } from "../../framework/named.js";
|
|
3
|
-
import { Config } from "../../framework/Config.js";
|
|
4
3
|
import { CompositeClass } from "./Composite.js";
|
|
5
4
|
import { modifierAxis, modifierCategory } from "./modifier-axis.js";
|
|
5
|
+
import { Config } from "../../framework/Config.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
//#region src/entities/system/Modifier.d.ts
|
|
@@ -168,4 +168,4 @@ function tokenRef(path) {
|
|
|
168
168
|
}
|
|
169
169
|
const Token = Object.assign(TokenEntity, { ref: tokenRef });
|
|
170
170
|
//#endregion
|
|
171
|
-
export { Token, defineOverride, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers };
|
|
171
|
+
export { Token, defineOverride, overrideCondition, overrideConditionSchema, overrideKey, overrideKeyModifiers, overrideModifiers };
|
|
@@ -72,7 +72,7 @@ interface RecordedSource {
|
|
|
72
72
|
* The dense-counter `2` a short-lived scheme stamped before the chain existed reads as the mint
|
|
73
73
|
* that replaced it (see `detectedWireVersion`).
|
|
74
74
|
*/
|
|
75
|
-
declare const SERIALIZED_CONFIG_VERSION =
|
|
75
|
+
declare const SERIALIZED_CONFIG_VERSION = 20261005212405;
|
|
76
76
|
interface SerializedConfig {
|
|
77
77
|
/** See {@link SERIALIZED_CONFIG_VERSION}. Always written; a stored artifact may lack it. */
|
|
78
78
|
readonly version: number;
|
package/dist/framework/Config.js
CHANGED
|
@@ -5314,7 +5314,7 @@ var Config = class Config {
|
|
|
5314
5314
|
* links from the provided sources. A declared `linkedKind` with no provided source throws. */
|
|
5315
5315
|
hydrateFrom(stored, options) {
|
|
5316
5316
|
const claimed = schemaVersionOf(stored);
|
|
5317
|
-
if (claimed >
|
|
5317
|
+
if (claimed > 20261005212405) throw new SchemaVersionTooNew(claimed);
|
|
5318
5318
|
const wire = upgradeSerializedConfig(stored);
|
|
5319
5319
|
if (!Array.isArray(wire.ownedKinds) || typeof wire.items !== "object" || wire.items === null) throw new ConfigFormatError(`Config "${stored.name ?? "system-config"}" cannot be hydrated: this is not a serialized config-v2 config (no "ownedKinds"/"items"). A pre-cutover build artifact converts through the registered cutover migration — import the config type's module (e.g. \`configs/system\`) before hydrating, or port the repo once with \`uds migrate\`.`);
|
|
5320
5320
|
const leftover = wire.options;
|
|
@@ -27,9 +27,13 @@ type VarNaming = string | ((tokenPath: string) => string);
|
|
|
27
27
|
* The name each of a linked system's tokens has in `config`'s stylesheet.
|
|
28
28
|
*
|
|
29
29
|
* A token this config holds as a row of its own pointing at theirs is this config's: it's declared
|
|
30
|
-
* once, under the name of that row, and everything drawn from the source names that row too.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* once, under the name of that row, and everything drawn from the source names that row too. A token
|
|
31
|
+
* whose source named its variable exactly (`cssVariable: '--spring-x'`) keeps that name, since the
|
|
32
|
+
* promise of an exact name is that it is the name wherever the token is declared, and the reason it
|
|
33
|
+
* was chosen is usually that something outside the system reads it. Every other token a ref reaches
|
|
34
|
+
* is declared under the pin's namespace ({@link sourceVarPrefix}), since this config has no name of
|
|
35
|
+
* its own for it. A relative own name (`cssVariable: 'spacing'`) is placed under a prefix, and the
|
|
36
|
+
* pin's is the one that keeps it apart from ours.
|
|
33
37
|
*/
|
|
34
38
|
declare function linkedVarNaming(config: Config, slug: string): (tokenPath: string) => string;
|
|
35
39
|
/**
|
|
@@ -63,9 +63,13 @@ const sourceVarPrefix = (config, slug) => prefixed({
|
|
|
63
63
|
* The name each of a linked system's tokens has in `config`'s stylesheet.
|
|
64
64
|
*
|
|
65
65
|
* A token this config holds as a row of its own pointing at theirs is this config's: it's declared
|
|
66
|
-
* once, under the name of that row, and everything drawn from the source names that row too.
|
|
67
|
-
*
|
|
68
|
-
*
|
|
66
|
+
* once, under the name of that row, and everything drawn from the source names that row too. A token
|
|
67
|
+
* whose source named its variable exactly (`cssVariable: '--spring-x'`) keeps that name, since the
|
|
68
|
+
* promise of an exact name is that it is the name wherever the token is declared, and the reason it
|
|
69
|
+
* was chosen is usually that something outside the system reads it. Every other token a ref reaches
|
|
70
|
+
* is declared under the pin's namespace ({@link sourceVarPrefix}), since this config has no name of
|
|
71
|
+
* its own for it. A relative own name (`cssVariable: 'spacing'`) is placed under a prefix, and the
|
|
72
|
+
* pin's is the one that keeps it apart from ours.
|
|
69
73
|
*/
|
|
70
74
|
function linkedVarNaming(config, slug) {
|
|
71
75
|
const held = heldLinked({
|
|
@@ -74,6 +78,7 @@ function linkedVarNaming(config, slug) {
|
|
|
74
78
|
kind: "token"
|
|
75
79
|
});
|
|
76
80
|
const pinned = sourceVarPrefix(config, slug);
|
|
81
|
+
const source = config.sourceFor(slug);
|
|
77
82
|
return (tokenPath) => {
|
|
78
83
|
const local = held.get(tokenPath);
|
|
79
84
|
if (local !== void 0) return cssVar(config, "token", local);
|
|
@@ -82,6 +87,8 @@ function linkedVarNaming(config, slug) {
|
|
|
82
87
|
kind: "token",
|
|
83
88
|
path: tokenPath
|
|
84
89
|
})) return cssVar(config, "token", tokenPath);
|
|
90
|
+
const own = ownCssVariable(source, tokenPath);
|
|
91
|
+
if (typeof own === "string" && own.startsWith("--")) return own;
|
|
85
92
|
return cssVar(config, "token", tokenPath, pinned);
|
|
86
93
|
};
|
|
87
94
|
}
|
|
@@ -15,7 +15,7 @@ import { Patch, SerializedConfig } from "./Config.js";
|
|
|
15
15
|
* sets this constant to its own older timestamp; the merge ref then carries a registered migration
|
|
16
16
|
* newer than the constant, and the assertion fails until the author re-mints.
|
|
17
17
|
*/
|
|
18
|
-
declare const CURRENT_SCHEMA_VERSION =
|
|
18
|
+
declare const CURRENT_SCHEMA_VERSION = 20261005212405;
|
|
19
19
|
/** What the walkers need to see of an envelope — loose on purpose, so a typed `SerializedConfig`
|
|
20
20
|
* and a raw old-shape record both flow in without casts. */
|
|
21
21
|
interface VersionStamped {
|
|
@@ -13,7 +13,7 @@ import { ConfigFormatError } from "./rejection.js";
|
|
|
13
13
|
* sets this constant to its own older timestamp; the merge ref then carries a registered migration
|
|
14
14
|
* newer than the constant, and the assertion fails until the author re-mints.
|
|
15
15
|
*/
|
|
16
|
-
const CURRENT_SCHEMA_VERSION =
|
|
16
|
+
const CURRENT_SCHEMA_VERSION = 20261005212405;
|
|
17
17
|
/** The mint that moved `options` into the `settings` kind — restated here, rather than imported
|
|
18
18
|
* from the migration that owns it, because that migration imports this module. */
|
|
19
19
|
const SETTINGS_AS_KIND_VERSION = 20260908171448;
|
|
@@ -45,7 +45,7 @@ function registerSchemaMigrations(...migrations) {
|
|
|
45
45
|
for (const migration of migrations) {
|
|
46
46
|
if (migration.version !== 1 && !isMintTimestamp(migration.version)) throw new Error(`Schema migration version ${migration.version} is not a mint timestamp — mint one with \`date +%Y%m%d%H%M%S\`, like a supabase migration.`);
|
|
47
47
|
if (REGISTERED.has(migration.version)) throw new Error(`A schema migration at version ${migration.version} is already registered.`);
|
|
48
|
-
if (migration.version >
|
|
48
|
+
if (migration.version > 20261005212405) throw new Error(`Schema migration ${migration.version} is newer than CURRENT_SCHEMA_VERSION (${CURRENT_SCHEMA_VERSION}) — a stale branch merged, or the mint forgot to bump the constant. Re-mint: set CURRENT_SCHEMA_VERSION to the newest migration version.`);
|
|
49
49
|
REGISTERED.set(migration.version, migration);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -102,7 +102,7 @@ function pendingFor(version, target, options) {
|
|
|
102
102
|
* Already-current input passes through untouched — same reference, so hot paths pay nothing.
|
|
103
103
|
*/
|
|
104
104
|
function upgradeSerializedConfig(json, options) {
|
|
105
|
-
const target = options?.target ??
|
|
105
|
+
const target = options?.target ?? 20261005212405;
|
|
106
106
|
const version = detectedWireVersion(json);
|
|
107
107
|
if (version > target) throw new SchemaVersionTooNew(version, target);
|
|
108
108
|
const raw = json;
|
|
@@ -160,7 +160,7 @@ function upgradedSources(json, options) {
|
|
|
160
160
|
* meaning under the current schema and replay skips it — reported by the caller, not swallowed here.
|
|
161
161
|
*/
|
|
162
162
|
function upgradePatch(patch, writtenAt, options) {
|
|
163
|
-
const target = options?.target ??
|
|
163
|
+
const target = options?.target ?? 20261005212405;
|
|
164
164
|
if (writtenAt > target) throw new SchemaVersionTooNew(writtenAt, target);
|
|
165
165
|
let current = patch;
|
|
166
166
|
for (const migration of pendingFor(writtenAt, target, options)) {
|
|
@@ -179,7 +179,7 @@ function upgradePatch(patch, writtenAt, options) {
|
|
|
179
179
|
* stamp would cause.
|
|
180
180
|
*/
|
|
181
181
|
function upgradeDraftEntries(draft, options) {
|
|
182
|
-
const target = options?.target ??
|
|
182
|
+
const target = options?.target ?? 20261005212405;
|
|
183
183
|
const entries = [];
|
|
184
184
|
const held = [];
|
|
185
185
|
const retired = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LocalOverlay } from "./sources.js";
|
|
2
|
-
import { Config } from "./Config.js";
|
|
3
2
|
import { ModifierCategory } from "../entities/system/Modifier.js";
|
|
3
|
+
import { Config } from "./Config.js";
|
|
4
4
|
|
|
5
5
|
//#region src/framework/source-integrity.d.ts
|
|
6
6
|
/** One ref that names something its source does not have. */
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,9 @@ import { EntityClass, GroupComputedInput, ItemOf, KindRef, OpInput, defineEntity
|
|
|
27
27
|
import { Collection, ConfigClass, ConfigInstance, ConfigKind, EntityMap, OwnedRecords, SourceMap, SourcesOf, defineConfig, kindsOf } from "./framework/defineConfig.js";
|
|
28
28
|
import { Package, PackageClass } from "./entities/system/Package.js";
|
|
29
29
|
import { AuthoredStyleBag, AuthoredStyleField, RegisteredStyleBag, StyleClass, StyleValue } from "./entities/system/style-bag.js";
|
|
30
|
+
import { Composite, CompositeClass } from "./entities/system/Composite.js";
|
|
31
|
+
import { modifierAxis, modifierCategory } from "./entities/system/modifier-axis.js";
|
|
32
|
+
import { MODIFIER_CATEGORIES, Modifier, ModifierCategory, ModifierClass, ModifierGroupMeta, WEB_ACTIVATIONS, WebActivation, modeAxes, modifierAxes, modifierGroupFields, modifierInvariants, modifierLeaf } from "./entities/system/Modifier.js";
|
|
30
33
|
import { RootFontSize, parseRootFontSize } from "./css/root-font-size.js";
|
|
31
34
|
import { RegisteredTokenValues, TOKEN_READERS, TokenGroupReader, TokenReader, TokenReaders, TokenValueEntry, TokenValueRow, TokenValueState, isTokenReader, parseTokenValue, rootFontSize, spellTokenRead, tokenExists, tokenValueRow, tokenValueRows } from "./entities/system/token-values.js";
|
|
32
35
|
import { CheckedTokenRefPath, OverrideCondition, Token, TokenBody, TokenClass, TokenRefPath, TokenReference, defineOverride, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers } from "./entities/system/Token.js";
|
|
@@ -68,7 +71,6 @@ import { CanvasSection, CanvasSectionClass, NativeSettings } from "./entities/na
|
|
|
68
71
|
import { NativeStyleProperty, rnStyleKey } from "./entities/native/NativeStyleProperty.js";
|
|
69
72
|
import { NativeToken, nativeTokenValue } from "./entities/native/NativeToken.js";
|
|
70
73
|
import { CANVAS_ROLES, CanvasRole, CanvasRoleClass, CanvasRoleName } from "./entities/system/CanvasRole.js";
|
|
71
|
-
import { Composite, CompositeClass } from "./entities/system/Composite.js";
|
|
72
74
|
import { COMPONENT_ENTRY_STATIC, ComponentModuleSource, ComponentRegistryImport, ComponentRegistryImportBinding, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentRegistryImports, linkedComponentModule, linkedModuleView } from "./entities/system/component-module.js";
|
|
73
75
|
import { Device, DeviceClass } from "./entities/system/Device.js";
|
|
74
76
|
import { ChildrenPolicy, RenderedTarget, VOID_ELEMENTS, childrenPolicy, forwardsOf, ownerOf, partsOf, renderedElement, renderedTarget, rootLayerOf } from "./entities/system/element.js";
|
|
@@ -78,8 +80,6 @@ import { GlobalStyle, GlobalStyleClass, globalStyleName } from "./entities/syste
|
|
|
78
80
|
import { Guidance, GuidanceClass, GuidanceScope, GuidanceSegment, guidanceReaches, guidanceScopeOf, guidanceTextOf } from "./entities/system/Guidance.js";
|
|
79
81
|
import { GuidanceStyle, GuidanceStyleBody, GuidanceStyleClass } from "./entities/system/GuidanceStyle.js";
|
|
80
82
|
import { convertLinkedTokenValue, prepareLinkedTokenBody } from "./entities/system/linked-token-values.js";
|
|
81
|
-
import { modifierAxis, modifierCategory } from "./entities/system/modifier-axis.js";
|
|
82
|
-
import { MODIFIER_CATEGORIES, Modifier, ModifierCategory, ModifierClass, ModifierGroupMeta, WEB_ACTIVATIONS, WebActivation, modeAxes, modifierAxes, modifierGroupFields, modifierInvariants, modifierLeaf } from "./entities/system/Modifier.js";
|
|
83
83
|
import { Motion, MotionClass, jsMotionPropFields } from "./entities/system/Motion.js";
|
|
84
84
|
import { Operation, OperationClass } from "./entities/system/Operation.js";
|
|
85
85
|
import { DeclaredRuntimeModule, declaredRuntimeModules } from "./entities/system/runtime-modules.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ConfigInstance } from "../../framework/defineConfig.js";
|
|
2
2
|
import { PackageClass } from "../../entities/system/Package.js";
|
|
3
|
+
import { CompositeClass } from "../../entities/system/Composite.js";
|
|
4
|
+
import { ModifierClass } from "../../entities/system/Modifier.js";
|
|
3
5
|
import { TokenClass } from "../../entities/system/Token.js";
|
|
4
6
|
import { StylePropertyClass } from "../../entities/system/StyleProperty.js";
|
|
5
7
|
import { ComponentClass } from "../../entities/system/Component.js";
|
|
6
8
|
import { LinkedSystemClass } from "../../entities/system/LinkedSystem.js";
|
|
7
9
|
import { IconClass } from "../../entities/system/Icon.js";
|
|
8
10
|
import { CanvasRoleClass } from "../../entities/system/CanvasRole.js";
|
|
9
|
-
import { CompositeClass } from "../../entities/system/Composite.js";
|
|
10
11
|
import { DeviceClass } from "../../entities/system/Device.js";
|
|
11
12
|
import { FileClass } from "../../entities/system/File.js";
|
|
12
13
|
import { FontClass } from "../../entities/system/Font.js";
|
|
13
14
|
import { GlobalStyleClass } from "../../entities/system/GlobalStyle.js";
|
|
14
15
|
import { GuidanceClass } from "../../entities/system/Guidance.js";
|
|
15
16
|
import { GuidanceStyleClass } from "../../entities/system/GuidanceStyle.js";
|
|
16
|
-
import { ModifierClass } from "../../entities/system/Modifier.js";
|
|
17
17
|
import { MotionClass } from "../../entities/system/Motion.js";
|
|
18
18
|
import { OperationClass } from "../../entities/system/Operation.js";
|
|
19
19
|
import { SettingsClass } from "../../entities/system/Settings.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An addition only, so the envelope passes through as it is:
|
|
3
|
+
*
|
|
4
|
+
* - A global style may name the modifier it applies under, `on: { __ref: 'modifier:<path>' }`, or a
|
|
5
|
+
* list of them that all hold at once — the same shape as a token override's `on`.
|
|
6
|
+
*
|
|
7
|
+
* Deletable once no reader older than this version is in use: identity hops cost nothing to keep.
|
|
8
|
+
*/
|
|
9
|
+
import type { SchemaMigration } from '../framework/schema-version';
|
|
10
|
+
export declare const GLOBAL_STYLE_ON_VERSION = 20261005212405;
|
|
11
|
+
export declare const globalStyleOnMigration: SchemaMigration;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/migrations/20261005212405_global_style_on.ts
|
|
2
|
+
const GLOBAL_STYLE_ON_VERSION = 20261005212405;
|
|
3
|
+
const globalStyleOnMigration = {
|
|
4
|
+
version: GLOBAL_STYLE_ON_VERSION,
|
|
5
|
+
up(json) {
|
|
6
|
+
return json;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { GLOBAL_STYLE_ON_VERSION, globalStyleOnMigration };
|