@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,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scale authoring helpers facade — position, color/fill, and style families.
|
|
3
|
+
*
|
|
4
|
+
* Implementation:
|
|
5
|
+
* - scale-position-helpers.ts — temporal, discrete, continuous, binned, reverse
|
|
6
|
+
* - scale-color-helpers.ts — generic color/fill + ColorBrewer + configuredColorScaleType
|
|
7
|
+
* - scale-color-viridis.ts / scale-color-stops.ts / scale-color-hue-grey.ts — palette families
|
|
8
|
+
* - scale-style-helpers.ts — numeric and finite-symbol style families
|
|
9
|
+
* - scale-multi-helpers.ts — multi-aes identity/manual + scaleType (#833)
|
|
10
|
+
*
|
|
11
|
+
* Public package imports continue through this module for stable paths.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
scaleXDate,
|
|
16
|
+
scaleXDatetime,
|
|
17
|
+
scaleXTime,
|
|
18
|
+
scaleYDate,
|
|
19
|
+
scaleYDatetime,
|
|
20
|
+
scaleYTime,
|
|
21
|
+
scaleXMonthDay,
|
|
22
|
+
scaleYMonthDay,
|
|
23
|
+
scaleXDiscrete,
|
|
24
|
+
scaleYDiscrete,
|
|
25
|
+
scale_x_date,
|
|
26
|
+
scale_x_datetime,
|
|
27
|
+
scale_x_time,
|
|
28
|
+
scale_y_date,
|
|
29
|
+
scale_y_datetime,
|
|
30
|
+
scale_y_time,
|
|
31
|
+
scale_x_month_day,
|
|
32
|
+
scale_y_month_day,
|
|
33
|
+
scale_x_discrete,
|
|
34
|
+
scale_y_discrete,
|
|
35
|
+
scaleXContinuous,
|
|
36
|
+
scaleYContinuous,
|
|
37
|
+
scaleXLog10,
|
|
38
|
+
scaleYLog10,
|
|
39
|
+
scaleXSqrt,
|
|
40
|
+
scaleYSqrt,
|
|
41
|
+
scaleXReverse,
|
|
42
|
+
scaleYReverse,
|
|
43
|
+
scaleXBinned,
|
|
44
|
+
scaleYBinned,
|
|
45
|
+
scale_x_continuous,
|
|
46
|
+
scale_y_continuous,
|
|
47
|
+
scale_x_log10,
|
|
48
|
+
scale_y_log10,
|
|
49
|
+
scale_x_sqrt,
|
|
50
|
+
scale_y_sqrt,
|
|
51
|
+
scale_x_reverse,
|
|
52
|
+
scale_y_reverse,
|
|
53
|
+
scale_x_binned,
|
|
54
|
+
scale_y_binned,
|
|
55
|
+
type TemporalScaleOptions,
|
|
56
|
+
type ContinuousPositionScaleOptions,
|
|
57
|
+
type TransformedPositionScaleOptions,
|
|
58
|
+
type DiscretePositionScaleOptions,
|
|
59
|
+
} from "./scale-position-helpers.js";
|
|
60
|
+
|
|
61
|
+
export {
|
|
62
|
+
configuredColorScaleType,
|
|
63
|
+
scaleColorContinuous,
|
|
64
|
+
scaleColorDiscrete,
|
|
65
|
+
scaleColorBinned,
|
|
66
|
+
scaleColorLog10,
|
|
67
|
+
scaleColorSqrt,
|
|
68
|
+
scaleColorDate,
|
|
69
|
+
scaleColorDatetime,
|
|
70
|
+
scaleColorManual,
|
|
71
|
+
scaleColorIdentity,
|
|
72
|
+
scaleColorBrewer,
|
|
73
|
+
scaleColorDistiller,
|
|
74
|
+
scaleColorFermenter,
|
|
75
|
+
scaleColourContinuous,
|
|
76
|
+
scaleColourDiscrete,
|
|
77
|
+
scaleColourBinned,
|
|
78
|
+
scaleColourLog10,
|
|
79
|
+
scaleColourSqrt,
|
|
80
|
+
scaleColourDate,
|
|
81
|
+
scaleColourDatetime,
|
|
82
|
+
scaleColourManual,
|
|
83
|
+
scaleColourIdentity,
|
|
84
|
+
scaleColourBrewer,
|
|
85
|
+
scaleColourDistiller,
|
|
86
|
+
scaleColourFermenter,
|
|
87
|
+
scale_color_continuous,
|
|
88
|
+
scale_color_discrete,
|
|
89
|
+
scale_color_binned,
|
|
90
|
+
scale_color_log10,
|
|
91
|
+
scale_color_sqrt,
|
|
92
|
+
scale_color_date,
|
|
93
|
+
scale_color_datetime,
|
|
94
|
+
scale_color_manual,
|
|
95
|
+
scale_color_identity,
|
|
96
|
+
scale_color_brewer,
|
|
97
|
+
scale_color_distiller,
|
|
98
|
+
scale_color_fermenter,
|
|
99
|
+
scale_colour_continuous,
|
|
100
|
+
scale_colour_discrete,
|
|
101
|
+
scale_colour_binned,
|
|
102
|
+
scale_colour_log10,
|
|
103
|
+
scale_colour_sqrt,
|
|
104
|
+
scale_colour_date,
|
|
105
|
+
scale_colour_datetime,
|
|
106
|
+
scale_colour_manual,
|
|
107
|
+
scale_colour_identity,
|
|
108
|
+
scale_colour_brewer,
|
|
109
|
+
scale_colour_distiller,
|
|
110
|
+
scale_colour_fermenter,
|
|
111
|
+
scaleFillContinuous,
|
|
112
|
+
scaleFillDiscrete,
|
|
113
|
+
scaleFillBinned,
|
|
114
|
+
scaleFillLog10,
|
|
115
|
+
scaleFillSqrt,
|
|
116
|
+
scaleFillDate,
|
|
117
|
+
scaleFillDatetime,
|
|
118
|
+
scaleFillManual,
|
|
119
|
+
scaleFillIdentity,
|
|
120
|
+
scaleFillBrewer,
|
|
121
|
+
scaleFillDistiller,
|
|
122
|
+
scaleFillFermenter,
|
|
123
|
+
scale_fill_continuous,
|
|
124
|
+
scale_fill_discrete,
|
|
125
|
+
scale_fill_binned,
|
|
126
|
+
scale_fill_log10,
|
|
127
|
+
scale_fill_sqrt,
|
|
128
|
+
scale_fill_date,
|
|
129
|
+
scale_fill_datetime,
|
|
130
|
+
scale_fill_manual,
|
|
131
|
+
scale_fill_identity,
|
|
132
|
+
scale_fill_brewer,
|
|
133
|
+
scale_fill_distiller,
|
|
134
|
+
scale_fill_fermenter,
|
|
135
|
+
type ColorScaleOptions,
|
|
136
|
+
type SequentialColorScaleOptions,
|
|
137
|
+
type BinnedColorScaleOptions,
|
|
138
|
+
type DiscreteColorScaleOptions,
|
|
139
|
+
type TransformedColorScaleOptions,
|
|
140
|
+
type TemporalColorScaleOptions,
|
|
141
|
+
type ManualColorScaleOptions,
|
|
142
|
+
type IdentityColorScaleOptions,
|
|
143
|
+
type ColorBrewerScaleOptions,
|
|
144
|
+
type ColorDistillerScaleOptions,
|
|
145
|
+
type ColorFermenterScaleOptions,
|
|
146
|
+
} from "./scale-color-helpers.js";
|
|
147
|
+
|
|
148
|
+
export {
|
|
149
|
+
scaleColorViridisC,
|
|
150
|
+
scaleColorViridisD,
|
|
151
|
+
scaleColorViridisB,
|
|
152
|
+
scaleColourViridisC,
|
|
153
|
+
scaleColourViridisD,
|
|
154
|
+
scaleColourViridisB,
|
|
155
|
+
scaleFillViridisC,
|
|
156
|
+
scaleFillViridisD,
|
|
157
|
+
scaleFillViridisB,
|
|
158
|
+
scale_color_viridis_c,
|
|
159
|
+
scale_color_viridis_d,
|
|
160
|
+
scale_color_viridis_b,
|
|
161
|
+
scale_colour_viridis_c,
|
|
162
|
+
scale_colour_viridis_d,
|
|
163
|
+
scale_colour_viridis_b,
|
|
164
|
+
scale_fill_viridis_c,
|
|
165
|
+
scale_fill_viridis_d,
|
|
166
|
+
scale_fill_viridis_b,
|
|
167
|
+
type ViridisScaleOptions,
|
|
168
|
+
type ViridisOptionName,
|
|
169
|
+
} from "./scale-color-viridis.js";
|
|
170
|
+
|
|
171
|
+
export {
|
|
172
|
+
scaleColorSteps,
|
|
173
|
+
scaleColorSteps2,
|
|
174
|
+
scaleColorStepsn,
|
|
175
|
+
scaleColorGradient,
|
|
176
|
+
scaleColorGradient2,
|
|
177
|
+
scaleColorGradientn,
|
|
178
|
+
scaleColourSteps,
|
|
179
|
+
scaleColourSteps2,
|
|
180
|
+
scaleColourStepsn,
|
|
181
|
+
scaleColourGradient,
|
|
182
|
+
scaleColourGradient2,
|
|
183
|
+
scaleColourGradientn,
|
|
184
|
+
scaleFillSteps,
|
|
185
|
+
scaleFillSteps2,
|
|
186
|
+
scaleFillStepsn,
|
|
187
|
+
scaleFillGradient,
|
|
188
|
+
scaleFillGradient2,
|
|
189
|
+
scaleFillGradientn,
|
|
190
|
+
scale_color_steps,
|
|
191
|
+
scale_color_steps2,
|
|
192
|
+
scale_color_stepsn,
|
|
193
|
+
scale_color_gradient,
|
|
194
|
+
scale_color_gradient2,
|
|
195
|
+
scale_color_gradientn,
|
|
196
|
+
scale_colour_steps,
|
|
197
|
+
scale_colour_steps2,
|
|
198
|
+
scale_colour_stepsn,
|
|
199
|
+
scale_colour_gradient,
|
|
200
|
+
scale_colour_gradient2,
|
|
201
|
+
scale_colour_gradientn,
|
|
202
|
+
scale_fill_steps,
|
|
203
|
+
scale_fill_steps2,
|
|
204
|
+
scale_fill_stepsn,
|
|
205
|
+
scale_fill_gradient,
|
|
206
|
+
scale_fill_gradient2,
|
|
207
|
+
scale_fill_gradientn,
|
|
208
|
+
type StepsScaleOptions,
|
|
209
|
+
type Steps2ScaleOptions,
|
|
210
|
+
type StepsnScaleOptions,
|
|
211
|
+
type GradientScaleOptions,
|
|
212
|
+
type Gradient2ScaleOptions,
|
|
213
|
+
type GradientnScaleOptions,
|
|
214
|
+
} from "./scale-color-stops.js";
|
|
215
|
+
|
|
216
|
+
export {
|
|
217
|
+
scaleColorHue,
|
|
218
|
+
scaleColorGrey,
|
|
219
|
+
scaleColorGray,
|
|
220
|
+
scaleColorOrdinal,
|
|
221
|
+
scaleColourHue,
|
|
222
|
+
scaleColourGrey,
|
|
223
|
+
scaleColourGray,
|
|
224
|
+
scaleColourOrdinal,
|
|
225
|
+
scaleFillHue,
|
|
226
|
+
scaleFillGrey,
|
|
227
|
+
scaleFillGray,
|
|
228
|
+
scaleFillOrdinal,
|
|
229
|
+
scale_color_hue,
|
|
230
|
+
scale_color_grey,
|
|
231
|
+
scale_color_gray,
|
|
232
|
+
scale_color_ordinal,
|
|
233
|
+
scale_colour_hue,
|
|
234
|
+
scale_colour_grey,
|
|
235
|
+
scale_colour_gray,
|
|
236
|
+
scale_colour_ordinal,
|
|
237
|
+
scale_fill_hue,
|
|
238
|
+
scale_fill_grey,
|
|
239
|
+
scale_fill_gray,
|
|
240
|
+
scale_fill_ordinal,
|
|
241
|
+
type HueScaleOptions,
|
|
242
|
+
type GreyScaleOptions,
|
|
243
|
+
type OrdinalColorScaleOptions,
|
|
244
|
+
} from "./scale-color-hue-grey.js";
|
|
245
|
+
|
|
246
|
+
export * from "./scale-style-helpers.js";
|
|
247
|
+
|
|
248
|
+
export {
|
|
249
|
+
scaleContinuousIdentity,
|
|
250
|
+
scaleDiscreteIdentity,
|
|
251
|
+
scaleDiscreteManual,
|
|
252
|
+
scaleType,
|
|
253
|
+
scale_continuous_identity,
|
|
254
|
+
scale_discrete_identity,
|
|
255
|
+
scale_discrete_manual,
|
|
256
|
+
scale_type,
|
|
257
|
+
canonicalMultiScaleChannel,
|
|
258
|
+
type MultiScaleAesthetic,
|
|
259
|
+
type MultiScaleChannel,
|
|
260
|
+
type MultiIdentityScaleOptions,
|
|
261
|
+
type MultiManualScaleOptions,
|
|
262
|
+
type ScaleTypeAesthetic,
|
|
263
|
+
type RecommendedScaleType,
|
|
264
|
+
} from "./scale-multi-helpers.js";
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-aesthetic scale helpers (#833) — ggplot2 scale_*_identity /
|
|
3
|
+
* scale_discrete_manual ergonomics over PortableSpec's per-channel `scales`.
|
|
4
|
+
*
|
|
5
|
+
* Helpers expand to a `Scales` object with the same config on each requested
|
|
6
|
+
* aesthetic (British "colour" → "color"). No new PortableSpec branch: the
|
|
7
|
+
* expanded object is what normalize/validate already understand.
|
|
8
|
+
*
|
|
9
|
+
* `scaleType` is a small registry for agent/tooling default selection — not
|
|
10
|
+
* an R S3 generic (agent tooling).
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { CellValue, Scales } from "./schema.js";
|
|
14
|
+
import type { ProfileFieldType } from "./validate-data.js";
|
|
15
|
+
|
|
16
|
+
/** Aesthetics accepted by multi-aes identity/manual helpers (not x/y). */
|
|
17
|
+
export type MultiScaleAesthetic =
|
|
18
|
+
| "color"
|
|
19
|
+
| "colour"
|
|
20
|
+
| "fill"
|
|
21
|
+
| "size"
|
|
22
|
+
| "linewidth"
|
|
23
|
+
| "alpha"
|
|
24
|
+
| "shape"
|
|
25
|
+
| "linetype";
|
|
26
|
+
|
|
27
|
+
/** Canonical Scales keys for multi-aes helpers. */
|
|
28
|
+
export type MultiScaleChannel = Exclude<keyof Scales, "x" | "y">;
|
|
29
|
+
|
|
30
|
+
const MULTI_AES = new Set<string>([
|
|
31
|
+
"color",
|
|
32
|
+
"colour",
|
|
33
|
+
"fill",
|
|
34
|
+
"size",
|
|
35
|
+
"linewidth",
|
|
36
|
+
"alpha",
|
|
37
|
+
"shape",
|
|
38
|
+
"linetype",
|
|
39
|
+
]);
|
|
40
|
+
|
|
41
|
+
const CONTINUOUS_IDENTITY_AES = new Set<MultiScaleChannel>([
|
|
42
|
+
"color",
|
|
43
|
+
"fill",
|
|
44
|
+
"size",
|
|
45
|
+
"linewidth",
|
|
46
|
+
"alpha",
|
|
47
|
+
]);
|
|
48
|
+
|
|
49
|
+
const DISCRETE_IDENTITY_AES = new Set<MultiScaleChannel>([
|
|
50
|
+
"color",
|
|
51
|
+
"fill",
|
|
52
|
+
"size",
|
|
53
|
+
"linewidth",
|
|
54
|
+
"alpha",
|
|
55
|
+
"shape",
|
|
56
|
+
"linetype",
|
|
57
|
+
]);
|
|
58
|
+
|
|
59
|
+
export function canonicalMultiScaleChannel(aesthetic: MultiScaleAesthetic): MultiScaleChannel {
|
|
60
|
+
if (aesthetic === "colour") return "color";
|
|
61
|
+
return aesthetic;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function assertAesthetics(
|
|
65
|
+
aesthetics: readonly MultiScaleAesthetic[],
|
|
66
|
+
allowed: ReadonlySet<MultiScaleChannel>,
|
|
67
|
+
kind: string,
|
|
68
|
+
): MultiScaleChannel[] {
|
|
69
|
+
if (aesthetics.length === 0) {
|
|
70
|
+
throw new Error(`${kind}: aesthetics must be a non-empty array.`);
|
|
71
|
+
}
|
|
72
|
+
const channels: MultiScaleChannel[] = [];
|
|
73
|
+
const seen = new Set<MultiScaleChannel>();
|
|
74
|
+
for (const raw of aesthetics) {
|
|
75
|
+
if (!MULTI_AES.has(raw)) {
|
|
76
|
+
throw new Error(
|
|
77
|
+
`${kind}: unsupported aesthetic "${raw}". Expected one of: color, colour, fill, size, linewidth, alpha, shape, linetype.`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
const channel = canonicalMultiScaleChannel(raw);
|
|
81
|
+
if (!allowed.has(channel)) {
|
|
82
|
+
throw new Error(
|
|
83
|
+
`${kind}: aesthetic "${raw}" is not valid for this helper (resolved channel "${channel}").`,
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
if (seen.has(channel)) continue;
|
|
87
|
+
seen.add(channel);
|
|
88
|
+
channels.push(channel);
|
|
89
|
+
}
|
|
90
|
+
return channels;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type MultiIdentityScaleOptions = {
|
|
94
|
+
/** Target aesthetics; British "colour" is an alias of "color". */
|
|
95
|
+
aesthetics: readonly MultiScaleAesthetic[];
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export type MultiManualScaleOptions = {
|
|
99
|
+
aesthetics: readonly MultiScaleAesthetic[];
|
|
100
|
+
/** Positional range values applied to every listed aesthetic. */
|
|
101
|
+
values: readonly (string | number)[];
|
|
102
|
+
domain?: readonly CellValue[];
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Build a Scales bag by assigning the same JSON config to each channel.
|
|
107
|
+
* Deep-clone so nested range/domain arrays are not shared across channels
|
|
108
|
+
* (shallow `{ ...entry }` would alias them — mutating one channel mutates all).
|
|
109
|
+
* Channel-specific Output types differ (colors vs numbers vs symbols); callers
|
|
110
|
+
* and tier-1 validation own value/channel compatibility.
|
|
111
|
+
*/
|
|
112
|
+
function cloneScaleEntry(entry: Record<string, unknown>): Record<string, unknown> {
|
|
113
|
+
const copy: Record<string, unknown> = { ...entry };
|
|
114
|
+
const range = copy["range"];
|
|
115
|
+
if (Array.isArray(range)) copy["range"] = range.slice();
|
|
116
|
+
const domain = copy["domain"];
|
|
117
|
+
if (Array.isArray(domain)) copy["domain"] = domain.slice();
|
|
118
|
+
return copy;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function assignChannels(
|
|
122
|
+
channels: readonly MultiScaleChannel[],
|
|
123
|
+
entry: Record<string, unknown>,
|
|
124
|
+
): Scales {
|
|
125
|
+
const scales: Record<string, unknown> = {};
|
|
126
|
+
for (const channel of channels) {
|
|
127
|
+
scales[channel] = cloneScaleEntry(entry);
|
|
128
|
+
}
|
|
129
|
+
// Expanded subset of Scales keys; entries are identity/manual JSON objects.
|
|
130
|
+
// tsc needs the cast; type-aware lint mis-accepts Record→Scales without it.
|
|
131
|
+
// oxlint-disable-next-line typescript/no-unnecessary-type-assertion -- tsc TS2322
|
|
132
|
+
return scales as Scales;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Apply an identity scale to every listed continuous-friendly aesthetic
|
|
137
|
+
* (color/fill/size/linewidth/alpha). Shape/linetype are rejected.
|
|
138
|
+
*/
|
|
139
|
+
export function scaleContinuousIdentity(options: MultiIdentityScaleOptions): Scales {
|
|
140
|
+
const channels = assertAesthetics(
|
|
141
|
+
options.aesthetics,
|
|
142
|
+
CONTINUOUS_IDENTITY_AES,
|
|
143
|
+
"scaleContinuousIdentity",
|
|
144
|
+
);
|
|
145
|
+
return assignChannels(channels, { type: "identity" });
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Apply an identity scale to every listed discrete-capable aesthetic
|
|
150
|
+
* (including shape/linetype).
|
|
151
|
+
*/
|
|
152
|
+
export function scaleDiscreteIdentity(options: MultiIdentityScaleOptions): Scales {
|
|
153
|
+
const channels = assertAesthetics(
|
|
154
|
+
options.aesthetics,
|
|
155
|
+
DISCRETE_IDENTITY_AES,
|
|
156
|
+
"scaleDiscreteIdentity",
|
|
157
|
+
);
|
|
158
|
+
return assignChannels(channels, { type: "identity" });
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Apply the same manual domain/range mapping to every listed aesthetic.
|
|
163
|
+
* Callers must ensure `values` match each channel's output type (CSS colors
|
|
164
|
+
* for color/fill, numbers for size/alpha/linewidth, named tokens for
|
|
165
|
+
* shape/linetype) — tier-1 validation enforces that on the full plot.
|
|
166
|
+
*/
|
|
167
|
+
export function scaleDiscreteManual(options: MultiManualScaleOptions): Scales {
|
|
168
|
+
if (options.values.length === 0) {
|
|
169
|
+
throw new Error("scaleDiscreteManual: values must be a non-empty array.");
|
|
170
|
+
}
|
|
171
|
+
const channels = assertAesthetics(
|
|
172
|
+
options.aesthetics,
|
|
173
|
+
DISCRETE_IDENTITY_AES,
|
|
174
|
+
"scaleDiscreteManual",
|
|
175
|
+
);
|
|
176
|
+
const entry: Record<string, unknown> = {
|
|
177
|
+
type: "manual",
|
|
178
|
+
range: [...options.values],
|
|
179
|
+
};
|
|
180
|
+
if (options.domain !== undefined) {
|
|
181
|
+
entry["domain"] = [...options.domain];
|
|
182
|
+
}
|
|
183
|
+
return assignChannels(channels, entry);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export const scale_continuous_identity = scaleContinuousIdentity;
|
|
187
|
+
export const scale_discrete_identity = scaleDiscreteIdentity;
|
|
188
|
+
export const scale_discrete_manual = scaleDiscreteManual;
|
|
189
|
+
|
|
190
|
+
// --- scale_type registry (agent/tooling default selection) -------------------
|
|
191
|
+
|
|
192
|
+
export type ScaleTypeAesthetic = MultiScaleAesthetic | "x" | "y";
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Recommended PortableSpec scale family for an aesthetic + data kind.
|
|
196
|
+
* Not a full ggplot2 `scale_type` S3 registry — a small deterministic map for
|
|
197
|
+
* generators and repair tools.
|
|
198
|
+
*/
|
|
199
|
+
export type RecommendedScaleType = "linear" | "band" | "ordinal" | "sequential" | "identity";
|
|
200
|
+
|
|
201
|
+
export function scaleType(query: {
|
|
202
|
+
aesthetic: ScaleTypeAesthetic;
|
|
203
|
+
dataKind: ProfileFieldType;
|
|
204
|
+
}): RecommendedScaleType {
|
|
205
|
+
const aes = query.aesthetic === "colour" ? "color" : query.aesthetic;
|
|
206
|
+
if (aes === "x" || aes === "y") {
|
|
207
|
+
if (query.dataKind === "nominal" || query.dataKind === "ordinal") return "band";
|
|
208
|
+
// quantitative + temporal position → continuous linear (temporalKind is separate)
|
|
209
|
+
return "linear";
|
|
210
|
+
}
|
|
211
|
+
if (aes === "shape" || aes === "linetype") {
|
|
212
|
+
return "ordinal";
|
|
213
|
+
}
|
|
214
|
+
if (query.dataKind === "quantitative" || query.dataKind === "temporal") {
|
|
215
|
+
return "sequential";
|
|
216
|
+
}
|
|
217
|
+
return "ordinal";
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export const scale_type = scaleType;
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Position scale authoring helpers (x/y continuous, binned, temporal, discrete).
|
|
3
|
+
* Color/fill helpers: scale-color-helpers.ts (+ viridis/stops/hue-grey siblings). Facade re-exports: scale-helpers.ts.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { TemporalScaleKind } from "./temporal-parse-core.js";
|
|
7
|
+
import type { PositionScaleSpec, Scales } from "./schema.js";
|
|
8
|
+
|
|
9
|
+
export type TemporalScaleOptions = Omit<PositionScaleSpec, "type" | "temporalKind">;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Options for the continuous/binned position families. Temporal-only fields are
|
|
13
|
+
* excluded (use the date/datetime helpers for those). `limits` is authoring
|
|
14
|
+
* sugar for `domain`; supplying both throws.
|
|
15
|
+
*/
|
|
16
|
+
export type ContinuousPositionScaleOptions = Omit<
|
|
17
|
+
PositionScaleSpec,
|
|
18
|
+
| "type"
|
|
19
|
+
| "temporalKind"
|
|
20
|
+
| "parse"
|
|
21
|
+
| "parseFailure"
|
|
22
|
+
| "timezone"
|
|
23
|
+
| "disambiguation"
|
|
24
|
+
| "dateBreaks"
|
|
25
|
+
| "dateMinorBreaks"
|
|
26
|
+
| "dateLabels"
|
|
27
|
+
| "locale"
|
|
28
|
+
| "weekStart"
|
|
29
|
+
> & {
|
|
30
|
+
/** Pin the scale to [min, max] in source units (sugar for `domain`). */
|
|
31
|
+
limits?: PositionScaleSpec["domain"];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** Options for the transform-forcing helpers (log10/sqrt): `transform` is fixed. */
|
|
35
|
+
export type TransformedPositionScaleOptions = Omit<ContinuousPositionScaleOptions, "transform">;
|
|
36
|
+
export type DiscretePositionScaleOptions = Omit<
|
|
37
|
+
PositionScaleSpec,
|
|
38
|
+
| "type"
|
|
39
|
+
| "temporalKind"
|
|
40
|
+
| "parse"
|
|
41
|
+
| "parseFailure"
|
|
42
|
+
| "timezone"
|
|
43
|
+
| "disambiguation"
|
|
44
|
+
| "dateBreaks"
|
|
45
|
+
| "dateMinorBreaks"
|
|
46
|
+
| "dateLabels"
|
|
47
|
+
| "locale"
|
|
48
|
+
| "weekStart"
|
|
49
|
+
>;
|
|
50
|
+
|
|
51
|
+
function temporalScale(
|
|
52
|
+
axis: "x" | "y",
|
|
53
|
+
temporalKind: TemporalScaleKind,
|
|
54
|
+
options: TemporalScaleOptions = {},
|
|
55
|
+
): Scales {
|
|
56
|
+
return { [axis]: { type: "time", temporalKind, ...options } };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function discreteScale(axis: "x" | "y", options: DiscretePositionScaleOptions = {}): Scales {
|
|
60
|
+
const {
|
|
61
|
+
type: _,
|
|
62
|
+
temporalKind: __,
|
|
63
|
+
parse: ___,
|
|
64
|
+
parseFailure: ____,
|
|
65
|
+
timezone: _____,
|
|
66
|
+
disambiguation: ______,
|
|
67
|
+
dateBreaks: _______,
|
|
68
|
+
dateMinorBreaks: ________,
|
|
69
|
+
dateLabels: _________,
|
|
70
|
+
locale: __________,
|
|
71
|
+
weekStart: ___________,
|
|
72
|
+
...discrete
|
|
73
|
+
} = options as PositionScaleSpec;
|
|
74
|
+
return { [axis]: { type: "band", ...discrete } };
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function scaleXDate(options: TemporalScaleOptions = {}): Scales {
|
|
78
|
+
return temporalScale("x", "date", options);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function scaleXDatetime(options: TemporalScaleOptions = {}): Scales {
|
|
82
|
+
return temporalScale("x", "datetime", options);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function scaleYDate(options: TemporalScaleOptions = {}): Scales {
|
|
86
|
+
return temporalScale("y", "date", options);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function scaleYDatetime(options: TemporalScaleOptions = {}): Scales {
|
|
90
|
+
return temporalScale("y", "datetime", options);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Time-of-day position scale (ggplot2 `scale_x_time`).
|
|
95
|
+
* Portable numbers are **seconds since midnight** (0…86400); see TemporalKind `"time"`.
|
|
96
|
+
*/
|
|
97
|
+
export function scaleXTime(options: TemporalScaleOptions = {}): Scales {
|
|
98
|
+
return temporalScale("x", "time", options);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** Time-of-day position scale (ggplot2 `scale_y_time`). */
|
|
102
|
+
export function scaleYTime(options: TemporalScaleOptions = {}): Scales {
|
|
103
|
+
return temporalScale("y", "time", options);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Month-day position scale: the year collapses, so the same calendar day from
|
|
108
|
+
* any year shares one position. Values, `domain`, and `breaks` are all written
|
|
109
|
+
* without a year (`"04-05"`), and no year reaches a label. See TemporalKind
|
|
110
|
+
* `"monthDay"`. A window cannot cross the year boundary.
|
|
111
|
+
*/
|
|
112
|
+
export function scaleXMonthDay(options: TemporalScaleOptions = {}): Scales {
|
|
113
|
+
return temporalScale("x", "monthDay", options);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** Month-day position scale; see {@link scaleXMonthDay}. */
|
|
117
|
+
export function scaleYMonthDay(options: TemporalScaleOptions = {}): Scales {
|
|
118
|
+
return temporalScale("y", "monthDay", options);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function scaleXDiscrete(options: DiscretePositionScaleOptions = {}): Scales {
|
|
122
|
+
return discreteScale("x", options);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function scaleYDiscrete(options: DiscretePositionScaleOptions = {}): Scales {
|
|
126
|
+
return discreteScale("y", options);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export const scale_x_date = scaleXDate;
|
|
130
|
+
export const scale_x_datetime = scaleXDatetime;
|
|
131
|
+
export const scale_x_time = scaleXTime;
|
|
132
|
+
export const scale_y_date = scaleYDate;
|
|
133
|
+
export const scale_y_datetime = scaleYDatetime;
|
|
134
|
+
export const scale_y_time = scaleYTime;
|
|
135
|
+
export const scale_x_month_day = scaleXMonthDay;
|
|
136
|
+
export const scale_y_month_day = scaleYMonthDay;
|
|
137
|
+
export const scale_x_discrete = scaleXDiscrete;
|
|
138
|
+
export const scale_y_discrete = scaleYDiscrete;
|
|
139
|
+
|
|
140
|
+
// --- continuous / binned position families ----------------------------------
|
|
141
|
+
|
|
142
|
+
function continuousScale(
|
|
143
|
+
axis: "x" | "y",
|
|
144
|
+
type: "linear" | "binned",
|
|
145
|
+
options: ContinuousPositionScaleOptions,
|
|
146
|
+
forced: { transform?: "log10" | "sqrt"; reverse?: true } = {},
|
|
147
|
+
): Scales {
|
|
148
|
+
const { limits, domain, transform, reverse, ...rest } = options;
|
|
149
|
+
if (limits !== undefined && domain !== undefined) {
|
|
150
|
+
throw new TypeError(
|
|
151
|
+
"scale helper: supply either `limits` or `domain`, not both (both pin the scale).",
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
const resolvedDomain = domain ?? limits;
|
|
155
|
+
const resolvedTransform = forced.transform ?? transform;
|
|
156
|
+
const resolvedReverse = forced.reverse ?? reverse;
|
|
157
|
+
return {
|
|
158
|
+
[axis]: {
|
|
159
|
+
type,
|
|
160
|
+
...(resolvedTransform !== undefined && { transform: resolvedTransform }),
|
|
161
|
+
...(resolvedReverse !== undefined && { reverse: resolvedReverse }),
|
|
162
|
+
...(resolvedDomain !== undefined && { domain: resolvedDomain }),
|
|
163
|
+
...rest,
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** Configure the x scale as a continuous linear scale (default numeric family). */
|
|
169
|
+
export function scaleXContinuous(options: ContinuousPositionScaleOptions = {}): Scales {
|
|
170
|
+
return continuousScale("x", "linear", options);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** Configure the y scale as a continuous linear scale (default numeric family). */
|
|
174
|
+
export function scaleYContinuous(options: ContinuousPositionScaleOptions = {}): Scales {
|
|
175
|
+
return continuousScale("y", "linear", options);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/** Configure the x scale as a base-10 log scale (pre-stat log10 transform). */
|
|
179
|
+
export function scaleXLog10(options: TransformedPositionScaleOptions = {}): Scales {
|
|
180
|
+
return continuousScale("x", "linear", options, { transform: "log10" });
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** Configure the y scale as a base-10 log scale (pre-stat log10 transform). */
|
|
184
|
+
export function scaleYLog10(options: TransformedPositionScaleOptions = {}): Scales {
|
|
185
|
+
return continuousScale("y", "linear", options, { transform: "log10" });
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/** Configure the x scale as a square-root scale (pre-stat sqrt transform). */
|
|
189
|
+
export function scaleXSqrt(options: TransformedPositionScaleOptions = {}): Scales {
|
|
190
|
+
return continuousScale("x", "linear", options, { transform: "sqrt" });
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/** Configure the y scale as a square-root scale (pre-stat sqrt transform). */
|
|
194
|
+
export function scaleYSqrt(options: TransformedPositionScaleOptions = {}): Scales {
|
|
195
|
+
return continuousScale("y", "linear", options, { transform: "sqrt" });
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/** Reverse the x scale's output direction (identity continuous scale, reverse: true). */
|
|
199
|
+
export function scaleXReverse(
|
|
200
|
+
options: Omit<ContinuousPositionScaleOptions, "transform" | "reverse"> = {},
|
|
201
|
+
): Scales {
|
|
202
|
+
return continuousScale("x", "linear", options, { reverse: true });
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/** Reverse the y scale's output direction (identity continuous scale, reverse: true). */
|
|
206
|
+
export function scaleYReverse(
|
|
207
|
+
options: Omit<ContinuousPositionScaleOptions, "transform" | "reverse"> = {},
|
|
208
|
+
): Scales {
|
|
209
|
+
return continuousScale("y", "linear", options, { reverse: true });
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/** Configure the x scale as a binned (ordered-bin) quantitative scale. */
|
|
213
|
+
export function scaleXBinned(options: ContinuousPositionScaleOptions = {}): Scales {
|
|
214
|
+
return continuousScale("x", "binned", options);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** Configure the y scale as a binned (ordered-bin) quantitative scale. */
|
|
218
|
+
export function scaleYBinned(options: ContinuousPositionScaleOptions = {}): Scales {
|
|
219
|
+
return continuousScale("y", "binned", options);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export const scale_x_continuous = scaleXContinuous;
|
|
223
|
+
export const scale_y_continuous = scaleYContinuous;
|
|
224
|
+
export const scale_x_log10 = scaleXLog10;
|
|
225
|
+
export const scale_y_log10 = scaleYLog10;
|
|
226
|
+
export const scale_x_sqrt = scaleXSqrt;
|
|
227
|
+
export const scale_y_sqrt = scaleYSqrt;
|
|
228
|
+
export const scale_x_reverse = scaleXReverse;
|
|
229
|
+
export const scale_y_reverse = scaleYReverse;
|
|
230
|
+
export const scale_x_binned = scaleXBinned;
|
|
231
|
+
export const scale_y_binned = scaleYBinned;
|