@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,253 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation error catalog — stable codes for agent diagnostics and docs.
|
|
3
|
+
* Dual-channel codes (also emitable by the pipeline) pull summary/fix from
|
|
4
|
+
* error-prose-shared.ts (#987). SpecError instance types and didYouMean live
|
|
5
|
+
* in errors.ts. Pipeline-only codes live in pipeline-error-catalog.ts.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { DUAL_ERROR_PROSE } from "./error-prose-shared.js";
|
|
9
|
+
|
|
10
|
+
/** One entry of the validation error catalog (docs render straight from it). */
|
|
11
|
+
export interface ErrorCatalogEntry {
|
|
12
|
+
/** 1 = schema shape / structural (no data needed); 2 = data-aware (opt-in). */
|
|
13
|
+
tier: 1 | 2;
|
|
14
|
+
/** What went wrong, in one sentence. */
|
|
15
|
+
summary: string;
|
|
16
|
+
/** How to fix it, prescriptively (instances carry a concrete fix.example). */
|
|
17
|
+
fix: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The stable catalog of validation error codes — THE single source for the
|
|
22
|
+
* docs error-reference page and llms-full.txt for validation. Dual-channel
|
|
23
|
+
* prose is shared with PIPELINE_ERROR_CATALOG via DUAL_ERROR_PROSE.
|
|
24
|
+
* Audited M3: every code has a prescriptive summary + fix; a coverage test
|
|
25
|
+
* asserts every code is exercised by a snapshot test.
|
|
26
|
+
*/
|
|
27
|
+
export const ERROR_CATALOG = {
|
|
28
|
+
// --- tier 1 (schema shape, no data needed) -------------------------------
|
|
29
|
+
"invalid-spec-root": {
|
|
30
|
+
tier: 1,
|
|
31
|
+
summary: "The spec is not a JSON object.",
|
|
32
|
+
fix: 'Provide an object with at least one layer: {"layers": [{"geom": "point", ...}]}.',
|
|
33
|
+
},
|
|
34
|
+
"missing-layers": {
|
|
35
|
+
tier: 1,
|
|
36
|
+
summary: "`layers` is missing or not an array.",
|
|
37
|
+
fix: "Add a layers array with at least one layer object.",
|
|
38
|
+
},
|
|
39
|
+
"empty-layers": {
|
|
40
|
+
tier: 1,
|
|
41
|
+
summary: "`layers` is present but empty (a plot needs at least one layer).",
|
|
42
|
+
fix: 'Add a layer, e.g. {"geom": "point"}.',
|
|
43
|
+
},
|
|
44
|
+
"invalid-layer": {
|
|
45
|
+
tier: 1,
|
|
46
|
+
summary: "A layer is not an object.",
|
|
47
|
+
fix: 'Replace the entry with a layer object carrying a "geom".',
|
|
48
|
+
},
|
|
49
|
+
"missing-geom": {
|
|
50
|
+
tier: 1,
|
|
51
|
+
summary: 'A layer has no "geom" discriminator.',
|
|
52
|
+
fix: 'Add a geom name to the layer, e.g. {"geom": "point"}.',
|
|
53
|
+
},
|
|
54
|
+
"unknown-geom": {
|
|
55
|
+
tier: 1,
|
|
56
|
+
summary: 'A layer\'s "geom" is not a known geom name.',
|
|
57
|
+
fix: "Use one of the allowed geoms (the error lists them, with a did-you-mean).",
|
|
58
|
+
},
|
|
59
|
+
"invalid-channel-value": {
|
|
60
|
+
tier: 1,
|
|
61
|
+
summary:
|
|
62
|
+
"A channel value is not one of the canonical forms {field}/{value}/{stat}/null (bare strings are builder-only shorthand).",
|
|
63
|
+
fix: 'Wrap field mappings as {"field": "column_name"} and constants as {"value": ...}.',
|
|
64
|
+
},
|
|
65
|
+
"unexpected-property": {
|
|
66
|
+
tier: 1,
|
|
67
|
+
summary: "An object carries a property the schema does not allow.",
|
|
68
|
+
fix: "Remove or rename the property (the error suggests the closest allowed name).",
|
|
69
|
+
},
|
|
70
|
+
"missing-property": {
|
|
71
|
+
tier: 1,
|
|
72
|
+
summary: "A required property is missing.",
|
|
73
|
+
fix: "Add the named property.",
|
|
74
|
+
},
|
|
75
|
+
"invalid-enum-value": {
|
|
76
|
+
tier: 1,
|
|
77
|
+
summary: "A value is outside its declared enum/literal set.",
|
|
78
|
+
fix: "Use one of the allowed values (the error lists them, with a did-you-mean).",
|
|
79
|
+
},
|
|
80
|
+
"value-out-of-range": {
|
|
81
|
+
tier: 1,
|
|
82
|
+
summary: "A numeric value is outside its declared bounds.",
|
|
83
|
+
fix: "Set the value inside the bounds stated by the error message.",
|
|
84
|
+
},
|
|
85
|
+
"invalid-data": {
|
|
86
|
+
tier: 1,
|
|
87
|
+
summary: "`data` (or a dataset entry) matches none of the data forms.",
|
|
88
|
+
fix: 'Use {"values": [...rows]}, {"columns": {...arrays}}, or {"name": "dataset"}.',
|
|
89
|
+
},
|
|
90
|
+
"invalid-type": {
|
|
91
|
+
tier: 1,
|
|
92
|
+
summary: "Fallback: a value has the wrong JSON type.",
|
|
93
|
+
fix: "Give the property the JSON type the message names.",
|
|
94
|
+
},
|
|
95
|
+
"scale-scheme-type": {
|
|
96
|
+
tier: 1,
|
|
97
|
+
summary: "A named color scheme is incompatible with the configured color scale type.",
|
|
98
|
+
fix: 'Use a categorical scheme with "ordinal" (or a sequential-family scheme like "viridis" for discrete viridis), or "viridis"/hex stops with "sequential". Cyclic *O schemes are sequential only.',
|
|
99
|
+
},
|
|
100
|
+
"scale-scheme-oob": {
|
|
101
|
+
tier: 1,
|
|
102
|
+
summary: "The out-of-bounds policy is incompatible with the named color scheme or scale type.",
|
|
103
|
+
fix: 'Use oob "wrap" with a cyclic *O scheme. Do not set wrap on a binned color scale.',
|
|
104
|
+
},
|
|
105
|
+
"scale-cyclic-domain": {
|
|
106
|
+
tier: 1,
|
|
107
|
+
summary: "A cyclic color scheme is missing the explicit two-value domain period.",
|
|
108
|
+
fix: "Set domain to one period, for example [0, 360] for angles in degrees.",
|
|
109
|
+
},
|
|
110
|
+
"scale-range-color": {
|
|
111
|
+
tier: 1,
|
|
112
|
+
summary: "A custom color range contains a color outside the supported hex syntax.",
|
|
113
|
+
fix: "Replace each custom color with #rgb or #rrggbb syntax.",
|
|
114
|
+
},
|
|
115
|
+
"scale-type-transform-conflict": {
|
|
116
|
+
tier: 1,
|
|
117
|
+
...DUAL_ERROR_PROSE["scale-type-transform-conflict"],
|
|
118
|
+
},
|
|
119
|
+
"color-manual-domain-range": {
|
|
120
|
+
tier: 1,
|
|
121
|
+
...DUAL_ERROR_PROSE["color-manual-domain-range"],
|
|
122
|
+
},
|
|
123
|
+
"scale-binned-breaks": {
|
|
124
|
+
tier: 1,
|
|
125
|
+
summary:
|
|
126
|
+
"A binned style scale's authored breaks are missing, non-finite after parsing, duplicated, or not strictly increasing.",
|
|
127
|
+
fix: "Provide 2+ strictly increasing boundaries (numeric, or temporal strings that parse under the scale's parser).",
|
|
128
|
+
},
|
|
129
|
+
"scale-binned-domain": {
|
|
130
|
+
tier: 1,
|
|
131
|
+
summary:
|
|
132
|
+
"A binned style scale's explicit domain does not match the first and last authored breaks.",
|
|
133
|
+
fix: "Set domain to the first and last break values, or omit domain and let breaks define it.",
|
|
134
|
+
},
|
|
135
|
+
"guide-aesthetic-incompatible": {
|
|
136
|
+
tier: 1,
|
|
137
|
+
...DUAL_ERROR_PROSE["guide-aesthetic-incompatible"],
|
|
138
|
+
},
|
|
139
|
+
"coord-fixed-free-scales": {
|
|
140
|
+
tier: 1,
|
|
141
|
+
...DUAL_ERROR_PROSE["coord-fixed-free-scales"],
|
|
142
|
+
},
|
|
143
|
+
// --- tier 1 structural (grammar rules the schema alone cannot express) ---
|
|
144
|
+
"missing-required-channel": {
|
|
145
|
+
tier: 2,
|
|
146
|
+
summary: "A geom is missing a required aesthetic channel (x, y, label, ...).",
|
|
147
|
+
fix: "Map the named channel to a data field in the layer's aes or the plot-level aes.",
|
|
148
|
+
},
|
|
149
|
+
"rule-form-ambiguous": {
|
|
150
|
+
tier: 2,
|
|
151
|
+
...DUAL_ERROR_PROSE["rule-form-ambiguous"],
|
|
152
|
+
},
|
|
153
|
+
"rule-form-missing": {
|
|
154
|
+
tier: 2,
|
|
155
|
+
...DUAL_ERROR_PROSE["rule-form-missing"],
|
|
156
|
+
},
|
|
157
|
+
"rule-both-axes": {
|
|
158
|
+
tier: 2,
|
|
159
|
+
...DUAL_ERROR_PROSE["rule-both-axes"],
|
|
160
|
+
},
|
|
161
|
+
"computed-y-mapped": {
|
|
162
|
+
tier: 2,
|
|
163
|
+
...DUAL_ERROR_PROSE["computed-y-mapped"],
|
|
164
|
+
},
|
|
165
|
+
"bin-center-and-boundary": {
|
|
166
|
+
tier: 2,
|
|
167
|
+
...DUAL_ERROR_PROSE["bin-center-and-boundary"],
|
|
168
|
+
},
|
|
169
|
+
"facet-form-ambiguous": {
|
|
170
|
+
tier: 2,
|
|
171
|
+
...DUAL_ERROR_PROSE["facet-form-ambiguous"],
|
|
172
|
+
},
|
|
173
|
+
"facet-form-missing": {
|
|
174
|
+
tier: 2,
|
|
175
|
+
...DUAL_ERROR_PROSE["facet-form-missing"],
|
|
176
|
+
},
|
|
177
|
+
"facet-ncol-without-wrap": {
|
|
178
|
+
tier: 2,
|
|
179
|
+
summary: "facet.ncol only applies to the wrap form.",
|
|
180
|
+
fix: "Remove ncol, or switch to the wrap form.",
|
|
181
|
+
},
|
|
182
|
+
"unsupported-geom-aesthetic": {
|
|
183
|
+
tier: 2,
|
|
184
|
+
...DUAL_ERROR_PROSE["unsupported-geom-aesthetic"],
|
|
185
|
+
},
|
|
186
|
+
"ribbon-orientation-ambiguous": {
|
|
187
|
+
tier: 2,
|
|
188
|
+
...DUAL_ERROR_PROSE["ribbon-orientation-ambiguous"],
|
|
189
|
+
},
|
|
190
|
+
"paint-stops-unordered": {
|
|
191
|
+
tier: 2,
|
|
192
|
+
summary: "A gradient paint's color stops are not in non-decreasing offset order.",
|
|
193
|
+
fix: "Sort stops by offset ascending (each offset between 0 and 1 inclusive).",
|
|
194
|
+
},
|
|
195
|
+
"paint-scale-conflict": {
|
|
196
|
+
tier: 2,
|
|
197
|
+
summary:
|
|
198
|
+
"Within-mark fillPaint/strokePaint cannot combine with a data-mapped fill/color scale channel.",
|
|
199
|
+
fix: "Remove the data-mapped fill/color aesthetic, or remove the paint and keep the scale.",
|
|
200
|
+
},
|
|
201
|
+
// --- tier 2 (data-aware; needs inline data or a DataProfile) -------------
|
|
202
|
+
"unknown-field": {
|
|
203
|
+
tier: 2,
|
|
204
|
+
...DUAL_ERROR_PROSE["unknown-field"],
|
|
205
|
+
},
|
|
206
|
+
"all-null-column": {
|
|
207
|
+
tier: 2,
|
|
208
|
+
...DUAL_ERROR_PROSE["all-null-column"],
|
|
209
|
+
},
|
|
210
|
+
"scale-type-mismatch": {
|
|
211
|
+
tier: 2,
|
|
212
|
+
summary: "A configured scale type is incompatible with the mapped field's type.",
|
|
213
|
+
fix: "Change the scale type to match the field (band for categories, time for temporal), or map a compatible field.",
|
|
214
|
+
},
|
|
215
|
+
"channel-type-mismatch": {
|
|
216
|
+
tier: 2,
|
|
217
|
+
...DUAL_ERROR_PROSE["channel-type-mismatch"],
|
|
218
|
+
},
|
|
219
|
+
"unknown-stat-column": {
|
|
220
|
+
tier: 2,
|
|
221
|
+
...DUAL_ERROR_PROSE["unknown-stat-column"],
|
|
222
|
+
},
|
|
223
|
+
"manual-fun-required": {
|
|
224
|
+
// Structural grammar (layerStructuralErrors) — opt-in tier-2 only; not plain validate().
|
|
225
|
+
tier: 2,
|
|
226
|
+
...DUAL_ERROR_PROSE["manual-fun-required"],
|
|
227
|
+
},
|
|
228
|
+
"summary-rolling-window-required": {
|
|
229
|
+
// Structural grammar (layerStructuralErrors) — opt-in tier-2 only; not plain validate().
|
|
230
|
+
tier: 2,
|
|
231
|
+
...DUAL_ERROR_PROSE["summary-rolling-window-required"],
|
|
232
|
+
},
|
|
233
|
+
"summary-fun-unsupported": {
|
|
234
|
+
// Structural grammar (layerStructuralErrors) — opt-in tier-2 only; not plain validate().
|
|
235
|
+
tier: 2,
|
|
236
|
+
...DUAL_ERROR_PROSE["summary-fun-unsupported"],
|
|
237
|
+
},
|
|
238
|
+
"invalid-data-profile": {
|
|
239
|
+
tier: 2,
|
|
240
|
+
summary: "The provided DataProfile is malformed.",
|
|
241
|
+
fix: 'Provide { fields: [{ name, type: "quantitative"|"temporal"|"ordinal"|"nominal" }], rowCount? }.',
|
|
242
|
+
},
|
|
243
|
+
"validation-limit": {
|
|
244
|
+
tier: 2,
|
|
245
|
+
summary: "Validation input exceeded a documented limit (rows/bytes/depth/diagnostics).",
|
|
246
|
+
fix: "Validate with a DataProfile instead of huge inline data, or raise the limit via options.limits.",
|
|
247
|
+
},
|
|
248
|
+
} as const satisfies Record<string, ErrorCatalogEntry>;
|
|
249
|
+
|
|
250
|
+
export type SpecErrorCode = keyof typeof ERROR_CATALOG;
|
|
251
|
+
|
|
252
|
+
/** The stable list of validation error codes (keys of ERROR_CATALOG). */
|
|
253
|
+
export const ERROR_CODES = Object.keys(ERROR_CATALOG) as readonly SpecErrorCode[];
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared summary/fix prose for diagnostic codes that both validation
|
|
3
|
+
* (ERROR_CATALOG) and the pipeline (PIPELINE_ERROR_CATALOG) can emit.
|
|
4
|
+
* One object per code — import into both catalogs so the strings cannot drift.
|
|
5
|
+
*
|
|
6
|
+
* #987: missing-channel vs missing-required-channel is intentionally NOT
|
|
7
|
+
* merged here (different public code strings; one rename per change).
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** Prose body shared by dual-channel error codes. */
|
|
11
|
+
export interface SharedErrorProse {
|
|
12
|
+
summary: string;
|
|
13
|
+
fix: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Dual-channel codes and their single prose source.
|
|
18
|
+
* Keep keys sorted; scripts/error-catalog-shared-prose.test.ts pins membership.
|
|
19
|
+
*/
|
|
20
|
+
export const DUAL_ERROR_PROSE = {
|
|
21
|
+
"all-null-column": {
|
|
22
|
+
summary: "A mapped column contains only null values.",
|
|
23
|
+
fix: "Map the channel to a column with actual values, or fix the data.",
|
|
24
|
+
},
|
|
25
|
+
"bin-center-and-boundary": {
|
|
26
|
+
summary: "A bin-stat layer sets BOTH params.center and params.boundary.",
|
|
27
|
+
fix: "Keep one bin-grid alignment parameter and remove the other.",
|
|
28
|
+
},
|
|
29
|
+
"channel-type-mismatch": {
|
|
30
|
+
summary:
|
|
31
|
+
"A mapped field's type is incompatible with the layer's geom/stat (e.g. a nominal x on smooth/bin/density, a continuous x on boxplot).",
|
|
32
|
+
fix: "Map a field of the type the geom/stat needs, or switch to a geom that fits the field (the message suggests one).",
|
|
33
|
+
},
|
|
34
|
+
"color-manual-domain-range": {
|
|
35
|
+
summary: "A manual color/fill scale has a different number of domain values and range colors.",
|
|
36
|
+
fix: "Provide exactly one range color for every domain value.",
|
|
37
|
+
},
|
|
38
|
+
"computed-y-mapped": {
|
|
39
|
+
summary: "A layer whose stat computes y (count, bin, density) maps aes.y to a data field.",
|
|
40
|
+
fix: 'Unset y with null — or, for pre-computed bar heights, switch the layer to geom "col".',
|
|
41
|
+
},
|
|
42
|
+
"coord-fixed-free-scales": {
|
|
43
|
+
summary: "Fixed-aspect coordinates cannot represent free positional facet scales truthfully.",
|
|
44
|
+
fix: 'Use facet.scales = "fixed", or remove coord_fixed / coord_sf.',
|
|
45
|
+
},
|
|
46
|
+
"facet-form-ambiguous": {
|
|
47
|
+
summary: "A facet sets BOTH the wrap form and the rows/cols grid form.",
|
|
48
|
+
fix: "Keep facet.wrap (and drop rows/cols), or keep rows/cols (and drop wrap).",
|
|
49
|
+
},
|
|
50
|
+
"facet-form-missing": {
|
|
51
|
+
summary: "A facet sets neither wrap nor rows/cols — nothing to partition by.",
|
|
52
|
+
fix: "Set facet.wrap (wrap form) or facet.rows/facet.cols (grid form).",
|
|
53
|
+
},
|
|
54
|
+
"guide-aesthetic-incompatible": {
|
|
55
|
+
summary: "A guide variant is incompatible with its aesthetic or trained scale family.",
|
|
56
|
+
fix: "Use axis for x/y, legend for discrete/style scales, colorbar for sequential color, or colorsteps for binned color.",
|
|
57
|
+
},
|
|
58
|
+
"manual-fun-required": {
|
|
59
|
+
summary: "A layer uses stat manual without params.fun.",
|
|
60
|
+
fix: "Set params.fun to one of first|last|mean|median|min|max|sum (portable named registry; #814).",
|
|
61
|
+
},
|
|
62
|
+
"summary-rolling-window-required": {
|
|
63
|
+
summary: "A layer uses stat summary_rolling without params.window.",
|
|
64
|
+
fix: "Set params.window to the rolling-window width in x data units (greater than 0).",
|
|
65
|
+
},
|
|
66
|
+
"summary-fun-unsupported": {
|
|
67
|
+
summary: "A summary stat uses params.fun first|last, which only stat manual implements.",
|
|
68
|
+
fix: "Use mean, median, or sum (min/max via funMin/funMax where supported); first|last belong to stat manual.",
|
|
69
|
+
},
|
|
70
|
+
"ribbon-orientation-ambiguous": {
|
|
71
|
+
summary:
|
|
72
|
+
"A ribbon layer maps both x-orientation (x+ymin+ymax) and y-orientation (y+xmin+xmax) contracts without params.orientation.",
|
|
73
|
+
fix: 'Set params.orientation to "x" or "y", or map only one complete interval contract.',
|
|
74
|
+
},
|
|
75
|
+
"rule-both-axes": {
|
|
76
|
+
summary: "A data-driven rule layer maps BOTH aes.x and aes.y (pick one direction).",
|
|
77
|
+
fix: "Keep one direction (vertical: map x; horizontal: map y) and unset the other with null.",
|
|
78
|
+
},
|
|
79
|
+
"rule-form-ambiguous": {
|
|
80
|
+
summary:
|
|
81
|
+
"A rule layer mixes the annotation form (params.xintercept/yintercept) with mapped aes.x/aes.y.",
|
|
82
|
+
fix: "Use fixed intercepts OR a data mapping, never both (unset the other with null).",
|
|
83
|
+
},
|
|
84
|
+
"rule-form-missing": {
|
|
85
|
+
summary:
|
|
86
|
+
"A rule layer has neither intercept params nor a mapped aes.x/aes.y — nothing to draw.",
|
|
87
|
+
fix: "Set params.yintercept/xintercept (annotation) or map aes.x/aes.y (data-driven).",
|
|
88
|
+
},
|
|
89
|
+
"scale-type-transform-conflict": {
|
|
90
|
+
summary:
|
|
91
|
+
'A scale declares an incompatible type/family with its transform (temporal/discrete/manual/identity with a non-identity transform, or type: "log" with a non-log10 transform).',
|
|
92
|
+
fix: 'Use identity for temporal/discrete/manual/identity scales; for base-10 log use type: "linear" with transform: "log10"; or choose a quantitative family that admits the transform.',
|
|
93
|
+
},
|
|
94
|
+
"unknown-field": {
|
|
95
|
+
summary: "A channel maps a field that does not exist in the data.",
|
|
96
|
+
fix: "Map the channel to one of the available fields (the error lists them, with a did-you-mean).",
|
|
97
|
+
},
|
|
98
|
+
"unknown-stat-column": {
|
|
99
|
+
summary: "A { stat } channel names a column the layer's stat does not generate.",
|
|
100
|
+
fix: "Use one of the columns the stat generates (the error lists them), or change the layer's stat.",
|
|
101
|
+
},
|
|
102
|
+
"unsupported-geom-aesthetic": {
|
|
103
|
+
summary: "A mapped style aesthetic is not consumed by the selected geom.",
|
|
104
|
+
fix: "Remove the mapping or move it to one of the compatible geoms listed in the error.",
|
|
105
|
+
},
|
|
106
|
+
} as const satisfies Record<string, SharedErrorProse>;
|
package/src/errors.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent-facing error contract (plan: "Validation for agents") + helpers.
|
|
3
|
+
* Every validation diagnostic is a SpecError:
|
|
4
|
+
*
|
|
5
|
+
* { code, path, message, allowed?, fix? }
|
|
6
|
+
*
|
|
7
|
+
* The stable ERROR_CATALOG lives in error-catalog.ts and is re-exported here
|
|
8
|
+
* so package and deep imports keep the ./errors.js path.
|
|
9
|
+
*
|
|
10
|
+
* "Did you mean" suggestions use a small Levenshtein distance so agents get a
|
|
11
|
+
* concrete correction for typo'd geoms/channels/params.
|
|
12
|
+
*/
|
|
13
|
+
import type { JSONValue } from "./portability.js";
|
|
14
|
+
import type { SpecErrorCode } from "./error-catalog.js";
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
ERROR_CATALOG,
|
|
18
|
+
ERROR_CODES,
|
|
19
|
+
type ErrorCatalogEntry,
|
|
20
|
+
type SpecErrorCode,
|
|
21
|
+
} from "./error-catalog.js";
|
|
22
|
+
|
|
23
|
+
export interface SpecErrorFix {
|
|
24
|
+
description: string;
|
|
25
|
+
example?: JSONValue;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface SpecError {
|
|
29
|
+
code: SpecErrorCode;
|
|
30
|
+
path: string;
|
|
31
|
+
message: string;
|
|
32
|
+
allowed?: string[];
|
|
33
|
+
fix?: SpecErrorFix;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Thrown by builder .spec() / render entry points when validation fails. */
|
|
37
|
+
export class SpecValidationError extends Error {
|
|
38
|
+
readonly errors: readonly SpecError[];
|
|
39
|
+
|
|
40
|
+
constructor(errors: readonly SpecError[]) {
|
|
41
|
+
const lines = errors.map((e) => ` [${e.code}] ${e.path || "/"}: ${e.message}`);
|
|
42
|
+
super(
|
|
43
|
+
`Invalid plot spec (${errors.length} error${errors.length === 1 ? "" : "s"}):\n` +
|
|
44
|
+
lines.join("\n"),
|
|
45
|
+
);
|
|
46
|
+
this.name = "SpecValidationError";
|
|
47
|
+
this.errors = errors;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Classic dynamic-programming Levenshtein distance (small inputs only). */
|
|
52
|
+
export function levenshtein(a: string, b: string): number {
|
|
53
|
+
if (a === b) return 0;
|
|
54
|
+
const m = a.length;
|
|
55
|
+
const n = b.length;
|
|
56
|
+
if (m === 0) return n;
|
|
57
|
+
if (n === 0) return m;
|
|
58
|
+
let prev = Array.from({ length: n + 1 }, (_, j) => j);
|
|
59
|
+
let curr = Array.from({ length: n + 1 }, () => 0);
|
|
60
|
+
for (let i = 1; i <= m; i++) {
|
|
61
|
+
curr[0] = i;
|
|
62
|
+
for (let j = 1; j <= n; j++) {
|
|
63
|
+
const cost = a[i - 1] === b[j - 1] ? 0 : 1;
|
|
64
|
+
curr[j] = Math.min(prev[j]! + 1, curr[j - 1]! + 1, prev[j - 1]! + cost);
|
|
65
|
+
}
|
|
66
|
+
[prev, curr] = [curr, prev];
|
|
67
|
+
}
|
|
68
|
+
return prev[n]!;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The closest candidate within an input-length-scaled distance budget
|
|
73
|
+
* (<= max(1, floor(len/3)) edits, case-insensitive), or undefined.
|
|
74
|
+
*/
|
|
75
|
+
export function didYouMean(input: string, candidates: readonly string[]): string | undefined {
|
|
76
|
+
const budget = Math.max(1, Math.floor(input.length / 3));
|
|
77
|
+
let best: string | undefined;
|
|
78
|
+
let bestDist = budget + 1;
|
|
79
|
+
for (const candidate of candidates) {
|
|
80
|
+
const d = levenshtein(input.toLowerCase(), candidate.toLowerCase());
|
|
81
|
+
if (d < bestDist) {
|
|
82
|
+
bestDist = d;
|
|
83
|
+
best = candidate;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return best;
|
|
87
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED by scripts/gen-reference-catalogs.ts — do not edit by hand.
|
|
3
|
+
* Regenerate: bun run reference:catalogs:gen
|
|
4
|
+
*
|
|
5
|
+
* COORD_REFERENCE — per-coord API docs.
|
|
6
|
+
*/
|
|
7
|
+
export const COORD_REFERENCE_DATA = {
|
|
8
|
+
cartesian: {
|
|
9
|
+
name: "cartesian",
|
|
10
|
+
slug: "cartesian",
|
|
11
|
+
component: "CoordCartesian",
|
|
12
|
+
typeLiteral: "cartesian",
|
|
13
|
+
schemaType: "CoordCartesianSpec",
|
|
14
|
+
helper: "",
|
|
15
|
+
helperAlias: "",
|
|
16
|
+
alsoHelpers: [],
|
|
17
|
+
alsoExportedAs: [],
|
|
18
|
+
builderMethods: ["coord"],
|
|
19
|
+
summary:
|
|
20
|
+
'Default Cartesian coordinates. Omit coord or use CoordCartesian to clear a prior REPLACE-family coord; normalize() drops bare { type: "cartesian" }.',
|
|
21
|
+
params: [],
|
|
22
|
+
axisParams: [],
|
|
23
|
+
},
|
|
24
|
+
flip: {
|
|
25
|
+
name: "flip",
|
|
26
|
+
slug: "flip",
|
|
27
|
+
component: "CoordFlip",
|
|
28
|
+
typeLiteral: "flip",
|
|
29
|
+
schemaType: "CoordCartesianSpec",
|
|
30
|
+
helper: "",
|
|
31
|
+
helperAlias: "",
|
|
32
|
+
alsoHelpers: [],
|
|
33
|
+
alsoExportedAs: [],
|
|
34
|
+
builderMethods: ["coordFlip", "coord"],
|
|
35
|
+
summary:
|
|
36
|
+
"Swap display axes so semantic x paints vertically and y horizontally. The mechanism for horizontal bar charts; stack, dodge, and hit-testing follow the flip.",
|
|
37
|
+
params: [],
|
|
38
|
+
axisParams: [],
|
|
39
|
+
},
|
|
40
|
+
transform: {
|
|
41
|
+
name: "transform",
|
|
42
|
+
slug: "transform",
|
|
43
|
+
component: "CoordTransform",
|
|
44
|
+
typeLiteral: "transform",
|
|
45
|
+
schemaType: "CoordTransformSpec",
|
|
46
|
+
helper: "coordTransform",
|
|
47
|
+
helperAlias: "coord_transform",
|
|
48
|
+
alsoHelpers: [],
|
|
49
|
+
alsoExportedAs: [],
|
|
50
|
+
builderMethods: ["coordTransform", "coord"],
|
|
51
|
+
summary:
|
|
52
|
+
"Post-stat coordinate projection with independent x/y transforms (identity, log10, sqrt), semantic viewport limits, reverse, and panel clipping. Distinct from pre-stat scale transforms.",
|
|
53
|
+
params: [
|
|
54
|
+
{
|
|
55
|
+
name: "x",
|
|
56
|
+
description:
|
|
57
|
+
"Optional x-axis projector: transform, semantic limits, reverse, and expand. Accepts a transform name string or an axis options object on the helper/shell.",
|
|
58
|
+
typeSummary: "CoordTransformAxisSpec",
|
|
59
|
+
required: false,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "y",
|
|
63
|
+
description:
|
|
64
|
+
"Optional y-axis projector: transform, semantic limits, reverse, and expand. Accepts a transform name string or an axis options object on the helper/shell.",
|
|
65
|
+
typeSummary: "CoordTransformAxisSpec",
|
|
66
|
+
required: false,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "clip",
|
|
70
|
+
description:
|
|
71
|
+
"Clip marks to the panel rectangle (default true). Set false only when intentional overflow should remain visible.",
|
|
72
|
+
typeSummary: "boolean",
|
|
73
|
+
required: false,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
axisParams: [
|
|
77
|
+
{
|
|
78
|
+
name: "transform",
|
|
79
|
+
description:
|
|
80
|
+
"Post-stat coordinate transform for this axis: identity, base-10 logarithm, or square root.",
|
|
81
|
+
typeSummary: '"identity" | "log10" | "sqrt"',
|
|
82
|
+
required: true,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "limits",
|
|
86
|
+
description:
|
|
87
|
+
"Optional coordinate viewport [min, max] in semantic/source units. Exactly two numbers. Unlike scale limits, coordinate limits do not remove rows or recompute statistics.",
|
|
88
|
+
typeSummary: "[number, number]",
|
|
89
|
+
required: false,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "reverse",
|
|
93
|
+
description:
|
|
94
|
+
"Reverse this coordinate axis after its transform without changing stat inputs or the trained semantic scale domain.",
|
|
95
|
+
typeSummary: "boolean",
|
|
96
|
+
required: false,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "expand",
|
|
100
|
+
description:
|
|
101
|
+
"Whether explicit coordinate limits receive the default 5% transformed-space display expansion (default true). Set false for exact viewport limits.",
|
|
102
|
+
typeSummary: "boolean",
|
|
103
|
+
required: false,
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
fixed: {
|
|
108
|
+
name: "fixed",
|
|
109
|
+
slug: "fixed",
|
|
110
|
+
component: "CoordFixed",
|
|
111
|
+
typeLiteral: "fixed",
|
|
112
|
+
schemaType: "CoordFixedSpec",
|
|
113
|
+
helper: "coordFixed",
|
|
114
|
+
helperAlias: "coord_fixed",
|
|
115
|
+
alsoHelpers: ["coordEqual", "coord_equal"],
|
|
116
|
+
alsoExportedAs: ["CoordEqual"],
|
|
117
|
+
builderMethods: ["coordFixed", "coordEqual", "coord"],
|
|
118
|
+
summary:
|
|
119
|
+
"Fixed physical data-unit aspect ratio (y-unit length / x-unit length). Layout fits the largest centered data rectangle after chart chrome; rejects free positional facet scales.",
|
|
120
|
+
params: [
|
|
121
|
+
{
|
|
122
|
+
name: "ratio",
|
|
123
|
+
description:
|
|
124
|
+
"Physical y-unit length divided by physical x-unit length (default 1, equal units).",
|
|
125
|
+
typeSummary: "number",
|
|
126
|
+
required: false,
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
axisParams: [],
|
|
130
|
+
},
|
|
131
|
+
sf: {
|
|
132
|
+
name: "sf",
|
|
133
|
+
slug: "sf",
|
|
134
|
+
component: "CoordSf",
|
|
135
|
+
typeLiteral: "sf",
|
|
136
|
+
schemaType: "CoordSfSpec",
|
|
137
|
+
helper: "coordSf",
|
|
138
|
+
helperAlias: "coord_sf",
|
|
139
|
+
alsoHelpers: [],
|
|
140
|
+
alsoExportedAs: [],
|
|
141
|
+
builderMethods: ["coordSf", "coord"],
|
|
142
|
+
summary:
|
|
143
|
+
"Fixed-aspect coordinates for already-projected geom_sf maps. Same layout as fixed; no CRS reproject or graticules in v1 — data must already be in plot space.",
|
|
144
|
+
params: [
|
|
145
|
+
{
|
|
146
|
+
name: "ratio",
|
|
147
|
+
description:
|
|
148
|
+
"Physical y-unit length divided by physical x-unit length (default 1, equal projected units).",
|
|
149
|
+
typeSummary: "number",
|
|
150
|
+
required: false,
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
axisParams: [],
|
|
154
|
+
},
|
|
155
|
+
radial: {
|
|
156
|
+
name: "radial",
|
|
157
|
+
slug: "radial",
|
|
158
|
+
component: "CoordRadial",
|
|
159
|
+
typeLiteral: "radial",
|
|
160
|
+
schemaType: "CoordRadialSpec",
|
|
161
|
+
helper: "coordRadial",
|
|
162
|
+
helperAlias: "coord_radial",
|
|
163
|
+
alsoHelpers: ["coordPolar", "coord_polar"],
|
|
164
|
+
alsoExportedAs: [],
|
|
165
|
+
builderMethods: ["coordRadial", "coordPolar", "coord"],
|
|
166
|
+
summary:
|
|
167
|
+
"Polar/radial coordinates (ggplot2 coord_radial). Maps one aesthetic to angle and the other to radius for pie charts, coxcombs, and polar scatter. coord_polar is a helper alias with clip on.",
|
|
168
|
+
params: [
|
|
169
|
+
{
|
|
170
|
+
name: "theta",
|
|
171
|
+
description:
|
|
172
|
+
'Which aesthetic maps to angle: "x" (default) or "y". The other aesthetic maps to radius. Pie charts use theta: "y".',
|
|
173
|
+
typeSummary: '"x" | "y"',
|
|
174
|
+
required: false,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: "start",
|
|
178
|
+
description:
|
|
179
|
+
"Offset of the starting angle from 12 o'clock, in radians (default 0). Positive angles proceed clockwise when reverse does not flip theta.",
|
|
180
|
+
typeSummary: "number",
|
|
181
|
+
required: false,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: "end",
|
|
185
|
+
description:
|
|
186
|
+
"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.",
|
|
187
|
+
typeSummary: "number",
|
|
188
|
+
required: false,
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: "innerRadius",
|
|
192
|
+
description:
|
|
193
|
+
"Size of the inner radius hole as a fraction of the outer radius (0–1, default 0). Values above 0 produce a donut.",
|
|
194
|
+
typeSummary: "number",
|
|
195
|
+
required: false,
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: "expand",
|
|
199
|
+
description:
|
|
200
|
+
"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).",
|
|
201
|
+
typeSummary: "boolean",
|
|
202
|
+
required: false,
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "clip",
|
|
206
|
+
description:
|
|
207
|
+
'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").',
|
|
208
|
+
typeSummary: "boolean",
|
|
209
|
+
required: false,
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: "reverse",
|
|
213
|
+
description:
|
|
214
|
+
'Which directions to reverse: "none" (default), "theta", "r", or "thetar" (both). coord_polar(direction = -1) maps to reverse: "theta".',
|
|
215
|
+
typeSummary: '"none" | "theta" | "r" | "thetar"',
|
|
216
|
+
required: false,
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: "thetaLimits",
|
|
220
|
+
description:
|
|
221
|
+
"Optional [min, max] limits for the theta (angle) aesthetic in semantic units. Exactly two numbers.",
|
|
222
|
+
typeSummary: "[number, number]",
|
|
223
|
+
required: false,
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: "rLimits",
|
|
227
|
+
description:
|
|
228
|
+
"Optional [min, max] limits for the radius aesthetic in semantic units. Exactly two numbers.",
|
|
229
|
+
typeSummary: "[number, number]",
|
|
230
|
+
required: false,
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
axisParams: [],
|
|
234
|
+
},
|
|
235
|
+
} as const;
|