polen 0.11.0-next.15 → 0.11.0-next.16
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/build/api/{api.d.ts → $$.d.ts} +6 -3
- package/build/api/$$.d.ts.map +1 -0
- package/build/api/$$.js +13 -0
- package/build/api/$$.js.map +1 -0
- package/build/api/$.d.ts +2 -0
- package/build/api/$.d.ts.map +1 -0
- package/build/api/$.js +2 -0
- package/build/api/$.js.map +1 -0
- package/build/api/config/$$.d.ts +1 -0
- package/build/api/config/$$.d.ts.map +1 -1
- package/build/api/config/$$.js +1 -0
- package/build/api/config/$$.js.map +1 -1
- package/build/api/config/home.d.ts +639 -0
- package/build/api/config/home.d.ts.map +1 -0
- package/build/api/config/home.js +487 -0
- package/build/api/config/home.js.map +1 -0
- package/build/api/config/input.d.ts +1307 -9
- package/build/api/config/input.d.ts.map +1 -1
- package/build/api/config/input.js +102 -24
- package/build/api/config/input.js.map +1 -1
- package/build/api/config/normalized.d.ts +2261 -129
- package/build/api/config/normalized.d.ts.map +1 -1
- package/build/api/config/normalized.js +424 -27
- package/build/api/config/normalized.js.map +1 -1
- package/build/api/config-template/template.d.ts +2991 -0
- package/build/api/config-template/template.d.ts.map +1 -0
- package/build/api/config-template/template.js +53 -0
- package/build/api/config-template/template.js.map +1 -0
- package/build/api/content/$$.d.ts +1 -0
- package/build/api/content/$$.d.ts.map +1 -1
- package/build/api/content/$$.js +1 -0
- package/build/api/content/$$.js.map +1 -1
- package/build/api/content/mdx-compiler.d.ts +54 -0
- package/build/api/content/mdx-compiler.d.ts.map +1 -0
- package/build/api/content/mdx-compiler.js +68 -0
- package/build/api/content/mdx-compiler.js.map +1 -0
- package/build/api/content/navbar.js +1 -1
- package/build/api/content/navbar.js.map +1 -1
- package/build/api/examples/$$.d.ts +8 -0
- package/build/api/examples/$$.d.ts.map +1 -0
- package/build/api/examples/$$.js +8 -0
- package/build/api/examples/$$.js.map +1 -0
- package/build/api/examples/$.d.ts +2 -0
- package/build/api/examples/$.d.ts.map +1 -0
- package/build/api/examples/$.js +2 -0
- package/build/api/examples/$.js.map +1 -0
- package/build/api/examples/config.d.ts +709 -0
- package/build/api/examples/config.d.ts.map +1 -0
- package/build/api/examples/config.js +169 -0
- package/build/api/examples/config.js.map +1 -0
- package/build/api/examples/diagnostic/diagnostic.d.ts +152 -0
- package/build/api/examples/diagnostic/diagnostic.d.ts.map +1 -0
- package/build/api/examples/diagnostic/diagnostic.js +20 -0
- package/build/api/examples/diagnostic/diagnostic.js.map +1 -0
- package/build/api/examples/diagnostic/duplicate-content.d.ts +55 -0
- package/build/api/examples/diagnostic/duplicate-content.d.ts.map +1 -0
- package/build/api/examples/diagnostic/duplicate-content.js +22 -0
- package/build/api/examples/diagnostic/duplicate-content.js.map +1 -0
- package/build/api/examples/diagnostic/invalid-filename.d.ts +43 -0
- package/build/api/examples/diagnostic/invalid-filename.d.ts.map +1 -0
- package/build/api/examples/diagnostic/invalid-filename.js +16 -0
- package/build/api/examples/diagnostic/invalid-filename.js.map +1 -0
- package/build/api/examples/diagnostic/missing-versions.d.ts +51 -0
- package/build/api/examples/diagnostic/missing-versions.d.ts.map +1 -0
- package/build/api/examples/diagnostic/missing-versions.js +20 -0
- package/build/api/examples/diagnostic/missing-versions.js.map +1 -0
- package/build/api/examples/diagnostic/unknown-version.d.ts +51 -0
- package/build/api/examples/diagnostic/unknown-version.d.ts.map +1 -0
- package/build/api/examples/diagnostic/unknown-version.js +20 -0
- package/build/api/examples/diagnostic/unknown-version.js.map +1 -0
- package/build/api/examples/diagnostic/unused-default.d.ts +49 -0
- package/build/api/examples/diagnostic/unused-default.d.ts.map +1 -0
- package/build/api/examples/diagnostic/unused-default.js +19 -0
- package/build/api/examples/diagnostic/unused-default.js.map +1 -0
- package/build/api/examples/diagnostic/validation-error.d.ts +63 -0
- package/build/api/examples/diagnostic/validation-error.d.ts.map +1 -0
- package/build/api/examples/diagnostic/validation-error.js +21 -0
- package/build/api/examples/diagnostic/validation-error.js.map +1 -0
- package/build/api/examples/diagnostic/validator.d.ts +13 -0
- package/build/api/examples/diagnostic/validator.d.ts.map +1 -0
- package/build/api/examples/diagnostic/validator.js +116 -0
- package/build/api/examples/diagnostic/validator.js.map +1 -0
- package/build/api/examples/filter.d.ts +19 -0
- package/build/api/examples/filter.d.ts.map +1 -0
- package/build/api/examples/filter.js +64 -0
- package/build/api/examples/filter.js.map +1 -0
- package/build/api/examples/scanner.d.ts +18 -0
- package/build/api/examples/scanner.d.ts.map +1 -0
- package/build/api/examples/scanner.js +264 -0
- package/build/api/examples/scanner.js.map +1 -0
- package/build/api/examples/schemas/catalog.d.ts +248 -0
- package/build/api/examples/schemas/catalog.d.ts.map +1 -0
- package/build/api/examples/schemas/catalog.js +42 -0
- package/build/api/examples/schemas/catalog.js.map +1 -0
- package/build/api/examples/schemas/example/$$.d.ts +2 -0
- package/build/api/examples/schemas/example/$$.d.ts.map +1 -0
- package/build/api/examples/schemas/example/$$.js +2 -0
- package/build/api/examples/schemas/example/$$.js.map +1 -0
- package/build/api/examples/schemas/example/$.d.ts +2 -0
- package/build/api/examples/schemas/example/$.d.ts.map +1 -0
- package/build/api/examples/schemas/example/$.js +2 -0
- package/build/api/examples/schemas/example/$.js.map +1 -0
- package/build/api/examples/schemas/example/example.d.ts +134 -0
- package/build/api/examples/schemas/example/example.d.ts.map +1 -0
- package/build/api/examples/schemas/example/example.js +51 -0
- package/build/api/examples/schemas/example/example.js.map +1 -0
- package/build/api/examples/schemas/type-usage-index.d.ts +72 -0
- package/build/api/examples/schemas/type-usage-index.d.ts.map +1 -0
- package/build/api/examples/schemas/type-usage-index.js +64 -0
- package/build/api/examples/schemas/type-usage-index.js.map +1 -0
- package/build/api/examples/type-generator.d.ts +8 -0
- package/build/api/examples/type-generator.d.ts.map +1 -0
- package/build/api/examples/type-generator.js +36 -0
- package/build/api/examples/type-generator.js.map +1 -0
- package/build/api/examples/type-usage-indexer.d.ts +18 -0
- package/build/api/examples/type-usage-indexer.d.ts.map +1 -0
- package/build/api/examples/type-usage-indexer.js +220 -0
- package/build/api/examples/type-usage-indexer.js.map +1 -0
- package/build/api/iso/schema/routing.js +2 -2
- package/build/api/iso/schema/routing.js.map +1 -1
- package/build/api/project/$$.d.ts +2 -0
- package/build/api/project/$$.d.ts.map +1 -0
- package/build/api/project/$$.js +2 -0
- package/build/api/project/$$.js.map +1 -0
- package/build/api/project/$.d.ts +2 -0
- package/build/api/project/$.d.ts.map +1 -0
- package/build/api/project/$.js +2 -0
- package/build/api/project/$.js.map +1 -0
- package/build/api/schema/config-schema.d.ts +3 -3
- package/build/api/schema/input-sources/directory.d.ts +31 -31
- package/build/api/schema/input-sources/file.d.ts +31 -31
- package/build/api/schema/input-sources/introspection-file.d.ts +31 -31
- package/build/api/schema/input-sources/introspection.d.ts +31 -31
- package/build/api/schema/input-sources/memory.d.ts +31 -31
- package/build/api/schema/input-sources/versioned-directory.d.ts +65 -76
- package/build/api/schema/input-sources/versioned-directory.d.ts.map +1 -1
- package/build/api/schema/input-sources/versioned-directory.js +4 -4
- package/build/api/schema/input-sources/versioned-directory.js.map +1 -1
- package/build/api/typings/$$.d.ts +2 -0
- package/build/api/typings/$$.d.ts.map +1 -0
- package/build/api/typings/$$.js +2 -0
- package/build/api/typings/$$.js.map +1 -0
- package/build/api/typings/$.d.ts +2 -0
- package/build/api/typings/$.d.ts.map +1 -0
- package/build/api/typings/$.js +2 -0
- package/build/api/typings/$.js.map +1 -0
- package/build/api/typings/typings.d.ts +88 -0
- package/build/api/typings/typings.d.ts.map +1 -0
- package/build/api/typings/typings.js +180 -0
- package/build/api/typings/typings.js.map +1 -0
- package/build/cli/_/parameters.d.ts +4 -4
- package/build/cli/_/parameters.d.ts.map +1 -1
- package/build/cli/_/parameters.js +4 -10
- package/build/cli/_/parameters.js.map +1 -1
- package/build/cli/commands/build.d.ts +9 -10
- package/build/cli/commands/build.d.ts.map +1 -1
- package/build/cli/commands/build.js +36 -50
- package/build/cli/commands/build.js.map +1 -1
- package/build/cli/commands/cache/delete.d.ts +6 -1
- package/build/cli/commands/cache/delete.d.ts.map +1 -1
- package/build/cli/commands/cache/delete.js +12 -20
- package/build/cli/commands/cache/delete.js.map +1 -1
- package/build/cli/commands/cache/show.d.ts +5 -1
- package/build/cli/commands/cache/show.d.ts.map +1 -1
- package/build/cli/commands/cache/show.js +51 -59
- package/build/cli/commands/cache/show.js.map +1 -1
- package/build/cli/commands/cache.d.ts +10 -2
- package/build/cli/commands/cache.d.ts.map +1 -1
- package/build/cli/commands/cache.js +17 -6
- package/build/cli/commands/cache.js.map +1 -1
- package/build/cli/commands/config/create.d.ts +6 -1
- package/build/cli/commands/config/create.d.ts.map +1 -1
- package/build/cli/commands/config/create.js +27 -24
- package/build/cli/commands/config/create.js.map +1 -1
- package/build/cli/commands/config.d.ts +7 -2
- package/build/cli/commands/config.d.ts.map +1 -1
- package/build/cli/commands/config.js +15 -6
- package/build/cli/commands/config.js.map +1 -1
- package/build/cli/commands/create.d.ts +9 -1
- package/build/cli/commands/create.d.ts.map +1 -1
- package/build/cli/commands/create.js +63 -61
- package/build/cli/commands/create.js.map +1 -1
- package/build/cli/commands/dev.d.ts +9 -1
- package/build/cli/commands/dev.d.ts.map +1 -1
- package/build/cli/commands/dev.js +41 -51
- package/build/cli/commands/dev.js.map +1 -1
- package/build/cli/commands/hero-image.d.ts +8 -0
- package/build/cli/commands/hero-image.d.ts.map +1 -0
- package/build/cli/commands/hero-image.js +235 -0
- package/build/cli/commands/hero-image.js.map +1 -0
- package/build/cli/commands/open.d.ts +10 -1
- package/build/cli/commands/open.d.ts.map +1 -1
- package/build/cli/commands/open.js +93 -107
- package/build/cli/commands/open.js.map +1 -1
- package/build/cli/commands/static/rebase.d.ts +8 -1
- package/build/cli/commands/static/rebase.d.ts.map +1 -1
- package/build/cli/commands/static/rebase.js +43 -29
- package/build/cli/commands/static/rebase.js.map +1 -1
- package/build/cli/commands/static.d.ts +9 -2
- package/build/cli/commands/static.d.ts.map +1 -1
- package/build/cli/commands/static.js +28 -6
- package/build/cli/commands/static.js.map +1 -1
- package/build/cli/index.d.ts +54 -1
- package/build/cli/index.d.ts.map +1 -1
- package/build/cli/index.js +77 -8
- package/build/cli/index.js.map +1 -1
- package/build/lib/ai-image-generation/$$.d.ts +3 -0
- package/build/lib/ai-image-generation/$$.d.ts.map +1 -0
- package/build/lib/ai-image-generation/$$.js +3 -0
- package/build/lib/ai-image-generation/$$.js.map +1 -0
- package/build/lib/ai-image-generation/$.d.ts +2 -0
- package/build/lib/ai-image-generation/$.d.ts.map +1 -0
- package/build/lib/ai-image-generation/$.js +2 -0
- package/build/lib/ai-image-generation/$.js.map +1 -0
- package/build/lib/ai-image-generation/ai-image-generation.d.ts +132 -0
- package/build/lib/ai-image-generation/ai-image-generation.d.ts.map +1 -0
- package/build/lib/ai-image-generation/ai-image-generation.js +170 -0
- package/build/lib/ai-image-generation/ai-image-generation.js.map +1 -0
- package/build/lib/ai-image-generation/providers/pollinations.d.ts +22 -0
- package/build/lib/ai-image-generation/providers/pollinations.d.ts.map +1 -0
- package/build/lib/ai-image-generation/providers/pollinations.js +45 -0
- package/build/lib/ai-image-generation/providers/pollinations.js.map +1 -0
- package/build/lib/ai-image-generation/service.d.ts +42 -0
- package/build/lib/ai-image-generation/service.d.ts.map +1 -0
- package/build/lib/ai-image-generation/service.js +147 -0
- package/build/lib/ai-image-generation/service.js.map +1 -0
- package/build/lib/catalog/catalog.d.ts +7811 -706
- package/build/lib/catalog/catalog.d.ts.map +1 -1
- package/build/lib/catalog/catalog.js +30 -1
- package/build/lib/catalog/catalog.js.map +1 -1
- package/build/lib/catalog/unversioned.d.ts +245 -245
- package/build/lib/catalog/unversioned.d.ts.map +1 -1
- package/build/lib/catalog/versioned.d.ts +513 -592
- package/build/lib/catalog/versioned.d.ts.map +1 -1
- package/build/lib/catalog/versioned.js +18 -0
- package/build/lib/catalog/versioned.js.map +1 -1
- package/build/lib/catalog-statistics/$$.d.ts +5 -0
- package/build/lib/catalog-statistics/$$.d.ts.map +1 -0
- package/build/lib/catalog-statistics/$$.js +5 -0
- package/build/lib/catalog-statistics/$$.js.map +1 -0
- package/build/lib/catalog-statistics/$.d.ts +2 -0
- package/build/lib/catalog-statistics/$.d.ts.map +1 -0
- package/build/lib/catalog-statistics/$.js +2 -0
- package/build/lib/catalog-statistics/$.js.map +1 -0
- package/build/lib/catalog-statistics/analyze-catalog.d.ts +8 -0
- package/build/lib/catalog-statistics/analyze-catalog.d.ts.map +1 -0
- package/build/lib/catalog-statistics/analyze-catalog.js +132 -0
- package/build/lib/catalog-statistics/analyze-catalog.js.map +1 -0
- package/build/lib/catalog-statistics/analyze-options.d.ts +16 -0
- package/build/lib/catalog-statistics/analyze-options.d.ts.map +1 -0
- package/build/lib/catalog-statistics/analyze-options.js +2 -0
- package/build/lib/catalog-statistics/analyze-options.js.map +1 -0
- package/build/lib/catalog-statistics/analyze-schema.d.ts +8 -0
- package/build/lib/catalog-statistics/analyze-schema.d.ts.map +1 -0
- package/build/lib/catalog-statistics/analyze-schema.js +185 -0
- package/build/lib/catalog-statistics/analyze-schema.js.map +1 -0
- package/build/lib/catalog-statistics/data.d.ts +195 -0
- package/build/lib/catalog-statistics/data.d.ts.map +1 -0
- package/build/lib/catalog-statistics/data.js +176 -0
- package/build/lib/catalog-statistics/data.js.map +1 -0
- package/build/lib/catalog-statistics/report.d.ts +841 -0
- package/build/lib/catalog-statistics/report.d.ts.map +1 -0
- package/build/lib/catalog-statistics/report.js +37 -0
- package/build/lib/catalog-statistics/report.js.map +1 -0
- package/build/lib/change/change.d.ts +185 -185
- package/build/lib/change/change.d.ts.map +1 -1
- package/build/lib/change/criticality.d.ts +2 -2
- package/build/lib/change/criticality.d.ts.map +1 -1
- package/build/lib/date-only/date-only.d.ts +1 -1
- package/build/lib/date-only/date-only.d.ts.map +1 -1
- package/build/lib/diagnostic/$$.d.ts +6 -0
- package/build/lib/diagnostic/$$.d.ts.map +1 -0
- package/build/lib/diagnostic/$$.js +6 -0
- package/build/lib/diagnostic/$$.js.map +1 -0
- package/build/lib/diagnostic/$.d.ts +2 -0
- package/build/lib/diagnostic/$.d.ts.map +1 -0
- package/build/lib/diagnostic/$.js +2 -0
- package/build/lib/diagnostic/$.js.map +1 -0
- package/build/lib/diagnostic/control.d.ts +79 -0
- package/build/lib/diagnostic/control.d.ts.map +1 -0
- package/build/lib/diagnostic/control.js +107 -0
- package/build/lib/diagnostic/control.js.map +1 -0
- package/build/lib/diagnostic/diagnostic.d.ts +130 -0
- package/build/lib/diagnostic/diagnostic.d.ts.map +1 -0
- package/build/lib/diagnostic/diagnostic.js +106 -0
- package/build/lib/diagnostic/diagnostic.js.map +1 -0
- package/build/lib/diagnostic/filter.d.ts +11 -0
- package/build/lib/diagnostic/filter.d.ts.map +1 -0
- package/build/lib/diagnostic/filter.js +16 -0
- package/build/lib/diagnostic/filter.js.map +1 -0
- package/build/lib/diagnostic/reporter.d.ts +22 -0
- package/build/lib/diagnostic/reporter.d.ts.map +1 -0
- package/build/lib/diagnostic/reporter.js +66 -0
- package/build/lib/diagnostic/reporter.js.map +1 -0
- package/build/lib/diagnostic/severity.d.ts +32 -0
- package/build/lib/diagnostic/severity.d.ts.map +1 -0
- package/build/lib/diagnostic/severity.js +73 -0
- package/build/lib/diagnostic/severity.js.map +1 -0
- package/build/lib/directed-filter/$$.d.ts +2 -0
- package/build/lib/directed-filter/$$.d.ts.map +1 -0
- package/build/lib/directed-filter/$$.js +2 -0
- package/build/lib/directed-filter/$$.js.map +1 -0
- package/build/lib/directed-filter/$.d.ts +2 -0
- package/build/lib/directed-filter/$.d.ts.map +1 -0
- package/build/lib/directed-filter/$.js +2 -0
- package/build/lib/directed-filter/$.js.map +1 -0
- package/build/lib/directed-filter/directed-filter.d.ts +127 -0
- package/build/lib/directed-filter/directed-filter.d.ts.map +1 -0
- package/build/lib/directed-filter/directed-filter.js +153 -0
- package/build/lib/directed-filter/directed-filter.js.map +1 -0
- package/build/lib/document/$$.d.ts +4 -0
- package/build/lib/document/$$.d.ts.map +1 -0
- package/build/lib/document/$$.js +4 -0
- package/build/lib/document/$$.js.map +1 -0
- package/build/lib/document/$.d.ts +2 -0
- package/build/lib/document/$.d.ts.map +1 -0
- package/build/lib/document/$.js +2 -0
- package/build/lib/document/$.js.map +1 -0
- package/build/lib/document/document.d.ts +59 -0
- package/build/lib/document/document.d.ts.map +1 -0
- package/build/lib/document/document.js +23 -0
- package/build/lib/document/document.js.map +1 -0
- package/build/lib/document/unversioned.d.ts +38 -0
- package/build/lib/document/unversioned.d.ts.map +1 -0
- package/build/lib/document/unversioned.js +22 -0
- package/build/lib/document/unversioned.js.map +1 -0
- package/build/lib/document/versioned.d.ts +58 -0
- package/build/lib/document/versioned.d.ts.map +1 -0
- package/build/lib/document/versioned.js +82 -0
- package/build/lib/document/versioned.js.map +1 -0
- package/build/lib/effect-cli-help-markdown/$$.d.ts +2 -0
- package/build/lib/effect-cli-help-markdown/$$.d.ts.map +1 -0
- package/build/lib/effect-cli-help-markdown/$$.js +2 -0
- package/build/lib/effect-cli-help-markdown/$$.js.map +1 -0
- package/build/lib/effect-cli-help-markdown/$.d.ts +2 -0
- package/build/lib/effect-cli-help-markdown/$.d.ts.map +1 -0
- package/build/lib/effect-cli-help-markdown/$.js +2 -0
- package/build/lib/effect-cli-help-markdown/$.js.map +1 -0
- package/build/lib/effect-cli-help-markdown/effect-cli-help-markdown.d.ts +32 -0
- package/build/lib/effect-cli-help-markdown/effect-cli-help-markdown.d.ts.map +1 -0
- package/build/lib/effect-cli-help-markdown/effect-cli-help-markdown.js +477 -0
- package/build/lib/effect-cli-help-markdown/effect-cli-help-markdown.js.map +1 -0
- package/build/lib/effect-glob/$$.d.ts +2 -0
- package/build/lib/effect-glob/$$.d.ts.map +1 -0
- package/build/lib/effect-glob/$$.js +2 -0
- package/build/lib/effect-glob/$$.js.map +1 -0
- package/build/lib/effect-glob/$.d.ts +2 -0
- package/build/lib/effect-glob/$.d.ts.map +1 -0
- package/build/lib/effect-glob/$.js +2 -0
- package/build/lib/effect-glob/$.js.map +1 -0
- package/build/lib/effect-glob/effect-glob.d.ts +13 -0
- package/build/lib/effect-glob/effect-glob.d.ts.map +1 -0
- package/build/lib/effect-glob/effect-glob.js +18 -0
- package/build/lib/effect-glob/effect-glob.js.map +1 -0
- package/build/lib/file-path/$$.d.ts +3 -0
- package/build/lib/file-path/$$.d.ts.map +1 -1
- package/build/lib/file-path/$$.js +3 -3
- package/build/lib/file-path/$$.js.map +1 -1
- package/build/lib/file-path/$.d.ts +1 -1
- package/build/lib/file-path/$.d.ts.map +1 -1
- package/build/lib/file-path/$.js +1 -1
- package/build/lib/file-path/$.js.map +1 -1
- package/build/lib/file-path/absolute.d.ts +38 -0
- package/build/lib/file-path/absolute.d.ts.map +1 -0
- package/build/lib/file-path/absolute.js +47 -0
- package/build/lib/file-path/absolute.js.map +1 -0
- package/build/lib/file-path/file-path.d.ts +41 -43
- package/build/lib/file-path/file-path.d.ts.map +1 -1
- package/build/lib/file-path/file-path.js +15 -87
- package/build/lib/file-path/file-path.js.map +1 -1
- package/build/lib/file-path/relative.d.ts +38 -0
- package/build/lib/file-path/relative.d.ts.map +1 -0
- package/build/lib/file-path/relative.js +51 -0
- package/build/lib/file-path/relative.js.map +1 -0
- package/build/lib/file-path/segment/$.d.ts +2 -0
- package/build/lib/file-path/segment/$.d.ts.map +1 -0
- package/build/lib/file-path/segment/$.js +2 -0
- package/build/lib/file-path/segment/$.js.map +1 -0
- package/build/lib/file-path/segment/segment.d.ts +45 -0
- package/build/lib/file-path/segment/segment.d.ts.map +1 -0
- package/build/lib/file-path/segment/segment.js +96 -0
- package/build/lib/file-path/segment/segment.js.map +1 -0
- package/build/lib/file-router/linter.d.ts +214 -34
- package/build/lib/file-router/linter.d.ts.map +1 -1
- package/build/lib/file-router/linter.js +66 -12
- package/build/lib/file-router/linter.js.map +1 -1
- package/build/lib/graph/graph.d.ts +1 -1
- package/build/lib/graph/graph.d.ts.map +1 -1
- package/build/lib/graphql-error/$$.d.ts +2 -0
- package/build/lib/graphql-error/$$.d.ts.map +1 -0
- package/build/lib/graphql-error/$$.js +2 -0
- package/build/lib/graphql-error/$$.js.map +1 -0
- package/build/lib/graphql-error/$.d.ts +2 -0
- package/build/lib/graphql-error/$.d.ts.map +1 -0
- package/build/lib/graphql-error/$.js +2 -0
- package/build/lib/graphql-error/$.js.map +1 -0
- package/build/lib/graphql-error/graphql-error.d.ts +150 -0
- package/build/lib/graphql-error/graphql-error.d.ts.map +1 -0
- package/build/lib/graphql-error/graphql-error.js +57 -0
- package/build/lib/graphql-error/graphql-error.js.map +1 -0
- package/build/lib/kit-temp/effect.d.ts +14 -0
- package/build/lib/kit-temp/effect.d.ts.map +1 -1
- package/build/lib/kit-temp/effect.js +29 -0
- package/build/lib/kit-temp/effect.js.map +1 -1
- package/build/lib/kit-temp/ob.d.ts +4 -0
- package/build/lib/kit-temp/ob.d.ts.map +1 -1
- package/build/lib/kit-temp/ob.js +3 -1
- package/build/lib/kit-temp/ob.js.map +1 -1
- package/build/lib/kit-temp/resource.d.ts +1 -2
- package/build/lib/kit-temp/resource.d.ts.map +1 -1
- package/build/lib/kit-temp/resource.js +1 -2
- package/build/lib/kit-temp/resource.js.map +1 -1
- package/build/lib/react-router-effect/route-helpers.d.ts +9 -3
- package/build/lib/react-router-effect/route-helpers.d.ts.map +1 -1
- package/build/lib/react-router-effect/route-helpers.js +54 -6
- package/build/lib/react-router-effect/route-helpers.js.map +1 -1
- package/build/lib/react-router-effect/route.d.ts.map +1 -1
- package/build/lib/react-router-effect/route.js +13 -1
- package/build/lib/react-router-effect/route.js.map +1 -1
- package/build/lib/react-router-effect/types.d.ts +10 -2
- package/build/lib/react-router-effect/types.d.ts.map +1 -1
- package/build/lib/react-router-effect/use-loader-data.d.ts +3 -3
- package/build/lib/react-router-effect/use-loader-data.d.ts.map +1 -1
- package/build/lib/react-router-effect/use-loader-data.js +2 -2
- package/build/lib/react-router-effect/use-loader-data.js.map +1 -1
- package/build/lib/revision/revision.d.ts +925 -925
- package/build/lib/revision/revision.d.ts.map +1 -1
- package/build/lib/schema/schema.d.ts +553 -629
- package/build/lib/schema/schema.d.ts.map +1 -1
- package/build/lib/schema/unversioned.d.ts +865 -865
- package/build/lib/schema/unversioned.d.ts.map +1 -1
- package/build/lib/schema/versioned.d.ts +495 -583
- package/build/lib/schema/versioned.d.ts.map +1 -1
- package/build/lib/schema-definition/schema-definition.d.ts +1 -1
- package/build/lib/schema-definition/schema-definition.d.ts.map +1 -1
- package/build/lib/semver/official-release.d.ts +1 -1
- package/build/lib/semver/official-release.d.ts.map +1 -1
- package/build/lib/semver/pre-release.d.ts +1 -1
- package/build/lib/semver/pre-release.d.ts.map +1 -1
- package/build/lib/semver/semver.d.ts +1 -1
- package/build/lib/semver/semver.d.ts.map +1 -1
- package/build/lib/swiss/$$.d.ts +5 -0
- package/build/lib/swiss/$$.d.ts.map +1 -0
- package/build/lib/swiss/$$.js +6 -0
- package/build/lib/swiss/$$.js.map +1 -0
- package/build/lib/swiss/$.d.ts +2 -0
- package/build/lib/swiss/$.d.ts.map +1 -0
- package/build/lib/swiss/$.js +3 -0
- package/build/lib/swiss/$.js.map +1 -0
- package/build/lib/swiss/grid.d.ts +17 -0
- package/build/lib/swiss/grid.d.ts.map +1 -0
- package/build/lib/swiss/grid.js +30 -0
- package/build/lib/swiss/grid.js.map +1 -0
- package/build/lib/swiss/items.d.ts +53 -0
- package/build/lib/swiss/items.d.ts.map +1 -0
- package/build/lib/swiss/items.js +188 -0
- package/build/lib/swiss/items.js.map +1 -0
- package/build/lib/swiss/styles.css +298 -0
- package/build/lib/swiss/subgrid.d.ts +25 -0
- package/build/lib/swiss/subgrid.d.ts.map +1 -0
- package/build/lib/swiss/subgrid.js +48 -0
- package/build/lib/swiss/subgrid.js.map +1 -0
- package/build/lib/swiss/types.d.ts +340 -0
- package/build/lib/swiss/types.d.ts.map +1 -0
- package/build/lib/swiss/types.js +2 -0
- package/build/lib/swiss/types.js.map +1 -0
- package/build/lib/swiss/utils.d.ts +37 -0
- package/build/lib/swiss/utils.d.ts.map +1 -0
- package/build/lib/swiss/utils.js +163 -0
- package/build/lib/swiss/utils.js.map +1 -0
- package/build/lib/version/custom.d.ts +11 -30
- package/build/lib/version/custom.d.ts.map +1 -1
- package/build/lib/version/custom.js +3 -7
- package/build/lib/version/custom.js.map +1 -1
- package/build/lib/version/date.d.ts +11 -30
- package/build/lib/version/date.d.ts.map +1 -1
- package/build/lib/version/date.js +3 -7
- package/build/lib/version/date.js.map +1 -1
- package/build/lib/version/integer.d.ts +11 -30
- package/build/lib/version/integer.d.ts.map +1 -1
- package/build/lib/version/integer.js +3 -7
- package/build/lib/version/integer.js.map +1 -1
- package/build/lib/version/semver.d.ts +11 -30
- package/build/lib/version/semver.d.ts.map +1 -1
- package/build/lib/version/semver.js +3 -7
- package/build/lib/version/semver.js.map +1 -1
- package/build/lib/version/version.d.ts +17 -333
- package/build/lib/version/version.d.ts.map +1 -1
- package/build/lib/version/version.js +11 -11
- package/build/lib/version/version.js.map +1 -1
- package/build/lib/version-selection/$$.d.ts +2 -0
- package/build/lib/version-selection/$$.d.ts.map +1 -0
- package/build/lib/version-selection/$$.js +2 -0
- package/build/lib/version-selection/$$.js.map +1 -0
- package/build/lib/version-selection/$.d.ts +2 -0
- package/build/lib/version-selection/$.d.ts.map +1 -0
- package/build/lib/version-selection/$.js +2 -0
- package/build/lib/version-selection/$.js.map +1 -0
- package/build/lib/version-selection/version-selection.d.ts +42 -0
- package/build/lib/version-selection/version-selection.d.ts.map +1 -0
- package/build/lib/version-selection/version-selection.js +86 -0
- package/build/lib/version-selection/version-selection.js.map +1 -0
- package/build/lib/vite-reactive/$$.d.ts +2 -0
- package/build/lib/vite-reactive/$$.d.ts.map +1 -0
- package/build/lib/vite-reactive/$$.js +2 -0
- package/build/lib/vite-reactive/$$.js.map +1 -0
- package/build/lib/vite-reactive/$.d.ts +2 -0
- package/build/lib/vite-reactive/$.d.ts.map +1 -0
- package/build/lib/vite-reactive/$.js +2 -0
- package/build/lib/vite-reactive/$.js.map +1 -0
- package/build/lib/vite-reactive/reactive-asset-plugin.d.ts +71 -0
- package/build/lib/vite-reactive/reactive-asset-plugin.d.ts.map +1 -0
- package/build/lib/vite-reactive/reactive-asset-plugin.js +155 -0
- package/build/lib/vite-reactive/reactive-asset-plugin.js.map +1 -0
- package/build/template/components/Carousel.d.ts +25 -0
- package/build/template/components/Carousel.d.ts.map +1 -0
- package/build/template/components/Carousel.js +134 -0
- package/build/template/components/Carousel.js.map +1 -0
- package/build/template/components/CarouselPill.d.ts +19 -0
- package/build/template/components/CarouselPill.d.ts.map +1 -0
- package/build/template/components/CarouselPill.js +31 -0
- package/build/template/components/CarouselPill.js.map +1 -0
- package/build/template/components/Changelog/Changelog.d.ts.map +1 -1
- package/build/template/components/Changelog/Changelog.js +16 -10
- package/build/template/components/Changelog/Changelog.js.map +1 -1
- package/build/template/components/Changelog/groups/TypeOperation.d.ts +2 -0
- package/build/template/components/Changelog/groups/TypeOperation.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/TypeOperation.js +31 -5
- package/build/template/components/Changelog/groups/TypeOperation.js.map +1 -1
- package/build/template/components/CodeBlock.js +2 -2
- package/build/template/components/CodeBlock.js.map +1 -1
- package/build/template/components/DevelopmentTip.d.ts +13 -0
- package/build/template/components/DevelopmentTip.d.ts.map +1 -0
- package/build/template/components/DevelopmentTip.js +16 -0
- package/build/template/components/DevelopmentTip.js.map +1 -0
- package/build/template/components/ExampleLink.d.ts +11 -0
- package/build/template/components/ExampleLink.d.ts.map +1 -0
- package/build/template/components/ExampleLink.js +13 -0
- package/build/template/components/ExampleLink.js.map +1 -0
- package/build/template/components/Field.js +1 -1
- package/build/template/components/Field.js.map +1 -1
- package/build/template/components/GraphQLDocument.d.ts +25 -0
- package/build/template/components/GraphQLDocument.d.ts.map +1 -0
- package/build/template/components/GraphQLDocument.js +67 -0
- package/build/template/components/GraphQLDocument.js.map +1 -0
- package/build/template/components/GraphQLInteractive/GraphQLInteractive.d.ts +6 -2
- package/build/template/components/GraphQLInteractive/GraphQLInteractive.d.ts.map +1 -1
- package/build/template/components/GraphQLInteractive/GraphQLInteractive.js +8 -2
- package/build/template/components/GraphQLInteractive/GraphQLInteractive.js.map +1 -1
- package/build/template/components/HamburgerMenu.d.ts +11 -1
- package/build/template/components/HamburgerMenu.d.ts.map +1 -1
- package/build/template/components/HamburgerMenu.js.map +1 -1
- package/build/template/components/Logo.d.ts +8 -1
- package/build/template/components/Logo.d.ts.map +1 -1
- package/build/template/components/Logo.js +27 -12
- package/build/template/components/Logo.js.map +1 -1
- package/build/template/components/NamedType.d.ts.map +1 -1
- package/build/template/components/NamedType.js +12 -4
- package/build/template/components/NamedType.js.map +1 -1
- package/build/template/components/SimpleVersionPicker.d.ts +15 -0
- package/build/template/components/SimpleVersionPicker.d.ts.map +1 -0
- package/build/template/components/SimpleVersionPicker.js +15 -0
- package/build/template/components/SimpleVersionPicker.js.map +1 -0
- package/build/template/components/TypeAnnotation.d.ts.map +1 -1
- package/build/template/components/TypeAnnotation.js +8 -15
- package/build/template/components/TypeAnnotation.js.map +1 -1
- package/build/template/components/VersionCoveragePicker.d.ts +17 -0
- package/build/template/components/VersionCoveragePicker.d.ts.map +1 -0
- package/build/template/components/VersionCoveragePicker.js +28 -0
- package/build/template/components/VersionCoveragePicker.js.map +1 -0
- package/build/template/components/VersionPicker.d.ts.map +1 -1
- package/build/template/components/VersionPicker.js +9 -17
- package/build/template/components/VersionPicker.js.map +1 -1
- package/build/template/components/home/ExamplesSection.d.ts +13 -0
- package/build/template/components/home/ExamplesSection.d.ts.map +1 -0
- package/build/template/components/home/ExamplesSection.js +15 -0
- package/build/template/components/home/ExamplesSection.js.map +1 -0
- package/build/template/components/home/FeaturesGrid.d.ts +12 -0
- package/build/template/components/home/FeaturesGrid.d.ts.map +1 -0
- package/build/template/components/home/FeaturesGrid.js +73 -0
- package/build/template/components/home/FeaturesGrid.js.map +1 -0
- package/build/template/components/home/HeroSection.d.ts +16 -0
- package/build/template/components/home/HeroSection.d.ts.map +1 -0
- package/build/template/components/home/HeroSection.js +178 -0
- package/build/template/components/home/HeroSection.js.map +1 -0
- package/build/template/components/home/PlaygroundPreview.d.ts +9 -0
- package/build/template/components/home/PlaygroundPreview.d.ts.map +1 -0
- package/build/template/components/home/PlaygroundPreview.js +38 -0
- package/build/template/components/home/PlaygroundPreview.js.map +1 -0
- package/build/template/components/home/QuickStart.d.ts +11 -0
- package/build/template/components/home/QuickStart.d.ts.map +1 -0
- package/build/template/components/home/QuickStart.js +74 -0
- package/build/template/components/home/QuickStart.js.map +1 -0
- package/build/template/components/home/RecentChanges.d.ts +8 -0
- package/build/template/components/home/RecentChanges.d.ts.map +1 -0
- package/build/template/components/home/RecentChanges.js +60 -0
- package/build/template/components/home/RecentChanges.js.map +1 -0
- package/build/template/components/home/Resources.d.ts +24 -0
- package/build/template/components/home/Resources.d.ts.map +1 -0
- package/build/template/components/home/Resources.js +53 -0
- package/build/template/components/home/Resources.js.map +1 -0
- package/build/template/components/home/SocialProof.d.ts +13 -0
- package/build/template/components/home/SocialProof.d.ts.map +1 -0
- package/build/template/components/home/SocialProof.js +47 -0
- package/build/template/components/home/SocialProof.js.map +1 -0
- package/build/template/components/navbar/DefaultNavbar.d.ts.map +1 -1
- package/build/template/components/navbar/DefaultNavbar.js +5 -6
- package/build/template/components/navbar/DefaultNavbar.js.map +1 -1
- package/build/template/components/sidebar/Sidebar.d.ts +10 -1
- package/build/template/components/sidebar/Sidebar.d.ts.map +1 -1
- package/build/template/components/sidebar/Sidebar.js.map +1 -1
- package/build/template/components/sidebar/SidebarItem.d.ts +11 -2
- package/build/template/components/sidebar/SidebarItem.d.ts.map +1 -1
- package/build/template/components/sidebar/SidebarItem.js.map +1 -1
- package/build/template/components/swiss/SwissHeading.d.ts +10 -0
- package/build/template/components/swiss/SwissHeading.d.ts.map +1 -0
- package/build/template/components/swiss/SwissHeading.js +26 -0
- package/build/template/components/swiss/SwissHeading.js.map +1 -0
- package/build/template/components/swiss/index.d.ts +2 -0
- package/build/template/components/swiss/index.d.ts.map +1 -0
- package/build/template/components/swiss/index.js +2 -0
- package/build/template/components/swiss/index.js.map +1 -0
- package/build/template/contexts/GraphqlLifecycleContext.d.ts +1 -13
- package/build/template/contexts/GraphqlLifecycleContext.d.ts.map +1 -1
- package/build/template/entry.client.js +3 -3
- package/build/template/entry.client.js.map +1 -1
- package/build/template/hooks/use-examples.d.ts +38 -0
- package/build/template/hooks/use-examples.d.ts.map +1 -0
- package/build/template/hooks/use-examples.js +37 -0
- package/build/template/hooks/use-examples.js.map +1 -0
- package/build/template/hooks/use-highlighted.d.ts +14 -0
- package/build/template/hooks/use-highlighted.d.ts.map +1 -0
- package/build/template/hooks/use-highlighted.js +41 -0
- package/build/template/hooks/use-highlighted.js.map +1 -0
- package/build/template/layouts/SidebarLayout.d.ts +9 -1
- package/build/template/layouts/SidebarLayout.d.ts.map +1 -1
- package/build/template/layouts/SidebarLayout.js +4 -7
- package/build/template/layouts/SidebarLayout.js.map +1 -1
- package/build/template/layouts/index.d.ts +0 -1
- package/build/template/layouts/index.d.ts.map +1 -1
- package/build/template/layouts/index.js +0 -1
- package/build/template/layouts/index.js.map +1 -1
- package/build/template/lib/polen-url.js +3 -3
- package/build/template/lib/polen-url.js.map +1 -1
- package/build/template/providers/mdx.d.ts +8 -0
- package/build/template/providers/mdx.d.ts.map +1 -0
- package/build/template/providers/mdx.js +44 -0
- package/build/template/providers/mdx.js.map +1 -0
- package/build/template/routes/changelog.d.ts +3 -18
- package/build/template/routes/changelog.d.ts.map +1 -1
- package/build/template/routes/changelog.js +157 -26
- package/build/template/routes/changelog.js.map +1 -1
- package/build/template/routes/examples/_.d.ts +65 -0
- package/build/template/routes/examples/_.d.ts.map +1 -0
- package/build/template/routes/examples/_.js +56 -0
- package/build/template/routes/examples/_.js.map +1 -0
- package/build/template/routes/examples/_index.d.ts +39 -0
- package/build/template/routes/examples/_index.d.ts.map +1 -0
- package/build/template/routes/examples/_index.js +54 -0
- package/build/template/routes/examples/_index.js.map +1 -0
- package/build/template/routes/examples/name.d.ts +31 -0
- package/build/template/routes/examples/name.d.ts.map +1 -0
- package/build/template/routes/examples/name.js +50 -0
- package/build/template/routes/examples/name.js.map +1 -0
- package/build/template/routes/index.d.ts +1 -1
- package/build/template/routes/index.d.ts.map +1 -1
- package/build/template/routes/index.js +23 -3
- package/build/template/routes/index.js.map +1 -1
- package/build/template/routes/pages.d.ts.map +1 -1
- package/build/template/routes/pages.js +4 -44
- package/build/template/routes/pages.js.map +1 -1
- package/build/template/routes/reference.d.ts.map +1 -1
- package/build/template/routes/reference.js +53 -38
- package/build/template/routes/reference.js.map +1 -1
- package/build/template/routes/root.d.ts +3 -2
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.js +57 -17
- package/build/template/routes/root.js.map +1 -1
- package/build/template/server/create-page-html-response.js +2 -2
- package/build/template/server/create-page-html-response.js.map +1 -1
- package/build/template/server/main.js +5 -5
- package/build/template/server/main.js.map +1 -1
- package/build/template/server/view.js +3 -3
- package/build/template/server/view.js.map +1 -1
- package/build/template/stores/changelog.d.ts +31 -31
- package/build/template/stores/changelog.js +3 -3
- package/build/template/stores/changelog.js.map +1 -1
- package/build/template/stores/schema.d.ts +1 -1
- package/build/template/stores/toast.d.ts +1 -1
- package/build/template/theme/swiss-sharp.css +117 -0
- package/build/template/theme/swiss-sharp.d.ts +9 -0
- package/build/template/theme/swiss-sharp.d.ts.map +1 -0
- package/build/template/theme/swiss-sharp.js +13 -0
- package/build/template/theme/swiss-sharp.js.map +1 -0
- package/build/vite/config.d.ts +1 -1
- package/build/vite/config.d.ts.map +1 -1
- package/build/vite/logger.d.ts +2 -2
- package/build/vite/logger.d.ts.map +1 -1
- package/build/vite/logger.js +0 -1
- package/build/vite/logger.js.map +1 -1
- package/build/vite/plugins/branding.d.ts +2 -2
- package/build/vite/plugins/branding.d.ts.map +1 -1
- package/build/vite/plugins/branding.js +125 -10
- package/build/vite/plugins/branding.js.map +1 -1
- package/build/vite/plugins/build.d.ts +1 -1
- package/build/vite/plugins/build.d.ts.map +1 -1
- package/build/vite/plugins/config.d.ts +17 -0
- package/build/vite/plugins/config.d.ts.map +1 -0
- package/build/vite/plugins/config.js +33 -0
- package/build/vite/plugins/config.js.map +1 -0
- package/build/vite/plugins/core.d.ts +1 -5
- package/build/vite/plugins/core.d.ts.map +1 -1
- package/build/vite/plugins/core.js +43 -127
- package/build/vite/plugins/core.js.map +1 -1
- package/build/vite/plugins/examples.d.ts +23 -0
- package/build/vite/plugins/examples.d.ts.map +1 -0
- package/build/vite/plugins/examples.js +149 -0
- package/build/vite/plugins/examples.js.map +1 -0
- package/build/vite/plugins/hooks.d.ts +12 -0
- package/build/vite/plugins/hooks.d.ts.map +1 -0
- package/build/vite/plugins/hooks.js +41 -0
- package/build/vite/plugins/hooks.js.map +1 -0
- package/build/vite/plugins/index.d.ts +2 -1
- package/build/vite/plugins/index.d.ts.map +1 -1
- package/build/vite/plugins/index.js +2 -1
- package/build/vite/plugins/index.js.map +1 -1
- package/build/vite/plugins/main.d.ts +1 -1
- package/build/vite/plugins/main.d.ts.map +1 -1
- package/build/vite/plugins/manifest.d.ts +1 -1
- package/build/vite/plugins/manifest.d.ts.map +1 -1
- package/build/vite/plugins/navbar.d.ts +16 -0
- package/build/vite/plugins/navbar.d.ts.map +1 -0
- package/build/vite/plugins/navbar.js +60 -0
- package/build/vite/plugins/navbar.js.map +1 -0
- package/build/vite/plugins/pages.d.ts +10 -4
- package/build/vite/plugins/pages.d.ts.map +1 -1
- package/build/vite/plugins/pages.js +48 -120
- package/build/vite/plugins/pages.js.map +1 -1
- package/build/vite/plugins/routes-manifest.d.ts +1 -1
- package/build/vite/plugins/routes-manifest.d.ts.map +1 -1
- package/build/vite/plugins/routes-manifest.js +12 -15
- package/build/vite/plugins/routes-manifest.js.map +1 -1
- package/build/vite/plugins/schemas.d.ts +30 -0
- package/build/vite/plugins/schemas.d.ts.map +1 -0
- package/build/vite/plugins/schemas.js +116 -0
- package/build/vite/plugins/schemas.js.map +1 -0
- package/build/vite/plugins/serve.d.ts +1 -1
- package/build/vite/plugins/serve.d.ts.map +1 -1
- package/package.json +62 -11
- package/src/api/{api.ts → $$.ts} +6 -2
- package/src/api/$.ts +1 -0
- package/src/api/config/$$.ts +1 -0
- package/src/api/config/home.ts +542 -0
- package/src/api/config/input.ts +109 -26
- package/src/api/config/normalized.ts +474 -30
- package/src/api/config-template/template.ts +77 -0
- package/src/api/content/$$.ts +1 -0
- package/src/api/content/mdx-compiler.ts +74 -0
- package/src/api/content/navbar.test.ts +3 -3
- package/src/api/content/navbar.ts +1 -1
- package/src/api/examples/$$.ts +7 -0
- package/src/api/examples/$.test.ts +201 -0
- package/src/api/examples/$.ts +1 -0
- package/src/api/examples/config.test.ts +92 -0
- package/src/api/examples/config.ts +242 -0
- package/src/api/examples/diagnostic/diagnostic.ts +30 -0
- package/src/api/examples/diagnostic/duplicate-content.ts +25 -0
- package/src/api/examples/diagnostic/invalid-filename.ts +19 -0
- package/src/api/examples/diagnostic/missing-versions.ts +23 -0
- package/src/api/examples/diagnostic/unknown-version.ts +23 -0
- package/src/api/examples/diagnostic/unused-default.ts +22 -0
- package/src/api/examples/diagnostic/validation-error.ts +24 -0
- package/src/api/examples/diagnostic/validator.test.ts +277 -0
- package/src/api/examples/diagnostic/validator.ts +178 -0
- package/src/api/examples/filter.test.ts +56 -0
- package/src/api/examples/filter.ts +82 -0
- package/src/api/examples/scanner.ts +341 -0
- package/src/api/examples/schemas/catalog.ts +51 -0
- package/src/api/examples/schemas/example/$$.ts +1 -0
- package/src/api/examples/schemas/example/$.ts +1 -0
- package/src/api/examples/schemas/example/example.ts +73 -0
- package/src/api/examples/schemas/type-usage-index.ts +75 -0
- package/src/api/examples/type-generator.ts +49 -0
- package/src/api/examples/type-usage-indexer.test.ts +265 -0
- package/src/api/examples/type-usage-indexer.ts +294 -0
- package/src/api/iso/schema/routing.ts +2 -2
- package/src/api/project/$.ts +1 -0
- package/src/api/schema/input-sources/versioned-directory.ts +4 -4
- package/src/api/typings/$$.ts +1 -0
- package/src/api/typings/$.ts +1 -0
- package/src/api/typings/typings.ts +273 -0
- package/src/cli/_/parameters.ts +12 -12
- package/src/cli/commands/build.ts +58 -67
- package/src/cli/commands/cache/delete.ts +17 -24
- package/src/cli/commands/cache/show.ts +70 -72
- package/src/cli/commands/cache.ts +24 -6
- package/src/cli/commands/config/create.ts +37 -31
- package/src/cli/commands/config.ts +22 -6
- package/src/cli/commands/create.ts +104 -84
- package/src/cli/commands/dev.ts +59 -65
- package/src/cli/commands/hero-image.ts +282 -0
- package/src/cli/commands/open.ts +139 -140
- package/src/cli/commands/static/rebase.ts +61 -39
- package/src/cli/commands/static.ts +36 -6
- package/src/cli/index.ts +103 -8
- package/src/lib/ai-image-generation/$$.ts +2 -0
- package/src/lib/ai-image-generation/$.test.ts +344 -0
- package/src/lib/ai-image-generation/$.ts +1 -0
- package/src/lib/ai-image-generation/ai-image-generation.ts +231 -0
- package/src/lib/ai-image-generation/providers/pollinations.ts +65 -0
- package/src/lib/ai-image-generation/service.ts +185 -0
- package/src/lib/catalog/catalog.ts +35 -2
- package/src/lib/catalog/unversioned.ts +1 -1
- package/src/lib/catalog/versioned.ts +21 -1
- package/src/lib/catalog-statistics/$$.ts +4 -0
- package/src/lib/catalog-statistics/$.test.ts +151 -0
- package/src/lib/catalog-statistics/$.ts +1 -0
- package/src/lib/catalog-statistics/analyze-catalog.ts +158 -0
- package/src/lib/catalog-statistics/analyze-options.ts +15 -0
- package/src/lib/catalog-statistics/analyze-schema.ts +226 -0
- package/src/lib/catalog-statistics/data.ts +196 -0
- package/src/lib/catalog-statistics/report.ts +45 -0
- package/src/lib/change/change.ts +1 -1
- package/src/lib/change/criticality.ts +2 -2
- package/src/lib/date-only/date-only.ts +1 -1
- package/src/lib/diagnostic/$$.ts +5 -0
- package/src/lib/diagnostic/$.test.ts +109 -0
- package/src/lib/diagnostic/$.ts +1 -0
- package/src/lib/diagnostic/control.test.ts +75 -0
- package/src/lib/diagnostic/control.ts +140 -0
- package/src/lib/diagnostic/diagnostic.ts +144 -0
- package/src/lib/diagnostic/filter.ts +21 -0
- package/src/lib/diagnostic/reporter.ts +74 -0
- package/src/lib/diagnostic/severity.ts +93 -0
- package/src/lib/directed-filter/$$.ts +1 -0
- package/src/lib/directed-filter/$.test.ts +169 -0
- package/src/lib/directed-filter/$.ts +1 -0
- package/src/lib/directed-filter/directed-filter.ts +241 -0
- package/src/lib/document/$$.ts +3 -0
- package/src/lib/document/$.ts +1 -0
- package/src/lib/document/document.ts +37 -0
- package/src/lib/document/unversioned.ts +35 -0
- package/src/lib/document/versioned.ts +106 -0
- package/src/lib/effect-cli-help-markdown/$$.ts +1 -0
- package/src/lib/effect-cli-help-markdown/$.test.ts +49 -0
- package/src/lib/effect-cli-help-markdown/$.ts +1 -0
- package/src/lib/effect-cli-help-markdown/effect-cli-help-markdown.ts +699 -0
- package/src/lib/effect-glob/$$.ts +1 -0
- package/src/lib/effect-glob/$.ts +1 -0
- package/src/lib/effect-glob/effect-glob.ts +33 -0
- package/src/lib/file-path/$$.ts +3 -4
- package/src/lib/file-path/$.test.ts +45 -0
- package/src/lib/file-path/$.ts +1 -1
- package/src/lib/file-path/absolute.ts +66 -0
- package/src/lib/file-path/file-path.ts +17 -117
- package/src/lib/file-path/relative.ts +72 -0
- package/src/lib/file-path/segment/$.ts +1 -0
- package/src/lib/file-path/{file-path.test.ts → segment/segment.test.ts} +2 -2
- package/src/lib/file-path/segment/segment.ts +134 -0
- package/src/lib/file-router/linter.ts +82 -49
- package/src/lib/graph/graph.ts +1 -1
- package/src/lib/graphql-error/$$.ts +1 -0
- package/src/lib/graphql-error/$.ts +1 -0
- package/src/lib/graphql-error/graphql-error.ts +74 -0
- package/src/lib/kit-temp/effect.ts +69 -0
- package/src/lib/kit-temp/ob.ts +13 -0
- package/src/lib/kit-temp/other.test.ts +1 -1
- package/src/lib/kit-temp/resource.ts +1 -2
- package/src/lib/react-router-effect/route-helpers.ts +71 -8
- package/src/lib/react-router-effect/route.ts +14 -1
- package/src/lib/react-router-effect/types.ts +11 -3
- package/src/lib/react-router-effect/use-loader-data.ts +3 -3
- package/src/lib/revision/revision.ts +1 -1
- package/src/lib/schema/$.test.ts +1 -1
- package/src/lib/schema/schema.ts +1 -1
- package/src/lib/schema/unversioned.ts +1 -1
- package/src/lib/schema-definition/schema-definition.ts +1 -1
- package/src/lib/semver/official-release.ts +1 -1
- package/src/lib/semver/pre-release.ts +1 -1
- package/src/lib/semver/semver.ts +1 -1
- package/src/lib/swiss/$$.ts +5 -0
- package/src/lib/swiss/$.test.ts +89 -0
- package/src/lib/swiss/$.ts +2 -0
- package/src/lib/swiss/grid.tsx +61 -0
- package/src/lib/swiss/items.tsx +288 -0
- package/src/lib/swiss/styles.css +298 -0
- package/src/lib/swiss/subgrid.tsx +83 -0
- package/src/lib/swiss/types.ts +353 -0
- package/src/lib/swiss/utils.ts +144 -0
- package/src/lib/version/$.test.ts +2 -2
- package/src/lib/version/custom.ts +2 -13
- package/src/lib/version/date.ts +2 -13
- package/src/lib/version/integer.ts +2 -13
- package/src/lib/version/semver.ts +2 -13
- package/src/lib/version/version.ts +15 -12
- package/src/lib/version-selection/$$.ts +1 -0
- package/src/lib/version-selection/$.ts +1 -0
- package/src/lib/version-selection/version-selection.ts +117 -0
- package/src/lib/vite-reactive/$$.ts +1 -0
- package/src/lib/vite-reactive/$.ts +1 -0
- package/src/lib/vite-reactive/reactive-asset-plugin.ts +280 -0
- package/src/template/components/Carousel.tsx +224 -0
- package/src/template/components/CarouselPill.tsx +101 -0
- package/src/template/components/Changelog/Changelog.tsx +16 -10
- package/src/template/components/Changelog/groups/TypeOperation.tsx +53 -5
- package/src/template/components/CodeBlock.tsx +2 -2
- package/src/template/components/DevelopmentTip.tsx +43 -0
- package/src/template/components/ExampleLink.tsx +25 -0
- package/src/template/components/Field.tsx +1 -1
- package/src/template/components/GraphQLDocument.tsx +145 -0
- package/src/template/components/GraphQLInteractive/GraphQLInteractive.tsx +25 -3
- package/src/template/components/HamburgerMenu.tsx +14 -1
- package/src/template/components/Logo.tsx +35 -15
- package/src/template/components/NamedType.tsx +27 -3
- package/src/template/components/SimpleVersionPicker.tsx +48 -0
- package/src/template/components/TypeAnnotation.tsx +8 -26
- package/src/template/components/VersionCoveragePicker.tsx +57 -0
- package/src/template/components/VersionPicker.tsx +12 -30
- package/src/template/components/home/ExamplesSection.tsx +49 -0
- package/src/template/components/home/FeaturesGrid.tsx +135 -0
- package/src/template/components/home/HeroSection.tsx +379 -0
- package/src/template/components/home/PlaygroundPreview.tsx +138 -0
- package/src/template/components/home/QuickStart.tsx +132 -0
- package/src/template/components/home/RecentChanges.tsx +152 -0
- package/src/template/components/home/Resources.tsx +207 -0
- package/src/template/components/home/SocialProof.tsx +109 -0
- package/src/template/components/navbar/DefaultNavbar.tsx +23 -12
- package/src/template/components/sidebar/Sidebar.tsx +14 -1
- package/src/template/components/sidebar/SidebarItem.tsx +18 -6
- package/src/template/components/swiss/SwissHeading.tsx +44 -0
- package/src/template/components/swiss/index.ts +1 -0
- package/src/template/entry.client.tsx +3 -3
- package/src/template/hooks/use-examples.ts +46 -0
- package/src/template/hooks/use-highlighted.ts +57 -0
- package/src/template/layouts/SidebarLayout.tsx +34 -27
- package/src/template/layouts/index.ts +0 -1
- package/src/template/lib/polen-url.ts +3 -3
- package/src/template/providers/mdx.tsx +75 -0
- package/src/template/routes/changelog.tsx +247 -28
- package/src/template/routes/examples/_.tsx +90 -0
- package/src/template/routes/examples/_index.tsx +93 -0
- package/src/template/routes/examples/name.tsx +69 -0
- package/src/template/routes/index.tsx +48 -2
- package/src/template/routes/pages.tsx +5 -67
- package/src/template/routes/reference.tsx +36 -14
- package/src/template/routes/root.tsx +94 -38
- package/src/template/server/create-page-html-response.ts +2 -2
- package/src/template/server/main.ts +6 -6
- package/src/template/server/view.ts +3 -3
- package/src/template/stores/changelog.ts +3 -3
- package/src/template/theme/swiss-sharp.css +117 -0
- package/src/template/theme/swiss-sharp.ts +14 -0
- package/src/types/virtual-modules.d.ts +26 -19
- package/src/vite/config.ts +1 -1
- package/src/vite/logger.ts +2 -3
- package/src/vite/plugins/branding.ts +141 -12
- package/src/vite/plugins/build.ts +1 -1
- package/src/vite/plugins/config.ts +57 -0
- package/src/vite/plugins/core.ts +45 -167
- package/src/vite/plugins/examples.ts +201 -0
- package/src/vite/plugins/hooks.ts +49 -0
- package/src/vite/plugins/index.ts +2 -1
- package/src/vite/plugins/main.ts +1 -1
- package/src/vite/plugins/manifest.ts +1 -1
- package/src/vite/plugins/navbar.ts +102 -0
- package/src/vite/plugins/pages.ts +70 -155
- package/src/vite/plugins/routes-manifest.ts +15 -13
- package/src/vite/plugins/schemas.ts +145 -0
- package/src/vite/plugins/serve.ts +1 -1
- package/build/api/api.d.ts.map +0 -1
- package/build/api/api.js +0 -9
- package/build/api/api.js.map +0 -1
- package/build/api/index.d.ts +0 -2
- package/build/api/index.d.ts.map +0 -1
- package/build/api/index.js +0 -2
- package/build/api/index.js.map +0 -1
- package/build/api/project/index.d.ts +0 -2
- package/build/api/project/index.d.ts.map +0 -1
- package/build/api/project/index.js +0 -2
- package/build/api/project/index.js.map +0 -1
- package/build/cli/commands/$default.d.ts +0 -3
- package/build/cli/commands/$default.d.ts.map +0 -1
- package/build/cli/commands/$default.js +0 -89
- package/build/cli/commands/$default.js.map +0 -1
- package/build/cli/commands/cache/$default.d.ts +0 -3
- package/build/cli/commands/cache/$default.d.ts.map +0 -1
- package/build/cli/commands/cache/$default.js +0 -10
- package/build/cli/commands/cache/$default.js.map +0 -1
- package/build/cli/commands/config/$default.d.ts +0 -2
- package/build/cli/commands/config/$default.d.ts.map +0 -1
- package/build/cli/commands/config/$default.js +0 -7
- package/build/cli/commands/config/$default.js.map +0 -1
- package/build/cli/commands/static/$default.d.ts +0 -3
- package/build/cli/commands/static/$default.d.ts.map +0 -1
- package/build/cli/commands/static/$default.js +0 -38
- package/build/cli/commands/static/$default.js.map +0 -1
- package/build/cli-effect/_/parameters.d.ts +0 -7
- package/build/cli-effect/_/parameters.d.ts.map +0 -1
- package/build/cli-effect/_/parameters.js +0 -7
- package/build/cli-effect/_/parameters.js.map +0 -1
- package/build/cli-effect/commands/build.d.ts +0 -11
- package/build/cli-effect/commands/build.d.ts.map +0 -1
- package/build/cli-effect/commands/build.js +0 -40
- package/build/cli-effect/commands/build.js.map +0 -1
- package/build/cli-effect/commands/cache/delete.d.ts +0 -7
- package/build/cli-effect/commands/cache/delete.d.ts.map +0 -1
- package/build/cli-effect/commands/cache/delete.js +0 -15
- package/build/cli-effect/commands/cache/delete.js.map +0 -1
- package/build/cli-effect/commands/cache/show.d.ts +0 -6
- package/build/cli-effect/commands/cache/show.d.ts.map +0 -1
- package/build/cli-effect/commands/cache/show.js +0 -80
- package/build/cli-effect/commands/cache/show.js.map +0 -1
- package/build/cli-effect/commands/cache.d.ts +0 -11
- package/build/cli-effect/commands/cache.d.ts.map +0 -1
- package/build/cli-effect/commands/cache.js +0 -18
- package/build/cli-effect/commands/cache.js.map +0 -1
- package/build/cli-effect/commands/config/create.d.ts +0 -7
- package/build/cli-effect/commands/config/create.d.ts.map +0 -1
- package/build/cli-effect/commands/config/create.js +0 -36
- package/build/cli-effect/commands/config/create.js.map +0 -1
- package/build/cli-effect/commands/config.d.ts +0 -8
- package/build/cli-effect/commands/config.d.ts.map +0 -1
- package/build/cli-effect/commands/config.js +0 -16
- package/build/cli-effect/commands/config.js.map +0 -1
- package/build/cli-effect/commands/create.d.ts +0 -10
- package/build/cli-effect/commands/create.d.ts.map +0 -1
- package/build/cli-effect/commands/create.js +0 -112
- package/build/cli-effect/commands/create.js.map +0 -1
- package/build/cli-effect/commands/dev.d.ts +0 -10
- package/build/cli-effect/commands/dev.d.ts.map +0 -1
- package/build/cli-effect/commands/dev.js +0 -48
- package/build/cli-effect/commands/dev.js.map +0 -1
- package/build/cli-effect/commands/open.d.ts +0 -11
- package/build/cli-effect/commands/open.d.ts.map +0 -1
- package/build/cli-effect/commands/open.js +0 -131
- package/build/cli-effect/commands/open.js.map +0 -1
- package/build/cli-effect/commands/static/rebase.d.ts +0 -9
- package/build/cli-effect/commands/static/rebase.d.ts.map +0 -1
- package/build/cli-effect/commands/static/rebase.js +0 -44
- package/build/cli-effect/commands/static/rebase.js.map +0 -1
- package/build/cli-effect/commands/static.d.ts +0 -10
- package/build/cli-effect/commands/static.d.ts.map +0 -1
- package/build/cli-effect/commands/static.js +0 -29
- package/build/cli-effect/commands/static.js.map +0 -1
- package/build/cli-effect/index.d.ts +0 -3
- package/build/cli-effect/index.d.ts.map +0 -1
- package/build/cli-effect/index.js +0 -61
- package/build/cli-effect/index.js.map +0 -1
- package/build/lib/file-router/diagnostic-reporter.d.ts +0 -3
- package/build/lib/file-router/diagnostic-reporter.d.ts.map +0 -1
- package/build/lib/file-router/diagnostic-reporter.js +0 -18
- package/build/lib/file-router/diagnostic-reporter.js.map +0 -1
- package/build/lib/task/$$.d.ts +0 -3
- package/build/lib/task/$$.d.ts.map +0 -1
- package/build/lib/task/$$.js +0 -3
- package/build/lib/task/$$.js.map +0 -1
- package/build/lib/task/$.d.ts +0 -2
- package/build/lib/task/$.d.ts.map +0 -1
- package/build/lib/task/$.js +0 -2
- package/build/lib/task/$.js.map +0 -1
- package/build/lib/task/report.d.ts +0 -28
- package/build/lib/task/report.d.ts.map +0 -1
- package/build/lib/task/report.js +0 -33
- package/build/lib/task/report.js.map +0 -1
- package/build/lib/task/task.d.ts +0 -45
- package/build/lib/task/task.d.ts.map +0 -1
- package/build/lib/task/task.js +0 -71
- package/build/lib/task/task.js.map +0 -1
- package/build/project-data.d.ts +0 -10
- package/build/project-data.d.ts.map +0 -1
- package/build/project-data.js +0 -2
- package/build/project-data.js.map +0 -1
- package/build/template/catalog-bridge.d.ts +0 -1837
- package/build/template/catalog-bridge.d.ts.map +0 -1
- package/build/template/catalog-bridge.js +0 -87
- package/build/template/catalog-bridge.js.map +0 -1
- package/build/template/data/catalog.d.ts +0 -3
- package/build/template/data/catalog.d.ts.map +0 -1
- package/build/template/data/catalog.js +0 -7
- package/build/template/data/catalog.js.map +0 -1
- package/build/template/layouts/ChangelogLayout.d.ts +0 -9
- package/build/template/layouts/ChangelogLayout.d.ts.map +0 -1
- package/build/template/layouts/ChangelogLayout.js +0 -97
- package/build/template/layouts/ChangelogLayout.js.map +0 -1
- package/build/vite/plugins/schema-assets.d.ts +0 -20
- package/build/vite/plugins/schema-assets.d.ts.map +0 -1
- package/build/vite/plugins/schema-assets.js +0 -225
- package/build/vite/plugins/schema-assets.js.map +0 -1
- package/src/api/index.ts +0 -1
- package/src/cli/commands/$default.ts +0 -102
- package/src/cli/commands/cache/$default.ts +0 -10
- package/src/cli/commands/config/$default.ts +0 -7
- package/src/cli/commands/static/$default.ts +0 -43
- package/src/cli-effect/_/parameters.ts +0 -17
- package/src/cli-effect/commands/build.ts +0 -66
- package/src/cli-effect/commands/cache/delete.ts +0 -21
- package/src/cli-effect/commands/cache/show.ts +0 -99
- package/src/cli-effect/commands/cache.ts +0 -27
- package/src/cli-effect/commands/config/create.ts +0 -49
- package/src/cli-effect/commands/config.ts +0 -25
- package/src/cli-effect/commands/create.ts +0 -167
- package/src/cli-effect/commands/dev.ts +0 -72
- package/src/cli-effect/commands/open.ts +0 -183
- package/src/cli-effect/commands/static/rebase.ts +0 -66
- package/src/cli-effect/commands/static.ts +0 -39
- package/src/cli-effect/index.ts +0 -79
- package/src/lib/file-router/diagnostic-reporter.ts +0 -22
- package/src/lib/task/$$.ts +0 -2
- package/src/lib/task/$.test.ts +0 -210
- package/src/lib/task/$.ts +0 -1
- package/src/lib/task/report.ts +0 -72
- package/src/lib/task/task.ts +0 -129
- package/src/project-data.ts +0 -10
- package/src/template/catalog-bridge.ts +0 -102
- package/src/template/data/catalog.ts +0 -7
- package/src/template/layouts/ChangelogLayout.tsx +0 -185
- package/src/vite/plugins/schema-assets.ts +0 -265
- /package/src/api/project/{index.ts → $$.ts} +0 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
import { Group } from '@wollybeard/kit';
|
2
|
+
import { Severity } from './severity.js';
|
3
|
+
// ============================================================================
|
4
|
+
// Helpers
|
5
|
+
// ============================================================================
|
6
|
+
const getIcon = (severity) => {
|
7
|
+
switch (severity) {
|
8
|
+
case Severity.enums.error:
|
9
|
+
return '✗';
|
10
|
+
case Severity.enums.warning:
|
11
|
+
return '⚠';
|
12
|
+
case Severity.enums.info:
|
13
|
+
return 'ⓘ';
|
14
|
+
}
|
15
|
+
};
|
16
|
+
const formatSummary = (diagnostics) => {
|
17
|
+
const errors = diagnostics.filter(d => d.severity === Severity.enums.error);
|
18
|
+
const warnings = diagnostics.filter(d => d.severity === Severity.enums.warning);
|
19
|
+
const infos = diagnostics.filter(d => d.severity === Severity.enums.info);
|
20
|
+
const parts = [
|
21
|
+
errors.length > 0 && `${errors.length} error${errors.length === 1 ? '' : 's'}`,
|
22
|
+
warnings.length > 0 && `${warnings.length} warning${warnings.length === 1 ? '' : 's'}`,
|
23
|
+
infos.length > 0 && `${infos.length} info${infos.length === 1 ? '' : 's'}`,
|
24
|
+
].filter(Boolean);
|
25
|
+
return parts.join(', ');
|
26
|
+
};
|
27
|
+
// ============================================================================
|
28
|
+
// Reporter
|
29
|
+
// ============================================================================
|
30
|
+
/**
|
31
|
+
* Reports diagnostics to the console, grouped by source.
|
32
|
+
*
|
33
|
+
* This is a generic reporter that works with any diagnostic
|
34
|
+
* that extends DiagnosticBase. It groups diagnostics by their
|
35
|
+
* source field and displays them with appropriate icons and
|
36
|
+
* formatting.
|
37
|
+
*
|
38
|
+
* @param diagnostics - Array of diagnostics to report
|
39
|
+
*
|
40
|
+
* @example
|
41
|
+
* ```typescript
|
42
|
+
* const diagnostics = [
|
43
|
+
* { type: 'missing-file', severity: 'error', message: 'File not found', source: 'file-router' },
|
44
|
+
* { type: 'unused-default', severity: 'warning', message: 'Default never used', source: 'examples' }
|
45
|
+
* ]
|
46
|
+
* report(diagnostics)
|
47
|
+
* ```
|
48
|
+
*/
|
49
|
+
export const report = (diagnostics) => {
|
50
|
+
if (diagnostics.length === 0)
|
51
|
+
return;
|
52
|
+
// Group diagnostics by source using kit's Group.by
|
53
|
+
const bySource = Group.by(diagnostics, 'source');
|
54
|
+
// Report each source's diagnostics
|
55
|
+
for (const [source, sourceDiagnostics] of Object.entries(bySource)) {
|
56
|
+
if (!sourceDiagnostics)
|
57
|
+
continue;
|
58
|
+
const summary = formatSummary(sourceDiagnostics);
|
59
|
+
console.warn(`\n${source} found ${summary}:\n`);
|
60
|
+
sourceDiagnostics.forEach((diagnostic, index) => {
|
61
|
+
const icon = getIcon(diagnostic.severity);
|
62
|
+
console.warn(`${icon} ${index + 1}. ${diagnostic.message}\n`);
|
63
|
+
});
|
64
|
+
}
|
65
|
+
};
|
66
|
+
//# sourceMappingURL=reporter.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../../src/lib/diagnostic/reporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,MAAM,OAAO,GAAG,CAAC,QAAgC,EAAU,EAAE;IAC3D,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,QAAQ,CAAC,KAAK,CAAC,KAAK;YACvB,OAAO,GAAG,CAAA;QACZ,KAAK,QAAQ,CAAC,KAAK,CAAC,OAAO;YACzB,OAAO,GAAG,CAAA;QACZ,KAAK,QAAQ,CAAC,KAAK,CAAC,IAAI;YACtB,OAAO,GAAG,CAAA;IACd,CAAC;AACH,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,CAAC,WAAyB,EAAU,EAAE;IAC1D,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,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IAEhD,mCAAmC;IACnC,KAAK,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACnE,IAAI,CAAC,iBAAiB;YAAE,SAAQ;QAChC,MAAM,OAAO,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAA;QAChD,OAAO,CAAC,IAAI,CAAC,KAAK,MAAM,UAAU,OAAO,KAAK,CAAC,CAAA;QAE/C,iBAAiB,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE;YAC9C,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;YACzC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,KAAK,GAAG,CAAC,KAAK,UAAU,CAAC,OAAO,IAAI,CAAC,CAAA;QAC/D,CAAC,CAAC,CAAA;IACJ,CAAC;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { S } from '#lib/kit-temp/effect';
|
2
|
+
import { Order } from 'effect';
|
3
|
+
export declare const Severity: S.Enums<{
|
4
|
+
readonly error: "error";
|
5
|
+
readonly warning: "warning";
|
6
|
+
readonly info: "info";
|
7
|
+
}>;
|
8
|
+
export type Severity = typeof Severity.Type;
|
9
|
+
export declare const Error: S.Literal<["error"]>;
|
10
|
+
export declare const Warning: S.Literal<["warning"]>;
|
11
|
+
export declare const Info: S.Literal<["info"]>;
|
12
|
+
export declare const is: (u: unknown, overrideOptions?: import("effect/SchemaAST").ParseOptions | number) => u is "error" | "warning" | "info";
|
13
|
+
export declare const decode: (i: "error" | "warning" | "info", overrideOptions?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<"error" | "warning" | "info", import("effect/ParseResult").ParseError, never>;
|
14
|
+
export declare const decodeSync: (i: "error" | "warning" | "info", overrideOptions?: import("effect/SchemaAST").ParseOptions) => "error" | "warning" | "info";
|
15
|
+
export declare const encode: (a: "error" | "warning" | "info", overrideOptions?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<"error" | "warning" | "info", import("effect/ParseResult").ParseError, never>;
|
16
|
+
export declare const equivalence: import("effect/Equivalence").Equivalence<"error" | "warning" | "info">;
|
17
|
+
/**
|
18
|
+
* Order for severity levels.
|
19
|
+
* error > warning > info
|
20
|
+
*/
|
21
|
+
export declare const order: Order.Order<Severity>;
|
22
|
+
/**
|
23
|
+
* Returns the highest severity from an array of severities.
|
24
|
+
* Returns 'info' if array is empty.
|
25
|
+
*/
|
26
|
+
export declare const highest: (severities: Severity[]) => Severity;
|
27
|
+
/**
|
28
|
+
* Returns the lowest severity from an array of severities.
|
29
|
+
* Returns 'error' if array is empty (most conservative).
|
30
|
+
*/
|
31
|
+
export declare const lowest: (severities: Severity[]) => Severity;
|
32
|
+
//# sourceMappingURL=severity.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"severity.d.ts","sourceRoot":"","sources":["../../../src/lib/diagnostic/severity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAM9B,eAAO,MAAM,QAAQ;;;;EASnB,CAAA;AAIF,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAA;AAM3C,eAAO,MAAM,KAAK,sBAAkC,CAAA;AACpD,eAAO,MAAM,OAAO,wBAAoC,CAAA;AACxD,eAAO,MAAM,IAAI,qBAAiC,CAAA;AAMlD,eAAO,MAAM,EAAE,uHAAiB,CAAA;AAMhC,eAAO,MAAM,MAAM,8MAAqB,CAAA;AACxC,eAAO,MAAM,UAAU,8HAAyB,CAAA;AAChD,eAAO,MAAM,MAAM,8MAAqB,CAAA;AAMxC,eAAO,MAAM,WAAW,wEAA0B,CAAA;AAMlD;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAYvC,CAAA;AAMD;;;GAGG;AACH,eAAO,MAAM,OAAO,GAAI,YAAY,QAAQ,EAAE,KAAG,QAGhD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,YAAY,QAAQ,EAAE,KAAG,QAG/C,CAAA"}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import { S } from '#lib/kit-temp/effect';
|
2
|
+
import { Order } from 'effect';
|
3
|
+
// ============================================================================
|
4
|
+
// Schema - Severity
|
5
|
+
// ============================================================================
|
6
|
+
export const Severity = S.Enums({
|
7
|
+
error: 'error',
|
8
|
+
warning: 'warning',
|
9
|
+
info: 'info',
|
10
|
+
}).annotations({
|
11
|
+
identifier: 'DiagnosticSeverity',
|
12
|
+
description: 'The severity level of a diagnostic message',
|
13
|
+
});
|
14
|
+
Severity.enums.error;
|
15
|
+
// ============================================================================
|
16
|
+
// Severity Literals
|
17
|
+
// ============================================================================
|
18
|
+
export const Error = S.Literal(Severity.enums.error);
|
19
|
+
export const Warning = S.Literal(Severity.enums.warning);
|
20
|
+
export const Info = S.Literal(Severity.enums.info);
|
21
|
+
// ============================================================================
|
22
|
+
// Type Guards
|
23
|
+
// ============================================================================
|
24
|
+
export const is = S.is(Severity);
|
25
|
+
// ============================================================================
|
26
|
+
// Codec
|
27
|
+
// ============================================================================
|
28
|
+
export const decode = S.decode(Severity);
|
29
|
+
export const decodeSync = S.decodeSync(Severity);
|
30
|
+
export const encode = S.encode(Severity);
|
31
|
+
// ============================================================================
|
32
|
+
// Equivalence
|
33
|
+
// ============================================================================
|
34
|
+
export const equivalence = S.equivalence(Severity);
|
35
|
+
// ============================================================================
|
36
|
+
// Ordering
|
37
|
+
// ============================================================================
|
38
|
+
/**
|
39
|
+
* Order for severity levels.
|
40
|
+
* error > warning > info
|
41
|
+
*/
|
42
|
+
export const order = Order.mapInput(Order.number, (severity) => {
|
43
|
+
switch (severity) {
|
44
|
+
case Severity.enums.error:
|
45
|
+
return 3;
|
46
|
+
case Severity.enums.warning:
|
47
|
+
return 2;
|
48
|
+
case Severity.enums.info:
|
49
|
+
return 1;
|
50
|
+
}
|
51
|
+
});
|
52
|
+
// ============================================================================
|
53
|
+
// Utilities
|
54
|
+
// ============================================================================
|
55
|
+
/**
|
56
|
+
* Returns the highest severity from an array of severities.
|
57
|
+
* Returns 'info' if array is empty.
|
58
|
+
*/
|
59
|
+
export const highest = (severities) => {
|
60
|
+
if (severities.length === 0)
|
61
|
+
return Severity.enums.info;
|
62
|
+
return severities.reduce(Order.max(order));
|
63
|
+
};
|
64
|
+
/**
|
65
|
+
* Returns the lowest severity from an array of severities.
|
66
|
+
* Returns 'error' if array is empty (most conservative).
|
67
|
+
*/
|
68
|
+
export const lowest = (severities) => {
|
69
|
+
if (severities.length === 0)
|
70
|
+
return Severity.enums.error;
|
71
|
+
return severities.reduce(Order.min(order));
|
72
|
+
};
|
73
|
+
//# sourceMappingURL=severity.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"severity.js","sourceRoot":"","sources":["../../../src/lib/diagnostic/severity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE9B,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAC7B;IACE,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACJ,CACX,CAAC,WAAW,CAAC;IACZ,UAAU,EAAE,oBAAoB;IAChC,WAAW,EAAE,4CAA4C;CAC1D,CAAC,CAAA;AAEF,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAA;AAIpB,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK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AAE/E;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,UAAsB,EAAY,EAAE;IAC1D,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAA;IACvD,OAAO,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;AAC5C,CAAC,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,UAAsB,EAAY,EAAE;IACzD,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAA;IACxD,OAAO,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;AAC5C,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/lib/directed-filter/$$.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"$$.js","sourceRoot":"","sources":["../../../src/lib/directed-filter/$$.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"$.d.ts","sourceRoot":"","sources":["../../../src/lib/directed-filter/$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,SAAS,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"$.js","sourceRoot":"","sources":["../../../src/lib/directed-filter/$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,SAAS,CAAA"}
|
@@ -0,0 +1,127 @@
|
|
1
|
+
import { S } from '#lib/kit-temp/effect';
|
2
|
+
/**
|
3
|
+
* Creates a DirectedFilter schema for a given item schema.
|
4
|
+
* Returns an object containing the Union schema and its member schemas.
|
5
|
+
*
|
6
|
+
* @param itemSchema - The schema for items in the filter
|
7
|
+
* @returns Object with Union, Allow, Deny, AllowAll, and DenyAll schemas
|
8
|
+
*/
|
9
|
+
export declare const create: <ItemSchema extends S.Schema.Any>(itemSchema: ItemSchema) => {
|
10
|
+
readonly Union: S.Union<[S.Struct<{
|
11
|
+
_tag: S.tag<"DirectedFilterAllow">;
|
12
|
+
} & {
|
13
|
+
items: S.Array$<ItemSchema>;
|
14
|
+
}>, S.Struct<{
|
15
|
+
_tag: S.tag<"DirectedFilterDeny">;
|
16
|
+
} & {
|
17
|
+
items: S.Array$<ItemSchema>;
|
18
|
+
}>, S.Struct<{
|
19
|
+
_tag: S.tag<"DirectedFilterAllowAll">;
|
20
|
+
}>, S.Struct<{
|
21
|
+
_tag: S.tag<"DirectedFilterDenyAll">;
|
22
|
+
}>]>;
|
23
|
+
readonly Allow: S.Struct<{
|
24
|
+
_tag: S.tag<"DirectedFilterAllow">;
|
25
|
+
} & {
|
26
|
+
items: S.Array$<ItemSchema>;
|
27
|
+
}>;
|
28
|
+
readonly Deny: S.Struct<{
|
29
|
+
_tag: S.tag<"DirectedFilterDeny">;
|
30
|
+
} & {
|
31
|
+
items: S.Array$<ItemSchema>;
|
32
|
+
}>;
|
33
|
+
readonly AllowAll: S.Struct<{
|
34
|
+
_tag: S.tag<"DirectedFilterAllowAll">;
|
35
|
+
}>;
|
36
|
+
readonly DenyAll: S.Struct<{
|
37
|
+
_tag: S.tag<"DirectedFilterDenyAll">;
|
38
|
+
}>;
|
39
|
+
};
|
40
|
+
export type DirectedFilterAllow<T> = {
|
41
|
+
readonly _tag: 'DirectedFilterAllow';
|
42
|
+
readonly items: readonly T[];
|
43
|
+
};
|
44
|
+
export type DirectedFilterDeny<T> = {
|
45
|
+
readonly _tag: 'DirectedFilterDeny';
|
46
|
+
readonly items: readonly T[];
|
47
|
+
};
|
48
|
+
export type DirectedFilterAllowAll = {
|
49
|
+
readonly _tag: 'DirectedFilterAllowAll';
|
50
|
+
};
|
51
|
+
export type DirectedFilterDenyAll = {
|
52
|
+
readonly _tag: 'DirectedFilterDenyAll';
|
53
|
+
};
|
54
|
+
export type DirectedFilter<T> = DirectedFilterAllow<T> | DirectedFilterDeny<T> | DirectedFilterAllowAll | DirectedFilterDenyAll;
|
55
|
+
/**
|
56
|
+
* Filters a collection based on a DirectedFilter using a custom value getter.
|
57
|
+
* Returns a curried function for partial application.
|
58
|
+
* Short-circuits for AllowAll/DenyAll for performance.
|
59
|
+
*
|
60
|
+
* TODO: Use equivalence trait from schema if available instead of === for comparison
|
61
|
+
*
|
62
|
+
* @param filter - The DirectedFilter to apply
|
63
|
+
* @returns Curried function that takes a value getter and then a collection
|
64
|
+
*/
|
65
|
+
export declare const filterBy: <FilterItem>(filter: DirectedFilter<FilterItem>) => <Item>(getValue: (item: Item) => FilterItem) => (collection: readonly Item[]) => Item[];
|
66
|
+
/**
|
67
|
+
* Filters a collection based on a DirectedFilter using a property name.
|
68
|
+
* Convenience function that extracts values by property key.
|
69
|
+
*
|
70
|
+
* @param filter - The DirectedFilter to apply
|
71
|
+
* @returns Curried function that takes a property name and then a collection
|
72
|
+
*/
|
73
|
+
export declare function filterByProperty<FilterItem>(filter: DirectedFilter<FilterItem>): <K extends PropertyKey>(propertyName: K) => <Item extends Record<K, any>>(collection: readonly Item[]) => Item[];
|
74
|
+
/**
|
75
|
+
* Filters a collection based on a DirectedFilter using identity.
|
76
|
+
* Used when the items themselves are the filter values.
|
77
|
+
*
|
78
|
+
* @param filter - The DirectedFilter to apply
|
79
|
+
* @returns Function that filters a collection
|
80
|
+
*/
|
81
|
+
export declare const filter: <Item>(filter: DirectedFilter<Item>) => (collection: readonly Item[]) => Item[];
|
82
|
+
/**
|
83
|
+
* Const instance for allowing all items.
|
84
|
+
*/
|
85
|
+
export declare const AllowAll: DirectedFilterAllowAll;
|
86
|
+
/**
|
87
|
+
* Const instance for denying all items.
|
88
|
+
*/
|
89
|
+
export declare const DenyAll: DirectedFilterDenyAll;
|
90
|
+
/**
|
91
|
+
* Creates an Allow filter with the specified items.
|
92
|
+
*/
|
93
|
+
export declare const allow: <T>(items: readonly T[]) => DirectedFilterAllow<T>;
|
94
|
+
/**
|
95
|
+
* Creates a Deny filter with the specified items.
|
96
|
+
*/
|
97
|
+
export declare const deny: <T>(items: readonly T[]) => DirectedFilterDeny<T>;
|
98
|
+
/**
|
99
|
+
* Creates a DirectedFilter from only/exclude pattern commonly used in configuration.
|
100
|
+
* Returns AllowAll if neither only nor exclude has items.
|
101
|
+
*
|
102
|
+
* @param only - Items to allow (takes precedence over exclude)
|
103
|
+
* @param exclude - Items to deny
|
104
|
+
* @returns DirectedFilter (never null)
|
105
|
+
*/
|
106
|
+
export declare const fromOnlyExclude: <T>(only: readonly T[] | undefined, exclude: readonly T[] | undefined,
|
107
|
+
/**
|
108
|
+
* @default allowAll
|
109
|
+
*/
|
110
|
+
fallback?: DirectedFilterDenyAll | DirectedFilterAllowAll) => DirectedFilter<T>;
|
111
|
+
/**
|
112
|
+
* Type guard for DirectedFilterAllow
|
113
|
+
*/
|
114
|
+
export declare const isAllow: <T>(filter: DirectedFilter<T>) => filter is DirectedFilterAllow<T>;
|
115
|
+
/**
|
116
|
+
* Type guard for DirectedFilterDeny
|
117
|
+
*/
|
118
|
+
export declare const isDeny: <T>(filter: DirectedFilter<T>) => filter is DirectedFilterDeny<T>;
|
119
|
+
/**
|
120
|
+
* Type guard for DirectedFilterAllowAll
|
121
|
+
*/
|
122
|
+
export declare const isAllowAll: <T>(filter: DirectedFilter<T>) => filter is DirectedFilterAllowAll;
|
123
|
+
/**
|
124
|
+
* Type guard for DirectedFilterDenyAll
|
125
|
+
*/
|
126
|
+
export declare const isDenyAll: <T>(filter: DirectedFilter<T>) => filter is DirectedFilterDenyAll;
|
127
|
+
//# sourceMappingURL=directed-filter.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"directed-filter.d.ts","sourceRoot":"","sources":["../../../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1B,CAAA;AAE1C;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,QAAQ,cAAc,CAAC,CAAC,CAAC,KAAG,MAAM,IAAI,qBAC1B,CAAA"}
|
@@ -0,0 +1,153 @@
|
|
1
|
+
import { S } from '#lib/kit-temp/effect';
|
2
|
+
import { Match } from 'effect';
|
3
|
+
// ============================================================================
|
4
|
+
// Factory
|
5
|
+
// ============================================================================
|
6
|
+
/**
|
7
|
+
* Creates a DirectedFilter schema for a given item schema.
|
8
|
+
* Returns an object containing the Union schema and its member schemas.
|
9
|
+
*
|
10
|
+
* @param itemSchema - The schema for items in the filter
|
11
|
+
* @returns Object with Union, Allow, Deny, AllowAll, and DenyAll schemas
|
12
|
+
*/
|
13
|
+
export const create = (itemSchema) => {
|
14
|
+
const Allow = S.TaggedStruct('DirectedFilterAllow', {
|
15
|
+
items: S.Array(itemSchema),
|
16
|
+
}).annotations({
|
17
|
+
identifier: 'DirectedFilterAllow',
|
18
|
+
description: 'Filter that allows only specified items',
|
19
|
+
});
|
20
|
+
const Deny = S.TaggedStruct('DirectedFilterDeny', {
|
21
|
+
items: S.Array(itemSchema),
|
22
|
+
}).annotations({
|
23
|
+
identifier: 'DirectedFilterDeny',
|
24
|
+
description: 'Filter that denies specified items',
|
25
|
+
});
|
26
|
+
const AllowAll = S.TaggedStruct('DirectedFilterAllowAll', {}).annotations({
|
27
|
+
identifier: 'DirectedFilterAllowAll',
|
28
|
+
description: 'Filter that allows all items (no-op)',
|
29
|
+
});
|
30
|
+
const DenyAll = S.TaggedStruct('DirectedFilterDenyAll', {}).annotations({
|
31
|
+
identifier: 'DirectedFilterDenyAll',
|
32
|
+
description: 'Filter that denies all items',
|
33
|
+
});
|
34
|
+
const Union = S.Union(Allow, Deny, AllowAll, DenyAll).annotations({
|
35
|
+
identifier: 'DirectedFilter',
|
36
|
+
description: 'A filter that controls item inclusion/exclusion',
|
37
|
+
});
|
38
|
+
return {
|
39
|
+
Union,
|
40
|
+
Allow,
|
41
|
+
Deny,
|
42
|
+
AllowAll,
|
43
|
+
DenyAll,
|
44
|
+
};
|
45
|
+
};
|
46
|
+
// ============================================================================
|
47
|
+
// Filtering Functions
|
48
|
+
// ============================================================================
|
49
|
+
/**
|
50
|
+
* Filters a collection based on a DirectedFilter using a custom value getter.
|
51
|
+
* Returns a curried function for partial application.
|
52
|
+
* Short-circuits for AllowAll/DenyAll for performance.
|
53
|
+
*
|
54
|
+
* TODO: Use equivalence trait from schema if available instead of === for comparison
|
55
|
+
*
|
56
|
+
* @param filter - The DirectedFilter to apply
|
57
|
+
* @returns Curried function that takes a value getter and then a collection
|
58
|
+
*/
|
59
|
+
export const filterBy = (filter) => (getValue) => (collection) => {
|
60
|
+
return Match.value(filter).pipe(Match.tagsExhaustive({
|
61
|
+
DirectedFilterAllowAll: () => [...collection], // Return copy for immutability
|
62
|
+
DirectedFilterDenyAll: () => [],
|
63
|
+
DirectedFilterAllow: (f) => {
|
64
|
+
const allowSet = new Set(f.items);
|
65
|
+
return collection.filter(item => allowSet.has(getValue(item)));
|
66
|
+
},
|
67
|
+
DirectedFilterDeny: (f) => {
|
68
|
+
const denySet = new Set(f.items);
|
69
|
+
return collection.filter(item => !denySet.has(getValue(item)));
|
70
|
+
},
|
71
|
+
}));
|
72
|
+
};
|
73
|
+
export function filterByProperty(filter) {
|
74
|
+
return (propertyName) => (collection) => {
|
75
|
+
return filterBy(filter)((item) => item[propertyName])(collection);
|
76
|
+
};
|
77
|
+
}
|
78
|
+
/**
|
79
|
+
* Filters a collection based on a DirectedFilter using identity.
|
80
|
+
* Used when the items themselves are the filter values.
|
81
|
+
*
|
82
|
+
* @param filter - The DirectedFilter to apply
|
83
|
+
* @returns Function that filters a collection
|
84
|
+
*/
|
85
|
+
export const filter = (filter) => (collection) => {
|
86
|
+
return filterBy(filter)((item) => item)(collection);
|
87
|
+
};
|
88
|
+
// ============================================================================
|
89
|
+
// Constructors
|
90
|
+
// ============================================================================
|
91
|
+
/**
|
92
|
+
* Const instance for allowing all items.
|
93
|
+
*/
|
94
|
+
export const AllowAll = { _tag: 'DirectedFilterAllowAll' };
|
95
|
+
/**
|
96
|
+
* Const instance for denying all items.
|
97
|
+
*/
|
98
|
+
export const DenyAll = { _tag: 'DirectedFilterDenyAll' };
|
99
|
+
/**
|
100
|
+
* Creates an Allow filter with the specified items.
|
101
|
+
*/
|
102
|
+
export const allow = (items) => ({
|
103
|
+
_tag: 'DirectedFilterAllow',
|
104
|
+
items,
|
105
|
+
});
|
106
|
+
/**
|
107
|
+
* Creates a Deny filter with the specified items.
|
108
|
+
*/
|
109
|
+
export const deny = (items) => ({
|
110
|
+
_tag: 'DirectedFilterDeny',
|
111
|
+
items,
|
112
|
+
});
|
113
|
+
/**
|
114
|
+
* Creates a DirectedFilter from only/exclude pattern commonly used in configuration.
|
115
|
+
* Returns AllowAll if neither only nor exclude has items.
|
116
|
+
*
|
117
|
+
* @param only - Items to allow (takes precedence over exclude)
|
118
|
+
* @param exclude - Items to deny
|
119
|
+
* @returns DirectedFilter (never null)
|
120
|
+
*/
|
121
|
+
export const fromOnlyExclude = (only, exclude,
|
122
|
+
/**
|
123
|
+
* @default allowAll
|
124
|
+
*/
|
125
|
+
fallback) => {
|
126
|
+
if (only && only.length > 0) {
|
127
|
+
return allow(only);
|
128
|
+
}
|
129
|
+
if (exclude && exclude.length > 0) {
|
130
|
+
return deny(exclude);
|
131
|
+
}
|
132
|
+
return fallback ?? AllowAll;
|
133
|
+
};
|
134
|
+
// ============================================================================
|
135
|
+
// Type Guards
|
136
|
+
// ============================================================================
|
137
|
+
/**
|
138
|
+
* Type guard for DirectedFilterAllow
|
139
|
+
*/
|
140
|
+
export const isAllow = (filter) => filter._tag === 'DirectedFilterAllow';
|
141
|
+
/**
|
142
|
+
* Type guard for DirectedFilterDeny
|
143
|
+
*/
|
144
|
+
export const isDeny = (filter) => filter._tag === 'DirectedFilterDeny';
|
145
|
+
/**
|
146
|
+
* Type guard for DirectedFilterAllowAll
|
147
|
+
*/
|
148
|
+
export const isAllowAll = (filter) => filter._tag === 'DirectedFilterAllowAll';
|
149
|
+
/**
|
150
|
+
* Type guard for DirectedFilterDenyAll
|
151
|
+
*/
|
152
|
+
export const isDenyAll = (filter) => filter._tag === 'DirectedFilterDenyAll';
|
153
|
+
//# sourceMappingURL=directed-filter.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"directed-filter.js","sourceRoot":"","sources":["../../../src/lib/directed-filter/directed-filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE9B,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAkC,UAAsB,EAAE,EAAE;IAChF,MAAM,KAAK,GAAG,CAAC,CAAC,YAAY,CAAC,qBAAqB,EAAE;QAClD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;KAC3B,CAAC,CAAC,WAAW,CAAC;QACb,UAAU,EAAE,qBAAqB;QACjC,WAAW,EAAE,yCAAyC;KACvD,CAAC,CAAA;IAEF,MAAM,IAAI,GAAG,CAAC,CAAC,YAAY,CAAC,oBAAoB,EAAE;QAChD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;KAC3B,CAAC,CAAC,WAAW,CAAC;QACb,UAAU,EAAE,oBAAoB;QAChC,WAAW,EAAE,oCAAoC;KAClD,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,CAAC,CAAC,YAAY,CAAC,wBAAwB,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC;QACxE,UAAU,EAAE,wBAAwB;QACpC,WAAW,EAAE,sCAAsC;KACpD,CAAC,CAAA;IAEF,MAAM,OAAO,GAAG,CAAC,CAAC,YAAY,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC;Q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I,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,CAAA;IACpB,CAAC;IACD,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAA;IACtB,CAAC;IACD,OAAO,QAAQ,IAAI,QAAQ,CAAA;AAC7B,CAAC,CAAA;AAED,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAI,MAAyB,EAAoC,EAAE,CACxF,MAAM,CAAC,IAAI,KAAK,qBAAqB,CAAA;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAI,MAAyB,EAAmC,EAAE,CACtF,MAAM,CAAC,IAAI,KAAK,oBAAoB,CAAA;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAI,MAAyB,EAAoC,EAAE,CAC3F,MAAM,CAAC,IAAI,KAAK,wBAAwB,CAAA;AAE1C;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAI,MAAyB,EAAmC,EAAE,CACzF,MAAM,CAAC,IAAI,KAAK,uBAAuB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/lib/document/$$.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"$$.js","sourceRoot":"","sources":["../../../src/lib/document/$$.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"$.d.ts","sourceRoot":"","sources":["../../../src/lib/document/$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"$.js","sourceRoot":"","sources":["../../../src/lib/document/$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAA"}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { S } from '#lib/kit-temp/effect';
|
2
|
+
/**
|
3
|
+
* A Document represents versionable content that can be:
|
4
|
+
* - Unversioned: A single document with no version support
|
5
|
+
* - Versioned: Multiple versions mapped by version selections (single versions or version sets)
|
6
|
+
*/
|
7
|
+
export declare const Document: S.Union<[S.TaggedStruct<"DocumentUnversioned", {
|
8
|
+
document: typeof S.String;
|
9
|
+
}>, S.TaggedStruct<"DocumentVersioned", {
|
10
|
+
versionDocuments: S.HashMap<S.Union<[S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof import("../version/integer.js").Integer, typeof import("../version/semver.js").Semver, typeof import("../version/date.js").Date, typeof import("../version/custom.js").Custom]>, never>, S.HashSet<S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof import("../version/integer.js").Integer, typeof import("../version/semver.js").Semver, typeof import("../version/date.js").Date, typeof import("../version/custom.js").Custom]>, never>>]>, typeof S.String>;
|
11
|
+
}>]>;
|
12
|
+
export type Document = typeof Document.Type;
|
13
|
+
export declare const is: (u: unknown, overrideOptions?: import("effect/SchemaAST").ParseOptions | number) => u is {
|
14
|
+
readonly _tag: "DocumentUnversioned";
|
15
|
+
readonly document: string;
|
16
|
+
} | {
|
17
|
+
readonly _tag: "DocumentVersioned";
|
18
|
+
readonly versionDocuments: import("effect/HashMap").HashMap<import("../version/custom.js").Custom | import("../version/date.js").Date | import("../version/integer.js").Integer | import("../version/semver.js").Semver | import("effect/HashSet").HashSet<import("../version/custom.js").Custom | import("../version/date.js").Date | import("../version/integer.js").Integer | import("../version/semver.js").Semver>, string>;
|
19
|
+
};
|
20
|
+
export declare const decode: (i: {
|
21
|
+
readonly _tag: "DocumentUnversioned";
|
22
|
+
readonly document: string;
|
23
|
+
} | {
|
24
|
+
readonly _tag: "DocumentVersioned";
|
25
|
+
readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[], string])[];
|
26
|
+
}, overrideOptions?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
|
27
|
+
readonly _tag: "DocumentUnversioned";
|
28
|
+
readonly document: string;
|
29
|
+
} | {
|
30
|
+
readonly _tag: "DocumentVersioned";
|
31
|
+
readonly versionDocuments: import("effect/HashMap").HashMap<import("../version/custom.js").Custom | import("../version/date.js").Date | import("../version/integer.js").Integer | import("../version/semver.js").Semver | import("effect/HashSet").HashSet<import("../version/custom.js").Custom | import("../version/date.js").Date | import("../version/integer.js").Integer | import("../version/semver.js").Semver>, string>;
|
32
|
+
}, import("effect/ParseResult").ParseError, never>;
|
33
|
+
export declare const decodeSync: (i: {
|
34
|
+
readonly _tag: "DocumentUnversioned";
|
35
|
+
readonly document: string;
|
36
|
+
} | {
|
37
|
+
readonly _tag: "DocumentVersioned";
|
38
|
+
readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[], string])[];
|
39
|
+
}, overrideOptions?: import("effect/SchemaAST").ParseOptions) => {
|
40
|
+
readonly _tag: "DocumentUnversioned";
|
41
|
+
readonly document: string;
|
42
|
+
} | {
|
43
|
+
readonly _tag: "DocumentVersioned";
|
44
|
+
readonly versionDocuments: import("effect/HashMap").HashMap<import("../version/custom.js").Custom | import("../version/date.js").Date | import("../version/integer.js").Integer | import("../version/semver.js").Semver | import("effect/HashSet").HashSet<import("../version/custom.js").Custom | import("../version/date.js").Date | import("../version/integer.js").Integer | import("../version/semver.js").Semver>, string>;
|
45
|
+
};
|
46
|
+
export declare const encode: (a: {
|
47
|
+
readonly _tag: "DocumentUnversioned";
|
48
|
+
readonly document: string;
|
49
|
+
} | {
|
50
|
+
readonly _tag: "DocumentVersioned";
|
51
|
+
readonly versionDocuments: import("effect/HashMap").HashMap<import("../version/custom.js").Custom | import("../version/date.js").Date | import("../version/integer.js").Integer | import("../version/semver.js").Semver | import("effect/HashSet").HashSet<import("../version/custom.js").Custom | import("../version/date.js").Date | import("../version/integer.js").Integer | import("../version/semver.js").Semver>, string>;
|
52
|
+
}, overrideOptions?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
|
53
|
+
readonly _tag: "DocumentUnversioned";
|
54
|
+
readonly document: string;
|
55
|
+
} | {
|
56
|
+
readonly _tag: "DocumentVersioned";
|
57
|
+
readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[], string])[];
|
58
|
+
}, import("effect/ParseResult").ParseError, never>;
|
59
|
+
//# sourceMappingURL=document.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/lib/document/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AAQxC;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;IAGpB,CAAA;AAMD,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAA;AAM3C,eAAO,MAAM,EAAE;;;;;;CAAiB,CAAA;AAMhC,eAAO,MAAM,MAAM;;;;;;;;;;;;kDAAqB,CAAA;AACxC,eAAO,MAAM,UAAU;;;;;;;;;;;;CAAyB,CAAA;AAChD,eAAO,MAAM,MAAM;;;;;;;;;;;;kDAAqB,CAAA"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { S } from '#lib/kit-temp/effect';
|
2
|
+
import { DocumentUnversioned } from './unversioned.js';
|
3
|
+
import { DocumentVersioned } from './versioned.js';
|
4
|
+
// ============================================================================
|
5
|
+
// Schema
|
6
|
+
// ============================================================================
|
7
|
+
/**
|
8
|
+
* A Document represents versionable content that can be:
|
9
|
+
* - Unversioned: A single document with no version support
|
10
|
+
* - Versioned: Multiple versions mapped by version selections (single versions or version sets)
|
11
|
+
*/
|
12
|
+
export const Document = S.Union(DocumentUnversioned, DocumentVersioned);
|
13
|
+
// ============================================================================
|
14
|
+
// Type Guards
|
15
|
+
// ============================================================================
|
16
|
+
export const is = S.is(Document);
|
17
|
+
// ============================================================================
|
18
|
+
// Codec
|
19
|
+
// ============================================================================
|
20
|
+
export const decode = S.decode(Document);
|
21
|
+
export const decodeSync = S.decodeSync(Document);
|
22
|
+
export const encode = S.encode(Document);
|
23
|
+
//# sourceMappingURL=document.js.map
|