@astryxdesign/cli 0.7.18-canary.gfca8508 → 0.7.18
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/CHANGELOG.md +185 -19
- package/README.md +19 -19
- package/api/component/_adapter.d.mts +2 -1
- package/api/component/_adapter.mjs +2 -1
- package/api/docs/_adapter.d.mts +6 -5
- package/api/docs/_adapter.mjs +36 -5
- package/api/doctor/_adapter.d.mts +6 -3
- package/api/doctor/_adapter.mjs +13 -5
- package/api/doctor/doctor.mjs +2 -2
- package/api/doctor/font-packages.d.mts +36 -0
- package/api/doctor/font-packages.mjs +124 -0
- package/api/doctor/theme-checks.mjs +110 -49
- package/api/experimental.d.mts +0 -2
- package/api/experimental.mjs +0 -12
- package/api/icon/_adapter.d.mts +1 -1
- package/api/icon/_adapter.mjs +1 -0
- package/api/icon/_authoring.mjs +17 -8
- package/api/icon/_default-look.mjs +15 -15
- package/api/icon/add/add.mjs +9 -4
- package/api/icon/exportIconIndex.doc.mjs +1 -1
- package/api/icon/icon.doc.mjs +1 -1
- package/api/icon/icon.type.d.mts +33 -33
- package/api/icon/icon.type.mjs +45 -45
- package/api/icon/iconAdd.doc.mjs +1 -1
- package/api/icon/iconNewSet.doc.mjs +3 -3
- package/api/icon/iconUse.doc.mjs +5 -5
- package/api/icon/rankIconIndex.doc.mjs +1 -1
- package/api/icon/use/use.mjs +4 -4
- package/api/init/run/run.mjs +0 -1
- package/api/integration/add-helpers.mjs +1 -1
- package/api/render/_adapter.mjs +7 -1
- package/api/search/ORDERING.md +1 -1
- package/api/search/_candidate-score.mjs +20 -0
- package/api/search/_words.d.mts +8 -0
- package/api/search/_words.mjs +15 -0
- package/api/template/template.type.d.mts +2 -2
- package/api/template/template.type.mjs +2 -2
- package/api/theme/_adapter.mjs +19 -11
- package/api/theme/build/build.d.mts +19 -51
- package/api/theme/build/build.mjs +195 -189
- package/api/theme/build/font-warning.d.mts +19 -2
- package/api/theme/build/font-warning.mjs +46 -5
- package/api/theme/generateTonalPalette.doc.mjs +1 -1
- package/api/theme/palette/generate/derive-look.mjs +108 -37
- package/api/theme/palette/generate/mapping.mjs +2 -0
- package/api/theme/template/template.d.mts +0 -17
- package/api/theme/template/template.mjs +1 -42
- package/api/theme/theme.type.d.mts +5 -4
- package/api/theme/theme.type.mjs +5 -4
- package/api/theme/themePaletteGenerate.doc.mjs +1 -1
- package/api/theme/themeRemove.doc.mjs +1 -1
- package/assets/codemods/transforms/v0.7.0/preserve-bottom-sheet-content-padding.mjs +3 -1
- package/assets/component-list.generated.json +1 -1
- package/assets/discover/official-packages.json +26 -2
- package/assets/docs/author-a-theme.doc.mjs +6 -5
- package/assets/docs/browser-support.doc.mjs +1 -0
- package/assets/docs/icons.doc.mjs +8 -7
- package/assets/docs/motion.doc.mjs +46 -0
- package/assets/docs/theme.doc.dense.mjs +6 -17
- package/assets/docs/theme.doc.mjs +6 -16
- package/assets/docs/theme.doc.zh.mjs +6 -16
- package/assets/docs/tree/ci-and-containers.doc.mjs +1 -1
- package/assets/docs/tree/font-setup.doc.mjs +30 -0
- package/assets/docs/tree/icon-sets.doc.mjs +1 -1
- package/assets/docs/tree/template-icons.doc.mjs +3 -3
- package/assets/docs/tree/tokens-color.doc.mjs +5 -0
- package/assets/docs/tree/tokens.doc.mjs +4 -3
- package/assets/docs/tree/updates.doc.mjs +1 -1
- package/assets/docs-routes.generated.json +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/icons/definitions/drag.doc.mjs +1 -0
- package/assets/search-catalog.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/Card/SelectableCardElevated.doc.mjs +1 -1
- package/assets/templates/blocks/components/Card/SelectableCardElevated.tsx +20 -10
- package/assets/templates/blocks/components/Card/SelectableCardShowcase.doc.mjs +1 -1
- package/assets/templates/blocks/components/Card/SelectableCardShowcase.tsx +36 -16
- package/assets/templates/blocks/components/ChatComposerInput/ChatComposerInputMentionTrigger.tsx +6 -0
- package/assets/templates/blocks/components/ChatComposerInput/ChatComposerInputMultipleTriggers.tsx +6 -0
- package/assets/templates/blocks/components/Hooks/useIndicatorFocusRingHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Hooks/useIndicatorFocusRingHookUsage.tsx +63 -0
- package/assets/templates/blocks/components/Hooks/useLongPressHookUsage.doc.mjs +29 -0
- package/assets/templates/blocks/components/Hooks/useLongPressHookUsage.tsx +237 -0
- package/assets/templates/blocks/components/SideNav/SideNavShowcase.tsx +10 -72
- package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.doc.mjs +1 -1
- package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.tsx +7 -7
- package/assets/templates/blocks/components/Table/TableCustomRowTable.doc.mjs +14 -0
- package/assets/templates/blocks/components/Table/TableCustomRowTable.tsx +96 -0
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ai-chat-landing/page.tsx +4 -0
- package/assets/templates/pages/dashboard-scorecard/page.tsx +26 -7
- package/assets/templates/pages/editor/page.tsx +13 -3
- package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +2 -2
- package/assets/templates/themes/butter/butterTheme.ts +12 -10
- package/assets/templates/themes/butter/icons.tsx +2 -0
- package/assets/templates/themes/chocolate/chocolateTheme.ts +1 -0
- package/assets/templates/themes/chocolate/icons.tsx +2 -0
- package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +1 -1
- package/assets/templates/themes/gothic/gothicTheme.ts +1 -0
- package/assets/templates/themes/gothic/icons.tsx +2 -0
- package/assets/templates/themes/matcha/icons.tsx +2 -0
- package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +2 -2
- package/assets/templates/themes/matcha/matchaTheme.ts +1 -0
- package/assets/templates/themes/neutral/icons.tsx +2 -0
- package/assets/templates/themes/neutral/neutralPaletteRefs.generated.ts +2 -2
- package/assets/templates/themes/neutral/neutralTheme.ts +1 -0
- package/assets/templates/themes/stone/icons.tsx +2 -0
- package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +1 -1
- package/assets/templates/themes/stone/stoneTheme.ts +1 -0
- package/assets/templates/themes/y2k/icons.tsx +2 -0
- package/assets/templates/themes/y2k/y2kTheme.ts +1 -0
- package/assets/theme.template.ts +9 -5
- package/authoring/config/parse.mjs +1 -1
- package/authoring/doctypes/base/type.ts +2 -3
- package/authoring/doctypes/component/component.doc.mjs +1 -1
- package/authoring/doctypes/icon-set/icon-names.mjs +1 -0
- package/authoring/integration/integration.doc.mjs +1 -1
- package/authoring/integration/type.ts +1 -1
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/experimental/icon.mjs +7 -7
- package/clients/cli/commands/experimental/index.mjs +0 -5
- package/clients/cli/commands/experimental-icon-new-set.doc.mjs +2 -2
- package/clients/cli/commands/experimental-icon-use.doc.mjs +4 -4
- package/clients/cli/commands/experimental-icon.doc.mjs +1 -1
- package/clients/cli/commands/experimental.doc.mjs +2 -6
- package/clients/cli/commands/template.mjs +1 -1
- package/clients/cli/commands/theme-build.doc.mjs +8 -1
- package/clients/cli/commands/theme-palette-generate.doc.mjs +1 -1
- package/clients/cli/commands/theme-remove.doc.mjs +1 -1
- package/clients/cli/commands/theme.doc.mjs +1 -11
- package/clients/cli/commands/theme.mjs +110 -475
- package/clients/cli/commands.generated.json +1 -1
- package/clients/cli/index.mjs +4 -34
- package/clients/cli/lib/base-gate.mjs +2 -3
- package/clients/cli/lib/cli-error.mjs +8 -72
- package/clients/cli/lib/define-command.mjs +0 -19
- package/clients/cli/lib/json-shim.mjs +11 -633
- package/clients/cli/lib/manifest.mjs +0 -4
- package/clients/cli/lib/stray-option.mjs +1 -2
- package/clients/cli/manifest.generated.json +1 -1
- package/foundation/agent-docs/agent-docs.mjs +1 -1
- package/foundation/color/css-color.mjs +2 -3
- package/foundation/discovery/app-layout.d.mts +13 -0
- package/foundation/discovery/app-layout.mjs +35 -0
- package/foundation/discovery/fixture-refs.d.mts +51 -0
- package/foundation/discovery/fixture-refs.mjs +351 -0
- package/foundation/discovery/icon-definition-discovery.mjs +1 -1
- package/foundation/discovery/icon-ranking.mjs +2 -2
- package/foundation/discovery/icon-set-checks.mjs +1 -1
- package/foundation/discovery/icon-set-discovery.mjs +1 -1
- package/foundation/discovery/icon-set-writer.d.mts +24 -7
- package/foundation/discovery/icon-set-writer.mjs +66 -22
- package/foundation/discovery/static-descriptor.d.mts +49 -0
- package/foundation/discovery/static-descriptor.mjs +548 -0
- package/foundation/discovery/template-adapter.d.mts +0 -47
- package/foundation/discovery/template-adapter.mjs +1 -333
- package/foundation/discovery/theme-discovery.d.mts +6 -47
- package/foundation/discovery/theme-discovery.mjs +15 -537
- package/foundation/doc-compiler/import.mjs +1 -1
- package/foundation/env/user-dirs.d.mts +5 -2
- package/foundation/env/user-dirs.mjs +12 -5
- package/foundation/fonts/next-font.d.mts +26 -0
- package/foundation/fonts/next-font.mjs +149 -0
- package/foundation/fs/empty-folder.mjs +2 -2
- package/foundation/fs/read-record.mjs +11 -4
- package/foundation/pictures/pictures.d.mts +1 -45
- package/foundation/pictures/pictures.mjs +8 -8
- package/foundation/release/folder-lock.mjs +3 -2
- package/foundation/render/cut-short.d.mts +2 -2
- package/foundation/render/cut-short.mjs +2 -2
- package/foundation/render/drawn-contrast.d.mts +2 -2
- package/foundation/render/drawn-contrast.mjs +2 -2
- package/foundation/render/font-probe.d.mts +2 -2
- package/foundation/render/font-probe.mjs +2 -2
- package/foundation/render/layers.mjs +1 -2
- package/foundation/render/package-resolve-hooks.d.mts +25 -5
- package/foundation/render/package-resolve-hooks.mjs +77 -14
- package/foundation/render/page-worker.mjs +24 -12
- package/foundation/render/part-boxes.d.mts +2 -3
- package/foundation/render/part-boxes.mjs +2 -3
- package/foundation/render/picture-chrome.mjs +5 -0
- package/foundation/render/render-page.d.mts +1 -1
- package/foundation/render/render-page.mjs +4 -5
- package/foundation/render/single-copy-hooks.d.mts +2 -0
- package/foundation/render/single-copy-hooks.mjs +2 -0
- package/foundation/response/error-codes.doc.mjs +14 -14
- package/foundation/response/error-codes.mjs +13 -13
- package/foundation/response/response-types.doc.mjs +7 -68
- package/foundation/runtime/css-tree.mjs +2 -2
- package/foundation/runtime/word-table.d.mts +1 -1
- package/foundation/runtime/word-table.mjs +1 -1
- package/foundation/suggest/other-command.d.mts +52 -15
- package/foundation/suggest/other-command.mjs +168 -45
- package/foundation/text/suggest-order.d.mts +7 -0
- package/foundation/text/suggest-order.mjs +1 -1
- package/package.json +7 -8
- package/api/theme-edit/_adapter.d.mts +0 -228
- package/api/theme-edit/_adapter.mjs +0 -2025
- package/api/theme-edit/_catalog.d.mts +0 -172
- package/api/theme-edit/_catalog.mjs +0 -806
- package/api/theme-edit/_check.d.mts +0 -391
- package/api/theme-edit/_check.mjs +0 -9370
- package/api/theme-edit/_color.d.mts +0 -135
- package/api/theme-edit/_color.mjs +0 -480
- package/api/theme-edit/_compiler.d.mts +0 -77
- package/api/theme-edit/_compiler.mjs +0 -1053
- package/api/theme-edit/_context.d.mts +0 -399
- package/api/theme-edit/_context.mjs +0 -1778
- package/api/theme-edit/_css.d.mts +0 -169
- package/api/theme-edit/_css.mjs +0 -1167
- package/api/theme-edit/_edit.d.mts +0 -167
- package/api/theme-edit/_edit.mjs +0 -11220
- package/api/theme-edit/_how-commands.d.mts +0 -315
- package/api/theme-edit/_how-commands.mjs +0 -1664
- package/api/theme-edit/_how-question.d.mts +0 -341
- package/api/theme-edit/_how-question.mjs +0 -33339
- package/api/theme-edit/_how-sides.d.mts +0 -22
- package/api/theme-edit/_how-sides.mjs +0 -173
- package/api/theme-edit/_how-steps.d.mts +0 -42
- package/api/theme-edit/_how-steps.mjs +0 -208
- package/api/theme-edit/_how-values.d.mts +0 -29
- package/api/theme-edit/_how-values.mjs +0 -111
- package/api/theme-edit/_how-words.d.mts +0 -15
- package/api/theme-edit/_how-words.mjs +0 -239
- package/api/theme-edit/_how.d.mts +0 -55
- package/api/theme-edit/_how.mjs +0 -2388
- package/api/theme-edit/_importers.d.mts +0 -38
- package/api/theme-edit/_importers.mjs +0 -188
- package/api/theme-edit/_marks.d.mts +0 -39
- package/api/theme-edit/_marks.mjs +0 -67
- package/api/theme-edit/_missed.d.mts +0 -56
- package/api/theme-edit/_missed.mjs +0 -1128
- package/api/theme-edit/_name-rule.d.mts +0 -11
- package/api/theme-edit/_name-rule.mjs +0 -12
- package/api/theme-edit/_normal.d.mts +0 -365
- package/api/theme-edit/_normal.mjs +0 -1978
- package/api/theme-edit/_overview.d.mts +0 -9
- package/api/theme-edit/_overview.mjs +0 -293
- package/api/theme-edit/_palette.d.mts +0 -616
- package/api/theme-edit/_palette.mjs +0 -2776
- package/api/theme-edit/_part-pieces.d.mts +0 -54
- package/api/theme-edit/_part-pieces.mjs +0 -179
- package/api/theme-edit/_part-words.d.mts +0 -39
- package/api/theme-edit/_part-words.mjs +0 -242
- package/api/theme-edit/_parts.d.mts +0 -402
- package/api/theme-edit/_parts.mjs +0 -2322
- package/api/theme-edit/_picture-traits.d.mts +0 -259
- package/api/theme-edit/_picture-traits.mjs +0 -1030
- package/api/theme-edit/_png.d.mts +0 -94
- package/api/theme-edit/_png.mjs +0 -479
- package/api/theme-edit/_preview-app.d.mts +0 -172
- package/api/theme-edit/_preview-app.mjs +0 -6430
- package/api/theme-edit/_preview.d.mts +0 -484
- package/api/theme-edit/_preview.mjs +0 -2775
- package/api/theme-edit/_project.d.mts +0 -207
- package/api/theme-edit/_project.mjs +0 -643
- package/api/theme-edit/_resolved.d.mts +0 -46
- package/api/theme-edit/_resolved.mjs +0 -800
- package/api/theme-edit/_set-line.d.mts +0 -29
- package/api/theme-edit/_set-line.mjs +0 -100
- package/api/theme-edit/_settings.d.mts +0 -2426
- package/api/theme-edit/_settings.mjs +0 -18449
- package/api/theme-edit/_tables.d.mts +0 -227
- package/api/theme-edit/_tables.mjs +0 -1128
- package/api/theme-edit/_text-looks.d.mts +0 -78
- package/api/theme-edit/_text-looks.mjs +0 -376
- package/api/theme-edit/_vet.d.mts +0 -50
- package/api/theme-edit/_vet.mjs +0 -166
- package/api/theme-edit/how/how.d.mts +0 -17
- package/api/theme-edit/how/how.mjs +0 -28
- package/api/theme-edit/new/new.d.mts +0 -11
- package/api/theme-edit/new/new.mjs +0 -22
- package/api/theme-edit/preview-add/preview-add.d.mts +0 -14
- package/api/theme-edit/preview-add/preview-add.mjs +0 -25
- package/api/theme-edit/preview-app/preview-app.d.mts +0 -13
- package/api/theme-edit/preview-app/preview-app.mjs +0 -24
- package/api/theme-edit/preview-list/preview-list.d.mts +0 -10
- package/api/theme-edit/preview-list/preview-list.mjs +0 -21
- package/api/theme-edit/preview-remove/preview-remove.d.mts +0 -12
- package/api/theme-edit/preview-remove/preview-remove.mjs +0 -23
- package/api/theme-edit/set/set.d.mts +0 -13
- package/api/theme-edit/set/set.mjs +0 -24
- package/api/theme-edit/show/show.d.mts +0 -13
- package/api/theme-edit/show/show.mjs +0 -24
- package/api/theme-edit/theme-edit.d.mts +0 -12
- package/api/theme-edit/theme-edit.mjs +0 -36
- package/api/theme-edit/theme-edit.type.d.mts +0 -730
- package/api/theme-edit/theme-edit.type.mjs +0 -342
- package/api/theme-edit/themeEditHow.doc.d.mts +0 -6
- package/api/theme-edit/themeEditHow.doc.mjs +0 -105
- package/api/theme-edit/themeEditNew.doc.d.mts +0 -5
- package/api/theme-edit/themeEditNew.doc.mjs +0 -112
- package/api/theme-edit/themeEditPreviewAdd.doc.d.mts +0 -6
- package/api/theme-edit/themeEditPreviewAdd.doc.mjs +0 -121
- package/api/theme-edit/themeEditPreviewApp.doc.d.mts +0 -6
- package/api/theme-edit/themeEditPreviewApp.doc.mjs +0 -87
- package/api/theme-edit/themeEditPreviewList.doc.d.mts +0 -6
- package/api/theme-edit/themeEditPreviewList.doc.mjs +0 -62
- package/api/theme-edit/themeEditPreviewRemove.doc.d.mts +0 -6
- package/api/theme-edit/themeEditPreviewRemove.doc.mjs +0 -96
- package/api/theme-edit/themeEditSet.doc.d.mts +0 -6
- package/api/theme-edit/themeEditSet.doc.mjs +0 -175
- package/api/theme-edit/themeEditShow.doc.d.mts +0 -6
- package/api/theme-edit/themeEditShow.doc.mjs +0 -118
- package/api/theme-edit/themeEditUndo.doc.d.mts +0 -6
- package/api/theme-edit/themeEditUndo.doc.mjs +0 -133
- package/api/theme-edit/undo/undo.d.mts +0 -13
- package/api/theme-edit/undo/undo.mjs +0 -24
- package/assets/preview-app/README.md +0 -6
- package/assets/preview-app/css.d.ts +0 -5
- package/assets/preview-app/gitignore +0 -4
- package/assets/preview-app/next.config.mjs +0 -12
- package/assets/preview-app/package.json +0 -24
- package/assets/preview-app/src/app/globals.css +0 -6
- package/assets/preview-app/src/app/layout.tsx +0 -21
- package/assets/preview-app/src/app/page.tsx +0 -94
- package/assets/preview-app/src/app/providers.tsx +0 -16
- package/assets/preview-app/tsconfig.json +0 -27
- package/clients/cli/commands/experimental/theme.mjs +0 -2990
- package/clients/cli/commands/experimental-theme-add.doc.mjs +0 -80
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +0 -98
- package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +0 -196
- package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +0 -174
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +0 -139
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +0 -77
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +0 -105
- package/clients/cli/commands/experimental-theme-editor.doc.mjs +0 -49
- package/clients/cli/commands/experimental-theme-eject.doc.mjs +0 -72
- package/clients/cli/commands/experimental-theme-list.doc.mjs +0 -49
- package/clients/cli/commands/experimental-theme-preview-add.doc.mjs +0 -88
- package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +0 -61
- package/clients/cli/commands/experimental-theme-preview-list.doc.mjs +0 -48
- package/clients/cli/commands/experimental-theme-preview-remove.doc.mjs +0 -59
- package/clients/cli/commands/experimental-theme-preview.doc.mjs +0 -41
- package/clients/cli/commands/experimental-theme-remove.doc.mjs +0 -57
- package/clients/cli/commands/experimental-theme-targets.doc.mjs +0 -62
- package/clients/cli/commands/experimental-theme-template.doc.mjs +0 -63
- package/clients/cli/commands/experimental-theme-use.doc.mjs +0 -57
- package/clients/cli/commands/experimental-theme.doc.mjs +0 -60
- package/foundation/fonts/fontsource-families.generated.d.mts +0 -5
- package/foundation/fonts/fontsource-families.generated.mjs +0 -2110
|
@@ -49,7 +49,7 @@ import {assetDataUri, isAssetPath} from './assets.mjs';
|
|
|
49
49
|
import {NOT_AN_IMAGE, showsImage} from './image-attributes.mjs';
|
|
50
50
|
import {parseSrcset} from './srcset.mjs';
|
|
51
51
|
import {SINGLE_COPY, isServedPackage, packageOf, resolveServed, servedImportTarget} from './served-packages.mjs';
|
|
52
|
-
import {packageResolveHooks} from './package-resolve-hooks.mjs';
|
|
52
|
+
import {noteLinkedFolder, packageLookups, packageResolveHooks} from './package-resolve-hooks.mjs';
|
|
53
53
|
import {findNodeModulesPackage} from '../fs/paths.mjs';
|
|
54
54
|
import {importSpecifiers, moduleImports} from './embedded-imports.mjs';
|
|
55
55
|
import {sha256} from './source-block.mjs';
|
|
@@ -323,6 +323,20 @@ const NODE_MODULES = `${path.sep}node_modules${path.sep}`;
|
|
|
323
323
|
const isLocal = file =>
|
|
324
324
|
!file.includes(NODE_MODULES) && (file === entry || file.startsWith(SCOPE_PREFIX));
|
|
325
325
|
|
|
326
|
+
/**
|
|
327
|
+
* A folder the page's own modules live in, or one that holds the page: never
|
|
328
|
+
* the folder of another package. @param {string} folder with a trailing separator
|
|
329
|
+
*/
|
|
330
|
+
const pageFolder = folder => isLocal(folder) || entry.startsWith(folder);
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* What the package resolve hook keeps (see package-resolve-hooks.mjs). The
|
|
334
|
+
* linked packages are noted as linkedPackageRoots reads the links, so imports
|
|
335
|
+
* inside a linked package resolve by path even when its first file is
|
|
336
|
+
* imported by its path, not by the package's name.
|
|
337
|
+
*/
|
|
338
|
+
const PACKAGE_LOOKUPS = packageLookups();
|
|
339
|
+
|
|
326
340
|
/**
|
|
327
341
|
* The real folders of the packages that a `node_modules` folder links to
|
|
328
342
|
* inside the folder whose modules the page carries (`npm link`, a `file:`
|
|
@@ -344,8 +358,8 @@ function linkedPackageRoots() {
|
|
|
344
358
|
const scanned = new Set();
|
|
345
359
|
/** @type {string[]} */
|
|
346
360
|
const found = [];
|
|
347
|
-
/** @param {string} link */
|
|
348
|
-
const addIfLinkedIn = link => {
|
|
361
|
+
/** @param {string} link @param {string} name the package the link is named for */
|
|
362
|
+
const addIfLinkedIn = (link, name) => {
|
|
349
363
|
let real;
|
|
350
364
|
try {
|
|
351
365
|
if (!fs.lstatSync(link).isSymbolicLink()) return;
|
|
@@ -353,6 +367,7 @@ function linkedPackageRoots() {
|
|
|
353
367
|
} catch {
|
|
354
368
|
return;
|
|
355
369
|
}
|
|
370
|
+
noteLinkedFolder(name, real, PACKAGE_LOOKUPS, pageFolder);
|
|
356
371
|
const folder = real + path.sep;
|
|
357
372
|
if (isLocal(folder) && !entry.startsWith(folder) && !roots.has(folder)) {
|
|
358
373
|
roots.add(folder);
|
|
@@ -375,11 +390,11 @@ function linkedPackageRoots() {
|
|
|
375
390
|
for (const name of names) {
|
|
376
391
|
const link = path.join(modules, name);
|
|
377
392
|
if (!name.startsWith('@')) {
|
|
378
|
-
addIfLinkedIn(link);
|
|
393
|
+
addIfLinkedIn(link, name);
|
|
379
394
|
continue;
|
|
380
395
|
}
|
|
381
396
|
try {
|
|
382
|
-
for (const scoped of fs.readdirSync(link)) addIfLinkedIn(path.join(link, scoped));
|
|
397
|
+
for (const scoped of fs.readdirSync(link)) addIfLinkedIn(path.join(link, scoped), `${name}/${scoped}`);
|
|
383
398
|
} catch {
|
|
384
399
|
// A scope that cannot be read holds no package that Node can load.
|
|
385
400
|
}
|
|
@@ -1646,17 +1661,14 @@ if (servedParent && Object.keys(SINGLE_COPY_ALIASES).length > 0) {
|
|
|
1646
1661
|
}
|
|
1647
1662
|
// Imports between the files of an installed or a linked package resolve by
|
|
1648
1663
|
// path (a Node without in-thread hooks resolves them itself). The hook
|
|
1649
|
-
// answers
|
|
1650
|
-
//
|
|
1664
|
+
// answers relative imports inside a package, and a package name only with
|
|
1665
|
+
// the answer the next resolvers, single-copy-hooks.mjs among them, gave from
|
|
1666
|
+
// the same folder, so it never changes what single-copy-hooks.mjs resolves.
|
|
1651
1667
|
// The page's own folders, and a folder that holds the page, are never a
|
|
1652
1668
|
// linked package's: the page's modules compile as its own.
|
|
1653
1669
|
const registerHooks = /** @type {any} */ (Module).registerHooks;
|
|
1654
1670
|
if (typeof registerHooks === 'function')
|
|
1655
|
-
registerHooks(
|
|
1656
|
-
packageResolveHooks(undefined, {
|
|
1657
|
-
skip: folder => isLocal(folder) || entry.startsWith(folder),
|
|
1658
|
-
}),
|
|
1659
|
-
);
|
|
1671
|
+
registerHooks(packageResolveHooks(PACKAGE_LOOKUPS, {skip: pageFolder}));
|
|
1660
1672
|
|
|
1661
1673
|
/** What the StyleX compiler reads as a theme or constants file, by name. */
|
|
1662
1674
|
const STYLEX_THEME_FILE = /\.(?:stylex(?:\.const)?|transformed)(?:\.(?:js|ts|tsx|jsx|mjs|cjs))?$/;
|
|
@@ -19,9 +19,8 @@ export function partBoxes(parts: string[]): Record<string, Array<[number, number
|
|
|
19
19
|
* `PART_BOXES_PREFIX`, the line prefix a picture script prints it after.
|
|
20
20
|
* @position run by picture-chrome.mjs and picture-playwright.mjs for a job
|
|
21
21
|
* that names parts to measure, once the page is drawn as the picture shows
|
|
22
|
-
* it; read back by `
|
|
23
|
-
* script's stdout.
|
|
24
|
-
* what a change of size moves on the page.
|
|
22
|
+
* it; read back by `takePictures` in foundation/pictures/pictures.mjs from
|
|
23
|
+
* the script's stdout.
|
|
25
24
|
*/
|
|
26
25
|
/** The line prefix a picture script prints the measurement after. */
|
|
27
26
|
export const PART_BOXES_PREFIX: "astryx-part-boxes:";
|
|
@@ -9,9 +9,8 @@
|
|
|
9
9
|
* `PART_BOXES_PREFIX`, the line prefix a picture script prints it after.
|
|
10
10
|
* @position run by picture-chrome.mjs and picture-playwright.mjs for a job
|
|
11
11
|
* that names parts to measure, once the page is drawn as the picture shows
|
|
12
|
-
* it; read back by `
|
|
13
|
-
* script's stdout.
|
|
14
|
-
* what a change of size moves on the page.
|
|
12
|
+
* it; read back by `takePictures` in foundation/pictures/pictures.mjs from
|
|
13
|
+
* the script's stdout.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
/* global document, getComputedStyle -- partBoxes runs in the page */
|
|
@@ -52,6 +52,11 @@ const browser = spawn(
|
|
|
52
52
|
'--no-sandbox',
|
|
53
53
|
'--hide-scrollbars',
|
|
54
54
|
'--remote-debugging-pipe',
|
|
55
|
+
// The throwaway profile stores no secret. Without these flags, each
|
|
56
|
+
// browser start asks the system keychain (macOS) or password store
|
|
57
|
+
// (Linux) for access, and the person sees a dialog.
|
|
58
|
+
'--use-mock-keychain',
|
|
59
|
+
'--password-store=basic',
|
|
55
60
|
// The browser's own network off: a picture asks the network for nothing.
|
|
56
61
|
...QUIET_BROWSER_ARGS,
|
|
57
62
|
`--user-data-dir=${path.join(os.tmpdir(), 'profile')}`,
|
|
@@ -216,7 +216,7 @@ export function oneColorModeOf(markup: string, declared: "light" | "dark" | "bot
|
|
|
216
216
|
* `keepClassNames` keeps every class of the first paint as written,
|
|
217
217
|
* for a caller that styles the markup with its own copy of the styles.
|
|
218
218
|
* `markupOnly` renders the markup and its styles without the script, for a
|
|
219
|
-
* caller that shows the markup itself
|
|
219
|
+
* caller that shows the markup itself; it writes no file
|
|
220
220
|
* and reaches no network. The render fetches each https image the page
|
|
221
221
|
* names, once, so the file carries it (remote-images.mjs; `remoteImages`:
|
|
222
222
|
* the fetch and its time limits, for tests).
|
|
@@ -1321,8 +1321,7 @@ function inlineAssets(text, kind, ctx) {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
const found = named.file;
|
|
1323
1323
|
// A stylesheet's file too large to carry, where the caller names such
|
|
1324
|
-
// files itself
|
|
1325
|
-
// missing one is.
|
|
1324
|
+
// files itself: left as it is, as a missing one is.
|
|
1326
1325
|
if (
|
|
1327
1326
|
kind === 'css' &&
|
|
1328
1327
|
ctx.leaveLargeStyleAssets &&
|
|
@@ -2012,7 +2011,7 @@ function schemeCssFor(mode) {
|
|
|
2012
2011
|
* `keepClassNames` keeps every class of the first paint as written,
|
|
2013
2012
|
* for a caller that styles the markup with its own copy of the styles.
|
|
2014
2013
|
* `markupOnly` renders the markup and its styles without the script, for a
|
|
2015
|
-
* caller that shows the markup itself
|
|
2014
|
+
* caller that shows the markup itself; it writes no file
|
|
2016
2015
|
* and reaches no network. The render fetches each https image the page
|
|
2017
2016
|
* names, once, so the file carries it (remote-images.mjs; `remoteImages`:
|
|
2018
2017
|
* the fetch and its time limits, for tests).
|
|
@@ -2760,8 +2759,8 @@ export async function renderPage(entry, options = {}) {
|
|
|
2760
2759
|
: path.basename(entry).replace(/\.[^.]+$/, ''));
|
|
2761
2760
|
const generator = `<meta name="generator" content="Astryx${options.version ? ` ${escapeHtml(options.version)}` : ''}">`;
|
|
2762
2761
|
const importedSheets = /** @type {{file: string, css: string}[]} */ (message.importedCss ?? []);
|
|
2763
|
-
//
|
|
2764
|
-
//
|
|
2762
|
+
// A caller that shows each mode itself gets markup-only pages with both
|
|
2763
|
+
// schemes; a written file shows the theme's one mode.
|
|
2765
2764
|
// The theme's stylesheet may come through the page's own CSS, by an
|
|
2766
2765
|
// `@import` that the file inlines.
|
|
2767
2766
|
const modeSheets = options.markupOnly
|
|
@@ -9,6 +9,8 @@ export function initialize(data: {
|
|
|
9
9
|
names: string[];
|
|
10
10
|
}): void;
|
|
11
11
|
/**
|
|
12
|
+
* The answer depends only on the name and the importing file's folder, never
|
|
13
|
+
* on the file itself: package-resolve-hooks.mjs keeps it for the folder.
|
|
12
14
|
* @param {string} specifier
|
|
13
15
|
* @param {{parentURL?: string}} context
|
|
14
16
|
* @param {(specifier: string, context?: object) => Promise<unknown>} nextResolve
|
|
@@ -27,6 +27,8 @@ export function initialize(data) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
+
* The answer depends only on the name and the importing file's folder, never
|
|
31
|
+
* on the file itself: package-resolve-hooks.mjs keeps it for the folder.
|
|
30
32
|
* @param {string} specifier
|
|
31
33
|
* @param {{parentURL?: string}} context
|
|
32
34
|
* @param {(specifier: string, context?: object) => Promise<unknown>} nextResolve
|
|
@@ -359,7 +359,7 @@ export const doc = {
|
|
|
359
359
|
value: 'ERR_RENDER_FAILED',
|
|
360
360
|
stability: 'experimental',
|
|
361
361
|
description:
|
|
362
|
-
"The page threw while rendering, or Node crashed while it rendered the page. Raised by the experimental export command, which then writes nothing
|
|
362
|
+
"The page threw while rendering, or Node crashed while it rendered the page. Raised by the experimental export command, which then writes nothing. A React that is not installed is ERR_RENDER_MISSING_DEPENDENCY.",
|
|
363
363
|
},
|
|
364
364
|
{
|
|
365
365
|
value: 'ERR_RENDER_NOT_ASTRYX',
|
|
@@ -389,79 +389,79 @@ export const doc = {
|
|
|
389
389
|
value: 'ERR_THEME_BAD_VALUE',
|
|
390
390
|
stability: 'experimental',
|
|
391
391
|
description:
|
|
392
|
-
'A value does not fit what it sets: not a color for a color token, not a size for a size, a step (`more`/`less`) on something that is not a dial, or a word a dial does not take. Nothing was changed.
|
|
392
|
+
'A value does not fit what it sets: not a color for a color token, not a size for a size, a step (`more`/`less`) on something that is not a dial, or a word a dial does not take. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.',
|
|
393
393
|
},
|
|
394
394
|
{
|
|
395
395
|
value: 'ERR_THEME_NO_MODE',
|
|
396
396
|
stability: 'experimental',
|
|
397
397
|
description:
|
|
398
|
-
'`--mode light|dark` was given for something that cannot differ between light and dark: a size, a number, a font, or a property that is not a plain color, or a theme that has only one mode. Nothing was changed.
|
|
398
|
+
'`--mode light|dark` was given for something that cannot differ between light and dark: a size, a number, a font, or a property that is not a plain color, or a theme that has only one mode. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.',
|
|
399
399
|
},
|
|
400
400
|
{
|
|
401
401
|
value: 'ERR_THEME_UNKNOWN_PART',
|
|
402
402
|
stability: 'experimental',
|
|
403
403
|
description:
|
|
404
|
-
'`--on` names something that is not a themeable part or a family. Nothing was changed.
|
|
404
|
+
'`--on` names something that is not a themeable part or a family. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.',
|
|
405
405
|
},
|
|
406
406
|
{
|
|
407
407
|
value: 'ERR_THEME_UNKNOWN_VARIANT',
|
|
408
408
|
stability: 'experimental',
|
|
409
409
|
description:
|
|
410
|
-
'`--when` names a prop the part does not have, or a value that prop does not take. Nothing was changed.
|
|
410
|
+
'`--when` names a prop the part does not have, or a value that prop does not take. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.',
|
|
411
411
|
},
|
|
412
412
|
{
|
|
413
413
|
value: 'ERR_THEME_UNKNOWN_STATE',
|
|
414
414
|
stability: 'experimental',
|
|
415
415
|
description:
|
|
416
|
-
'`--state` names a state the part does not have. Nothing was changed.
|
|
416
|
+
'`--state` names a state the part does not have. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.',
|
|
417
417
|
},
|
|
418
418
|
{
|
|
419
419
|
value: 'ERR_THEME_PRIVATE_TOKEN',
|
|
420
420
|
stability: 'experimental',
|
|
421
421
|
description:
|
|
422
|
-
'The setting names a variable private to a component (`--_...`), which a theme cannot set. Nothing was changed.
|
|
422
|
+
'The setting names a variable private to a component (`--_...`), which a theme cannot set. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.',
|
|
423
423
|
},
|
|
424
424
|
{
|
|
425
425
|
value: 'ERR_THEME_UNKNOWN_TOKEN',
|
|
426
426
|
stability: 'experimental',
|
|
427
427
|
description:
|
|
428
|
-
'The setting names a design token that does not exist. Nothing was changed.
|
|
428
|
+
'The setting names a design token that does not exist. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.',
|
|
429
429
|
},
|
|
430
430
|
{
|
|
431
431
|
value: 'ERR_THEME_NO_EFFECT',
|
|
432
432
|
stability: 'experimental',
|
|
433
433
|
description:
|
|
434
|
-
'The change could not take effect: neither the part nor any part inside it reads the token (or, for the whole theme, no part reads it). The suggestions name the token the part really reads and the property that sets it directly. Nothing was changed.
|
|
434
|
+
'The change could not take effect: neither the part nor any part inside it reads the token (or, for the whole theme, no part reads it). The suggestions name the token the part really reads and the property that sets it directly. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.',
|
|
435
435
|
},
|
|
436
436
|
{
|
|
437
437
|
value: 'ERR_THEME_NOT_CHECKED',
|
|
438
438
|
stability: 'experimental',
|
|
439
439
|
description:
|
|
440
|
-
"Not an error and never an exit code: the change is saved, but the components could not be rendered, so it was not checked against what they read and has no preview. The result carries it in `notChecked` with the cause, such as two copies of React (the app's and the one Core resolves).
|
|
440
|
+
"Not an error and never an exit code: the change is saved, but the components could not be rendered, so it was not checked against what they read and has no preview. The result carries it in `notChecked` with the cause, such as two copies of React (the app's and the one Core resolves). No command uses it now: the experimental theme editor that used it was removed.",
|
|
441
441
|
},
|
|
442
442
|
{
|
|
443
443
|
value: 'ERR_THEME_BUSY',
|
|
444
444
|
stability: 'experimental',
|
|
445
445
|
description:
|
|
446
|
-
'Another command is changing the same theme (or the same preview) and did not finish within 30 seconds. Commands on one theme run one after the other; nothing was changed. Run the command again.
|
|
446
|
+
'Another command is changing the same theme (or the same preview) and did not finish within 30 seconds. Commands on one theme run one after the other; nothing was changed. Run the command again. No command uses it now: the experimental theme editor that used it was removed.',
|
|
447
447
|
},
|
|
448
448
|
{
|
|
449
449
|
value: 'ERR_THEME_UNKNOWN_THING',
|
|
450
450
|
stability: 'experimental',
|
|
451
451
|
description:
|
|
452
|
-
'The thing to change is not a dial, a design token, or a CSS property. Nothing was changed.
|
|
452
|
+
'The thing to change is not a dial, a design token, or a CSS property. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.',
|
|
453
453
|
},
|
|
454
454
|
{
|
|
455
455
|
value: 'ERR_THEME_NOT_SET',
|
|
456
456
|
stability: 'experimental',
|
|
457
457
|
description:
|
|
458
|
-
'`editor undo <theme> <thing>` names a setting the theme does not have (with those `--on`, `--when`, `--state` and `--mode`). Nothing was changed.
|
|
458
|
+
'`editor undo <theme> <thing>` names a setting the theme does not have (with those `--on`, `--when`, `--state` and `--mode`). Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.',
|
|
459
459
|
},
|
|
460
460
|
{
|
|
461
461
|
value: 'ERR_THEME_NOTHING_TO_UNDO',
|
|
462
462
|
stability: 'experimental',
|
|
463
463
|
description:
|
|
464
|
-
'`undo` found no earlier change to step back to. Nothing was changed.
|
|
464
|
+
'`undo` found no earlier change to step back to. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.',
|
|
465
465
|
},
|
|
466
466
|
],
|
|
467
467
|
};
|
|
@@ -374,55 +374,55 @@ export const ERROR_CODES = Object.freeze({
|
|
|
374
374
|
*/
|
|
375
375
|
ERR_RENDER_SCRIPT: 'ERR_RENDER_SCRIPT',
|
|
376
376
|
/**
|
|
377
|
-
* A value does not fit what it sets: not a color for a color token, not a size for a size, a step (`more`/`less`) on something that is not a dial, or a word a dial does not take. Nothing was changed.
|
|
377
|
+
* A value does not fit what it sets: not a color for a color token, not a size for a size, a step (`more`/`less`) on something that is not a dial, or a word a dial does not take. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.
|
|
378
378
|
*/
|
|
379
379
|
ERR_THEME_BAD_VALUE: 'ERR_THEME_BAD_VALUE',
|
|
380
380
|
/**
|
|
381
|
-
* `--mode light|dark` was given for something that cannot differ between light and dark: a size, a number, a font, or a property that is not a plain color, or a theme that has only one mode. Nothing was changed.
|
|
381
|
+
* `--mode light|dark` was given for something that cannot differ between light and dark: a size, a number, a font, or a property that is not a plain color, or a theme that has only one mode. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.
|
|
382
382
|
*/
|
|
383
383
|
ERR_THEME_NO_MODE: 'ERR_THEME_NO_MODE',
|
|
384
384
|
/**
|
|
385
|
-
* `--on` names something that is not a themeable part or a family. Nothing was changed.
|
|
385
|
+
* `--on` names something that is not a themeable part or a family. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.
|
|
386
386
|
*/
|
|
387
387
|
ERR_THEME_UNKNOWN_PART: 'ERR_THEME_UNKNOWN_PART',
|
|
388
388
|
/**
|
|
389
|
-
* `--when` names a prop the part does not have, or a value that prop does not take. Nothing was changed.
|
|
389
|
+
* `--when` names a prop the part does not have, or a value that prop does not take. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.
|
|
390
390
|
*/
|
|
391
391
|
ERR_THEME_UNKNOWN_VARIANT: 'ERR_THEME_UNKNOWN_VARIANT',
|
|
392
392
|
/**
|
|
393
|
-
* `--state` names a state the part does not have. Nothing was changed.
|
|
393
|
+
* `--state` names a state the part does not have. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.
|
|
394
394
|
*/
|
|
395
395
|
ERR_THEME_UNKNOWN_STATE: 'ERR_THEME_UNKNOWN_STATE',
|
|
396
396
|
/**
|
|
397
|
-
* The setting names a variable private to a component (`--_...`), which a theme cannot set. Nothing was changed.
|
|
397
|
+
* The setting names a variable private to a component (`--_...`), which a theme cannot set. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.
|
|
398
398
|
*/
|
|
399
399
|
ERR_THEME_PRIVATE_TOKEN: 'ERR_THEME_PRIVATE_TOKEN',
|
|
400
400
|
/**
|
|
401
|
-
* The setting names a design token that does not exist. Nothing was changed.
|
|
401
|
+
* The setting names a design token that does not exist. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.
|
|
402
402
|
*/
|
|
403
403
|
ERR_THEME_UNKNOWN_TOKEN: 'ERR_THEME_UNKNOWN_TOKEN',
|
|
404
404
|
/**
|
|
405
|
-
* The change could not take effect: neither the part nor any part inside it reads the token (or, for the whole theme, no part reads it). The suggestions name the token the part really reads and the property that sets it directly. Nothing was changed.
|
|
405
|
+
* The change could not take effect: neither the part nor any part inside it reads the token (or, for the whole theme, no part reads it). The suggestions name the token the part really reads and the property that sets it directly. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.
|
|
406
406
|
*/
|
|
407
407
|
ERR_THEME_NO_EFFECT: 'ERR_THEME_NO_EFFECT',
|
|
408
408
|
/**
|
|
409
|
-
* Not an error: the change is saved, but the components could not be rendered, so it was not checked and has no preview. The result's `notChecked` carries this code and the cause, such as two copies of React.
|
|
409
|
+
* Not an error: the change is saved, but the components could not be rendered, so it was not checked and has no preview. The result's `notChecked` carries this code and the cause, such as two copies of React. No command uses it now: the experimental theme editor that used it was removed.
|
|
410
410
|
*/
|
|
411
411
|
ERR_THEME_NOT_CHECKED: 'ERR_THEME_NOT_CHECKED',
|
|
412
412
|
/**
|
|
413
|
-
* Another command is changing the same theme (or preview) and did not finish in time. Nothing was changed; run the command again.
|
|
413
|
+
* Another command is changing the same theme (or preview) and did not finish in time. Nothing was changed; run the command again. No command uses it now: the experimental theme editor that used it was removed.
|
|
414
414
|
*/
|
|
415
415
|
ERR_THEME_BUSY: 'ERR_THEME_BUSY',
|
|
416
416
|
/**
|
|
417
|
-
* The thing to change is not a dial, a design token, or a CSS property. Nothing was changed.
|
|
417
|
+
* The thing to change is not a dial, a design token, or a CSS property. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.
|
|
418
418
|
*/
|
|
419
419
|
ERR_THEME_UNKNOWN_THING: 'ERR_THEME_UNKNOWN_THING',
|
|
420
420
|
/**
|
|
421
|
-
* `editor undo <theme> <thing>` names a setting the theme does not have (with those `--on`, `--when`, `--state` and `--mode`). Nothing was changed.
|
|
421
|
+
* `editor undo <theme> <thing>` names a setting the theme does not have (with those `--on`, `--when`, `--state` and `--mode`). Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.
|
|
422
422
|
*/
|
|
423
423
|
ERR_THEME_NOT_SET: 'ERR_THEME_NOT_SET',
|
|
424
424
|
/**
|
|
425
|
-
* `undo` found no earlier change to step back to. Nothing was changed.
|
|
425
|
+
* `undo` found no earlier change to step back to. Nothing was changed. No command uses it now: the experimental theme editor that used it was removed.
|
|
426
426
|
*/
|
|
427
427
|
ERR_THEME_NOTHING_TO_UNDO: 'ERR_THEME_NOTHING_TO_UNDO',
|
|
428
428
|
});
|
|
@@ -121,67 +121,6 @@ export const doc = {
|
|
|
121
121
|
description:
|
|
122
122
|
"One post's metadata plus the feed URL and the post's full plaintext body.",
|
|
123
123
|
},
|
|
124
|
-
// experimental theme editor and preview (experimental: may change or be removed in a patch release)
|
|
125
|
-
{
|
|
126
|
-
value: 'themeEdit.new',
|
|
127
|
-
stability: 'experimental',
|
|
128
|
-
description:
|
|
129
|
-
'A theme made by `experimental theme editor new`: `theme`, `like` (the built-in theme it builds on, or null), the `files` written (settings, source, css, module), the dial `settings` it started with, font `notes`, contrast `problems`, what those settings did not reach as a change reports it (`missed`, `missedParts`, `missedOn`, left out when none), the `preview` page, and any `pictures` (with `pictureProblem` when none could be taken), and `sheetStale` when a sheet.html left in the folder shows an older look. Experimental: may change or be removed in a patch release.',
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
value: 'themeEdit.set',
|
|
133
|
-
stability: 'experimental',
|
|
134
|
-
description:
|
|
135
|
-
'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.',
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
value: 'themeEdit.show',
|
|
139
|
-
stability: 'experimental',
|
|
140
|
-
description:
|
|
141
|
-
'Every `settings` entry with the `parts` it styles, key `resolved` token values (colors and shadows per mode, other values once), `openProblems` (every contrast problem the theme has now, each with the command that fixes it; the text shows the first eight and counts the rest), `partValues` (corners or spacing set on a part or group, with what its parts get beside the whole-theme value), `missed` (the parts the changes the theme makes did not reach, most flagged first, each with why and the line that reaches it), `unreached` (the parts with a fill of their own the theme leaves on the base look, most visible first: no setting on them and their fill or text color as the base gives it), the generated colors (`vibrancy`; `colors`, each with its `seed` and the shade each token uses in light and dark; `colorNotes` on shades moved for contrast), contrast `problems`, font `notes`, the `preview` and `sheet` pages, the `sheetComponents` count, template pages `skipped`, any `pictures` with the two to open (`look`, left out when none was taken), and last the generated color files (`colorFiles`; null with no color). Experimental: may change or be removed in a patch release.',
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
value: 'themeEdit.showPart',
|
|
145
|
-
stability: 'experimental',
|
|
146
|
-
description:
|
|
147
|
-
'What one part of a theme shows (`show <theme> --on <part>`, which writes nothing): the `theme`, its `kind` (editor, local, package or bundled), the `part`, and `values`: each CSS `property` at rest and per variant (`when`, `state`, as `set` takes them; `notSettable`, with why, for a condition no flag reaches), its final `value` (per mode when the modes differ), the `expression` that gives it (per mode when a rule sets one mode), the `tokens` it reads, and who decides it (`source`: core, base or theme; which setting gives it is not shown yet). Experimental: may change or be removed in a patch release.',
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
value: 'themeEdit.undo',
|
|
151
|
-
stability: 'experimental',
|
|
152
|
-
description:
|
|
153
|
-
"An undo. One step back (`action` `step`): what was `undone`, the `settings` count now, the `stepsLeft`, the `preview` page, any `pictures`, and `sheetStale` when sheet.html still shows the theme as it was. One setting removed (`action` `undo`): the same fields as `themeEdit.set`, with `setting` and `removed` both naming the setting removed, `alsoRemoved` (when the setting was listed more than once by hand: the other entries, removed with it), and `now` saying what applies instead (a whole-theme setting of the same thing, or the base theme's value; `changedTokens` lists the values). Experimental: may change or be removed in a patch release.",
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
value: 'themeEdit.previewAdd',
|
|
157
|
-
stability: 'experimental',
|
|
158
|
-
description:
|
|
159
|
-
"Pages added to the theme preview in the app: the route `folder`, the `theme` the pages wear (null for the app's own), the pages `added`, the pages that were there already and are written again (`refreshed`), every page (`pages`), each template page picked and why (`matched`), the template pages `skipped` (each with its `reason`, `installCommand`, and `installGuidance` when a loaded integration gives one), the `files` the preview wrote, `notes`, and how to `open` it. Experimental: may change or be removed in a patch release.",
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
value: 'themeEdit.previewApp',
|
|
163
|
-
stability: 'experimental',
|
|
164
|
-
description:
|
|
165
|
-
'A new starter app with the theme preview inside: the app `folder`, the `theme` copied into it that the pages wear (null for its own neutral theme), the preview `pages`, the `files` written, `notes`, and how to `open` it (install, run, then the page). Experimental: may change or be removed in a patch release.',
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
value: 'themeEdit.previewList',
|
|
169
|
-
stability: 'experimental',
|
|
170
|
-
description:
|
|
171
|
-
'The pages of the theme preview: the route `folder` (null with no preview), the `theme`, `themeMissing` (true when that theme is gone), the `pages` (`id`, `label`) and `notes`. Experimental: may change or be removed in a patch release.',
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
value: 'themeEdit.previewRemove',
|
|
175
|
-
stability: 'experimental',
|
|
176
|
-
description:
|
|
177
|
-
'A page or the whole theme preview removed: the route `folder`, the files `removed`, and the `pages` left (empty when the whole preview went). Experimental: may change or be removed in a patch release.',
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
value: 'themeEdit.how',
|
|
181
|
-
stability: 'experimental',
|
|
182
|
-
description:
|
|
183
|
-
'A how answer; `kind` says which: `part` (`component`, `recorded`, `group`, `groupMembers`, `spreads`, `variants`, `states`, `reads` per aspect, `contains`), `group` (`members`, `spreads`), `setting` (a dial: `values`, `help`, `examples`, and for a color the `shades` each token starts from; a token: `tokenType`, `default`, `perMode`, `readBy`, `examples`; a property: `setBy`, `examples`), `aspect` or `question` (`results`, each a `text` and its `commands`), `picture` (main colors or the color at points) or `list` (the `items`). Experimental: may change or be removed in a patch release.',
|
|
184
|
-
},
|
|
185
124
|
// render (experimental: may change or be removed in a patch release)
|
|
186
125
|
{
|
|
187
126
|
value: 'render.page',
|
|
@@ -202,7 +141,7 @@ export const doc = {
|
|
|
202
141
|
value: 'icon.search',
|
|
203
142
|
stability: 'experimental',
|
|
204
143
|
description:
|
|
205
|
-
"The echoed query, `matchCount` (every match, before `limit`), and matches: icons from the installed icon sets ranked by meaning, each {set, id, package, module, export, import, words, definitions, variants, reason, score}, plus `meaningImport` when
|
|
144
|
+
"The echoed query, `matchCount` (every match, before `limit`), and matches: icons from the installed icon sets ranked by meaning, each {set, id, package, module, export, import, words, definitions, variants, reason, score}, plus `meaningImport` when the set's `map` names the icon for a meaning: its import under the meaning name (`import {TrashIcon as DeleteIcon} from '…'`).",
|
|
206
145
|
},
|
|
207
146
|
{
|
|
208
147
|
value: 'icon.detail',
|
|
@@ -214,7 +153,7 @@ export const doc = {
|
|
|
214
153
|
value: 'icon.list',
|
|
215
154
|
stability: 'experimental',
|
|
216
155
|
description:
|
|
217
|
-
"The project's icon-set state (status, projectSet, reason), each installed set with its package, license, icon count, default variant, declared variants, and the icon
|
|
156
|
+
"The project's icon-set state (status, projectSet, reason), each installed set with its package, license, icon count, default variant, declared variants, and the icon meanings its `map` covers (built-in, all of Astryx's, and its own), and each withdrawn set with its reason.",
|
|
218
157
|
},
|
|
219
158
|
{
|
|
220
159
|
value: 'icon.use',
|
|
@@ -232,19 +171,19 @@ export const doc = {
|
|
|
232
171
|
value: 'icon.map',
|
|
233
172
|
stability: 'experimental',
|
|
234
173
|
description:
|
|
235
|
-
'One `map` entry of the icon set being authored: the set, its package, the data file, the
|
|
174
|
+
'One `map` entry of the icon set being authored: the set, its package, the data file, the meaning, the icon id now mapped (null after --remove), the id it replaced, and whether the file changed.',
|
|
236
175
|
},
|
|
237
176
|
{
|
|
238
177
|
value: 'icon.add',
|
|
239
178
|
stability: 'experimental',
|
|
240
179
|
description:
|
|
241
|
-
"One icon
|
|
180
|
+
"One icon added to the icon set being authored: the set, its package, the icon {id, export, module}, the variant when it was added as one, the meaning mapped to it, the definition file written when it added the set's own meaning, the files written, and whether anything changed.",
|
|
242
181
|
},
|
|
243
182
|
{
|
|
244
183
|
value: 'icon.definitions',
|
|
245
184
|
stability: 'experimental',
|
|
246
185
|
description:
|
|
247
|
-
'Every Astryx icon
|
|
186
|
+
'Every Astryx icon meaning (--definitions): each {name, builtIn, description, words}.',
|
|
248
187
|
},
|
|
249
188
|
{
|
|
250
189
|
value: 'icon.setIcons',
|
|
@@ -262,7 +201,7 @@ export const doc = {
|
|
|
262
201
|
value: 'icon.definitionMatches',
|
|
263
202
|
stability: 'experimental',
|
|
264
203
|
description:
|
|
265
|
-
"The icon
|
|
204
|
+
"The icon meanings that fit an export, before it is added: the export, its source module, the id it would get, at most 10 matches {name, description, source (astryx or set), score, reason, command}, and the command that adds the set's own meaning when none fits.",
|
|
266
205
|
},
|
|
267
206
|
{
|
|
268
207
|
value: 'icon.newSet',
|
|
@@ -274,7 +213,7 @@ export const doc = {
|
|
|
274
213
|
value: 'icon.newDefinition',
|
|
275
214
|
stability: 'experimental',
|
|
276
215
|
description:
|
|
277
|
-
"An icon set's own icon
|
|
216
|
+
"An icon set's own icon meaning: its name, the manifest file, the files written (the meaning and, with --icon, the data file), and whether they were written or only planned.",
|
|
278
217
|
},
|
|
279
218
|
|
|
280
219
|
// discover (external / integration packages)
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* css-tree pins; `longhandsOf` and `coversProperty`, which properties a
|
|
10
10
|
* shorthand sets, by that data; `keptCssTreeAnswer`, an answer worked
|
|
11
11
|
* out with them and kept between runs.
|
|
12
|
-
* @position The one loader of css-tree, for the theme
|
|
13
|
-
*
|
|
12
|
+
* @position The one loader of css-tree, for the theme build's style-key
|
|
13
|
+
* checks, and the shared color
|
|
14
14
|
* reader the export uses. The entry is resolved
|
|
15
15
|
* before any command stats a file: after a stat of a named pipe, Node's
|
|
16
16
|
* realpath can return a package link's own path instead of its target,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @file A lookup table that answers only for its own keys.
|
|
6
6
|
* @input A plain object
|
|
7
7
|
* @output The same table, with no prototype at any depth
|
|
8
|
-
* @position foundation/runtime — used by the
|
|
8
|
+
* @position foundation/runtime — used by the color reader
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* A lookup table that only answers for its own keys: a word typed by a
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @file A lookup table that answers only for its own keys.
|
|
5
5
|
* @input A plain object
|
|
6
6
|
* @output The same table, with no prototype at any depth
|
|
7
|
-
* @position foundation/runtime — used by the
|
|
7
|
+
* @position foundation/runtime — used by the color reader
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|