@astryxdesign/cli 0.7.17 → 0.7.18-canary.gb660bba
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/api/discover/_adapter.d.mts +7 -5
- package/api/discover/_adapter.mjs +12 -11
- package/api/doctor/_adapter.d.mts +11 -62
- package/api/doctor/_adapter.mjs +242 -472
- package/api/doctor/doctor.d.mts +1 -1
- package/api/doctor/doctor.mjs +1 -1
- package/api/doctor/theme-checks.mjs +37 -45
- package/api/error.d.mts +21 -0
- package/api/error.mjs +89 -0
- package/api/hook/list/list.d.mts +1 -1
- package/api/icon/icon.doc.mjs +1 -1
- package/api/icon/icon.type.mjs +1 -1
- package/api/icon/search/search.d.mts +4 -1
- package/api/icon/search/search.mjs +41 -4
- package/api/render/_adapter.mjs +233 -40
- package/api/render/render.type.d.mts +1 -1
- package/api/render/render.type.mjs +1 -1
- package/api/search/ORDERING.md +2 -2
- package/api/search/_candidate-score.mjs +32 -8
- package/api/search/_cards.json +1 -1
- package/api/search/_compound.d.mts +0 -1
- package/api/search/_compound.mjs +93 -2
- package/api/search/_lexical.mjs +177 -17
- package/api/search/_order.d.mts +3 -1
- package/api/search/_order.mjs +16 -5
- package/api/search/_result.d.mts +9 -0
- package/api/search/_result.mjs +10 -0
- package/api/search/_score.mjs +21 -3
- package/api/swizzle/_moduleGraph.d.mts +8 -0
- package/api/swizzle/_moduleGraph.mjs +61 -3
- package/api/template/copy/copy.mjs +5 -3
- package/api/theme/_adapter.mjs +48 -12
- package/api/theme/build/build.d.mts +4 -0
- package/api/theme/build/build.mjs +69 -18
- package/api/theme/build/style-keys.mjs +4 -5
- package/api/theme/build/theme-object.mjs +5 -0
- package/api/theme/palette/generate/color.d.mts +47 -0
- package/api/theme/palette/generate/color.mjs +58 -1
- package/api/theme/palette/generate/derive-look.d.mts +293 -0
- package/api/theme/palette/generate/derive-look.mjs +1362 -0
- package/api/theme/palette/generate/editor-look.d.mts +62 -0
- package/api/theme/palette/generate/editor-look.mjs +550 -0
- package/api/theme/palette/generate/mapping.d.mts +94 -9
- package/api/theme/palette/generate/mapping.mjs +94 -22
- package/api/theme-edit/_adapter.mjs +10 -1
- package/api/theme-edit/_catalog.d.mts +13 -13
- package/api/theme-edit/_catalog.mjs +38 -16
- package/api/theme-edit/_check.d.mts +82 -6
- package/api/theme-edit/_check.mjs +1270 -238
- package/api/theme-edit/_color.d.mts +74 -0
- package/api/theme-edit/_color.mjs +168 -3
- package/api/theme-edit/_compiler.d.mts +3 -5
- package/api/theme-edit/_compiler.mjs +122 -23
- package/api/theme-edit/_context.d.mts +46 -5
- package/api/theme-edit/_context.mjs +97 -49
- package/api/theme-edit/_css.d.mts +11 -0
- package/api/theme-edit/_css.mjs +40 -0
- package/api/theme-edit/_edit.d.mts +13 -0
- package/api/theme-edit/_edit.mjs +1450 -128
- package/api/theme-edit/_how-commands.d.mts +12 -0
- package/api/theme-edit/_how-commands.mjs +96 -14
- package/api/theme-edit/_how-question.d.mts +73 -29
- package/api/theme-edit/_how-question.mjs +8233 -1207
- package/api/theme-edit/_how-sides.d.mts +22 -0
- package/api/theme-edit/_how-sides.mjs +173 -0
- package/api/theme-edit/_how-steps.d.mts +42 -0
- package/api/theme-edit/_how-steps.mjs +208 -0
- package/api/theme-edit/_how-values.d.mts +29 -0
- package/api/theme-edit/_how-values.mjs +111 -0
- package/api/theme-edit/_how-words.d.mts +15 -0
- package/api/theme-edit/_how-words.mjs +239 -0
- package/api/theme-edit/_how.d.mts +1 -1
- package/api/theme-edit/_how.mjs +412 -37
- package/api/theme-edit/_missed.d.mts +2 -1
- package/api/theme-edit/_missed.mjs +125 -13
- package/api/theme-edit/_normal.d.mts +5 -3
- package/api/theme-edit/_normal.mjs +54 -14
- package/api/theme-edit/_palette.d.mts +204 -4
- package/api/theme-edit/_palette.mjs +901 -25
- package/api/theme-edit/_part-pieces.d.mts +54 -0
- package/api/theme-edit/_part-pieces.mjs +179 -0
- package/api/theme-edit/_part-words.mjs +33 -5
- package/api/theme-edit/_parts.d.mts +133 -0
- package/api/theme-edit/_parts.mjs +599 -10
- package/api/theme-edit/_picture-traits.d.mts +259 -0
- package/api/theme-edit/_picture-traits.mjs +1030 -0
- package/api/theme-edit/_preview.d.mts +84 -4
- package/api/theme-edit/_preview.mjs +260 -24
- package/api/theme-edit/_project.d.mts +14 -4
- package/api/theme-edit/_project.mjs +95 -26
- package/api/theme-edit/_set-line.d.mts +29 -0
- package/api/theme-edit/_set-line.mjs +100 -0
- package/api/theme-edit/_settings.d.mts +625 -28
- package/api/theme-edit/_settings.mjs +4587 -880
- package/api/theme-edit/_tables.d.mts +25 -1
- package/api/theme-edit/_tables.mjs +115 -11
- package/api/theme-edit/_text-looks.d.mts +78 -0
- package/api/theme-edit/_text-looks.mjs +376 -0
- package/api/theme-edit/_vet.d.mts +3 -26
- package/api/theme-edit/_vet.mjs +5 -89
- package/api/theme-edit/how/how.d.mts +1 -1
- package/api/theme-edit/how/how.mjs +1 -1
- package/api/theme-edit/theme-edit.type.d.mts +54 -1
- package/api/theme-edit/theme-edit.type.mjs +17 -2
- package/api/theme-edit/themeEditHow.doc.mjs +3 -3
- package/api/theme-edit/themeEditNew.doc.mjs +4 -0
- package/api/theme-edit/themeEditSet.doc.mjs +6 -2
- package/api/theme-edit/themeEditShow.doc.mjs +4 -0
- package/api/theme-edit/themeEditUndo.doc.mjs +4 -0
- package/assets/component-list.generated.json +1 -1
- package/assets/docs/author-a-theme.doc.mjs +7 -4
- package/assets/docs/tree/export-pages.doc.mjs +1 -1
- package/assets/docs/tree/icon-sets.doc.mjs +1 -1
- package/assets/docs/use-a-theme.doc.mjs +89 -17
- package/assets/docs-routes.generated.json +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/icons/definitions/article.doc.mjs +9 -0
- package/assets/icons/template-icons.json +5 -0
- package/assets/search-catalog.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/Citation/CitationInlineText.doc.mjs +1 -1
- package/assets/templates/blocks/components/Citation/CitationInlineText.tsx +3 -1
- package/assets/templates/blocks/components/Citation/CitationShowcase.doc.mjs +1 -1
- package/assets/templates/blocks/components/Citation/CitationShowcase.tsx +3 -1
- package/assets/templates/blocks/components/Citation/CitationSourceList.doc.mjs +1 -1
- package/assets/templates/blocks/components/Citation/CitationSourceList.tsx +7 -3
- package/assets/templates/blocks/components/Markdown/MarkdownCitedContent.doc.mjs +1 -1
- package/assets/templates/blocks/components/Markdown/MarkdownCitedContent.tsx +5 -2
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ide/page.tsx +5 -10
- package/assets/templates/pages/payment-form/page.tsx +16 -60
- package/assets/templates/themes/neutral/neutralTheme.ts +4 -3
- package/authoring/debug/parse.d.mts +1 -1
- package/authoring/doctypes/_schema.d.mts +13 -13
- package/authoring/gap-report/parse.d.mts +1 -1
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/ensure-core-built.mjs +17 -10
- package/clients/cli/commands/experimental/theme.mjs +46 -6
- package/clients/cli/commands/experimental-icon.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +11 -3
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +3 -3
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +1 -1
- package/clients/cli/commands/hook.mjs +7 -0
- package/clients/cli/commands/theme-build.doc.mjs +1 -1
- package/clients/cli/index.mjs +6 -2
- package/clients/cli/lib/hook-format.mjs +41 -1
- package/clients/cli/lib/json-shim.mjs +34 -14
- package/clients/cli/lib/other-cli-words.mjs +7 -0
- package/clients/cli/lib/unknown-command.mjs +345 -46
- package/clients/cli/manifest.generated.json +1 -1
- package/foundation/agent-docs/agent-docs.d.mts +11 -2
- package/foundation/agent-docs/agent-docs.mjs +51 -8
- package/foundation/config/project.d.mts +11 -1
- package/foundation/config/project.mjs +11 -2
- package/foundation/discovery/component-replacement.d.mts +5 -8
- package/foundation/discovery/component-replacement.mjs +12 -14
- package/foundation/discovery/core-augmentation-points.d.mts +35 -0
- package/foundation/discovery/core-augmentation-points.mjs +410 -9
- package/foundation/discovery/core-elements.d.mts +6 -0
- package/foundation/discovery/core-elements.mjs +10 -2
- package/foundation/discovery/core-prop-types.d.mts +5 -0
- package/foundation/discovery/core-prop-types.mjs +10 -3
- package/foundation/discovery/core-props.d.mts +8 -0
- package/foundation/discovery/core-props.mjs +29 -13
- package/foundation/discovery/official-list.d.mts +17 -0
- package/foundation/discovery/official-list.mjs +77 -0
- package/foundation/discovery/unknown-core-props.d.mts +130 -0
- package/foundation/discovery/unknown-core-props.mjs +601 -0
- package/foundation/discovery/written-prop-values.d.mts +35 -0
- package/foundation/discovery/written-prop-values.mjs +258 -0
- package/foundation/fonts/fontsource-families.generated.d.mts +5 -0
- package/foundation/fonts/fontsource-families.generated.mjs +2110 -0
- package/foundation/fs/package-name.d.mts +10 -0
- package/foundation/fs/package-name.mjs +37 -0
- package/foundation/fs/project-source-files.d.mts +27 -0
- package/foundation/fs/project-source-files.mjs +115 -0
- package/foundation/fs/project-sources.d.mts +25 -0
- package/foundation/fs/project-sources.mjs +83 -0
- package/foundation/fs/read-record.d.mts +18 -0
- package/foundation/fs/read-record.mjs +36 -2
- package/foundation/integrations/integration-warnings.d.mts +39 -7
- package/foundation/integrations/integration-warnings.mjs +141 -19
- package/foundation/integrations/missing-dependency.d.mts +11 -0
- package/foundation/integrations/missing-dependency.mjs +20 -5
- package/foundation/release/folder-lock.d.mts +5 -2
- package/foundation/release/folder-lock.mjs +9 -3
- package/foundation/release/notices.mjs +2 -8
- package/foundation/render/cut-short.d.mts +8 -2
- package/foundation/render/cut-short.mjs +50 -5
- package/foundation/render/drawn-contrast.d.mts +38 -0
- package/foundation/render/drawn-contrast.mjs +237 -0
- package/foundation/render/file-header.mjs +4 -0
- package/foundation/render/layers.d.mts +2 -1
- package/foundation/render/layers.mjs +22 -1
- package/foundation/render/package-resolve-hooks.d.mts +38 -9
- package/foundation/render/package-resolve-hooks.mjs +124 -32
- package/foundation/render/page-worker.mjs +95 -23
- package/foundation/render/part-boxes.d.mts +27 -0
- package/foundation/render/part-boxes.mjs +45 -0
- package/foundation/render/picture-chrome.mjs +36 -4
- package/foundation/render/picture-playwright.mjs +26 -2
- package/foundation/render/picture-window.d.mts +29 -2
- package/foundation/render/picture-window.mjs +99 -1
- package/foundation/render/render-page.d.mts +39 -6
- package/foundation/render/render-page.mjs +26 -10
- package/foundation/render/ts-paths.mjs +2 -1
- package/foundation/response/error-codes.doc.mjs +1 -1
- package/foundation/response/error-codes.mjs +1 -1
- package/foundation/response/response-types.doc.mjs +1 -1
- package/foundation/text/written-string.d.mts +4 -1
- package/foundation/text/written-string.mjs +4 -1
- package/package.json +8 -7
|
@@ -25,6 +25,7 @@ import {TreeList} from '@astryxdesign/core/TreeList';
|
|
|
25
25
|
import type {TreeListItemData} from '@astryxdesign/core/TreeList';
|
|
26
26
|
import {VisuallyHidden} from '@astryxdesign/core/VisuallyHidden';
|
|
27
27
|
import {
|
|
28
|
+
ClockIcon,
|
|
28
29
|
FolderIcon,
|
|
29
30
|
DocumentIcon,
|
|
30
31
|
SearchIcon,
|
|
@@ -51,14 +52,6 @@ const styles: Record<string, CSSProperties> = {
|
|
|
51
52
|
metadataCompact: {
|
|
52
53
|
gap: 'var(--spacing-1) var(--spacing-3)',
|
|
53
54
|
},
|
|
54
|
-
historyTimelineDot: {
|
|
55
|
-
width: 8,
|
|
56
|
-
height: 8,
|
|
57
|
-
borderRadius: '50%',
|
|
58
|
-
backgroundColor: 'var(--color-border-emphasized)',
|
|
59
|
-
marginTop: 6,
|
|
60
|
-
flexShrink: 0,
|
|
61
|
-
},
|
|
62
55
|
editorArea: {
|
|
63
56
|
overflow: 'auto',
|
|
64
57
|
minHeight: 0,
|
|
@@ -487,8 +480,10 @@ export default function ResizableWorkspacePage() {
|
|
|
487
480
|
</Text>
|
|
488
481
|
}
|
|
489
482
|
startContent={
|
|
490
|
-
<
|
|
491
|
-
|
|
483
|
+
<Icon
|
|
484
|
+
icon={ClockIcon}
|
|
485
|
+
size="xsm"
|
|
486
|
+
color="secondary"
|
|
492
487
|
/>
|
|
493
488
|
}
|
|
494
489
|
/>
|
|
@@ -37,6 +37,9 @@ import {ShieldIcon} from '@astryxdesign/template-icons';
|
|
|
37
37
|
import {LockIcon} from '@astryxdesign/template-icons';
|
|
38
38
|
import {SuccessIcon} from '@astryxdesign/template-icons';
|
|
39
39
|
import {ShippingIcon} from '@astryxdesign/template-icons';
|
|
40
|
+
import {CreditCardIcon} from '@astryxdesign/template-icons';
|
|
41
|
+
import {MobileIcon} from '@astryxdesign/template-icons';
|
|
42
|
+
import {WalletIcon} from '@astryxdesign/template-icons';
|
|
40
43
|
|
|
41
44
|
// ── Constants ─────────────────────────────────────────────────────────────────
|
|
42
45
|
|
|
@@ -187,30 +190,6 @@ const summarySticky: CSSProperties = {
|
|
|
187
190
|
};
|
|
188
191
|
// On mobile the summary moves above the form.
|
|
189
192
|
const summaryMobileOrder: CSSProperties = {order: -1};
|
|
190
|
-
// Express-checkout brand buttons (fixed brand colors).
|
|
191
|
-
const paypalButton: CSSProperties = {
|
|
192
|
-
backgroundColor: '#FFC439',
|
|
193
|
-
borderColor: '#FFC439',
|
|
194
|
-
};
|
|
195
|
-
// Official Google Pay dark button: black background with the unaltered
|
|
196
|
-
// dark-variant mark (white "Google Pay" text + full-color G), per the
|
|
197
|
-
// Google Pay brand guidelines.
|
|
198
|
-
const gpayButton: CSSProperties = {
|
|
199
|
-
backgroundColor: '#000',
|
|
200
|
-
borderColor: '#000',
|
|
201
|
-
};
|
|
202
|
-
// Brand logos inside the express-checkout buttons.
|
|
203
|
-
const brandLogo: CSSProperties = {height: 'var(--spacing-5)', width: 'auto'};
|
|
204
|
-
// Accepted card-network marks (Visa/Mastercard/Amex), shared style.
|
|
205
|
-
const cardLogo: CSSProperties = {
|
|
206
|
-
height: 'var(--spacing-7)',
|
|
207
|
-
width: 'auto',
|
|
208
|
-
borderRadius: 'var(--radius-element)',
|
|
209
|
-
borderWidth: 'var(--border-width)',
|
|
210
|
-
borderStyle: 'solid',
|
|
211
|
-
borderColor: 'var(--color-border)',
|
|
212
|
-
backgroundColor: 'var(--color-background-surface)',
|
|
213
|
-
};
|
|
214
193
|
|
|
215
194
|
export default function PaymentFormPage() {
|
|
216
195
|
const showToast = useToast();
|
|
@@ -515,12 +494,12 @@ export default function PaymentFormPage() {
|
|
|
515
494
|
|
|
516
495
|
{/* Express checkout */}
|
|
517
496
|
<VStack gap={3}>
|
|
518
|
-
<Grid columns={2} gap={3}>
|
|
519
|
-
{/* PayPal */}
|
|
497
|
+
<Grid columns={{minWidth: 140, max: 2}} gap={3}>
|
|
520
498
|
<Button
|
|
521
499
|
label="PayPal"
|
|
522
|
-
variant="
|
|
500
|
+
variant="secondary"
|
|
523
501
|
size="lg"
|
|
502
|
+
icon={<Icon icon={WalletIcon} />}
|
|
524
503
|
onClick={() =>
|
|
525
504
|
// Demo only: replace this toast with the call that starts PayPal.
|
|
526
505
|
showToast({
|
|
@@ -528,18 +507,12 @@ export default function PaymentFormPage() {
|
|
|
528
507
|
uniqueID: 'paypal',
|
|
529
508
|
})
|
|
530
509
|
}
|
|
531
|
-
|
|
532
|
-
<img
|
|
533
|
-
src="https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-100px.png"
|
|
534
|
-
alt="PayPal"
|
|
535
|
-
style={brandLogo}
|
|
536
|
-
/>
|
|
537
|
-
</Button>
|
|
538
|
-
{/* Google Pay */}
|
|
510
|
+
/>
|
|
539
511
|
<Button
|
|
540
512
|
label="Google Pay"
|
|
541
|
-
variant="
|
|
513
|
+
variant="secondary"
|
|
542
514
|
size="lg"
|
|
515
|
+
icon={<Icon icon={MobileIcon} />}
|
|
543
516
|
onClick={() =>
|
|
544
517
|
// Demo only: replace this toast with the call that starts Google Pay.
|
|
545
518
|
showToast({
|
|
@@ -547,13 +520,7 @@ export default function PaymentFormPage() {
|
|
|
547
520
|
uniqueID: 'google-pay',
|
|
548
521
|
})
|
|
549
522
|
}
|
|
550
|
-
|
|
551
|
-
<img
|
|
552
|
-
src="https://pay.google.com/about/static_kcs/images/logos/google-pay-logo.svg"
|
|
553
|
-
alt="Google Pay"
|
|
554
|
-
style={brandLogo}
|
|
555
|
-
/>
|
|
556
|
-
</Button>
|
|
523
|
+
/>
|
|
557
524
|
</Grid>
|
|
558
525
|
</VStack>
|
|
559
526
|
|
|
@@ -572,23 +539,12 @@ export default function PaymentFormPage() {
|
|
|
572
539
|
|
|
573
540
|
{/* Credit card fields */}
|
|
574
541
|
<VStack gap={3}>
|
|
575
|
-
{/*
|
|
576
|
-
<HStack gap={1.5} vAlign="center">
|
|
577
|
-
<
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
/>
|
|
582
|
-
<img
|
|
583
|
-
src="https://raw.githubusercontent.com/aaronfagan/svg-credit-card-payment-icons/main/flat/mastercard.svg"
|
|
584
|
-
alt="Mastercard"
|
|
585
|
-
style={cardLogo}
|
|
586
|
-
/>
|
|
587
|
-
<img
|
|
588
|
-
src="https://raw.githubusercontent.com/aaronfagan/svg-credit-card-payment-icons/main/flat/amex.svg"
|
|
589
|
-
alt="Amex"
|
|
590
|
-
style={cardLogo}
|
|
591
|
-
/>
|
|
542
|
+
{/* Accepted card networks */}
|
|
543
|
+
<HStack gap={1.5} vAlign="center" wrap="wrap">
|
|
544
|
+
<Icon icon={CreditCardIcon} color="secondary" />
|
|
545
|
+
<Badge label="Visa" />
|
|
546
|
+
<Badge label="Mastercard" />
|
|
547
|
+
<Badge label="Amex" />
|
|
592
548
|
</HStack>
|
|
593
549
|
<TextInput
|
|
594
550
|
size="lg"
|
|
@@ -373,14 +373,15 @@ export const neutralTheme = defineTheme({
|
|
|
373
373
|
base: {
|
|
374
374
|
'--color-text-secondary': `light-dark(${neutral.light[30]}, ${neutral.dark[80]})`,
|
|
375
375
|
},
|
|
376
|
+
// A label line taller than the size grows the item.
|
|
376
377
|
'size:sm': {
|
|
377
|
-
height: 'calc(var(--size-element-sm) - 8px)',
|
|
378
|
+
height: 'max(calc(var(--size-element-sm) - 8px), 1lh)',
|
|
378
379
|
},
|
|
379
380
|
'size:md': {
|
|
380
|
-
height: 'calc(var(--size-element-md) - 8px)',
|
|
381
|
+
height: 'max(calc(var(--size-element-md) - 8px), 1lh)',
|
|
381
382
|
},
|
|
382
383
|
'size:lg': {
|
|
383
|
-
height: 'calc(var(--size-element-lg) - 8px)',
|
|
384
|
+
height: 'max(calc(var(--size-element-lg) - 8px), 1lh)',
|
|
384
385
|
},
|
|
385
386
|
selected: {
|
|
386
387
|
boxShadow: 'none',
|
|
@@ -75,7 +75,6 @@ declare const eventSchema: z.ZodObject<{
|
|
|
75
75
|
resultCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
76
76
|
emptyResult: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
77
77
|
resultKind: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
|
|
78
|
-
none: "none";
|
|
79
78
|
command: "command";
|
|
80
79
|
component: "component";
|
|
81
80
|
template: "template";
|
|
@@ -85,6 +84,7 @@ declare const eventSchema: z.ZodObject<{
|
|
|
85
84
|
integration: "integration";
|
|
86
85
|
migration: "migration";
|
|
87
86
|
mixed: "mixed";
|
|
87
|
+
none: "none";
|
|
88
88
|
}>>>;
|
|
89
89
|
directMatch: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
90
90
|
stdout: z.ZodString;
|
|
@@ -59,8 +59,8 @@ declare function buildDocSchemas(): {
|
|
|
59
59
|
}, z.core.$strict>>;
|
|
60
60
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
61
61
|
audience: z.ZodOptional<z.ZodEnum<{
|
|
62
|
-
public: "public";
|
|
63
62
|
internal: "internal";
|
|
63
|
+
public: "public";
|
|
64
64
|
}>>;
|
|
65
65
|
stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
|
|
66
66
|
};
|
|
@@ -287,8 +287,8 @@ declare function buildDocSchemas(): {
|
|
|
287
287
|
}, z.core.$strict>>;
|
|
288
288
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
289
289
|
audience: z.ZodOptional<z.ZodEnum<{
|
|
290
|
-
public: "public";
|
|
291
290
|
internal: "internal";
|
|
291
|
+
public: "public";
|
|
292
292
|
}>>;
|
|
293
293
|
stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
|
|
294
294
|
props: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -350,8 +350,8 @@ declare function buildDocSchemas(): {
|
|
|
350
350
|
}, z.core.$strict>>;
|
|
351
351
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
352
352
|
audience: z.ZodOptional<z.ZodEnum<{
|
|
353
|
-
public: "public";
|
|
354
353
|
internal: "internal";
|
|
354
|
+
public: "public";
|
|
355
355
|
}>>;
|
|
356
356
|
stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
|
|
357
357
|
}, z.core.$loose>;
|
|
@@ -448,8 +448,8 @@ declare function buildDocSchemas(): {
|
|
|
448
448
|
}, z.core.$strict>>;
|
|
449
449
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
450
450
|
audience: z.ZodOptional<z.ZodEnum<{
|
|
451
|
-
public: "public";
|
|
452
451
|
internal: "internal";
|
|
452
|
+
public: "public";
|
|
453
453
|
}>>;
|
|
454
454
|
stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
|
|
455
455
|
}, z.core.$loose>;
|
|
@@ -502,8 +502,8 @@ declare function buildDocSchemas(): {
|
|
|
502
502
|
}, z.core.$strict>>;
|
|
503
503
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
504
504
|
audience: z.ZodOptional<z.ZodEnum<{
|
|
505
|
-
public: "public";
|
|
506
505
|
internal: "internal";
|
|
506
|
+
public: "public";
|
|
507
507
|
}>>;
|
|
508
508
|
stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
|
|
509
509
|
}, z.core.$loose>;
|
|
@@ -609,8 +609,8 @@ declare function buildDocSchemas(): {
|
|
|
609
609
|
}, z.core.$strict>>;
|
|
610
610
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
611
611
|
audience: z.ZodOptional<z.ZodEnum<{
|
|
612
|
-
public: "public";
|
|
613
612
|
internal: "internal";
|
|
613
|
+
public: "public";
|
|
614
614
|
}>>;
|
|
615
615
|
stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
|
|
616
616
|
}, z.core.$loose>;
|
|
@@ -633,8 +633,8 @@ declare function buildDocSchemas(): {
|
|
|
633
633
|
}, z.core.$strict>>;
|
|
634
634
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
635
635
|
audience: z.ZodOptional<z.ZodEnum<{
|
|
636
|
-
public: "public";
|
|
637
636
|
internal: "internal";
|
|
637
|
+
public: "public";
|
|
638
638
|
}>>;
|
|
639
639
|
stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
|
|
640
640
|
}, z.core.$loose>;
|
|
@@ -758,8 +758,8 @@ declare function buildDocSchemas(): {
|
|
|
758
758
|
}, z.core.$strict>>;
|
|
759
759
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
760
760
|
audience: z.ZodOptional<z.ZodEnum<{
|
|
761
|
-
public: "public";
|
|
762
761
|
internal: "internal";
|
|
762
|
+
public: "public";
|
|
763
763
|
}>>;
|
|
764
764
|
stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
|
|
765
765
|
}, z.core.$strict>;
|
|
@@ -788,8 +788,8 @@ declare function buildDocSchemas(): {
|
|
|
788
788
|
}, z.core.$strict>>;
|
|
789
789
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
790
790
|
audience: z.ZodOptional<z.ZodEnum<{
|
|
791
|
-
public: "public";
|
|
792
791
|
internal: "internal";
|
|
792
|
+
public: "public";
|
|
793
793
|
}>>;
|
|
794
794
|
stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
|
|
795
795
|
subComponentOf: z.ZodString;
|
|
@@ -831,8 +831,8 @@ declare function buildDocSchemas(): {
|
|
|
831
831
|
}, z.core.$strict>>;
|
|
832
832
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
833
833
|
audience: z.ZodOptional<z.ZodEnum<{
|
|
834
|
-
public: "public";
|
|
835
834
|
internal: "internal";
|
|
835
|
+
public: "public";
|
|
836
836
|
}>>;
|
|
837
837
|
stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
|
|
838
838
|
params: z.ZodArray<z.ZodObject<{
|
|
@@ -873,8 +873,8 @@ declare function buildDocSchemas(): {
|
|
|
873
873
|
}, z.core.$strict>>;
|
|
874
874
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
875
875
|
audience: z.ZodOptional<z.ZodEnum<{
|
|
876
|
-
public: "public";
|
|
877
876
|
internal: "internal";
|
|
877
|
+
public: "public";
|
|
878
878
|
}>>;
|
|
879
879
|
stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
|
|
880
880
|
components: z.ZodArray<z.ZodUnknown>;
|
|
@@ -908,8 +908,8 @@ declare function buildDocSchemas(): {
|
|
|
908
908
|
}, z.core.$strict>>;
|
|
909
909
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
910
910
|
audience: z.ZodOptional<z.ZodEnum<{
|
|
911
|
-
public: "public";
|
|
912
911
|
internal: "internal";
|
|
912
|
+
public: "public";
|
|
913
913
|
}>>;
|
|
914
914
|
stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
|
|
915
915
|
props: z.ZodArray<z.ZodObject<{
|
|
@@ -947,8 +947,8 @@ declare function buildDocSchemas(): {
|
|
|
947
947
|
}, z.core.$strict>>;
|
|
948
948
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
949
949
|
audience: z.ZodOptional<z.ZodEnum<{
|
|
950
|
-
public: "public";
|
|
951
950
|
internal: "internal";
|
|
951
|
+
public: "public";
|
|
952
952
|
}>>;
|
|
953
953
|
stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
|
|
954
954
|
title: z.ZodString;
|
|
@@ -55,8 +55,8 @@ declare const receiptSchema: z.ZodObject<{
|
|
|
55
55
|
}, z.core.$strict>;
|
|
56
56
|
declare const handlerSchema: z.ZodObject<{
|
|
57
57
|
audience: z.ZodEnum<{
|
|
58
|
-
public: "public";
|
|
59
58
|
internal: "internal";
|
|
59
|
+
public: "public";
|
|
60
60
|
}>;
|
|
61
61
|
handle: z.ZodType<(report: import("./type.js").GapReport, context: import("./type.js").GapReportHandlerContext) => import("./type.js").GapReportHandlerReceipt | Promise<import("./type.js").GapReportHandlerReceipt>, any, z.core.$ZodTypeInternals<(report: import("./type.js").GapReport, context: import("./type.js").GapReportHandlerContext) => import("./type.js").GapReportHandlerReceipt | Promise<import("./type.js").GapReportHandlerReceipt>, any>>;
|
|
62
62
|
}, z.core.$strict>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"cbbf06f6bd3ec9bc4148b935d3f35c4dfda4cbbf1d80e86b05b863447d0872eb"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @file Shared test helper: builds @astryxdesign/core once per run, race-free.
|
|
5
5
|
* @input Core's sources, translations and build scripts; this checkout's lock
|
|
6
|
-
* and run leases in
|
|
6
|
+
* and run leases in its node_modules/.cache folder.
|
|
7
7
|
* @output A packages/core/dist whose last output is newer than every source.
|
|
8
8
|
* @position Called by the node global setup and the build-theme suites.
|
|
9
9
|
*
|
|
@@ -12,9 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import {execFileSync} from 'node:child_process';
|
|
15
|
-
import {createHash} from 'node:crypto';
|
|
16
15
|
import * as fs from 'node:fs';
|
|
17
|
-
import * as os from 'node:os';
|
|
18
16
|
import * as path from 'node:path';
|
|
19
17
|
import {fileURLToPath} from 'node:url';
|
|
20
18
|
|
|
@@ -61,17 +59,25 @@ export const CORE_GENERATED = [
|
|
|
61
59
|
path.join(REPO_ROOT, 'packages/core/locales/pseudo.json'),
|
|
62
60
|
];
|
|
63
61
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
62
|
+
* A lock directory (mkdir is atomic across processes) named `name`, kept in
|
|
63
|
+
* the checkout at `repoRoot`: the node global setup and every worker read
|
|
64
|
+
* the same path, whatever temp folder each process has.
|
|
65
|
+
* @param {string} repoRoot
|
|
66
|
+
* @param {string} name
|
|
67
|
+
* @returns {string}
|
|
68
|
+
*/
|
|
69
|
+
export function checkoutLockDir(repoRoot, name) {
|
|
70
|
+
return path.join(path.resolve(repoRoot), 'node_modules', '.cache', name);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The lock directory that guards the Core build of the checkout at
|
|
75
|
+
* `repoRoot`: one per checkout, inside it.
|
|
66
76
|
* @param {string} repoRoot
|
|
67
77
|
* @returns {string}
|
|
68
78
|
*/
|
|
69
79
|
export function coreBuildLockDir(repoRoot) {
|
|
70
|
-
|
|
71
|
-
.update(path.resolve(repoRoot))
|
|
72
|
-
.digest('hex')
|
|
73
|
-
.slice(0, 16);
|
|
74
|
-
return path.join(os.tmpdir(), `astryx-core-build-${key}.lock`);
|
|
80
|
+
return checkoutLockDir(repoRoot, 'astryx-core-build.lock');
|
|
75
81
|
}
|
|
76
82
|
const LOCK_DIR = coreBuildLockDir(REPO_ROOT);
|
|
77
83
|
|
|
@@ -274,6 +280,7 @@ function lockIsHeld(lockDir, staleLockMs) {
|
|
|
274
280
|
* @param {number} staleLockMs
|
|
275
281
|
*/
|
|
276
282
|
function tryAcquire(lockDir, staleLockMs) {
|
|
283
|
+
fs.mkdirSync(path.dirname(lockDir), {recursive: true});
|
|
277
284
|
try {
|
|
278
285
|
fs.mkdirSync(lockDir);
|
|
279
286
|
return true;
|
|
@@ -590,25 +590,38 @@ function changeBlocks(r) {
|
|
|
590
590
|
(/** @type {string} */ n) =>
|
|
591
591
|
n.startsWith('no change: ') && n.includes(' already draws '),
|
|
592
592
|
);
|
|
593
|
+
// A dial step on a part (`corners large --on card`) says what it drew
|
|
594
|
+
// there, when that is a value or two: a part's own scale can give a step
|
|
595
|
+
// another size than the dial's help names for the whole theme.
|
|
596
|
+
const stepOn = d.action === 'set' && s.source === 'dial' ? s.on : null;
|
|
597
|
+
const drawnOn = stepOn
|
|
598
|
+
? /** @type {string[]} */ (/** @type {any} */ (d).styled ?? [])
|
|
599
|
+
.filter(x => x.startsWith(`${stepOn}: `))
|
|
600
|
+
.map(x => x.slice(stepOn.length + 2))
|
|
601
|
+
: [];
|
|
602
|
+
const drawnAs = drawnOn.length <= 2 ? drawnOn : [];
|
|
593
603
|
const done =
|
|
594
604
|
unchanged && d.action === 'set'
|
|
595
605
|
? drawnAlready
|
|
596
606
|
? `[no change] ${d.theme}: ${describe(s)} already shows; nothing written`
|
|
597
|
-
: `[ok] ${d.theme}: ${describe(s)} was already set; nothing changed`
|
|
607
|
+
: `[ok] ${d.theme}: ${d.asSides ? `${describe({...s, thing: d.asSides.thing, value: d.asSides.value})} (${d.asSides.sides.map(x => `${x.thing} ${x.value}`).join(', ')})` : describe(s)} was already set; nothing changed`
|
|
598
608
|
: d.was != null
|
|
599
609
|
? `[ok] ${d.theme}: ${s.thing} ${d.was} -> ${s.value}`
|
|
600
|
-
: `[ok] ${d.theme}: ${d.action === 'set' ? describe(s) : `removed ${describe(s)}${alsoRemovedText(d)}; now ${/** @type {any} */ (d).now ?? "the base theme's value"} applies`}`;
|
|
610
|
+
: `[ok] ${d.theme}: ${d.action === 'set' ? (d.asSides ? `${describe({...s, thing: d.asSides.thing, value: d.asSides.value})} (${d.asSides.sides.map(x => `${x.thing} ${x.value}`).join(', ')})` : `${describe(s)}${drawnAs.length ? ` (drawn as ${drawnAs.join(', ')})` : ''}`) : `removed ${describe(s)}${alsoRemovedText(d)}; now ${/** @type {any} */ (d).now ?? "the base theme's value"} applies`}`;
|
|
601
611
|
// A problem the change made leads the result, right under the status
|
|
602
612
|
// line, which counts them: a tail-cut or head-cut output still shows it.
|
|
603
613
|
// What a whole-theme change leaves out comes next, with the lines that
|
|
604
614
|
// reach it, before the rest a head-cut output drops.
|
|
605
615
|
const {
|
|
606
616
|
newProblems = [],
|
|
617
|
+
leftProblems = [],
|
|
607
618
|
leftOut = [],
|
|
619
|
+
fontNotLoaded = [],
|
|
608
620
|
missed: _missed,
|
|
609
621
|
missedParts: _missedParts,
|
|
610
622
|
missedOn: _missedOn,
|
|
611
623
|
missedWhere: _missedWhere,
|
|
624
|
+
missedNew: _missedNew,
|
|
612
625
|
...rest
|
|
613
626
|
} = /** @type {any} */ (d);
|
|
614
627
|
const status = newProblems.length
|
|
@@ -619,6 +632,25 @@ function changeBlocks(r) {
|
|
|
619
632
|
return [
|
|
620
633
|
status,
|
|
621
634
|
...(newProblems.length ? problemList(newProblems) : []),
|
|
635
|
+
// Problems it moved but left failing: said under the new ones.
|
|
636
|
+
...(leftProblems.length
|
|
637
|
+
? [
|
|
638
|
+
`still failing after this change (${leftProblems.length}):`,
|
|
639
|
+
...problemList(leftProblems),
|
|
640
|
+
]
|
|
641
|
+
: []),
|
|
642
|
+
...(fontNotLoaded.length
|
|
643
|
+
? [
|
|
644
|
+
list(
|
|
645
|
+
fontNotLoaded.map(
|
|
646
|
+
(/** @type {{family: string, run: string[]}} */ x) => [
|
|
647
|
+
`${x.family} is not installed, so the pictures and the app draw the next font in the stack until it is`,
|
|
648
|
+
...x.run,
|
|
649
|
+
],
|
|
650
|
+
),
|
|
651
|
+
),
|
|
652
|
+
]
|
|
653
|
+
: []),
|
|
622
654
|
...(leftOut.length
|
|
623
655
|
? [
|
|
624
656
|
list(
|
|
@@ -639,15 +671,23 @@ function changeBlocks(r) {
|
|
|
639
671
|
* named, near the top of a change or a new theme, so a head of the
|
|
640
672
|
* output keeps it; show names the first ones with their lines, and show
|
|
641
673
|
* --json lists each.
|
|
642
|
-
*
|
|
674
|
+
* A change says them only when it brought some (`missedNew`): the ones it
|
|
675
|
+
* found are show's to list, not every change's to repeat.
|
|
676
|
+
* @param {{missed?: number, missedParts?: number, missedOn?: string[], missedWhere?: string[], missedNew?: number}} d
|
|
643
677
|
*/
|
|
644
678
|
function missedLine(d) {
|
|
645
|
-
const {
|
|
679
|
+
const {
|
|
680
|
+
missed = 0,
|
|
681
|
+
missedParts = missed,
|
|
682
|
+
missedOn = [],
|
|
683
|
+
missedWhere = [],
|
|
684
|
+
missedNew,
|
|
685
|
+
} = d;
|
|
646
686
|
const named = missedWhere.length ? missedWhere : missedOn;
|
|
647
|
-
if (!missed) return [];
|
|
687
|
+
if (!missed || missedNew === 0) return [];
|
|
648
688
|
return [
|
|
649
689
|
record({
|
|
650
|
-
missed: `${missed} miss${missed > 1 ? 'es' : ''} on ${missedParts} part${missedParts > 1 ? 's' : ''} the theme's changes did not reach${named.length ? ` (${named.slice(0, 6).join(', ')}${named.length > 6 ? `, and ${named.length - 6} more` : ''})` : ''}: each still shows the base theme's own look there. Keep each one, or bring it in line with your changes: show lists the first misses with their lines, and show --json has every one`,
|
|
690
|
+
missed: `${missedNew ? `this change left ${missedNew} new miss${missedNew > 1 ? 'es' : ''}; ` : ''}${missed} miss${missed > 1 ? 'es' : ''} on ${missedParts} part${missedParts > 1 ? 's' : ''} the theme's changes did not reach${named.length ? ` (${named.slice(0, 6).join(', ')}${named.length > 6 ? `, and ${named.length - 6} more` : ''})` : ''}: each still shows the base theme's own look there. Keep each one, or bring it in line with your changes: show lists the first misses with their lines, and show --json has every one`,
|
|
651
691
|
}),
|
|
652
692
|
];
|
|
653
693
|
}
|
|
@@ -16,7 +16,7 @@ export const doc = {
|
|
|
16
16
|
summary:
|
|
17
17
|
'Find an icon by meaning, or build an icon set from a library (guide: astryx docs cli/experimental/icon-sets)',
|
|
18
18
|
description:
|
|
19
|
-
"Terminal front-end to icon(): searches every installed icon set's data file by meaning and prints each match's import line, in the look the project picks where the icon has it, and, when a definition names the icon, the import that names it by that meaning (`meaningImport`). With no set installed, it names the icon definitions that match, built-in ones first, and how to get a set. `<set>/<id>` reads one icon with every variant's import line; --list lists the installed sets and how many icon definitions each one maps. The subcommands author a set: `new-set` starts one in an integration package, `new-definition` adds the set's own icon definition, `add` registers an icon from a library, `map` points an icon definition at an icon, and `use` makes a set the project's. Start a set with `new-set <name> --from <library>`; the guide is `astryx docs cli/experimental/icon-sets`. Experimental: it may change or be removed in a patch release.",
|
|
19
|
+
"Terminal front-end to icon(): searches every installed icon set's data file by meaning and prints each match's import line, in the look the project picks where the icon has it, and, when a definition names the icon, the import that names it by that meaning (`meaningImport`). With no set installed, it names the icon definitions that match, built-in ones first, with the built-in that draws in place of a matching definition Core does not draw (unless a match ranked above it has none), and how to get a set. `<set>/<id>` reads one icon with every variant's import line; --list lists the installed sets and how many icon definitions each one maps. The subcommands author a set: `new-set` starts one in an integration package, `new-definition` adds the set's own icon definition, `add` registers an icon from a library, `map` points an icon definition at an icon, and `use` makes a set the project's. Start a set with `new-set <name> --from <library>`; the guide is `astryx docs cli/experimental/icon-sets`. Experimental: it may change or be removed in a patch release.",
|
|
20
20
|
fn: 'icon',
|
|
21
21
|
// `new-set` and `new-definition` start a set and its own definitions,
|
|
22
22
|
// `add` registers an icon, `map` edits a map entry, and `use` picks the
|
|
@@ -45,7 +45,7 @@ export const doc = {
|
|
|
45
45
|
flag: '--icons-specifier <specifier>',
|
|
46
46
|
param: 'options.iconsSpecifier',
|
|
47
47
|
description:
|
|
48
|
-
"Override the icon-registry import in the generated JS module, for example ./icons.mjs (default:
|
|
48
|
+
"Override the icon-registry import in the generated JS module, for example ./icons.mjs; the build then does not compile the registry (default: a TypeScript or JSX registry's compiled copy in <name>.modules/, or a plain JavaScript registry's own path). With --family it applies to every member's icon import",
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
flag: '-w, --watch',
|
|
@@ -10,9 +10,9 @@ export const doc = {
|
|
|
10
10
|
namespace: 'cli/commands',
|
|
11
11
|
stability: 'experimental',
|
|
12
12
|
summary:
|
|
13
|
-
"Look up a part, group, setting or aspect; answer a question in plain words; read a picture's colors; or list what you can set",
|
|
13
|
+
"Look up a part, group, setting or aspect; answer a question in plain words; read a picture's colors and look; or list what you can set",
|
|
14
14
|
description:
|
|
15
|
-
'One command for every question. With nothing named, it prints its usage and examples. A part (button, card; --list parts): what it reads for each aspect (text, background, border, corners, shadow, spacing, font, size), each condition written as the --when and --state flags `set` takes or marked not settable with the reason, its variants, every state `set` accepts, the parts inside it (a token set --on the part reaches them), and its group; a part the part data does not have says so, with commands that still apply. A group (inputs, containers, checks, menus): its members and whether styling one styles all. A setting: a dial\'s rungs and examples, a token\'s type, default and the parts that read it (and, when none does, whether Core\'s stylesheet still uses it), or a CSS property and the parts that set it. An aspect (text, background, border, corners, shadow, spacing, font, size): the dial and the whole-theme tokens most parts read for it. `colors` (or `palette`): how the theme\'s colors are made: one seed per color, light and dark shades generated with the same generator as `theme palette generate`, the shade each token starts from, vibrancy, the Colors preview page and the exact-token escape hatch. A lookup takes any case, a plural, and a token name without its dashes. A question in plain words ("bold white text in the header", "remove shadows from cards", "cards: 8px radius; buttons: 4px"): it reads each clause for the parts (and their variant, size, state or mode), what to change, the values typed (hex, rgb(), lengths, dashed), and whether it asks for more, less or none ("shouldn\'t", "turn off", "never", "too sharp", "everything except X" included), and answers with exact commands; a typed value always wins over a color word, and a hex color with the wrong number of digits is refused by name, never replaced with a sample. "In dark mode" carries --mode dark to every color command; a change that cannot differ by mode, or a dark-mode ask on a light-only theme, says so instead. A question about what something is ("what does --color-accent do") gets the lookup. Several changes in one question come first as one sequence (`sequence: true`: run every command in order, at most 12), with repeated and overwritten steps left out; two asks that contradict each other are offered as choices. Changes come before lookups. Every suggested command names the theme (`theme`: the one named with `theme`, the only one, or the one an editor command changed last, said in `themeNote`; `themeChosenBy` says which: named, only, last-changed or none; with none, my-theme, made first), holds a real value, never a placeholder or a comment, and is checked as `set` checks it: a command `set` would refuse, or that changes nothing, is left out and listed in `refused` with the reason. A question with no answer says why in `hint`, with the next commands in `run`, the first of them this help, whose examples labeled "Asks how understands" list the kinds of ask it answers. A PNG picture (by any file name; other formats are refused by their bytes): its main colors from every pixel (on an even grid past 4 million), biggest share first, with where each sits, see-through pixels skipped, tRNS included (a number after the file sets how many, default 14), or with --at the exact color and alpha at pixel points; a picture over 40 million pixels (20 million at 16 bits), or with pixel data that is damaged or shorter than its header says, is refused before it is decoded. --list <what> lists what a change can name (dials, tokens, parts, groups or properties, in any case, singular or plural; kinds or no word lists those kinds), and the other words filter the list. Experimental: it may change or be removed in a patch release.',
|
|
15
|
+
'One command for every question. With nothing named, it prints its usage and examples. A part (button, card; --list parts): what it reads for each aspect (text, background, border, corners, shadow, spacing, font, size), each condition written as the --when and --state flags `set` takes or marked not settable with the reason, its variants, every state `set` accepts, the parts inside it (a token set --on the part reaches them), and its group; a part the part data does not have says so, with commands that still apply. A group (inputs, containers, checks, menus): its members and whether styling one styles all. A setting: a dial\'s rungs and examples, a token\'s type, default and the parts that read it (and, when none does, whether Core\'s stylesheet still uses it), or a CSS property and the parts that set it. An aspect (text, background, border, corners, shadow, spacing, font, size): the dial and the whole-theme tokens most parts read for it. `colors` (or `palette`): how the theme\'s colors are made: one seed per color, light and dark shades generated with the same generator as `theme palette generate`, the shade each token starts from, vibrancy, the Colors preview page and the exact-token escape hatch. A lookup takes any case, a plural, and a token name without its dashes. A question in plain words ("bold white text in the header", "remove shadows from cards", "cards: 8px radius; buttons: 4px"): it reads each clause for the parts (and their variant, size, state or mode), what to change, the values typed (hex, rgb(), lengths, dashed), and whether it asks for more, less or none ("shouldn\'t", "turn off", "never", "too sharp", "everything except X" included), and answers with exact commands; a typed value always wins over a color word, and a hex color with the wrong number of digits is refused by name, never replaced with a sample. "In dark mode" carries --mode dark to every color command; a change that cannot differ by mode, or a dark-mode ask on a light-only theme, says so instead. A question about what something is ("what does --color-accent do") gets the lookup. Several changes in one question come first as one sequence (`sequence: true`: run every command in order, at most 12), with repeated and overwritten steps left out; two asks that contradict each other are offered as choices. Changes come before lookups. A result with `offer: true` is more than the ask (a colored variant changed too): it follows every other result and is never the answer itself, so running the first result\'s commands never runs one; where what the ask writes is in place already, the first result says so with no command. Every suggested command names the theme (`theme`: the one named with `theme`, the only one, or the one an editor command changed last, said in `themeNote`; `themeChosenBy` says which: named, only, last-changed or none; with none, my-theme, made first), holds a real value, never a placeholder or a comment, and is checked as `set` checks it: a command `set` would refuse, or that changes nothing, is left out and listed in `refused` with the reason. A question with no answer says why in `hint`, with the next commands in `run`, the first of them this help, whose examples labeled "Asks how understands" list the kinds of ask it answers. A PNG picture (by any file name; other formats are refused by their bytes): its main colors from every pixel (on an even grid past 4 million), biggest share first, with where each sits, see-through pixels skipped, tRNS included (a number after the file sets how many, default 14), and the look\'s traits measured from its pixels (control height, the checks\' box, corners, edge width, how panels sit, the accent fill, line spacing), each written as the line that sets it where enough boxes agree and otherwise listed as unsure, with the settings that would make it where one exists, or with --at the exact color and alpha at pixel points; a picture over 40 million pixels (20 million at 16 bits), or with pixel data that is damaged or shorter than its header says, is refused before it is decoded. --list <what> lists what a change can name (dials, tokens, parts, groups or properties, in any case, singular or plural; kinds or no word lists those kinds), and the other words filter the list. Experimental: it may change or be removed in a patch release.',
|
|
16
16
|
fn: 'themeEditHow',
|
|
17
17
|
args: [
|
|
18
18
|
{
|
|
@@ -145,6 +145,14 @@ export const doc = {
|
|
|
145
145
|
label: 'Asks how understands: removals',
|
|
146
146
|
cli: 'astryx experimental theme editor how "remove the card background"',
|
|
147
147
|
},
|
|
148
|
+
{
|
|
149
|
+
label: "Asks how understands: a part's own piece taken away",
|
|
150
|
+
cli: 'astryx experimental theme editor how "hide the code block copy button"',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
label: 'Asks how understands: one variant made to look like another',
|
|
154
|
+
cli: 'astryx experimental theme editor how "ghost buttons look like the default button"',
|
|
155
|
+
},
|
|
148
156
|
{
|
|
149
157
|
label: 'Asks how understands: several changes in one ask',
|
|
150
158
|
cli: 'astryx experimental theme editor how "cards: 8px radius; buttons: 4px"',
|
|
@@ -167,7 +175,7 @@ export const doc = {
|
|
|
167
175
|
notes: [
|
|
168
176
|
{
|
|
169
177
|
type: 'prose',
|
|
170
|
-
text: 'The examples labeled "Asks how understands" list the kinds of ask a question in plain words can be, each with examples it answers with commands: a dial for the whole theme, a part\'s property by an amount or a value, a direction (lighter, darker, bigger, smaller, with or without a reference), a comparison with another part, everything except some parts or keeping a part, a prohibition (never …), one mode (in dark mode), a removal (no shadow, remove
|
|
178
|
+
text: 'The examples labeled "Asks how understands" list the kinds of ask a question in plain words can be, each with examples it answers with commands: a dial for the whole theme, a part\'s property by an amount or a value, a direction (lighter, darker, bigger, smaller, with or without a reference), a comparison with another part, one variant made to look like another (ghost buttons look like the default button), everything except some parts or keeping a part, a prohibition (never …), one mode (in dark mode), a removal (no shadow, remove …, or a part\'s own piece such as a code block\'s copy button or an alert\'s icon, which is then not drawn), several changes in one ask, and a question about a value. An ask of another kind may still be answered; one it cannot answer says so and points here.',
|
|
171
179
|
},
|
|
172
180
|
{
|
|
173
181
|
type: 'prose',
|
|
@@ -12,7 +12,7 @@ export const doc = {
|
|
|
12
12
|
summary:
|
|
13
13
|
'Change one thing in a theme: checked against what the components read, built, previewed',
|
|
14
14
|
description:
|
|
15
|
-
"Changes one thing. The thing is a dial (corners, spacing, accent, neutral, success, warning, danger, info, vibrancy, font, headings, surfaces, buttons, type, text-size, base, mode: big moves with named rungs; `more`/`less` step a rung), a design token by name (--color-background-body; `how --list tokens`), or a CSS property on a part (background --on card; needs --on). Every change is CHECKED first against the installed Core: the part, the --when variant and value, the --state, the token's type (color, size, number, font, shadow; only colors may differ by mode; a shadow is one value for both), and whether the part, or a part inside it, actually reads the token for what you mean. A change that cannot take effect is REFUSED: exit 1, an error code, nothing written, and the suggestions lead with the command that works (the token the part really reads, or the property that sets it directly). Groups: --on <group> (inputs, checks, containers, menus) styles every member; styling one member of an always-alike group (inputs, checks) styles the whole group unless --only. A setting on a part beats a whole-theme dial, and a dial never overwrites one. After building, a plain part setting that a more specific base-theme rule would beat (such as a heading level) is repeated on those variant keys, and the result says so. The result lists resolved token changes, part styles written, contrast problems this theme caused versus its base (text below 4.5:1), notes (the shade a color's main token uses, any shade moved so text reads, and the generated color files; font loading: the exact install line when the font package is missing), and writes themes/<theme>/preview.html. Values with spaces go in quotes: gradients, several shadows, font stacks. Dials: corners square|small|medium|large|round|pill|more|less|<size>; spacing tight|compact|medium|roomy|spacious|more|less; accent, neutral, success, warning, danger, info <color> (a color: the editor generates its light and dark shades from the one color, with the same generator as `theme palette generate`, and points the color tokens at them; a token moves to a nearby shade when it must read: text at 4.5:1, the focus ring at 3:1; the whole theme only, no --on or --mode; `how colors` explains it and the Colors preview page shows every shade); vibrancy 0-100|more|less (how saturated the generated colors are; 50 is the default; needs a color); font <preset, open font, family or stack>; headings light|regular|medium|semibold|bold|heavy or tight|tighter|normal|wide; surfaces flat|outlined|raised|glass; buttons solid|outline|soft|caps; type compact|standard|editorial|display; text-size small|medium|large|larger|more|less|<number of pixels, 10 to 32>; base <built-in theme>|none; mode both|light-only|dark-only. `astryx experimental theme editor how --list dials` explains each. An exact token always wins over the generated colors: `set <theme> --color-accent <color>` (with --on or --mode if you need them) is the escape hatch, whatever order the settings were made in. Experimental: it may change or be removed in a patch release.",
|
|
15
|
+
"Changes one thing. The thing is a dial (corners, spacing, accent, neutral, success, warning, danger, info, vibrancy, font, headings, surfaces, buttons, badges, type, text-size, base, mode: big moves with named rungs; `more`/`less` step a rung), a design token by name (--color-background-body; `how --list tokens`), or a CSS property on a part (background --on card; needs --on). Every change is CHECKED first against the installed Core: the part, the --when variant and value, the --state, the token's type (color, size, number, font, shadow; only colors may differ by mode; a shadow is one value for both), and whether the part, or a part inside it, actually reads the token for what you mean. A change that cannot take effect is REFUSED: exit 1, an error code, nothing written, and the suggestions lead with the command that works (the token the part really reads, or the property that sets it directly). A text size on a part whose text is drawn by elements inside it that each read a text size token goes into the token its main text reads, the largest (a top nav heading's title, not its supporting line), on that part; the setting is saved as typed and the result names the token. A text size said of a heading's title piece (`top-nav-heading-title` or `side-nav-heading-title`, also `-heading`) goes on that heading, the same way. A text size token said for a part that reads none, where the parts it holds read one size token (a tab list's tabs), goes into that one on the part; the setting is saved as typed and the result names the token. Groups: --on <group> (inputs, checks, containers, menus) styles every member; styling one member of an always-alike group (inputs, checks) styles the whole group unless --only (a height follows the control-height rule below). A height on a control (a button, an input, a selector, an input group, or a group of them) is every control's height at its size: it is written as that size's token (--size-element-sm, -md or -lg; the size --when names, md without one) on controls, and it replaces the other control heights at that size; with --only it stays on its one control; a height written as a size token must be a length (auto is refused there; a height for another variant or a state stays a plain height); a height on a part that is not a control (a text area, which sizes itself by its rows, or a complex selector) stays on that part. A control whose content is taller (a typeahead, a tokenizer) keeps its content's height, and a complex selector keeps its own. A control that grows with its content (a selector, a typeahead, a tokenizer) keeps Core's top and bottom padding, so a padding reaches it at its sides only and never makes it taller than the other controls. A file input's field does too; its drop zone (mode dropzone) pads itself, so a top or bottom padding set for the drop zone reaches it. A height or vertical padding on a bar (the app's header) reaches the one row of items drawn once across it (the top nav; never a menu's or side nav's items, a divider, a trigger or an avatar): the row fills the bar and gives up its own vertical padding, so its items sit in the middle; a value set on the row stays, and a part in the row taller than the bar is a problem with its fixing line. A row that sits in more than one bar takes the reach in every bar that holds it, and none when those bars leave it different heights (different heights, or the same height padded differently, as the app's header pads a safe area). A setting on a part beats a whole-theme dial, and a dial never overwrites one. After building, a plain part setting that a more specific base-theme rule would beat (such as a heading level) is repeated on those variant keys, and the result says so. The result lists resolved token changes, part styles written, contrast problems this theme caused versus its base (text below 4.5:1), notes (the shade a color's main token uses, any shade moved so text reads, and the generated color files; font loading: the exact install line when the font package is missing), and writes themes/<theme>/preview.html. Values with spaces go in quotes: gradients, several shadows, font stacks. Dials: corners square|small|medium|large|round|pill|more|less|<size>; spacing tight|compact|medium|roomy|spacious|more|less; accent, neutral, success, warning, danger, info <color> (a color: the editor generates its light and dark shades from the one color, with the same generator as `theme palette generate`, and points the color tokens at them; a token moves to a nearby shade when it must read: text at 4.5:1, the focus ring at 3:1; the whole theme only, no --on or --mode; `how colors` explains it and the Colors preview page shows every shade); vibrancy 0-100|more|less (how saturated the generated colors are; 50 is the default; needs a color); font <preset, open font, family or stack>; headings light|regular|medium|semibold|bold|heavy or tight|tighter|normal|wide; surfaces flat|outlined|raised|glass; buttons solid|outline|soft|caps; badges solid|soft|outline; type compact|standard|editorial|display; text-size small|medium|large|larger|more|less|<number of pixels, 10 to 32>; base <built-in theme>|none; mode both|light-only|dark-only. `astryx experimental theme editor how --list dials` explains each. An exact token always wins over the generated colors: `set <theme> --color-accent <color>` (with --on or --mode if you need them) is the escape hatch, whatever order the settings were made in. Experimental: it may change or be removed in a patch release.",
|
|
16
16
|
fn: 'themeEditSet',
|
|
17
17
|
args: [
|
|
18
18
|
{
|
|
@@ -37,7 +37,7 @@ export const doc = {
|
|
|
37
37
|
flag: '--on <where>',
|
|
38
38
|
param: 'options.on',
|
|
39
39
|
description:
|
|
40
|
-
|
|
40
|
+
"Where it applies (default: the whole theme): a part (button, card, app-shell-header; how --list parts), a group (inputs, containers, checks, menus, or a family the census reads from each part's structure: button-like, overlays, option-rows, selected-items, accent-fills, inset-fields, status-surfaces, overlay-headers, controls; how --list groups), or for font a role (body, heading, code)",
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
flag: '--when <prop:value>',
|
|
@@ -132,7 +132,7 @@ export const doc = {
|
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
code: 1,
|
|
135
|
-
when: 'an unknown option, a refused change (an unknown part, variant, state, token or thing; a value of the wrong type; --mode on something that has no mode; a token the part never reads for that; corners on a part that shows no edge), a theme that does not exist, or a build failure, or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED); nothing is written',
|
|
135
|
+
when: 'an unknown option, a refused change (an unknown part, variant, state, token or thing; a value of the wrong type; --mode on something that has no mode; a token the part never reads for that, unless it is a text size token and the parts it holds read one; corners on a part that shows no edge), a theme that does not exist, or a build failure, or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED); nothing is written',
|
|
136
136
|
},
|
|
137
137
|
],
|
|
138
138
|
related: ['experimental theme editor', 'experimental theme compile'],
|
|
@@ -32,7 +32,7 @@ export const doc = {
|
|
|
32
32
|
flag: '--png',
|
|
33
33
|
param: 'options.png',
|
|
34
34
|
description:
|
|
35
|
-
"Also take PNG pictures of the previews (light and dark): preview.png, the sample page, and sheet-overlays.png, each control at rest, hovered, focused and pressed at its top, then every menu, tooltip, popover and list drawn open (from sheet-overlays.html, which it writes too; a file of yours by that name is left alone and the picture not taken) (show adds a picture of each family of components the theme sets a part of with --on, or of the buttons when it sets none: sheet-<family>.png, from the sheet-<family>.html it writes beside the full sheet; the families are actions, inputs, selection, navigation, feedback, data and containers, and a family taller than 1600px is cut into pictures of
|
|
35
|
+
"Also take PNG pictures of the previews (light and dark): preview.png, the sample page, and sheet-overlays.png, each control at rest, hovered, focused and pressed at its top, then every menu, tooltip, popover and list drawn open (from sheet-overlays.html, which it writes too; a file of yours by that name is left alone and the picture not taken) (show adds a picture of each family of components the theme sets a part of with --on, or of the buttons when it sets none: sheet-<family>.png, from the sheet-<family>.html it writes beside the full sheet; the families are actions, inputs, selection, navigation, feedback, data and containers, and a family taller than 1600px is cut between rows of parts into pictures of about that height (a row taller than that is a picture of its own), in order (sheet-<family>-1.png, -2 …), so each reads whole. With --section, that section's picture is taken in their place, so --section <family> --png pictures any other family. sheet.html, every component, is written but not pictured; the open states are taken with a section too), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts (a browser that takes longer than 60 seconds, plus 20 seconds for each picture after the first, is stopped, and the result says so); without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet-overlays.png) is never written over: no picture is taken, and the result names the file. Taking pictures changes nothing in the app, except that show first brings the app copy (src/themes/<theme>/) and an in-app preview up to date after a hand edit to <theme>.theme.ts",
|
|
36
36
|
},
|
|
37
37
|
],
|
|
38
38
|
examples: [
|