@astryxdesign/cli 0.6.4-canary.06c8fa3 → 0.6.4-canary.0e1fbdb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -40
- package/api/build/build.doc.mjs +6 -1
- package/api/build/build.test.mjs +22 -0
- package/api/build/kit/kit.mjs +44 -5
- package/api/component/component.doc.mjs +14 -7
- package/api/docs/_adapter.d.mts +8 -3
- package/api/docs/_adapter.mjs +14 -6
- package/api/docs/docOverlays.test.mjs +27 -1
- package/api/docs/docs.doc.mjs +2 -2
- package/api/doctor/doctor.doc.mjs +17 -8
- package/api/doctor/doctor.type.d.mts +1 -1
- package/api/doctor/doctor.type.mjs +1 -1
- package/api/gap-report/gap-report.doc.mjs +19 -10
- package/api/hook/hook.doc.mjs +6 -3
- package/api/index.d.mts +2 -0
- package/api/index.mjs +3 -1
- package/api/init/init.doc.mjs +17 -12
- package/api/integration/add-theme.mjs +22 -1
- package/api/integration/add-theme.test.mjs +34 -0
- package/api/integration/authoring-checks.mjs +2 -2
- package/api/integration/integrationPackCheck.doc.mjs +3 -3
- package/api/integration/pack-check.lifecycle-output.test.mjs +2 -0
- package/api/integration/pack-check.mjs +54 -6
- package/api/integration/pack-check.test.mjs +90 -0
- package/api/integration/pack-check.type.mjs +1 -1
- package/api/json/assertResponse.doc.mjs +1 -1
- package/api/json/index.ts +1 -0
- package/api/json/isError.doc.mjs +1 -1
- package/api/layout/_adapter.d.mts +34 -0
- package/api/layout/_adapter.mjs +148 -0
- package/api/layout/check/check.d.mts +16 -0
- package/api/layout/check/check.mjs +40 -0
- package/api/layout/expand/expand.d.mts +22 -0
- package/api/layout/expand/expand.mjs +155 -0
- package/api/layout/expand/expand.path-safety.test.mjs +53 -0
- package/api/layout/grammar/grammar.d.mts +13 -0
- package/api/layout/grammar/grammar.mjs +87 -0
- package/api/layout/layout.d.mts +6 -0
- package/api/layout/layout.mjs +17 -0
- package/api/layout/layout.test.mjs +297 -0
- package/api/layout/layout.type.d.mts +89 -0
- package/api/layout/layout.type.mjs +103 -0
- package/api/layout/layoutCheck.doc.d.mts +11 -0
- package/api/layout/layoutCheck.doc.mjs +85 -0
- package/api/layout/layoutExpand.doc.d.mts +11 -0
- package/api/layout/layoutExpand.doc.mjs +107 -0
- package/api/layout/layoutGrammar.doc.d.mts +11 -0
- package/api/layout/layoutGrammar.doc.mjs +57 -0
- package/api/search/search.d.mts +27 -1
- package/api/search/search.doc.mjs +2 -2
- package/api/search/search.mjs +228 -16
- package/api/swizzle/swizzle.doc.mjs +7 -5
- package/api/template/copy/copy.mjs +1 -1
- package/api/template/copy/copy.test.mjs +9 -0
- package/api/template/template-integration.test.mjs +65 -1
- package/api/template/template.doc.mjs +2 -1
- package/api/template/template.mjs +1 -1
- package/api/theme/generateTonalPalette.doc.mjs +1 -2
- package/api/theme/listThemes.doc.mjs +1 -1
- package/api/theme/themeAdd.doc.mjs +9 -10
- package/api/theme/themeBuild.doc.mjs +13 -13
- package/api/theme/themeList.doc.mjs +1 -1
- package/api/theme/themeListAvailable.doc.mjs +2 -1
- package/api/theme/themePaletteGenerate.doc.mjs +15 -8
- package/api/theme/themeTargets.doc.mjs +3 -2
- package/api/theme/themeTemplate.doc.mjs +2 -1
- package/api/upgrade/run/run.mjs +1 -1
- package/api/upgrade/upgrade.doc.mjs +24 -22
- package/assets/docs/README.md +4 -2
- package/assets/docs/browser-support.doc.mjs +11 -11
- package/assets/docs/color.doc.mjs +8 -2
- package/assets/docs/elevation.doc.mjs +6 -4
- package/assets/docs/getting-started.doc.mjs +5 -16
- package/assets/docs/icons.doc.mjs +2 -21
- package/assets/docs/illustrations.doc.mjs +7 -15
- package/assets/docs/layout.doc.dense.mjs +130 -82
- package/assets/docs/layout.doc.mjs +133 -77
- package/assets/docs/migration.doc.mjs +19 -21
- package/assets/docs/motion.doc.mjs +16 -3
- package/assets/docs/principles.doc.dense.mjs +5 -5
- package/assets/docs/principles.doc.mjs +8 -0
- package/assets/docs/principles.doc.zh.mjs +6 -6
- package/assets/docs/shape.doc.mjs +8 -3
- package/assets/docs/spacing.doc.mjs +7 -2
- package/assets/docs/styling-libraries.doc.mjs +6 -2
- package/assets/docs/styling.doc.mjs +19 -23
- package/assets/docs/theme.doc.dense.mjs +58 -18
- package/assets/docs/theme.doc.mjs +56 -46
- package/assets/docs/theme.doc.zh.mjs +9 -8
- package/assets/docs/tokens.doc.dense.mjs +2 -2
- package/assets/docs/tokens.doc.mjs +389 -8
- package/assets/docs/tokens.doc.zh.mjs +2 -2
- package/assets/docs/tree/add-a-component.doc.mjs +75 -0
- package/assets/docs/tree/add-a-theme.doc.mjs +85 -0
- package/assets/docs/tree/add-a-topic.doc.mjs +144 -0
- package/assets/docs/tree/agent-guidance.doc.mjs +138 -0
- package/assets/docs/tree/block-template.doc.mjs +130 -0
- package/assets/docs/tree/build-the-template.doc.mjs +28 -0
- package/assets/docs/tree/building-blocks.doc.mjs +46 -0
- package/assets/docs/tree/check-your-docs.doc.mjs +137 -0
- package/assets/docs/tree/checks.doc.mjs +119 -0
- package/assets/docs/tree/codemods.doc.mjs +147 -0
- package/assets/docs/tree/component-family.doc.mjs +113 -0
- package/assets/docs/tree/component-imports.doc.mjs +69 -0
- package/assets/docs/tree/components.doc.mjs +23 -0
- package/assets/docs/tree/configuration.doc.mjs +23 -0
- package/assets/docs/tree/debug-and-gap-reports.doc.mjs +182 -0
- package/assets/docs/tree/define-the-theme.doc.mjs +118 -0
- package/assets/docs/tree/describe-the-component.doc.mjs +57 -0
- package/assets/docs/tree/docs.doc.mjs +21 -0
- package/assets/docs/tree/document-the-template.doc.mjs +28 -0
- package/assets/docs/tree/document-the-theme.doc.mjs +68 -0
- package/assets/docs/tree/export-template-assets.doc.mjs +147 -0
- package/assets/docs/tree/extend-or-replace.doc.mjs +103 -0
- package/assets/docs/tree/fonts-and-assets.doc.mjs +106 -0
- package/assets/docs/tree/generate-a-palette.doc.mjs +66 -0
- package/assets/docs/tree/grade-template-with-agent.doc.mjs +105 -0
- package/assets/docs/tree/help.doc.mjs +16 -0
- package/assets/docs/tree/integrations.doc.mjs +25 -470
- package/assets/docs/tree/links.doc.mjs +98 -0
- package/assets/docs/tree/package-and-test.doc.mjs +32 -0
- package/assets/docs/tree/page-template.doc.mjs +71 -0
- package/assets/docs/tree/publishing.doc.mjs +111 -0
- package/assets/docs/tree/quick-start.doc.mjs +272 -0
- package/assets/docs/tree/replace-a-core-component.doc.mjs +104 -0
- package/assets/docs/tree/replace-a-core-template.doc.mjs +172 -0
- package/assets/docs/tree/sections-and-placement.doc.mjs +108 -0
- package/assets/docs/tree/see-it-in-an-app.doc.mjs +59 -0
- package/assets/docs/tree/ship.doc.mjs +16 -0
- package/assets/docs/tree/short-and-findable.doc.mjs +108 -0
- package/assets/docs/tree/single-component.doc.mjs +165 -0
- package/assets/docs/tree/start-a-template.doc.mjs +143 -0
- package/assets/docs/tree/subcomponent.doc.mjs +115 -0
- package/assets/docs/tree/template-assets.doc.mjs +64 -0
- package/assets/docs/tree/template-doc-overview.doc.mjs +109 -0
- package/assets/docs/tree/template-fonts.doc.mjs +102 -0
- package/assets/docs/tree/template-grading-rubric.doc.mjs +452 -0
- package/assets/docs/tree/template-icons.doc.mjs +97 -0
- package/assets/docs/tree/template-images-media.doc.mjs +127 -0
- package/assets/docs/tree/template-styles.doc.mjs +93 -0
- package/assets/docs/tree/templates.doc.mjs +34 -0
- package/assets/docs/tree/test-in-an-app.doc.mjs +115 -0
- package/assets/docs/tree/test-template-in-app.doc.mjs +128 -0
- package/assets/docs/tree/themes.doc.mjs +39 -0
- package/assets/docs/tree/troubleshooting.doc.mjs +149 -0
- package/assets/docs/tree/upgrading.doc.mjs +103 -0
- package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +51 -0
- package/assets/docs/tree/verify-packed-template.doc.mjs +77 -0
- package/assets/docs/tree/versioning.doc.mjs +161 -0
- package/assets/docs/tree/write-good-templates.doc.mjs +64 -0
- package/assets/docs/tree/write-the-template-file.doc.mjs +154 -0
- package/assets/docs/typography.doc.mjs +24 -4
- package/assets/docs/working-with-ai.doc.mjs +30 -22
- package/authoring/config/config.doc.mjs +2 -2
- package/authoring/config/type.ts +2 -2
- package/authoring/doctypes/_schema.d.mts +3 -2
- package/authoring/doctypes/_schema.mjs +6 -0
- package/authoring/doctypes/base/graph-fields.doc.mjs +3 -3
- package/authoring/doctypes/base/type.ts +4 -2
- package/authoring/doctypes/command/command.doc.mjs +1 -1
- package/authoring/doctypes/command/type.ts +1 -1
- package/authoring/doctypes/component/component.doc.mjs +6 -0
- package/authoring/doctypes/component/type.ts +8 -0
- package/authoring/doctypes/reference/reference.doc.mjs +7 -0
- package/authoring/doctypes/reference/type.ts +5 -0
- package/authoring/doctypes/schema/schema.doc.mjs +2 -2
- package/authoring/doctypes/template/template.doc.mjs +1 -1
- package/authoring/doctypes/template/type.ts +2 -2
- package/authoring/integration/integration.doc.mjs +12 -10
- package/clients/cli/command-result-coverage.test.mjs +7 -7
- package/clients/cli/commands/component.doc.mjs +4 -3
- package/clients/cli/commands/debug-result-summary.test.mjs +2 -2
- package/clients/cli/commands/docs.doc.mjs +1 -1
- package/clients/cli/commands/docs.mjs +60 -17
- package/clients/cli/commands/doctor-integration-docs.doc.mjs +3 -2
- package/clients/cli/commands/doctor-integration.test.mjs +53 -0
- package/clients/cli/commands/doctor.doc.mjs +3 -1
- package/clients/cli/commands/doctor.mjs +49 -5
- package/clients/cli/commands/gap-report.doc.mjs +10 -9
- package/clients/cli/commands/init.doc.mjs +9 -6
- package/clients/cli/commands/integration-add.doc.mjs +9 -9
- package/clients/cli/commands/integration-authoring.test.mjs +61 -10
- package/clients/cli/commands/integration-pack.doc.mjs +5 -9
- package/clients/cli/commands/integration-real-world.test.mjs +1 -1
- package/clients/cli/commands/integration-verify.doc.mjs +22 -0
- package/clients/cli/commands/integration.doc.mjs +4 -4
- package/clients/cli/commands/integration.mjs +74 -43
- package/clients/cli/commands/layout-check.doc.mjs +65 -0
- package/clients/cli/commands/layout-expand.doc.mjs +83 -0
- package/clients/cli/commands/layout-grammar.doc.mjs +30 -0
- package/clients/cli/commands/layout.doc.mjs +34 -0
- package/clients/cli/commands/layout.error-codes.test.mjs +66 -0
- package/clients/cli/commands/layout.exit-parity.test.mjs +41 -0
- package/clients/cli/commands/layout.mjs +275 -0
- package/clients/cli/commands/layout.path-help.test.mjs +33 -0
- package/clients/cli/commands/layout.stdin-cap.test.mjs +47 -0
- package/clients/cli/commands/layout.text-fields.test.mjs +39 -0
- package/clients/cli/commands/manifest.doc.mjs +1 -1
- package/clients/cli/commands/search.doc.mjs +10 -3
- package/clients/cli/commands/search.mjs +21 -2
- package/clients/cli/commands/search.test.mjs +21 -4
- package/clients/cli/commands/swizzle.doc.mjs +1 -1
- package/clients/cli/commands/template.doc.mjs +1 -1
- package/clients/cli/commands/text-json-parity.test.mjs +24 -1
- package/clients/cli/commands/theme-add.doc.mjs +1 -1
- package/clients/cli/commands/theme-palette-generate.doc.mjs +3 -2
- package/clients/cli/commands/theme-palette.doc.mjs +1 -2
- package/clients/cli/commands/theme-targets.doc.mjs +2 -2
- package/clients/cli/commands/theme.doc.mjs +2 -1
- package/clients/cli/commands/upgrade.doc.mjs +62 -3
- package/clients/cli/index.mjs +32 -6
- package/clients/cli/lib/define-command.mjs +28 -4
- package/clients/cli/lib/define-command.test.mjs +54 -0
- package/clients/cli/lib/exit-codes.test.mjs +25 -2
- package/clients/cli/lib/json-shim.test.mjs +20 -6
- package/clients/cli/lib/manifest.mjs +23 -5
- package/foundation/agent-docs/agent-docs.mjs +1 -1
- package/foundation/discovery/authoring-self-docs.test.mjs +6 -2
- package/foundation/discovery/cli-self-docs.mjs +16 -2
- package/foundation/discovery/cli-self-docs.test.mjs +20 -0
- package/foundation/discovery/docs-discovery.mjs +5 -1
- package/foundation/discovery/docs-discovery.test.mjs +21 -0
- package/foundation/discovery/docs-section-key.d.mts +1 -1
- package/foundation/discovery/docs-section-key.mjs +1 -1
- package/foundation/discovery/template-adapter.mjs +1 -1
- package/foundation/doc-compiler/doc-loads.test.mjs +15 -2
- package/foundation/doc-compiler/inputs.test.mjs +0 -1
- package/foundation/doc-compiler/tree.d.mts +4 -0
- package/foundation/doc-compiler/tree.mjs +6 -1
- package/foundation/integrations/cli-requirement.d.mts +26 -6
- package/foundation/integrations/cli-requirement.mjs +46 -11
- package/foundation/integrations/cli-requirement.test.mjs +7 -2
- package/foundation/integrations/contribution-inventory.mjs +1 -1
- package/foundation/response/error-codes.doc.mjs +6 -8
- package/foundation/response/error-codes.test.mjs +30 -5
- package/foundation/response/response-types.doc.d.mts +4 -3
- package/foundation/response/response-types.doc.mjs +42 -6
- package/foundation/response/response.doc.mjs +11 -10
- package/foundation/xle/browser.d.mts +3 -3
- package/foundation/xle/browser.mjs +3 -3
- package/foundation/xle/expand.mjs +2 -2
- package/foundation/xle/parse.mjs +1 -1
- package/foundation/xle/print.mjs +2 -2
- package/foundation/xle/splice.mjs +1 -1
- package/package.json +9 -9
- package/api/docs/docs.test.mjs +0 -245
- package/api/docs/integration-tree.test.mjs +0 -555
- package/api/docs/integrationDocs.test.mjs +0 -314
- package/api/search/search.test.mjs +0 -530
- package/assets/docs/tree/integrations.test.mjs +0 -62
- package/assets/docs/tree/writing-docs.doc.mjs +0 -286
- package/clients/cli/commands/docs.test.mjs +0 -323
- package/foundation/agent-docs/agent-docs.test.mjs +0 -1159
- package/foundation/doc-compiler/tree.test.mjs +0 -606
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
// AUTO-GENERATED — do not edit manually.
|
|
4
|
-
// Source: packages/core/src/theme/tokens.stylex.ts
|
|
4
|
+
// Source: packages/core/src/theme/tokens.stylex.ts,
|
|
5
|
+
// domainTokens/dataTokens.ts, and syntax/tokens.ts
|
|
5
6
|
// Run: node scripts/generate-token-docs.mjs
|
|
6
|
-
// Total:
|
|
7
|
+
// Total: 258 tokens across 15 categories.
|
|
7
8
|
|
|
8
9
|
/** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
|
|
9
10
|
|
|
@@ -11,7 +12,12 @@ export const docs = {
|
|
|
11
12
|
"name": "tokens",
|
|
12
13
|
"title": "All Tokens",
|
|
13
14
|
"category": "foundations",
|
|
14
|
-
"description": "Complete reference for spacing,
|
|
15
|
+
"description": "Complete reference for color, data visualization, syntax, spacing, size, border, focus, radius, shadow, motion, and typography tokens.",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"design tokens",
|
|
18
|
+
"css variables",
|
|
19
|
+
"custom properties"
|
|
20
|
+
],
|
|
15
21
|
"sections": [
|
|
16
22
|
{
|
|
17
23
|
"title": "Color Tokens",
|
|
@@ -45,8 +51,8 @@ export const docs = {
|
|
|
45
51
|
],
|
|
46
52
|
[
|
|
47
53
|
"--color-neutral",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
54
|
+
"rgba(5, 54, 89, 0.1)",
|
|
55
|
+
"rgba(223, 226, 229, 0.2)"
|
|
50
56
|
],
|
|
51
57
|
[
|
|
52
58
|
"--color-background-surface",
|
|
@@ -215,8 +221,8 @@ export const docs = {
|
|
|
215
221
|
],
|
|
216
222
|
[
|
|
217
223
|
"--color-shadow",
|
|
218
|
-
"
|
|
219
|
-
"
|
|
224
|
+
"rgba(5, 54, 89, 0.1)",
|
|
225
|
+
"rgba(0, 0, 0, 0.3)"
|
|
220
226
|
],
|
|
221
227
|
[
|
|
222
228
|
"--color-tint-hover",
|
|
@@ -428,6 +434,381 @@ export const docs = {
|
|
|
428
434
|
],
|
|
429
435
|
"previewType": "swatch"
|
|
430
436
|
},
|
|
437
|
+
{
|
|
438
|
+
"title": "Data Visualization Tokens",
|
|
439
|
+
"content": [
|
|
440
|
+
{
|
|
441
|
+
"type": "prose",
|
|
442
|
+
"text": "Colors for charts and graphs: one categorical accent per series, a neutral for labels and reference lines, and sequential ramps from 5 (darkest) to 1 (lightest) for ordered scales and heatmaps."
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"type": "table",
|
|
446
|
+
"headers": [
|
|
447
|
+
"Token",
|
|
448
|
+
"Light",
|
|
449
|
+
"Dark"
|
|
450
|
+
],
|
|
451
|
+
"rows": [
|
|
452
|
+
[
|
|
453
|
+
"--color-data-categorical-blue",
|
|
454
|
+
"#0171E3",
|
|
455
|
+
"#0171E3"
|
|
456
|
+
],
|
|
457
|
+
[
|
|
458
|
+
"--color-data-categorical-orange",
|
|
459
|
+
"#EB6E00",
|
|
460
|
+
"#EB6E00"
|
|
461
|
+
],
|
|
462
|
+
[
|
|
463
|
+
"--color-data-categorical-purple",
|
|
464
|
+
"#6B1EFD",
|
|
465
|
+
"#6B1EFD"
|
|
466
|
+
],
|
|
467
|
+
[
|
|
468
|
+
"--color-data-categorical-green",
|
|
469
|
+
"#0B991F",
|
|
470
|
+
"#0B991F"
|
|
471
|
+
],
|
|
472
|
+
[
|
|
473
|
+
"--color-data-categorical-pink",
|
|
474
|
+
"#F351C0",
|
|
475
|
+
"#F351C0"
|
|
476
|
+
],
|
|
477
|
+
[
|
|
478
|
+
"--color-data-categorical-cyan",
|
|
479
|
+
"#0171A4",
|
|
480
|
+
"#0171A4"
|
|
481
|
+
],
|
|
482
|
+
[
|
|
483
|
+
"--color-data-categorical-red",
|
|
484
|
+
"#F5394F",
|
|
485
|
+
"#F5394F"
|
|
486
|
+
],
|
|
487
|
+
[
|
|
488
|
+
"--color-data-categorical-teal",
|
|
489
|
+
"#08A3A3",
|
|
490
|
+
"#08A3A3"
|
|
491
|
+
],
|
|
492
|
+
[
|
|
493
|
+
"--color-data-categorical-brown",
|
|
494
|
+
"#965E03",
|
|
495
|
+
"#965E03"
|
|
496
|
+
],
|
|
497
|
+
[
|
|
498
|
+
"--color-data-categorical-indigo",
|
|
499
|
+
"#6F8AFF",
|
|
500
|
+
"#6F8AFF"
|
|
501
|
+
],
|
|
502
|
+
[
|
|
503
|
+
"--color-data-neutral",
|
|
504
|
+
"#8494A3",
|
|
505
|
+
"#8C939B"
|
|
506
|
+
],
|
|
507
|
+
[
|
|
508
|
+
"--color-data-blue-5",
|
|
509
|
+
"#02165E",
|
|
510
|
+
"#02165E"
|
|
511
|
+
],
|
|
512
|
+
[
|
|
513
|
+
"--color-data-blue-4",
|
|
514
|
+
"#004CBC",
|
|
515
|
+
"#004CBC"
|
|
516
|
+
],
|
|
517
|
+
[
|
|
518
|
+
"--color-data-blue-3",
|
|
519
|
+
"#2694FE",
|
|
520
|
+
"#2694FE"
|
|
521
|
+
],
|
|
522
|
+
[
|
|
523
|
+
"--color-data-blue-2",
|
|
524
|
+
"#78BEFF",
|
|
525
|
+
"#78BEFF"
|
|
526
|
+
],
|
|
527
|
+
[
|
|
528
|
+
"--color-data-blue-1",
|
|
529
|
+
"#DBECFF",
|
|
530
|
+
"#DBECFF"
|
|
531
|
+
],
|
|
532
|
+
[
|
|
533
|
+
"--color-data-shamrock-5",
|
|
534
|
+
"#0B603D",
|
|
535
|
+
"#0B603D"
|
|
536
|
+
],
|
|
537
|
+
[
|
|
538
|
+
"--color-data-shamrock-4",
|
|
539
|
+
"#138546",
|
|
540
|
+
"#138546"
|
|
541
|
+
],
|
|
542
|
+
[
|
|
543
|
+
"--color-data-shamrock-3",
|
|
544
|
+
"#24BB5E",
|
|
545
|
+
"#24BB5E"
|
|
546
|
+
],
|
|
547
|
+
[
|
|
548
|
+
"--color-data-shamrock-2",
|
|
549
|
+
"#8EF7AA",
|
|
550
|
+
"#8EF7AA"
|
|
551
|
+
],
|
|
552
|
+
[
|
|
553
|
+
"--color-data-shamrock-1",
|
|
554
|
+
"#D6FEE4",
|
|
555
|
+
"#D6FEE4"
|
|
556
|
+
],
|
|
557
|
+
[
|
|
558
|
+
"--color-data-orange-5",
|
|
559
|
+
"#A13F04",
|
|
560
|
+
"#A13F04"
|
|
561
|
+
],
|
|
562
|
+
[
|
|
563
|
+
"--color-data-orange-4",
|
|
564
|
+
"#D66100",
|
|
565
|
+
"#D66100"
|
|
566
|
+
],
|
|
567
|
+
[
|
|
568
|
+
"--color-data-orange-3",
|
|
569
|
+
"#FD9537",
|
|
570
|
+
"#FD9537"
|
|
571
|
+
],
|
|
572
|
+
[
|
|
573
|
+
"--color-data-orange-2",
|
|
574
|
+
"#FDB876",
|
|
575
|
+
"#FDB876"
|
|
576
|
+
],
|
|
577
|
+
[
|
|
578
|
+
"--color-data-orange-1",
|
|
579
|
+
"#FFE6CF",
|
|
580
|
+
"#FFE6CF"
|
|
581
|
+
],
|
|
582
|
+
[
|
|
583
|
+
"--color-data-pink-5",
|
|
584
|
+
"#8E1073",
|
|
585
|
+
"#8E1073"
|
|
586
|
+
],
|
|
587
|
+
[
|
|
588
|
+
"--color-data-pink-4",
|
|
589
|
+
"#D123A1",
|
|
590
|
+
"#D123A1"
|
|
591
|
+
],
|
|
592
|
+
[
|
|
593
|
+
"--color-data-pink-3",
|
|
594
|
+
"#F989D3",
|
|
595
|
+
"#F989D3"
|
|
596
|
+
],
|
|
597
|
+
[
|
|
598
|
+
"--color-data-pink-2",
|
|
599
|
+
"#FEADE3",
|
|
600
|
+
"#FEADE3"
|
|
601
|
+
],
|
|
602
|
+
[
|
|
603
|
+
"--color-data-pink-1",
|
|
604
|
+
"#FCE3F4",
|
|
605
|
+
"#FCE3F4"
|
|
606
|
+
],
|
|
607
|
+
[
|
|
608
|
+
"--color-data-purple-5",
|
|
609
|
+
"#3E0697",
|
|
610
|
+
"#3E0697"
|
|
611
|
+
],
|
|
612
|
+
[
|
|
613
|
+
"--color-data-purple-4",
|
|
614
|
+
"#6B1EFD",
|
|
615
|
+
"#6B1EFD"
|
|
616
|
+
],
|
|
617
|
+
[
|
|
618
|
+
"--color-data-purple-3",
|
|
619
|
+
"#9081FF",
|
|
620
|
+
"#9081FF"
|
|
621
|
+
],
|
|
622
|
+
[
|
|
623
|
+
"--color-data-purple-2",
|
|
624
|
+
"#B3B0FE",
|
|
625
|
+
"#B3B0FE"
|
|
626
|
+
],
|
|
627
|
+
[
|
|
628
|
+
"--color-data-purple-1",
|
|
629
|
+
"#E8E8FB",
|
|
630
|
+
"#E8E8FB"
|
|
631
|
+
],
|
|
632
|
+
[
|
|
633
|
+
"--color-data-red-5",
|
|
634
|
+
"#9D0519",
|
|
635
|
+
"#9D0519"
|
|
636
|
+
],
|
|
637
|
+
[
|
|
638
|
+
"--color-data-red-4",
|
|
639
|
+
"#D31130",
|
|
640
|
+
"#D31130"
|
|
641
|
+
],
|
|
642
|
+
[
|
|
643
|
+
"--color-data-red-3",
|
|
644
|
+
"#FB7D87",
|
|
645
|
+
"#FB7D87"
|
|
646
|
+
],
|
|
647
|
+
[
|
|
648
|
+
"--color-data-red-2",
|
|
649
|
+
"#FFB2B8",
|
|
650
|
+
"#FFB2B8"
|
|
651
|
+
],
|
|
652
|
+
[
|
|
653
|
+
"--color-data-red-1",
|
|
654
|
+
"#FEE4E6",
|
|
655
|
+
"#FEE4E6"
|
|
656
|
+
],
|
|
657
|
+
[
|
|
658
|
+
"--color-data-teal-5",
|
|
659
|
+
"#08767D",
|
|
660
|
+
"#08767D"
|
|
661
|
+
],
|
|
662
|
+
[
|
|
663
|
+
"--color-data-teal-4",
|
|
664
|
+
"#0C9293",
|
|
665
|
+
"#0C9293"
|
|
666
|
+
],
|
|
667
|
+
[
|
|
668
|
+
"--color-data-teal-3",
|
|
669
|
+
"#0DB7AF",
|
|
670
|
+
"#0DB7AF"
|
|
671
|
+
],
|
|
672
|
+
[
|
|
673
|
+
"--color-data-teal-2",
|
|
674
|
+
"#6CE6D8",
|
|
675
|
+
"#6CE6D8"
|
|
676
|
+
],
|
|
677
|
+
[
|
|
678
|
+
"--color-data-teal-1",
|
|
679
|
+
"#D7FCF8",
|
|
680
|
+
"#D7FCF8"
|
|
681
|
+
],
|
|
682
|
+
[
|
|
683
|
+
"--color-data-yellow-5",
|
|
684
|
+
"#8A5001",
|
|
685
|
+
"#8A5001"
|
|
686
|
+
],
|
|
687
|
+
[
|
|
688
|
+
"--color-data-yellow-4",
|
|
689
|
+
"#D69804",
|
|
690
|
+
"#D69804"
|
|
691
|
+
],
|
|
692
|
+
[
|
|
693
|
+
"--color-data-yellow-3",
|
|
694
|
+
"#FBCE03",
|
|
695
|
+
"#FBCE03"
|
|
696
|
+
],
|
|
697
|
+
[
|
|
698
|
+
"--color-data-yellow-2",
|
|
699
|
+
"#FCEC85",
|
|
700
|
+
"#FCEC85"
|
|
701
|
+
],
|
|
702
|
+
[
|
|
703
|
+
"--color-data-yellow-1",
|
|
704
|
+
"#FDF6BA",
|
|
705
|
+
"#FDF6BA"
|
|
706
|
+
],
|
|
707
|
+
[
|
|
708
|
+
"--color-data-gray-5",
|
|
709
|
+
"#25363F",
|
|
710
|
+
"#333338"
|
|
711
|
+
],
|
|
712
|
+
[
|
|
713
|
+
"--color-data-gray-4",
|
|
714
|
+
"#5D6C7B",
|
|
715
|
+
"#666A72"
|
|
716
|
+
],
|
|
717
|
+
[
|
|
718
|
+
"--color-data-gray-3",
|
|
719
|
+
"#AFB9C4",
|
|
720
|
+
"#B2B8BE"
|
|
721
|
+
],
|
|
722
|
+
[
|
|
723
|
+
"--color-data-gray-2",
|
|
724
|
+
"#CCD3DB",
|
|
725
|
+
"#D0D3D6"
|
|
726
|
+
],
|
|
727
|
+
[
|
|
728
|
+
"--color-data-gray-1",
|
|
729
|
+
"#F1F4F7",
|
|
730
|
+
"#F2F4F6"
|
|
731
|
+
]
|
|
732
|
+
]
|
|
733
|
+
}
|
|
734
|
+
],
|
|
735
|
+
"previewType": "swatch"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"title": "Syntax Tokens",
|
|
739
|
+
"content": [
|
|
740
|
+
{
|
|
741
|
+
"type": "prose",
|
|
742
|
+
"text": "Code highlighting colors used by CodeBlock. Each defaults to a palette token, so syntax colors follow the theme; defineTheme({syntax}) sets a syntax theme instead."
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
"type": "table",
|
|
746
|
+
"headers": [
|
|
747
|
+
"Token",
|
|
748
|
+
"Value"
|
|
749
|
+
],
|
|
750
|
+
"rows": [
|
|
751
|
+
[
|
|
752
|
+
"--color-syntax-keyword",
|
|
753
|
+
"var(--color-text-accent)"
|
|
754
|
+
],
|
|
755
|
+
[
|
|
756
|
+
"--color-syntax-string",
|
|
757
|
+
"var(--color-text-green)"
|
|
758
|
+
],
|
|
759
|
+
[
|
|
760
|
+
"--color-syntax-comment",
|
|
761
|
+
"var(--color-text-secondary)"
|
|
762
|
+
],
|
|
763
|
+
[
|
|
764
|
+
"--color-syntax-number",
|
|
765
|
+
"var(--color-text-orange)"
|
|
766
|
+
],
|
|
767
|
+
[
|
|
768
|
+
"--color-syntax-function",
|
|
769
|
+
"var(--color-text-blue)"
|
|
770
|
+
],
|
|
771
|
+
[
|
|
772
|
+
"--color-syntax-type",
|
|
773
|
+
"var(--color-text-purple)"
|
|
774
|
+
],
|
|
775
|
+
[
|
|
776
|
+
"--color-syntax-variable",
|
|
777
|
+
"var(--color-text-primary)"
|
|
778
|
+
],
|
|
779
|
+
[
|
|
780
|
+
"--color-syntax-operator",
|
|
781
|
+
"var(--color-text-cyan)"
|
|
782
|
+
],
|
|
783
|
+
[
|
|
784
|
+
"--color-syntax-constant",
|
|
785
|
+
"var(--color-text-orange)"
|
|
786
|
+
],
|
|
787
|
+
[
|
|
788
|
+
"--color-syntax-tag",
|
|
789
|
+
"var(--color-text-red)"
|
|
790
|
+
],
|
|
791
|
+
[
|
|
792
|
+
"--color-syntax-attribute",
|
|
793
|
+
"var(--color-text-teal)"
|
|
794
|
+
],
|
|
795
|
+
[
|
|
796
|
+
"--color-syntax-property",
|
|
797
|
+
"var(--color-text-cyan)"
|
|
798
|
+
],
|
|
799
|
+
[
|
|
800
|
+
"--color-syntax-punctuation",
|
|
801
|
+
"var(--color-text-secondary)"
|
|
802
|
+
],
|
|
803
|
+
[
|
|
804
|
+
"--color-syntax-background",
|
|
805
|
+
"var(--color-background-muted)"
|
|
806
|
+
]
|
|
807
|
+
]
|
|
808
|
+
}
|
|
809
|
+
],
|
|
810
|
+
"previewType": "swatch"
|
|
811
|
+
},
|
|
431
812
|
{
|
|
432
813
|
"title": "Spacing Tokens",
|
|
433
814
|
"content": [
|
|
@@ -1098,7 +1479,7 @@ export const docs = {
|
|
|
1098
1479
|
"type": "code",
|
|
1099
1480
|
"lang": "tsx",
|
|
1100
1481
|
"label": "Using token imports",
|
|
1101
|
-
"code": "import * as stylex from '@stylexjs/stylex';\nimport {colorVars, spacingVars, sizeVars, radiusVars} from '@astryxdesign/core';\n\nconst styles = stylex.create({\n card: {\n padding: spacingVars['--spacing-4'],\n backgroundColor: colorVars['--color-background-surface'],\n borderRadius: radiusVars['--radius-container'],\n },\n button: {\n height: sizeVars['--size-element-md'],\n },\n});"
|
|
1482
|
+
"code": "import * as stylex from '@stylexjs/stylex';\nimport {colorVars, spacingVars, sizeVars, radiusVars} from '@astryxdesign/core/theme/tokens.stylex';\n\nconst styles = stylex.create({\n card: {\n padding: spacingVars['--spacing-4'],\n backgroundColor: colorVars['--color-background-surface'],\n borderRadius: radiusVars['--radius-container'],\n },\n button: {\n height: sizeVars['--size-element-md'],\n },\n});"
|
|
1102
1483
|
},
|
|
1103
1484
|
{
|
|
1104
1485
|
"type": "prose",
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
/** @type {import('@astryxdesign/cli/authoring').ReferenceTranslationDoc} */
|
|
4
4
|
|
|
5
5
|
export const docsZh = {
|
|
6
|
-
description: '
|
|
6
|
+
description: '颜色、数据可视化、语法高亮、间距、尺寸、圆角、阴影、动效和排版设计令牌参考。',
|
|
7
7
|
sections: [
|
|
8
8
|
{ section: 'Color Tokens', title: '颜色令牌', content: [{ type: 'prose', text: '语义化颜色,支持 light-dark() 自动切换模式。' }, null, null, null] },
|
|
9
|
-
{ section: 'Spacing Tokens', title: '间距令牌', content: [{ type: 'prose', text: '
|
|
9
|
+
{ section: 'Spacing Tokens', title: '间距令牌', content: [{ type: 'prose', text: '用于内边距、间距和外边距的刻度。组件 gap 属性接受步长 0、0.5、1、1.5、2、3、4、5、6、8、10。' }, null] },
|
|
10
10
|
{ section: 'Size Tokens', title: '尺寸令牌', content: [{ type: 'prose', text: '控制按钮、输入框和选择器的一致高度。' }, null] },
|
|
11
11
|
{ section: 'Radius Tokens', title: '圆角令牌', content: [null] },
|
|
12
12
|
{ section: 'Shadow Tokens', title: '阴影令牌', content: [null] },
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file `astryx docs cli/integrations/components/add-a-component`: choose a
|
|
5
|
+
* component name and generate its first source and doc files.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
|
|
9
|
+
export const docs = {
|
|
10
|
+
type: 'generic',
|
|
11
|
+
name: 'add-a-component',
|
|
12
|
+
placement: {parent: 'namespace:components', slot: 'guides', order: 10},
|
|
13
|
+
title: 'Add a component',
|
|
14
|
+
category: 'guide',
|
|
15
|
+
description:
|
|
16
|
+
'Choose a stable component name and generate its source, doc, package export, and integration entry.',
|
|
17
|
+
sections: [
|
|
18
|
+
{
|
|
19
|
+
id: 'pick-a-component-name',
|
|
20
|
+
title: 'Pick a component name',
|
|
21
|
+
content: [
|
|
22
|
+
{
|
|
23
|
+
type: 'prose',
|
|
24
|
+
text: 'Choose a unique PascalCase name, such as `AcmeCarousel`. The name is the component\'s public export and CLI identity, so keep it stable. Use `displayName` when you only want to change the label people read.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: 'list',
|
|
28
|
+
style: 'unordered',
|
|
29
|
+
items: [
|
|
30
|
+
'Prefer a name that describes the component\'s purpose in your product.',
|
|
31
|
+
'Avoid a Core component name unless you are deliberately replacing that component.',
|
|
32
|
+
'If replacement is truly required, read {@link generic:replace-a-core-component}.',
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'run-the-add-command',
|
|
39
|
+
title: 'Run the add command',
|
|
40
|
+
content: [
|
|
41
|
+
{
|
|
42
|
+
type: 'prose',
|
|
43
|
+
text: 'Run `integration add component` in your package with the name. It writes the component, its doc file, and the public import apps use.',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: 'code',
|
|
47
|
+
lang: 'bash',
|
|
48
|
+
code: 'npx astryx integration add component AcmeCarousel',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: 'code',
|
|
52
|
+
lang: 'text',
|
|
53
|
+
code: `component contribution added
|
|
54
|
+
|
|
55
|
+
[ok] AcmeCarousel
|
|
56
|
+
|
|
57
|
+
Declare component root ./components in astryx.integration.mjs.
|
|
58
|
+
|
|
59
|
+
- components/AcmeCarousel.doc.mjs
|
|
60
|
+
- components/AcmeCarousel.tsx
|
|
61
|
+
- package.json
|
|
62
|
+
- astryx.integration.mjs`,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: 'prose',
|
|
66
|
+
text: '`integration add` starts with one source export and one single-component `.doc.mjs`. Keep that shape for one public component. If the source exposes a family, choose the correct shape in {@link namespace:describe-the-component}.',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
type: 'prose',
|
|
70
|
+
text: 'Add never overwrites a file, and `--dry-run` shows what it would write. Component commands read Core, so install `@astryxdesign/core` in the package first ({@link generic:quick-start}).',
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file `astryx docs cli/integrations/building-blocks/themes/add-a-theme`:
|
|
5
|
+
* scaffold a theme in a package — blank, or forked from an existing theme.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
|
|
9
|
+
export const docs = {
|
|
10
|
+
type: 'generic',
|
|
11
|
+
name: 'add-a-theme',
|
|
12
|
+
placement: {parent: 'namespace:themes', slot: 'guides', order: 10},
|
|
13
|
+
title: 'Add a theme',
|
|
14
|
+
category: 'guide',
|
|
15
|
+
description:
|
|
16
|
+
'Scaffold a theme in your package — blank, or forked from an existing theme.',
|
|
17
|
+
sections: [
|
|
18
|
+
{
|
|
19
|
+
id: 'add-a-theme',
|
|
20
|
+
title: 'Add a theme',
|
|
21
|
+
content: [
|
|
22
|
+
{
|
|
23
|
+
type: 'prose',
|
|
24
|
+
text: 'Run `integration add theme` with a lowercase kebab-case slug. It writes a blank theme — a `defineTheme` skeleton and its descriptor — into a folder named after the slug.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: 'code',
|
|
28
|
+
lang: 'bash',
|
|
29
|
+
code: 'npx astryx integration add theme ocean',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: 'code',
|
|
33
|
+
lang: 'text',
|
|
34
|
+
code: `theme contribution added
|
|
35
|
+
|
|
36
|
+
[ok] ocean
|
|
37
|
+
|
|
38
|
+
Declare theme root ./themes in astryx.integration.mjs.
|
|
39
|
+
|
|
40
|
+
- themes/ocean/oceanTheme.ts
|
|
41
|
+
- themes/ocean/oceanTheme.doc.mjs
|
|
42
|
+
- package.json
|
|
43
|
+
- astryx.integration.mjs`,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: 'prose',
|
|
47
|
+
text: "`oceanTheme.ts` exports `oceanTheme`, a `defineTheme` source. `oceanTheme.doc.mjs` describes it with `type: 'theme'`, `name`, `displayName`, `description`, and `maintained`; `theme list` shows its `name`, `description`, and `maintained`. Every field is in {@link generic:authoring}.",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: 'prose',
|
|
51
|
+
text: 'The source ships in your package. An app installs the package and applies the theme — it is not copied; see {@link generic:use-a-theme-in-an-app}.',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 'start-from-an-existing-theme',
|
|
57
|
+
title: 'Start from an existing theme',
|
|
58
|
+
content: [
|
|
59
|
+
{
|
|
60
|
+
type: 'prose',
|
|
61
|
+
text: 'To begin from an existing theme instead of a blank one, pass `--from`. It copies that theme as your starting point to diverge from — a fork, with no link back.',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: 'code',
|
|
65
|
+
lang: 'bash',
|
|
66
|
+
code: 'npx astryx integration add theme ocean --from neutral',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
type: 'prose',
|
|
70
|
+
text: 'Use `--from` when you want to change a lot. For a small change that should stay linked to a base theme, use `extends` instead ({@link generic:define-the-theme}).',
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 'ship-several-themes',
|
|
76
|
+
title: 'Ship several themes',
|
|
77
|
+
content: [
|
|
78
|
+
{
|
|
79
|
+
type: 'prose',
|
|
80
|
+
text: 'A package can ship more than one theme. Run `integration add theme` once per slug; each theme gets its own folder and descriptor, and `theme list` shows them all.',
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
};
|