@astryxdesign/cli 0.7.17-canary.gffd1c8e → 0.7.17
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 +1877 -0
- package/README.md +90 -85
- package/api/build/_adapter.d.mts +51 -0
- package/api/build/_adapter.mjs +133 -8
- package/api/build/build.doc.mjs +3 -3
- package/api/build/build.mjs +1 -1
- package/api/build/build.type.d.mts +1 -1
- package/api/build/build.type.mjs +2 -2
- package/api/build/help/help.d.mts +15 -14
- package/api/build/help/help.mjs +65 -6
- package/api/build/kit/kit.mjs +1 -1
- package/api/build/kit/start.mjs +1 -1
- package/api/component/_adapter.d.mts +28 -4
- package/api/component/_adapter.mjs +79 -45
- package/api/component/component.d.mts +1 -1
- package/api/component/component.mjs +18 -7
- package/api/component/detail/blocks/blocks.mjs +1 -2
- package/api/component/detail/showcase/showcase.mjs +19 -8
- package/api/discover/_adapter.d.mts +68 -5
- package/api/discover/_adapter.mjs +311 -63
- package/api/discover/_catalog-view.d.mts +22 -0
- package/api/discover/_catalog-view.mjs +30 -1
- package/api/discover/_icon-set-coverage.d.mts +22 -0
- package/api/discover/_icon-set-coverage.mjs +32 -0
- package/api/discover/detail/detail.d.mts +6 -3
- package/api/discover/detail/detail.mjs +14 -6
- package/api/discover/detail/doc/doc.mjs +1 -1
- package/api/discover/detail/item/item.d.mts +11 -1
- package/api/discover/detail/item/item.mjs +29 -8
- package/api/discover/discover.d.mts +36 -0
- package/api/discover/discover.doc.mjs +1 -1
- package/api/discover/discover.mjs +205 -28
- package/api/discover/discover.type.d.mts +33 -7
- package/api/discover/discover.type.mjs +21 -7
- package/api/discover/search/search.d.mts +22 -0
- package/api/discover/search/search.mjs +293 -70
- package/api/docs/_adapter.d.mts +92 -1
- package/api/docs/_adapter.mjs +264 -14
- package/api/docs/docs.d.mts +4 -2
- package/api/docs/docs.doc.mjs +10 -0
- package/api/docs/docs.mjs +25 -5
- package/api/docs/docs.type.d.mts +48 -0
- package/api/docs/docs.type.mjs +26 -0
- package/api/docs/skills/skills.d.mts +51 -0
- package/api/docs/skills/skills.mjs +216 -0
- package/api/doctor/_adapter.d.mts +254 -9
- package/api/doctor/_adapter.mjs +1228 -50
- package/api/doctor/built-checks.d.mts +39 -3
- package/api/doctor/built-checks.mjs +203 -7
- package/api/doctor/doctor.d.mts +205 -4
- package/api/doctor/doctor.doc.mjs +4 -4
- package/api/doctor/doctor.mjs +962 -22
- package/api/doctor/doctor.type.d.mts +6 -1
- package/api/doctor/doctor.type.mjs +3 -1
- package/api/doctor/theme-checks.d.mts +20 -1
- package/api/doctor/theme-checks.mjs +280 -8
- package/api/error.d.mts +12 -1
- package/api/error.mjs +18 -6
- package/api/icon/_adapter.d.mts +11 -1
- package/api/icon/_adapter.mjs +22 -1
- package/api/icon/_authoring.mjs +21 -7
- package/api/icon/add/add.mjs +1 -1
- package/api/icon/definitions/definitions.mjs +19 -8
- package/api/icon/icon.doc.mjs +3 -3
- package/api/icon/icon.type.d.mts +49 -2
- package/api/icon/icon.type.mjs +23 -4
- package/api/icon/iconMap.doc.mjs +2 -2
- package/api/icon/list/list.mjs +4 -5
- package/api/icon/map/map.mjs +13 -4
- package/api/icon/search/icon-index.mjs +4 -1
- package/api/icon/search/search.d.mts +28 -7
- package/api/icon/search/search.mjs +177 -26
- package/api/init/_adapter.d.mts +87 -3
- package/api/init/_adapter.mjs +264 -16
- package/api/init/init.d.mts +2 -2
- package/api/init/init.doc.mjs +29 -5
- package/api/init/init.mjs +149 -10
- package/api/init/init.type.d.mts +75 -9
- package/api/init/init.type.mjs +32 -4
- package/api/init/remove/remove.d.mts +7 -4
- package/api/init/remove/remove.mjs +124 -26
- package/api/init/run/run.d.mts +38 -3
- package/api/init/run/run.mjs +366 -39
- package/api/integration/_adapter.d.mts +16 -0
- package/api/integration/_adapter.mjs +45 -1
- package/api/integration/integrationCheck.doc.mjs +1 -1
- package/api/integration/pack-check.d.mts +2 -1
- package/api/integration/pack-check.mjs +10 -18
- package/api/integration/validate-integration.d.mts +5 -2
- package/api/integration/validate-integration.mjs +81 -14
- package/api/integration/validate-integration.type.d.mts +9 -4
- package/api/integration/validate-integration.type.mjs +9 -4
- package/api/integration/validateIntegration.doc.mjs +4 -2
- package/api/render/_adapter.d.mts +6 -2
- package/api/render/_adapter.mjs +301 -51
- package/api/render/render.doc.d.mts +1 -1
- package/api/render/render.doc.mjs +20 -10
- package/api/render/render.mjs +16 -13
- package/api/render/render.type.d.mts +57 -10
- package/api/render/render.type.mjs +26 -13
- package/api/search/ORDERING.md +3 -3
- package/api/search/_adapter.d.mts +31 -0
- package/api/search/_adapter.mjs +107 -15
- package/api/search/_candidate-score.d.mts +12 -4
- package/api/search/_candidate-score.mjs +94 -16
- package/api/search/_cards.json +4 -1
- package/api/search/_entries.d.mts +8 -3
- package/api/search/_entries.mjs +109 -12
- package/api/search/_fit-order.d.mts +8 -4
- package/api/search/_fit-order.mjs +35 -7
- package/api/search/_gather-docs.mjs +71 -28
- package/api/search/_gather-templates.mjs +7 -2
- package/api/search/_icons.d.mts +50 -0
- package/api/search/_icons.mjs +85 -0
- package/api/search/_lexical.d.mts +14 -1
- package/api/search/_lexical.mjs +240 -12
- package/api/search/_main-searcher.mjs +1 -1
- package/api/search/_named-keywords.d.mts +6 -3
- package/api/search/_named-keywords.mjs +70 -19
- package/api/search/_order.d.mts +27 -12
- package/api/search/_order.mjs +132 -51
- package/api/search/_result.d.mts +30 -0
- package/api/search/_result.mjs +38 -0
- package/api/search/_score.d.mts +20 -6
- package/api/search/_score.mjs +96 -16
- package/api/search/_titles.d.mts +14 -0
- package/api/search/_titles.mjs +16 -3
- package/api/search/_words.d.mts +8 -0
- package/api/search/_words.mjs +26 -1
- package/api/search/search-index.mjs +23 -12
- package/api/search/search.d.mts +3 -1
- package/api/search/search.doc.mjs +5 -4
- package/api/search/search.mjs +69 -26
- package/api/search/search.type.d.mts +55 -1
- package/api/search/search.type.mjs +35 -1
- package/api/swizzle/_adapter.d.mts +1 -1
- package/api/swizzle/_adapter.mjs +1 -5
- package/api/swizzle/_moduleGraph.d.mts +0 -6
- package/api/swizzle/_moduleGraph.mjs +0 -12
- package/api/swizzle/copy/copy.mjs +1 -1
- package/api/template/_adapter.d.mts +46 -0
- package/api/template/_adapter.mjs +198 -2
- package/api/template/cdn/cdn.mjs +5 -3
- package/api/template/copy/copy.d.mts +12 -2
- package/api/template/copy/copy.mjs +95 -21
- package/api/template/list/list.mjs +1 -2
- package/api/template/show/show.d.mts +10 -3
- package/api/template/show/show.mjs +17 -6
- package/api/template/skeleton/skeleton.mjs +1 -2
- package/api/template/template.doc.mjs +3 -3
- package/api/template/template.mjs +37 -7
- package/api/template/template.type.d.mts +3 -0
- package/api/template/template.type.mjs +5 -2
- package/api/theme/_adapter.d.mts +28 -2
- package/api/theme/_adapter.mjs +675 -17
- package/api/theme/_app-provider.d.mts +42 -0
- package/api/theme/_app-provider.mjs +61 -27
- package/api/theme/_shared-source.d.mts +33 -0
- package/api/theme/_shared-source.mjs +348 -0
- package/api/theme/add/add.d.mts +3 -0
- package/api/theme/add/add.mjs +21 -4
- package/api/theme/build/build.d.mts +57 -30
- package/api/theme/build/build.mjs +403 -441
- package/api/theme/build/core-interception.d.mts +10 -0
- package/api/theme/build/core-interception.mjs +24 -0
- package/api/theme/build/family.mjs +4 -2
- package/api/theme/build/import-specifier.d.mts +14 -0
- package/api/theme/build/import-specifier.mjs +36 -0
- package/api/theme/build/null-values.d.mts +22 -0
- package/api/theme/build/null-values.mjs +110 -21
- package/api/theme/build/self-contained.mjs +32 -11
- package/api/theme/build/setting-effects.d.mts +254 -0
- package/api/theme/build/setting-effects.mjs +1065 -0
- package/api/theme/build/style-keys.d.mts +33 -0
- package/api/theme/build/style-keys.mjs +154 -0
- package/api/theme/build/theme-object.d.mts +47 -0
- package/api/theme/build/theme-object.mjs +144 -0
- package/api/theme/eject/eject.mjs +6 -1
- package/api/theme/palette/generate/color.d.mts +41 -9
- package/api/theme/palette/generate/color.mjs +108 -39
- package/api/theme/palette/generate/generate.mjs +10 -0
- package/api/theme/palette/generate/generator.d.mts +45 -27
- package/api/theme/palette/generate/generator.mjs +330 -156
- package/api/theme/palette/generate/mapping.d.mts +456 -0
- package/api/theme/palette/generate/mapping.mjs +1903 -0
- package/api/theme/palette/generate/newer-recipe.d.mts +28 -0
- package/api/theme/palette/generate/newer-recipe.mjs +87 -0
- package/api/theme/palette/generate/types.d.mts +270 -0
- package/api/theme/palette/generate/types.mjs +123 -0
- package/api/theme/theme.d.mts +25 -4
- package/api/theme/theme.mjs +55 -5
- package/api/theme/theme.type.d.mts +71 -2
- package/api/theme/theme.type.mjs +37 -5
- package/api/theme/themeAdd.doc.mjs +3 -2
- package/api/theme/themeBuild.doc.mjs +3 -3
- package/api/theme/themeEject.doc.mjs +1 -1
- package/api/theme/themeRemove.doc.mjs +1 -1
- package/api/theme/themeTargets.doc.mjs +1 -1
- package/api/theme-edit/_catalog.mjs +1 -1
- package/api/theme-edit/_check.mjs +129 -45
- package/api/theme-edit/_color.d.mts +2 -74
- package/api/theme-edit/_color.mjs +33 -869
- package/api/theme-edit/_context.d.mts +3 -1
- package/api/theme-edit/_context.mjs +16 -3
- package/api/theme-edit/_css.d.mts +4 -35
- package/api/theme-edit/_css.mjs +10 -91
- package/api/theme-edit/_edit.mjs +244 -32
- package/api/theme-edit/_how-question.d.mts +1 -0
- package/api/theme-edit/_how-question.mjs +1188 -52
- package/api/theme-edit/_how.mjs +19 -3
- package/api/theme-edit/_missed.d.mts +2 -1
- package/api/theme-edit/_missed.mjs +21 -2
- package/api/theme-edit/_normal.d.mts +5 -2
- package/api/theme-edit/_normal.mjs +11 -1
- package/api/theme-edit/_palette.d.mts +26 -75
- package/api/theme-edit/_palette.mjs +242 -1384
- package/api/theme-edit/_part-words.mjs +13 -3
- package/api/theme-edit/_parts.d.mts +8 -2
- package/api/theme-edit/_parts.mjs +56 -11
- package/api/theme-edit/_preview-app.d.mts +16 -0
- package/api/theme-edit/_preview-app.mjs +47 -15
- package/api/theme-edit/_preview.mjs +49 -22
- package/api/theme-edit/_project.d.mts +14 -2
- package/api/theme-edit/_project.mjs +25 -3
- package/api/theme-edit/_settings.d.mts +3 -2
- package/api/theme-edit/_settings.mjs +166 -45
- package/api/theme-edit/_tables.d.mts +3 -11
- package/api/theme-edit/_tables.mjs +21 -33
- package/api/theme-edit/theme-edit.type.d.mts +7 -1
- package/api/theme-edit/theme-edit.type.mjs +3 -2
- package/api/upgrade/_adapter.d.mts +38 -0
- package/api/upgrade/_adapter.mjs +274 -3
- package/api/upgrade/run/run.mjs +4 -0
- package/api/upgrade/upgrade.mjs +1 -1
- package/api/upgrade/upgrade.type.d.mts +46 -7
- package/api/upgrade/upgrade.type.mjs +24 -9
- package/assets/codemods/registry.mjs +1 -0
- package/assets/codemods/transforms/next/index.mjs +1 -11
- package/assets/codemods/transforms/v0.7.17/index.mjs +28 -0
- package/assets/codemods/transforms/v0.7.17/migrate-item-swipe-actions-to-swipe.mjs +2160 -0
- package/assets/codemods/transforms/v0.7.17/preserve-chat-radius.mjs +515 -0
- package/assets/component-list.generated.json +1 -1
- package/assets/discover/official-packages.json +72 -0
- package/assets/docs/author-a-theme.doc.mjs +7 -4
- package/assets/docs/getting-started.doc.mjs +1 -1
- package/assets/docs/principles.doc.dense.mjs +1 -1
- package/assets/docs/principles.doc.mjs +1 -1
- package/assets/docs/principles.doc.zh.mjs +1 -1
- package/assets/docs/styling-overview.doc.mjs +5 -1
- package/assets/docs/tree/agent-guidance.doc.mjs +33 -2
- package/assets/docs/tree/check-the-props.doc.mjs +1 -1
- package/assets/docs/tree/checks.doc.mjs +1 -1
- package/assets/docs/tree/computer-integrations.doc.mjs +1 -1
- package/assets/docs/tree/doc-syntax.doc.mjs +1 -1
- package/assets/docs/tree/export-pages.doc.mjs +164 -0
- package/assets/docs/tree/fonts-and-assets.doc.mjs +1 -1
- package/assets/docs/tree/host-entry.doc.mjs +4 -0
- package/assets/docs/tree/i18n-library-integration.doc.mjs +7 -3
- package/assets/docs/tree/icon-sets.doc.mjs +85 -9
- package/assets/docs/tree/layout.doc.mjs +16 -5
- package/assets/docs/tree/problems.doc.mjs +2 -2
- package/assets/docs/tree/responsive.doc.mjs +2 -2
- package/assets/docs/tree/scaffold.doc.mjs +1 -0
- package/assets/docs/tree/share-a-page.doc.mjs +14 -16
- package/assets/docs/tree/skill-places.doc.mjs +91 -0
- package/assets/docs/tree/styling.doc.mjs +41 -3
- package/assets/docs/tree/template-grading-rubric.doc.mjs +1 -1
- package/assets/docs/tree/test-in-an-app.doc.mjs +1 -1
- package/assets/docs/tree/tokens-and-setup.doc.mjs +2 -4
- package/assets/docs/tree/tokens-color.doc.mjs +2 -2
- package/assets/docs/tree/tokens-radius.doc.mjs +1 -1
- package/assets/docs/tree/tokens.doc.mjs +32 -0
- package/assets/docs/tree/troubleshooting.doc.mjs +8 -0
- package/assets/docs/tree/typography.doc.mjs +31 -2
- package/assets/docs/use-a-theme.doc.mjs +4 -0
- package/assets/docs/working-with-ai.doc.mjs +4 -4
- package/assets/docs-routes.generated.json +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/icons/definitions/alert.doc.mjs +9 -0
- package/assets/icons/definitions/alignBottom.doc.mjs +1 -0
- package/assets/icons/definitions/alignCenter.doc.mjs +1 -0
- package/assets/icons/definitions/alignEnd.doc.mjs +1 -0
- package/assets/icons/definitions/alignJustify.doc.mjs +1 -0
- package/assets/icons/definitions/alignMiddle.doc.mjs +1 -0
- package/assets/icons/definitions/alignStart.doc.mjs +1 -0
- package/assets/icons/definitions/alignTop.doc.mjs +1 -0
- package/assets/icons/definitions/arrowDown.doc.mjs +1 -0
- package/assets/icons/definitions/arrowLeft.doc.mjs +1 -0
- package/assets/icons/definitions/arrowRight.doc.mjs +1 -0
- package/assets/icons/definitions/arrowUp.doc.mjs +1 -0
- package/assets/icons/definitions/arrowsUpDown.doc.mjs +1 -0
- package/assets/icons/definitions/bank.doc.mjs +1 -0
- package/assets/icons/definitions/block.doc.mjs +9 -0
- package/assets/icons/definitions/bold.doc.mjs +1 -0
- package/assets/icons/definitions/bookmark.doc.mjs +1 -0
- package/assets/icons/definitions/bookmarkAdd.doc.mjs +1 -0
- package/assets/icons/definitions/cart.doc.mjs +1 -0
- package/assets/icons/definitions/channel.doc.mjs +9 -0
- package/assets/icons/definitions/check.doc.mjs +1 -0
- package/assets/icons/definitions/checkDouble.doc.mjs +1 -0
- package/assets/icons/definitions/checklist.doc.mjs +9 -0
- package/assets/icons/definitions/chevronDown.doc.mjs +1 -0
- package/assets/icons/definitions/chevronLeft.doc.mjs +1 -0
- package/assets/icons/definitions/chevronRight.doc.mjs +1 -0
- package/assets/icons/definitions/chevronUp.doc.mjs +1 -0
- package/assets/icons/definitions/chevronsLeft.doc.mjs +1 -0
- package/assets/icons/definitions/chevronsRight.doc.mjs +1 -0
- package/assets/icons/definitions/clipboard.doc.mjs +1 -0
- package/assets/icons/definitions/cloud.doc.mjs +1 -1
- package/assets/icons/definitions/collapse.doc.mjs +1 -0
- package/assets/icons/definitions/columnSettings.doc.mjs +9 -0
- package/assets/icons/definitions/compose.doc.mjs +1 -0
- package/assets/icons/definitions/conversation.doc.mjs +1 -0
- package/assets/icons/definitions/copy.doc.mjs +1 -0
- package/assets/icons/definitions/copyText.doc.mjs +9 -0
- package/assets/icons/definitions/cornerRadius.doc.mjs +1 -0
- package/assets/icons/definitions/create.doc.mjs +9 -0
- package/assets/icons/definitions/creditCard.doc.mjs +1 -0
- package/assets/icons/definitions/currency.doc.mjs +9 -0
- package/assets/icons/definitions/cut.doc.mjs +1 -0
- package/assets/icons/definitions/desktop.doc.mjs +1 -0
- package/assets/icons/definitions/discount.doc.mjs +1 -0
- package/assets/icons/definitions/document.doc.mjs +1 -0
- package/assets/icons/definitions/documentSearch.doc.mjs +1 -0
- package/assets/icons/definitions/download.doc.mjs +1 -0
- package/assets/icons/definitions/error.doc.mjs +1 -0
- package/assets/icons/definitions/exitFullScreen.doc.mjs +16 -0
- package/assets/icons/definitions/expand.doc.mjs +1 -0
- package/assets/icons/definitions/eye.doc.mjs +1 -0
- package/assets/icons/definitions/eyeSlash.doc.mjs +1 -0
- package/assets/icons/definitions/file.doc.mjs +1 -0
- package/assets/icons/definitions/flipHorizontal.doc.mjs +1 -0
- package/assets/icons/definitions/flipVertical.doc.mjs +1 -0
- package/assets/icons/definitions/folder.doc.mjs +1 -0
- package/assets/icons/definitions/folderAdd.doc.mjs +1 -0
- package/assets/icons/definitions/fullScreen.doc.mjs +16 -0
- package/assets/icons/definitions/globe.doc.mjs +1 -1
- package/assets/icons/definitions/groupRows.doc.mjs +9 -0
- package/assets/icons/definitions/halftone.doc.mjs +9 -0
- package/assets/icons/definitions/help.doc.mjs +9 -0
- package/assets/icons/definitions/house.doc.mjs +9 -0
- package/assets/icons/definitions/info.doc.mjs +1 -0
- package/assets/icons/definitions/italic.doc.mjs +1 -0
- package/assets/icons/definitions/listView.doc.mjs +9 -0
- package/assets/icons/definitions/lock.doc.mjs +1 -0
- package/assets/icons/definitions/lowercase.doc.mjs +1 -0
- package/assets/icons/definitions/mail.doc.mjs +1 -1
- package/assets/icons/definitions/media.doc.mjs +9 -0
- package/assets/icons/definitions/message.doc.mjs +2 -1
- package/assets/icons/definitions/mobile.doc.mjs +1 -0
- package/assets/icons/definitions/money.doc.mjs +1 -0
- package/assets/icons/definitions/moon.doc.mjs +1 -0
- package/assets/icons/definitions/moveToFolder.doc.mjs +9 -0
- package/assets/icons/definitions/notification.doc.mjs +1 -0
- package/assets/icons/definitions/notificationActive.doc.mjs +1 -0
- package/assets/icons/definitions/notificationOff.doc.mjs +1 -0
- package/assets/icons/definitions/paddingHorizontal.doc.mjs +1 -0
- package/assets/icons/definitions/paddingPerSide.doc.mjs +1 -0
- package/assets/icons/definitions/paddingVertical.doc.mjs +1 -0
- package/assets/icons/definitions/panelBottom.doc.mjs +1 -0
- package/assets/icons/definitions/panelLeft.doc.mjs +1 -0
- package/assets/icons/definitions/panelRight.doc.mjs +1 -0
- package/assets/icons/definitions/paste.doc.mjs +9 -0
- package/assets/icons/definitions/pause.doc.mjs +1 -0
- package/assets/icons/definitions/play.doc.mjs +1 -0
- package/assets/icons/definitions/radiusPerCorner.doc.mjs +1 -0
- package/assets/icons/definitions/redo.doc.mjs +1 -0
- package/assets/icons/definitions/review.doc.mjs +9 -0
- package/assets/icons/definitions/rotate.doc.mjs +1 -0
- package/assets/icons/definitions/rotateCounterclockwise.doc.mjs +1 -0
- package/assets/icons/definitions/scale.doc.mjs +1 -2
- package/assets/icons/definitions/schedule.doc.mjs +9 -0
- package/assets/icons/definitions/search.doc.mjs +1 -0
- package/assets/icons/definitions/send.doc.mjs +1 -0
- package/assets/icons/definitions/shoppingBag.doc.mjs +1 -0
- package/assets/icons/definitions/signal.doc.mjs +9 -0
- package/assets/icons/definitions/stop.doc.mjs +1 -0
- package/assets/icons/definitions/strikethrough.doc.mjs +1 -0
- package/assets/icons/definitions/success.doc.mjs +1 -0
- package/assets/icons/definitions/sun.doc.mjs +1 -0
- package/assets/icons/definitions/tablet.doc.mjs +1 -0
- package/assets/icons/definitions/team.doc.mjs +9 -0
- package/assets/icons/definitions/textCase.doc.mjs +2 -1
- package/assets/icons/definitions/textRegular.doc.mjs +1 -0
- package/assets/icons/definitions/thumbsDown.doc.mjs +1 -0
- package/assets/icons/definitions/thumbsUp.doc.mjs +1 -0
- package/assets/icons/definitions/transfer.doc.mjs +1 -0
- package/assets/icons/definitions/trendDown.doc.mjs +1 -0
- package/assets/icons/definitions/trendUp.doc.mjs +1 -0
- package/assets/icons/definitions/underline.doc.mjs +1 -0
- package/assets/icons/definitions/undo.doc.mjs +1 -0
- package/assets/icons/definitions/unlock.doc.mjs +1 -0
- package/assets/icons/definitions/upload.doc.mjs +1 -0
- package/assets/icons/definitions/uppercase.doc.mjs +1 -0
- package/assets/icons/definitions/user.doc.mjs +1 -0
- package/assets/icons/definitions/userAdd.doc.mjs +1 -0
- package/assets/icons/definitions/userCircle.doc.mjs +1 -0
- package/assets/icons/definitions/userRemove.doc.mjs +1 -0
- package/assets/icons/definitions/users.doc.mjs +1 -0
- package/assets/icons/definitions/verified.doc.mjs +9 -0
- package/assets/icons/definitions/wallet.doc.mjs +1 -0
- package/assets/icons/definitions/warning.doc.mjs +1 -0
- package/assets/icons/definitions/wrench.doc.mjs +1 -1
- package/assets/icons/template-icons.json +661 -0
- package/assets/search-catalog.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/AppShell/AppShellShowcase.doc.mjs +0 -7
- package/assets/templates/blocks/components/AppShell/AppShellShowcase.tsx +8 -10
- package/assets/templates/blocks/components/AppShell/AppShellSideNavOnly.doc.mjs +0 -8
- package/assets/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx +10 -8
- package/assets/templates/blocks/components/AppShell/AppShellTopNavOnly.doc.mjs +0 -1
- package/assets/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx +4 -2
- package/assets/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.doc.mjs +0 -8
- package/assets/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsx +10 -8
- package/assets/templates/blocks/components/AppShell/AppShellWithBanner.doc.mjs +0 -8
- package/assets/templates/blocks/components/AppShell/AppShellWithBanner.tsx +10 -8
- package/assets/templates/blocks/components/AspectRatio/AspectRatioImageGallery.tsx +1 -1
- package/assets/templates/blocks/components/AspectRatio/AspectRatioWidescreen.tsx +1 -1
- package/assets/templates/blocks/components/AspectRatio/AspectRatioWithSkeleton.tsx +1 -1
- package/assets/templates/blocks/components/Avatar/AvatarInteractive.tsx +6 -1
- package/assets/templates/blocks/components/Avatar/AvatarShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Avatar/AvatarTooltip.tsx +1 -1
- package/assets/templates/blocks/components/Avatar/AvatarWithStatus.tsx +1 -1
- package/assets/templates/blocks/components/AvatarStatusDot/AvatarStatusDotShowcase.tsx +1 -1
- package/assets/templates/blocks/components/AvatarStatusDot/AvatarStatusDotVariants.tsx +1 -1
- package/assets/templates/blocks/components/Badge/BadgeShowcase.tsx +2 -2
- package/assets/templates/blocks/components/Banner/BannerCollapsibleContent.tsx +14 -1
- package/assets/templates/blocks/components/Banner/BannerSectionVariant.tsx +10 -1
- package/assets/templates/blocks/components/Banner/BannerWithActionButton.tsx +25 -3
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadCustomSearch.doc.mjs +0 -1
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadCustomSearch.tsx +2 -2
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadMenu.doc.mjs +0 -1
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadMenu.tsx +1 -1
- package/assets/templates/blocks/components/BottomSheet/BottomSheetSnapPoints.doc.mjs +0 -8
- package/assets/templates/blocks/components/BottomSheet/BottomSheetSnapPoints.tsx +5 -5
- package/assets/templates/blocks/components/BreadcrumbItem/BreadcrumbItemShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/BreadcrumbItem/BreadcrumbItemShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsDeepHierarchy.doc.mjs +0 -1
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsDeepHierarchy.tsx +1 -1
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsWithIcons.doc.mjs +0 -1
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsWithIcons.tsx +2 -2
- package/assets/templates/blocks/components/Button/ButtonFloating.doc.mjs +0 -1
- package/assets/templates/blocks/components/Button/ButtonFloating.tsx +25 -2
- package/assets/templates/blocks/components/Button/ButtonShowcase.tsx +42 -4
- package/assets/templates/blocks/components/Button/ButtonSizeVariants.tsx +24 -2
- package/assets/templates/blocks/components/Button/ButtonVariants.tsx +28 -1
- package/assets/templates/blocks/components/Button/ButtonWithEndSlot.tsx +9 -0
- package/assets/templates/blocks/components/Button/ButtonWithIcon.doc.mjs +0 -6
- package/assets/templates/blocks/components/Button/ButtonWithIcon.tsx +35 -9
- package/assets/templates/blocks/components/ButtonGroup/ButtonGroupBasic.tsx +20 -3
- package/assets/templates/blocks/components/ButtonGroup/ButtonGroupFloating.tsx +16 -3
- package/assets/templates/blocks/components/ButtonGroup/ButtonGroupShowcase.doc.mjs +0 -6
- package/assets/templates/blocks/components/ButtonGroup/ButtonGroupShowcase.tsx +37 -8
- package/assets/templates/blocks/components/Center/CenterHorizontal.doc.mjs +0 -8
- package/assets/templates/blocks/components/Center/CenterHorizontal.tsx +23 -5
- package/assets/templates/blocks/components/Center/CenterInsideACard.doc.mjs +0 -1
- package/assets/templates/blocks/components/Center/CenterInsideACard.tsx +1 -1
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFlat.doc.mjs +0 -5
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFlat.tsx +8 -3
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFooterActions.doc.mjs +0 -5
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFooterActions.tsx +8 -3
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFullFeatured.doc.mjs +0 -7
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFullFeatured.tsx +10 -7
- package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerShowcase.tsx +2 -2
- package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerWithProgress.doc.mjs +0 -1
- package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerWithProgress.tsx +3 -3
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataFooter.doc.mjs +0 -6
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataFooter.tsx +9 -9
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.doc.mjs +0 -6
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx +10 -10
- package/assets/templates/blocks/components/ChatSendButton/ChatSendButtonCustomIcon.doc.mjs +0 -6
- package/assets/templates/blocks/components/ChatSendButton/ChatSendButtonCustomIcon.tsx +8 -5
- package/assets/templates/blocks/components/ChatSendButton/ChatSendButtonShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/ChatSendButton/ChatSendButtonShowcase.tsx +1 -1
- package/assets/templates/blocks/components/ChatSystemMessage/ChatSystemMessageStatusUpdates.doc.mjs +0 -5
- package/assets/templates/blocks/components/ChatSystemMessage/ChatSystemMessageStatusUpdates.tsx +7 -7
- package/assets/templates/blocks/components/ChatSystemMessage/ChatSystemMessageWithIcon.doc.mjs +0 -6
- package/assets/templates/blocks/components/ChatSystemMessage/ChatSystemMessageWithIcon.tsx +7 -7
- package/assets/templates/blocks/components/ContextMenu/ContextMenuBottomSheet.doc.mjs +0 -6
- package/assets/templates/blocks/components/ContextMenu/ContextMenuBottomSheet.tsx +7 -7
- package/assets/templates/blocks/components/DropdownMenu/DropdownMenuBottomSheet.doc.mjs +0 -6
- package/assets/templates/blocks/components/DropdownMenu/DropdownMenuBottomSheet.tsx +7 -7
- package/assets/templates/blocks/components/DropdownMenu/DropdownMenuNoChevron.doc.mjs +0 -1
- package/assets/templates/blocks/components/DropdownMenu/DropdownMenuNoChevron.tsx +2 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateActions.doc.mjs +0 -1
- package/assets/templates/blocks/components/EmptyState/EmptyStateActions.tsx +2 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateCompact.doc.mjs +0 -1
- package/assets/templates/blocks/components/EmptyState/EmptyStateCompact.tsx +1 -1
- package/assets/templates/blocks/components/EmptyState/EmptyStateContainer.doc.mjs +0 -1
- package/assets/templates/blocks/components/EmptyState/EmptyStateContainer.tsx +2 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/EmptyState/EmptyStateShowcase.tsx +2 -2
- package/assets/templates/blocks/components/Grid/GridShowcase.tsx +1 -1
- package/assets/templates/blocks/components/GridSpan/GridSpanColumns.tsx +1 -1
- package/assets/templates/blocks/components/GridSpan/GridSpanShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Heading/HeadingTruncation.tsx +3 -2
- package/assets/templates/blocks/components/Hooks/useClipboardHookUsage.tsx +1 -1
- package/assets/templates/blocks/components/Hooks/useContainerRevealHookUsage.doc.mjs +0 -1
- package/assets/templates/blocks/components/Hooks/useContainerRevealHookUsage.tsx +38 -19
- package/assets/templates/blocks/components/Hooks/useGridFocusHookUsage.tsx +6 -6
- package/assets/templates/blocks/components/Hooks/useHotkeysHookUsage.tsx +1 -1
- package/assets/templates/blocks/components/Hooks/useInputContainerHookUsage.doc.mjs +0 -1
- package/assets/templates/blocks/components/Hooks/useInputContainerHookUsage.tsx +2 -2
- package/assets/templates/blocks/components/Hooks/useKeyboardHintHookUsage.doc.mjs +0 -1
- package/assets/templates/blocks/components/Hooks/useKeyboardHintHookUsage.tsx +2 -2
- package/assets/templates/blocks/components/Hooks/useListFocusHookUsage.tsx +8 -1
- package/assets/templates/blocks/components/Hooks/useOverflowHookUsage.tsx +17 -6
- package/assets/templates/blocks/components/Hooks/useStreamingTextHookUsage.tsx +1 -1
- package/assets/templates/blocks/components/Hooks/useTreeFocusHookUsage.doc.mjs +0 -1
- package/assets/templates/blocks/components/Hooks/useTreeFocusHookUsage.tsx +1 -1
- package/assets/templates/blocks/components/HoverCard/HoverCardInteractiveContent.doc.mjs +0 -1
- package/assets/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx +1 -1
- package/assets/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.doc.mjs +0 -1
- package/assets/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx +1 -1
- package/assets/templates/blocks/components/Icon/useIconHookUsage.doc.mjs +0 -5
- package/assets/templates/blocks/components/Icon/useIconHookUsage.tsx +7 -7
- package/assets/templates/blocks/components/IconButton/IconButtonActionBar.tsx +11 -0
- package/assets/templates/blocks/components/IconButton/IconButtonFloating.doc.mjs +0 -1
- package/assets/templates/blocks/components/IconButton/IconButtonFloating.tsx +25 -2
- package/assets/templates/blocks/components/IconButton/IconButtonShowcase.tsx +3 -0
- package/assets/templates/blocks/components/IconButton/IconButtonTooltipIconButton.tsx +5 -0
- package/assets/templates/blocks/components/InternationalizationProvider/InternationalizationProvider02Overrides.doc.mjs +3 -3
- package/assets/templates/blocks/components/InternationalizationProvider/InternationalizationProvider02Overrides.tsx +36 -13
- package/assets/templates/blocks/components/Item/ItemDocumentTabs.doc.mjs +0 -1
- package/assets/templates/blocks/components/Item/ItemDocumentTabs.tsx +4 -4
- package/assets/templates/blocks/components/Item/ItemShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/Item/ItemShowcase.tsx +7 -3
- package/assets/templates/blocks/components/Layout/LayoutBasicCardLayout.tsx +14 -2
- package/assets/templates/blocks/components/Layout/LayoutContentWidth.tsx +14 -2
- package/assets/templates/blocks/components/Layout/LayoutFullBleedContent.tsx +8 -1
- package/assets/templates/blocks/components/Layout/LayoutShowcase.tsx +8 -1
- package/assets/templates/blocks/components/Layout/LayoutSidebarLayout.tsx +14 -2
- package/assets/templates/blocks/components/LinkProvider/LinkProviderCustomLink.tsx +3 -1
- package/assets/templates/blocks/components/Markdown/MarkdownShowcase.tsx +1 -1
- package/assets/templates/blocks/components/MediaTheme/MediaThemeImageOverlay.tsx +18 -4
- package/assets/templates/blocks/components/MediaTheme/MediaThemeLightScrim.tsx +11 -3
- package/assets/templates/blocks/components/MediaTheme/MediaThemeShowcase.tsx +27 -5
- package/assets/templates/blocks/components/MobileNav/MobileNavBasicMobileNav.doc.mjs +0 -7
- package/assets/templates/blocks/components/MobileNav/MobileNavBasicMobileNav.tsx +5 -9
- package/assets/templates/blocks/components/MobileNav/MobileNavEndSideMobileNav.doc.mjs +0 -1
- package/assets/templates/blocks/components/MobileNav/MobileNavEndSideMobileNav.tsx +2 -2
- package/assets/templates/blocks/components/MobileNav/MobileNavWithoutTitleMobileNav.doc.mjs +0 -1
- package/assets/templates/blocks/components/MobileNav/MobileNavWithoutTitleMobileNav.tsx +1 -1
- package/assets/templates/blocks/components/MoreMenu/MoreMenuBottomSheet.doc.mjs +0 -6
- package/assets/templates/blocks/components/MoreMenu/MoreMenuBottomSheet.tsx +15 -15
- package/assets/templates/blocks/components/MoreMenu/MoreMenuWithDividers.doc.mjs +0 -5
- package/assets/templates/blocks/components/MoreMenu/MoreMenuWithDividers.tsx +4 -8
- package/assets/templates/blocks/components/MoreMenu/MoreMenuWithSections.doc.mjs +0 -5
- package/assets/templates/blocks/components/MoreMenu/MoreMenuWithSections.tsx +4 -8
- package/assets/templates/blocks/components/MultiSelector/useMultiComboboxHookUsage.doc.mjs +0 -1
- package/assets/templates/blocks/components/MultiSelector/useMultiComboboxHookUsage.tsx +1 -1
- package/assets/templates/blocks/components/OverflowList/OverflowListCappedToolbar.tsx +38 -2
- package/assets/templates/blocks/components/OverflowList/OverflowListCollapseFromStartList.tsx +17 -5
- package/assets/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx +46 -7
- package/assets/templates/blocks/components/OverflowList/OverflowListShowcase.tsx +45 -5
- package/assets/templates/blocks/components/Overlay/OverlayHoverReveal.tsx +14 -1
- package/assets/templates/blocks/components/Overlay/OverlayShowcase.tsx +10 -1
- package/assets/templates/blocks/components/Overlay/useOverlayHookUsage.tsx +12 -1
- package/assets/templates/blocks/components/Pagination/PaginationDotsCarousel.doc.mjs +0 -1
- package/assets/templates/blocks/components/Pagination/PaginationDotsCarousel.tsx +1 -1
- package/assets/templates/blocks/components/Popover/PopoverBottomSheetAlternative.doc.mjs +0 -1
- package/assets/templates/blocks/components/Popover/PopoverBottomSheetAlternative.tsx +1 -1
- package/assets/templates/blocks/components/Resizable/ResizableShowcase.tsx +12 -2
- package/assets/templates/blocks/components/Resizable/ResizableSidebar.tsx +1 -1
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaInlineRail.tsx +1 -1
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaOverscrollChaining.tsx +1 -1
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaShowcase.tsx +1 -1
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaStickyGroupHeaders.tsx +1 -1
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaStickyPassthrough.tsx +1 -1
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaTwoAxisBoard.tsx +1 -1
- package/assets/templates/blocks/components/Section/SectionWashHighlight.doc.mjs +0 -1
- package/assets/templates/blocks/components/Section/SectionWashHighlight.tsx +10 -2
- package/assets/templates/blocks/components/Selector/SelectorOptionDescriptions.doc.mjs +0 -1
- package/assets/templates/blocks/components/Selector/SelectorOptionDescriptions.tsx +3 -3
- package/assets/templates/blocks/components/SelectorOption/SelectorOptionShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/SelectorOption/SelectorOptionShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Stack/StackAlignment.tsx +50 -6
- package/assets/templates/blocks/components/Stack/StackDirections.tsx +1 -1
- package/assets/templates/blocks/components/Stack/StackFillItem.tsx +10 -1
- package/assets/templates/blocks/components/Step/StepContent.tsx +13 -4
- package/assets/templates/blocks/components/Step/StepIndicator.tsx +3 -2
- package/assets/templates/blocks/components/Step/StepShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Step/StepStates.tsx +3 -2
- package/assets/templates/blocks/components/Stepper/StepperCustomContent.tsx +18 -14
- package/assets/templates/blocks/components/Stepper/StepperOnTrackHorizontal.tsx +1 -1
- package/assets/templates/blocks/components/Table/TableInCard.tsx +1 -1
- package/assets/templates/blocks/components/Table/TableShowcase.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaWithIcon.doc.mjs +0 -1
- package/assets/templates/blocks/components/TextArea/TextAreaWithIcon.tsx +2 -2
- package/assets/templates/blocks/components/TextInput/TextInputIcon.doc.mjs +0 -1
- package/assets/templates/blocks/components/TextInput/TextInputIcon.tsx +3 -7
- package/assets/templates/blocks/components/TextInput/TextInputSearch.doc.mjs +0 -1
- package/assets/templates/blocks/components/TextInput/TextInputSearch.tsx +3 -3
- package/assets/templates/blocks/components/Theme/ThemeApply.tsx +8 -1
- package/assets/templates/blocks/components/Theme/ThemeNested.tsx +11 -1
- package/assets/templates/blocks/components/Theme/ThemeShowcase.tsx +26 -3
- package/assets/templates/blocks/components/Theme/ThemeSwitcher.tsx +8 -1
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonColor.doc.mjs +0 -11
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonColor.tsx +5 -5
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonGroup.doc.mjs +0 -9
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonGroup.tsx +5 -9
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonIconSwap.doc.mjs +0 -6
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonIconSwap.tsx +6 -6
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonLabel.doc.mjs +0 -6
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonLabel.tsx +3 -3
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonShowcase.doc.mjs +0 -6
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonShowcase.tsx +6 -6
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonStates.doc.mjs +0 -1
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonStates.tsx +2 -2
- package/assets/templates/blocks/components/Token/TokenIcon.doc.mjs +0 -6
- package/assets/templates/blocks/components/Token/TokenIcon.tsx +3 -3
- package/assets/templates/blocks/components/Token/TokenShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/Token/TokenShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx +14 -1
- package/assets/templates/blocks/components/Tokenizer/TokenizerIcon.doc.mjs +0 -1
- package/assets/templates/blocks/components/Tokenizer/TokenizerIcon.tsx +2 -2
- package/assets/templates/blocks/components/Toolbar/ToolbarBulkActions.doc.mjs +0 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarBulkActions.tsx +36 -3
- package/assets/templates/blocks/components/Toolbar/ToolbarCardHeader.doc.mjs +0 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx +4 -3
- package/assets/templates/blocks/components/Toolbar/ToolbarSizes.doc.mjs +0 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarSizes.tsx +3 -3
- package/assets/templates/blocks/components/Toolbar/ToolbarTableFilter.doc.mjs +0 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarTableFilter.tsx +8 -3
- package/assets/templates/blocks/components/Toolbar/ToolbarThreeSlot.doc.mjs +0 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx +6 -2
- package/assets/templates/blocks/components/Toolbar/ToolbarWithTabs.doc.mjs +0 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarWithTabs.tsx +11 -2
- package/assets/templates/blocks/components/Tooltip/TooltipActionBarTooltips.tsx +33 -3
- package/assets/templates/blocks/components/TopNav/TopNavCenteredNavigation.doc.mjs +0 -1
- package/assets/templates/blocks/components/TopNav/TopNavCenteredNavigation.tsx +2 -2
- package/assets/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.doc.mjs +0 -6
- package/assets/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.tsx +7 -7
- package/assets/templates/blocks/components/TopNav/TopNavHoverMenu.doc.mjs +0 -8
- package/assets/templates/blocks/components/TopNav/TopNavHoverMenu.tsx +14 -9
- package/assets/templates/blocks/components/TopNav/TopNavMegaMenu.doc.mjs +0 -8
- package/assets/templates/blocks/components/TopNav/TopNavMegaMenu.tsx +11 -11
- package/assets/templates/blocks/components/TopNav/TopNavMultipleDropdowns.doc.mjs +0 -5
- package/assets/templates/blocks/components/TopNav/TopNavMultipleDropdowns.tsx +4 -8
- package/assets/templates/blocks/components/TopNav/TopNavShowcase.doc.mjs +0 -5
- package/assets/templates/blocks/components/TopNav/TopNavShowcase.tsx +8 -4
- package/assets/templates/blocks/components/TopNav/TopNavWithLogo.doc.mjs +0 -1
- package/assets/templates/blocks/components/TopNav/TopNavWithLogo.tsx +7 -2
- package/assets/templates/blocks/components/TopNavItem/TopNavItemShowcase.tsx +1 -1
- package/assets/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.doc.mjs +0 -1
- package/assets/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.tsx +4 -4
- package/assets/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuShowcase.doc.mjs +0 -7
- package/assets/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuShowcase.tsx +12 -12
- package/assets/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.doc.mjs +0 -1
- package/assets/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.tsx +2 -2
- package/assets/templates/blocks/components/TopNavMenu/TopNavMenuBasic.doc.mjs +0 -1
- package/assets/templates/blocks/components/TopNavMenu/TopNavMenuBasic.tsx +4 -4
- package/assets/templates/blocks/components/TopNavMenu/TopNavMenuShowcase.doc.mjs +0 -6
- package/assets/templates/blocks/components/TopNavMenu/TopNavMenuShowcase.tsx +11 -8
- package/assets/templates/blocks/components/TreeList/TreeListFileTreeWithIcons.doc.mjs +0 -1
- package/assets/templates/blocks/components/TreeList/TreeListFileTreeWithIcons.tsx +4 -4
- package/assets/templates/blocks/components/TreeList/TreeListInteractiveSettings.doc.mjs +0 -1
- package/assets/templates/blocks/components/TreeList/TreeListInteractiveSettings.tsx +6 -3
- package/assets/templates/blocks/components/Typeahead/TypeaheadSearchField.doc.mjs +0 -1
- package/assets/templates/blocks/components/Typeahead/TypeaheadSearchField.tsx +2 -2
- package/assets/templates/blocks/components/VisuallyHidden/VisuallyHiddenShowcase.doc.mjs +0 -6
- package/assets/templates/blocks/components/VisuallyHidden/VisuallyHiddenShowcase.tsx +30 -7
- package/assets/templates/blocks/components/VisuallyHidden/VisuallyHiddenSupplementaryContext.doc.mjs +0 -1
- package/assets/templates/blocks/components/VisuallyHidden/VisuallyHiddenSupplementaryContext.tsx +4 -1
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ai-chat/page.tsx +19 -15
- package/assets/templates/pages/ai-chat/template.doc.mjs +0 -9
- package/assets/templates/pages/ai-chat-landing/page.tsx +16 -16
- package/assets/templates/pages/ai-chat-landing/template.doc.mjs +0 -11
- package/assets/templates/pages/blank/page.tsx +4 -2
- package/assets/templates/pages/canvas-editor/page.tsx +200 -110
- package/assets/templates/pages/canvas-editor/template.doc.mjs +0 -46
- package/assets/templates/pages/centered-hero/page.tsx +2 -2
- package/assets/templates/pages/centered-hero/template.doc.mjs +0 -1
- package/assets/templates/pages/checkout-wizard/page.tsx +31 -18
- package/assets/templates/pages/checkout-wizard/template.doc.mjs +0 -7
- package/assets/templates/pages/classic-gallery/page.tsx +1 -1
- package/assets/templates/pages/contact-form/page.tsx +15 -10
- package/assets/templates/pages/contact-form/template.doc.mjs +0 -5
- package/assets/templates/pages/course-detail/page.tsx +10 -10
- package/assets/templates/pages/course-detail/template.doc.mjs +0 -11
- package/assets/templates/pages/dashboard/page.tsx +13 -11
- package/assets/templates/pages/dashboard/template.doc.mjs +0 -6
- package/assets/templates/pages/dashboard-alert-rail/page.tsx +12 -12
- package/assets/templates/pages/dashboard-alert-rail/template.doc.mjs +0 -8
- package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +7 -13
- package/assets/templates/pages/dashboard-cohort-funnel/template.doc.mjs +0 -7
- package/assets/templates/pages/dashboard-comparison/page.tsx +12 -10
- package/assets/templates/pages/dashboard-comparison/template.doc.mjs +0 -8
- package/assets/templates/pages/dashboard-composition/page.tsx +30 -19
- package/assets/templates/pages/dashboard-composition/template.doc.mjs +0 -1
- package/assets/templates/pages/dashboard-progress/page.tsx +101 -108
- package/assets/templates/pages/dashboard-progress/template.doc.mjs +0 -7
- package/assets/templates/pages/dashboard-scorecard/page.tsx +61 -33
- package/assets/templates/pages/dashboard-scorecard/template.doc.mjs +0 -7
- package/assets/templates/pages/detail-page/page.tsx +28 -11
- package/assets/templates/pages/detail-page/template.doc.mjs +0 -10
- package/assets/templates/pages/documentation/page.tsx +11 -4
- package/assets/templates/pages/documentation-design/page.tsx +39 -12
- package/assets/templates/pages/documentation-design/template.doc.mjs +0 -5
- package/assets/templates/pages/documentation-technical/page.tsx +8 -6
- package/assets/templates/pages/documentation-technical/template.doc.mjs +0 -5
- package/assets/templates/pages/editor/page.tsx +70 -48
- package/assets/templates/pages/editor/template.doc.mjs +0 -26
- package/assets/templates/pages/file-explorer/page.tsx +19 -19
- package/assets/templates/pages/file-explorer/template.doc.mjs +0 -15
- package/assets/templates/pages/form-two-column/page.tsx +1 -1
- package/assets/templates/pages/form-wizard/page.tsx +12 -5
- package/assets/templates/pages/form-wizard-dialog/page.tsx +6 -2
- package/assets/templates/pages/form-wizard-inline/page.tsx +16 -12
- package/assets/templates/pages/form-wizard-inline/template.doc.mjs +0 -6
- package/assets/templates/pages/form-wizard-vertical/page.tsx +21 -24
- package/assets/templates/pages/form-wizard-vertical/template.doc.mjs +0 -13
- package/assets/templates/pages/gallery-hero/page.tsx +2 -2
- package/assets/templates/pages/gallery-hero/template.doc.mjs +0 -1
- package/assets/templates/pages/ide/page.tsx +12 -7
- package/assets/templates/pages/ide/template.doc.mjs +0 -5
- package/assets/templates/pages/incident-console/page.tsx +4 -4
- package/assets/templates/pages/incident-console/template.doc.mjs +0 -1
- package/assets/templates/pages/kanban-board/page.tsx +128 -47
- package/assets/templates/pages/kanban-board/template.doc.mjs +0 -11
- package/assets/templates/pages/library/page.tsx +34 -64
- package/assets/templates/pages/library/template.doc.mjs +0 -1
- package/assets/templates/pages/login/page.tsx +6 -4
- package/assets/templates/pages/login/template.doc.mjs +0 -1
- package/assets/templates/pages/login-card/page.tsx +6 -4
- package/assets/templates/pages/login-card/template.doc.mjs +0 -1
- package/assets/templates/pages/login-split/page.tsx +6 -5
- package/assets/templates/pages/login-split/template.doc.mjs +0 -1
- package/assets/templates/pages/login-sso/page.tsx +6 -6
- package/assets/templates/pages/login-sso/template.doc.mjs +0 -1
- package/assets/templates/pages/messaging-shell/page.tsx +14 -14
- package/assets/templates/pages/messaging-shell/template.doc.mjs +0 -9
- package/assets/templates/pages/mixed-gallery/page.tsx +1 -1
- package/assets/templates/pages/payment-form/page.tsx +50 -29
- package/assets/templates/pages/payment-form/template.doc.mjs +0 -6
- package/assets/templates/pages/product-detail/page.tsx +21 -9
- package/assets/templates/pages/product-detail/template.doc.mjs +0 -1
- package/assets/templates/pages/product-gallery/page.tsx +3 -3
- package/assets/templates/pages/product-gallery/template.doc.mjs +0 -1
- package/assets/templates/pages/settings/page.tsx +35 -14
- package/assets/templates/pages/settings/template.doc.mjs +0 -1
- package/assets/templates/pages/settings-dialog/page.tsx +96 -93
- package/assets/templates/pages/settings-dialog/template.doc.mjs +0 -53
- package/assets/templates/pages/settings-sidebar/page.tsx +74 -36
- package/assets/templates/pages/settings-sidebar/template.doc.mjs +0 -16
- package/assets/templates/pages/shell-nav/page.tsx +32 -20
- package/assets/templates/pages/shell-nav/template.doc.mjs +0 -6
- package/assets/templates/pages/shell-side-nav/page.tsx +23 -22
- package/assets/templates/pages/shell-side-nav/template.doc.mjs +0 -11
- package/assets/templates/pages/shell-top-nav/page.tsx +13 -13
- package/assets/templates/pages/shell-top-nav/template.doc.mjs +0 -19
- package/assets/templates/pages/side-gallery/page.tsx +5 -2
- package/assets/templates/pages/table/page.tsx +21 -21
- package/assets/templates/pages/table/template.doc.mjs +0 -10
- package/assets/templates/pages/table-collapsible/page.tsx +8 -8
- package/assets/templates/pages/table-collapsible/template.doc.mjs +0 -6
- package/assets/templates/pages/table-comparison/page.tsx +23 -23
- package/assets/templates/pages/table-comparison/template.doc.mjs +0 -14
- package/assets/templates/pages/table-filter/page.tsx +75 -47
- package/assets/templates/pages/table-filter/template.doc.mjs +0 -19
- package/assets/templates/pages/table-grouped/page.tsx +16 -15
- package/assets/templates/pages/table-grouped/template.doc.mjs +0 -11
- package/assets/templates/pages/table-inbox/page.tsx +65 -33
- package/assets/templates/pages/table-inbox/template.doc.mjs +0 -17
- package/assets/templates/pages/table-page/page.tsx +3 -6
- package/assets/templates/pages/table-page/template.doc.mjs +0 -1
- package/assets/templates/pages/table-tree/page.tsx +35 -35
- package/assets/templates/pages/table-tree/template.doc.mjs +0 -15
- package/assets/templates/pages/theme-showcase/page.tsx +48 -43
- package/assets/templates/pages/theme-showcase/template.doc.mjs +0 -19
- package/assets/templates/pages/work-item-detail/page.tsx +60 -33
- package/assets/templates/pages/work-item-detail/template.doc.mjs +0 -12
- package/assets/templates/themes/butter/butterTheme.ts +50 -9
- package/assets/templates/themes/chocolate/chocolateTheme.ts +13 -6
- package/assets/templates/themes/gothic/gothicTheme.ts +14 -2
- package/assets/templates/themes/matcha/matchaTheme.ts +10 -2
- package/assets/templates/themes/neutral/neutralTheme.ts +16 -0
- package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +1 -1
- package/assets/templates/themes/stone/stoneTheme.ts +32 -10
- package/assets/templates/themes/y2k/y2kTheme.ts +11 -3
- package/assets/theme.template.ts +17 -7
- package/authoring/config/config.doc.mjs +8 -1
- package/authoring/config/parse.mjs +15 -0
- package/authoring/config/skill-places.d.mts +23 -0
- package/authoring/config/skill-places.mjs +35 -0
- package/authoring/config/type.ts +16 -0
- package/authoring/debug/parse.d.mts +1 -1
- package/authoring/debug/type.ts +4 -0
- package/authoring/discover/parse.d.mts +2 -1
- package/authoring/discover/parse.mjs +73 -38
- package/authoring/discover/type.ts +9 -2
- package/authoring/doctypes/_schema.d.mts +36 -16
- package/authoring/doctypes/_schema.mjs +29 -0
- package/authoring/doctypes/base/type.ts +19 -0
- package/authoring/doctypes/command/command.doc.mjs +6 -0
- package/authoring/doctypes/command/type.ts +7 -0
- package/authoring/doctypes/component/component.doc.mjs +1 -1
- package/authoring/doctypes/icon-definition/icon-definition.doc.mjs +16 -0
- package/authoring/doctypes/icon-definition/parse.mjs +12 -0
- package/authoring/doctypes/icon-definition/type.ts +18 -0
- package/authoring/doctypes/reference/reference.doc.mjs +13 -0
- package/authoring/doctypes/reference/skill.d.mts +29 -0
- package/authoring/doctypes/reference/skill.mjs +56 -0
- package/authoring/doctypes/reference/type.ts +19 -0
- package/authoring/gap-report/parse.d.mts +1 -1
- package/authoring/integration/integration.doc.mjs +8 -0
- package/authoring/integration/schema.d.mts +21 -3
- package/authoring/integration/schema.mjs +25 -5
- package/authoring/integration/type.ts +14 -0
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/build.doc.mjs +1 -1
- package/clients/cli/commands/build.mjs +11 -11
- package/clients/cli/commands/component.doc.mjs +3 -1
- package/clients/cli/commands/component.mjs +7 -3
- package/clients/cli/commands/discover.doc.mjs +2 -2
- package/clients/cli/commands/discover.mjs +108 -8
- package/clients/cli/commands/docs.doc.mjs +7 -2
- package/clients/cli/commands/docs.mjs +64 -172
- package/clients/cli/commands/doctor-integration-validate.doc.mjs +4 -2
- package/clients/cli/commands/doctor.doc.mjs +3 -1
- package/clients/cli/commands/doctor.mjs +16 -3
- package/clients/cli/commands/experimental/export.mjs +64 -0
- package/clients/cli/commands/experimental/icon.mjs +67 -12
- package/clients/cli/commands/experimental/import.mjs +70 -0
- package/clients/cli/commands/experimental/index.mjs +152 -13
- package/clients/cli/commands/experimental/render-output.mjs +242 -0
- package/clients/cli/commands/experimental/theme.mjs +34 -13
- package/clients/cli/commands/experimental-export.doc.mjs +73 -0
- package/clients/cli/commands/experimental-icon.doc.mjs +1 -1
- package/clients/cli/commands/experimental-import.doc.mjs +53 -0
- package/clients/cli/commands/experimental-theme-add.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +6 -1
- package/clients/cli/commands/experimental-theme.doc.mjs +1 -1
- package/clients/cli/commands/experimental.doc.mjs +4 -4
- package/clients/cli/commands/init.doc.mjs +34 -14
- package/clients/cli/commands/integration-check.doc.mjs +1 -1
- package/clients/cli/commands/mcp.doc.mjs +5 -1
- package/clients/cli/commands/search.mjs +68 -7
- package/clients/cli/commands/template.doc.mjs +14 -5
- package/clients/cli/commands/template.mjs +18 -0
- package/clients/cli/commands/theme-add.doc.mjs +6 -2
- package/clients/cli/commands/theme-remove.doc.mjs +1 -1
- package/clients/cli/commands/theme-targets.doc.mjs +1 -1
- package/clients/cli/commands/theme.mjs +76 -5
- package/clients/cli/commands/upgrade.doc.mjs +2 -1
- package/clients/cli/commands.generated.json +1 -1
- package/clients/cli/index.mjs +30 -31
- package/clients/cli/lib/cli-error.mjs +20 -10
- package/clients/cli/lib/component-format.mjs +167 -74
- package/clients/cli/lib/define-command.mjs +10 -0
- package/clients/cli/lib/hook-format.mjs +28 -24
- package/clients/cli/lib/json-shim.mjs +9 -3
- package/clients/cli/lib/mcp-tools.mjs +8 -2
- package/clients/cli/lib/other-cli-words.mjs +99 -0
- package/clients/cli/lib/renamed-commands.mjs +21 -0
- package/clients/cli/lib/root-args.mjs +10 -3
- package/clients/cli/lib/stray-option.mjs +79 -1
- package/clients/cli/lib/unknown-command.mjs +406 -13
- package/clients/cli/manifest.generated.json +1 -1
- package/clients/cli/run.mjs +27 -0
- package/foundation/agent-docs/agent-doc-state.d.mts +20 -2
- package/foundation/agent-docs/agent-doc-state.mjs +71 -4
- package/foundation/agent-docs/agent-docs.d.mts +43 -4
- package/foundation/agent-docs/agent-docs.mjs +54 -5
- package/foundation/agent-docs/computer-agent-text.d.mts +28 -14
- package/foundation/agent-docs/computer-agent-text.mjs +85 -172
- package/foundation/agent-docs/folder-scope.d.mts +51 -0
- package/foundation/agent-docs/folder-scope.mjs +86 -0
- package/foundation/agent-docs/managed-skill-file.d.mts +115 -0
- package/foundation/agent-docs/managed-skill-file.mjs +224 -0
- package/foundation/agent-docs/skill-place-files.d.mts +119 -0
- package/foundation/agent-docs/skill-place-files.mjs +374 -0
- package/foundation/agent-docs/skill-places.d.mts +139 -0
- package/foundation/agent-docs/skill-places.mjs +321 -0
- package/foundation/color/css-color.d.mts +150 -0
- package/foundation/color/css-color.mjs +960 -0
- package/foundation/config/config-path.d.mts +2 -2
- package/foundation/config/config-path.mjs +5 -6
- package/foundation/config/config-writer.d.mts +5 -1
- package/foundation/config/config-writer.mjs +20 -4
- package/foundation/config/project.d.mts +3 -1
- package/foundation/config/project.mjs +8 -5
- package/foundation/config/theme-state.d.mts +13 -0
- package/foundation/config/theme-state.mjs +28 -0
- package/foundation/debug/event.d.mts +2 -1
- package/foundation/debug/event.mjs +2 -1
- package/foundation/discovery/button-actions.d.mts +220 -0
- package/foundation/discovery/button-actions.mjs +1527 -0
- package/foundation/discovery/cli-self-docs.d.mts +7 -0
- package/foundation/discovery/cli-self-docs.mjs +67 -6
- package/foundation/discovery/color-modes.d.mts +14 -0
- package/foundation/discovery/color-modes.mjs +53 -0
- package/foundation/discovery/command-pointers.d.mts +21 -4
- package/foundation/discovery/command-pointers.mjs +25 -4
- package/foundation/discovery/component-discovery.d.mts +10 -0
- package/foundation/discovery/component-discovery.mjs +99 -43
- package/foundation/discovery/component-replacement.d.mts +8 -0
- package/foundation/discovery/component-replacement.mjs +13 -0
- package/foundation/discovery/core-augmentation-points.d.mts +90 -0
- package/foundation/discovery/core-augmentation-points.mjs +1030 -0
- package/foundation/discovery/core-component-views.d.mts +15 -0
- package/foundation/discovery/core-component-views.mjs +176 -0
- package/foundation/discovery/core-elements.d.mts +29 -0
- package/foundation/discovery/core-elements.mjs +57 -0
- package/foundation/discovery/core-prop-types.d.mts +65 -0
- package/foundation/discovery/core-prop-types.mjs +221 -0
- package/foundation/discovery/core-props.d.mts +33 -0
- package/foundation/discovery/core-props.mjs +64 -0
- package/foundation/discovery/doc-types.d.mts +10 -42
- package/foundation/discovery/doc-types.mjs +26 -7
- package/foundation/discovery/docs-discovery.d.mts +33 -2
- package/foundation/discovery/docs-discovery.mjs +149 -72
- package/foundation/discovery/docs-section-key.d.mts +21 -1
- package/foundation/discovery/docs-section-key.mjs +57 -19
- package/foundation/discovery/hook-discovery.d.mts +2 -0
- package/foundation/discovery/hook-discovery.mjs +6 -5
- package/foundation/discovery/icon-definition-discovery.d.mts +155 -3
- package/foundation/discovery/icon-definition-discovery.mjs +197 -5
- package/foundation/discovery/icon-imports.d.mts +66 -0
- package/foundation/discovery/icon-imports.mjs +225 -0
- package/foundation/discovery/icon-ranking.d.mts +108 -4
- package/foundation/discovery/icon-ranking.mjs +277 -70
- package/foundation/discovery/icon-set-checks.d.mts +2 -0
- package/foundation/discovery/icon-set-checks.mjs +16 -2
- package/foundation/discovery/icon-set-discovery.d.mts +42 -2
- package/foundation/discovery/icon-set-discovery.mjs +85 -23
- package/foundation/discovery/icon-set-writer.d.mts +7 -2
- package/foundation/discovery/icon-set-writer.mjs +86 -7
- package/foundation/discovery/integration-skills.d.mts +62 -0
- package/foundation/discovery/integration-skills.mjs +116 -0
- package/foundation/discovery/module-exports.d.mts +8 -0
- package/foundation/discovery/module-exports.mjs +20 -21
- package/foundation/discovery/package-exports.d.mts +22 -0
- package/foundation/discovery/package-exports.mjs +44 -3
- package/foundation/discovery/project-typescript.d.mts +5 -1
- package/foundation/discovery/project-typescript.mjs +8 -2
- package/foundation/discovery/prop-drift.d.mts +16 -0
- package/foundation/discovery/prop-drift.mjs +154 -3
- package/foundation/discovery/replacement-aliases.d.mts +51 -0
- package/foundation/discovery/replacement-aliases.mjs +95 -0
- package/foundation/discovery/runner-allowlist.d.mts +1 -1
- package/foundation/discovery/runner-allowlist.mjs +1 -1
- package/foundation/discovery/stored-component-list.mjs +34 -2
- package/foundation/discovery/template-adapter.d.mts +26 -0
- package/foundation/discovery/template-adapter.mjs +221 -10
- package/foundation/discovery/template-destination.d.mts +14 -6
- package/foundation/discovery/template-destination.mjs +42 -8
- package/foundation/discovery/template-icon-meanings.d.mts +7 -2
- package/foundation/discovery/template-icon-meanings.mjs +52 -12
- package/foundation/discovery/template-icons.d.mts +44 -1
- package/foundation/discovery/template-icons.mjs +60 -63
- package/foundation/discovery/template-needs.d.mts +17 -8
- package/foundation/discovery/template-needs.mjs +119 -31
- package/foundation/discovery/template-placeholders.d.mts +149 -0
- package/foundation/discovery/template-placeholders.mjs +463 -0
- package/foundation/discovery/template-source-tree.d.mts +6 -3
- package/foundation/discovery/template-source-tree.mjs +8 -5
- package/foundation/discovery/theme-discovery.d.mts +8 -0
- package/foundation/discovery/theme-discovery.mjs +23 -6
- package/foundation/discovery/theme-imports.d.mts +1 -3
- package/foundation/discovery/theme-imports.mjs +5 -30
- package/foundation/doc-compiler/compile.mjs +6 -8
- package/foundation/doc-compiler/doc-syntax.d.mts +25 -1
- package/foundation/doc-compiler/doc-syntax.mjs +85 -10
- package/foundation/doc-compiler/doc-text.d.mts +52 -0
- package/foundation/doc-compiler/doc-text.mjs +176 -0
- package/foundation/doc-compiler/links.d.mts +8 -2
- package/foundation/doc-compiler/links.mjs +27 -6
- package/foundation/doc-compiler/read.d.mts +1 -1
- package/foundation/doc-compiler/stored-docs.d.mts +14 -3
- package/foundation/doc-compiler/stored-docs.mjs +12 -6
- package/foundation/env/cli-command.d.mts +68 -10
- package/foundation/env/cli-command.mjs +116 -22
- package/foundation/env/package-manager.d.mts +33 -2
- package/foundation/env/package-manager.mjs +68 -6
- package/foundation/env/user-dirs.d.mts +14 -0
- package/foundation/env/user-dirs.mjs +34 -1
- package/foundation/env/user-settings.d.mts +15 -0
- package/foundation/env/user-settings.mjs +56 -2
- package/foundation/fonts/font-stylesheet.d.mts +11 -0
- package/foundation/fonts/font-stylesheet.mjs +62 -7
- package/foundation/fs/cache-eviction.d.mts +7 -5
- package/foundation/fs/cache-eviction.mjs +20 -13
- package/foundation/fs/empty-folder.d.mts +12 -0
- package/foundation/fs/empty-folder.mjs +30 -0
- package/foundation/fs/file-protection.d.mts +11 -0
- package/foundation/fs/file-protection.mjs +49 -3
- package/foundation/fs/gather-cache.d.mts +14 -7
- package/foundation/fs/gather-cache.mjs +163 -67
- package/foundation/fs/import-url.d.mts +7 -5
- package/foundation/fs/import-url.mjs +7 -5
- package/foundation/fs/jiti-cache.d.mts +47 -26
- package/foundation/fs/jiti-cache.mjs +222 -130
- package/foundation/fs/loaded-files.d.mts +15 -1
- package/foundation/fs/loaded-files.mjs +40 -3
- package/foundation/fs/module-loader.d.mts +3 -1
- package/foundation/fs/module-loader.mjs +85 -5
- package/foundation/fs/path-safety.d.mts +1 -0
- package/foundation/fs/path-safety.mjs +2 -0
- package/foundation/fs/relative-specifier.d.mts +10 -0
- package/foundation/fs/relative-specifier.mjs +28 -0
- package/foundation/integrations/computer-integrations.mjs +11 -10
- package/foundation/integrations/icon-features.d.mts +1 -1
- package/foundation/integrations/icon-features.mjs +1 -1
- package/foundation/integrations/integration-warnings.d.mts +10 -0
- package/foundation/integrations/integration-warnings.mjs +12 -3
- package/foundation/integrations/integrations.d.mts +16 -2
- package/foundation/integrations/integrations.mjs +50 -8
- package/foundation/integrations/may-have-integrations.mjs +7 -6
- package/foundation/integrations/provider-resolution.mjs +19 -2
- package/foundation/integrations/validate-contributions.d.mts +4 -0
- package/foundation/integrations/validate-contributions.mjs +24 -0
- package/foundation/release/agent-text-worker.mjs +33 -1
- package/foundation/release/cache.d.mts +48 -3
- package/foundation/release/cache.mjs +196 -20
- package/foundation/release/choose.d.mts +5 -2
- package/foundation/release/choose.mjs +54 -4
- package/foundation/release/global-state.mjs +10 -2
- package/foundation/release/handoff.mjs +7 -1
- package/foundation/release/notices.d.mts +97 -9
- package/foundation/release/notices.mjs +381 -56
- package/foundation/release/project.d.mts +21 -4
- package/foundation/release/project.mjs +74 -42
- package/foundation/release/run-context.d.mts +6 -0
- package/foundation/release/run-context.mjs +9 -0
- package/foundation/render/assets.d.mts +7 -0
- package/foundation/render/assets.mjs +30 -17
- package/foundation/render/charts.d.mts +11 -10
- package/foundation/render/charts.mjs +112 -1
- package/foundation/render/class-alias.d.mts +23 -0
- package/foundation/render/class-alias.mjs +333 -0
- package/foundation/render/client-bundle.d.mts +183 -0
- package/foundation/render/client-bundle.mjs +1026 -0
- package/foundation/render/component-map.mjs +1 -1
- package/foundation/render/css-cut.d.mts +26 -0
- package/foundation/render/css-cut.mjs +344 -2
- package/foundation/render/dropped-text.d.mts +43 -0
- package/foundation/render/dropped-text.mjs +90 -0
- package/foundation/render/embedded-files.d.mts +24 -1
- package/foundation/render/embedded-files.mjs +41 -4
- package/foundation/render/embedded-imports.d.mts +72 -12
- package/foundation/render/embedded-imports.mjs +206 -70
- package/foundation/render/esbuild-dependency.d.mts +14 -0
- package/foundation/render/esbuild-dependency.mjs +41 -0
- package/foundation/render/file-header.d.mts +7 -2
- package/foundation/render/file-header.mjs +19 -10
- package/foundation/render/html-reader.d.mts +36 -17
- package/foundation/render/html-reader.mjs +239 -32
- package/foundation/render/image-attributes.d.mts +25 -0
- package/foundation/render/image-attributes.mjs +33 -0
- package/foundation/render/markup-edits.mjs +1 -1
- package/foundation/render/package-resolve-hooks.d.mts +54 -0
- package/foundation/render/package-resolve-hooks.mjs +144 -0
- package/foundation/render/page-host.mjs +1 -1
- package/foundation/render/page-worker.mjs +1307 -107
- package/foundation/render/picture-chrome.mjs +13 -1
- package/foundation/render/picture-playwright.mjs +13 -0
- package/foundation/render/picture-window.d.mts +18 -5
- package/foundation/render/picture-window.mjs +211 -19
- package/foundation/render/rebuild.mjs +2 -2
- package/foundation/render/remote-images.d.mts +83 -0
- package/foundation/render/remote-images.mjs +384 -0
- package/foundation/render/render-page.d.mts +214 -6
- package/foundation/render/render-page.mjs +1673 -163
- package/foundation/render/restore-folder.d.mts +13 -0
- package/foundation/render/restore-folder.mjs +30 -0
- package/foundation/render/served-packages.d.mts +14 -1
- package/foundation/render/served-packages.mjs +50 -6
- package/foundation/render/share-checks.d.mts +35 -0
- package/foundation/render/share-checks.mjs +95 -0
- package/foundation/render/source-block.d.mts +14 -3
- package/foundation/render/source-block.mjs +44 -9
- package/foundation/render/srcset.d.mts +32 -0
- package/foundation/render/srcset.mjs +64 -0
- package/foundation/render/ts-paths.d.mts +52 -1
- package/foundation/render/ts-paths.mjs +114 -4
- package/foundation/render/value-uses.d.mts +43 -0
- package/foundation/render/value-uses.mjs +110 -0
- package/foundation/response/error-codes.d.mts +2 -1
- package/foundation/response/error-codes.doc.mjs +16 -10
- package/foundation/response/error-codes.mjs +19 -8
- package/foundation/response/json.d.mts +0 -15
- package/foundation/response/json.mjs +1 -51
- package/foundation/response/response-types.doc.mjs +24 -13
- package/foundation/runtime/css-tree.d.mts +16 -0
- package/foundation/runtime/css-tree.mjs +46 -3
- package/foundation/runtime/lazy-dependencies.d.mts +7 -0
- package/foundation/runtime/lazy-dependencies.mjs +25 -3
- package/foundation/runtime/locked-versions.d.mts +4 -2
- package/foundation/runtime/locked-versions.mjs +18 -10
- package/foundation/runtime/package-root.d.mts +25 -0
- package/foundation/runtime/package-root.mjs +48 -0
- package/foundation/runtime/word-table.d.mts +18 -0
- package/foundation/runtime/word-table.mjs +33 -0
- package/foundation/suggest/other-command.d.mts +23 -0
- package/foundation/suggest/other-command.mjs +49 -5
- package/foundation/text/default-variant.d.mts +20 -0
- package/foundation/text/default-variant.mjs +24 -0
- package/foundation/text/definition-coverage.d.mts +21 -0
- package/foundation/text/definition-coverage.mjs +20 -0
- package/foundation/text/icon-set-next.d.mts +11 -10
- package/foundation/text/icon-set-next.mjs +19 -11
- package/foundation/text/string-utils.mjs +14 -41
- package/foundation/text/suggest-order.d.mts +10 -4
- package/foundation/text/suggest-order.mjs +20 -13
- package/package.json +8 -6
- package/assets/codemods/transforms/next/migrate-item-swipe-actions-to-swipe.mjs +0 -394
- package/assets/docs/tree/render-pages.doc.mjs +0 -135
- package/clients/cli/commands/experimental/render.mjs +0 -154
- package/clients/cli/commands/experimental-render.doc.mjs +0 -73
|
@@ -44,6 +44,7 @@ import {
|
|
|
44
44
|
nearestShade,
|
|
45
45
|
paletteDialOf,
|
|
46
46
|
seedOf,
|
|
47
|
+
seedsInEffect,
|
|
47
48
|
vibrancyMoves,
|
|
48
49
|
} from './_palette.mjs';
|
|
49
50
|
import {isColorToken} from './_compiler.mjs';
|
|
@@ -89,7 +90,7 @@ import {render as renderStep} from './_how-commands.mjs';
|
|
|
89
90
|
* steps run in order; most options are one step. `smallest`: the options
|
|
90
91
|
* are one change in growing amounts, and the answer is the first the
|
|
91
92
|
* measured check keeps.
|
|
92
|
-
* @typedef {{text: string, options: Step[][], sequence?: boolean, lookup?: string, intent?: MeasureIntent, smallest?: boolean, modeInValue?: boolean}} Draft
|
|
93
|
+
* @typedef {{text: string, options: Step[][], sequence?: boolean, lookup?: string, intent?: MeasureIntent, smallest?: boolean, modeInValue?: boolean, unmet?: string}} Draft
|
|
93
94
|
*/
|
|
94
95
|
|
|
95
96
|
/**
|
|
@@ -227,6 +228,8 @@ const TEXT_WORDS =
|
|
|
227
228
|
|
|
228
229
|
/** Plain words that are never corrected, though one letter off a VOCAB word. */
|
|
229
230
|
const KEEP = new Set([
|
|
231
|
+
// A range (a calendar's range band, a date range) is no color.
|
|
232
|
+
'range',
|
|
230
233
|
// A reader (a book reader, a feed reader) is no header.
|
|
231
234
|
'reader',
|
|
232
235
|
'readers',
|
|
@@ -324,7 +327,11 @@ function corrected(w, vocab) {
|
|
|
324
327
|
const limit = w.length >= 8 ? 2 : 1;
|
|
325
328
|
let best = w;
|
|
326
329
|
let bestD = limit + 1;
|
|
330
|
+
// (A near miss keeps its first letter, as typing slips do: "buton",
|
|
331
|
+
// "bordr". A word that differs at its start is another word, "stable"
|
|
332
|
+
// no "table".)
|
|
327
333
|
for (const v of vocab) {
|
|
334
|
+
if (v[0] !== w[0]) continue;
|
|
328
335
|
const d = levenshteinDistance(w, v, 2, {swaps: true});
|
|
329
336
|
if (d < bestD) [best, bestD] = [v, d];
|
|
330
337
|
}
|
|
@@ -427,6 +434,15 @@ const HUES = wordTable(
|
|
|
427
434
|
gold: '#ca8a04',
|
|
428
435
|
bronze: '#a16207',
|
|
429
436
|
mauve: '#b784a7',
|
|
437
|
+
tan: '#d2b48c',
|
|
438
|
+
paper: '#f7f3e9',
|
|
439
|
+
// (Names said in two words, joined by the reader into one: "off-white",
|
|
440
|
+
// "ink blue", "grass green", "safety orange", "blue-gray".)
|
|
441
|
+
offwhite: '#faf8f3',
|
|
442
|
+
inkblue: '#1e3a5f',
|
|
443
|
+
grassgreen: '#4caf50',
|
|
444
|
+
safetyorange: '#ff6700',
|
|
445
|
+
bluegray: '#64748b',
|
|
430
446
|
}),
|
|
431
447
|
);
|
|
432
448
|
/**
|
|
@@ -434,6 +450,13 @@ const HUES = wordTable(
|
|
|
434
450
|
* said whole, never a word a typo is corrected to ("state" is no slate).
|
|
435
451
|
*/
|
|
436
452
|
const PALETTE_NAMES = new Set([
|
|
453
|
+
'tan',
|
|
454
|
+
'paper',
|
|
455
|
+
'offwhite',
|
|
456
|
+
'inkblue',
|
|
457
|
+
'grassgreen',
|
|
458
|
+
'safetyorange',
|
|
459
|
+
'bluegray',
|
|
437
460
|
'terracotta',
|
|
438
461
|
'sage',
|
|
439
462
|
'rust',
|
|
@@ -700,6 +723,72 @@ function colorsFound(c) {
|
|
|
700
723
|
return found.sort((a, b) => a[0] - b[0]);
|
|
701
724
|
}
|
|
702
725
|
|
|
726
|
+
/**
|
|
727
|
+
* The words that name a part by its own last word: a calendar day is
|
|
728
|
+
* also its date, a list item its option.
|
|
729
|
+
* @param {string} k
|
|
730
|
+
*/
|
|
731
|
+
function ownWords(k) {
|
|
732
|
+
const last = String(k.split('-').at(-1));
|
|
733
|
+
return (
|
|
734
|
+
/** @type {Record<string, string>} */ ({
|
|
735
|
+
day: 'day|date',
|
|
736
|
+
item: 'item|option|entry',
|
|
737
|
+
row: 'row|line',
|
|
738
|
+
})[last] ?? last
|
|
739
|
+
);
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* A typed value no page could show, for the properties whose range is
|
|
744
|
+
* plain: a line height that draws lines over each other (under 0.8) or
|
|
745
|
+
* far apart (over 4), a padding, margin or gap wider than any screen
|
|
746
|
+
* (over 512px), a font size under 6px or over 256px, a border over 64px.
|
|
747
|
+
* The reason, or null for a value in range (and for any other property).
|
|
748
|
+
* @param {{thing: string, value?: unknown}} st
|
|
749
|
+
* @returns {string | null}
|
|
750
|
+
*/
|
|
751
|
+
function outOfBounds(st) {
|
|
752
|
+
const v = String(st.value ?? '').trim();
|
|
753
|
+
const m = /^(-?\d*\.?\d+)(px|rem|em|%)?$/.exec(v);
|
|
754
|
+
if (!m) return null;
|
|
755
|
+
const n = Number(m[1]);
|
|
756
|
+
const unit = m[2] ?? '';
|
|
757
|
+
const px =
|
|
758
|
+
unit === 'rem' || unit === 'em' ? n * 16 : unit === 'px' ? n : null;
|
|
759
|
+
const thing = st.thing;
|
|
760
|
+
if (/^line-height$|^--text-[a-z0-9-]+-leading$/.test(thing)) {
|
|
761
|
+
const ratio = unit === '' ? n : unit === '%' ? n / 100 : null;
|
|
762
|
+
if (ratio != null && (ratio < 0.5 || ratio > 4))
|
|
763
|
+
return `a line height of ${v} ${ratio < 0.5 ? 'draws each line over the one before it' : 'leaves lines far apart'}; a line height reads between 0.5 and 4`;
|
|
764
|
+
return null;
|
|
765
|
+
}
|
|
766
|
+
if (
|
|
767
|
+
/^(?:padding|margin|gap|row-gap|column-gap)(?:-[a-z-]+)?$|^--spacing-/.test(
|
|
768
|
+
thing,
|
|
769
|
+
)
|
|
770
|
+
) {
|
|
771
|
+
const each = v.split(/\s+/);
|
|
772
|
+
if (px != null && Math.abs(px) > 512)
|
|
773
|
+
return `${thing} ${v} is wider than any screen; a ${thing.replace(/^--/, '')} reads up to 512px`;
|
|
774
|
+
void each;
|
|
775
|
+
return null;
|
|
776
|
+
}
|
|
777
|
+
if (
|
|
778
|
+
/^font-size$|^--text-[a-z0-9-]+-size$/.test(thing) &&
|
|
779
|
+
px != null &&
|
|
780
|
+
(px < 6 || px > 256)
|
|
781
|
+
)
|
|
782
|
+
return `a font size of ${v} ${px < 6 ? 'cannot be read' : 'is wider than the screen for a word'}; a font size reads between 6px and 256px`;
|
|
783
|
+
if (
|
|
784
|
+
/^border(?:-[a-z]+)?-width$|^--border-width$/.test(thing) &&
|
|
785
|
+
px != null &&
|
|
786
|
+
px > 64
|
|
787
|
+
)
|
|
788
|
+
return `a border of ${v} covers the part; a border reads up to 64px`;
|
|
789
|
+
return null;
|
|
790
|
+
}
|
|
791
|
+
|
|
703
792
|
/**
|
|
704
793
|
* A hex color written with the wrong number of digits ("#12345").
|
|
705
794
|
* @param {string} c
|
|
@@ -2362,7 +2451,11 @@ const STATE_WORDS = /** @type {Array<[RegExp, string]>} */ ([
|
|
|
2362
2451
|
[/\b(after i check|once checked|i check)\b/, 'checked'],
|
|
2363
2452
|
[/\b(picked|chosen|choose|pick)\b/, 'selected'],
|
|
2364
2453
|
[/\b(invalid|errors? state|has an error|with an error)\b/, 'invalid'],
|
|
2365
|
-
|
|
2454
|
+
// ("after visiting", "once you've been there": the visited look.)
|
|
2455
|
+
[
|
|
2456
|
+
/\b(visited|(?:after|once|when) (?:i'?ve |you'?ve |they'?ve )?(?:visiting|visited|been (?:there|clicked)))\b/,
|
|
2457
|
+
'visited',
|
|
2458
|
+
],
|
|
2366
2459
|
// ("The open select", "when open": a part shown open.)
|
|
2367
2460
|
[
|
|
2368
2461
|
/\bopened\b|\b(?:when|while|once|if) (?:it'?s |they'?re |it is |they are )?open\b|\bthe open\b/,
|
|
@@ -3029,6 +3122,16 @@ function clausesOf(q, partWords) {
|
|
|
3029
3122
|
break;
|
|
3030
3123
|
}
|
|
3031
3124
|
if (!m) continue;
|
|
3125
|
+
// ("a medical records table view", "the card page": a screen named
|
|
3126
|
+
// by what it shows, never that part.)
|
|
3127
|
+
if (
|
|
3128
|
+
/^\s+(?:views?|pages?|screens?|apps?|dashboards?|layouts?)\b/.test(
|
|
3129
|
+
rest.slice((m.index ?? 0) + m[0].length),
|
|
3130
|
+
)
|
|
3131
|
+
) {
|
|
3132
|
+
rest = rest.replace(re, ' ');
|
|
3133
|
+
continue;
|
|
3134
|
+
}
|
|
3032
3135
|
const p = {...part};
|
|
3033
3136
|
if (p.on === 'heading' && /^h[1-6]$/.test(m[0])) p.level = m[1];
|
|
3034
3137
|
// "the error banner": one status of the banner.
|
|
@@ -3920,6 +4023,59 @@ function oneModeLine(C, TARGET, part, width, color, mode, state) {
|
|
|
3920
4023
|
return {value: `inset 0 0 0 ${width} ${half}${own}`, when: flat};
|
|
3921
4024
|
}
|
|
3922
4025
|
|
|
4026
|
+
/** @type {WeakMap<object, (text: string) => boolean>} */
|
|
4027
|
+
const STRIPE_NAMES = new WeakMap();
|
|
4028
|
+
/**
|
|
4029
|
+
* Whether words name a table's stripes, read from the doc of the prop that
|
|
4030
|
+
* turns them on: the prop whose description names the `parity` a row's
|
|
4031
|
+
* stripe is, whose description leads with the stripes' plain names
|
|
4032
|
+
* ("Stripes alternate rows (every other row, zebra striping): …"). A name
|
|
4033
|
+
* matches by its words no other prop of that component uses, or, when all its
|
|
4034
|
+
* words are common ("every other row"), as the whole phrase.
|
|
4035
|
+
* @param {{components?: Record<string, any>}} project
|
|
4036
|
+
* @returns {(text: string) => boolean}
|
|
4037
|
+
*/
|
|
4038
|
+
function stripeNamesOf(project) {
|
|
4039
|
+
const known = STRIPE_NAMES.get(project);
|
|
4040
|
+
if (known) return known;
|
|
4041
|
+
/** @param {string} t */
|
|
4042
|
+
const wordsOf = t =>
|
|
4043
|
+
String(t)
|
|
4044
|
+
.toLowerCase()
|
|
4045
|
+
.match(/[a-z][a-z-]*/g) ?? [];
|
|
4046
|
+
/** @type {RegExp[]} */
|
|
4047
|
+
const names = [];
|
|
4048
|
+
for (const info of Object.values(project.components ?? {})) {
|
|
4049
|
+
const props = Object.values(info?.props ?? {});
|
|
4050
|
+
const flag = props.find(pr =>
|
|
4051
|
+
/`parity`/.test(String(pr?.description ?? '')),
|
|
4052
|
+
);
|
|
4053
|
+
if (!flag) continue;
|
|
4054
|
+
const others = new Set(
|
|
4055
|
+
props.filter(pr => pr !== flag).flatMap(pr => wordsOf(pr?.description)),
|
|
4056
|
+
);
|
|
4057
|
+
const lead = String(flag.description).split(':')[0];
|
|
4058
|
+
for (const phrase of lead
|
|
4059
|
+
.split(/[(),]/)
|
|
4060
|
+
.map(x => x.trim())
|
|
4061
|
+
.filter(Boolean)) {
|
|
4062
|
+
const words = wordsOf(phrase);
|
|
4063
|
+
const own = words.filter(w => !others.has(w));
|
|
4064
|
+
names.push(
|
|
4065
|
+
own.length
|
|
4066
|
+
? new RegExp(`\\b(?:${own.join('|')})\\b`)
|
|
4067
|
+
: new RegExp(
|
|
4068
|
+
`\\b${words.map(w => w.replace(/s$/, '')).join('s?\\s+')}s?\\b`,
|
|
4069
|
+
),
|
|
4070
|
+
);
|
|
4071
|
+
}
|
|
4072
|
+
}
|
|
4073
|
+
/** @param {string} text */
|
|
4074
|
+
const test = text => names.some(re => re.test(String(text).toLowerCase()));
|
|
4075
|
+
STRIPE_NAMES.set(project, test);
|
|
4076
|
+
return test;
|
|
4077
|
+
}
|
|
4078
|
+
|
|
3923
4079
|
/**
|
|
3924
4080
|
* Answer a plain-words question with drafts of commands.
|
|
3925
4081
|
* @param {import('./_settings.mjs').Ctx} ctx
|
|
@@ -3939,8 +4095,11 @@ export function draftAnswer(ctx, env, question) {
|
|
|
3939
4095
|
)?.value ?? '',
|
|
3940
4096
|
),
|
|
3941
4097
|
);
|
|
3942
|
-
// (The words as asked, for the readers that hold the whole question
|
|
3943
|
-
|
|
4098
|
+
// (The words as asked, for the readers that hold the whole question;
|
|
4099
|
+
// their case too, which carries tone: an emphatic "SO" in a lowercase
|
|
4100
|
+
// line.)
|
|
4101
|
+
const raw0 = String(question);
|
|
4102
|
+
const asked0 = raw0.toLowerCase();
|
|
3944
4103
|
// "darkmode", "dark-mode": one spelling of a mode before any clause is
|
|
3945
4104
|
// read, so every reader that names a mode sees it.
|
|
3946
4105
|
// One mode grammar: every way of naming a mode is read here as "dark
|
|
@@ -4151,7 +4310,7 @@ export function draftAnswer(ctx, env, question) {
|
|
|
4151
4310
|
// ("headings semibold, not bold": the rung said, and the one it is
|
|
4152
4311
|
// set against; never a second ask.)
|
|
4153
4312
|
.replace(
|
|
4154
|
-
/\b(thin|light|regular|normal|medium|semibold|semi-bold|bold|heavy|black|extra-?bold)\b([^,;.]*?)[,;]?\s*(?:but\s+)?not\s+(?:too\s+)?(?:thin|light|regular|normal|medium|semibold|semi-bold|bold|heavy|black|extra-?bold)\b/gi,
|
|
4313
|
+
/\b(thin|light|regular|normal|medium|semibold|semi-bold|bold|heavy|black|extra-?bold)\b([^,;.]*?)[,;]?\s*(?:(?:but\s+)?not|instead\s+of|rather\s+than)\s+(?:too\s+)?(?:thin|light|regular|normal|medium|semibold|semi-bold|bold|heavy|black|extra-?bold)\b/gi,
|
|
4155
4314
|
'$1$2',
|
|
4156
4315
|
)
|
|
4157
4316
|
// ("lots of data on screen", "information-dense": the theme denser.)
|
|
@@ -4201,6 +4360,140 @@ export function draftAnswer(ctx, env, question) {
|
|
|
4201
4360
|
', dark by default',
|
|
4202
4361
|
)
|
|
4203
4362
|
.replace(/\b(?:easy|easier|comfortable)\s+to\s+read\b/gi, 'larger text')
|
|
4363
|
+
// ("off-white", "ink blue", "grass green", "safety orange", "slate
|
|
4364
|
+
// blue-gray": a color named in two words is one name in the table.)
|
|
4365
|
+
.replace(/\boff[- ]white\b/gi, 'offwhite')
|
|
4366
|
+
.replace(/\bink[- ]blue\b/gi, 'inkblue')
|
|
4367
|
+
.replace(/\bgrass[- ]green\b/gi, 'grassgreen')
|
|
4368
|
+
.replace(/\bsafety[- ]orange\b/gi, 'safetyorange')
|
|
4369
|
+
.replace(/\b(?:slate\s+)?blue[- ]gr[ae]y\b/gi, 'bluegray')
|
|
4370
|
+
// ("pure white", "true black": that exact color, never a shade.)
|
|
4371
|
+
.replace(
|
|
4372
|
+
/(?<!\bnot\s)\b(?:pure|true|plain|solid)\s+(white|black)\b/gi,
|
|
4373
|
+
(_m, w) => (String(w).toLowerCase() === 'white' ? '#ffffff' : '#000000'),
|
|
4374
|
+
)
|
|
4375
|
+
// ("amber for warnings", "red only for alerts": the role color.)
|
|
4376
|
+
.replace(
|
|
4377
|
+
/\b((?:[a-z]+\s+)?[a-z]+|#[0-9a-f]{3,8})\s+(?:only\s+|just\s+)?(?:for|reserved for|on)\s+(?:the\s+|all\s+)?(warnings?|success(?:es)?|info(?:rmation)?|notices?)\b/gi,
|
|
4378
|
+
(m, color, role, at, whole) => {
|
|
4379
|
+
// (Only a color said alone for the role, "amber for warnings":
|
|
4380
|
+
// "red text on the info banner" is the banner's text, in its info
|
|
4381
|
+
// look, never the info color.)
|
|
4382
|
+
const words = String(color).toLowerCase().split(/\s+/);
|
|
4383
|
+
const colorAlone = words.every(
|
|
4384
|
+
w =>
|
|
4385
|
+
colorsIn(w).length ||
|
|
4386
|
+
/^(?:light|dark|pale|deep|soft|bright|warm|cool|muted|vivid|rich|pastel)$/.test(
|
|
4387
|
+
w,
|
|
4388
|
+
),
|
|
4389
|
+
);
|
|
4390
|
+
const next = String(whole)
|
|
4391
|
+
.slice(Number(at) + m.length)
|
|
4392
|
+
.toLowerCase();
|
|
4393
|
+
const partFollows = partLexicon(ctx).parts.some(([re]) =>
|
|
4394
|
+
re.test(
|
|
4395
|
+
` ${next
|
|
4396
|
+
.split(/[,;.:]/)[0]
|
|
4397
|
+
.trim()
|
|
4398
|
+
.split(/\s+/)
|
|
4399
|
+
.slice(0, 3)
|
|
4400
|
+
.join(' ')} `,
|
|
4401
|
+
),
|
|
4402
|
+
);
|
|
4403
|
+
if (
|
|
4404
|
+
!colorAlone ||
|
|
4405
|
+
partFollows ||
|
|
4406
|
+
!colorsIn(String(color).toLowerCase()).length
|
|
4407
|
+
)
|
|
4408
|
+
return m;
|
|
4409
|
+
return `${/^warn/i.test(role) ? 'warning' : /^succ/i.test(role) ? 'success' : 'info'} color ${color}`;
|
|
4410
|
+
},
|
|
4411
|
+
)
|
|
4412
|
+
// ("make it brighter and more cheerful": a livelier, more colorful
|
|
4413
|
+
// theme.)
|
|
4414
|
+
.replace(
|
|
4415
|
+
/\bmore\s+(?:cheerful|lively|vibrant|joyful|fun)\b|\b(?:cheerful|lively|joyful)\b/gi,
|
|
4416
|
+
'more colorful',
|
|
4417
|
+
)
|
|
4418
|
+
// ("tailwind shadow-sm"): the shadow sizes by their class names.
|
|
4419
|
+
.replace(/\bshadow-(?:xs|sm)\b/gi, 'small shadow')
|
|
4420
|
+
.replace(/\bshadow-(?:lg|xl|2xl)\b/gi, 'large shadow')
|
|
4421
|
+
.replace(/\bshadow-md\b/gi, 'medium shadow')
|
|
4422
|
+
// ("divided by 1px lines", "separated by thin lines": lines between,
|
|
4423
|
+
// never an amount.)
|
|
4424
|
+
.replace(/\b(?:divided|separated)\s+by\s+/gi, 'with ')
|
|
4425
|
+
// ("be a #e8def8 pill": a fill of that color, pill-shaped.)
|
|
4426
|
+
.replace(
|
|
4427
|
+
/\b(?:(?:should|must|to)\s+)?(?:be\s+)?an?\s+(#[0-9a-f]{3,8}|[a-z]+)\s+(pill|capsule)\b/gi,
|
|
4428
|
+
(m, color) =>
|
|
4429
|
+
colorsIn(String(color).toLowerCase()).length
|
|
4430
|
+
? `with a ${color} background and pill corners`
|
|
4431
|
+
: m,
|
|
4432
|
+
)
|
|
4433
|
+
// ("big touch targets": the controls a finger presses.)
|
|
4434
|
+
.replace(
|
|
4435
|
+
/\b(?:big|bigger|large|larger)\s+touch\s+targets?\b/gi,
|
|
4436
|
+
'more spacing on buttons and inputs',
|
|
4437
|
+
)
|
|
4438
|
+
.replace(/\btouch\s+targets?\b/gi, 'buttons and inputs')
|
|
4439
|
+
.replace(
|
|
4440
|
+
/\brows?\s+(?:in|of)\s+(?:the\s+|a\s+)?(menus?|dropdowns?|lists?|selects?)\b/gi,
|
|
4441
|
+
'$1 items',
|
|
4442
|
+
)
|
|
4443
|
+
// ("an off-white paper background": the page, in that color; "a paper
|
|
4444
|
+
// background": the page, paper-colored.)
|
|
4445
|
+
.replace(
|
|
4446
|
+
/\b(#[0-9a-f]{3,8}|[a-z]+)\s+paper\s+(?=background|page)/gi,
|
|
4447
|
+
(m, color) =>
|
|
4448
|
+
colorsIn(String(color).toLowerCase()).length ? `${color} page ` : m,
|
|
4449
|
+
)
|
|
4450
|
+
.replace(/\bpaper\s+(?=background\b)/gi, 'paper page ')
|
|
4451
|
+
// ("32px menu items", "40px rows": a length before an item noun is its
|
|
4452
|
+
// height.)
|
|
4453
|
+
.replace(
|
|
4454
|
+
/\b(\d+(?:\.\d+)?px)\s+((?:menu |list |table )?(?:items?|rows?))\b(?!\s+(?:tall|high|height|padding|gap|spacing))/gi,
|
|
4455
|
+
'$2 $1 tall',
|
|
4456
|
+
)
|
|
4457
|
+
// ("dividers between list items", "table rows with 1px lines": a line
|
|
4458
|
+
// between items is each one's bottom border.)
|
|
4459
|
+
.replace(
|
|
4460
|
+
/\b(?:dividers?|lines?|rules?|separators?)\s+between\s+(?:the\s+)?((?:[a-z]+\s+)?(?:items?|rows?))\b/gi,
|
|
4461
|
+
'1px bottom border on $1',
|
|
4462
|
+
)
|
|
4463
|
+
.replace(
|
|
4464
|
+
/\b((?:[a-z]+\s+)?(?:items?|rows?))\s+with\s+(?:an?\s+)?(\d+px\s+)?(?:thin\s+)?(?:lines?|dividers?|rules?|separators?)\b/gi,
|
|
4465
|
+
(_m, what, w) =>
|
|
4466
|
+
`${w ? String(w).trim() : '1px'} bottom border on ${what}`,
|
|
4467
|
+
)
|
|
4468
|
+
// ("32px rows in the menu", "dividers between list rows": a menu's or a
|
|
4469
|
+
// list's rows are its items.)
|
|
4470
|
+
.replace(
|
|
4471
|
+
/\brows?\s+(?:in|of)\s+(?:the\s+|a\s+)?(menus?|dropdowns?|lists?|selects?)\b/gi,
|
|
4472
|
+
'$1 items',
|
|
4473
|
+
)
|
|
4474
|
+
.replace(/\b(menu|dropdown|list)\s+rows?\b/gi, '$1 items')
|
|
4475
|
+
// ("make it calmer", "a calm dark mode": with no part named, the theme
|
|
4476
|
+
// less vivid.)
|
|
4477
|
+
// ("make it calmer", "calmer colors", "a calm dark mode": the theme's
|
|
4478
|
+
// colors less vivid. Vibrancy has no mode of its own, so a mode said
|
|
4479
|
+
// with it is the theme's.)
|
|
4480
|
+
.replace(
|
|
4481
|
+
/\bmake\s+(?:it|everything|the\s+(?:theme|colou?rs|palette|app))\s+(?:a\s+(?:bit|little)\s+|slightly\s+|much\s+)?(?:calm|calmer|quieter)\b|\b(?:calm|calmer|quieter)\s+(?:(?:dark|light)\s+mode|colou?rs|palette)\b/gi,
|
|
4482
|
+
'less saturated',
|
|
4483
|
+
)
|
|
4484
|
+
// ("bold safety orange #ea580c accent": a word about the color itself,
|
|
4485
|
+
// said before the color an accent is.)
|
|
4486
|
+
.replace(
|
|
4487
|
+
/\b(?:bold|bright|vivid|strong|punchy)\s+(?=(?:[a-z]+\s+)?(?:[a-z]+|#[0-9a-f]{3,8})\s+(?:#[0-9a-f]{3,8}\s+)?accent\b)/gi,
|
|
4488
|
+
'',
|
|
4489
|
+
)
|
|
4490
|
+
// ("a 2px dark border": the theme's stronger line color, its emphasized
|
|
4491
|
+
// border, at that width; "darker" is a way, read by the way readers.)
|
|
4492
|
+
.replace(
|
|
4493
|
+
/\b(?:(\d+(?:\.\d+)?px)\s+)?(?:dark|strong)\s+(borders?|outlines?)\b/gi,
|
|
4494
|
+
(_m, w, what) =>
|
|
4495
|
+
`${String(what).replace(/s$/, '')} ${w ?? '1px'} solid var(--color-border-emphasized)`,
|
|
4496
|
+
)
|
|
4204
4497
|
// ("use the system font": the font named, never a part called so.)
|
|
4205
4498
|
.replace(
|
|
4206
4499
|
/\b(?:use|using|with|switch to|go with)\s+(?:the|a)\s+(system|serif|sans-serif|sans|monospace|mono|rounded|display)\s+(font|typeface|type)\b/gi,
|
|
@@ -4909,6 +5202,14 @@ export function draftAnswer(ctx, env, question) {
|
|
|
4909
5202
|
/\b(overlay|backdrop|scrim)\s+(?:behind|under|beneath|below|for|of|around)\s+(?:the\s+|a\s+)?(?:dialogs?|modals?|drawers?|sheets?)\b/gi,
|
|
4910
5203
|
'$1',
|
|
4911
5204
|
)
|
|
5205
|
+
// ("dialogs with a dark overlay behind them": the same overlay, said
|
|
5206
|
+
// after the dialog.)
|
|
5207
|
+
.replace(
|
|
5208
|
+
/\b(?:dialogs?|modals?|drawers?|sheets?)\s+with\s+(?:an?\s+)?((?:[a-z]+\s+)?)(overlay|backdrop|scrim)\s+(?:behind|under|beneath|below|around)\s+(?:them|it)\b/gi,
|
|
5209
|
+
// (Its look said as an adjective, "dark", is the way: darker.)
|
|
5210
|
+
(_m, adj, noun) =>
|
|
5211
|
+
`${String(adj).replace(/^(dark|light)\s+$/i, '$1er ')}${noun}`,
|
|
5212
|
+
)
|
|
4912
5213
|
// "the shadow sharper": less blur on the shadow, never sharper corners.
|
|
4913
5214
|
.replace(
|
|
4914
5215
|
/\b((?:drop |box )?shadows?)\s+((?:a (?:bit|little|touch) |slightly |much )?)sharper\b/gi,
|
|
@@ -5065,8 +5366,13 @@ export function draftAnswer(ctx, env, question) {
|
|
|
5065
5366
|
// request, or a thing with a value or a direction; a condition, an
|
|
5066
5367
|
// indirect question, a double negative or a statement of fact gets the
|
|
5067
5368
|
// lookup instead. A wrong write is worse than no command.
|
|
5369
|
+
// (A past conditional said inverted, "had we gone with …", is a
|
|
5370
|
+
// hypothetical; a clause timed to an event, "after the review",
|
|
5371
|
+
// "until legal approves", is a later ask, held: never a state word,
|
|
5372
|
+
// "after hovering"; "after that, make headings bold" is the next step of
|
|
5373
|
+
// the ask, as "then" is.)
|
|
5068
5374
|
const CONDITION =
|
|
5069
|
-
/^\s*(?:if|unless|in case|provided|providing|only if|assuming|suppose|supposing|as long as|whenever|as soon as|once|given|in the event|should (?:the|it|they)|were (?:the|it|they)|otherwise|on condition)\b|\b(?:except if|on condition that|in the event)\b/i;
|
|
5375
|
+
/^\s*(?:if|unless|in case|provided|providing|only if|assuming|suppose|supposing|as long as|whenever|as soon as|once|given|in the event|should (?:the|it|they)|were (?:the|it|they|we|i|you)|had (?:the|it|they|we|i|you)|otherwise|on condition)\b|\b(?:except if|on condition that|in the event|(?:would|could|should) have (?:been|gone|used|had|looked|made|picked|chosen|kept))\b|^\s*(?:after|until|till|before)\s+(?!(?:hover|hovering|focus|focusing|click|clicking|press|pressing|visiting|being)\b)(?!(?:this|that)\b\s*(?:,|$|(?:make|set|change|use|give|turn|add|remove|put)\b))(?:the|a|an|my|our|their|your|this|that|[a-z]+\s+(?:approves?|reviews?|signs?\s+off|ships?|launch(?:es)?|is\s+done|finish(?:es)?))\b/i;
|
|
5070
5376
|
const NOT_ASK =
|
|
5071
5377
|
/\b(i wonder|wondering|curious|would like to know|let me see|help me understand|any idea|just checking|just asking|check if|check whether|can you check|look at|double check|idk|quick q|do you think)\b|\b(don'?t not|not without|not un-?(?:bold|round|rounded|flat|square|styled)\w*|never no|no lighter|no darker|not at all|isn'?t it time|weren'?t)\b|^\s*(?!(?:can|could|would|will) (?:you|i|we)\b|can (?:the|my|our|all) [\w -]+ be\b|is it possible\b|is there a way\b)(?:do|does|did|will|would|can(?!'t|not)|could|should|is|are)\b(?!n'?t)|^\s*checking\b|\bno less (?!than)|^\s*(would|could|should|does|do|is|are|will)\b[^.]*\b(work|look|be (?:a )?(?:good|better|too much|ok|okay)|good|better|accessible|clash|too much)\b[^.]*\??$|\bor\b[^.]*\?\s*$|^\s*how (?:would|round|big|dark|light|thick)\b|\b(right now|rn)\b(?!.*\b(make|set|change)\b)/i;
|
|
5072
5378
|
const ASK_START =
|
|
@@ -5298,11 +5604,70 @@ export function draftAnswer(ctx, env, question) {
|
|
|
5298
5604
|
/\b(imagine|picture|pretend|hypothetically|in theory|toying with)\b/i;
|
|
5299
5605
|
// A tag question ("corners are 10px, eh", "cards have a shadow, right?")
|
|
5300
5606
|
// asks back about the whole line.
|
|
5607
|
+
// (Any auxiliary with its pronoun, "isn't that so", "doesn't it",
|
|
5608
|
+
// "aren't they right".)
|
|
5301
5609
|
const TAG =
|
|
5302
|
-
/^(?:eh|right|correct|yeah|huh|no|isn'?t
|
|
5610
|
+
/^(?:eh|right|correct|yeah|huh|no|ok|okay|(?:or )?am i (?:wrong|right|mistaken)|(?:is|are|was|were|does|do|did|has|have|isn'?t|aren'?t|wasn'?t|weren'?t|doesn'?t|don'?t|didn'?t|hasn'?t|haven'?t|won'?t|wouldn'?t)\s+(?:it|that|they|this|there|we|those|these)(?:\s+(?:so|right|true))?)\s*[?!.]*$/i;
|
|
5611
|
+
// Tone the case carries: an all-caps intensifier before a judgment
|
|
5612
|
+
// ("SO professional", "TOTALLY readable") in a line otherwise written
|
|
5613
|
+
// in lowercase; and a reply that agrees with a reason ("yes because …").
|
|
5614
|
+
// (Never an emphasis inside an ask, "make it SO much rounder": only a
|
|
5615
|
+
// line with no ask verb, and a judgment, not an amount.)
|
|
5616
|
+
const shouted =
|
|
5617
|
+
/\b(?:SO|SOOO+|TOTALLY|REALLY|VERY|SUPER|SUCH)\s+(?!(?:much|many|more|less|far|way)\b)(?![a-z]+er\b)[a-z]{3,}/.test(
|
|
5618
|
+
raw0,
|
|
5619
|
+
) &&
|
|
5620
|
+
!segments.some(
|
|
5621
|
+
x =>
|
|
5622
|
+
ASK_START.test(x.toLowerCase()) ||
|
|
5623
|
+
VERB.test(x.toLowerCase().replace(POLITE, '')),
|
|
5624
|
+
) &&
|
|
5625
|
+
!/\b(?:please|pls)\b/i.test(raw0) &&
|
|
5626
|
+
(raw0.match(/[A-Z]/g) ?? []).length <= 12 &&
|
|
5627
|
+
raw0.replace(/\b[A-Z]{2,}\b/g, '').toLowerCase() ===
|
|
5628
|
+
raw0.replace(/\b[A-Z]{2,}\b/g, '').replace(/^./, ch => ch.toLowerCase());
|
|
5629
|
+
const SARCASTIC_REPLY = /^\s*(?:yes|yeah|yep|sure|oh yes)\b[\s,]+because\b/i;
|
|
5630
|
+
// A question about how the theme is now ("is the shadow still there?"),
|
|
5631
|
+
// with the rest only naming looks, no verb, no request ("cards no
|
|
5632
|
+
// border."): the rest says what the person sees; nothing is asked.
|
|
5633
|
+
const stateQuestion =
|
|
5634
|
+
segments.length > 1 &&
|
|
5635
|
+
segments.some(
|
|
5636
|
+
x =>
|
|
5637
|
+
/\?\s*$/.test(x) &&
|
|
5638
|
+
/^\s*(?:is|are|was|were|does|do|did|has|have)\s+(?!(?:that|it|this|these|those)\b)(?:the|my|our|any|a|an)\b/i.test(
|
|
5639
|
+
x,
|
|
5640
|
+
),
|
|
5641
|
+
) &&
|
|
5642
|
+
segments
|
|
5643
|
+
.filter(x => !/\?\s*$/.test(x))
|
|
5644
|
+
.every(
|
|
5645
|
+
x =>
|
|
5646
|
+
!ASK_START.test(x.toLowerCase()) &&
|
|
5647
|
+
!VERB.test(x.toLowerCase().replace(POLITE, '')) &&
|
|
5648
|
+
!/\b(?:please|pls|want|need|would like|make|set|give)\b/i.test(x),
|
|
5649
|
+
);
|
|
5650
|
+
// (A tag that also reads as an ask's own words, "just do it", "have it",
|
|
5651
|
+
// asks back only with a question mark or after a line that asks for
|
|
5652
|
+
// nothing.)
|
|
5653
|
+
const ASK_TAG =
|
|
5654
|
+
/^(?:just\s+)?(?:do|did|have|has)\s+(?:it|that|this)\s*[!.]*$/i;
|
|
5655
|
+
const asksElsewhere = (/** @type {string} */ x) =>
|
|
5656
|
+
segments.some(
|
|
5657
|
+
y =>
|
|
5658
|
+
y !== x &&
|
|
5659
|
+
(ASK_START.test(y.toLowerCase()) ||
|
|
5660
|
+
VERB.test(y.toLowerCase().replace(POLITE, ''))),
|
|
5661
|
+
);
|
|
5662
|
+
const tagged = segments.some(
|
|
5663
|
+
x => TAG.test(x.trim()) && !(ASK_TAG.test(x.trim()) && asksElsewhere(x)),
|
|
5664
|
+
);
|
|
5303
5665
|
const gateAll =
|
|
5304
|
-
|
|
5666
|
+
tagged ||
|
|
5305
5667
|
SARCASM.test(question) ||
|
|
5668
|
+
shouted ||
|
|
5669
|
+
SARCASTIC_REPLY.test(question) ||
|
|
5670
|
+
stateQuestion ||
|
|
5306
5671
|
HYPOTHETICAL.test(question) ||
|
|
5307
5672
|
(gated.length > 0 && gated.length === segments.length) ||
|
|
5308
5673
|
segments.some(x => CONDITION.test(x.replace(/^[^:]*:\s*/, '')));
|
|
@@ -5547,6 +5912,13 @@ export function draftAnswer(ctx, env, question) {
|
|
|
5547
5912
|
(_, /** @type {string} */ r) =>
|
|
5548
5913
|
`corners ${/** @type {Record<string, string>} */ ({xs: '4px', sm: '8px', md: '10px', lg: '12px', xl: '16px'})[r.toLowerCase()]}`,
|
|
5549
5914
|
)
|
|
5915
|
+
// ("shadow-sm", "shadow lg": the shadow rungs by their short names,
|
|
5916
|
+
// as the radius ones above.)
|
|
5917
|
+
.replace(
|
|
5918
|
+
/\b(?:drop[- ])?shadow[- ](xs|sm|md|lg|xl|2xl)\b/gi,
|
|
5919
|
+
(_, /** @type {string} */ r) =>
|
|
5920
|
+
`${/** @type {Record<string, string>} */ ({xs: 'small', sm: 'small', md: 'medium', lg: 'large', xl: 'large', '2xl': 'large'})[r.toLowerCase()]} shadow`,
|
|
5921
|
+
)
|
|
5550
5922
|
// "midnight blue": the CSS named color.
|
|
5551
5923
|
.replace(/\b([a-z]+) ([a-z]+)\b/gi, (m, a, b) =>
|
|
5552
5924
|
COLOR_NAMES.includes(`${a}${b}`.toLowerCase()) &&
|
|
@@ -5625,7 +5997,7 @@ export function draftAnswer(ctx, env, question) {
|
|
|
5625
5997
|
.replace(/\boff[- ]?white\b/gi, (m, _at, whole) =>
|
|
5626
5998
|
/#[0-9a-f]{3,8}\b|\b(?:rgba?|hsla?|oklch)\(/i.test(String(whole))
|
|
5627
5999
|
? ' '
|
|
5628
|
-
: '#
|
|
6000
|
+
: '#faf8f3',
|
|
5629
6001
|
)
|
|
5630
6002
|
.replace(/\boff[- ]?black\b/gi, '#111111')
|
|
5631
6003
|
// "match the header color to the sidebar": the first part is the one to
|
|
@@ -6258,7 +6630,15 @@ export function draftAnswer(ctx, env, question) {
|
|
|
6258
6630
|
});
|
|
6259
6631
|
// ("cards: …": the part's own list, after its colon; the part named
|
|
6260
6632
|
// before the colon, never "Notion look: serif headings".)
|
|
6261
|
-
|
|
6633
|
+
// (Its head as asked, too: a reader may have moved words of the
|
|
6634
|
+
// clause, "dialogs: no border" read as "no dialogs border".)
|
|
6635
|
+
const head =
|
|
6636
|
+
/^([^:]+):\s*\S/.exec(c.text)?.[1] ??
|
|
6637
|
+
[...asked0.matchAll(/(?:^|[.;!?\n]\s*)([a-z][a-z' -]{1,40}):\s*\S/g)]
|
|
6638
|
+
.map(m => m[1])
|
|
6639
|
+
.find(h =>
|
|
6640
|
+
h.split(/\s+/).every(w => new RegExp(`\\b${w}\\b`).test(c.text)),
|
|
6641
|
+
);
|
|
6262
6642
|
if (
|
|
6263
6643
|
head &&
|
|
6264
6644
|
c.parts.length &&
|
|
@@ -6355,11 +6735,28 @@ export function draftAnswer(ctx, env, question) {
|
|
|
6355
6735
|
// A look taken away from the part before ("rounded buttons, no
|
|
6356
6736
|
// shadow"; never "serif headings, no shadows": a text part's look is
|
|
6357
6737
|
// its type).
|
|
6738
|
+
// (Only a look the part draws: a focus ring draws no shadow, so
|
|
6739
|
+
// "visible focus ring, no shadows" is the theme's.)
|
|
6358
6740
|
if (
|
|
6359
6741
|
c.neg &&
|
|
6360
6742
|
own.length &&
|
|
6361
6743
|
!own.includes('text') &&
|
|
6362
|
-
!before.parts.every(p => textOnlyPart(p.on))
|
|
6744
|
+
!before.parts.every(p => textOnlyPart(p.on)) &&
|
|
6745
|
+
before.parts.every(p => {
|
|
6746
|
+
const props = Object.keys(C.MAP[first(p.on)]?.at ?? {});
|
|
6747
|
+
const PROP = /** @type {Record<string, RegExp>} */ ({
|
|
6748
|
+
shadow: /^box-shadow$/,
|
|
6749
|
+
border: /^border(?:-(?:width|style|color))?$/,
|
|
6750
|
+
corners: /radius$/,
|
|
6751
|
+
background: /^background/,
|
|
6752
|
+
});
|
|
6753
|
+
return own.every(
|
|
6754
|
+
a =>
|
|
6755
|
+
!PROP[a] ||
|
|
6756
|
+
props.some(x => PROP[a].test(x)) ||
|
|
6757
|
+
(C.partReads(first(p.on), a) ?? []).length > 0,
|
|
6758
|
+
);
|
|
6759
|
+
})
|
|
6363
6760
|
)
|
|
6364
6761
|
return 'inherit';
|
|
6365
6762
|
// A CSS property named with its value ("card padding-block 20px,
|
|
@@ -6624,6 +7021,40 @@ export function draftAnswer(ctx, env, question) {
|
|
|
6624
7021
|
});
|
|
6625
7022
|
c.lengths = [];
|
|
6626
7023
|
}
|
|
7024
|
+
// ("selected tab with a 2px #635bff underline": the tab before a clause
|
|
7025
|
+
// that names its underline is the tab indicator.)
|
|
7026
|
+
for (const [ci, c] of clauses.entries()) {
|
|
7027
|
+
const prev = clauses[ci - 1];
|
|
7028
|
+
if (
|
|
7029
|
+
!c.parts.length &&
|
|
7030
|
+
/\bunderline/.test(c.text) &&
|
|
7031
|
+
prev?.parts.some(p => p.on === 'tab') &&
|
|
7032
|
+
!prev.aspects.length
|
|
7033
|
+
) {
|
|
7034
|
+
c.parts = [{on: 'tab-indicator'}];
|
|
7035
|
+
prev.parts = prev.parts.filter(p => p.on !== 'tab');
|
|
7036
|
+
if (!prev.parts.length) prev.text = '';
|
|
7037
|
+
}
|
|
7038
|
+
for (const p of c.parts)
|
|
7039
|
+
if (p.on === 'tab' && /\bunderline/.test(c.text)) p.on = 'tab-indicator';
|
|
7040
|
+
}
|
|
7041
|
+
// ("list items more spacing between them": the room between items is
|
|
7042
|
+
// the gap of the part that holds them, never each item's padding.)
|
|
7043
|
+
for (const c of clauses)
|
|
7044
|
+
if (
|
|
7045
|
+
c.aspects.includes('spacing') &&
|
|
7046
|
+
/\bbetween\b/.test(c.text) &&
|
|
7047
|
+
c.parts.length
|
|
7048
|
+
)
|
|
7049
|
+
c.parts = c.parts.map(p => {
|
|
7050
|
+
const item = String(p.on);
|
|
7051
|
+
const holder = item.replace(/-(?:items?|rows?|cells?|options?)$/, '');
|
|
7052
|
+
return holder !== item &&
|
|
7053
|
+
TARGET.has(holder) &&
|
|
7054
|
+
(C.MAP[holder]?.contains ?? []).includes(item)
|
|
7055
|
+
? {...p, on: holder, between: item}
|
|
7056
|
+
: p;
|
|
7057
|
+
});
|
|
6627
7058
|
// ("badges uppercase bold": two looks of a part's text said together are
|
|
6628
7059
|
// each an ask of their own, run in turn.)
|
|
6629
7060
|
const TEXT_LOOKS = ['case', 'weight', 'italic', 'tracking', 'fontsize'];
|
|
@@ -6664,6 +7095,18 @@ export function draftAnswer(ctx, env, question) {
|
|
|
6664
7095
|
})),
|
|
6665
7096
|
);
|
|
6666
7097
|
}
|
|
7098
|
+
// ("a #e8def8 pill", "a blue rounded box": a color said with a shape is
|
|
7099
|
+
// the shape's fill, beside its corners.)
|
|
7100
|
+
for (const c of clauses)
|
|
7101
|
+
if (
|
|
7102
|
+
c.parts.length &&
|
|
7103
|
+
c.colors.length &&
|
|
7104
|
+
!c.except &&
|
|
7105
|
+
!c.neg &&
|
|
7106
|
+
c.aspects.length &&
|
|
7107
|
+
c.aspects.every(a => a === 'corners')
|
|
7108
|
+
)
|
|
7109
|
+
c.aspects = [...c.aspects, 'background'];
|
|
6667
7110
|
// ("make it calmer", "the error toast calmer": its color, the fill it
|
|
6668
7111
|
// shows.)
|
|
6669
7112
|
for (const c of clauses)
|
|
@@ -6674,16 +7117,67 @@ export function draftAnswer(ctx, env, question) {
|
|
|
6674
7117
|
// too, never dropped.
|
|
6675
7118
|
for (let i = 1; i < clauses.length; i++) {
|
|
6676
7119
|
const [a, b] = [clauses[i - 1], clauses[i]];
|
|
7120
|
+
// (One color said once or as a word and its value, "gray #6b7280".)
|
|
7121
|
+
const oneColor =
|
|
7122
|
+
b.colors.length === 1 ||
|
|
7123
|
+
(b.colors.length === 2 &&
|
|
7124
|
+
/^\s*(?:and\s+)?[a-z-]+\s+#[0-9a-f]{3,8}\s*$/i.test(b.text) &&
|
|
7125
|
+
colorsIn(b.text.trim().split(/\s+/).slice(-2)[0]).length > 0);
|
|
7126
|
+
/** The color said, its typed value when a word comes with it. */
|
|
7127
|
+
const typedOnly = () => {
|
|
7128
|
+
const typed = /#[0-9a-f]{3,8}\b/i.exec(b.text)?.[0];
|
|
7129
|
+
if (b.colors.length === 2 && typed) b.colors = [typed.toLowerCase()];
|
|
7130
|
+
};
|
|
7131
|
+
// ("inputs: 1px border #79747e, 2px #6750a4 when focused": a length and
|
|
7132
|
+
// a color, or a color, with no look of its own, after the part's line
|
|
7133
|
+
// in the same list, is that line, in its own state.)
|
|
7134
|
+
if (
|
|
7135
|
+
(!b.parts.length ||
|
|
7136
|
+
b.parts.every(x => a.parts.some(y => y.on === x.on))) &&
|
|
7137
|
+
!b.aspects.length &&
|
|
7138
|
+
b.colors.length >= 1 &&
|
|
7139
|
+
// (A line is a width and a color: a bare color, "pink #DB2777",
|
|
7140
|
+
// is read by the readers after.)
|
|
7141
|
+
b.lengths.length > 0 &&
|
|
7142
|
+
oneColor &&
|
|
7143
|
+
a.parts.length &&
|
|
7144
|
+
a.aspects.length === 1 &&
|
|
7145
|
+
a.aspects[0] === 'border' &&
|
|
7146
|
+
!/[;\n.]/.test(b.joint ?? '') &&
|
|
7147
|
+
b.text
|
|
7148
|
+
.trim()
|
|
7149
|
+
.split(/\s+/)
|
|
7150
|
+
.every(
|
|
7151
|
+
w =>
|
|
7152
|
+
colorsIn(w).length > 0 ||
|
|
7153
|
+
/^-?\d*\.?\d+(?:px|rem|em)$/.test(w) ||
|
|
7154
|
+
/^(?:and|when|while|on|if|in|is|are|it'?s|the|focus(?:ed)?|hover(?:ed)?|press(?:ed)?|active|selected|checked|disabled|open)$/i.test(
|
|
7155
|
+
w,
|
|
7156
|
+
),
|
|
7157
|
+
)
|
|
7158
|
+
) {
|
|
7159
|
+
typedOnly();
|
|
7160
|
+
b.parts = a.parts.map(x => ({...x}));
|
|
7161
|
+
b.aspects = ['border'];
|
|
7162
|
+
continue;
|
|
7163
|
+
}
|
|
6677
7164
|
if (
|
|
6678
7165
|
!b.parts.length &&
|
|
6679
7166
|
!b.aspects.length &&
|
|
6680
|
-
|
|
6681
|
-
|
|
7167
|
+
oneColor &&
|
|
7168
|
+
(b.colors.length === 1 ||
|
|
7169
|
+
/^\s*(?:and\s+)?[a-z-]+\s+#[0-9a-f]{3,8}\s*$/i.test(b.text)) &&
|
|
7170
|
+
/^\s*(?:and\s+)?(?:make\s+(?:it|them)\s+)?(?:[a-z-]+\s+)?[a-z#0-9-]+\s*$/i.test(
|
|
6682
7171
|
b.text,
|
|
6683
7172
|
) &&
|
|
6684
7173
|
a.parts.length &&
|
|
6685
|
-
/\b(?:text|labels?|copy|writing)\b/.test(a.text)
|
|
7174
|
+
/\b(?:text|labels?|copy|writing)\b/.test(a.text) &&
|
|
7175
|
+
// (A word with its value only after a look of the text itself, never
|
|
7176
|
+
// a part named with "text", "text inputs".)
|
|
7177
|
+
(b.colors.length === 1 ||
|
|
7178
|
+
a.aspects.some(x => x === 'text' || TEXT_LOOKS.includes(x)))
|
|
6686
7179
|
) {
|
|
7180
|
+
typedOnly();
|
|
6687
7181
|
b.parts = a.parts.map(x => ({...x}));
|
|
6688
7182
|
b.aspects = ['text'];
|
|
6689
7183
|
b.text = `${a.text.replace(/\b(?:bigger|smaller|larger|bolder|fainter|subtler|lighter|darker|\d+(?:\.\d+)?\s?%\s+\w+)\b/g, '').trim()} ${b.text.trim()}`;
|
|
@@ -7440,6 +7934,17 @@ export function draftAnswer(ctx, env, question) {
|
|
|
7440
7934
|
// ("The icon after the button text": beside a part's text is in it.)
|
|
7441
7935
|
const preps =
|
|
7442
7936
|
/\b(inside|within|of|after|before|next to|in(?! (?:dark|light)\b))\s+(?:the\s+|a\s+|an\s+|my\s+)?/g;
|
|
7937
|
+
// ("date picker: today's date circled": a label is the place the
|
|
7938
|
+
// words after it are in.)
|
|
7939
|
+
const label = /^\s*([a-z][a-z' -]{1,40}?)\s*:\s*(\S.*)$/i.exec(text);
|
|
7940
|
+
// (Never a screen named by what it shows, "a records table view:".)
|
|
7941
|
+
if (
|
|
7942
|
+
label &&
|
|
7943
|
+
!/\b(?:views?|pages?|screens?|apps?|dashboards?|layouts?)\s*$/i.test(
|
|
7944
|
+
label[1],
|
|
7945
|
+
)
|
|
7946
|
+
)
|
|
7947
|
+
places.push({holderText: label[1], elementText: label[2], by: 'in'});
|
|
7443
7948
|
for (const m of text.matchAll(preps)) {
|
|
7444
7949
|
const after = text.slice(/** @type {number} */ (m.index) + m[0].length);
|
|
7445
7950
|
// (The place runs to the next place said.)
|
|
@@ -7548,6 +8053,34 @@ export function draftAnswer(ctx, env, question) {
|
|
|
7548
8053
|
);
|
|
7549
8054
|
// (Names test the element's own words; states, the whole.)
|
|
7550
8055
|
const nameText = said;
|
|
8056
|
+
// Spacing asked between the parts a holder lays out ("more space
|
|
8057
|
+
// between the keys in the shortcut", "between the buttons in the
|
|
8058
|
+
// button group") is the holder's gap, when the census shows the
|
|
8059
|
+
// holder draws a gap and holds those parts side by side.
|
|
8060
|
+
if (
|
|
8061
|
+
c.aspects.includes('spacing') &&
|
|
8062
|
+
said &&
|
|
8063
|
+
((by === 'possessive' &&
|
|
8064
|
+
/\bbetween\s+(?:the\s+)?[a-z]/i.test(holderText)) ||
|
|
8065
|
+
new RegExp(
|
|
8066
|
+
`\\bbetween\\s+(?:the\\s+)?${said.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\s*$`,
|
|
8067
|
+
'i',
|
|
8068
|
+
).test(elementText))
|
|
8069
|
+
) {
|
|
8070
|
+
const rec = ctx.C.MAP[holder];
|
|
8071
|
+
const laidOut = (rec?.repeats ?? []).filter(
|
|
8072
|
+
k =>
|
|
8073
|
+
partIn(said) === k ||
|
|
8074
|
+
words(k).test(said) ||
|
|
8075
|
+
(k.startsWith(`${holder}-`) &&
|
|
8076
|
+
words(k.slice(holder.length + 1)).test(said)),
|
|
8077
|
+
);
|
|
8078
|
+
if (
|
|
8079
|
+
laidOut.length > 0 &&
|
|
8080
|
+
['gap', 'row-gap', 'column-gap'].some(x => rec?.own?.[x])
|
|
8081
|
+
)
|
|
8082
|
+
return {part: {on: holder}, holder};
|
|
8083
|
+
}
|
|
7551
8084
|
/** @type {Array<{k: string, score: number}>} */
|
|
7552
8085
|
const found = [];
|
|
7553
8086
|
for (const h of members) {
|
|
@@ -8475,6 +9008,16 @@ export function draftAnswer(ctx, env, question) {
|
|
|
8475
9008
|
c.lengths.length
|
|
8476
9009
|
)
|
|
8477
9010
|
c.aspects = ['size'];
|
|
9011
|
+
// "alternate row shading": the stripes the doc names, a fill ask when
|
|
9012
|
+
// the clause asks nothing else ("alternate table row text color red" is
|
|
9013
|
+
// the text's).
|
|
9014
|
+
for (const c of clauses)
|
|
9015
|
+
if (
|
|
9016
|
+
!c.aspects.length &&
|
|
9017
|
+
c.parts.some(p => p.on === 'table-row') &&
|
|
9018
|
+
stripeNamesOf(ctx.project)(c.text)
|
|
9019
|
+
)
|
|
9020
|
+
c.aspects = ['background'];
|
|
8478
9021
|
// "shadow opacity 0.2", "card shadows with 30% alpha", "dialog shadows
|
|
8479
9022
|
// 50% transparent": the layer's alpha is the ask, not the layer.
|
|
8480
9023
|
for (const c of clauses)
|
|
@@ -9467,9 +10010,9 @@ export function draftAnswer(ctx, env, question) {
|
|
|
9467
10010
|
String.raw`\b(?:${w})\s+(?:shadows?|padding|radius|corners?|borders?|gaps?|spacing|text|fonts?|type|outlines?|rings?|margins?|weight|bold|letters?|headings?)\b`,
|
|
9468
10011
|
).test(c.text) &&
|
|
9469
10012
|
// ("buttons medium weight": a weight, never a size.)
|
|
9470
|
-
!new RegExp(
|
|
9471
|
-
|
|
9472
|
-
);
|
|
10013
|
+
!new RegExp(
|
|
10014
|
+
String.raw`\b(?:${w})\s*(?:-\s*)?(?:weight|bold)\b|\b(?:weight|bold)\s+(?:${w})\b`,
|
|
10015
|
+
).test(c.text);
|
|
9473
10016
|
const size =
|
|
9474
10017
|
/\b(small|sm)\b/.test(c.text) && besidePart('small|sm')
|
|
9475
10018
|
? ['sm', 'small']
|
|
@@ -10426,10 +10969,25 @@ export function draftAnswer(ctx, env, question) {
|
|
|
10426
10969
|
clauseNow && !clauseNow.except && d1.options.some(o => o.length)
|
|
10427
10970
|
? unreadWords(clauseNow, d1.options)
|
|
10428
10971
|
: [];
|
|
10429
|
-
|
|
10972
|
+
// (A color the clause gives to a look of its own that takes a color,
|
|
10973
|
+
// its fill, its text or its line, is read there, whichever answer of
|
|
10974
|
+
// the clause comes first: "a #e8def8 pill".)
|
|
10975
|
+
const unreadHere = unread.filter(
|
|
10976
|
+
w =>
|
|
10977
|
+
!(
|
|
10978
|
+
colorsIn(w.toLowerCase()).length &&
|
|
10979
|
+
clauseNow?.aspects.some(a =>
|
|
10980
|
+
['background', 'text', 'border'].includes(a),
|
|
10981
|
+
) &&
|
|
10982
|
+
!d1.options.some(o =>
|
|
10983
|
+
o.some(st => /colou?r|background|border/.test(st.thing)),
|
|
10984
|
+
)
|
|
10985
|
+
),
|
|
10986
|
+
);
|
|
10987
|
+
const d0 = unreadHere.length
|
|
10430
10988
|
? {
|
|
10431
10989
|
...d1,
|
|
10432
|
-
text: `read "${clauseNow?.text}" but not ${
|
|
10990
|
+
text: `read "${clauseNow?.text}" but not ${unreadHere.map(w => `"${w}"`).join(', ')}, so nothing is written: say it in words how reads (a part, what to change, and a value or a way such as darker or more)`,
|
|
10433
10991
|
options: [],
|
|
10434
10992
|
...(clauseNow?.parts[0]
|
|
10435
10993
|
? {lookup: `${HOW} ${clauseNow.parts[0].on}`}
|
|
@@ -10474,8 +11032,8 @@ export function draftAnswer(ctx, env, question) {
|
|
|
10474
11032
|
const missing = clauseNow?.parts.find(x => x.missing);
|
|
10475
11033
|
// A title Core draws as a heading inside the part, with no part of its
|
|
10476
11034
|
// own: no setting reaches it alone, so nothing is written for it.
|
|
10477
|
-
// (A part that draws its title as its own text, a
|
|
10478
|
-
// for the whole part, said so.)
|
|
11035
|
+
// (A part that draws its title as its own text, a citation's, is
|
|
11036
|
+
// answered for the whole part, said so.)
|
|
10479
11037
|
if (
|
|
10480
11038
|
missing &&
|
|
10481
11039
|
/\btitle$/.test(String(missing.missing)) &&
|
|
@@ -10565,6 +11123,7 @@ export function draftAnswer(ctx, env, question) {
|
|
|
10565
11123
|
? {modeInValue: true}
|
|
10566
11124
|
: {}
|
|
10567
11125
|
),
|
|
11126
|
+
...(input.unmet ? {unmet: input.unmet} : {}),
|
|
10568
11127
|
};
|
|
10569
11128
|
drafts.push(pushed);
|
|
10570
11129
|
if (clauseNow) draftClause.set(pushed, clauseNow);
|
|
@@ -11011,8 +11570,107 @@ export function draftAnswer(ctx, env, question) {
|
|
|
11011
11570
|
}
|
|
11012
11571
|
}
|
|
11013
11572
|
}
|
|
11573
|
+
// A subject how does not know ("lozenges: subtle gray background",
|
|
11574
|
+
// "flurbles bold"): a plural noun leading the clause, or its label, that
|
|
11575
|
+
// names no part, look, setting or color. That clause, and the clauses of
|
|
11576
|
+
// its list after it that name no part of their own, write nothing and
|
|
11577
|
+
// name the word: never the whole theme in its place.
|
|
11578
|
+
const subjectKnown = (/** @type {string} */ w) =>
|
|
11579
|
+
lex.vocab.includes(w) ||
|
|
11580
|
+
lex.vocab.includes(singular(w)) ||
|
|
11581
|
+
corrected(w, lex.vocab) !== w ||
|
|
11582
|
+
KEEP.has(w) ||
|
|
11583
|
+
Object.hasOwn(HUES, w) ||
|
|
11584
|
+
aspectsOf(w).length > 0 ||
|
|
11585
|
+
stateWord(w) != null ||
|
|
11586
|
+
colorsIn(w).length > 0 ||
|
|
11587
|
+
lex.parts.some(([re]) => re.test(` ${w} `)) ||
|
|
11588
|
+
/^(?:themes?|everything|everywhere|sites?|apps?|ui|pages?|modes?|colou?rs?|palettes?|brands?|looks?|vibes?|styles?|defaults?|things?|details?|elements?|components?|controls?|surfaces?|items?|words?|letters?|numbers?)$/.test(
|
|
11589
|
+
w,
|
|
11590
|
+
);
|
|
11591
|
+
const unknownSubject = (/** @type {Clause} */ c) => {
|
|
11592
|
+
if (c.parts.length || c.except || c.refused) return null;
|
|
11593
|
+
const t = c.text.toLowerCase().trim();
|
|
11594
|
+
const label = /^([a-z][a-z' -]{1,40}?)\s*:\s*\S/.exec(t)?.[1];
|
|
11595
|
+
const lead =
|
|
11596
|
+
label ??
|
|
11597
|
+
/^(?:the |my |our |all (?:the )?)?([a-z]{3,}s)\b(?=\s+\S)/.exec(t)?.[1];
|
|
11598
|
+
if (!lead) return null;
|
|
11599
|
+
const words = lead
|
|
11600
|
+
.split(/\s+/)
|
|
11601
|
+
.filter(
|
|
11602
|
+
w =>
|
|
11603
|
+
w &&
|
|
11604
|
+
!/^(?:the|my|our|all|every|its|their|this|that|these|those|a|an|and|of|for|in|on)$/.test(
|
|
11605
|
+
w,
|
|
11606
|
+
),
|
|
11607
|
+
);
|
|
11608
|
+
// (A brand or product as the label, "Airbnb: accent …", is the theme's
|
|
11609
|
+
// look said after it; only a plural noun names things on the page. A
|
|
11610
|
+
// noun followed by what it does, "users complained …", tells; and
|
|
11611
|
+
// people and exclamations name nothing on the page.)
|
|
11612
|
+
const noun = words[words.length - 1] ?? '';
|
|
11613
|
+
const next = label
|
|
11614
|
+
? ''
|
|
11615
|
+
: (t
|
|
11616
|
+
.slice(t.indexOf(lead) + lead.length)
|
|
11617
|
+
.trim()
|
|
11618
|
+
.split(/\s+/)[0] ?? '');
|
|
11619
|
+
if (
|
|
11620
|
+
/^(?:is|are|was|were|seems?|looks?|feels?|said|says|say|think|thinks|want|wants|need|needs|hate|hates|love|loves|like|likes|keep|keeps|[a-z]+ed)$/.test(
|
|
11621
|
+
next,
|
|
11622
|
+
) ||
|
|
11623
|
+
/^(?:oops|whoops|yikes|thanks|users?|people|customers?|folks|clients?|guys|devs|designers?|friends?|readers?|visitors?)$/.test(
|
|
11624
|
+
noun,
|
|
11625
|
+
)
|
|
11626
|
+
)
|
|
11627
|
+
return null;
|
|
11628
|
+
if (!/[a-z]{2}[^su]s$/.test(noun) || words.some(subjectKnown)) return null;
|
|
11629
|
+
return lead;
|
|
11630
|
+
};
|
|
11631
|
+
// ("filled blue with white text on hover": a state said at the end of
|
|
11632
|
+
// a with-item is the state of the look it is with, so the fill and its
|
|
11633
|
+
// text are the hover look together, never a resting fill.)
|
|
11634
|
+
for (let i = clauses.length - 1; i >= 1; i--) {
|
|
11635
|
+
const [a, b] = [clauses[i - 1], clauses[i]];
|
|
11636
|
+
if (
|
|
11637
|
+
joinOf.get(b)?.sep === 'with' &&
|
|
11638
|
+
b.state &&
|
|
11639
|
+
!a.state &&
|
|
11640
|
+
!a.except &&
|
|
11641
|
+
a.parts.length &&
|
|
11642
|
+
b.parts.length &&
|
|
11643
|
+
b.parts.every(x => a.parts.some(y => y.on === x.on)) &&
|
|
11644
|
+
(a.colors.length || a.aspects.length) &&
|
|
11645
|
+
new RegExp(`\\b(?:on|when|while)\\s+${b.state}\\w*\\s*$`).test(b.text)
|
|
11646
|
+
)
|
|
11647
|
+
a.state = b.state;
|
|
11648
|
+
}
|
|
11649
|
+
/** The unknown subject a list is held under, until a clause leaves it. */
|
|
11650
|
+
let heldUnder = '';
|
|
11014
11651
|
for (const c of clauses) {
|
|
11015
11652
|
clauseNow = c;
|
|
11653
|
+
{
|
|
11654
|
+
const unknown = unknownSubject(c);
|
|
11655
|
+
if (
|
|
11656
|
+
heldUnder &&
|
|
11657
|
+
(unknown ||
|
|
11658
|
+
c.parts.length ||
|
|
11659
|
+
/[;\n.]|\bthen\b/.test(c.joint ?? '') ||
|
|
11660
|
+
/^[a-z][a-z' -]{1,40}:/.test(c.text.trim()))
|
|
11661
|
+
)
|
|
11662
|
+
heldUnder = '';
|
|
11663
|
+
if (unknown) heldUnder = unknown;
|
|
11664
|
+
if (heldUnder) {
|
|
11665
|
+
if (unknown)
|
|
11666
|
+
push({
|
|
11667
|
+
text: `no part is called "${unknown}" here, so nothing is written for "${c.text.trim()}"${clauses.some(x => x !== c && !x.parts.length && x.joint && !/[;\n.]/.test(x.joint)) ? ' or the list after it' : ''}; how --list parts names every part (a part's own name, "badges", "toasts", writes on it)`,
|
|
11668
|
+
options: [],
|
|
11669
|
+
lookup: `${HOW} --list parts`,
|
|
11670
|
+
});
|
|
11671
|
+
continue;
|
|
11672
|
+
}
|
|
11673
|
+
}
|
|
11016
11674
|
// An element its place has no part of its own for: nothing is written,
|
|
11017
11675
|
// and the answer says why.
|
|
11018
11676
|
if (c.refused) {
|
|
@@ -11970,6 +12628,10 @@ export function draftAnswer(ctx, env, question) {
|
|
|
11970
12628
|
continue;
|
|
11971
12629
|
}
|
|
11972
12630
|
if (!members || !k.when) continue;
|
|
12631
|
+
// A shadow kept in a state (a status's focus ring): the step it is
|
|
12632
|
+
// kept from writes that state on every member, so every member
|
|
12633
|
+
// keeps it, whether or not it draws a look of its own there.
|
|
12634
|
+
if (k.thing === 'box-shadow' && k.state) continue;
|
|
11973
12635
|
// Any other property: a member with no look of its own under the
|
|
11974
12636
|
// condition (a date input's error look, which its field draws)
|
|
11975
12637
|
// keeps by inheriting, so it takes no pin.
|
|
@@ -13531,10 +14193,12 @@ export function draftAnswer(ctx, env, question) {
|
|
|
13531
14193
|
const delta = new RegExp(
|
|
13532
14194
|
`\\b(?:by|add(?:ing)?|plus|minus|subtract(?:ing)?)\\s+(\\d*\\.?\\d+)(px|rem|em)\\b|\\b(\\d*\\.?\\d+)(px|rem|em) (?:${COMPARATIVE})\\b`,
|
|
13533
14195
|
).exec(c.text);
|
|
14196
|
+
// ("divided by 1px lines": "by" alone names what does the dividing;
|
|
14197
|
+
// an amount needs a word that changes, "bigger by 2px".)
|
|
13534
14198
|
if (
|
|
13535
14199
|
delta &&
|
|
13536
14200
|
new RegExp(
|
|
13537
|
-
`\\b(
|
|
14201
|
+
`\\b(add|adding|plus|minus|subtract|subtracting|increase|decrease|reduce|${COMPARATIVE})\\b`,
|
|
13538
14202
|
).test(c.text)
|
|
13539
14203
|
) {
|
|
13540
14204
|
const unit = delta[2] ?? delta[4];
|
|
@@ -14543,6 +15207,9 @@ export function draftAnswer(ctx, env, question) {
|
|
|
14543
15207
|
return {
|
|
14544
15208
|
text: `${env.slug} sets nothing for ${what}${on ? ` on ${on}` : ''}, so it already uses the base value`,
|
|
14545
15209
|
options: [],
|
|
15210
|
+
// (What the ask takes for granted, a setting to take back, that the
|
|
15211
|
+
// theme does not have.)
|
|
15212
|
+
unmet: `${what}${on ? ` on ${on}` : ''}`,
|
|
14546
15213
|
};
|
|
14547
15214
|
return {
|
|
14548
15215
|
text: `take back what ${env.slug} sets for ${what}${on ? ` on ${on}` : ''}: undo restores the base value`,
|
|
@@ -15200,6 +15867,28 @@ export function draftAnswer(ctx, env, question) {
|
|
|
15200
15867
|
const tokenNow = resolvedValue(st.thing) || current(st.thing);
|
|
15201
15868
|
if (tokenNow) return set(st.thing, tokenNow, {...flags, on: p.on});
|
|
15202
15869
|
}
|
|
15870
|
+
// A shadow asked in a state ("the focus ring on inputs, but keep the
|
|
15871
|
+
// invalid ones"): the kept part's shadow in that state, under its
|
|
15872
|
+
// kept status or variant, from what Core draws for it there; the
|
|
15873
|
+
// part's plain shadow in that state when the status draws none of
|
|
15874
|
+
// its own.
|
|
15875
|
+
if (st.thing === 'box-shadow' && st.state && !p.state) {
|
|
15876
|
+
const inState = Object.entries(
|
|
15877
|
+
C.MAP[one(p.on)]?.at?.['box-shadow'] ?? {},
|
|
15878
|
+
).filter(([k]) =>
|
|
15879
|
+
new RegExp(`(?:^|\\s):${st.state}(?![\\w-])`).test(k),
|
|
15880
|
+
);
|
|
15881
|
+
const [axisName, axisValue] = String(p.when ?? '').split(':');
|
|
15882
|
+
const scoped = p.when
|
|
15883
|
+
? inState.find(([k]) =>
|
|
15884
|
+
new RegExp(`\\b${axisName}=${axisValue}\\b`).test(k),
|
|
15885
|
+
)
|
|
15886
|
+
: undefined;
|
|
15887
|
+
const plain = inState.find(([k]) => !/\bstatus=/.test(k));
|
|
15888
|
+
const value = (scoped ?? plain)?.[1];
|
|
15889
|
+
if (value != null)
|
|
15890
|
+
return set('box-shadow', String(value), {...flags, state: st.state});
|
|
15891
|
+
}
|
|
15203
15892
|
// The shadow it has now, written out (the tokens it reads may be set
|
|
15204
15893
|
// to none in the same answer).
|
|
15205
15894
|
// Its shadow at rest; none when it has none.
|
|
@@ -15492,6 +16181,62 @@ export function draftAnswer(ctx, env, question) {
|
|
|
15492
16181
|
: toks
|
|
15493
16182
|
: toks;
|
|
15494
16183
|
}
|
|
16184
|
+
/**
|
|
16185
|
+
* The part's own pieces inside it, by the census, that draw an aspect
|
|
16186
|
+
* the part itself draws none of: empty when the part draws it, or holds
|
|
16187
|
+
* no such piece of its own.
|
|
16188
|
+
* @param {string} on
|
|
16189
|
+
* @param {string} a
|
|
16190
|
+
* @returns {string[]}
|
|
16191
|
+
*/
|
|
16192
|
+
function innerDrawing(on, a) {
|
|
16193
|
+
const props = GROUPS[a] ?? [];
|
|
16194
|
+
const rec = C.MAP[one(on)];
|
|
16195
|
+
if (!rec || props.length === 0) return [];
|
|
16196
|
+
/** @param {any} r */
|
|
16197
|
+
const draws = r =>
|
|
16198
|
+
props.some(x => r?.own?.[x] || r?.at?.[x]) ||
|
|
16199
|
+
Object.values(r?.inside ?? {}).some(ps =>
|
|
16200
|
+
/** @type {string[]} */ (ps).some(x => props.includes(x)),
|
|
16201
|
+
);
|
|
16202
|
+
if (draws(rec)) return [];
|
|
16203
|
+
// A piece whose own resting paint draws it, never one that paints it
|
|
16204
|
+
// only to mark a state (a nav item's selected fill, an option's
|
|
16205
|
+
// highlight) or through a hover or press layer inside it.
|
|
16206
|
+
/**
|
|
16207
|
+
* Whether a census condition is a resting look: always, or only the
|
|
16208
|
+
* piece's visual props (its size, its orientation), never a runtime
|
|
16209
|
+
* state, a pseudo-class or a layer.
|
|
16210
|
+
* @param {string} cond
|
|
16211
|
+
* @param {string} k
|
|
16212
|
+
*/
|
|
16213
|
+
const resting = (cond, k) => {
|
|
16214
|
+
if (cond === 'always') return true;
|
|
16215
|
+
if (/[\s:[]/.test(cond)) return false;
|
|
16216
|
+
const visual = ctx.project.target.get(k)?.props ?? [];
|
|
16217
|
+
return cond
|
|
16218
|
+
.split(',')
|
|
16219
|
+
.every(pair => visual.includes(pair.split('=')[0] ?? ''));
|
|
16220
|
+
};
|
|
16221
|
+
/** @param {string} k */
|
|
16222
|
+
const drawsAtRest = k =>
|
|
16223
|
+
props.some(x =>
|
|
16224
|
+
Object.entries(C.MAP[k]?.at?.[x] ?? {}).some(
|
|
16225
|
+
([cond, value]) =>
|
|
16226
|
+
resting(cond, k) &&
|
|
16227
|
+
!/^(transparent|none|)$/.test(String(value).trim()),
|
|
16228
|
+
),
|
|
16229
|
+
);
|
|
16230
|
+
// Only the part's own pieces: a shared component inside it (an empty
|
|
16231
|
+
// state's Button) is never handed a change meant for the part.
|
|
16232
|
+
const owner = ctx.project.target.get(one(on))?.component;
|
|
16233
|
+
return (rec.contains ?? []).filter(
|
|
16234
|
+
k =>
|
|
16235
|
+
drawsAtRest(k) &&
|
|
16236
|
+
owner !== undefined &&
|
|
16237
|
+
ctx.project.target.get(k)?.component === owner,
|
|
16238
|
+
);
|
|
16239
|
+
}
|
|
15495
16240
|
/**
|
|
15496
16241
|
* The commands for one part (or the whole theme) and one aspect.
|
|
15497
16242
|
* @param {Clause} c
|
|
@@ -15516,7 +16261,7 @@ export function draftAnswer(ctx, env, question) {
|
|
|
15516
16261
|
k =>
|
|
15517
16262
|
k !== one(on) &&
|
|
15518
16263
|
(ctx.project.target.get(k)?.states ?? []).includes(noState) &&
|
|
15519
|
-
new RegExp(`\\b
|
|
16264
|
+
new RegExp(`\\b(?:${ownWords(k)})s?\\b`).test(c.text),
|
|
15520
16265
|
);
|
|
15521
16266
|
if (other.length === 1) {
|
|
15522
16267
|
const k = other[0];
|
|
@@ -16591,12 +17336,33 @@ export function draftAnswer(ctx, env, question) {
|
|
|
16591
17336
|
),
|
|
16592
17337
|
) &&
|
|
16593
17338
|
!/\b(background|bg|fill(ed)?|gradient)\b/.test(c.text)
|
|
16594
|
-
)
|
|
17339
|
+
) {
|
|
17340
|
+
// A part that draws none of what is asked hands it to the one part
|
|
17341
|
+
// inside it that draws it (a keyboard shortcut's fill, drawn by its
|
|
17342
|
+
// key badges); with several such parts, nothing is written and the
|
|
17343
|
+
// answer names them.
|
|
17344
|
+
const inner = innerDrawing(on, a);
|
|
17345
|
+
if (inner.length === 1) {
|
|
17346
|
+
/** @type {Draft | null} */
|
|
17347
|
+
const d = answerFor(c, {on: inner[0]}, a);
|
|
17348
|
+
if (d)
|
|
17349
|
+
return {
|
|
17350
|
+
...d,
|
|
17351
|
+
text: `${on} draws no fill of its own: the ${inner[0]} inside it draws it, so on ${inner[0]}. ${d.text}`,
|
|
17352
|
+
};
|
|
17353
|
+
}
|
|
17354
|
+
if (inner.length > 1)
|
|
17355
|
+
return {
|
|
17356
|
+
text: `${on} draws no fill of its own; the parts inside it that draw it: ${inner.join(', ')}. Name one with --on; nothing is written`,
|
|
17357
|
+
options: [],
|
|
17358
|
+
lookup: `${HOW} ${on}`,
|
|
17359
|
+
};
|
|
16595
17360
|
return {
|
|
16596
17361
|
text: `${on} reads no fill or text color token that set can change; its color comes from its own props`,
|
|
16597
17362
|
options: [],
|
|
16598
17363
|
lookup: `${HOW} ${on}`,
|
|
16599
17364
|
};
|
|
17365
|
+
}
|
|
16600
17366
|
if (p?.role === 'body' && a === 'weight') {
|
|
16601
17367
|
const v =
|
|
16602
17368
|
weightIn(c) ??
|
|
@@ -16928,6 +17694,48 @@ export function draftAnswer(ctx, env, question) {
|
|
|
16928
17694
|
};
|
|
16929
17695
|
}
|
|
16930
17696
|
case 'corners': {
|
|
17697
|
+
// ("4px top corners", "square bottom corners", "round the left
|
|
17698
|
+
// corners 8px": the corners on those sides only, each its own
|
|
17699
|
+
// longhand, start and end in the writing direction.)
|
|
17700
|
+
{
|
|
17701
|
+
const sides = [
|
|
17702
|
+
...new Set(
|
|
17703
|
+
[
|
|
17704
|
+
...c.text.matchAll(
|
|
17705
|
+
/\b(top|bottom|left|right)\b(?=[\w\s-]*\bcorners?\b)|\bcorners?\b[\w\s-]*?\b(?:on|at|along) (?:the )?(top|bottom|left|right)\b/g,
|
|
17706
|
+
),
|
|
17707
|
+
].map(m => m[1] ?? m[2]),
|
|
17708
|
+
),
|
|
17709
|
+
];
|
|
17710
|
+
const sidePx = /\b(square|sharp)\b/.test(c.text)
|
|
17711
|
+
? '0'
|
|
17712
|
+
: (c.lengths.find(l => /^\d*\.?\d+(?:px|rem|em)$/.test(l)) ?? null);
|
|
17713
|
+
// (A step rounder moves every corner: for some only, a size.)
|
|
17714
|
+
if (on && sides.length && c.dir && !sidePx)
|
|
17715
|
+
return {
|
|
17716
|
+
text: `a step ${c.dir === 'more' ? 'rounder' : 'sharper'} moves every corner of ${on}; for the ${sides.join(' and ')} corners only, give a size ("8px ${sides[0]} corners")`,
|
|
17717
|
+
options: [],
|
|
17718
|
+
lookup: `${HOW} ${on}`,
|
|
17719
|
+
};
|
|
17720
|
+
if (on && sides.length && sidePx && !c.dir) {
|
|
17721
|
+
const LONG = /** @type {Record<string, string[]>} */ ({
|
|
17722
|
+
top: ['start-start', 'start-end'],
|
|
17723
|
+
bottom: ['end-start', 'end-end'],
|
|
17724
|
+
left: ['start-start', 'end-start'],
|
|
17725
|
+
right: ['start-end', 'end-end'],
|
|
17726
|
+
});
|
|
17727
|
+
const corners = [...new Set(sides.flatMap(x => LONG[x]))];
|
|
17728
|
+
return {
|
|
17729
|
+
text: `the ${sides.join(' and ')} corners on ${on}: ${sidePx === '0' ? 'square' : sidePx}, the other corners as they are`,
|
|
17730
|
+
options: [
|
|
17731
|
+
corners.map(k =>
|
|
17732
|
+
set(`border-${k}-radius`, sidePx, {...f, ...modeOf(c)}),
|
|
17733
|
+
),
|
|
17734
|
+
],
|
|
17735
|
+
sequence: corners.length > 1,
|
|
17736
|
+
};
|
|
17737
|
+
}
|
|
17738
|
+
}
|
|
16931
17739
|
const tall = tallIn(c.text);
|
|
16932
17740
|
const tied = radiusIn(c.text);
|
|
16933
17741
|
// "1.5 times bigger": an amount, never a radius.
|
|
@@ -18505,6 +19313,23 @@ export function draftAnswer(ctx, env, question) {
|
|
|
18505
19313
|
? null
|
|
18506
19314
|
: c.lengths.find(l => !/%$/.test(l));
|
|
18507
19315
|
const gap = /\b(gaps?|between)\b/.test(c.text);
|
|
19316
|
+
// ("list items more spacing between them": the room between the
|
|
19317
|
+
// items is the gap of the part that holds them. A way with no
|
|
19318
|
+
// amount is no step of the holder's whole room, which also pads
|
|
19319
|
+
// it: its gap is named, for a value.)
|
|
19320
|
+
const between = /** @type {{between?: string}} */ (
|
|
19321
|
+
c.parts.find(x => x.on === on) ?? {}
|
|
19322
|
+
).between;
|
|
19323
|
+
if (between && !px && !pctLength) {
|
|
19324
|
+
const gapRead = (C.partReads(one(String(on)), 'spacing') ?? []).find(
|
|
19325
|
+
r => r.props.some(x => /^(?:row-)?gap$/.test(x)),
|
|
19326
|
+
);
|
|
19327
|
+
return {
|
|
19328
|
+
text: `the room between ${between}s is ${on}'s gap${gapRead ? ` (${gapRead.token}, now ${current(gapRead.token)})` : ''}, not ${between}'s padding: give it a value, such as gap 8px --on ${on}`,
|
|
19329
|
+
options: [],
|
|
19330
|
+
lookup: `${HOW} ${on}`,
|
|
19331
|
+
};
|
|
19332
|
+
}
|
|
18508
19333
|
// The way the words give, if any.
|
|
18509
19334
|
const way =
|
|
18510
19335
|
new RegExp(`\\b(?:${densityWords('roomy', 'crowded')})\\b`).test(
|
|
@@ -20750,7 +21575,40 @@ export function draftAnswer(ctx, env, question) {
|
|
|
20750
21575
|
[set(innerOnly, innerColor, {on: innerPart, ...modeOf(c)})],
|
|
20751
21576
|
],
|
|
20752
21577
|
};
|
|
20753
|
-
|
|
21578
|
+
// The stripe a table row carries (its `parity`, odd or even, as
|
|
21579
|
+
// Core marks body rows), when the installed Core marks it and the
|
|
21580
|
+
// clause's own part is that row: the values are the part data's, so
|
|
21581
|
+
// an ask naming one as a row qualifier ("odd rows", "the even ones")
|
|
21582
|
+
// is a stripe ask too. A part with no stripe ("card background even
|
|
21583
|
+
// lighter", "alternate button background") never is. A stripe ask
|
|
21584
|
+
// that names no part ("zebra stripes") is a table row's.
|
|
21585
|
+
const ownPart = on ? one(on) : null;
|
|
21586
|
+
/** @param {string} p */
|
|
21587
|
+
const striping = p => (C.variantValues(p)?.parity ?? []).length > 0;
|
|
21588
|
+
const rowParity = striping('table-row') ? 'table-row' : null;
|
|
21589
|
+
const parityOn = ownPart
|
|
21590
|
+
? striping(ownPart)
|
|
21591
|
+
? ownPart
|
|
21592
|
+
: null
|
|
21593
|
+
: /\bstripe[sd]?\b|\bstriped\b|\bzebra\b/.test(c.text)
|
|
21594
|
+
? rowParity
|
|
21595
|
+
: null;
|
|
21596
|
+
const parities = parityOn
|
|
21597
|
+
? /** @type {string[]} */ (C.variantValues(parityOn).parity)
|
|
21598
|
+
: [];
|
|
21599
|
+
/** @param {string} text */
|
|
21600
|
+
const paritiesSaid = text =>
|
|
21601
|
+
parities.filter(v =>
|
|
21602
|
+
new RegExp(
|
|
21603
|
+
`\\b${v}(?:-numbered)?\\s+(?:table\\s+)?(?:rows?|ones?)\\b`,
|
|
21604
|
+
).test(noMode(text)),
|
|
21605
|
+
);
|
|
21606
|
+
const paritySaid = paritiesSaid(c.text);
|
|
21607
|
+
if (
|
|
21608
|
+
/\bstripe[sd]?\b|\bstriped\b|\bzebra\b/.test(c.text) ||
|
|
21609
|
+
(parityOn &&
|
|
21610
|
+
(stripeNamesOf(ctx.project)(c.text) || paritySaid.length === 1))
|
|
21611
|
+
) {
|
|
20754
21612
|
// The token Core paints every other row with, read from the part
|
|
20755
21613
|
// data (a row's fill under an nth-child condition): set on the part,
|
|
20756
21614
|
// it colors the stripes alone, and transparent takes them away.
|
|
@@ -20762,12 +21620,50 @@ export function draftAnswer(ctx, env, question) {
|
|
|
20762
21620
|
r.when.some(w => /:nth-child\(/.test(w)),
|
|
20763
21621
|
),
|
|
20764
21622
|
) ?? null;
|
|
20765
|
-
const
|
|
21623
|
+
const stripeRead = stripeOn
|
|
20766
21624
|
? C.partReads(stripeOn, 'background').find(r =>
|
|
20767
21625
|
r.when.some(w => /:nth-child\(/.test(w)),
|
|
20768
|
-
)
|
|
21626
|
+
)
|
|
20769
21627
|
: null;
|
|
21628
|
+
const stripe = stripeRead?.token ?? null;
|
|
21629
|
+
// The rows Core's own stripe is on, read from its condition.
|
|
21630
|
+
const coreParity =
|
|
21631
|
+
stripeRead?.when
|
|
21632
|
+
.map(w => /:nth-child\((odd|even)\b/.exec(w)?.[1])
|
|
21633
|
+
.find(Boolean) ?? null;
|
|
20770
21634
|
const value = c.neg ? 'transparent' : colorFor(c, 'fill');
|
|
21635
|
+
// One stripe named ("odd rows #f9f9f9", "zebra rows, odd ones
|
|
21636
|
+
// shaded"): that stripe's fill on the row, in every table, and the
|
|
21637
|
+
// other stripe of a striped table cleared, where Core draws its
|
|
21638
|
+
// own. A theme with no stripe of its own and no color keeps Core's.
|
|
21639
|
+
if (parityOn && paritySaid.length === 1 && value) {
|
|
21640
|
+
const p = paritySaid[0];
|
|
21641
|
+
const other = parities.find(v => v !== p);
|
|
21642
|
+
const steps = [
|
|
21643
|
+
set('background-color', value, {
|
|
21644
|
+
on: parityOn,
|
|
21645
|
+
when: `parity:${p}`,
|
|
21646
|
+
...modeOf(c),
|
|
21647
|
+
}),
|
|
21648
|
+
...(!c.neg && coreParity && other === coreParity
|
|
21649
|
+
? [
|
|
21650
|
+
set('background-color', 'transparent', {
|
|
21651
|
+
on: parityOn,
|
|
21652
|
+
when: `parity:${other}`,
|
|
21653
|
+
state: 'striped',
|
|
21654
|
+
...modeOf(c),
|
|
21655
|
+
}),
|
|
21656
|
+
]
|
|
21657
|
+
: []),
|
|
21658
|
+
];
|
|
21659
|
+
return {
|
|
21660
|
+
text: c.neg
|
|
21661
|
+
? `no stripe on the ${p} rows of ${parityOn}. On a table with hover those rows lose Core's hover color too`
|
|
21662
|
+
: `a stripe on the ${p} rows of ${parityOn} (the first body row is odd), in every data-driven table${steps.length > 1 ? `; the ${other} rows of a striped table, where Core paints its own stripe, are cleared` : ''}. On a table with hover the stripe${steps.length > 1 ? ' and the cleared rows' : ''} cover Core's hover color; add --state striped to stripe only the tables the app marks isStriped`,
|
|
21663
|
+
options: [steps],
|
|
21664
|
+
sequence: steps.length > 1,
|
|
21665
|
+
};
|
|
21666
|
+
}
|
|
20771
21667
|
if (stripeOn && stripe && value)
|
|
20772
21668
|
return {
|
|
20773
21669
|
text: `${c.neg ? 'no stripes' : 'the stripe color'} on ${stripeOn}: ${stripe}, which Core paints every other row with`,
|
|
@@ -20782,6 +21678,18 @@ export function draftAnswer(ctx, env, question) {
|
|
|
20782
21678
|
: /\b(dark(?:er|en)?|deeper)\b/.test(noMode(c.text))
|
|
20783
21679
|
? -1
|
|
20784
21680
|
: 0;
|
|
21681
|
+
// "odd rows darker" on a Core that stripes the even rows: the odd
|
|
21682
|
+
// rows have no stripe to shift, so they need a color of their own.
|
|
21683
|
+
if (
|
|
21684
|
+
parityOn &&
|
|
21685
|
+
paritySaid.length === 1 &&
|
|
21686
|
+
paritySaid[0] !== coreParity &&
|
|
21687
|
+
way
|
|
21688
|
+
)
|
|
21689
|
+
return {
|
|
21690
|
+
text: `the ${paritySaid[0]} rows of ${parityOn} carry no stripe of Core's to make ${way > 0 ? 'lighter' : 'darker'}; give them a color: background-color <color> --on ${parityOn} --when parity:${paritySaid[0]}`,
|
|
21691
|
+
options: [],
|
|
21692
|
+
};
|
|
20785
21693
|
if (stripeOn && stripe && way) {
|
|
20786
21694
|
const steps = perMode(
|
|
20787
21695
|
stripe,
|
|
@@ -20802,8 +21710,34 @@ export function draftAnswer(ctx, env, question) {
|
|
|
20802
21710
|
sequence: steps.length > 1,
|
|
20803
21711
|
};
|
|
20804
21712
|
}
|
|
21713
|
+
// "zebra rows" with no color: the stripe Core already draws, in
|
|
21714
|
+
// every table, with the theme's own stripe color.
|
|
21715
|
+
// (Only when no clause of the ask names a stripe: "zebra rows,
|
|
21716
|
+
// odd rows #f9f9f9" is that one stripe.)
|
|
21717
|
+
if (
|
|
21718
|
+
parityOn &&
|
|
21719
|
+
coreParity &&
|
|
21720
|
+
stripe &&
|
|
21721
|
+
!c.neg &&
|
|
21722
|
+
!paritiesSaid(q).length
|
|
21723
|
+
)
|
|
21724
|
+
return {
|
|
21725
|
+
text: `stripes on every data-driven table: the ${coreParity} rows of ${parityOn} in ${stripe}, the color Core stripes a table marked isStriped with (the first body row is odd; for the odd rows, name them). On a table with hover the stripe covers Core's hover color; add --state striped to stripe only the tables the app marks isStriped`,
|
|
21726
|
+
options: [
|
|
21727
|
+
[
|
|
21728
|
+
set('background-color', `var(${stripe})`, {
|
|
21729
|
+
on: parityOn,
|
|
21730
|
+
when: `parity:${coreParity}`,
|
|
21731
|
+
...modeOf(c),
|
|
21732
|
+
}),
|
|
21733
|
+
],
|
|
21734
|
+
],
|
|
21735
|
+
};
|
|
20805
21736
|
return {
|
|
20806
|
-
text:
|
|
21737
|
+
text:
|
|
21738
|
+
(parityOn ?? rowParity)
|
|
21739
|
+
? `a stripe on table rows is set on the stripe: background-color <color> --on ${parityOn ?? rowParity} --when parity:odd (or parity:even)`
|
|
21740
|
+
: 'striped rows need a style on every other row, and this Core marks no stripe on its rows (a newer Core does: then --when parity:odd); a row background colors every row',
|
|
20807
21741
|
options: [],
|
|
20808
21742
|
};
|
|
20809
21743
|
}
|
|
@@ -20812,7 +21746,11 @@ export function draftAnswer(ctx, env, question) {
|
|
|
20812
21746
|
: /\bgradient\b/.test(c.text)
|
|
20813
21747
|
? 'gradient'
|
|
20814
21748
|
: null;
|
|
20815
|
-
|
|
21749
|
+
// "no gradient on buttons": the design this theme added, taken
|
|
21750
|
+
// back. "no fill", "no background": see-through, on the part and on
|
|
21751
|
+
// every variant or state of it the theme fills itself (taking a
|
|
21752
|
+
// fill back would bring the base's fill back, the opposite).
|
|
21753
|
+
if (c.neg && on && design) {
|
|
20816
21754
|
const undos = undo([
|
|
20817
21755
|
'background',
|
|
20818
21756
|
'background-image',
|
|
@@ -20820,21 +21758,51 @@ export function draftAnswer(ctx, env, question) {
|
|
|
20820
21758
|
]);
|
|
20821
21759
|
return undos.length
|
|
20822
21760
|
? {
|
|
20823
|
-
text: `take back the ${design
|
|
21761
|
+
text: `take back the ${design} this theme sets${where}`,
|
|
20824
21762
|
options: undos,
|
|
20825
21763
|
}
|
|
20826
|
-
:
|
|
20827
|
-
|
|
20828
|
-
|
|
20829
|
-
|
|
20830
|
-
|
|
20831
|
-
|
|
20832
|
-
|
|
20833
|
-
|
|
20834
|
-
|
|
20835
|
-
|
|
20836
|
-
|
|
20837
|
-
|
|
21764
|
+
: {
|
|
21765
|
+
text: `${on} has no ${design} this theme sets, so there is nothing to remove`,
|
|
21766
|
+
options: [],
|
|
21767
|
+
lookup: `${HOW} ${on}`,
|
|
21768
|
+
};
|
|
21769
|
+
}
|
|
21770
|
+
if (c.neg && on) {
|
|
21771
|
+
const ownScoped = env.data.settings.filter(
|
|
21772
|
+
x =>
|
|
21773
|
+
x.on === on &&
|
|
21774
|
+
/^background(?:-color|-image)?$/.test(x.thing) &&
|
|
21775
|
+
(x.when || x.state) &&
|
|
21776
|
+
(!f.when || x.when === f.when) &&
|
|
21777
|
+
(!f.state || x.state === f.state) &&
|
|
21778
|
+
!/^(?:transparent|none)$/i.test(String(x.value).trim()),
|
|
21779
|
+
);
|
|
21780
|
+
const steps = [
|
|
21781
|
+
set('background-color', 'transparent', f),
|
|
21782
|
+
...ownScoped
|
|
21783
|
+
.filter(
|
|
21784
|
+
(x, i, all) =>
|
|
21785
|
+
all.findIndex(
|
|
21786
|
+
y =>
|
|
21787
|
+
y.when === x.when &&
|
|
21788
|
+
y.state === x.state &&
|
|
21789
|
+
y.mode === x.mode,
|
|
21790
|
+
) === i,
|
|
21791
|
+
)
|
|
21792
|
+
.map(x =>
|
|
21793
|
+
set('background-color', 'transparent', {
|
|
21794
|
+
on,
|
|
21795
|
+
...(x.when ? {when: x.when} : {}),
|
|
21796
|
+
...(x.state ? {state: x.state} : {}),
|
|
21797
|
+
...(x.mode ? {mode: x.mode} : {}),
|
|
21798
|
+
}),
|
|
21799
|
+
),
|
|
21800
|
+
];
|
|
21801
|
+
return {
|
|
21802
|
+
text: `no background${where || ` on ${on}`}: transparent, so what is behind it shows${ownScoped.length ? `; also where ${env.slug} fills it itself (${[...new Set(ownScoped.map(x => [x.when, x.state].filter(Boolean).join(' ')))].join(', ')})` : ''}`,
|
|
21803
|
+
options: [steps],
|
|
21804
|
+
sequence: steps.length > 1,
|
|
21805
|
+
};
|
|
20838
21806
|
}
|
|
20839
21807
|
// "the button gradient darker": the part's own gradient, each color
|
|
20840
21808
|
// stop stepped that way (angle, stops and positions kept).
|
|
@@ -21703,10 +22671,8 @@ export function draftAnswer(ctx, env, question) {
|
|
|
21703
22671
|
const colored = (/** @type {string} */ v) => !isGraySeed(seedOf(v));
|
|
21704
22672
|
// A color dial counts when the step changes the shades made from it
|
|
21705
22673
|
// (a warm gray has a little hue to take out), as set measures it.
|
|
21706
|
-
const hasColor = env.data.
|
|
21707
|
-
|
|
21708
|
-
PALETTE_DIALS.includes(x.thing) &&
|
|
21709
|
-
vibrancyMoves(x.thing, seedOf(x.value), 0, 100),
|
|
22674
|
+
const hasColor = seedsInEffect(ctx.project.cwd, env.slug, env.data).some(
|
|
22675
|
+
f => vibrancyMoves(f.dial, f.seed, 0, 100),
|
|
21710
22676
|
);
|
|
21711
22677
|
const help =
|
|
21712
22678
|
'vibrancy sets how saturated every generated color is (0 is gray, 100 the most vivid, 50 the default)';
|
|
@@ -22552,6 +23518,12 @@ export function draftAnswer(ctx, env, question) {
|
|
|
22552
23518
|
const clashes = [];
|
|
22553
23519
|
/** (A step toward a rung said beside the rung.) @type {Step[]} */
|
|
22554
23520
|
const relDropped = [];
|
|
23521
|
+
/**
|
|
23522
|
+
* Steps a later clause of a sequence replaces ("make it compact, then
|
|
23523
|
+
* make it roomy": the last says where it ends).
|
|
23524
|
+
* @type {Step[]}
|
|
23525
|
+
*/
|
|
23526
|
+
const superseded = [];
|
|
22555
23527
|
for (const {clause, steps} of tops)
|
|
22556
23528
|
for (const [k, st] of steps.entries()) {
|
|
22557
23529
|
// A step one clause repeats ("2 steps rounder": the dial stepped
|
|
@@ -22622,8 +23594,12 @@ export function draftAnswer(ctx, env, question) {
|
|
|
22622
23594
|
prior.clause !== clause &&
|
|
22623
23595
|
prior.step.value !== st.value &&
|
|
22624
23596
|
(prior.clause.mode ?? '') === (clause.mode ?? '')
|
|
22625
|
-
)
|
|
22626
|
-
|
|
23597
|
+
) {
|
|
23598
|
+
// (A later clause said after "then" is the next step of a
|
|
23599
|
+
// sequence: it replaces the earlier value, never contradicts it.)
|
|
23600
|
+
if (/\bthen\b/i.test(clause.joint ?? '')) superseded.push(prior.step);
|
|
23601
|
+
else clashes.push([prior.step, st]);
|
|
23602
|
+
}
|
|
22627
23603
|
last.delete(key);
|
|
22628
23604
|
last.set(key, {step: st, clause});
|
|
22629
23605
|
}
|
|
@@ -22638,6 +23614,21 @@ export function draftAnswer(ctx, env, question) {
|
|
|
22638
23614
|
// The page never takes the color the text takes in the same mode.
|
|
22639
23615
|
const all = [...last.values()]
|
|
22640
23616
|
.map(x => x.step)
|
|
23617
|
+
// (The page joins as it shows: with the frame and main panel lines
|
|
23618
|
+
// its own answer gives, so the main panel takes the color too.)
|
|
23619
|
+
.flatMap(st => {
|
|
23620
|
+
if (st.thing !== '--color-background-body' || st.on) return [st];
|
|
23621
|
+
const page = drafts.find(
|
|
23622
|
+
d =>
|
|
23623
|
+
d.options.length === 2 &&
|
|
23624
|
+
d.options[0].length === 1 &&
|
|
23625
|
+
d.options[0][0].thing === st.thing &&
|
|
23626
|
+
String(d.options[0][0].value) === String(st.value) &&
|
|
23627
|
+
(d.options[0][0].mode ?? '') === (st.mode ?? '') &&
|
|
23628
|
+
d.options[1].some(x => x.on === 'app-shell'),
|
|
23629
|
+
);
|
|
23630
|
+
return page ? [st, ...page.options[1]] : [st];
|
|
23631
|
+
})
|
|
22641
23632
|
.filter(
|
|
22642
23633
|
(st, i, list) =>
|
|
22643
23634
|
!(
|
|
@@ -22737,7 +23728,39 @@ export function draftAnswer(ctx, env, question) {
|
|
|
22737
23728
|
}),
|
|
22738
23729
|
);
|
|
22739
23730
|
}
|
|
22740
|
-
|
|
23731
|
+
// (A draft whose every step a later "then" clause replaces is not
|
|
23732
|
+
// offered: the sequence ends at the later value.)
|
|
23733
|
+
const replaced = new Set(superseded.map(st => JSON.stringify(st)));
|
|
23734
|
+
const kept = replaced.size
|
|
23735
|
+
? drafts.filter(
|
|
23736
|
+
d =>
|
|
23737
|
+
!d.options.length ||
|
|
23738
|
+
!d.options.every(o =>
|
|
23739
|
+
o.every(st => replaced.has(JSON.stringify(st))),
|
|
23740
|
+
),
|
|
23741
|
+
)
|
|
23742
|
+
: drafts;
|
|
23743
|
+
if (replaced.size)
|
|
23744
|
+
for (const d of kept)
|
|
23745
|
+
if (d.options.length && !/replaces the earlier/.test(d.text))
|
|
23746
|
+
d.text += ` (said after "then", this replaces the earlier ${superseded.map(st => `${st.thing} ${st.value}`).join(', ')})`;
|
|
23747
|
+
result.push(...kept.slice(0, clashes.length ? 0 : undefined));
|
|
23748
|
+
// An ask that takes for granted a setting the theme does not have ("…;
|
|
23749
|
+
// also undo the corners" with no corners set) reads a theme other than
|
|
23750
|
+
// this one: the rest of it is said, never written, until the person
|
|
23751
|
+
// sees what the theme has.
|
|
23752
|
+
{
|
|
23753
|
+
const unmet = result.find(d => d.unmet);
|
|
23754
|
+
if (unmet && result.some(d => d !== unmet && d.options.length)) {
|
|
23755
|
+
for (const d of result)
|
|
23756
|
+
if (d !== unmet && d.options.length) {
|
|
23757
|
+
d.text = `${d.text} (held back: the same ask takes back ${unmet.unmet}, which ${env.slug} does not set, so the theme is not as the ask expects; ask for this alone to get it)`;
|
|
23758
|
+
d.options = [];
|
|
23759
|
+
}
|
|
23760
|
+
result.splice(result.indexOf(unmet), 1);
|
|
23761
|
+
result.unshift(unmet);
|
|
23762
|
+
}
|
|
23763
|
+
}
|
|
22741
23764
|
// A confidence gate: a question, a "tell me", a "but not too" or a typo
|
|
22742
23765
|
// read as a direction leaves how unsure which way to go; a wrong write is
|
|
22743
23766
|
// worse than none, so it gives the lookup and asks for the ask.
|
|
@@ -24207,6 +25230,30 @@ export function draftAnswer(ctx, env, question) {
|
|
|
24207
25230
|
`(in ${kind} mode only: a ${kind} fill, and the ${other} mode keeps its own so its text stays readable; for the ${other} mode too, set a ${other} color with --mode ${other}, or say "in both modes")`,
|
|
24208
25231
|
);
|
|
24209
25232
|
}
|
|
25233
|
+
// The other stripe the stripe answer clears (on striped tables) holds
|
|
25234
|
+
// in the mode the stripe took, so the other mode keeps Core's stripe
|
|
25235
|
+
// too. A clear the ask says itself keeps every mode.
|
|
25236
|
+
for (const o of d.options) {
|
|
25237
|
+
const stripe = o.find(
|
|
25238
|
+
x =>
|
|
25239
|
+
x.mode &&
|
|
25240
|
+
x.on &&
|
|
25241
|
+
/^background(?:-color)?$/.test(x.thing) &&
|
|
25242
|
+
/^parity:/.test(String(x.when ?? '')),
|
|
25243
|
+
);
|
|
25244
|
+
if (!stripe) continue;
|
|
25245
|
+
for (const st of o)
|
|
25246
|
+
if (
|
|
25247
|
+
!st.mode &&
|
|
25248
|
+
st.on === stripe.on &&
|
|
25249
|
+
/^background(?:-color)?$/.test(st.thing) &&
|
|
25250
|
+
st.value === 'transparent' &&
|
|
25251
|
+
st.state === 'striped' &&
|
|
25252
|
+
/^parity:/.test(String(st.when ?? '')) &&
|
|
25253
|
+
st.when !== stripe.when
|
|
25254
|
+
)
|
|
25255
|
+
st.mode = stripe.mode;
|
|
25256
|
+
}
|
|
24210
25257
|
for (const n of notes) if (!d.text.includes(n)) d.text += ` ${n}`;
|
|
24211
25258
|
}
|
|
24212
25259
|
}
|
|
@@ -24387,8 +25434,16 @@ export function draftAnswer(ctx, env, question) {
|
|
|
24387
25434
|
continue;
|
|
24388
25435
|
const ink = parseColor(String(st.value ?? ''));
|
|
24389
25436
|
if (!ink || alphaOf(String(st.value)) < 1) continue;
|
|
25437
|
+
// (A resting fill in the same answer is the look the text sits on;
|
|
25438
|
+
// a fill in another state, "filled blue on hover", is not.)
|
|
24390
25439
|
if (
|
|
24391
|
-
o.some(
|
|
25440
|
+
o.some(
|
|
25441
|
+
x =>
|
|
25442
|
+
x !== st &&
|
|
25443
|
+
x.on === st.on &&
|
|
25444
|
+
!x.state &&
|
|
25445
|
+
/^background/.test(x.thing),
|
|
25446
|
+
)
|
|
24392
25447
|
)
|
|
24393
25448
|
continue;
|
|
24394
25449
|
const variants = C.variantValues(one(st.on)).variant ?? [];
|
|
@@ -24555,6 +25610,84 @@ export function draftAnswer(ctx, env, question) {
|
|
|
24555
25610
|
),
|
|
24556
25611
|
),
|
|
24557
25612
|
);
|
|
25613
|
+
// "line height 0", "padding 99999px on buttons": a typed value no
|
|
25614
|
+
// page could show (lines drawn on top of each other, a box wider than
|
|
25615
|
+
// any screen) is not written; the answer says what it would do and the
|
|
25616
|
+
// range that reads.
|
|
25617
|
+
for (const d of result) {
|
|
25618
|
+
/** @type {string[]} */
|
|
25619
|
+
const why = [];
|
|
25620
|
+
const kept = d.options.filter(o => {
|
|
25621
|
+
const bad = o.map(st => outOfBounds(st)).find(Boolean);
|
|
25622
|
+
if (bad) why.push(bad);
|
|
25623
|
+
return !bad;
|
|
25624
|
+
});
|
|
25625
|
+
if (!why.length) continue;
|
|
25626
|
+
d.options = kept;
|
|
25627
|
+
d.text = kept.length
|
|
25628
|
+
? `${d.text} (left out: ${[...new Set(why)].join('; ')})`
|
|
25629
|
+
: `${d.text}: nothing is written: ${[...new Set(why)].join('; ')}`;
|
|
25630
|
+
if (!kept.length) delete d.sequence;
|
|
25631
|
+
}
|
|
25632
|
+
// "bold white text in the header": a text color typed for a region of
|
|
25633
|
+
// the page (a part filled with the page or surface color, which flips
|
|
25634
|
+
// with the mode), with no fill asked for it, is measured on that fill;
|
|
25635
|
+
// where it would not read (under 3:1) in one mode only, it is set for
|
|
25636
|
+
// the mode it reads in, and the answer says how to have it in both.
|
|
25637
|
+
{
|
|
25638
|
+
const filled = new Set(
|
|
25639
|
+
result.flatMap(d =>
|
|
25640
|
+
d.options
|
|
25641
|
+
.flat()
|
|
25642
|
+
.filter(
|
|
25643
|
+
st =>
|
|
25644
|
+
st.on &&
|
|
25645
|
+
(/^background(?:-color)?$/.test(st.thing) ||
|
|
25646
|
+
/^--color-background-/.test(st.thing)),
|
|
25647
|
+
)
|
|
25648
|
+
.map(st => String(st.on)),
|
|
25649
|
+
),
|
|
25650
|
+
);
|
|
25651
|
+
for (const d of result) {
|
|
25652
|
+
if (d.options.length !== 1 || !modal) continue;
|
|
25653
|
+
const o = d.options[0];
|
|
25654
|
+
const inks = o.filter(
|
|
25655
|
+
st =>
|
|
25656
|
+
st.on &&
|
|
25657
|
+
!st.mode &&
|
|
25658
|
+
!st.state &&
|
|
25659
|
+
!st.when &&
|
|
25660
|
+
(st.thing === 'color' ||
|
|
25661
|
+
/^--color-text-(?:primary|secondary)$/.test(st.thing)),
|
|
25662
|
+
);
|
|
25663
|
+
if (!inks.length || inks.length !== o.length) continue;
|
|
25664
|
+
const on = String(inks[0].on);
|
|
25665
|
+
if (filled.has(on) || !C.MAP[one(on)] || C.MAP[one(on)]?.media) continue;
|
|
25666
|
+
if (inks.some(st => st.value !== inks[0].value)) continue;
|
|
25667
|
+
const ink = parseColor(String(inks[0].value ?? ''));
|
|
25668
|
+
const bgTok = restRead(C.partReads(one(on), 'background') ?? []);
|
|
25669
|
+
if (
|
|
25670
|
+
!ink ||
|
|
25671
|
+
(bgTok !== '--color-background-body' &&
|
|
25672
|
+
bgTok !== '--color-background-surface')
|
|
25673
|
+
)
|
|
25674
|
+
continue;
|
|
25675
|
+
/** @param {'light' | 'dark'} m */
|
|
25676
|
+
const ground = m => parseColor(String(current(bgTok, m) ?? ''));
|
|
25677
|
+
const reads = /** @type {Array<'light' | 'dark'>} */ ([
|
|
25678
|
+
'light',
|
|
25679
|
+
'dark',
|
|
25680
|
+
]).filter(m => {
|
|
25681
|
+
const g = ground(m);
|
|
25682
|
+
return !g || ratio(ink, g) >= 3;
|
|
25683
|
+
});
|
|
25684
|
+
if (reads.length !== 1) continue;
|
|
25685
|
+
const other = reads[0] === 'light' ? 'dark' : 'light';
|
|
25686
|
+
const g = ground(other);
|
|
25687
|
+
for (const st of inks) st.mode = reads[0];
|
|
25688
|
+
d.text = `${d.text}, in ${reads[0]} mode only: ${on} is ${g ? hex(g.slice(0, 3)) : 'light'} in ${other} mode, where ${inks[0].value} would not read; for both modes, give ${on} a background too`;
|
|
25689
|
+
}
|
|
25690
|
+
}
|
|
24558
25691
|
// "make the primary button #0064E0", "pumpkin orange buttons": a fill
|
|
24559
25692
|
// typed on a part is measured against the text each of its looks draws
|
|
24560
25693
|
// on it, as set measures it after; a look whose text would not read
|
|
@@ -24616,10 +25749,13 @@ export function draftAnswer(ctx, env, question) {
|
|
|
24616
25749
|
.map(x =>
|
|
24617
25750
|
`${x.when ? `${x.when.replace(':', ' ')} ` : ''}${x.mode ? `in ${x.mode} mode` : ''}`.trim(),
|
|
24618
25751
|
)
|
|
25752
|
+
.filter(Boolean)
|
|
24619
25753
|
.join(', ');
|
|
24620
|
-
|
|
25754
|
+
// (A one-mode theme's line names no mode: nothing to put in brackets.)
|
|
25755
|
+
const at = where ? ` (${where})` : '';
|
|
25756
|
+
d.text = `${d.text}; its text would not read on that fill${at}: the next line keeps it readable`;
|
|
24621
25757
|
result.splice(di + 1, 0, {
|
|
24622
|
-
text: `readable text on that fill: ${st.on}'s text measures under 4.5:1 on ${st.value}
|
|
25758
|
+
text: `readable text on that fill: ${st.on}'s text measures under 4.5:1 on ${st.value}${at}, so ${[...new Set(fixes.map(x => x.value))].join(' or ')}`,
|
|
24623
25759
|
options: [fixes],
|
|
24624
25760
|
...(fixes.length > 1 ? {sequence: true} : {}),
|
|
24625
25761
|
});
|