@iksnerd/blazon 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +259 -2
- package/THIRD-PARTY-NOTICES.md +60 -0
- package/bin/blazon.js +4 -0
- package/dist/builder/site-builder.d.ts +10 -0
- package/dist/builder/site-builder.d.ts.map +1 -0
- package/dist/chunks/site-builder-CPfjBOmR.js +13804 -0
- package/dist/cli/commands/approvals.d.ts +8 -0
- package/dist/cli/commands/approvals.d.ts.map +1 -0
- package/dist/cli/commands/build.d.ts +8 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/check.d.ts +33 -0
- package/dist/cli/commands/check.d.ts.map +1 -0
- package/dist/cli/commands/cwd.d.ts +14 -0
- package/dist/cli/commands/cwd.d.ts.map +1 -0
- package/dist/cli/commands/dev.d.ts +5 -0
- package/dist/cli/commands/dev.d.ts.map +1 -0
- package/dist/cli/commands/doctor.d.ts +34 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/drift.d.ts +11 -0
- package/dist/cli/commands/drift.d.ts.map +1 -0
- package/dist/cli/commands/explain.d.ts +5 -0
- package/dist/cli/commands/explain.d.ts.map +1 -0
- package/dist/cli/commands/init.d.ts +46 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/mcp-check.d.ts +57 -0
- package/dist/cli/commands/mcp-check.d.ts.map +1 -0
- package/dist/cli/commands/mcp.d.ts +13 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/pin.d.ts +7 -0
- package/dist/cli/commands/pin.d.ts.map +1 -0
- package/dist/cli/commands/plugin.d.ts +32 -0
- package/dist/cli/commands/plugin.d.ts.map +1 -0
- package/dist/cli/commands/preview.d.ts +5 -0
- package/dist/cli/commands/preview.d.ts.map +1 -0
- package/dist/cli/commands/tokens.d.ts +5 -0
- package/dist/cli/commands/tokens.d.ts.map +1 -0
- package/dist/cli/errors.d.ts +53 -0
- package/dist/cli/errors.d.ts.map +1 -0
- package/dist/cli/handlers/brand.d.ts +7 -0
- package/dist/cli/handlers/brand.d.ts.map +1 -0
- package/dist/cli/handlers/can.d.ts +7 -0
- package/dist/cli/handlers/can.d.ts.map +1 -0
- package/dist/cli/handlers/fonts.d.ts +4 -0
- package/dist/cli/handlers/fonts.d.ts.map +1 -0
- package/dist/cli/handlers/get.d.ts +7 -0
- package/dist/cli/handlers/get.d.ts.map +1 -0
- package/dist/cli/handlers/index.d.ts +8 -0
- package/dist/cli/handlers/index.d.ts.map +1 -0
- package/dist/cli/handlers/list.d.ts +7 -0
- package/dist/cli/handlers/list.d.ts.map +1 -0
- package/dist/cli/handlers/logo.d.ts +4 -0
- package/dist/cli/handlers/logo.d.ts.map +1 -0
- package/dist/cli/handlers/rules.d.ts +10 -0
- package/dist/cli/handlers/rules.d.ts.map +1 -0
- package/dist/cli/handlers/types.d.ts +17 -0
- package/dist/cli/handlers/types.d.ts.map +1 -0
- package/dist/cli/help.d.ts +18 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +3850 -0
- package/dist/cli/init-flow.d.ts +24 -0
- package/dist/cli/init-flow.d.ts.map +1 -0
- package/dist/cli/init-ui.d.ts +20 -0
- package/dist/cli/init-ui.d.ts.map +1 -0
- package/dist/cli/json.d.ts +18 -0
- package/dist/cli/json.d.ts.map +1 -0
- package/dist/cli/operations.d.ts +11 -0
- package/dist/cli/operations.d.ts.map +1 -0
- package/dist/cli/options.d.ts +8 -0
- package/dist/cli/options.d.ts.map +1 -0
- package/dist/cli/project.d.ts +8 -0
- package/dist/cli/project.d.ts.map +1 -0
- package/dist/cli/read.d.ts +13 -0
- package/dist/cli/read.d.ts.map +1 -0
- package/dist/cli/where.d.ts +10 -0
- package/dist/cli/where.d.ts.map +1 -0
- package/dist/core/assets/categories.d.ts +47 -0
- package/dist/core/assets/categories.d.ts.map +1 -0
- package/dist/core/assets/fields.d.ts +12 -0
- package/dist/core/assets/fields.d.ts.map +1 -0
- package/dist/core/assets/image-size.d.ts +10 -0
- package/dist/core/assets/image-size.d.ts.map +1 -0
- package/dist/core/assets/measure.d.ts +22 -0
- package/dist/core/assets/measure.d.ts.map +1 -0
- package/dist/core/assets/scanner.d.ts +26 -0
- package/dist/core/assets/scanner.d.ts.map +1 -0
- package/dist/core/assets/sidecar.d.ts +22 -0
- package/dist/core/assets/sidecar.d.ts.map +1 -0
- package/dist/core/blazon-pin.d.ts +36 -0
- package/dist/core/blazon-pin.d.ts.map +1 -0
- package/dist/core/brand/export.d.ts +128 -0
- package/dist/core/brand/export.d.ts.map +1 -0
- package/dist/core/brand/schema.d.ts +1000 -0
- package/dist/core/brand/schema.d.ts.map +1 -0
- package/dist/core/brand-theme.d.ts +16 -0
- package/dist/core/brand-theme.d.ts.map +1 -0
- package/dist/core/checker/approvals.d.ts +15 -0
- package/dist/core/checker/approvals.d.ts.map +1 -0
- package/dist/core/checker/cascade.d.ts +8 -0
- package/dist/core/checker/cascade.d.ts.map +1 -0
- package/dist/core/checker/catalogue.d.ts +609 -0
- package/dist/core/checker/catalogue.d.ts.map +1 -0
- package/dist/core/checker/contrast.d.ts +30 -0
- package/dist/core/checker/contrast.d.ts.map +1 -0
- package/dist/core/checker/duplicates.d.ts +3 -0
- package/dist/core/checker/duplicates.d.ts.map +1 -0
- package/dist/core/checker/fixes.d.ts +6 -0
- package/dist/core/checker/fixes.d.ts.map +1 -0
- package/dist/core/checker/font-meta.d.ts +8 -0
- package/dist/core/checker/font-meta.d.ts.map +1 -0
- package/dist/core/checker/index.d.ts +23 -0
- package/dist/core/checker/index.d.ts.map +1 -0
- package/dist/core/checker/location.d.ts +7 -0
- package/dist/core/checker/location.d.ts.map +1 -0
- package/dist/core/checker/logo-rules.d.ts +19 -0
- package/dist/core/checker/logo-rules.d.ts.map +1 -0
- package/dist/core/checker/logo-surfaces.d.ts +7 -0
- package/dist/core/checker/logo-surfaces.d.ts.map +1 -0
- package/dist/core/checker/page-tokens.d.ts +5 -0
- package/dist/core/checker/page-tokens.d.ts.map +1 -0
- package/dist/core/checker/print.d.ts +9 -0
- package/dist/core/checker/print.d.ts.map +1 -0
- package/dist/core/checker/proportion.d.ts +3 -0
- package/dist/core/checker/proportion.d.ts.map +1 -0
- package/dist/core/checker/review.d.ts +40 -0
- package/dist/core/checker/review.d.ts.map +1 -0
- package/dist/core/checker/source.d.ts +4 -0
- package/dist/core/checker/source.d.ts.map +1 -0
- package/dist/core/checker/spdx.d.ts +8 -0
- package/dist/core/checker/spdx.d.ts.map +1 -0
- package/dist/core/checker/tier.d.ts +3 -0
- package/dist/core/checker/tier.d.ts.map +1 -0
- package/dist/core/checker/usage.d.ts +4 -0
- package/dist/core/checker/usage.d.ts.map +1 -0
- package/dist/core/checker/variables.d.ts +8 -0
- package/dist/core/checker/variables.d.ts.map +1 -0
- package/dist/core/colors.d.ts +10 -0
- package/dist/core/colors.d.ts.map +1 -0
- package/dist/core/config/defaults.d.ts +3 -0
- package/dist/core/config/defaults.d.ts.map +1 -0
- package/dist/core/config/index.d.ts +15 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/validate.d.ts +21 -0
- package/dist/core/config/validate.d.ts.map +1 -0
- package/dist/core/config/vocabulary.d.ts +10 -0
- package/dist/core/config/vocabulary.d.ts.map +1 -0
- package/dist/core/confine.d.ts +25 -0
- package/dist/core/confine.d.ts.map +1 -0
- package/dist/core/docs/directives.d.ts +161 -0
- package/dist/core/docs/directives.d.ts.map +1 -0
- package/dist/core/docs/parser.d.ts +7 -0
- package/dist/core/docs/parser.d.ts.map +1 -0
- package/dist/core/docs/sections.d.ts +11 -0
- package/dist/core/docs/sections.d.ts.map +1 -0
- package/dist/core/drift/compare.d.ts +30 -0
- package/dist/core/drift/compare.d.ts.map +1 -0
- package/dist/core/drift/read.d.ts +22 -0
- package/dist/core/drift/read.d.ts.map +1 -0
- package/dist/core/email-signature.d.ts +35 -0
- package/dist/core/email-signature.d.ts.map +1 -0
- package/dist/core/emit.d.ts +22 -0
- package/dist/core/emit.d.ts.map +1 -0
- package/dist/core/fonts.d.ts +43 -0
- package/dist/core/fonts.d.ts.map +1 -0
- package/dist/core/icons/icon-sets.d.ts +22 -0
- package/dist/core/icons/icon-sets.d.ts.map +1 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/init/answers.d.ts +45 -0
- package/dist/core/init/answers.d.ts.map +1 -0
- package/dist/core/init/from-site/apply.d.ts +7 -0
- package/dist/core/init/from-site/apply.d.ts.map +1 -0
- package/dist/core/init/from-site/clean-colors.d.ts +21 -0
- package/dist/core/init/from-site/clean-colors.d.ts.map +1 -0
- package/dist/core/init/from-site/colors.d.ts +10 -0
- package/dist/core/init/from-site/colors.d.ts.map +1 -0
- package/dist/core/init/from-site/context.d.ts +24 -0
- package/dist/core/init/from-site/context.d.ts.map +1 -0
- package/dist/core/init/from-site/fonts.d.ts +10 -0
- package/dist/core/init/from-site/fonts.d.ts.map +1 -0
- package/dist/core/init/from-site/html.d.ts +10 -0
- package/dist/core/init/from-site/html.d.ts.map +1 -0
- package/dist/core/init/from-site/index.d.ts +6 -0
- package/dist/core/init/from-site/index.d.ts.map +1 -0
- package/dist/core/init/from-site/inspect.d.ts +4 -0
- package/dist/core/init/from-site/inspect.d.ts.map +1 -0
- package/dist/core/init/from-site/logo.d.ts +20 -0
- package/dist/core/init/from-site/logo.d.ts.map +1 -0
- package/dist/core/init/from-site/sections/colors.d.ts +4 -0
- package/dist/core/init/from-site/sections/colors.d.ts.map +1 -0
- package/dist/core/init/from-site/sections/config.d.ts +10 -0
- package/dist/core/init/from-site/sections/config.d.ts.map +1 -0
- package/dist/core/init/from-site/sections/directives.d.ts +3 -0
- package/dist/core/init/from-site/sections/directives.d.ts.map +1 -0
- package/dist/core/init/from-site/sections/fonts.d.ts +8 -0
- package/dist/core/init/from-site/sections/fonts.d.ts.map +1 -0
- package/dist/core/init/from-site/sections/intro.d.ts +4 -0
- package/dist/core/init/from-site/sections/intro.d.ts.map +1 -0
- package/dist/core/init/from-site/sections/logo.d.ts +9 -0
- package/dist/core/init/from-site/sections/logo.d.ts.map +1 -0
- package/dist/core/init/from-site/sections/placeholder.d.ts +5 -0
- package/dist/core/init/from-site/sections/placeholder.d.ts.map +1 -0
- package/dist/core/init/from-site/tree.d.ts +14 -0
- package/dist/core/init/from-site/tree.d.ts.map +1 -0
- package/dist/core/init/from-site/types.d.ts +37 -0
- package/dist/core/init/from-site/types.d.ts.map +1 -0
- package/dist/core/init/palette.d.ts +34 -0
- package/dist/core/init/palette.d.ts.map +1 -0
- package/dist/core/init/prompts.d.ts +78 -0
- package/dist/core/init/prompts.d.ts.map +1 -0
- package/dist/core/init/shared/google-fonts.d.ts +4 -0
- package/dist/core/init/shared/google-fonts.d.ts.map +1 -0
- package/dist/core/init/shared/hex.d.ts +6 -0
- package/dist/core/init/shared/hex.d.ts.map +1 -0
- package/dist/core/init/shared/svg.d.ts +3 -0
- package/dist/core/init/shared/svg.d.ts.map +1 -0
- package/dist/core/init/vocabulary.d.ts +42 -0
- package/dist/core/init/vocabulary.d.ts.map +1 -0
- package/dist/core/inputs.d.ts +25 -0
- package/dist/core/inputs.d.ts.map +1 -0
- package/dist/core/logo/lockup.d.ts +54 -0
- package/dist/core/logo/lockup.d.ts.map +1 -0
- package/dist/core/logo.d.ts +23 -0
- package/dist/core/logo.d.ts.map +1 -0
- package/dist/core/mcp-config.d.ts +65 -0
- package/dist/core/mcp-config.d.ts.map +1 -0
- package/dist/core/operations/check.d.ts +8 -0
- package/dist/core/operations/check.d.ts.map +1 -0
- package/dist/core/operations/index.d.ts +7 -0
- package/dist/core/operations/index.d.ts.map +1 -0
- package/dist/core/operations/limits.d.ts +6 -0
- package/dist/core/operations/limits.d.ts.map +1 -0
- package/dist/core/operations/list.d.ts +8 -0
- package/dist/core/operations/list.d.ts.map +1 -0
- package/dist/core/operations/project.d.ts +10 -0
- package/dist/core/operations/project.d.ts.map +1 -0
- package/dist/core/operations/types.d.ts +96 -0
- package/dist/core/operations/types.d.ts.map +1 -0
- package/dist/core/operations/validate.d.ts +4 -0
- package/dist/core/operations/validate.d.ts.map +1 -0
- package/dist/core/order.d.ts +9 -0
- package/dist/core/order.d.ts.map +1 -0
- package/dist/core/outputs.d.ts +22 -0
- package/dist/core/outputs.d.ts.map +1 -0
- package/dist/core/package-name.d.ts +3 -0
- package/dist/core/package-name.d.ts.map +1 -0
- package/dist/core/package-root.d.ts +3 -0
- package/dist/core/package-root.d.ts.map +1 -0
- package/dist/core/plugin-name.d.ts +27 -0
- package/dist/core/plugin-name.d.ts.map +1 -0
- package/dist/core/preflight.d.ts +10 -0
- package/dist/core/preflight.d.ts.map +1 -0
- package/dist/core/read/can.d.ts +44 -0
- package/dist/core/read/can.d.ts.map +1 -0
- package/dist/core/read/fonts.d.ts +47 -0
- package/dist/core/read/fonts.d.ts.map +1 -0
- package/dist/core/read/index.d.ts +8 -0
- package/dist/core/read/index.d.ts.map +1 -0
- package/dist/core/read/list.d.ts +28 -0
- package/dist/core/read/list.d.ts.map +1 -0
- package/dist/core/read/logo.d.ts +34 -0
- package/dist/core/read/logo.d.ts.map +1 -0
- package/dist/core/read/lookup.d.ts +9 -0
- package/dist/core/read/lookup.d.ts.map +1 -0
- package/dist/core/read/rules.d.ts +80 -0
- package/dist/core/read/rules.d.ts.map +1 -0
- package/dist/core/read/token.d.ts +46 -0
- package/dist/core/read/token.d.ts.map +1 -0
- package/dist/core/shipped-names.d.ts +9 -0
- package/dist/core/shipped-names.d.ts.map +1 -0
- package/dist/core/starter.d.ts +31 -0
- package/dist/core/starter.d.ts.map +1 -0
- package/dist/core/suggest.d.ts +7 -0
- package/dist/core/suggest.d.ts.map +1 -0
- package/dist/core/tokens/alias.d.ts +18 -0
- package/dist/core/tokens/alias.d.ts.map +1 -0
- package/dist/core/tokens/contexts.d.ts +10 -0
- package/dist/core/tokens/contexts.d.ts.map +1 -0
- package/dist/core/tokens/formatters/css.d.ts +15 -0
- package/dist/core/tokens/formatters/css.d.ts.map +1 -0
- package/dist/core/tokens/formatters/json.d.ts +4 -0
- package/dist/core/tokens/formatters/json.d.ts.map +1 -0
- package/dist/core/tokens/formatters/tailwind.d.ts +37 -0
- package/dist/core/tokens/formatters/tailwind.d.ts.map +1 -0
- package/dist/core/tokens/formatters/ts.d.ts +6 -0
- package/dist/core/tokens/formatters/ts.d.ts.map +1 -0
- package/dist/core/tokens/groups.d.ts +44 -0
- package/dist/core/tokens/groups.d.ts.map +1 -0
- package/dist/core/tokens/key-lines.d.ts +8 -0
- package/dist/core/tokens/key-lines.d.ts.map +1 -0
- package/dist/core/tokens/load.d.ts +12 -0
- package/dist/core/tokens/load.d.ts.map +1 -0
- package/dist/core/tokens/merge.d.ts +17 -0
- package/dist/core/tokens/merge.d.ts.map +1 -0
- package/dist/core/tokens/names.d.ts +5 -0
- package/dist/core/tokens/names.d.ts.map +1 -0
- package/dist/core/tokens/resolve.d.ts +8 -0
- package/dist/core/tokens/resolve.d.ts.map +1 -0
- package/dist/core/tokens/resolver/compile.d.ts +17 -0
- package/dist/core/tokens/resolver/compile.d.ts.map +1 -0
- package/dist/core/tokens/resolver/inputs.d.ts +7 -0
- package/dist/core/tokens/resolver/inputs.d.ts.map +1 -0
- package/dist/core/tokens/resolver/parse.d.ts +34 -0
- package/dist/core/tokens/resolver/parse.d.ts.map +1 -0
- package/dist/core/tokens/resolver/sources.d.ts +17 -0
- package/dist/core/tokens/resolver/sources.d.ts.map +1 -0
- package/dist/core/tokens/shadcn.d.ts +43 -0
- package/dist/core/tokens/shadcn.d.ts.map +1 -0
- package/dist/core/tokens/theme.d.ts +17 -0
- package/dist/core/tokens/theme.d.ts.map +1 -0
- package/dist/core/tokens/values/color.d.ts +2 -0
- package/dist/core/tokens/values/color.d.ts.map +1 -0
- package/dist/core/tokens/values/composite.d.ts +7 -0
- package/dist/core/tokens/values/composite.d.ts.map +1 -0
- package/dist/core/tokens/values/font.d.ts +3 -0
- package/dist/core/tokens/values/font.d.ts.map +1 -0
- package/dist/core/tokens/values/index.d.ts +9 -0
- package/dist/core/tokens/values/index.d.ts.map +1 -0
- package/dist/core/tokens/values/shared.d.ts +5 -0
- package/dist/core/tokens/values/shared.d.ts.map +1 -0
- package/dist/core/tokens/values/simple.d.ts +3 -0
- package/dist/core/tokens/values/simple.d.ts.map +1 -0
- package/dist/core/tokens/values/units.d.ts +3 -0
- package/dist/core/tokens/values/units.d.ts.map +1 -0
- package/dist/core/tokens/walk.d.ts +30 -0
- package/dist/core/tokens/walk.d.ts.map +1 -0
- package/dist/core/version.d.ts +3 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/plugins/host/admit.d.ts +35 -0
- package/dist/plugins/host/admit.d.ts.map +1 -0
- package/dist/plugins/host/call.d.ts +59 -0
- package/dist/plugins/host/call.d.ts.map +1 -0
- package/dist/plugins/host/check.d.ts +54 -0
- package/dist/plugins/host/check.d.ts.map +1 -0
- package/dist/plugins/host/scrub.d.ts +17 -0
- package/dist/plugins/host/scrub.d.ts.map +1 -0
- package/dist/plugins/index.d.ts +14 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/pins/interpreter.d.ts +49 -0
- package/dist/plugins/pins/interpreter.d.ts.map +1 -0
- package/dist/plugins/pins/lock.d.ts +47 -0
- package/dist/plugins/pins/lock.d.ts.map +1 -0
- package/dist/plugins/pins/pin.d.ts +65 -0
- package/dist/plugins/pins/pin.d.ts.map +1 -0
- package/dist/plugins/pins/shipped.d.ts +40 -0
- package/dist/plugins/pins/shipped.d.ts.map +1 -0
- package/dist/plugins/roles/breaker.d.ts +18 -0
- package/dist/plugins/roles/breaker.d.ts.map +1 -0
- package/dist/plugins/roles/check-cases.d.ts +4 -0
- package/dist/plugins/roles/check-cases.d.ts.map +1 -0
- package/dist/plugins/roles/dev.d.ts +35 -0
- package/dist/plugins/roles/dev.d.ts.map +1 -0
- package/dist/plugins/roles/fixes.d.ts +24 -0
- package/dist/plugins/roles/fixes.d.ts.map +1 -0
- package/dist/plugins/roles/gate.d.ts +26 -0
- package/dist/plugins/roles/gate.d.ts.map +1 -0
- package/dist/plugins/roles/integrate.d.ts +12 -0
- package/dist/plugins/roles/integrate.d.ts.map +1 -0
- package/dist/plugins/roles/roles.d.ts +73 -0
- package/dist/plugins/roles/roles.d.ts.map +1 -0
- package/dist/plugins/wire/environment.d.ts +9 -0
- package/dist/plugins/wire/environment.d.ts.map +1 -0
- package/dist/plugins/wire/forms.d.ts +13 -0
- package/dist/plugins/wire/forms.d.ts.map +1 -0
- package/dist/plugins/wire/limits.d.ts +11 -0
- package/dist/plugins/wire/limits.d.ts.map +1 -0
- package/dist/plugins/wire/manifest.d.ts +31 -0
- package/dist/plugins/wire/manifest.d.ts.map +1 -0
- package/dist/plugins/wire/profile.d.ts +36 -0
- package/dist/plugins/wire/profile.d.ts.map +1 -0
- package/dist/plugins/wire/text.d.ts +14 -0
- package/dist/plugins/wire/text.d.ts.map +1 -0
- package/dist/server/assets.d.ts +13 -0
- package/dist/server/assets.d.ts.map +1 -0
- package/dist/server/coalesce.d.ts +12 -0
- package/dist/server/coalesce.d.ts.map +1 -0
- package/dist/server/data-script.d.ts +8 -0
- package/dist/server/data-script.d.ts.map +1 -0
- package/dist/server/dev-server.d.ts +34 -0
- package/dist/server/dev-server.d.ts.map +1 -0
- package/dist/server/editor-guard.d.ts +13 -0
- package/dist/server/editor-guard.d.ts.map +1 -0
- package/dist/server/error-reporter.d.ts +11 -0
- package/dist/server/error-reporter.d.ts.map +1 -0
- package/dist/server/icon-sets.d.ts +9 -0
- package/dist/server/icon-sets.d.ts.map +1 -0
- package/dist/server/plugin.d.ts +4 -0
- package/dist/server/plugin.d.ts.map +1 -0
- package/dist/server/preview-guard.d.ts +11 -0
- package/dist/server/preview-guard.d.ts.map +1 -0
- package/dist/types/assets.d.ts +130 -0
- package/dist/types/assets.d.ts.map +1 -0
- package/dist/types/catalog.d.ts +95 -0
- package/dist/types/catalog.d.ts.map +1 -0
- package/dist/types/config.d.ts +97 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/data.d.ts +38 -0
- package/dist/types/data.d.ts.map +1 -0
- package/dist/types/docs.d.ts +47 -0
- package/dist/types/docs.d.ts.map +1 -0
- package/dist/types/findings.d.ts +18 -0
- package/dist/types/findings.d.ts.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/parsed.d.ts +86 -0
- package/dist/types/parsed.d.ts.map +1 -0
- package/dist/types/theme.d.ts +19 -0
- package/dist/types/theme.d.ts.map +1 -0
- package/dist/types/tokens.d.ts +101 -0
- package/dist/types/tokens.d.ts.map +1 -0
- package/dist/ui/assets/geist-OFL.txt +93 -0
- package/dist/ui/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/ui/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/ui/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/ui/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/ui/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/ui/assets/index-D0WCUmtA.css +2 -0
- package/dist/ui/assets/index-DhSc0Zxv.js +75 -0
- package/dist/ui/index.html +14 -0
- package/package.json +151 -4
- package/plugins/blazon.brand-deck/README.md +38 -0
- package/plugins/blazon.brand-deck/bin/blazon-blazon.brand-deck./360/237/224/214 +2695 -0
- package/plugins/blazon.brand-deck/package.json +3 -0
- package/plugins/blazon.copy/README.md +29 -0
- package/plugins/blazon.copy/bin/blazon-blazon.copy./360/237/224/214 +438 -0
- package/plugins/blazon.copy/package.json +3 -0
- package/plugins/blazon.favicons/README.md +13 -0
- package/plugins/blazon.favicons/bin/blazon-blazon.favicons./360/237/224/214 +8816 -0
- package/plugins/blazon.favicons/package.json +3 -0
- package/plugins/blazon.logo-geometry/README.md +5 -0
- package/plugins/blazon.logo-geometry/bin/blazon-blazon.logo-geometry./360/237/224/214 +1522 -0
- package/plugins/blazon.logo-geometry/package.json +3 -0
- package/plugins/blazon.logo-kit/README.md +5 -0
- package/plugins/blazon.logo-kit/bin/blazon-blazon.logo-kit./360/237/224/214 +617 -0
- package/plugins/blazon.logo-kit/package.json +3 -0
- package/plugins/blazon.office-template/README.md +29 -0
- package/plugins/blazon.office-template/bin/blazon-blazon.office-template./360/237/224/214 +1788 -0
- package/plugins/blazon.office-template/package.json +3 -0
- package/plugins/blazon.platform-tokens/README.md +22 -0
- package/plugins/blazon.platform-tokens/bin/blazon-blazon.platform-tokens./360/237/224/214 +8418 -0
- package/plugins/blazon.platform-tokens/package.json +3 -0
- package/plugins/blazon.press-kit/README.md +17 -0
- package/plugins/blazon.press-kit/bin/blazon-blazon.press-kit./360/237/224/214 +897 -0
- package/plugins/blazon.press-kit/package.json +3 -0
- package/plugins/blazon.print-book/README.md +40 -0
- package/plugins/blazon.print-book/bin/blazon-blazon.print-book./360/237/224/214 +9268 -0
- package/plugins/blazon.print-book/package.json +3 -0
- package/plugins/blazon.social-cards/README.md +5 -0
- package/plugins/blazon.social-cards/bin/blazon-blazon.social-cards./360/237/224/214 +1165 -0
- package/plugins/blazon.social-cards/package.json +3 -0
- package/plugins/shipped.lock +75 -0
- package/template/AGENTS.md +55 -0
- package/template/CLAUDE.md +1 -0
- package/template/assets/backgrounds/aurora.json +5 -0
- package/template/assets/backgrounds/aurora.svg +39 -0
- package/template/assets/construction/blazon-mark.json +9 -0
- package/template/assets/construction/blazon-mark.svg +54 -0
- package/template/assets/icons/arrow-right.json +5 -0
- package/template/assets/icons/arrow-right.svg +1 -0
- package/template/assets/icons/check.json +5 -0
- package/template/assets/icons/check.svg +1 -0
- package/template/assets/icons/download.json +5 -0
- package/template/assets/icons/download.svg +1 -0
- package/template/assets/icons/file.json +5 -0
- package/template/assets/icons/file.svg +1 -0
- package/template/assets/icons/token.json +5 -0
- package/template/assets/icons/token.svg +1 -0
- package/template/assets/icons/warning.json +5 -0
- package/template/assets/icons/warning.svg +1 -0
- package/template/assets/logos/blazon-bone.json +6 -0
- package/template/assets/logos/blazon-bone.svg +1 -0
- package/template/assets/logos/blazon-graphite.json +6 -0
- package/template/assets/logos/blazon-graphite.svg +1 -0
- package/template/assets/logos/blazon-mark.json +6 -0
- package/template/assets/logos/blazon-mark.svg +1 -0
- package/template/blazon.json +104 -0
- package/template/blazon.resolver.json +46 -0
- package/template/docs/01-principles.md +47 -0
- package/template/docs/02-logo.md +43 -0
- package/template/docs/03-color.md +79 -0
- package/template/docs/04-type.md +36 -0
- package/template/docs/05-form.md +80 -0
- package/template/docs/06-layout.md +28 -0
- package/template/docs/07-icons.md +22 -0
- package/template/docs/08-diagrams.md +20 -0
- package/template/docs/09-social.md +21 -0
- package/template/docs/10-applications.md +20 -0
- package/template/docs/11-voice.md +74 -0
- package/template/docs/12-web.md +167 -0
- package/template/fonts/IBMPlexMono-Regular-latin.woff2 +0 -0
- package/template/fonts/IBMPlexMono-SemiBold-latin.woff2 +0 -0
- package/template/fonts/OFL.txt +93 -0
- package/template/tokens/colors.json +257 -0
- package/template/tokens/form.json +199 -0
- package/template/tokens/social.json +26 -0
- package/template/tokens/spacing.json +65 -0
- package/template/tokens/theme/dark.json +121 -0
- package/template/tokens/typography.json +233 -0
|
@@ -0,0 +1,609 @@
|
|
|
1
|
+
import { Finding } from '../../types/index.js';
|
|
2
|
+
/** Where in a project a finding points. */
|
|
3
|
+
export type AppliesTo = 'token' | 'group' | 'asset' | 'page' | 'config' | 'project';
|
|
4
|
+
/**
|
|
5
|
+
* The naming rule for a finding code. Codes are public surface (CI filters, suppressions, approvals) and freeze at 1.0.
|
|
6
|
+
*
|
|
7
|
+
* A code is kebab-case, `<area>-<problem>`: the area comes first and names what the check looks at (`alias`, `asset`,
|
|
8
|
+
* `asset-sidecar`, `token-value`, `theme`), and the problem comes last and is one word from PROBLEMS below. The same
|
|
9
|
+
* trouble gets the same word in every area: a file or value that cannot be parsed or fails its shape is `invalid`, a name
|
|
10
|
+
* that is not in a known list is `unknown`, a reference that points at nothing is `unresolved`, something required that is
|
|
11
|
+
* absent is `missing`, two things that claim the same slot are `duplicate`, a file that cannot be read is `unreadable`,
|
|
12
|
+
* and a setting that matches nothing is `unused`. A new code uses a word from the list; a new word is added to PROBLEMS in
|
|
13
|
+
* this file on purpose, with the rule above kept in step with the manual's checks page.
|
|
14
|
+
*/
|
|
15
|
+
export declare const PROBLEMS: readonly ["circular", "deprecated", "duplicate", "embedded", "failed", "inferred", "insufficient", "invalid", "mismatch", "missing", "orphaned", "outside", "overlap", "pending", "stale", "unchanged", "unknown", "unplaced", "unreadable", "unresolved", "unused", "violated"];
|
|
16
|
+
/**
|
|
17
|
+
* Every finding code blazon's core emits. A finding is built with `finding()`, so its severity comes from
|
|
18
|
+
* here and cannot disagree. Plugin codes (`name/code`) are not in this list.
|
|
19
|
+
*/
|
|
20
|
+
export declare const CHECKS: {
|
|
21
|
+
readonly 'alias-circular': {
|
|
22
|
+
readonly severity: "error";
|
|
23
|
+
readonly summary: "Aliases lead back to the token that started them.";
|
|
24
|
+
readonly fix: "Break the loop: one token in the chain must hold a value, not an alias.";
|
|
25
|
+
readonly appliesTo: readonly ["token"];
|
|
26
|
+
readonly rfc: "1#4";
|
|
27
|
+
readonly manual: "03-checks";
|
|
28
|
+
};
|
|
29
|
+
readonly 'alias-deprecated': {
|
|
30
|
+
readonly severity: "warning";
|
|
31
|
+
readonly summary: "A token aliases a token marked deprecated.";
|
|
32
|
+
readonly fix: "Point the alias at the token that replaces the deprecated one.";
|
|
33
|
+
readonly appliesTo: readonly ["token"];
|
|
34
|
+
readonly rfc: "1#4";
|
|
35
|
+
readonly manual: "03-checks";
|
|
36
|
+
};
|
|
37
|
+
readonly 'alias-embedded': {
|
|
38
|
+
readonly severity: "error";
|
|
39
|
+
readonly summary: "An alias is mixed with other text in one value.";
|
|
40
|
+
readonly fix: "Make the alias the whole value, and build the combined value in another token.";
|
|
41
|
+
readonly appliesTo: readonly ["token"];
|
|
42
|
+
readonly rfc: "1#4";
|
|
43
|
+
readonly manual: "03-checks";
|
|
44
|
+
};
|
|
45
|
+
readonly 'alias-missing': {
|
|
46
|
+
readonly severity: "warning";
|
|
47
|
+
readonly summary: "A semantic or component token holds a literal value instead of an alias.";
|
|
48
|
+
readonly fix: "Replace the literal $value with an alias to a primitive token, such as {color.blue.600}.";
|
|
49
|
+
readonly appliesTo: readonly ["token"];
|
|
50
|
+
readonly rfc: "1#4";
|
|
51
|
+
readonly manual: "03-checks";
|
|
52
|
+
};
|
|
53
|
+
readonly 'alias-type-mismatch': {
|
|
54
|
+
readonly severity: "error";
|
|
55
|
+
readonly summary: "A token has a different $type from the token it aliases.";
|
|
56
|
+
readonly fix: "Give the token the $type of the token it aliases, or alias a token of the same type.";
|
|
57
|
+
readonly appliesTo: readonly ["token"];
|
|
58
|
+
readonly rfc: "1#4";
|
|
59
|
+
readonly manual: "03-checks";
|
|
60
|
+
};
|
|
61
|
+
readonly 'alias-unresolved': {
|
|
62
|
+
readonly severity: "error";
|
|
63
|
+
readonly summary: "An alias names no token.";
|
|
64
|
+
readonly fix: "Point the alias at a token that exists, or add the token: an alias is the token path in braces, such as {color.blue.600}.";
|
|
65
|
+
readonly appliesTo: readonly ["token"];
|
|
66
|
+
readonly rfc: "1#4";
|
|
67
|
+
readonly manual: "03-checks";
|
|
68
|
+
};
|
|
69
|
+
readonly 'approval-stale': {
|
|
70
|
+
readonly severity: "warning";
|
|
71
|
+
readonly summary: "A token or asset was approved, and its value changed after.";
|
|
72
|
+
readonly fix: "Check the new value, then set review.value to the fingerprint the message gives; or set review.status to needs-review to have it checked again.";
|
|
73
|
+
readonly appliesTo: readonly ["token", "asset"];
|
|
74
|
+
readonly rfc: "1#4";
|
|
75
|
+
readonly manual: "03-checks";
|
|
76
|
+
};
|
|
77
|
+
readonly 'asset-config-invalid': {
|
|
78
|
+
readonly severity: "error";
|
|
79
|
+
readonly summary: "An asset category in the config is not a valid object or has a bad rule.";
|
|
80
|
+
readonly fix: "Fix that category under assets in blazon.json: it must be an object with only the fields the message lists as known.";
|
|
81
|
+
readonly appliesTo: readonly ["config"];
|
|
82
|
+
readonly rfc: "1#4";
|
|
83
|
+
readonly manual: "03-checks";
|
|
84
|
+
};
|
|
85
|
+
readonly 'asset-config-unused': {
|
|
86
|
+
readonly severity: "warning";
|
|
87
|
+
readonly summary: "An asset category in the config matches no asset.";
|
|
88
|
+
readonly fix: "Correct the category key under assets in blazon.json so it matches the asset folder name, or remove the entry.";
|
|
89
|
+
readonly appliesTo: readonly ["config"];
|
|
90
|
+
readonly rfc: "1#4";
|
|
91
|
+
readonly manual: "03-checks";
|
|
92
|
+
};
|
|
93
|
+
readonly 'asset-id-duplicate': {
|
|
94
|
+
readonly severity: "error";
|
|
95
|
+
readonly summary: "Two files in different folders have the same asset id.";
|
|
96
|
+
readonly fix: "Rename one of the two files so every asset id (category/name) is unique.";
|
|
97
|
+
readonly appliesTo: readonly ["asset"];
|
|
98
|
+
readonly rfc: "1#4";
|
|
99
|
+
readonly manual: "03-checks";
|
|
100
|
+
};
|
|
101
|
+
readonly 'asset-local-missing': {
|
|
102
|
+
readonly severity: "info";
|
|
103
|
+
readonly summary: "A category kept out of git has no images on this machine.";
|
|
104
|
+
readonly appliesTo: readonly ["config"];
|
|
105
|
+
readonly rfc: "1#4";
|
|
106
|
+
readonly manual: "03-checks";
|
|
107
|
+
};
|
|
108
|
+
readonly 'asset-review-missing': {
|
|
109
|
+
readonly severity: "warning";
|
|
110
|
+
readonly summary: "A generated asset has no review yet.";
|
|
111
|
+
readonly fix: "Check the asset, then set review.status to ok in its sidecar.";
|
|
112
|
+
readonly appliesTo: readonly ["asset"];
|
|
113
|
+
readonly rfc: "1#4";
|
|
114
|
+
readonly manual: "03-checks";
|
|
115
|
+
};
|
|
116
|
+
readonly 'asset-rule-violated': {
|
|
117
|
+
readonly severity: "error";
|
|
118
|
+
readonly summary: "An asset breaks the rules of its category.";
|
|
119
|
+
readonly fix: "Replace the file so it meets its category's rules, or change the rules in blazon.json.";
|
|
120
|
+
readonly appliesTo: readonly ["asset"];
|
|
121
|
+
readonly rfc: "1#4";
|
|
122
|
+
readonly manual: "03-checks";
|
|
123
|
+
};
|
|
124
|
+
readonly 'asset-sidecar-invalid': {
|
|
125
|
+
readonly severity: "error";
|
|
126
|
+
readonly summary: "An asset sidecar is not valid JSON or holds a field blazon does not know.";
|
|
127
|
+
readonly fix: "Fix the sidecar next to the asset: valid JSON with only the fields blazon knows.";
|
|
128
|
+
readonly appliesTo: readonly ["asset"];
|
|
129
|
+
readonly rfc: "1#4";
|
|
130
|
+
readonly manual: "03-checks";
|
|
131
|
+
};
|
|
132
|
+
readonly 'asset-sidecar-orphaned': {
|
|
133
|
+
readonly severity: "warning";
|
|
134
|
+
readonly summary: "A sidecar has no image of the same name beside it.";
|
|
135
|
+
readonly fix: "Rename the sidecar to match its image, or delete it if the image is gone.";
|
|
136
|
+
readonly appliesTo: readonly ["asset"];
|
|
137
|
+
readonly rfc: "1#4";
|
|
138
|
+
readonly manual: "03-checks";
|
|
139
|
+
};
|
|
140
|
+
readonly 'asset-unreadable': {
|
|
141
|
+
readonly severity: "error";
|
|
142
|
+
readonly summary: "An asset file cannot be read, so it is left out of the book.";
|
|
143
|
+
readonly fix: "Make the file readable (check its permissions and that it is a file), or remove it.";
|
|
144
|
+
readonly appliesTo: readonly ["asset"];
|
|
145
|
+
readonly rfc: "1#4";
|
|
146
|
+
readonly manual: "03-checks";
|
|
147
|
+
};
|
|
148
|
+
readonly 'config-invalid': {
|
|
149
|
+
readonly severity: "error";
|
|
150
|
+
readonly summary: "A key or value in blazon.json is not valid.";
|
|
151
|
+
readonly fix: "Fix the key or value in blazon.json; the message lists the keys blazon knows.";
|
|
152
|
+
readonly appliesTo: readonly ["config"];
|
|
153
|
+
readonly rfc: "1#4";
|
|
154
|
+
readonly manual: "03-checks";
|
|
155
|
+
};
|
|
156
|
+
readonly 'config-path-outside': {
|
|
157
|
+
readonly severity: "error";
|
|
158
|
+
readonly summary: "A path in blazon.json, or a file linked from a brand folder, leads outside the project folder.";
|
|
159
|
+
readonly fix: "Keep tokensDir, docsDir, assetsDir, resolver, outDir, tokensOutDir and the logo files inside the project folder, and replace a link that leaves it with a copy. An asset category may still read a shared folder through its dir.";
|
|
160
|
+
readonly appliesTo: readonly ["config"];
|
|
161
|
+
readonly rfc: "1#4";
|
|
162
|
+
readonly manual: "03-checks";
|
|
163
|
+
};
|
|
164
|
+
readonly 'contrast-insufficient': {
|
|
165
|
+
readonly severity: "error";
|
|
166
|
+
readonly summary: "A color pair has less contrast than its level asks for.";
|
|
167
|
+
readonly fix: "Change one of the two colors, or lower the pair's level on purpose.";
|
|
168
|
+
readonly appliesTo: readonly ["token"];
|
|
169
|
+
readonly rfc: "1#4";
|
|
170
|
+
readonly manual: "03-checks";
|
|
171
|
+
};
|
|
172
|
+
readonly 'contrast-pair-invalid': {
|
|
173
|
+
readonly severity: "error";
|
|
174
|
+
readonly summary: "A contrast pair names no color tokens or has an unknown level.";
|
|
175
|
+
readonly fix: "Name color tokens that exist in the pair's fg and bg, and use the level AA, AA-large or AAA.";
|
|
176
|
+
readonly appliesTo: readonly ["group"];
|
|
177
|
+
readonly rfc: "1#4";
|
|
178
|
+
readonly manual: "03-checks";
|
|
179
|
+
};
|
|
180
|
+
readonly 'contrast-unknown': {
|
|
181
|
+
readonly severity: "warning";
|
|
182
|
+
readonly summary: "Blazon cannot read a color of a pair, or its background is translucent, so it cannot measure the contrast.";
|
|
183
|
+
readonly fix: "Give both tokens of the pair a color value blazon can read, such as a hex color, or an alias of one, and make the background opaque.";
|
|
184
|
+
readonly appliesTo: readonly ["token"];
|
|
185
|
+
readonly rfc: "1#4";
|
|
186
|
+
readonly manual: "03-checks";
|
|
187
|
+
};
|
|
188
|
+
readonly 'css-variable-duplicate': {
|
|
189
|
+
readonly severity: "error";
|
|
190
|
+
readonly summary: "Two tokens write the same CSS custom property.";
|
|
191
|
+
readonly fix: "Rename one of the two tokens so they write different CSS custom properties.";
|
|
192
|
+
readonly appliesTo: readonly ["token"];
|
|
193
|
+
readonly rfc: "1#4";
|
|
194
|
+
readonly manual: "03-checks";
|
|
195
|
+
};
|
|
196
|
+
readonly 'directive-deprecated': {
|
|
197
|
+
readonly severity: "warning";
|
|
198
|
+
readonly summary: "A page has a `folio:` directive comment, the old name, which blazon ignores.";
|
|
199
|
+
readonly fix: "Write `<!-- blazon:NAME -->` instead of `<!-- folio:NAME -->`: `folio:` became `blazon:`.";
|
|
200
|
+
readonly appliesTo: readonly ["page"];
|
|
201
|
+
readonly rfc: "1#4";
|
|
202
|
+
readonly manual: "03-checks";
|
|
203
|
+
};
|
|
204
|
+
readonly 'directive-invalid': {
|
|
205
|
+
readonly severity: "error";
|
|
206
|
+
readonly summary: "A page directive has wrong arguments or names something that does not exist.";
|
|
207
|
+
readonly fix: "Fix the directive's arguments: each path or id must name something that exists.";
|
|
208
|
+
readonly appliesTo: readonly ["page"];
|
|
209
|
+
readonly rfc: "1#4";
|
|
210
|
+
readonly manual: "03-checks";
|
|
211
|
+
};
|
|
212
|
+
readonly 'directive-unknown': {
|
|
213
|
+
readonly severity: "error";
|
|
214
|
+
readonly summary: "A page uses a directive name blazon does not have.";
|
|
215
|
+
readonly fix: "Use one of the directive names the message lists.";
|
|
216
|
+
readonly appliesTo: readonly ["page"];
|
|
217
|
+
readonly rfc: "1#4";
|
|
218
|
+
readonly manual: "03-checks";
|
|
219
|
+
};
|
|
220
|
+
readonly 'font-family-missing': {
|
|
221
|
+
readonly severity: "warning";
|
|
222
|
+
readonly summary: "A font family a token uses is not loaded by any fonts entry.";
|
|
223
|
+
readonly fix: "Add a fonts entry in blazon.json that loads the family, with its file or its stylesheet URL, or put a loaded family first in the token.";
|
|
224
|
+
readonly appliesTo: readonly ["token"];
|
|
225
|
+
readonly rfc: "1#4";
|
|
226
|
+
readonly manual: "03-checks";
|
|
227
|
+
};
|
|
228
|
+
readonly 'font-file-invalid': {
|
|
229
|
+
readonly severity: "error";
|
|
230
|
+
readonly summary: "A font entry names a file that is missing or not a font.";
|
|
231
|
+
readonly fix: "Point the font entry at a .woff2, .woff, .ttf or .otf file that exists.";
|
|
232
|
+
readonly appliesTo: readonly ["config"];
|
|
233
|
+
readonly rfc: "1#4";
|
|
234
|
+
readonly manual: "03-checks";
|
|
235
|
+
};
|
|
236
|
+
readonly 'font-license-unknown': {
|
|
237
|
+
readonly severity: "info";
|
|
238
|
+
readonly summary: "A font license is not a known SPDX id.";
|
|
239
|
+
readonly fix: "Set font.license to an SPDX id such as OFL-1.1, or leave the plain name if it is the license's own name.";
|
|
240
|
+
readonly appliesTo: readonly ["token", "group"];
|
|
241
|
+
readonly rfc: "1#4";
|
|
242
|
+
readonly manual: "03-checks";
|
|
243
|
+
};
|
|
244
|
+
readonly 'font-meta-invalid': {
|
|
245
|
+
readonly severity: "error";
|
|
246
|
+
readonly summary: "The font fields on a token are not valid.";
|
|
247
|
+
readonly fix: "Fix the font extension on the token or group: only source, license and licenseUrl, as text, with http or https addresses, on a fontFamily token.";
|
|
248
|
+
readonly appliesTo: readonly ["token", "group"];
|
|
249
|
+
readonly rfc: "1#4";
|
|
250
|
+
readonly manual: "03-checks";
|
|
251
|
+
};
|
|
252
|
+
readonly 'icon-set-invalid': {
|
|
253
|
+
readonly severity: "error";
|
|
254
|
+
readonly summary: "An icon set in the config cannot be loaded.";
|
|
255
|
+
readonly fix: "Fix the icon set in blazon.json: install its package, or correct its name or dir.";
|
|
256
|
+
readonly appliesTo: readonly ["config"];
|
|
257
|
+
readonly rfc: "1#4";
|
|
258
|
+
readonly manual: "03-checks";
|
|
259
|
+
};
|
|
260
|
+
readonly 'icon-unknown': {
|
|
261
|
+
readonly severity: "warning";
|
|
262
|
+
readonly summary: "An icon set category lists an icon the package does not have.";
|
|
263
|
+
readonly fix: "Correct the icon name under categories in the icon set in blazon.json so it is one the package has, or remove it.";
|
|
264
|
+
readonly appliesTo: readonly ["config"];
|
|
265
|
+
readonly rfc: "1#4";
|
|
266
|
+
readonly manual: "03-checks";
|
|
267
|
+
};
|
|
268
|
+
readonly 'logo-contrast-insufficient': {
|
|
269
|
+
readonly severity: "warning";
|
|
270
|
+
readonly summary: "A logo variant draws the color of the surface it is shown on.";
|
|
271
|
+
readonly fix: "Add `logo: { deny: [\"onDark\"], reason }` to the surface token in dev.blazon, so the book does not show the logo there, or give the logo a variant made for it.";
|
|
272
|
+
readonly appliesTo: readonly ["asset"];
|
|
273
|
+
readonly rfc: "1#4";
|
|
274
|
+
readonly manual: "03-checks";
|
|
275
|
+
};
|
|
276
|
+
readonly 'logo-missing': {
|
|
277
|
+
readonly severity: "error";
|
|
278
|
+
readonly summary: "No logo is configured, or the configured logo is not an image file in the project.";
|
|
279
|
+
readonly fix: "Set `logo` in blazon.json to an image file inside the project.";
|
|
280
|
+
readonly appliesTo: readonly ["asset"];
|
|
281
|
+
readonly rfc: "1#4";
|
|
282
|
+
readonly manual: "03-checks";
|
|
283
|
+
};
|
|
284
|
+
readonly 'logo-rule-invalid': {
|
|
285
|
+
readonly severity: "error";
|
|
286
|
+
readonly summary: "A logo rule on a token is not in the shape blazon reads.";
|
|
287
|
+
readonly fix: "Write the logo extension as { \"deny\": [\"onDark\"], \"reason\": \"...\" }, with deny a list of logo variant names.";
|
|
288
|
+
readonly appliesTo: readonly ["token", "group"];
|
|
289
|
+
readonly rfc: "1#4";
|
|
290
|
+
readonly manual: "03-checks";
|
|
291
|
+
};
|
|
292
|
+
readonly 'logo-variant-unknown': {
|
|
293
|
+
readonly severity: "error";
|
|
294
|
+
readonly summary: "A logo rule denies a variant the logo does not have.";
|
|
295
|
+
readonly fix: "Name only the logo variants the message lists in logo.deny, or add the variant to the logo.";
|
|
296
|
+
readonly appliesTo: readonly ["token", "group"];
|
|
297
|
+
readonly rfc: "1#4";
|
|
298
|
+
readonly manual: "03-checks";
|
|
299
|
+
};
|
|
300
|
+
readonly 'output-dirs-overlap': {
|
|
301
|
+
readonly severity: "error";
|
|
302
|
+
readonly summary: "An output folder is or holds an input, or is inside one.";
|
|
303
|
+
readonly fix: "Set outDir and tokensOutDir in blazon.json to separate folders that are not an input folder or inside one.";
|
|
304
|
+
readonly appliesTo: readonly ["config"];
|
|
305
|
+
readonly rfc: "1#4";
|
|
306
|
+
readonly manual: "03-checks";
|
|
307
|
+
};
|
|
308
|
+
readonly 'page-frontmatter-invalid': {
|
|
309
|
+
readonly severity: "error";
|
|
310
|
+
readonly summary: "A page front matter is not valid YAML or has a field of the wrong type.";
|
|
311
|
+
readonly fix: "Fix the page's front matter YAML, and quote any value that contains a colon and a space.";
|
|
312
|
+
readonly appliesTo: readonly ["page"];
|
|
313
|
+
readonly rfc: "1#4";
|
|
314
|
+
readonly manual: "03-checks";
|
|
315
|
+
};
|
|
316
|
+
readonly 'page-review-pending': {
|
|
317
|
+
readonly severity: "warning";
|
|
318
|
+
readonly summary: "A page shows assets that are still marked needs-review.";
|
|
319
|
+
readonly fix: "Check each asset the page shows, then set its review.status to ok in its sidecar, or take it off the page.";
|
|
320
|
+
readonly appliesTo: readonly ["page"];
|
|
321
|
+
readonly rfc: "1#4";
|
|
322
|
+
readonly manual: "03-checks";
|
|
323
|
+
};
|
|
324
|
+
readonly 'page-slug-duplicate': {
|
|
325
|
+
readonly severity: "error";
|
|
326
|
+
readonly summary: "Two pages have the same slug, so the book opens only the first.";
|
|
327
|
+
readonly fix: "Rename one of the two files: the slug is the file name without its number prefix, so 01-colors.md and colors.md are both \"colors\".";
|
|
328
|
+
readonly appliesTo: readonly ["page"];
|
|
329
|
+
readonly rfc: "1#4";
|
|
330
|
+
readonly manual: "03-checks";
|
|
331
|
+
};
|
|
332
|
+
readonly 'page-tokens-unplaced': {
|
|
333
|
+
readonly severity: "info";
|
|
334
|
+
readonly summary: "A page names many tokens but places none of them.";
|
|
335
|
+
readonly fix: "Place the tokens the page names with <!-- blazon:tokens color.base ... -->, one directive for the groups it talks about.";
|
|
336
|
+
readonly appliesTo: readonly ["page"];
|
|
337
|
+
readonly rfc: "1#4";
|
|
338
|
+
readonly manual: "03-checks";
|
|
339
|
+
};
|
|
340
|
+
readonly 'page-unreadable': {
|
|
341
|
+
readonly severity: "error";
|
|
342
|
+
readonly summary: "A page file cannot be read, so it is left out of the book.";
|
|
343
|
+
readonly fix: "Make the file readable (check its permissions and that it is a file), or remove it.";
|
|
344
|
+
readonly appliesTo: readonly ["page"];
|
|
345
|
+
readonly rfc: "1#4";
|
|
346
|
+
readonly manual: "03-checks";
|
|
347
|
+
};
|
|
348
|
+
readonly 'pin-invalid': {
|
|
349
|
+
readonly severity: "error";
|
|
350
|
+
readonly summary: "blazon.lock is not a valid pin.";
|
|
351
|
+
readonly fix: "Fix blazon.lock, or write it again with blazon pin: it holds { \"v\": 1, \"commit\": \"<40 hex digits>\" }.";
|
|
352
|
+
readonly appliesTo: readonly ["project"];
|
|
353
|
+
readonly rfc: "1#4";
|
|
354
|
+
readonly manual: "03-checks";
|
|
355
|
+
};
|
|
356
|
+
readonly 'pin-mismatch': {
|
|
357
|
+
readonly severity: "error";
|
|
358
|
+
readonly summary: "The blazon build in use is not the commit blazon.lock names.";
|
|
359
|
+
readonly fix: "Build the book with the blazon commit blazon.lock names: check it out in your blazon clone and run npm ci && npm run build there. To move the pin on purpose, run blazon pin.";
|
|
360
|
+
readonly appliesTo: readonly ["project"];
|
|
361
|
+
readonly rfc: "1#4";
|
|
362
|
+
readonly manual: "03-checks";
|
|
363
|
+
};
|
|
364
|
+
readonly 'plugin-failed': {
|
|
365
|
+
readonly severity: "error";
|
|
366
|
+
readonly summary: "A check plugin could not run or broke the plugin protocol.";
|
|
367
|
+
readonly fix: "Read the message: it names the plugin and what stopped it, and the plugins chapter of the manual lists each cause with its fix.";
|
|
368
|
+
readonly appliesTo: readonly ["config"];
|
|
369
|
+
readonly rfc: "1#4";
|
|
370
|
+
readonly manual: "03-checks";
|
|
371
|
+
};
|
|
372
|
+
readonly 'plugin-lock-invalid': {
|
|
373
|
+
readonly severity: "error";
|
|
374
|
+
readonly summary: "The plugin lock file is not valid.";
|
|
375
|
+
readonly fix: "Fix the plugin lock file as the message says, or delete it and pin the plugins again.";
|
|
376
|
+
readonly appliesTo: readonly ["config"];
|
|
377
|
+
readonly rfc: "1#4";
|
|
378
|
+
readonly manual: "03-checks";
|
|
379
|
+
};
|
|
380
|
+
readonly 'print-cmyk-invalid': {
|
|
381
|
+
readonly severity: "error";
|
|
382
|
+
readonly summary: "The print cmyk value is not four numbers from 0 to 100.";
|
|
383
|
+
readonly fix: "Set print.cmyk on the token to four numbers from 0 to 100, such as [100, 60, 0, 30].";
|
|
384
|
+
readonly appliesTo: readonly ["token"];
|
|
385
|
+
readonly rfc: "1#4";
|
|
386
|
+
readonly manual: "03-checks";
|
|
387
|
+
};
|
|
388
|
+
readonly 'print-pms-invalid': {
|
|
389
|
+
readonly severity: "error";
|
|
390
|
+
readonly summary: "The print pms value is not a non-empty single-line string.";
|
|
391
|
+
readonly fix: "Set print.pms on the token to a single-line string such as \"2945 C\".";
|
|
392
|
+
readonly appliesTo: readonly ["token"];
|
|
393
|
+
readonly rfc: "1#4";
|
|
394
|
+
readonly manual: "03-checks";
|
|
395
|
+
};
|
|
396
|
+
readonly 'print-ral-invalid': {
|
|
397
|
+
readonly severity: "error";
|
|
398
|
+
readonly summary: "The print ral value is not a valid RAL code.";
|
|
399
|
+
readonly fix: "Set print.ral on the token to a valid RAL code, as the message says.";
|
|
400
|
+
readonly appliesTo: readonly ["token"];
|
|
401
|
+
readonly rfc: "1#4";
|
|
402
|
+
readonly manual: "03-checks";
|
|
403
|
+
};
|
|
404
|
+
readonly 'proportion-invalid': {
|
|
405
|
+
readonly severity: "error";
|
|
406
|
+
readonly summary: "A proportion share is out of range or names a token that does not exist.";
|
|
407
|
+
readonly fix: "Give each share in the proportion a number from 0 to 1, and list only tokens that exist.";
|
|
408
|
+
readonly appliesTo: readonly ["group"];
|
|
409
|
+
readonly rfc: "1#4";
|
|
410
|
+
readonly manual: "03-checks";
|
|
411
|
+
};
|
|
412
|
+
readonly 'proportion-total-mismatch': {
|
|
413
|
+
readonly severity: "warning";
|
|
414
|
+
readonly summary: "Proportion shares do not add up to 100%.";
|
|
415
|
+
readonly fix: "Change the shares of the proportion so they add up to 1.";
|
|
416
|
+
readonly appliesTo: readonly ["group"];
|
|
417
|
+
readonly rfc: "1#4";
|
|
418
|
+
readonly manual: "03-checks";
|
|
419
|
+
};
|
|
420
|
+
readonly 'resolver-invalid': {
|
|
421
|
+
readonly severity: "error";
|
|
422
|
+
readonly summary: "The resolver file is missing or breaks the DTCG resolver rules.";
|
|
423
|
+
readonly fix: "Fix the resolver file that `resolver` in blazon.json names, or point `resolver` at a file that exists.";
|
|
424
|
+
readonly appliesTo: readonly ["config"];
|
|
425
|
+
readonly rfc: "1#4";
|
|
426
|
+
readonly manual: "03-checks";
|
|
427
|
+
};
|
|
428
|
+
readonly 'review-invalid': {
|
|
429
|
+
readonly severity: "error";
|
|
430
|
+
readonly summary: "A review field has a bad status, date or fingerprint.";
|
|
431
|
+
readonly fix: "Give review a status of ok or needs-review, and write at as a real date, YYYY-MM-DD; review.value is the 12 hex digits blazon approvals prints.";
|
|
432
|
+
readonly appliesTo: readonly ["token", "group"];
|
|
433
|
+
readonly rfc: "1#4";
|
|
434
|
+
readonly manual: "03-checks";
|
|
435
|
+
};
|
|
436
|
+
readonly 'review-pending': {
|
|
437
|
+
readonly severity: "warning";
|
|
438
|
+
readonly summary: "A token or asset is marked needs-review.";
|
|
439
|
+
readonly fix: "Check the value, then set review.status to ok on the token or in the asset's sidecar.";
|
|
440
|
+
readonly appliesTo: readonly ["token", "asset", "group"];
|
|
441
|
+
readonly rfc: "1#4";
|
|
442
|
+
readonly manual: "03-checks";
|
|
443
|
+
};
|
|
444
|
+
readonly 'section-invalid': {
|
|
445
|
+
readonly severity: "error";
|
|
446
|
+
readonly summary: "The sections setting names a section blazon does not have or has the wrong shape.";
|
|
447
|
+
readonly fix: "Set sections in blazon.json to a list of the section names the message gives.";
|
|
448
|
+
readonly appliesTo: readonly ["page"];
|
|
449
|
+
readonly rfc: "1#4";
|
|
450
|
+
readonly manual: "03-checks";
|
|
451
|
+
};
|
|
452
|
+
readonly 'section-missing': {
|
|
453
|
+
readonly severity: "info";
|
|
454
|
+
readonly summary: "No page holds a section the book lists.";
|
|
455
|
+
readonly fix: "Declare the section with `section: <id>` in a page's front matter, or leave it out of sections in blazon.json.";
|
|
456
|
+
readonly appliesTo: readonly ["project"];
|
|
457
|
+
readonly rfc: "1#4";
|
|
458
|
+
readonly manual: "03-checks";
|
|
459
|
+
};
|
|
460
|
+
readonly 'source-css-var-invalid': {
|
|
461
|
+
readonly severity: "error";
|
|
462
|
+
readonly summary: "source.cssVar is not a custom property name.";
|
|
463
|
+
readonly fix: "Set source.cssVar on the token to a custom property name that starts with --, such as --brand-primary.";
|
|
464
|
+
readonly appliesTo: readonly ["token"];
|
|
465
|
+
readonly rfc: "1#4";
|
|
466
|
+
readonly manual: "03-checks";
|
|
467
|
+
};
|
|
468
|
+
readonly 'starter-file-unchanged': {
|
|
469
|
+
readonly severity: "info";
|
|
470
|
+
readonly summary: "A file in the docs, tokens, assets or fonts folder is still the starter text.";
|
|
471
|
+
readonly fix: "Replace the file's text with the brand's own, or delete it.";
|
|
472
|
+
readonly appliesTo: readonly ["project"];
|
|
473
|
+
readonly rfc: "1#4";
|
|
474
|
+
readonly manual: "03-checks";
|
|
475
|
+
};
|
|
476
|
+
readonly 'starter-logo-unchanged': {
|
|
477
|
+
readonly severity: "warning";
|
|
478
|
+
readonly summary: "A configured logo is still blazon's own mark, byte for byte.";
|
|
479
|
+
readonly fix: "Replace the logo file with the brand's own and point `logo` in `blazon.json` at it.";
|
|
480
|
+
readonly appliesTo: readonly ["project"];
|
|
481
|
+
readonly rfc: "1#4";
|
|
482
|
+
readonly manual: "03-checks";
|
|
483
|
+
};
|
|
484
|
+
readonly 'theme-inferred': {
|
|
485
|
+
readonly severity: "info";
|
|
486
|
+
readonly summary: "No theme is set, so blazon took the theme roles from token names.";
|
|
487
|
+
readonly fix: "Set `theme` in blazon.json to name the token for each role, so the roles no longer depend on token names.";
|
|
488
|
+
readonly appliesTo: readonly ["config"];
|
|
489
|
+
readonly rfc: "1#4";
|
|
490
|
+
readonly manual: "03-checks";
|
|
491
|
+
};
|
|
492
|
+
readonly 'theme-missing': {
|
|
493
|
+
readonly severity: "info";
|
|
494
|
+
readonly summary: "No theme is set and no token has a conventional name, so blazon uses neutral colors.";
|
|
495
|
+
readonly fix: "Set `theme` in blazon.json to name a token for each role, or give tokens the conventional names such as color.primary.";
|
|
496
|
+
readonly appliesTo: readonly ["config"];
|
|
497
|
+
readonly rfc: "1#4";
|
|
498
|
+
readonly manual: "03-checks";
|
|
499
|
+
};
|
|
500
|
+
readonly 'theme-unresolved': {
|
|
501
|
+
readonly severity: "error";
|
|
502
|
+
readonly summary: "A theme role or a shadcn variable points at a token that does not exist.";
|
|
503
|
+
readonly fix: "Point that theme role or shadcn variable in blazon.json at a token that exists.";
|
|
504
|
+
readonly appliesTo: readonly ["config"];
|
|
505
|
+
readonly rfc: "1#4";
|
|
506
|
+
readonly manual: "03-checks";
|
|
507
|
+
};
|
|
508
|
+
readonly 'token-extension-deprecated': {
|
|
509
|
+
readonly severity: "warning";
|
|
510
|
+
readonly summary: "A token or group has a `dev.folio` extension key, the old name, which blazon ignores.";
|
|
511
|
+
readonly fix: "Rename the `dev.folio` key to `dev.blazon`.";
|
|
512
|
+
readonly appliesTo: readonly ["token", "group"];
|
|
513
|
+
readonly rfc: "1#4";
|
|
514
|
+
readonly manual: "03-checks";
|
|
515
|
+
};
|
|
516
|
+
readonly 'token-file-invalid': {
|
|
517
|
+
readonly severity: "error";
|
|
518
|
+
readonly summary: "A token file is not valid JSON or its top level is not an object.";
|
|
519
|
+
readonly fix: "Fix the JSON syntax in that file (a missing comma, quote or brace); its top level must be an object.";
|
|
520
|
+
readonly appliesTo: readonly ["project"];
|
|
521
|
+
readonly rfc: "1#4";
|
|
522
|
+
readonly manual: "03-checks";
|
|
523
|
+
};
|
|
524
|
+
readonly 'token-invalid': {
|
|
525
|
+
readonly severity: "error";
|
|
526
|
+
readonly summary: "A token is a bare value instead of an object with $value, or a name contains \".\", \"{\" or \"}\".";
|
|
527
|
+
readonly fix: "Write the token as an object with $value, and rename any key that contains \".\", \"{\" or \"}\".";
|
|
528
|
+
readonly appliesTo: readonly ["token", "group"];
|
|
529
|
+
readonly rfc: "1#4";
|
|
530
|
+
readonly manual: "03-checks";
|
|
531
|
+
};
|
|
532
|
+
readonly 'token-path-duplicate': {
|
|
533
|
+
readonly severity: "warning";
|
|
534
|
+
readonly summary: "Two token files define the same path.";
|
|
535
|
+
readonly fix: "Define the path in one token file only: delete it from the file you do not want to win.";
|
|
536
|
+
readonly appliesTo: readonly ["token"];
|
|
537
|
+
readonly rfc: "1#4";
|
|
538
|
+
readonly manual: "03-checks";
|
|
539
|
+
};
|
|
540
|
+
readonly 'token-type-missing': {
|
|
541
|
+
readonly severity: "error";
|
|
542
|
+
readonly summary: "A token has no $type, and neither its groups nor its alias target give one.";
|
|
543
|
+
readonly fix: "Add a $type to the token, or to a group above it, or alias a token that has one.";
|
|
544
|
+
readonly appliesTo: readonly ["token"];
|
|
545
|
+
readonly rfc: "1#4";
|
|
546
|
+
readonly manual: "03-checks";
|
|
547
|
+
};
|
|
548
|
+
readonly 'token-type-unknown': {
|
|
549
|
+
readonly severity: "error";
|
|
550
|
+
readonly summary: "A $type is not a DTCG type.";
|
|
551
|
+
readonly fix: "Set $type to a DTCG type, such as color, dimension or fontFamily.";
|
|
552
|
+
readonly appliesTo: readonly ["token", "group"];
|
|
553
|
+
readonly rfc: "1#4";
|
|
554
|
+
readonly manual: "03-checks";
|
|
555
|
+
};
|
|
556
|
+
readonly 'token-value-duplicate': {
|
|
557
|
+
readonly severity: "warning";
|
|
558
|
+
readonly summary: "Two primitive tokens in one group have the same value.";
|
|
559
|
+
readonly fix: "Remove one of the two tokens, or make the second an alias of the first.";
|
|
560
|
+
readonly appliesTo: readonly ["token"];
|
|
561
|
+
readonly rfc: "1#4";
|
|
562
|
+
readonly manual: "03-checks";
|
|
563
|
+
};
|
|
564
|
+
readonly 'token-value-invalid': {
|
|
565
|
+
readonly severity: "error";
|
|
566
|
+
readonly summary: "A token value does not fit its $type.";
|
|
567
|
+
readonly fix: "Change the value so it fits the token's $type; the message says how.";
|
|
568
|
+
readonly appliesTo: readonly ["token"];
|
|
569
|
+
readonly rfc: "1#4";
|
|
570
|
+
readonly manual: "03-checks";
|
|
571
|
+
};
|
|
572
|
+
readonly 'tokens-missing': {
|
|
573
|
+
readonly severity: "warning";
|
|
574
|
+
readonly summary: "The tokens folder holds no tokens.";
|
|
575
|
+
readonly fix: "Add token files to the tokens folder, or run blazon init to start from the starter.";
|
|
576
|
+
readonly appliesTo: readonly ["project"];
|
|
577
|
+
readonly rfc: "1#4";
|
|
578
|
+
readonly manual: "03-checks";
|
|
579
|
+
};
|
|
580
|
+
readonly 'usage-role-unknown': {
|
|
581
|
+
readonly severity: "error";
|
|
582
|
+
readonly summary: "A usage role is not one blazon knows.";
|
|
583
|
+
readonly fix: "Use only the usage roles the message lists, or add the role in vocabulary.usageRoles; usage.allow and usage.deny must be lists.";
|
|
584
|
+
readonly appliesTo: readonly ["token"];
|
|
585
|
+
readonly rfc: "1#4";
|
|
586
|
+
readonly manual: "03-checks";
|
|
587
|
+
};
|
|
588
|
+
readonly 'usage-violated': {
|
|
589
|
+
readonly severity: "error";
|
|
590
|
+
readonly summary: "A token is used as a role that the token it aliases does not allow.";
|
|
591
|
+
readonly fix: "Change the token's role, or alias a token whose usage allows that role.";
|
|
592
|
+
readonly appliesTo: readonly ["token"];
|
|
593
|
+
readonly rfc: "1#4";
|
|
594
|
+
readonly manual: "03-checks";
|
|
595
|
+
};
|
|
596
|
+
};
|
|
597
|
+
export type CheckCode = keyof typeof CHECKS;
|
|
598
|
+
export interface FindingFields {
|
|
599
|
+
path: string;
|
|
600
|
+
message: string;
|
|
601
|
+
context?: string;
|
|
602
|
+
file?: string;
|
|
603
|
+
line?: number;
|
|
604
|
+
/** The fix for this finding's own cause, in place of the code's */
|
|
605
|
+
fix?: string;
|
|
606
|
+
}
|
|
607
|
+
/** Build a finding of a core code. The severity is the catalogue's. */
|
|
608
|
+
export declare function finding(code: CheckCode, fields: FindingFields): Finding;
|
|
609
|
+
//# sourceMappingURL=catalogue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogue.d.ts","sourceRoot":"","sources":["../../../src/core/checker/catalogue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAY,MAAM,sBAAsB,CAAC;AAE9D,2CAA2C;AAC3C,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAiBpF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,kRAuBX,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgkBuB,CAAC;AAE3C,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,MAAM,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,uEAAuE;AACvE,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAYvE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { default as Color } from 'colorjs.io';
|
|
2
|
+
import { ContrastLevel, ContrastPair, Finding, TokenItem } from '../../types/index.js';
|
|
3
|
+
/** WCAG 2.2 SC 1.4.3 / 1.4.6 minimum ratios. */
|
|
4
|
+
export declare const CONTRAST_MINIMUM: Record<ContrastLevel, number>;
|
|
5
|
+
/** Any CSS color (hex, rgb(), hsl(), lab(), oklch(), color(), a name), or undefined for anything else. The color keeps its alpha; `contrastBetween` blends it. */
|
|
6
|
+
export declare function parseColor(css: string): Color | undefined;
|
|
7
|
+
/** The WCAG 2.x contrast ratio of two colors, from their relative luminance. */
|
|
8
|
+
export declare function contrastRatio(a: Color, b: Color): number;
|
|
9
|
+
/**
|
|
10
|
+
* The ratio of a foreground over a background, or undefined when the backdrop is not known. WCAG measures what is seen, so a
|
|
11
|
+
* translucent foreground is blended over the background first. A translucent background shows whatever is behind it, which a
|
|
12
|
+
* pair does not name, so it has no ratio.
|
|
13
|
+
*/
|
|
14
|
+
export declare function contrastBetween(fg: Color, bg: Color): number | undefined;
|
|
15
|
+
/** A ratio as the message prints it: floored to two decimals, so a failing 4.496 never reads as the 4.50 it misses. */
|
|
16
|
+
export declare const ratioMessage: (ratio: number) => string;
|
|
17
|
+
/** Expands "{a.b}" to that token and "{a.*}" to every color token under a. */
|
|
18
|
+
export declare function expand(ref: string, items: TokenItem[]): TokenItem[];
|
|
19
|
+
/** The token's path, then the path of each token it aliases in turn. */
|
|
20
|
+
export declare function aliasChain(items: TokenItem[], path: string): string[];
|
|
21
|
+
/**
|
|
22
|
+
* The listed pairs that name this foreground on this background. A pair written on a token that the foreground or the
|
|
23
|
+
* background aliases counts, because the alias is the same color: `blazon check`, `blazon can` and the shadcn notes all use this one rule.
|
|
24
|
+
*/
|
|
25
|
+
export declare function matchingPairs<T extends {
|
|
26
|
+
fg: string;
|
|
27
|
+
bg: string;
|
|
28
|
+
}>(items: TokenItem[], listed: T[], fgPath: string, bgPath: string): T[];
|
|
29
|
+
export declare function contrastFindings(pair: ContrastPair, rulePath: string, items: TokenItem[]): Finding[];
|
|
30
|
+
//# sourceMappingURL=contrast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contrast.d.ts","sourceRoot":"","sources":["../../../src/core/checker/contrast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAI5F,gDAAgD;AAChD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAsC,CAAC;AAElG,kKAAkK;AAClK,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAMzD;AAED,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,CAExD;AAQD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAOxE;AAED,uHAAuH;AACvH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MAA2D,CAAC;AAEzG,8EAA8E;AAC9E,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAQnE;AAED,wEAAwE;AACxE,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAKrE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,EAAE,CAIxI;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,EAAE,CA2BpG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicates.d.ts","sourceRoot":"","sources":["../../../src/core/checker/duplicates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAG/D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,EAAE,CAiB/D"}
|