@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
|
@@ -17,8 +17,12 @@
|
|
|
17
17
|
|
|
18
18
|
import {pathToFileURL} from 'node:url';
|
|
19
19
|
import {CUT_SHORT_PREFIX, cutShortText} from './cut-short.mjs';
|
|
20
|
+
import {LOW_CONTRAST_PREFIX, lowContrastText} from './drawn-contrast.mjs';
|
|
21
|
+
import {PART_BOXES_PREFIX, partBoxes} from './part-boxes.mjs';
|
|
20
22
|
import {LOCAL_URL, QUIET_BROWSER_ARGS} from './offline.mjs';
|
|
21
23
|
import {
|
|
24
|
+
FIT_CELLS,
|
|
25
|
+
PLACE_LAYERS,
|
|
22
26
|
PICTURE_PAGES_AT_ONCE,
|
|
23
27
|
PICTURE_TAKEN,
|
|
24
28
|
PICTURE_WINDOW,
|
|
@@ -29,7 +33,7 @@ import {
|
|
|
29
33
|
import {FONT_PROBE_PREFIX, probeFonts} from './font-probe.mjs';
|
|
30
34
|
|
|
31
35
|
const [entry, batch, executablePath] = process.argv.slice(2);
|
|
32
|
-
/** @type {Array<{html: string, png: string, mode: string}>} */
|
|
36
|
+
/** @type {Array<{html: string, png: string, mode: string, boxes?: string[]}>} */
|
|
33
37
|
const jobs = JSON.parse(batch);
|
|
34
38
|
/** A line for one job of the batch. @param {number} i @param {string} line */
|
|
35
39
|
const say = (i, line) => process.stdout.write(`${i}\t${line}\n`);
|
|
@@ -46,7 +50,7 @@ try {
|
|
|
46
50
|
await eachAtOnce(
|
|
47
51
|
jobs,
|
|
48
52
|
PICTURE_PAGES_AT_ONCE,
|
|
49
|
-
async ({html, png, mode}, i) => {
|
|
53
|
+
async ({html, png, mode, boxes}, i) => {
|
|
50
54
|
const page = await browser.newPage({
|
|
51
55
|
viewport: {...PICTURE_WINDOW},
|
|
52
56
|
colorScheme: mode === 'dark' ? 'dark' : 'light',
|
|
@@ -68,6 +72,10 @@ try {
|
|
|
68
72
|
// Playwright's own animations: 'disabled' would put a looping one
|
|
69
73
|
// back at its first frame, where a skeleton is faint.
|
|
70
74
|
await page.evaluate(SETTLE_ANIMATIONS);
|
|
75
|
+
// Text a part cuts when narrow gets the room it needs (FIT_CELLS).
|
|
76
|
+
await page.evaluate(FIT_CELLS);
|
|
77
|
+
// An overlay drawn after its part sits under its opener (PLACE_LAYERS).
|
|
78
|
+
await page.evaluate(PLACE_LAYERS);
|
|
71
79
|
// A whole-page picture makes the page see a resize; a part that
|
|
72
80
|
// redraws on it (a responsive chart) would start over and be
|
|
73
81
|
// pictured empty. The page's script is held while it is taken.
|
|
@@ -93,6 +101,22 @@ try {
|
|
|
93
101
|
} catch {
|
|
94
102
|
// Not measured.
|
|
95
103
|
}
|
|
104
|
+
// The text the picture draws too faint to read, the same way.
|
|
105
|
+
try {
|
|
106
|
+
const faint = await page.evaluate(lowContrastText);
|
|
107
|
+
say(i, `${LOW_CONTRAST_PREFIX}${JSON.stringify(faint)}`);
|
|
108
|
+
} catch {
|
|
109
|
+
// Not measured.
|
|
110
|
+
}
|
|
111
|
+
// The size of each part the job names, for a check that compares
|
|
112
|
+
// two pictures' boxes.
|
|
113
|
+
if (boxes?.length)
|
|
114
|
+
try {
|
|
115
|
+
const sized = await page.evaluate(partBoxes, boxes);
|
|
116
|
+
say(i, `${PART_BOXES_PREFIX}${JSON.stringify(sized)}`);
|
|
117
|
+
} catch {
|
|
118
|
+
// Not measured.
|
|
119
|
+
}
|
|
96
120
|
await page.close?.().catch(() => {});
|
|
97
121
|
say(i, PICTURE_TAKEN);
|
|
98
122
|
},
|
|
@@ -41,11 +41,13 @@ export function desktopMatches(query: string, { sure }?: {
|
|
|
41
41
|
/**
|
|
42
42
|
* The script run on a page before its picture: each animation that ends (an
|
|
43
43
|
* overlay's fade-in) is run to its end, so the picture shows the part as it
|
|
44
|
-
* looks once it has played
|
|
44
|
+
* looks once it has played, except a part drawn pressed, whose press
|
|
45
|
+
* animation (a flash that fades) is held at its start, the moment of the
|
|
46
|
+
* press; each that loops (a skeleton's shimmer, a pulsing
|
|
45
47
|
* dot, a spinner) is held at the middle of its first round, a frame a person
|
|
46
48
|
* sees as it plays, never its first frame, where a part can be faint or gone.
|
|
47
49
|
*/
|
|
48
|
-
export const SETTLE_ANIMATIONS: "for (const a of document.getAnimations()) {\n const t = a.effect?.getComputedTiming();\n if (!t) continue;\n if (t.iterations !== Infinity) { a.finish(); continue; }\n a.pause();\n a.currentTime = (Number(a.effect.getTiming().delay) || 0) + (typeof t.duration === 'number' ? t.duration : 0) / 2;\n}";
|
|
50
|
+
export const SETTLE_ANIMATIONS: "for (const a of document.getAnimations()) {\n const t = a.effect?.getComputedTiming();\n if (!t) continue;\n if (typeof CSSAnimation === 'function' && a instanceof CSSAnimation && t.iterations !== Infinity && a.effect.target?.closest?.('[data-astryx-state~=\"active\"]')) { a.pause(); a.currentTime = Number(a.effect.getTiming().delay) || 0; continue; }\n if (t.iterations !== Infinity) { a.finish(); continue; }\n a.pause();\n a.currentTime = (Number(a.effect.getTiming().delay) || 0) + (typeof t.duration === 'number' ? t.duration : 0) / 2;\n}";
|
|
49
51
|
/**
|
|
50
52
|
* The script run before the picture: it waits until the page stops
|
|
51
53
|
* changing, so a part drawn over animation frames (a responsive chart's
|
|
@@ -61,6 +63,31 @@ export const AWAIT_QUIET: "new Promise(resolve => {\n const QUIET_MS = 300;\n
|
|
|
61
63
|
export const PICTURE_TAKEN: "taken";
|
|
62
64
|
/** How many pages of a batch a picture script draws at once. */
|
|
63
65
|
export const PICTURE_PAGES_AT_ONCE: 3;
|
|
66
|
+
/**
|
|
67
|
+
* The script run on a sheet before its picture: text a part cuts with an
|
|
68
|
+
* ellipsis when it is narrow (a stepper's step names, a section heading)
|
|
69
|
+
* gets the room it needs, and so does a row that scrolls sideways (a
|
|
70
|
+
* carousel's slides), so its picture shows every item and cuts none at its
|
|
71
|
+
* edge. Each sheet item holding such text or row grows by what it lacks, a
|
|
72
|
+
* few rounds while the layout settles, up to the room an item has in a cell
|
|
73
|
+
* as wide as the sheet's content box (the sheet's width less its padding,
|
|
74
|
+
* the cell's padding and border, and the item's margins), so a grown cell
|
|
75
|
+
* stays inside the sheet and the picture keeps the window's width. A part
|
|
76
|
+
* whose own width is fixed keeps it, and what it still cuts is the theme's
|
|
77
|
+
* to fix. A page with no sheet items is left as it is.
|
|
78
|
+
*/
|
|
79
|
+
export const FIT_CELLS: "(() => {\n for (let round = 0; round < 4; round++) {\n let grew = false;\n for (const item of document.querySelectorAll('.cs-item')) {\n let need = 0;\n for (const el of item.querySelectorAll('*')) {\n // A text cut by less than a pixel still ends in an ellipsis. Text\n // drawn in no width at all (a label only a screen reader reads) is\n // not cut: no width given to it would show it.\n if (el.clientWidth < 2 || el.scrollWidth <= el.clientWidth) continue;\n const cs = getComputedStyle(el);\n const scrolls = /^(?:auto|scroll)$/.test(cs.overflowX);\n if (cs.textOverflow !== 'ellipsis' && !scrolls) continue;\n need = Math.max(need, el.scrollWidth - el.clientWidth + 1);\n }\n if (!need) continue;\n const width = item.getBoundingClientRect().width;\n const sheet = item.closest('.cs-sheet');\n if (!sheet) continue;\n const sides = (el, a, b) => {\n const s = getComputedStyle(el);\n return (parseFloat(s[a]) || 0) + (parseFloat(s[b]) || 0);\n };\n const cell = item.closest('.cs-cell');\n const most = Math.floor(\n sheet.clientWidth -\n sides(sheet, 'paddingLeft', 'paddingRight') -\n (cell\n ? sides(cell, 'paddingLeft', 'paddingRight') +\n sides(cell, 'borderLeftWidth', 'borderRightWidth')\n : 0) -\n sides(item, 'marginLeft', 'marginRight'),\n );\n const next = Math.min(Math.ceil(width + need), Math.max(most, width));\n if (next > width + 0.5) {\n item.style.minWidth = next + 'px';\n grew = true;\n }\n }\n if (!grew) break;\n }\n})()";
|
|
80
|
+
/**
|
|
81
|
+
* The script run on a sheet before its picture: an overlay drawn open
|
|
82
|
+
* after its part (a toolbar's menu) moves along the row to sit under the
|
|
83
|
+
* control that opens it, as a browser places it, as far as its item has
|
|
84
|
+
* room for what it draws. A flyout drawn beside its menu stays there. A
|
|
85
|
+
* panel as wide as the window is drawn as wide as its cell. A dialog drawn
|
|
86
|
+
* in its cell is not in the top layer, so the browser draws no backdrop
|
|
87
|
+
* for it: one with no background of its own (a lightbox, its controls
|
|
88
|
+
* drawn for the dark backdrop) gets its backdrop's colour as its own.
|
|
89
|
+
*/
|
|
90
|
+
export const PLACE_LAYERS: "(() => {\n for (const layer of document.querySelectorAll('.cs-item [data-astryx-layer-root]')) {\n if (layer.parentElement?.closest('[data-astryx-layer-root], [data-astryx-layer-nest]')) continue;\n const item = layer.closest('.cs-item');\n const ids = [layer, ...layer.querySelectorAll('[id]')].map(e => e.id).filter(Boolean);\n const opener = [...item.querySelectorAll('[aria-controls]')].find(c => !layer.contains(c) && !c.closest('[data-astryx-layer-root]') && ids.includes(c.getAttribute('aria-controls')));\n if (!opener) continue;\n // The layer box spans its row; what it draws is its content, so the\n // room is measured from the content's right edge.\n const at = layer.getBoundingClientRect();\n const drawn = Math.max(at.left, ...[...layer.children].map(c => c.getBoundingClientRect().right));\n const shift = Math.min(opener.getBoundingClientRect().left - at.left, item.getBoundingClientRect().right - drawn);\n if (shift > 0.5) layer.style.setProperty('margin-inline-start', shift + 'px', 'important');\n }\n // A panel as wide as the window (a navigation drawer's dialog) is drawn as\n // wide as its cell: the window's width would stretch the cell, and the\n // page, past it.\n for (const dialog of document.querySelectorAll('.cs-cell dialog')) {\n if (dialog.getBoundingClientRect().width >= window.innerWidth - 0.5)\n dialog.style.setProperty('width', '100%', 'important');\n }\n const clear = color => /^transparent$|rgba\\([^)]*,\\s*0\\)$/.test(color.trim());\n for (const dialog of document.querySelectorAll('.cs-cell dialog')) {\n const backdrop = getComputedStyle(dialog, '::backdrop').backgroundColor;\n if (clear(getComputedStyle(dialog).backgroundColor) && backdrop && !clear(backdrop))\n dialog.style.setProperty('background-color', backdrop, 'important');\n }\n})()";
|
|
64
91
|
export const PICTURE_WINDOW: Readonly<{
|
|
65
92
|
width: 1280;
|
|
66
93
|
height: 900;
|
|
@@ -15,13 +15,16 @@
|
|
|
15
15
|
/**
|
|
16
16
|
* The script run on a page before its picture: each animation that ends (an
|
|
17
17
|
* overlay's fade-in) is run to its end, so the picture shows the part as it
|
|
18
|
-
* looks once it has played
|
|
18
|
+
* looks once it has played, except a part drawn pressed, whose press
|
|
19
|
+
* animation (a flash that fades) is held at its start, the moment of the
|
|
20
|
+
* press; each that loops (a skeleton's shimmer, a pulsing
|
|
19
21
|
* dot, a spinner) is held at the middle of its first round, a frame a person
|
|
20
22
|
* sees as it plays, never its first frame, where a part can be faint or gone.
|
|
21
23
|
*/
|
|
22
24
|
export const SETTLE_ANIMATIONS = `for (const a of document.getAnimations()) {
|
|
23
25
|
const t = a.effect?.getComputedTiming();
|
|
24
26
|
if (!t) continue;
|
|
27
|
+
if (typeof CSSAnimation === 'function' && a instanceof CSSAnimation && t.iterations !== Infinity && a.effect.target?.closest?.('[data-astryx-state~="active"]')) { a.pause(); a.currentTime = Number(a.effect.getTiming().delay) || 0; continue; }
|
|
25
28
|
if (t.iterations !== Infinity) { a.finish(); continue; }
|
|
26
29
|
a.pause();
|
|
27
30
|
a.currentTime = (Number(a.effect.getTiming().delay) || 0) + (typeof t.duration === 'number' ? t.duration : 0) / 2;
|
|
@@ -90,6 +93,101 @@ export async function eachAtOnce(jobs, atOnce, run) {
|
|
|
90
93
|
if (first) throw first.error;
|
|
91
94
|
}
|
|
92
95
|
|
|
96
|
+
/**
|
|
97
|
+
* The script run on a sheet before its picture: text a part cuts with an
|
|
98
|
+
* ellipsis when it is narrow (a stepper's step names, a section heading)
|
|
99
|
+
* gets the room it needs, and so does a row that scrolls sideways (a
|
|
100
|
+
* carousel's slides), so its picture shows every item and cuts none at its
|
|
101
|
+
* edge. Each sheet item holding such text or row grows by what it lacks, a
|
|
102
|
+
* few rounds while the layout settles, up to the room an item has in a cell
|
|
103
|
+
* as wide as the sheet's content box (the sheet's width less its padding,
|
|
104
|
+
* the cell's padding and border, and the item's margins), so a grown cell
|
|
105
|
+
* stays inside the sheet and the picture keeps the window's width. A part
|
|
106
|
+
* whose own width is fixed keeps it, and what it still cuts is the theme's
|
|
107
|
+
* to fix. A page with no sheet items is left as it is.
|
|
108
|
+
*/
|
|
109
|
+
export const FIT_CELLS = `(() => {
|
|
110
|
+
for (let round = 0; round < 4; round++) {
|
|
111
|
+
let grew = false;
|
|
112
|
+
for (const item of document.querySelectorAll('.cs-item')) {
|
|
113
|
+
let need = 0;
|
|
114
|
+
for (const el of item.querySelectorAll('*')) {
|
|
115
|
+
// A text cut by less than a pixel still ends in an ellipsis. Text
|
|
116
|
+
// drawn in no width at all (a label only a screen reader reads) is
|
|
117
|
+
// not cut: no width given to it would show it.
|
|
118
|
+
if (el.clientWidth < 2 || el.scrollWidth <= el.clientWidth) continue;
|
|
119
|
+
const cs = getComputedStyle(el);
|
|
120
|
+
const scrolls = /^(?:auto|scroll)$/.test(cs.overflowX);
|
|
121
|
+
if (cs.textOverflow !== 'ellipsis' && !scrolls) continue;
|
|
122
|
+
need = Math.max(need, el.scrollWidth - el.clientWidth + 1);
|
|
123
|
+
}
|
|
124
|
+
if (!need) continue;
|
|
125
|
+
const width = item.getBoundingClientRect().width;
|
|
126
|
+
const sheet = item.closest('.cs-sheet');
|
|
127
|
+
if (!sheet) continue;
|
|
128
|
+
const sides = (el, a, b) => {
|
|
129
|
+
const s = getComputedStyle(el);
|
|
130
|
+
return (parseFloat(s[a]) || 0) + (parseFloat(s[b]) || 0);
|
|
131
|
+
};
|
|
132
|
+
const cell = item.closest('.cs-cell');
|
|
133
|
+
const most = Math.floor(
|
|
134
|
+
sheet.clientWidth -
|
|
135
|
+
sides(sheet, 'paddingLeft', 'paddingRight') -
|
|
136
|
+
(cell
|
|
137
|
+
? sides(cell, 'paddingLeft', 'paddingRight') +
|
|
138
|
+
sides(cell, 'borderLeftWidth', 'borderRightWidth')
|
|
139
|
+
: 0) -
|
|
140
|
+
sides(item, 'marginLeft', 'marginRight'),
|
|
141
|
+
);
|
|
142
|
+
const next = Math.min(Math.ceil(width + need), Math.max(most, width));
|
|
143
|
+
if (next > width + 0.5) {
|
|
144
|
+
item.style.minWidth = next + 'px';
|
|
145
|
+
grew = true;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (!grew) break;
|
|
149
|
+
}
|
|
150
|
+
})()`;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The script run on a sheet before its picture: an overlay drawn open
|
|
154
|
+
* after its part (a toolbar's menu) moves along the row to sit under the
|
|
155
|
+
* control that opens it, as a browser places it, as far as its item has
|
|
156
|
+
* room for what it draws. A flyout drawn beside its menu stays there. A
|
|
157
|
+
* panel as wide as the window is drawn as wide as its cell. A dialog drawn
|
|
158
|
+
* in its cell is not in the top layer, so the browser draws no backdrop
|
|
159
|
+
* for it: one with no background of its own (a lightbox, its controls
|
|
160
|
+
* drawn for the dark backdrop) gets its backdrop's colour as its own.
|
|
161
|
+
*/
|
|
162
|
+
export const PLACE_LAYERS = `(() => {
|
|
163
|
+
for (const layer of document.querySelectorAll('.cs-item [data-astryx-layer-root]')) {
|
|
164
|
+
if (layer.parentElement?.closest('[data-astryx-layer-root], [data-astryx-layer-nest]')) continue;
|
|
165
|
+
const item = layer.closest('.cs-item');
|
|
166
|
+
const ids = [layer, ...layer.querySelectorAll('[id]')].map(e => e.id).filter(Boolean);
|
|
167
|
+
const opener = [...item.querySelectorAll('[aria-controls]')].find(c => !layer.contains(c) && !c.closest('[data-astryx-layer-root]') && ids.includes(c.getAttribute('aria-controls')));
|
|
168
|
+
if (!opener) continue;
|
|
169
|
+
// The layer box spans its row; what it draws is its content, so the
|
|
170
|
+
// room is measured from the content's right edge.
|
|
171
|
+
const at = layer.getBoundingClientRect();
|
|
172
|
+
const drawn = Math.max(at.left, ...[...layer.children].map(c => c.getBoundingClientRect().right));
|
|
173
|
+
const shift = Math.min(opener.getBoundingClientRect().left - at.left, item.getBoundingClientRect().right - drawn);
|
|
174
|
+
if (shift > 0.5) layer.style.setProperty('margin-inline-start', shift + 'px', 'important');
|
|
175
|
+
}
|
|
176
|
+
// A panel as wide as the window (a navigation drawer's dialog) is drawn as
|
|
177
|
+
// wide as its cell: the window's width would stretch the cell, and the
|
|
178
|
+
// page, past it.
|
|
179
|
+
for (const dialog of document.querySelectorAll('.cs-cell dialog')) {
|
|
180
|
+
if (dialog.getBoundingClientRect().width >= window.innerWidth - 0.5)
|
|
181
|
+
dialog.style.setProperty('width', '100%', 'important');
|
|
182
|
+
}
|
|
183
|
+
const clear = color => /^transparent$|rgba\\([^)]*,\\s*0\\)$/.test(color.trim());
|
|
184
|
+
for (const dialog of document.querySelectorAll('.cs-cell dialog')) {
|
|
185
|
+
const backdrop = getComputedStyle(dialog, '::backdrop').backgroundColor;
|
|
186
|
+
if (clear(getComputedStyle(dialog).backgroundColor) && backdrop && !clear(backdrop))
|
|
187
|
+
dialog.style.setProperty('background-color', backdrop, 'important');
|
|
188
|
+
}
|
|
189
|
+
})()`;
|
|
190
|
+
|
|
93
191
|
export const PICTURE_WINDOW = Object.freeze({width: 1280, height: 900});
|
|
94
192
|
|
|
95
193
|
/** The pointer of the window a picture is taken in. */
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
// @generated by scripts/sync-api-types.mjs from the JSDoc in foundation/**/*.mjs.
|
|
2
2
|
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* A warning for each of the first five lines the page printed while it
|
|
6
|
+
* rendered.
|
|
7
|
+
* @param {{level: string, text: string}[]} logs
|
|
8
|
+
* @returns {RenderWarning[]}
|
|
9
|
+
*/
|
|
10
|
+
export function pageOutputWarnings(logs: {
|
|
11
|
+
level: string;
|
|
12
|
+
text: string;
|
|
13
|
+
}[]): RenderWarning[];
|
|
4
14
|
/**
|
|
5
15
|
* An `@import` rule's parts: what it loads, and the layer, supports() and
|
|
6
16
|
* media conditions that scope it.
|
|
@@ -232,9 +242,14 @@ export function renderPage(entry: string, options?: {
|
|
|
232
242
|
}): Promise<RenderedPage>;
|
|
233
243
|
/** How long one page may take to render before it is stopped. */
|
|
234
244
|
export const RENDER_TIMEOUT_MS: 60000;
|
|
245
|
+
/**
|
|
246
|
+
* The console line React prints for a prop that reaches a DOM element it
|
|
247
|
+
* does not know, with the prop's name.
|
|
248
|
+
*/
|
|
249
|
+
export const REACT_UNKNOWN_PROP: RegExp;
|
|
235
250
|
/**
|
|
236
251
|
* @typedef {object} RenderWarning
|
|
237
|
-
* @property {'dropped-children' | 'unknown-prop-value' | 'remote-asset' | 'missing-asset' | 'page-output' | 'page-script' | 'no-astryx-styles' | 'chart-size' | 'screen-query' | 'not-embedded' | 'not-carried' | 'node-crash'} code - What kind of problem.
|
|
252
|
+
* @property {'dropped-children' | 'unknown-prop' | 'props-not-checked' | 'unknown-prop-value' | 'remote-asset' | 'missing-asset' | 'page-output' | 'page-script' | 'no-astryx-styles' | 'chart-size' | 'screen-query' | 'not-embedded' | 'not-carried' | 'node-crash'} code - What kind of problem.
|
|
238
253
|
* @property {string} message - What happened and what to do, in one sentence.
|
|
239
254
|
*/
|
|
240
255
|
/**
|
|
@@ -249,7 +264,9 @@ export const RENDER_TIMEOUT_MS: 60000;
|
|
|
249
264
|
* @property {number} images - Local files inlined as data: URIs.
|
|
250
265
|
* @property {RenderWarning[]} warnings
|
|
251
266
|
* @property {string[]} [notCarried] - Files the page uses that the file does not carry, so experimental import cannot give them back (each also has a warning); present only when there are some.
|
|
252
|
-
* @property {{component: string, prop: string,
|
|
267
|
+
* @property {(import('../discovery/written-prop-values.mjs').WrittenValue & {component: string, prop: string, file: string, line: number})[]} [propValues] - What the page's own files certainly give a Core component's prop (the kinds of value and the strings among them), for the caller to check against the component's docs and types.
|
|
268
|
+
* @property {{level: string, text: string}[]} [logs] - What the page printed while it rendered, of which the `page-output` warnings show the first lines.
|
|
269
|
+
* @property {(import('../discovery/core-props.mjs').CorePropUse & {file: string, element: {line: number, column: number}})[]} [propNames] - Each prop the page's own files give a Core component by name, with the file's absolute path and where its element opens, for the caller to check against the component's docs and types.
|
|
253
270
|
* @property {{name: string, dir: string}[]} fromSet - Packages that came from the package set the CLI runs from, not the page's folder.
|
|
254
271
|
* @property {number} [scriptBytes] - Bytes of the page's script; none in a markup-only render.
|
|
255
272
|
* @property {number} [scriptModules] - The modules the page's script holds; none in a markup-only render.
|
|
@@ -302,7 +319,7 @@ export type RenderWarning = {
|
|
|
302
319
|
/**
|
|
303
320
|
* - What kind of problem.
|
|
304
321
|
*/
|
|
305
|
-
code: "dropped-children" | "unknown-prop-value" | "remote-asset" | "missing-asset" | "page-output" | "page-script" | "no-astryx-styles" | "chart-size" | "screen-query" | "not-embedded" | "not-carried" | "node-crash";
|
|
322
|
+
code: "dropped-children" | "unknown-prop" | "props-not-checked" | "unknown-prop-value" | "remote-asset" | "missing-asset" | "page-output" | "page-script" | "no-astryx-styles" | "chart-size" | "screen-query" | "not-embedded" | "not-carried" | "node-crash";
|
|
306
323
|
/**
|
|
307
324
|
* - What happened and what to do, in one sentence.
|
|
308
325
|
*/
|
|
@@ -347,15 +364,31 @@ export type RenderedPage = {
|
|
|
347
364
|
*/
|
|
348
365
|
notCarried?: string[] | undefined;
|
|
349
366
|
/**
|
|
350
|
-
* -
|
|
367
|
+
* - What the page's own files certainly give a Core component's prop (the kinds of value and the strings among them), for the caller to check against the component's docs and types.
|
|
351
368
|
*/
|
|
352
|
-
propValues?: {
|
|
369
|
+
propValues?: (import("../discovery/written-prop-values.mjs").WrittenValue & {
|
|
353
370
|
component: string;
|
|
354
371
|
prop: string;
|
|
355
|
-
value: string;
|
|
356
372
|
file: string;
|
|
357
373
|
line: number;
|
|
374
|
+
})[] | undefined;
|
|
375
|
+
/**
|
|
376
|
+
* - What the page printed while it rendered, of which the `page-output` warnings show the first lines.
|
|
377
|
+
*/
|
|
378
|
+
logs?: {
|
|
379
|
+
level: string;
|
|
380
|
+
text: string;
|
|
358
381
|
}[] | undefined;
|
|
382
|
+
/**
|
|
383
|
+
* - Each prop the page's own files give a Core component by name, with the file's absolute path and where its element opens, for the caller to check against the component's docs and types.
|
|
384
|
+
*/
|
|
385
|
+
propNames?: (import("../discovery/core-props.mjs").CorePropUse & {
|
|
386
|
+
file: string;
|
|
387
|
+
element: {
|
|
388
|
+
line: number;
|
|
389
|
+
column: number;
|
|
390
|
+
};
|
|
391
|
+
})[] | undefined;
|
|
359
392
|
/**
|
|
360
393
|
* - Packages that came from the package set the CLI runs from, not the page's folder.
|
|
361
394
|
*/
|
|
@@ -65,9 +65,28 @@ export const RENDER_TIMEOUT_MS = 60_000;
|
|
|
65
65
|
|
|
66
66
|
export {MODULE_EXTENSIONS, PAGE_EXTENSIONS} from './embedded-files.mjs';
|
|
67
67
|
|
|
68
|
+
/**
|
|
69
|
+
* The console line React prints for a prop that reaches a DOM element it
|
|
70
|
+
* does not know, with the prop's name.
|
|
71
|
+
*/
|
|
72
|
+
export const REACT_UNKNOWN_PROP = /React does not recognize the `([^`]+)` prop|Unknown event handler property `([^`]+)`/;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* A warning for each of the first five lines the page printed while it
|
|
76
|
+
* rendered.
|
|
77
|
+
* @param {{level: string, text: string}[]} logs
|
|
78
|
+
* @returns {RenderWarning[]}
|
|
79
|
+
*/
|
|
80
|
+
export function pageOutputWarnings(logs) {
|
|
81
|
+
return logs.slice(0, 5).map(log => ({
|
|
82
|
+
code: 'page-output',
|
|
83
|
+
message: `The page printed while rendering (${log.level}): ${log.text.split('\n')[0].slice(0, 200)}`,
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
|
|
68
87
|
/**
|
|
69
88
|
* @typedef {object} RenderWarning
|
|
70
|
-
* @property {'dropped-children' | 'unknown-prop-value' | 'remote-asset' | 'missing-asset' | 'page-output' | 'page-script' | 'no-astryx-styles' | 'chart-size' | 'screen-query' | 'not-embedded' | 'not-carried' | 'node-crash'} code - What kind of problem.
|
|
89
|
+
* @property {'dropped-children' | 'unknown-prop' | 'props-not-checked' | 'unknown-prop-value' | 'remote-asset' | 'missing-asset' | 'page-output' | 'page-script' | 'no-astryx-styles' | 'chart-size' | 'screen-query' | 'not-embedded' | 'not-carried' | 'node-crash'} code - What kind of problem.
|
|
71
90
|
* @property {string} message - What happened and what to do, in one sentence.
|
|
72
91
|
*/
|
|
73
92
|
|
|
@@ -83,7 +102,9 @@ export {MODULE_EXTENSIONS, PAGE_EXTENSIONS} from './embedded-files.mjs';
|
|
|
83
102
|
* @property {number} images - Local files inlined as data: URIs.
|
|
84
103
|
* @property {RenderWarning[]} warnings
|
|
85
104
|
* @property {string[]} [notCarried] - Files the page uses that the file does not carry, so experimental import cannot give them back (each also has a warning); present only when there are some.
|
|
86
|
-
* @property {{component: string, prop: string,
|
|
105
|
+
* @property {(import('../discovery/written-prop-values.mjs').WrittenValue & {component: string, prop: string, file: string, line: number})[]} [propValues] - What the page's own files certainly give a Core component's prop (the kinds of value and the strings among them), for the caller to check against the component's docs and types.
|
|
106
|
+
* @property {{level: string, text: string}[]} [logs] - What the page printed while it rendered, of which the `page-output` warnings show the first lines.
|
|
107
|
+
* @property {(import('../discovery/core-props.mjs').CorePropUse & {file: string, element: {line: number, column: number}})[]} [propNames] - Each prop the page's own files give a Core component by name, with the file's absolute path and where its element opens, for the caller to check against the component's docs and types.
|
|
87
108
|
* @property {{name: string, dir: string}[]} fromSet - Packages that came from the package set the CLI runs from, not the page's folder.
|
|
88
109
|
* @property {number} [scriptBytes] - Bytes of the page's script; none in a markup-only render.
|
|
89
110
|
* @property {number} [scriptModules] - The modules the page's script holds; none in a markup-only render.
|
|
@@ -2452,14 +2473,7 @@ export async function renderPage(entry, options = {}) {
|
|
|
2452
2473
|
message: `The page imports ${sheet}, a Sass or Less stylesheet, which a render does not compile, so its styles are missing.`,
|
|
2453
2474
|
});
|
|
2454
2475
|
}
|
|
2455
|
-
|
|
2456
|
-
message.logs ?? []
|
|
2457
|
-
).slice(0, 5)) {
|
|
2458
|
-
warnings.push({
|
|
2459
|
-
code: 'page-output',
|
|
2460
|
-
message: `The page printed while rendering (${log.level}): ${log.text.split('\n')[0].slice(0, 200)}`,
|
|
2461
|
-
});
|
|
2462
|
-
}
|
|
2476
|
+
warnings.push(...pageOutputWarnings(message.logs ?? []));
|
|
2463
2477
|
|
|
2464
2478
|
const files = /** @type {string[]} */ (message.files ?? [entry]);
|
|
2465
2479
|
if (!files.includes(entry)) files.unshift(entry);
|
|
@@ -2923,6 +2937,8 @@ export async function renderPage(entry, options = {}) {
|
|
|
2923
2937
|
warnings,
|
|
2924
2938
|
...(leftOut.length > 0 ? {notCarried: leftOut} : {}),
|
|
2925
2939
|
propValues: message.propValues ?? [],
|
|
2940
|
+
propNames: message.propNames ?? [],
|
|
2941
|
+
logs: message.logs ?? [],
|
|
2926
2942
|
fromSet: message.fromSet ?? [],
|
|
2927
2943
|
...(pageScript ? {scriptBytes: Buffer.byteLength(pageScript), scriptModules: message.scriptModules ?? 0} : {}),
|
|
2928
2944
|
...(remoteSummary && remoteSummary.fetched.length + remoteSummary.failed.length > 0 ? {remoteImages: remoteSummary} : {}),
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
*
|
|
18
18
|
* @position foundation/render — used by page-worker.mjs, embedded-imports.mjs,
|
|
19
19
|
* the theme build's module loader (api/theme/build/build.mjs), and Doctor's
|
|
20
|
-
* icon-imports
|
|
20
|
+
* icon-imports scan (api/doctor/_adapter.mjs), and the Core prop check of
|
|
21
|
+
* doctor and export (discovery/unknown-core-props.mjs)
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
24
|
import * as fs from 'node:fs';
|
|
@@ -248,7 +248,7 @@ export const doc = {
|
|
|
248
248
|
{
|
|
249
249
|
value: 'ERR_DEP_MISSING',
|
|
250
250
|
description:
|
|
251
|
-
'A required external dependency (e.g. jscodeshift) is missing.',
|
|
251
|
+
'A required external dependency (e.g. jscodeshift) is missing, or an installed package needs a package it declares that is not installed (a broken install; installing again repairs it).',
|
|
252
252
|
},
|
|
253
253
|
|
|
254
254
|
// GitHub CLI
|
|
@@ -240,7 +240,7 @@ export const ERROR_CODES = Object.freeze({
|
|
|
240
240
|
ERR_VERSION_DETECT: 'ERR_VERSION_DETECT',
|
|
241
241
|
/** A `--from`/`--to` value was not a valid semver string. */
|
|
242
242
|
ERR_INVALID_VERSION: 'ERR_INVALID_VERSION',
|
|
243
|
-
/** A required external dependency (e.g. jscodeshift) is missing. */
|
|
243
|
+
/** A required external dependency (e.g. jscodeshift) is missing, or an installed package needs a package it declares that is not installed (a broken install). */
|
|
244
244
|
ERR_DEP_MISSING: 'ERR_DEP_MISSING',
|
|
245
245
|
|
|
246
246
|
// ── GitHub CLI ───────────────────────────────────────────────────
|
|
@@ -134,7 +134,7 @@ export const doc = {
|
|
|
134
134
|
value: 'themeEdit.set',
|
|
135
135
|
stability: 'experimental',
|
|
136
136
|
description:
|
|
137
|
-
'One checked change written: the `setting`, the one it `replaced`, `was` (for base and mode), the `parts` and `group` it styles, resolved `changedTokens`, part styles written (`styled`), part settings a dial `kept`, newly `lifted` variant keys, `notes`, contrast `problems`, `newProblems` (every problem this change made, each with the command that fixes it, measured against every problem the theme had before; the text shows the first eight and counts the rest), build `warnings`, what a whole-theme change leaves out (`leftOut`, each `note` with the lines that `run` it), how many misses the changes to the theme leave (`missed`), on how many parts (`missedParts`; a part can miss two ways, its border and its shadow) and which (`missedOn`), all left out when none (`show` lists each), the `preview` page and any `pictures`, and `sheetStale` when sheet.html (made by `show`) still shows the theme as it was before. Experimental: may change or be removed in a patch release.',
|
|
137
|
+
'One checked change written: the `setting`, the one it `replaced`, `was` (for base and mode), the `parts` and `group` it styles, resolved `changedTokens`, part styles written (`styled`), part settings a dial `kept`, newly `lifted` variant keys, `notes`, contrast `problems`, `newProblems` (every problem this change made, each with the command that fixes it, measured against every problem the theme had before; the text shows the first eight and counts the rest), the problems it moved but left failing (`leftProblems`, each with what it was and its fix, left out when none), build `warnings`, what a whole-theme change leaves out (`leftOut`, each `note` with the lines that `run` it), the open fonts it names that do not load until installed (`fontNotLoaded`, each `family` with the line that installs it, left out when none), how many misses the changes to the theme leave (`missed`), on how many parts (`missedParts`; a part can miss two ways, its border and its shadow) and which (`missedOn`), and how many of them this change brought (`missedNew`; the text says the missed line only then), all left out when none (`show` lists each), the `preview` page and any `pictures`, and `sheetStale` when sheet.html (made by `show`) still shows the theme as it was before. Experimental: may change or be removed in a patch release.',
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
value: 'themeEdit.show',
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
* @output Its string, or null when it writes none as it is.
|
|
9
9
|
* @position Read by the module readers that take an import's specifier
|
|
10
10
|
* (foundation/discovery/template-needs.mjs,
|
|
11
|
-
* foundation/render/embedded-imports.mjs),
|
|
11
|
+
* foundation/render/embedded-imports.mjs), by doctor's button-action reader
|
|
12
|
+
* (foundation/discovery/button-actions.mjs) and by the export's prop-value
|
|
13
|
+
* reader (foundation/discovery/written-prop-values.mjs), so all read one
|
|
14
|
+
* rule.
|
|
12
15
|
*/
|
|
13
16
|
/**
|
|
14
17
|
* @param {any} node
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
* @output Its string, or null when it writes none as it is.
|
|
8
8
|
* @position Read by the module readers that take an import's specifier
|
|
9
9
|
* (foundation/discovery/template-needs.mjs,
|
|
10
|
-
* foundation/render/embedded-imports.mjs),
|
|
10
|
+
* foundation/render/embedded-imports.mjs), by doctor's button-action reader
|
|
11
|
+
* (foundation/discovery/button-actions.mjs) and by the export's prop-value
|
|
12
|
+
* reader (foundation/discovery/written-prop-values.mjs), so all read one
|
|
13
|
+
* rule.
|
|
11
14
|
*/
|
|
12
15
|
|
|
13
16
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.18-canary.gb660bba",
|
|
4
4
|
"displayName": "CLI",
|
|
5
5
|
"description": "The Astryx CLI: scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"zod": "^4.6.7"
|
|
131
131
|
},
|
|
132
132
|
"peerDependencies": {
|
|
133
|
-
"@astryxdesign/core": "
|
|
133
|
+
"@astryxdesign/core": "0.7.18-canary.gb660bba"
|
|
134
134
|
},
|
|
135
135
|
"peerDependenciesMeta": {
|
|
136
136
|
"@astryxdesign/core": {
|
|
@@ -138,11 +138,11 @@
|
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|
|
141
|
-
"@astryxdesign/charts": "
|
|
142
|
-
"@astryxdesign/core": "
|
|
143
|
-
"@astryxdesign/lab": "
|
|
144
|
-
"@astryxdesign/theme-neutral": "
|
|
145
|
-
"@astryxdesign/template-icons": "
|
|
141
|
+
"@astryxdesign/charts": "0.7.18-canary.gb660bba",
|
|
142
|
+
"@astryxdesign/core": "0.7.18-canary.gb660bba",
|
|
143
|
+
"@astryxdesign/lab": "0.7.18-canary.gb660bba",
|
|
144
|
+
"@astryxdesign/theme-neutral": "0.7.18-canary.gb660bba",
|
|
145
|
+
"@astryxdesign/template-icons": "0.7.18-canary.gb660bba",
|
|
146
146
|
"@heroicons/react": "^2.2.0",
|
|
147
147
|
"@stylexjs/stylex": "^0.19.1",
|
|
148
148
|
"@types/babel__core": "^7.20.5",
|
|
@@ -161,6 +161,7 @@
|
|
|
161
161
|
"typecheck:authoring": "tsc --project tsconfig.authoring-contract.json",
|
|
162
162
|
"sync:api-types": "node scripts/sync-api-types.mjs",
|
|
163
163
|
"generate:build-id": "node scripts/generate-build-id.mjs",
|
|
164
|
+
"generate:font-families": "node scripts/generate-fontsource-families.mjs",
|
|
164
165
|
"readme": "node scripts/generate-cli-readme.mjs",
|
|
165
166
|
"readme:check": "node scripts/generate-cli-readme.mjs --check"
|
|
166
167
|
}
|