@ggts-sh/spec 0.43.0
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 +75 -0
- package/dist/artifact.d.ts +11 -0
- package/dist/artifact.d.ts.map +1 -0
- package/dist/artifact.js +71 -0
- package/dist/artifact.js.map +1 -0
- package/dist/builder-core.d.ts +100 -0
- package/dist/builder-core.d.ts.map +1 -0
- package/dist/builder-core.js +176 -0
- package/dist/builder-core.js.map +1 -0
- package/dist/builder-data.d.ts +36 -0
- package/dist/builder-data.d.ts.map +1 -0
- package/dist/builder-data.js +123 -0
- package/dist/builder-data.js.map +1 -0
- package/dist/builder-geoms.d.ts +128 -0
- package/dist/builder-geoms.d.ts.map +1 -0
- package/dist/builder-geoms.js +221 -0
- package/dist/builder-geoms.js.map +1 -0
- package/dist/builder-options.d.ts +323 -0
- package/dist/builder-options.d.ts.map +1 -0
- package/dist/builder-options.js +2 -0
- package/dist/builder-options.js.map +1 -0
- package/dist/builder-scales.d.ts +160 -0
- package/dist/builder-scales.d.ts.map +1 -0
- package/dist/builder-scales.js +322 -0
- package/dist/builder-scales.js.map +1 -0
- package/dist/builder.d.ts +242 -0
- package/dist/builder.d.ts.map +1 -0
- package/dist/builder.js +42 -0
- package/dist/builder.js.map +1 -0
- package/dist/capabilities-data.d.ts +72 -0
- package/dist/capabilities-data.d.ts.map +1 -0
- package/dist/capabilities-data.js +337 -0
- package/dist/capabilities-data.js.map +1 -0
- package/dist/capabilities-helpers.d.ts +31 -0
- package/dist/capabilities-helpers.d.ts.map +1 -0
- package/dist/capabilities-helpers.js +41 -0
- package/dist/capabilities-helpers.js.map +1 -0
- package/dist/capabilities.d.ts +22 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +154 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/coord-helpers.d.ts +102 -0
- package/dist/coord-helpers.d.ts.map +1 -0
- package/dist/coord-helpers.js +90 -0
- package/dist/coord-helpers.js.map +1 -0
- package/dist/coord-reference-build.d.ts +50 -0
- package/dist/coord-reference-build.d.ts.map +1 -0
- package/dist/coord-reference-build.js +211 -0
- package/dist/coord-reference-build.js.map +1 -0
- package/dist/coord-reference.d.ts +52 -0
- package/dist/coord-reference.d.ts.map +1 -0
- package/dist/coord-reference.js +27 -0
- package/dist/coord-reference.js.map +1 -0
- package/dist/error-catalog.d.ts +258 -0
- package/dist/error-catalog.d.ts.map +1 -0
- package/dist/error-catalog.js +235 -0
- package/dist/error-catalog.js.map +1 -0
- package/dist/error-prose-shared.d.ts +100 -0
- package/dist/error-prose-shared.d.ts.map +1 -0
- package/dist/error-prose-shared.js +95 -0
- package/dist/error-prose-shared.js.map +1 -0
- package/dist/errors.d.ts +39 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +52 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated/coord-reference-data.d.ts +189 -0
- package/dist/generated/coord-reference-data.d.ts.map +1 -0
- package/dist/generated/coord-reference-data.js +212 -0
- package/dist/generated/coord-reference-data.js.map +1 -0
- package/dist/generated/geom-param-keys.d.ts +58 -0
- package/dist/generated/geom-param-keys.d.ts.map +1 -0
- package/dist/generated/geom-param-keys.js +223 -0
- package/dist/generated/geom-param-keys.js.map +1 -0
- package/dist/generated/geom-reference-data.d.ts +2377 -0
- package/dist/generated/geom-reference-data.d.ts.map +1 -0
- package/dist/generated/geom-reference-data.js +2790 -0
- package/dist/generated/geom-reference-data.js.map +1 -0
- package/dist/generated/guide-reference-data.d.ts +219 -0
- package/dist/generated/guide-reference-data.d.ts.map +1 -0
- package/dist/generated/guide-reference-data.js +253 -0
- package/dist/generated/guide-reference-data.js.map +1 -0
- package/dist/generated/plot-spec-validator.d.ts +2 -0
- package/dist/generated/plot-spec-validator.d.ts.map +1 -0
- package/dist/generated/plot-spec-validator.js +6274 -0
- package/dist/generated/plot-spec-validator.js.map +1 -0
- package/dist/generated/position-reference-data.d.ts +82 -0
- package/dist/generated/position-reference-data.d.ts.map +1 -0
- package/dist/generated/position-reference-data.js +181 -0
- package/dist/generated/position-reference-data.js.map +1 -0
- package/dist/generated/scale-reference-data.d.ts +8366 -0
- package/dist/generated/scale-reference-data.d.ts.map +1 -0
- package/dist/generated/scale-reference-data.js +9821 -0
- package/dist/generated/scale-reference-data.js.map +1 -0
- package/dist/generated/stat-reference-data.d.ts +241 -0
- package/dist/generated/stat-reference-data.d.ts.map +1 -0
- package/dist/generated/stat-reference-data.js +311 -0
- package/dist/generated/stat-reference-data.js.map +1 -0
- package/dist/geom-params-build.d.ts +3 -0
- package/dist/geom-params-build.d.ts.map +1 -0
- package/dist/geom-params-build.js +80 -0
- package/dist/geom-params-build.js.map +1 -0
- package/dist/geom-params.d.ts +13 -0
- package/dist/geom-params.d.ts.map +1 -0
- package/dist/geom-params.js +7 -0
- package/dist/geom-params.js.map +1 -0
- package/dist/geom-reference-build.d.ts +29 -0
- package/dist/geom-reference-build.d.ts.map +1 -0
- package/dist/geom-reference-build.js +221 -0
- package/dist/geom-reference-build.js.map +1 -0
- package/dist/geom-reference.d.ts +52 -0
- package/dist/geom-reference.d.ts.map +1 -0
- package/dist/geom-reference.js +72 -0
- package/dist/geom-reference.js.map +1 -0
- package/dist/guide-helpers.d.ts +20 -0
- package/dist/guide-helpers.d.ts.map +1 -0
- package/dist/guide-helpers.js +25 -0
- package/dist/guide-helpers.js.map +1 -0
- package/dist/guide-reference-build.d.ts +42 -0
- package/dist/guide-reference-build.d.ts.map +1 -0
- package/dist/guide-reference-build.js +180 -0
- package/dist/guide-reference-build.js.map +1 -0
- package/dist/guide-reference.d.ts +48 -0
- package/dist/guide-reference.d.ts.map +1 -0
- package/dist/guide-reference.js +32 -0
- package/dist/guide-reference.js.map +1 -0
- package/dist/hue-grey-palettes.d.ts +15 -0
- package/dist/hue-grey-palettes.d.ts.map +1 -0
- package/dist/hue-grey-palettes.js +77 -0
- package/dist/hue-grey-palettes.js.map +1 -0
- package/dist/index.d.ts +364 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +225 -0
- package/dist/index.js.map +1 -0
- package/dist/lint-catalog.d.ts +47 -0
- package/dist/lint-catalog.d.ts.map +1 -0
- package/dist/lint-catalog.js +39 -0
- package/dist/lint-catalog.js.map +1 -0
- package/dist/lint-layer-rules.d.ts +18 -0
- package/dist/lint-layer-rules.d.ts.map +1 -0
- package/dist/lint-layer-rules.js +145 -0
- package/dist/lint-layer-rules.js.map +1 -0
- package/dist/lint-scale-rules.d.ts +8 -0
- package/dist/lint-scale-rules.d.ts.map +1 -0
- package/dist/lint-scale-rules.js +254 -0
- package/dist/lint-scale-rules.js.map +1 -0
- package/dist/lint.d.ts +62 -0
- package/dist/lint.d.ts.map +1 -0
- package/dist/lint.js +57 -0
- package/dist/lint.js.map +1 -0
- package/dist/normalize-coord.d.ts +8 -0
- package/dist/normalize-coord.d.ts.map +1 -0
- package/dist/normalize-coord.js +123 -0
- package/dist/normalize-coord.js.map +1 -0
- package/dist/normalize-input-layers-marks.d.ts +208 -0
- package/dist/normalize-input-layers-marks.d.ts.map +1 -0
- package/dist/normalize-input-layers-marks.js +2 -0
- package/dist/normalize-input-layers-marks.js.map +1 -0
- package/dist/normalize-input-layers-special.d.ts +131 -0
- package/dist/normalize-input-layers-special.d.ts.map +1 -0
- package/dist/normalize-input-layers-special.js +2 -0
- package/dist/normalize-input-layers-special.js.map +1 -0
- package/dist/normalize-input.d.ts +81 -0
- package/dist/normalize-input.d.ts.map +1 -0
- package/dist/normalize-input.js +2 -0
- package/dist/normalize-input.js.map +1 -0
- package/dist/normalize-paint.d.ts +8 -0
- package/dist/normalize-paint.d.ts.map +1 -0
- package/dist/normalize-paint.js +83 -0
- package/dist/normalize-paint.js.map +1 -0
- package/dist/normalize-scales.d.ts +7 -0
- package/dist/normalize-scales.d.ts.map +1 -0
- package/dist/normalize-scales.js +90 -0
- package/dist/normalize-scales.js.map +1 -0
- package/dist/normalize.d.ts +46 -0
- package/dist/normalize.d.ts.map +1 -0
- package/dist/normalize.js +279 -0
- package/dist/normalize.js.map +1 -0
- package/dist/paint-helpers.d.ts +45 -0
- package/dist/paint-helpers.d.ts.map +1 -0
- package/dist/paint-helpers.js +48 -0
- package/dist/paint-helpers.js.map +1 -0
- package/dist/pipeline-error-catalog.d.ts +319 -0
- package/dist/pipeline-error-catalog.d.ts.map +1 -0
- package/dist/pipeline-error-catalog.js +260 -0
- package/dist/pipeline-error-catalog.js.map +1 -0
- package/dist/portability-check.d.ts +35 -0
- package/dist/portability-check.d.ts.map +1 -0
- package/dist/portability-check.js +121 -0
- package/dist/portability-check.js.map +1 -0
- package/dist/portability-lossy.d.ts +19 -0
- package/dist/portability-lossy.d.ts.map +1 -0
- package/dist/portability-lossy.js +65 -0
- package/dist/portability-lossy.js.map +1 -0
- package/dist/portability.d.ts +23 -0
- package/dist/portability.d.ts.map +1 -0
- package/dist/portability.js +23 -0
- package/dist/portability.js.map +1 -0
- package/dist/portable-builder.d.ts +215 -0
- package/dist/portable-builder.d.ts.map +1 -0
- package/dist/portable-builder.js +27 -0
- package/dist/portable-builder.js.map +1 -0
- package/dist/portable-entry.d.ts +16 -0
- package/dist/portable-entry.d.ts.map +1 -0
- package/dist/portable-entry.js +14 -0
- package/dist/portable-entry.js.map +1 -0
- package/dist/position-reference-build.d.ts +29 -0
- package/dist/position-reference-build.d.ts.map +1 -0
- package/dist/position-reference-build.js +115 -0
- package/dist/position-reference-build.js.map +1 -0
- package/dist/position-reference.d.ts +34 -0
- package/dist/position-reference.d.ts.map +1 -0
- package/dist/position-reference.js +19 -0
- package/dist/position-reference.js.map +1 -0
- package/dist/runtime.d.ts +139 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +2 -0
- package/dist/runtime.js.map +1 -0
- package/dist/scale-color-helpers.d.ts +121 -0
- package/dist/scale-color-helpers.d.ts.map +1 -0
- package/dist/scale-color-helpers.js +188 -0
- package/dist/scale-color-helpers.js.map +1 -0
- package/dist/scale-color-hue-grey.d.ts +52 -0
- package/dist/scale-color-hue-grey.d.ts.map +1 -0
- package/dist/scale-color-hue-grey.js +60 -0
- package/dist/scale-color-hue-grey.js.map +1 -0
- package/dist/scale-color-stops.d.ts +85 -0
- package/dist/scale-color-stops.d.ts.map +1 -0
- package/dist/scale-color-stops.js +87 -0
- package/dist/scale-color-stops.js.map +1 -0
- package/dist/scale-color-viridis.d.ts +52 -0
- package/dist/scale-color-viridis.d.ts.map +1 -0
- package/dist/scale-color-viridis.js +68 -0
- package/dist/scale-color-viridis.js.map +1 -0
- package/dist/scale-helpers.d.ts +20 -0
- package/dist/scale-helpers.d.ts.map +1 -0
- package/dist/scale-helpers.js +20 -0
- package/dist/scale-helpers.js.map +1 -0
- package/dist/scale-multi-helpers.d.ts +61 -0
- package/dist/scale-multi-helpers.d.ts.map +1 -0
- package/dist/scale-multi-helpers.js +147 -0
- package/dist/scale-multi-helpers.js.map +1 -0
- package/dist/scale-position-helpers.d.ts +81 -0
- package/dist/scale-position-helpers.d.ts.map +1 -0
- package/dist/scale-position-helpers.js +133 -0
- package/dist/scale-position-helpers.js.map +1 -0
- package/dist/scale-reference-build.d.ts +50 -0
- package/dist/scale-reference-build.d.ts.map +1 -0
- package/dist/scale-reference-build.js +147 -0
- package/dist/scale-reference-build.js.map +1 -0
- package/dist/scale-reference-classify-color.d.ts +11 -0
- package/dist/scale-reference-classify-color.d.ts.map +1 -0
- package/dist/scale-reference-classify-color.js +292 -0
- package/dist/scale-reference-classify-color.js.map +1 -0
- package/dist/scale-reference-classify-position.d.ts +10 -0
- package/dist/scale-reference-classify-position.d.ts.map +1 -0
- package/dist/scale-reference-classify-position.js +137 -0
- package/dist/scale-reference-classify-position.js.map +1 -0
- package/dist/scale-reference-classify-style.d.ts +10 -0
- package/dist/scale-reference-classify-style.d.ts.map +1 -0
- package/dist/scale-reference-classify-style.js +194 -0
- package/dist/scale-reference-classify-style.js.map +1 -0
- package/dist/scale-reference-classify-support.d.ts +37 -0
- package/dist/scale-reference-classify-support.d.ts.map +1 -0
- package/dist/scale-reference-classify-support.js +206 -0
- package/dist/scale-reference-classify-support.js.map +1 -0
- package/dist/scale-reference.d.ts +80 -0
- package/dist/scale-reference.d.ts.map +1 -0
- package/dist/scale-reference.js +85 -0
- package/dist/scale-reference.js.map +1 -0
- package/dist/scale-style-helpers.d.ts +158 -0
- package/dist/scale-style-helpers.d.ts.map +1 -0
- package/dist/scale-style-helpers.js +197 -0
- package/dist/scale-style-helpers.js.map +1 -0
- package/dist/schema-catalog.d.ts +62 -0
- package/dist/schema-catalog.d.ts.map +1 -0
- package/dist/schema-catalog.js +208 -0
- package/dist/schema-catalog.js.map +1 -0
- package/dist/schema-declarations.d.ts +1585 -0
- package/dist/schema-declarations.d.ts.map +1 -0
- package/dist/schema-declarations.js +51 -0
- package/dist/schema-declarations.js.map +1 -0
- package/dist/schema-decls-data.d.ts +58 -0
- package/dist/schema-decls-data.d.ts.map +1 -0
- package/dist/schema-decls-data.js +151 -0
- package/dist/schema-decls-data.js.map +1 -0
- package/dist/schema-decls-guides-theme.d.ts +166 -0
- package/dist/schema-decls-guides-theme.d.ts.map +1 -0
- package/dist/schema-decls-guides-theme.js +251 -0
- package/dist/schema-decls-guides-theme.js.map +1 -0
- package/dist/schema-decls-layers-col-boxplot.d.ts +118 -0
- package/dist/schema-decls-layers-col-boxplot.d.ts.map +1 -0
- package/dist/schema-decls-layers-col-boxplot.js +239 -0
- package/dist/schema-decls-layers-col-boxplot.js.map +1 -0
- package/dist/schema-decls-layers-count-pointrange.d.ts +89 -0
- package/dist/schema-decls-layers-count-pointrange.d.ts.map +1 -0
- package/dist/schema-decls-layers-count-pointrange.js +190 -0
- package/dist/schema-decls-layers-count-pointrange.js.map +1 -0
- package/dist/schema-decls-layers-crossbar-jitter.d.ts +129 -0
- package/dist/schema-decls-layers-crossbar-jitter.d.ts.map +1 -0
- package/dist/schema-decls-layers-crossbar-jitter.js +255 -0
- package/dist/schema-decls-layers-crossbar-jitter.js.map +1 -0
- package/dist/schema-decls-layers-point-path.d.ts +49 -0
- package/dist/schema-decls-layers-point-path.d.ts.map +1 -0
- package/dist/schema-decls-layers-point-path.js +156 -0
- package/dist/schema-decls-layers-point-path.js.map +1 -0
- package/dist/schema-decls-layers-sf-blank.d.ts +89 -0
- package/dist/schema-decls-layers-sf-blank.d.ts.map +1 -0
- package/dist/schema-decls-layers-sf-blank.js +254 -0
- package/dist/schema-decls-layers-sf-blank.js.map +1 -0
- package/dist/schema-decls-layers-text-map.d.ts +80 -0
- package/dist/schema-decls-layers-text-map.d.ts.map +1 -0
- package/dist/schema-decls-layers-text-map.js +151 -0
- package/dist/schema-decls-layers-text-map.js.map +1 -0
- package/dist/schema-decls-paint.d.ts +39 -0
- package/dist/schema-decls-paint.d.ts.map +1 -0
- package/dist/schema-decls-paint.js +95 -0
- package/dist/schema-decls-paint.js.map +1 -0
- package/dist/schema-decls-params-area-abline.d.ts +85 -0
- package/dist/schema-decls-params-area-abline.d.ts.map +1 -0
- package/dist/schema-decls-params-area-abline.js +259 -0
- package/dist/schema-decls-params-area-abline.js.map +1 -0
- package/dist/schema-decls-params-col-contour.d.ts +61 -0
- package/dist/schema-decls-params-col-contour.d.ts.map +1 -0
- package/dist/schema-decls-params-col-contour.js +202 -0
- package/dist/schema-decls-params-col-contour.js.map +1 -0
- package/dist/schema-decls-params-curve-label.d.ts +64 -0
- package/dist/schema-decls-params-curve-label.d.ts.map +1 -0
- package/dist/schema-decls-params-curve-label.js +204 -0
- package/dist/schema-decls-params-curve-label.js.map +1 -0
- package/dist/schema-decls-params-errorbar-position.d.ts +83 -0
- package/dist/schema-decls-params-errorbar-position.d.ts.map +1 -0
- package/dist/schema-decls-params-errorbar-position.js +264 -0
- package/dist/schema-decls-params-errorbar-position.js.map +1 -0
- package/dist/schema-decls-params-point-path.d.ts +61 -0
- package/dist/schema-decls-params-point-path.d.ts.map +1 -0
- package/dist/schema-decls-params-point-path.js +240 -0
- package/dist/schema-decls-params-point-path.js.map +1 -0
- package/dist/schema-decls-params-violin-summary.d.ts +78 -0
- package/dist/schema-decls-params-violin-summary.d.ts.map +1 -0
- package/dist/schema-decls-params-violin-summary.js +272 -0
- package/dist/schema-decls-params-violin-summary.js.map +1 -0
- package/dist/schema-decls-plot.d.ts +80 -0
- package/dist/schema-decls-plot.d.ts.map +1 -0
- package/dist/schema-decls-plot.js +222 -0
- package/dist/schema-decls-plot.js.map +1 -0
- package/dist/schema-decls-scales-guides.d.ts +291 -0
- package/dist/schema-decls-scales-guides.d.ts.map +1 -0
- package/dist/schema-decls-scales-guides.js +189 -0
- package/dist/schema-decls-scales-guides.js.map +1 -0
- package/dist/schema-decls-scales.d.ts +124 -0
- package/dist/schema-decls-scales.d.ts.map +1 -0
- package/dist/schema-decls-scales.js +279 -0
- package/dist/schema-decls-scales.js.map +1 -0
- package/dist/schema-imports.d.ts +1679 -0
- package/dist/schema-imports.d.ts.map +1 -0
- package/dist/schema-imports.js +104 -0
- package/dist/schema-imports.js.map +1 -0
- package/dist/schema-name-schemas.d.ts +18 -0
- package/dist/schema-name-schemas.d.ts.map +1 -0
- package/dist/schema-name-schemas.js +13 -0
- package/dist/schema-name-schemas.js.map +1 -0
- package/dist/schema-names.d.ts +53 -0
- package/dist/schema-names.d.ts.map +1 -0
- package/dist/schema-names.js +229 -0
- package/dist/schema-names.js.map +1 -0
- package/dist/schema-types.d.ts +336 -0
- package/dist/schema-types.d.ts.map +1 -0
- package/dist/schema-types.js +10 -0
- package/dist/schema-types.js.map +1 -0
- package/dist/schema.d.ts +38 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +34 -0
- package/dist/schema.js.map +1 -0
- package/dist/stat-reference-build.d.ts +24 -0
- package/dist/stat-reference-build.d.ts.map +1 -0
- package/dist/stat-reference-build.js +86 -0
- package/dist/stat-reference-build.js.map +1 -0
- package/dist/stat-reference.d.ts +33 -0
- package/dist/stat-reference.d.ts.map +1 -0
- package/dist/stat-reference.js +19 -0
- package/dist/stat-reference.js.map +1 -0
- package/dist/structural-gate.d.ts +15 -0
- package/dist/structural-gate.d.ts.map +1 -0
- package/dist/structural-gate.js +34 -0
- package/dist/structural-gate.js.map +1 -0
- package/dist/temporal-column.d.ts +33 -0
- package/dist/temporal-column.d.ts.map +1 -0
- package/dist/temporal-column.js +247 -0
- package/dist/temporal-column.js.map +1 -0
- package/dist/temporal-guides.d.ts +11 -0
- package/dist/temporal-guides.d.ts.map +1 -0
- package/dist/temporal-guides.js +11 -0
- package/dist/temporal-guides.js.map +1 -0
- package/dist/temporal-interval-schema.d.ts +9 -0
- package/dist/temporal-interval-schema.d.ts.map +1 -0
- package/dist/temporal-interval-schema.js +25 -0
- package/dist/temporal-interval-schema.js.map +1 -0
- package/dist/temporal-interval.d.ts +29 -0
- package/dist/temporal-interval.d.ts.map +1 -0
- package/dist/temporal-interval.js +122 -0
- package/dist/temporal-interval.js.map +1 -0
- package/dist/temporal-parse-core.d.ts +96 -0
- package/dist/temporal-parse-core.d.ts.map +1 -0
- package/dist/temporal-parse-core.js +235 -0
- package/dist/temporal-parse-core.js.map +1 -0
- package/dist/temporal-parse-format.d.ts +13 -0
- package/dist/temporal-parse-format.d.ts.map +1 -0
- package/dist/temporal-parse-format.js +180 -0
- package/dist/temporal-parse-format.js.map +1 -0
- package/dist/temporal-parse-schema.d.ts +11 -0
- package/dist/temporal-parse-schema.d.ts.map +1 -0
- package/dist/temporal-parse-schema.js +23 -0
- package/dist/temporal-parse-schema.js.map +1 -0
- package/dist/temporal-parse.d.ts +18 -0
- package/dist/temporal-parse.d.ts.map +1 -0
- package/dist/temporal-parse.js +183 -0
- package/dist/temporal-parse.js.map +1 -0
- package/dist/temporal-polyfill.d.ts +3 -0
- package/dist/temporal-polyfill.d.ts.map +1 -0
- package/dist/temporal-polyfill.js +25 -0
- package/dist/temporal-polyfill.js.map +1 -0
- package/dist/temporal-ticks.d.ts +20 -0
- package/dist/temporal-ticks.d.ts.map +1 -0
- package/dist/temporal-ticks.js +246 -0
- package/dist/temporal-ticks.js.map +1 -0
- package/dist/temporal.d.ts +109 -0
- package/dist/temporal.d.ts.map +1 -0
- package/dist/temporal.js +73 -0
- package/dist/temporal.js.map +1 -0
- package/dist/validate-data-checks-color-temporal.d.ts +58 -0
- package/dist/validate-data-checks-color-temporal.d.ts.map +1 -0
- package/dist/validate-data-checks-color-temporal.js +168 -0
- package/dist/validate-data-checks-color-temporal.js.map +1 -0
- package/dist/validate-data-checks-color.d.ts +28 -0
- package/dist/validate-data-checks-color.d.ts.map +1 -0
- package/dist/validate-data-checks-color.js +296 -0
- package/dist/validate-data-checks-color.js.map +1 -0
- package/dist/validate-data-checks-layer.d.ts +37 -0
- package/dist/validate-data-checks-layer.d.ts.map +1 -0
- package/dist/validate-data-checks-layer.js +343 -0
- package/dist/validate-data-checks-layer.js.map +1 -0
- package/dist/validate-data-checks-position.d.ts +45 -0
- package/dist/validate-data-checks-position.d.ts.map +1 -0
- package/dist/validate-data-checks-position.js +204 -0
- package/dist/validate-data-checks-position.js.map +1 -0
- package/dist/validate-data-checks-style-finite.d.ts +24 -0
- package/dist/validate-data-checks-style-finite.d.ts.map +1 -0
- package/dist/validate-data-checks-style-finite.js +40 -0
- package/dist/validate-data-checks-style-finite.js.map +1 -0
- package/dist/validate-data-checks-style-numeric.d.ts +26 -0
- package/dist/validate-data-checks-style-numeric.d.ts.map +1 -0
- package/dist/validate-data-checks-style-numeric.js +327 -0
- package/dist/validate-data-checks-style-numeric.js.map +1 -0
- package/dist/validate-data-checks-style.d.ts +14 -0
- package/dist/validate-data-checks-style.d.ts.map +1 -0
- package/dist/validate-data-checks-style.js +14 -0
- package/dist/validate-data-checks-style.js.map +1 -0
- package/dist/validate-data-checks-temporal.d.ts +57 -0
- package/dist/validate-data-checks-temporal.d.ts.map +1 -0
- package/dist/validate-data-checks-temporal.js +83 -0
- package/dist/validate-data-checks-temporal.js.map +1 -0
- package/dist/validate-data-checks.d.ts +31 -0
- package/dist/validate-data-checks.d.ts.map +1 -0
- package/dist/validate-data-checks.js +110 -0
- package/dist/validate-data-checks.js.map +1 -0
- package/dist/validate-data-evidence.d.ts +69 -0
- package/dist/validate-data-evidence.d.ts.map +1 -0
- package/dist/validate-data-evidence.js +329 -0
- package/dist/validate-data-evidence.js.map +1 -0
- package/dist/validate-data.d.ts +73 -0
- package/dist/validate-data.d.ts.map +1 -0
- package/dist/validate-data.js +30 -0
- package/dist/validate-data.js.map +1 -0
- package/dist/validate-map-errors.d.ts +32 -0
- package/dist/validate-map-errors.d.ts.map +1 -0
- package/dist/validate-map-errors.js +76 -0
- package/dist/validate-map-errors.js.map +1 -0
- package/dist/validate-map-forms.d.ts +43 -0
- package/dist/validate-map-forms.d.ts.map +1 -0
- package/dist/validate-map-forms.js +125 -0
- package/dist/validate-map-forms.js.map +1 -0
- package/dist/validate-map-path-keywords.d.ts +11 -0
- package/dist/validate-map-path-keywords.d.ts.map +1 -0
- package/dist/validate-map-path-keywords.js +95 -0
- package/dist/validate-map-path-keywords.js.map +1 -0
- package/dist/validate-map-path-unions.d.ts +27 -0
- package/dist/validate-map-path-unions.d.ts.map +1 -0
- package/dist/validate-map-path-unions.js +200 -0
- package/dist/validate-map-path-unions.js.map +1 -0
- package/dist/validate-schema-shape.d.ts +69 -0
- package/dist/validate-schema-shape.d.ts.map +1 -0
- package/dist/validate-schema-shape.js +156 -0
- package/dist/validate-schema-shape.js.map +1 -0
- package/dist/validate-schema-walk.d.ts +34 -0
- package/dist/validate-schema-walk.d.ts.map +1 -0
- package/dist/validate-schema-walk.js +216 -0
- package/dist/validate-schema-walk.js.map +1 -0
- package/dist/validate-structure-facet.d.ts +8 -0
- package/dist/validate-structure-facet.d.ts.map +1 -0
- package/dist/validate-structure-facet.js +67 -0
- package/dist/validate-structure-facet.js.map +1 -0
- package/dist/validate-structure-layer-computed-y.d.ts +14 -0
- package/dist/validate-structure-layer-computed-y.d.ts.map +1 -0
- package/dist/validate-structure-layer-computed-y.js +70 -0
- package/dist/validate-structure-layer-computed-y.js.map +1 -0
- package/dist/validate-structure-layer-ribbon.d.ts +8 -0
- package/dist/validate-structure-layer-ribbon.d.ts.map +1 -0
- package/dist/validate-structure-layer-ribbon.js +36 -0
- package/dist/validate-structure-layer-ribbon.js.map +1 -0
- package/dist/validate-structure-layer-rule.d.ts +14 -0
- package/dist/validate-structure-layer-rule.d.ts.map +1 -0
- package/dist/validate-structure-layer-rule.js +90 -0
- package/dist/validate-structure-layer-rule.js.map +1 -0
- package/dist/validate-structure-layer-shared.d.ts +12 -0
- package/dist/validate-structure-layer-shared.d.ts.map +1 -0
- package/dist/validate-structure-layer-shared.js +17 -0
- package/dist/validate-structure-layer-shared.js.map +1 -0
- package/dist/validate-structure-layers.d.ts +12 -0
- package/dist/validate-structure-layers.d.ts.map +1 -0
- package/dist/validate-structure-layers.js +292 -0
- package/dist/validate-structure-layers.js.map +1 -0
- package/dist/validate-structure-paint.d.ts +12 -0
- package/dist/validate-structure-paint.d.ts.map +1 -0
- package/dist/validate-structure-paint.js +87 -0
- package/dist/validate-structure-paint.js.map +1 -0
- package/dist/validate-structure-scales.d.ts +10 -0
- package/dist/validate-structure-scales.d.ts.map +1 -0
- package/dist/validate-structure-scales.js +242 -0
- package/dist/validate-structure-scales.js.map +1 -0
- package/dist/validate-structure-style-bins.d.ts +17 -0
- package/dist/validate-structure-style-bins.d.ts.map +1 -0
- package/dist/validate-structure-style-bins.js +150 -0
- package/dist/validate-structure-style-bins.js.map +1 -0
- package/dist/validate-structure.d.ts +16 -0
- package/dist/validate-structure.d.ts.map +1 -0
- package/dist/validate-structure.js +16 -0
- package/dist/validate-structure.js.map +1 -0
- package/dist/validate.d.ts +24 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/validate.js +178 -0
- package/dist/validate.js.map +1 -0
- package/package.json +59 -0
- package/schema/v0.json +9618 -0
- package/src/artifact.ts +81 -0
- package/src/builder-core.ts +276 -0
- package/src/builder-data.ts +156 -0
- package/src/builder-geoms.ts +290 -0
- package/src/builder-options.ts +428 -0
- package/src/builder-scales.ts +443 -0
- package/src/builder.ts +125 -0
- package/src/capabilities-data.ts +336 -0
- package/src/capabilities-helpers.ts +54 -0
- package/src/capabilities.ts +159 -0
- package/src/coord-helpers.ts +177 -0
- package/src/coord-reference-build.ts +283 -0
- package/src/coord-reference.ts +75 -0
- package/src/error-catalog.ts +253 -0
- package/src/error-prose-shared.ts +106 -0
- package/src/errors.ts +87 -0
- package/src/generated/coord-reference-data.ts +235 -0
- package/src/generated/geom-param-keys.ts +222 -0
- package/src/generated/geom-reference-data.ts +3024 -0
- package/src/generated/guide-reference-data.ts +284 -0
- package/src/generated/plot-spec-validator.ts +7335 -0
- package/src/generated/position-reference-data.ts +191 -0
- package/src/generated/scale-reference-data.ts +10665 -0
- package/src/generated/stat-reference-data.ts +339 -0
- package/src/geom-params-build.ts +92 -0
- package/src/geom-params.ts +14 -0
- package/src/geom-reference-build.ts +292 -0
- package/src/geom-reference.ts +127 -0
- package/src/guide-helpers.ts +44 -0
- package/src/guide-reference-build.ts +249 -0
- package/src/guide-reference.ts +76 -0
- package/src/hue-grey-palettes.ts +82 -0
- package/src/index.ts +400 -0
- package/src/lint-catalog.ts +57 -0
- package/src/lint-layer-rules.ts +175 -0
- package/src/lint-scale-rules.ts +285 -0
- package/src/lint.ts +126 -0
- package/src/normalize-coord.ts +126 -0
- package/src/normalize-input-layers-marks.ts +276 -0
- package/src/normalize-input-layers-special.ts +252 -0
- package/src/normalize-input.ts +154 -0
- package/src/normalize-paint.ts +98 -0
- package/src/normalize-scales.ts +108 -0
- package/src/normalize.ts +403 -0
- package/src/paint-helpers.ts +98 -0
- package/src/pipeline-error-catalog.ts +278 -0
- package/src/portability-check.ts +155 -0
- package/src/portability-lossy.ts +81 -0
- package/src/portability.ts +31 -0
- package/src/portable-builder.ts +35 -0
- package/src/portable-entry.ts +37 -0
- package/src/position-reference-build.ts +164 -0
- package/src/position-reference.ts +41 -0
- package/src/runtime.ts +198 -0
- package/src/scale-color-helpers.ts +263 -0
- package/src/scale-color-hue-grey.ts +95 -0
- package/src/scale-color-stops.ts +177 -0
- package/src/scale-color-viridis.ts +99 -0
- package/src/scale-helpers.ts +264 -0
- package/src/scale-multi-helpers.ts +220 -0
- package/src/scale-position-helpers.ts +231 -0
- package/src/scale-reference-build.ts +222 -0
- package/src/scale-reference-classify-color.ts +334 -0
- package/src/scale-reference-classify-position.ts +164 -0
- package/src/scale-reference-classify-style.ts +229 -0
- package/src/scale-reference-classify-support.ts +298 -0
- package/src/scale-reference.ts +165 -0
- package/src/scale-style-helpers.ts +316 -0
- package/src/schema-catalog.ts +222 -0
- package/src/schema-declarations.ts +51 -0
- package/src/schema-decls-data.ts +272 -0
- package/src/schema-decls-guides-theme.ts +395 -0
- package/src/schema-decls-layers-col-boxplot.ts +410 -0
- package/src/schema-decls-layers-count-pointrange.ts +321 -0
- package/src/schema-decls-layers-crossbar-jitter.ts +443 -0
- package/src/schema-decls-layers-point-path.ts +246 -0
- package/src/schema-decls-layers-sf-blank.ts +408 -0
- package/src/schema-decls-layers-text-map.ts +259 -0
- package/src/schema-decls-paint.ts +124 -0
- package/src/schema-decls-params-area-abline.ts +440 -0
- package/src/schema-decls-params-col-contour.ts +333 -0
- package/src/schema-decls-params-curve-label.ts +343 -0
- package/src/schema-decls-params-errorbar-position.ts +446 -0
- package/src/schema-decls-params-point-path.ts +394 -0
- package/src/schema-decls-params-violin-summary.ts +447 -0
- package/src/schema-decls-plot.ts +385 -0
- package/src/schema-decls-scales-guides.ts +233 -0
- package/src/schema-decls-scales.ts +432 -0
- package/src/schema-imports.ts +116 -0
- package/src/schema-name-schemas.ts +37 -0
- package/src/schema-names.ts +243 -0
- package/src/schema-types.ts +400 -0
- package/src/schema.ts +287 -0
- package/src/stat-reference-build.ts +145 -0
- package/src/stat-reference.ts +38 -0
- package/src/structural-gate.ts +42 -0
- package/src/temporal-column.ts +323 -0
- package/src/temporal-guides.ts +32 -0
- package/src/temporal-interval-schema.ts +40 -0
- package/src/temporal-interval.ts +151 -0
- package/src/temporal-parse-core.ts +331 -0
- package/src/temporal-parse-format.ts +222 -0
- package/src/temporal-parse-schema.ts +38 -0
- package/src/temporal-parse.ts +259 -0
- package/src/temporal-polyfill.ts +27 -0
- package/src/temporal-ticks.ts +312 -0
- package/src/temporal.ts +112 -0
- package/src/validate-data-checks-color-temporal.ts +261 -0
- package/src/validate-data-checks-color.ts +395 -0
- package/src/validate-data-checks-layer.ts +492 -0
- package/src/validate-data-checks-position.ts +275 -0
- package/src/validate-data-checks-style-finite.ts +55 -0
- package/src/validate-data-checks-style-numeric.ts +455 -0
- package/src/validate-data-checks-style.ts +13 -0
- package/src/validate-data-checks-temporal.ts +129 -0
- package/src/validate-data-checks.ts +157 -0
- package/src/validate-data-evidence.ts +419 -0
- package/src/validate-data.ts +114 -0
- package/src/validate-map-errors.ts +126 -0
- package/src/validate-map-forms.ts +148 -0
- package/src/validate-map-path-keywords.ts +129 -0
- package/src/validate-map-path-unions.ts +281 -0
- package/src/validate-schema-shape.ts +232 -0
- package/src/validate-schema-walk.ts +219 -0
- package/src/validate-structure-facet.ts +76 -0
- package/src/validate-structure-layer-computed-y.ts +94 -0
- package/src/validate-structure-layer-ribbon.ts +61 -0
- package/src/validate-structure-layer-rule.ts +98 -0
- package/src/validate-structure-layer-shared.ts +29 -0
- package/src/validate-structure-layers.ts +395 -0
- package/src/validate-structure-paint.ts +101 -0
- package/src/validate-structure-scales.ts +278 -0
- package/src/validate-structure-style-bins.ts +167 -0
- package/src/validate-structure.ts +16 -0
- package/src/validate.ts +212 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `$defs` partial — facet/coord/root plot schemas (FacetScales…PlotSpec).
|
|
3
|
+
* Composed by schema-declarations.ts via spread; key insertion order is load-bearing.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import Type from "typebox";
|
|
7
|
+
import { CURRENT_EDITION } from "./schema-catalog.js";
|
|
8
|
+
|
|
9
|
+
export const PlotDecls = {
|
|
10
|
+
FacetScales: Type.Union(
|
|
11
|
+
[Type.Literal("fixed"), Type.Literal("free"), Type.Literal("free_x"), Type.Literal("free_y")],
|
|
12
|
+
{
|
|
13
|
+
description:
|
|
14
|
+
'How positional scales behave across facet panels: "fixed" (default — all panels share both scales, trained on the union of panel data), "free" (both positional scales train per panel), "free_x" (only x is per-panel), "free_y" (only y is per-panel). Discrete color/fill assignments are ALWAYS global (one legend), regardless of this setting.',
|
|
15
|
+
},
|
|
16
|
+
),
|
|
17
|
+
|
|
18
|
+
FacetFieldRef: Type.Object(
|
|
19
|
+
{
|
|
20
|
+
field: Type.String({
|
|
21
|
+
description: "Name of the data column that partitions facet panels.",
|
|
22
|
+
}),
|
|
23
|
+
levels: Type.Optional(
|
|
24
|
+
Type.Array(Type.Ref("DomainValue"), {
|
|
25
|
+
minItems: 1,
|
|
26
|
+
description:
|
|
27
|
+
"Closed explicit panel order for this facet field. When set, panels appear in this order (including empty panels for levels absent from data). Values observed in data but omitted from levels are dropped from all panels and diagnosed. Omit for the default ascending sort of observed values.",
|
|
28
|
+
}),
|
|
29
|
+
),
|
|
30
|
+
labels: Type.Optional(
|
|
31
|
+
Type.Record(Type.String(), Type.String(), {
|
|
32
|
+
description:
|
|
33
|
+
'Display-label map for authored facet values (JSON object). Keys are string forms of the semantic values ("west", "1", "true", "null"); values are human-readable strip/accessibility text. Labels never change panel IDs or semantic facet identity. Omit to use bandKey(value) as the strip text.',
|
|
34
|
+
}),
|
|
35
|
+
),
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
additionalProperties: false,
|
|
39
|
+
description:
|
|
40
|
+
'Facet field reference with optional closed order and display labels. Example: {"field": "region", "levels": ["west", "east"], "labels": {"west": "West Coast"}}. Bare strings are NOT valid here — normalize() expands "region" to {"field": "region"}.',
|
|
41
|
+
},
|
|
42
|
+
),
|
|
43
|
+
|
|
44
|
+
FacetStripSpec: Type.Object(
|
|
45
|
+
{
|
|
46
|
+
position: Type.Optional(
|
|
47
|
+
Type.Union(
|
|
48
|
+
[
|
|
49
|
+
Type.Literal("top"),
|
|
50
|
+
Type.Literal("bottom"),
|
|
51
|
+
Type.Literal("left"),
|
|
52
|
+
Type.Literal("right"),
|
|
53
|
+
],
|
|
54
|
+
{
|
|
55
|
+
description:
|
|
56
|
+
'Where facet strip bands are reserved and drawn: "top" (default), "bottom", "left", or "right". Left/right strips participate in layout measurement rather than overlaying the panel.',
|
|
57
|
+
},
|
|
58
|
+
),
|
|
59
|
+
),
|
|
60
|
+
show: Type.Optional(
|
|
61
|
+
Type.Boolean({
|
|
62
|
+
description:
|
|
63
|
+
"Whether to reserve and draw strip bands (default true). Set false when direct labels are authored elsewhere; panel identity and authored display labels remain available to accessibility and interaction consumers.",
|
|
64
|
+
}),
|
|
65
|
+
),
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
additionalProperties: false,
|
|
69
|
+
description:
|
|
70
|
+
'Facet strip chrome: position and visibility. Defaults: position "top", show true. Example: {"position": "left"} or {"show": false}.',
|
|
71
|
+
},
|
|
72
|
+
),
|
|
73
|
+
|
|
74
|
+
FacetSpec: Type.Object(
|
|
75
|
+
{
|
|
76
|
+
wrap: Type.Optional(
|
|
77
|
+
Type.Ref("FacetFieldRef", {
|
|
78
|
+
description:
|
|
79
|
+
"Facet WRAP form: partition rows by this data field's distinct values, one panel per value, wrapped into a grid ncol wide. Mutually exclusive with rows/cols. Optional levels/labels control order and strip text.",
|
|
80
|
+
}),
|
|
81
|
+
),
|
|
82
|
+
rows: Type.Optional(
|
|
83
|
+
Type.Ref("FacetFieldRef", {
|
|
84
|
+
description:
|
|
85
|
+
"Facet GRID form: the field whose distinct values become grid rows. Combine with cols; mutually exclusive with wrap. Optional levels/labels control order and strip text.",
|
|
86
|
+
}),
|
|
87
|
+
),
|
|
88
|
+
cols: Type.Optional(
|
|
89
|
+
Type.Ref("FacetFieldRef", {
|
|
90
|
+
description:
|
|
91
|
+
"Facet GRID form: the field whose distinct values become grid columns. Combine with rows; mutually exclusive with wrap. Optional levels/labels control order and strip text.",
|
|
92
|
+
}),
|
|
93
|
+
),
|
|
94
|
+
ncol: Type.Optional(
|
|
95
|
+
Type.Integer({
|
|
96
|
+
minimum: 1,
|
|
97
|
+
description:
|
|
98
|
+
"WRAP ONLY: number of panel columns (an integer of at least 1). Omit for an automatic near-square layout (ceil(sqrt(panels))).",
|
|
99
|
+
}),
|
|
100
|
+
),
|
|
101
|
+
scales: Type.Optional(Type.Ref("FacetScales")),
|
|
102
|
+
strip: Type.Optional(Type.Ref("FacetStripSpec")),
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
additionalProperties: false,
|
|
106
|
+
description:
|
|
107
|
+
"Facet the plot into small-multiple panels. Wrap form: set `wrap` (+ optional ncol). Grid form: set `rows` and/or `cols`. Panels partition the data BEFORE stats and positions run (each panel computes its own counts, bins, stacks). By default panel values sort ascending and strips sit on top; set field `levels`/`labels` and `strip.position`/`strip.show` for authored order, display text, and strip placement. Null values form their own panel when observed (or when listed in levels).",
|
|
108
|
+
},
|
|
109
|
+
),
|
|
110
|
+
|
|
111
|
+
CoordTransformAxisSpec: Type.Object(
|
|
112
|
+
{
|
|
113
|
+
transform: Type.Union(
|
|
114
|
+
[Type.Literal("identity"), Type.Literal("log10"), Type.Literal("sqrt")],
|
|
115
|
+
{
|
|
116
|
+
description:
|
|
117
|
+
"Post-stat coordinate transform for this axis: identity, base-10 logarithm, or square root.",
|
|
118
|
+
},
|
|
119
|
+
),
|
|
120
|
+
limits: Type.Optional(
|
|
121
|
+
Type.Array(Type.Number(), {
|
|
122
|
+
minItems: 2,
|
|
123
|
+
maxItems: 2,
|
|
124
|
+
description:
|
|
125
|
+
"Optional coordinate viewport [min, max] in semantic/source units. Exactly two numbers. Unlike scale limits, coordinate limits do not remove rows or recompute statistics.",
|
|
126
|
+
}),
|
|
127
|
+
),
|
|
128
|
+
reverse: Type.Optional(
|
|
129
|
+
Type.Boolean({
|
|
130
|
+
description:
|
|
131
|
+
"Reverse this coordinate axis after its transform without changing stat inputs or the trained semantic scale domain.",
|
|
132
|
+
}),
|
|
133
|
+
),
|
|
134
|
+
expand: Type.Optional(
|
|
135
|
+
Type.Boolean({
|
|
136
|
+
description:
|
|
137
|
+
"Whether explicit coordinate limits receive the default 5% transformed-space display expansion (default true). Set false for exact viewport limits.",
|
|
138
|
+
}),
|
|
139
|
+
),
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
additionalProperties: false,
|
|
143
|
+
description:
|
|
144
|
+
"One continuous coordinate axis projected after statistics and scale training. Non-identity transforms require a continuous, non-temporal position scale.",
|
|
145
|
+
},
|
|
146
|
+
),
|
|
147
|
+
|
|
148
|
+
CoordCartesianSpec: Type.Object(
|
|
149
|
+
{
|
|
150
|
+
type: Type.Union([Type.Literal("cartesian"), Type.Literal("flip")], {
|
|
151
|
+
description:
|
|
152
|
+
'Coordinate system: "cartesian" (default) or "flip" (swap the axes: x renders vertically, y horizontally — THE mechanism for horizontal bar charts; positions, stacking, dodging, and hit-testing all follow).',
|
|
153
|
+
}),
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
additionalProperties: false,
|
|
157
|
+
description:
|
|
158
|
+
'The plot\'s Cartesian coordinate system. {"type": "flip"} turns any vertical composition into its horizontal counterpart.',
|
|
159
|
+
},
|
|
160
|
+
),
|
|
161
|
+
|
|
162
|
+
CoordTransformSpec: Type.Object(
|
|
163
|
+
{
|
|
164
|
+
type: Type.Literal("transform", {
|
|
165
|
+
description: "Project positions after stats/positions and scale training.",
|
|
166
|
+
}),
|
|
167
|
+
x: Type.Optional(Type.Ref("CoordTransformAxisSpec")),
|
|
168
|
+
y: Type.Optional(Type.Ref("CoordTransformAxisSpec")),
|
|
169
|
+
clip: Type.Optional(
|
|
170
|
+
Type.Boolean({
|
|
171
|
+
description:
|
|
172
|
+
"Clip marks to the panel rectangle (default true). Set false only when intentional overflow should remain visible.",
|
|
173
|
+
}),
|
|
174
|
+
),
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
additionalProperties: false,
|
|
178
|
+
description:
|
|
179
|
+
"A post-stat Cartesian coordinate transform with independent x/y projectors. It is intentionally distinct from pre-stat scale transforms.",
|
|
180
|
+
},
|
|
181
|
+
),
|
|
182
|
+
|
|
183
|
+
CoordFixedSpec: Type.Object(
|
|
184
|
+
{
|
|
185
|
+
type: Type.Literal("fixed", {
|
|
186
|
+
description: "Cartesian coordinates with a fixed physical data-unit ratio.",
|
|
187
|
+
}),
|
|
188
|
+
ratio: Type.Optional(
|
|
189
|
+
Type.Number({
|
|
190
|
+
exclusiveMinimum: 0,
|
|
191
|
+
description:
|
|
192
|
+
"Physical y-unit length divided by physical x-unit length (default 1, equal units).",
|
|
193
|
+
}),
|
|
194
|
+
),
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
additionalProperties: false,
|
|
198
|
+
description:
|
|
199
|
+
"A fixed-aspect Cartesian coordinate system. Layout fits the largest centered data rectangle after chart chrome is allocated.",
|
|
200
|
+
},
|
|
201
|
+
),
|
|
202
|
+
|
|
203
|
+
CoordSfSpec: Type.Object(
|
|
204
|
+
{
|
|
205
|
+
type: Type.Literal("sf", {
|
|
206
|
+
description:
|
|
207
|
+
"Simple-features coordinates for already-projected map data. Fixed-aspect layout; no CRS transform in v1.",
|
|
208
|
+
}),
|
|
209
|
+
ratio: Type.Optional(
|
|
210
|
+
Type.Number({
|
|
211
|
+
exclusiveMinimum: 0,
|
|
212
|
+
description:
|
|
213
|
+
"Physical y-unit length divided by physical x-unit length (default 1, equal projected units).",
|
|
214
|
+
}),
|
|
215
|
+
),
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
additionalProperties: false,
|
|
219
|
+
description:
|
|
220
|
+
"Fixed-aspect coordinates for portable geom_sf maps. Data must already be projected; CRS reproject / graticules are deferred.",
|
|
221
|
+
},
|
|
222
|
+
),
|
|
223
|
+
|
|
224
|
+
CoordRadialSpec: Type.Object(
|
|
225
|
+
{
|
|
226
|
+
type: Type.Literal("radial", {
|
|
227
|
+
description:
|
|
228
|
+
"Polar/radial coordinates (ggplot2 coord_radial / superseded coord_polar). Maps one axis to angle and the other to radius.",
|
|
229
|
+
}),
|
|
230
|
+
theta: Type.Optional(
|
|
231
|
+
Type.Union([Type.Literal("x"), Type.Literal("y")], {
|
|
232
|
+
description:
|
|
233
|
+
'Which aesthetic maps to angle: "x" (default) or "y". The other aesthetic maps to radius. Pie charts use theta: "y".',
|
|
234
|
+
}),
|
|
235
|
+
),
|
|
236
|
+
start: Type.Optional(
|
|
237
|
+
Type.Number({
|
|
238
|
+
description:
|
|
239
|
+
"Offset of the starting angle from 12 o'clock, in radians (default 0). Positive angles proceed clockwise when reverse does not flip theta.",
|
|
240
|
+
}),
|
|
241
|
+
),
|
|
242
|
+
end: Type.Optional(
|
|
243
|
+
Type.Number({
|
|
244
|
+
description:
|
|
245
|
+
"Angle where the plot ends, in radians measured from 12 o'clock. Default is start + 2π (full circle). Use with start for partial polar plots.",
|
|
246
|
+
}),
|
|
247
|
+
),
|
|
248
|
+
innerRadius: Type.Optional(
|
|
249
|
+
Type.Number({
|
|
250
|
+
minimum: 0,
|
|
251
|
+
maximum: 1,
|
|
252
|
+
description:
|
|
253
|
+
"Size of the inner radius hole as a fraction of the outer radius (0–1, default 0). Values above 0 produce a donut.",
|
|
254
|
+
}),
|
|
255
|
+
),
|
|
256
|
+
expand: Type.Optional(
|
|
257
|
+
Type.Boolean({
|
|
258
|
+
description:
|
|
259
|
+
"When true (default), add a small expansion so data does not sit on the axes. When false, limits come directly from the scale (typical for pie/coxcomb).",
|
|
260
|
+
}),
|
|
261
|
+
),
|
|
262
|
+
clip: Type.Optional(
|
|
263
|
+
Type.Boolean({
|
|
264
|
+
description:
|
|
265
|
+
'Clip marks to the panel. ggplot2 coord_radial defaults to clip off; coord_polar defaults to clip on. ggts stores the effective boolean (default false for type "radial").',
|
|
266
|
+
}),
|
|
267
|
+
),
|
|
268
|
+
reverse: Type.Optional(
|
|
269
|
+
Type.Union(
|
|
270
|
+
[Type.Literal("none"), Type.Literal("theta"), Type.Literal("r"), Type.Literal("thetar")],
|
|
271
|
+
{
|
|
272
|
+
description:
|
|
273
|
+
'Which directions to reverse: "none" (default), "theta", "r", or "thetar" (both). coord_polar(direction = -1) maps to reverse: "theta".',
|
|
274
|
+
},
|
|
275
|
+
),
|
|
276
|
+
),
|
|
277
|
+
thetaLimits: Type.Optional(
|
|
278
|
+
Type.Array(Type.Number(), {
|
|
279
|
+
minItems: 2,
|
|
280
|
+
maxItems: 2,
|
|
281
|
+
description:
|
|
282
|
+
"Optional [min, max] limits for the theta (angle) aesthetic in semantic units. Exactly two numbers.",
|
|
283
|
+
}),
|
|
284
|
+
),
|
|
285
|
+
rLimits: Type.Optional(
|
|
286
|
+
Type.Array(Type.Number(), {
|
|
287
|
+
minItems: 2,
|
|
288
|
+
maxItems: 2,
|
|
289
|
+
description:
|
|
290
|
+
"Optional [min, max] limits for the radius aesthetic in semantic units. Exactly two numbers.",
|
|
291
|
+
}),
|
|
292
|
+
),
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
additionalProperties: false,
|
|
296
|
+
description:
|
|
297
|
+
"Polar/radial coordinates for pie charts, coxcombs, wind roses, and partial polar scatter. Portable form of ggplot2 coord_radial (coord_polar is a helper alias).",
|
|
298
|
+
},
|
|
299
|
+
),
|
|
300
|
+
|
|
301
|
+
CoordSpec: Type.Union(
|
|
302
|
+
[
|
|
303
|
+
Type.Ref("CoordCartesianSpec"),
|
|
304
|
+
Type.Ref("CoordTransformSpec"),
|
|
305
|
+
Type.Ref("CoordFixedSpec"),
|
|
306
|
+
Type.Ref("CoordSfSpec"),
|
|
307
|
+
Type.Ref("CoordRadialSpec"),
|
|
308
|
+
],
|
|
309
|
+
{
|
|
310
|
+
description:
|
|
311
|
+
"The plot coordinate system: ordinary Cartesian, flipped Cartesian, post-stat transformed, fixed-aspect, simple-features fixed-aspect, or radial/polar.",
|
|
312
|
+
},
|
|
313
|
+
),
|
|
314
|
+
|
|
315
|
+
PlotSpec: Type.Object(
|
|
316
|
+
{
|
|
317
|
+
$schema: Type.Optional(
|
|
318
|
+
Type.String({
|
|
319
|
+
description: "URL of the ggts spec JSON Schema version this spec targets.",
|
|
320
|
+
}),
|
|
321
|
+
),
|
|
322
|
+
edition: Type.Optional(
|
|
323
|
+
Type.Integer({
|
|
324
|
+
minimum: 1,
|
|
325
|
+
description: `Defaults edition this spec was authored against (currently ${CURRENT_EDITION}). normalize() stamps the current edition when absent, so a spec keeps ITS edition's default look (theme roles, categorical palette) even after ggts's defaults improve in a later edition. Explicit theme/scale settings always win over edition defaults.`,
|
|
326
|
+
}),
|
|
327
|
+
),
|
|
328
|
+
data: Type.Optional(
|
|
329
|
+
Type.Ref("DataRef", {
|
|
330
|
+
description: "Default data for all layers.",
|
|
331
|
+
}),
|
|
332
|
+
),
|
|
333
|
+
datasets: Type.Optional(
|
|
334
|
+
Type.Record(Type.String(), Type.Ref("InlineData"), {
|
|
335
|
+
description: 'Named inline datasets referenced by {"name": ...} data refs.',
|
|
336
|
+
}),
|
|
337
|
+
),
|
|
338
|
+
aes: Type.Optional(
|
|
339
|
+
Type.Ref("Aes", {
|
|
340
|
+
description: "Plot-level aesthetic mapping, inherited by every layer.",
|
|
341
|
+
}),
|
|
342
|
+
),
|
|
343
|
+
layers: Type.Array(Type.Ref("LayerSpec"), {
|
|
344
|
+
minItems: 1,
|
|
345
|
+
description:
|
|
346
|
+
"The plot's layers, drawn in array order (first = bottom). At least one layer.",
|
|
347
|
+
}),
|
|
348
|
+
facet: Type.Optional(Type.Ref("FacetSpec")),
|
|
349
|
+
coord: Type.Optional(Type.Ref("CoordSpec")),
|
|
350
|
+
scales: Type.Optional(Type.Ref("Scales")),
|
|
351
|
+
guides: Type.Optional(Type.Ref("GuidesSpec")),
|
|
352
|
+
legend: Type.Optional(Type.Ref("LegendSpec")),
|
|
353
|
+
labs: Type.Optional(Type.Ref("Labs")),
|
|
354
|
+
theme: Type.Optional(
|
|
355
|
+
Type.Union([Type.Ref("ThemeName"), Type.Ref("ThemeSpec")], {
|
|
356
|
+
description:
|
|
357
|
+
"A registered theme name, or a theme object (named base + role overrides). Omit for the default theme.",
|
|
358
|
+
}),
|
|
359
|
+
),
|
|
360
|
+
width: Type.Optional(
|
|
361
|
+
Type.Number({
|
|
362
|
+
exclusiveMinimum: 0,
|
|
363
|
+
description: "Preferred plot width in px (greater than 0). The host may override.",
|
|
364
|
+
}),
|
|
365
|
+
),
|
|
366
|
+
height: Type.Optional(
|
|
367
|
+
Type.Number({
|
|
368
|
+
exclusiveMinimum: 0,
|
|
369
|
+
description: "Preferred plot height in px (greater than 0). The host may override.",
|
|
370
|
+
}),
|
|
371
|
+
),
|
|
372
|
+
a11y: Type.Optional(
|
|
373
|
+
Type.Union([Type.Literal("auto"), Type.Literal("force-svg")], {
|
|
374
|
+
description:
|
|
375
|
+
'Accessibility mode: "auto" (default — layers may render to canvas per their `render` hint, paired with an off-screen description block) or "force-svg" (every layer renders as SVG DOM marks — use for assistive-technology-critical charts; canvas layers do not expose per-mark accessibility).',
|
|
376
|
+
}),
|
|
377
|
+
),
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
additionalProperties: false,
|
|
381
|
+
description:
|
|
382
|
+
"A complete ggts plot specification: data + aesthetic mapping + one or more layers, in layered grammar. Strictly JSON (PortableSpec).",
|
|
383
|
+
},
|
|
384
|
+
),
|
|
385
|
+
};
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `$defs` partial — style-scale schemas + shared scale helper builders.
|
|
3
|
+
* Composed by schema-declarations.ts via spread; key insertion order is load-bearing.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import Type from "typebox";
|
|
7
|
+
import { MAX_BINNED_BREAKS } from "./schema-names.js";
|
|
8
|
+
import { LINETYPE_NAME_SCHEMAS, POINT_SHAPE_NAME_SCHEMAS } from "./schema-name-schemas.js";
|
|
9
|
+
|
|
10
|
+
const forbiddenStyleOption = () => Type.Optional(Type.Never());
|
|
11
|
+
|
|
12
|
+
/** Size aesthetic only (#830). Shared onto PositiveStyleScaleSpec (size+linewidth). */
|
|
13
|
+
const sizeUnitField = {
|
|
14
|
+
/**
|
|
15
|
+
* Size-only rescaling mode (ignored for linewidth). Default `area` matches
|
|
16
|
+
* the existing continuous size map (area between range endpoints).
|
|
17
|
+
* `radius` is linear; `area_zero` forces zero→zero area (ggplot2 scale_size_area).
|
|
18
|
+
*/
|
|
19
|
+
sizeUnit: Type.Optional(
|
|
20
|
+
Type.Union([Type.Literal("area"), Type.Literal("radius"), Type.Literal("area_zero")], {
|
|
21
|
+
description:
|
|
22
|
+
'Size encoding unit (size aesthetic only). "area" (default) interpolates by area between range endpoints; "radius" maps linearly to radius; "area_zero" maps value proportionally to area with zero→zero.',
|
|
23
|
+
}),
|
|
24
|
+
),
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function numericStyleScaleSpec(
|
|
28
|
+
rangeValue: ReturnType<typeof Type.Number>,
|
|
29
|
+
description: string,
|
|
30
|
+
/** Extra optional fields on the base object (e.g. sizeUnit for PositiveStyleScaleSpec). */
|
|
31
|
+
extraFields: typeof sizeUnitField | Record<string, never> = {},
|
|
32
|
+
) {
|
|
33
|
+
return Type.Intersect([
|
|
34
|
+
Type.Object(
|
|
35
|
+
{
|
|
36
|
+
type: Type.Optional(
|
|
37
|
+
Type.Union([
|
|
38
|
+
Type.Literal("ordinal"),
|
|
39
|
+
Type.Literal("sequential"),
|
|
40
|
+
Type.Literal("binned"),
|
|
41
|
+
Type.Literal("manual"),
|
|
42
|
+
Type.Literal("identity"),
|
|
43
|
+
]),
|
|
44
|
+
),
|
|
45
|
+
temporalKind: Type.Optional(Type.Union([Type.Literal("date"), Type.Literal("datetime")])),
|
|
46
|
+
parse: Type.Optional(Type.Ref("TemporalParserSpec")),
|
|
47
|
+
parseFailure: Type.Optional(Type.Union([Type.Literal("error"), Type.Literal("censor")])),
|
|
48
|
+
timezone: Type.Optional(Type.String({ minLength: 1, maxLength: 128 })),
|
|
49
|
+
disambiguation: Type.Optional(
|
|
50
|
+
Type.Union([
|
|
51
|
+
Type.Literal("compatible"),
|
|
52
|
+
Type.Literal("earlier"),
|
|
53
|
+
Type.Literal("later"),
|
|
54
|
+
Type.Literal("reject"),
|
|
55
|
+
]),
|
|
56
|
+
),
|
|
57
|
+
domain: Type.Optional(Type.Array(Type.Ref("DomainValue"), { minItems: 1 })),
|
|
58
|
+
domainMode: Type.Optional(Type.Union([Type.Literal("grow"), Type.Literal("data")])),
|
|
59
|
+
breaks: Type.Optional(
|
|
60
|
+
Type.Array(Type.Union([Type.Number(), Type.String()]), { minItems: 2 }),
|
|
61
|
+
),
|
|
62
|
+
range: Type.Optional(Type.Array(rangeValue, { minItems: 1 })),
|
|
63
|
+
reverse: Type.Optional(Type.Boolean()),
|
|
64
|
+
oob: Type.Optional(Type.Union([Type.Literal("censor"), Type.Literal("squish")])),
|
|
65
|
+
naValue: Type.Optional(rangeValue),
|
|
66
|
+
unknownValue: Type.Optional(rangeValue),
|
|
67
|
+
onExhaust: Type.Optional(Type.Union([Type.Literal("cycle"), Type.Literal("error")])),
|
|
68
|
+
labels: Type.Optional(Type.String()),
|
|
69
|
+
guide: Type.Optional(Type.Ref("GuideSpec")),
|
|
70
|
+
...extraFields,
|
|
71
|
+
},
|
|
72
|
+
{ additionalProperties: false, description },
|
|
73
|
+
),
|
|
74
|
+
Type.Union([
|
|
75
|
+
Type.Object({
|
|
76
|
+
type: Type.Literal("binned"),
|
|
77
|
+
domain: Type.Optional(Type.Array(Type.Ref("DomainValue"), { minItems: 2, maxItems: 2 })),
|
|
78
|
+
breaks: Type.Optional(
|
|
79
|
+
Type.Array(Type.Union([Type.Number(), Type.String()]), {
|
|
80
|
+
minItems: 2,
|
|
81
|
+
maxItems: MAX_BINNED_BREAKS + 1,
|
|
82
|
+
}),
|
|
83
|
+
),
|
|
84
|
+
range: Type.Optional(Type.Array(rangeValue, { minItems: 2 })),
|
|
85
|
+
domainMode: forbiddenStyleOption(),
|
|
86
|
+
onExhaust: forbiddenStyleOption(),
|
|
87
|
+
}),
|
|
88
|
+
Type.Object({
|
|
89
|
+
type: Type.Literal("manual"),
|
|
90
|
+
range: Type.Array(rangeValue, { minItems: 1 }),
|
|
91
|
+
temporalKind: forbiddenStyleOption(),
|
|
92
|
+
parse: forbiddenStyleOption(),
|
|
93
|
+
parseFailure: forbiddenStyleOption(),
|
|
94
|
+
timezone: forbiddenStyleOption(),
|
|
95
|
+
disambiguation: forbiddenStyleOption(),
|
|
96
|
+
domainMode: forbiddenStyleOption(),
|
|
97
|
+
breaks: forbiddenStyleOption(),
|
|
98
|
+
reverse: forbiddenStyleOption(),
|
|
99
|
+
oob: forbiddenStyleOption(),
|
|
100
|
+
onExhaust: forbiddenStyleOption(),
|
|
101
|
+
labels: forbiddenStyleOption(),
|
|
102
|
+
}),
|
|
103
|
+
Type.Object({
|
|
104
|
+
type: Type.Literal("identity"),
|
|
105
|
+
temporalKind: forbiddenStyleOption(),
|
|
106
|
+
parse: forbiddenStyleOption(),
|
|
107
|
+
parseFailure: forbiddenStyleOption(),
|
|
108
|
+
timezone: forbiddenStyleOption(),
|
|
109
|
+
disambiguation: forbiddenStyleOption(),
|
|
110
|
+
domain: forbiddenStyleOption(),
|
|
111
|
+
domainMode: forbiddenStyleOption(),
|
|
112
|
+
breaks: forbiddenStyleOption(),
|
|
113
|
+
range: forbiddenStyleOption(),
|
|
114
|
+
reverse: forbiddenStyleOption(),
|
|
115
|
+
oob: forbiddenStyleOption(),
|
|
116
|
+
onExhaust: forbiddenStyleOption(),
|
|
117
|
+
labels: forbiddenStyleOption(),
|
|
118
|
+
}),
|
|
119
|
+
Type.Object({
|
|
120
|
+
type: Type.Literal("ordinal"),
|
|
121
|
+
temporalKind: forbiddenStyleOption(),
|
|
122
|
+
parse: forbiddenStyleOption(),
|
|
123
|
+
parseFailure: forbiddenStyleOption(),
|
|
124
|
+
timezone: forbiddenStyleOption(),
|
|
125
|
+
disambiguation: forbiddenStyleOption(),
|
|
126
|
+
breaks: forbiddenStyleOption(),
|
|
127
|
+
oob: forbiddenStyleOption(),
|
|
128
|
+
labels: forbiddenStyleOption(),
|
|
129
|
+
}),
|
|
130
|
+
Type.Object({
|
|
131
|
+
type: Type.Literal("sequential"),
|
|
132
|
+
domain: Type.Optional(Type.Array(Type.Ref("DomainValue"), { minItems: 2, maxItems: 2 })),
|
|
133
|
+
range: Type.Optional(Type.Array(rangeValue, { minItems: 2 })),
|
|
134
|
+
domainMode: forbiddenStyleOption(),
|
|
135
|
+
onExhaust: forbiddenStyleOption(),
|
|
136
|
+
}),
|
|
137
|
+
Type.Object({ type: forbiddenStyleOption() }),
|
|
138
|
+
]),
|
|
139
|
+
]);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function finiteStyleScaleSpec(rangeValue: ReturnType<typeof Type.Union>, description: string) {
|
|
143
|
+
return Type.Intersect([
|
|
144
|
+
Type.Object(
|
|
145
|
+
{
|
|
146
|
+
type: Type.Optional(
|
|
147
|
+
Type.Union([
|
|
148
|
+
Type.Literal("ordinal"),
|
|
149
|
+
Type.Literal("binned"),
|
|
150
|
+
Type.Literal("manual"),
|
|
151
|
+
Type.Literal("identity"),
|
|
152
|
+
]),
|
|
153
|
+
),
|
|
154
|
+
domain: Type.Optional(Type.Array(Type.Ref("DomainValue"), { minItems: 1 })),
|
|
155
|
+
domainMode: Type.Optional(Type.Union([Type.Literal("grow"), Type.Literal("data")])),
|
|
156
|
+
breaks: Type.Optional(Type.Array(Type.Number(), { minItems: 2 })),
|
|
157
|
+
range: Type.Optional(Type.Array(rangeValue, { minItems: 1 })),
|
|
158
|
+
reverse: Type.Optional(Type.Boolean()),
|
|
159
|
+
naValue: Type.Optional(rangeValue),
|
|
160
|
+
unknownValue: Type.Optional(rangeValue),
|
|
161
|
+
onExhaust: Type.Optional(Type.Union([Type.Literal("cycle"), Type.Literal("error")])),
|
|
162
|
+
labels: Type.Optional(Type.String()),
|
|
163
|
+
guide: Type.Optional(Type.Ref("GuideSpec")),
|
|
164
|
+
},
|
|
165
|
+
{ additionalProperties: false, description },
|
|
166
|
+
),
|
|
167
|
+
Type.Union([
|
|
168
|
+
Type.Object({
|
|
169
|
+
type: Type.Literal("binned"),
|
|
170
|
+
domain: Type.Optional(Type.Array(Type.Number(), { minItems: 2, maxItems: 2 })),
|
|
171
|
+
breaks: Type.Optional(
|
|
172
|
+
Type.Array(Type.Number(), { minItems: 2, maxItems: MAX_BINNED_BREAKS + 1 }),
|
|
173
|
+
),
|
|
174
|
+
domainMode: forbiddenStyleOption(),
|
|
175
|
+
onExhaust: forbiddenStyleOption(),
|
|
176
|
+
}),
|
|
177
|
+
Type.Object({
|
|
178
|
+
type: Type.Literal("manual"),
|
|
179
|
+
range: Type.Array(rangeValue, { minItems: 1 }),
|
|
180
|
+
domainMode: forbiddenStyleOption(),
|
|
181
|
+
breaks: forbiddenStyleOption(),
|
|
182
|
+
reverse: forbiddenStyleOption(),
|
|
183
|
+
onExhaust: forbiddenStyleOption(),
|
|
184
|
+
labels: forbiddenStyleOption(),
|
|
185
|
+
}),
|
|
186
|
+
Type.Object({
|
|
187
|
+
type: Type.Literal("identity"),
|
|
188
|
+
domain: forbiddenStyleOption(),
|
|
189
|
+
domainMode: forbiddenStyleOption(),
|
|
190
|
+
breaks: forbiddenStyleOption(),
|
|
191
|
+
range: forbiddenStyleOption(),
|
|
192
|
+
reverse: forbiddenStyleOption(),
|
|
193
|
+
onExhaust: forbiddenStyleOption(),
|
|
194
|
+
labels: forbiddenStyleOption(),
|
|
195
|
+
}),
|
|
196
|
+
Type.Object({
|
|
197
|
+
type: Type.Literal("ordinal"),
|
|
198
|
+
breaks: forbiddenStyleOption(),
|
|
199
|
+
labels: forbiddenStyleOption(),
|
|
200
|
+
}),
|
|
201
|
+
Type.Object({ type: forbiddenStyleOption() }),
|
|
202
|
+
]),
|
|
203
|
+
]);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export const StyleScaleDecls = {
|
|
207
|
+
/**
|
|
208
|
+
* Size + linewidth share this schema. `sizeUnit` is size-only at runtime
|
|
209
|
+
* (ignored for linewidth); alpha uses AlphaScaleSpec without sizeUnit so
|
|
210
|
+
* the option cannot validate as a silent no-op (#830).
|
|
211
|
+
*/
|
|
212
|
+
PositiveStyleScaleSpec: numericStyleScaleSpec(
|
|
213
|
+
// minimum 0 allows scale_size_area zero-area radii; linewidth 0 is also valid.
|
|
214
|
+
Type.Number({ minimum: 0 }),
|
|
215
|
+
"Configuration for a non-negative numeric size or linewidth scale.",
|
|
216
|
+
sizeUnitField,
|
|
217
|
+
),
|
|
218
|
+
|
|
219
|
+
AlphaScaleSpec: numericStyleScaleSpec(
|
|
220
|
+
Type.Number({ minimum: 0, maximum: 1 }),
|
|
221
|
+
"Configuration for an opacity scale constrained to [0, 1].",
|
|
222
|
+
),
|
|
223
|
+
|
|
224
|
+
ShapeScaleSpec: finiteStyleScaleSpec(
|
|
225
|
+
Type.Union(POINT_SHAPE_NAME_SCHEMAS),
|
|
226
|
+
"Configuration for a finite point-shape scale.",
|
|
227
|
+
),
|
|
228
|
+
|
|
229
|
+
LinetypeScaleSpec: finiteStyleScaleSpec(
|
|
230
|
+
Type.Union(LINETYPE_NAME_SCHEMAS),
|
|
231
|
+
"Configuration for a finite line-pattern scale.",
|
|
232
|
+
),
|
|
233
|
+
};
|