@scalar/blocks 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +45 -0
- package/dist/code-example/components/CodeExample.vue.d.ts +5 -0
- package/dist/code-example/components/CodeExample.vue.d.ts.map +1 -1
- package/dist/code-example/components/CodeExample.vue.js +1 -1
- package/dist/code-example/components/CodeExample.vue.js.map +1 -1
- package/dist/code-example/components/CodeExample.vue.script.js +12 -9
- package/dist/code-example/components/CodeExample.vue.script.js.map +1 -1
- package/dist/code-example/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/code-example/helpers/operation-to-har/operation-to-har.js +1 -0
- package/dist/code-example/helpers/operation-to-har/operation-to-har.js.map +1 -1
- package/dist/code-example/helpers/operation-to-har/process-body.d.ts.map +1 -1
- package/dist/code-example/helpers/operation-to-har/process-body.js +51 -45
- package/dist/code-example/helpers/operation-to-har/process-body.js.map +1 -1
- package/dist/code-example/mount.d.ts +2 -0
- package/dist/code-example/mount.d.ts.map +1 -1
- package/dist/code-example/mount.js +3 -0
- package/dist/code-example/mount.js.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/schema/LinkButton.vue.d.ts +14 -0
- package/dist/schema/LinkButton.vue.d.ts.map +1 -0
- package/dist/schema/LinkButton.vue.js +15 -0
- package/dist/schema/LinkButton.vue.js.map +1 -0
- package/dist/schema/RenderString.vue.d.ts +7 -0
- package/dist/schema/RenderString.vue.d.ts.map +1 -0
- package/dist/schema/RenderString.vue.js +7 -0
- package/dist/schema/RenderString.vue.js.map +1 -0
- package/dist/schema/RenderString.vue.script.js +14 -0
- package/dist/schema/RenderString.vue.script.js.map +1 -0
- package/dist/schema/Schema.vue.d.ts +50 -0
- package/dist/schema/Schema.vue.d.ts.map +1 -0
- package/dist/schema/Schema.vue.js +9 -0
- package/dist/schema/Schema.vue.js.map +1 -0
- package/dist/schema/Schema.vue.script.js +234 -0
- package/dist/schema/Schema.vue.script.js.map +1 -0
- package/dist/schema/SchemaCollapsedPreview.vue.d.ts +17 -0
- package/dist/schema/SchemaCollapsedPreview.vue.d.ts.map +1 -0
- package/dist/schema/SchemaCollapsedPreview.vue.js +7 -0
- package/dist/schema/SchemaCollapsedPreview.vue.js.map +1 -0
- package/dist/schema/SchemaCollapsedPreview.vue.script.js +28 -0
- package/dist/schema/SchemaCollapsedPreview.vue.script.js.map +1 -0
- package/dist/schema/SchemaComposition.vue.d.ts +42 -0
- package/dist/schema/SchemaComposition.vue.d.ts.map +1 -0
- package/dist/schema/SchemaComposition.vue.js +9 -0
- package/dist/schema/SchemaComposition.vue.js.map +1 -0
- package/dist/schema/SchemaComposition.vue.script.js +231 -0
- package/dist/schema/SchemaComposition.vue.script.js.map +1 -0
- package/dist/schema/SchemaEnumPropertyItem.vue.d.ts +8 -0
- package/dist/schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -0
- package/dist/schema/SchemaEnumPropertyItem.vue.js +7 -0
- package/dist/schema/SchemaEnumPropertyItem.vue.js.map +1 -0
- package/dist/schema/SchemaEnumPropertyItem.vue.script.js +24 -0
- package/dist/schema/SchemaEnumPropertyItem.vue.script.js.map +1 -0
- package/dist/schema/SchemaEnums.vue.d.ts +11 -0
- package/dist/schema/SchemaEnums.vue.d.ts.map +1 -0
- package/dist/schema/SchemaEnums.vue.js +9 -0
- package/dist/schema/SchemaEnums.vue.js.map +1 -0
- package/dist/schema/SchemaEnums.vue.script.js +78 -0
- package/dist/schema/SchemaEnums.vue.script.js.map +1 -0
- package/dist/schema/SchemaGlyphPuck.vue.d.ts +33 -0
- package/dist/schema/SchemaGlyphPuck.vue.d.ts.map +1 -0
- package/dist/schema/SchemaGlyphPuck.vue.js +7 -0
- package/dist/schema/SchemaGlyphPuck.vue.js.map +1 -0
- package/dist/schema/SchemaGlyphPuck.vue.script.js +30 -0
- package/dist/schema/SchemaGlyphPuck.vue.script.js.map +1 -0
- package/dist/schema/SchemaGutterToggle.vue.d.ts +32 -0
- package/dist/schema/SchemaGutterToggle.vue.d.ts.map +1 -0
- package/dist/schema/SchemaGutterToggle.vue.js +7 -0
- package/dist/schema/SchemaGutterToggle.vue.js.map +1 -0
- package/dist/schema/SchemaGutterToggle.vue.script.js +43 -0
- package/dist/schema/SchemaGutterToggle.vue.script.js.map +1 -0
- package/dist/schema/SchemaHeading.vue.d.ts +9 -0
- package/dist/schema/SchemaHeading.vue.d.ts.map +1 -0
- package/dist/schema/SchemaHeading.vue.js +9 -0
- package/dist/schema/SchemaHeading.vue.js.map +1 -0
- package/dist/schema/SchemaHeading.vue.script.js +35 -0
- package/dist/schema/SchemaHeading.vue.script.js.map +1 -0
- package/dist/schema/SchemaObjectExampleCodeBlock.vue.d.ts +8 -0
- package/dist/schema/SchemaObjectExampleCodeBlock.vue.d.ts.map +1 -0
- package/dist/schema/SchemaObjectExampleCodeBlock.vue.js +7 -0
- package/dist/schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -0
- package/dist/schema/SchemaObjectExampleCodeBlock.vue.script.js +48 -0
- package/dist/schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -0
- package/dist/schema/SchemaObjectProperties.vue.d.ts +22 -0
- package/dist/schema/SchemaObjectProperties.vue.d.ts.map +1 -0
- package/dist/schema/SchemaObjectProperties.vue.js +7 -0
- package/dist/schema/SchemaObjectProperties.vue.js.map +1 -0
- package/dist/schema/SchemaObjectProperties.vue.script.js +207 -0
- package/dist/schema/SchemaObjectProperties.vue.script.js.map +1 -0
- package/dist/schema/SchemaProperty.vue.d.ts +88 -0
- package/dist/schema/SchemaProperty.vue.d.ts.map +1 -0
- package/dist/schema/SchemaProperty.vue.js +9 -0
- package/dist/schema/SchemaProperty.vue.js.map +1 -0
- package/dist/schema/SchemaProperty.vue.script.js +456 -0
- package/dist/schema/SchemaProperty.vue.script.js.map +1 -0
- package/dist/schema/SchemaPropertyDefault.vue.d.ts +7 -0
- package/dist/schema/SchemaPropertyDefault.vue.d.ts.map +1 -0
- package/dist/schema/SchemaPropertyDefault.vue.js +9 -0
- package/dist/schema/SchemaPropertyDefault.vue.js.map +1 -0
- package/dist/schema/SchemaPropertyDefault.vue.script.js +64 -0
- package/dist/schema/SchemaPropertyDefault.vue.script.js.map +1 -0
- package/dist/schema/SchemaPropertyDetail.vue.d.ts +22 -0
- package/dist/schema/SchemaPropertyDetail.vue.d.ts.map +1 -0
- package/dist/schema/SchemaPropertyDetail.vue.js +9 -0
- package/dist/schema/SchemaPropertyDetail.vue.js.map +1 -0
- package/dist/schema/SchemaPropertyDetail.vue.script.js +25 -0
- package/dist/schema/SchemaPropertyDetail.vue.script.js.map +1 -0
- package/dist/schema/SchemaPropertyExamples.vue.d.ts +8 -0
- package/dist/schema/SchemaPropertyExamples.vue.d.ts.map +1 -0
- package/dist/schema/SchemaPropertyExamples.vue.js +9 -0
- package/dist/schema/SchemaPropertyExamples.vue.js.map +1 -0
- package/dist/schema/SchemaPropertyExamples.vue.script.js +125 -0
- package/dist/schema/SchemaPropertyExamples.vue.script.js.map +1 -0
- package/dist/schema/SchemaPropertyHeading.vue.d.ts +59 -0
- package/dist/schema/SchemaPropertyHeading.vue.d.ts.map +1 -0
- package/dist/schema/SchemaPropertyHeading.vue.js +9 -0
- package/dist/schema/SchemaPropertyHeading.vue.js.map +1 -0
- package/dist/schema/SchemaPropertyHeading.vue.script.js +270 -0
- package/dist/schema/SchemaPropertyHeading.vue.script.js.map +1 -0
- package/dist/schema/SchemaPropertyPattern.vue.d.ts +7 -0
- package/dist/schema/SchemaPropertyPattern.vue.d.ts.map +1 -0
- package/dist/schema/SchemaPropertyPattern.vue.js +9 -0
- package/dist/schema/SchemaPropertyPattern.vue.js.map +1 -0
- package/dist/schema/SchemaPropertyPattern.vue.script.js +45 -0
- package/dist/schema/SchemaPropertyPattern.vue.script.js.map +1 -0
- package/dist/schema/SchemaRailPanel.vue.d.ts +35 -0
- package/dist/schema/SchemaRailPanel.vue.d.ts.map +1 -0
- package/dist/schema/SchemaRailPanel.vue.js +7 -0
- package/dist/schema/SchemaRailPanel.vue.js.map +1 -0
- package/dist/schema/SchemaRailPanel.vue.script.js +49 -0
- package/dist/schema/SchemaRailPanel.vue.script.js.map +1 -0
- package/dist/schema/components/CopyLinkButton.vue.d.ts +27 -0
- package/dist/schema/components/CopyLinkButton.vue.d.ts.map +1 -0
- package/dist/schema/components/CopyLinkButton.vue.js +7 -0
- package/dist/schema/components/CopyLinkButton.vue.js.map +1 -0
- package/dist/schema/components/CopyLinkButton.vue.script.js +26 -0
- package/dist/schema/components/CopyLinkButton.vue.script.js.map +1 -0
- package/dist/schema/components/WithBreadcrumb.vue.d.ts +19 -0
- package/dist/schema/components/WithBreadcrumb.vue.d.ts.map +1 -0
- package/dist/schema/components/WithBreadcrumb.vue.js +7 -0
- package/dist/schema/components/WithBreadcrumb.vue.js.map +1 -0
- package/dist/schema/components/WithBreadcrumb.vue.script.js +18 -0
- package/dist/schema/components/WithBreadcrumb.vue.script.js.map +1 -0
- package/dist/schema/expansion/index.d.ts +2 -0
- package/dist/schema/expansion/index.d.ts.map +1 -0
- package/dist/schema/expansion/index.js +2 -0
- package/dist/schema/helpers/dynamic-scope.d.ts +27 -0
- package/dist/schema/helpers/dynamic-scope.d.ts.map +1 -0
- package/dist/schema/helpers/dynamic-scope.js +8 -0
- package/dist/schema/helpers/dynamic-scope.js.map +1 -0
- package/dist/schema/helpers/format-example.d.ts +5 -0
- package/dist/schema/helpers/format-example.d.ts.map +1 -0
- package/dist/schema/helpers/format-example.js +12 -0
- package/dist/schema/helpers/format-example.js.map +1 -0
- package/dist/schema/helpers/format-value.d.ts +5 -0
- package/dist/schema/helpers/format-value.d.ts.map +1 -0
- package/dist/schema/helpers/format-value.js +8 -0
- package/dist/schema/helpers/format-value.js.map +1 -0
- package/dist/schema/helpers/get-compositions-to-render.d.ts +33 -0
- package/dist/schema/helpers/get-compositions-to-render.d.ts.map +1 -0
- package/dist/schema/helpers/get-compositions-to-render.js +39 -0
- package/dist/schema/helpers/get-compositions-to-render.js.map +1 -0
- package/dist/schema/helpers/get-discriminator-values.d.ts +4 -0
- package/dist/schema/helpers/get-discriminator-values.d.ts.map +1 -0
- package/dist/schema/helpers/get-discriminator-values.js +6 -0
- package/dist/schema/helpers/get-discriminator-values.js.map +1 -0
- package/dist/schema/helpers/get-enum-values.d.ts +9 -0
- package/dist/schema/helpers/get-enum-values.d.ts.map +1 -0
- package/dist/schema/helpers/get-enum-values.js +16 -0
- package/dist/schema/helpers/get-enum-values.js.map +1 -0
- package/dist/schema/helpers/get-property-description.d.ts +9 -0
- package/dist/schema/helpers/get-property-description.d.ts.map +1 -0
- package/dist/schema/helpers/get-property-description.js +27 -0
- package/dist/schema/helpers/get-property-description.js.map +1 -0
- package/dist/schema/helpers/get-ref-name.d.ts +24 -0
- package/dist/schema/helpers/get-ref-name.d.ts.map +1 -0
- package/dist/schema/helpers/get-ref-name.js +15 -0
- package/dist/schema/helpers/get-ref-name.js.map +1 -0
- package/dist/schema/helpers/get-schema-type.d.ts +13 -0
- package/dist/schema/helpers/get-schema-type.d.ts.map +1 -0
- package/dist/schema/helpers/get-schema-type.js +24 -0
- package/dist/schema/helpers/get-schema-type.js.map +1 -0
- package/dist/schema/helpers/get-type-signature-tokens.d.ts +48 -0
- package/dist/schema/helpers/get-type-signature-tokens.d.ts.map +1 -0
- package/dist/schema/helpers/get-type-signature-tokens.js +62 -0
- package/dist/schema/helpers/get-type-signature-tokens.js.map +1 -0
- package/dist/schema/helpers/has-complex-array-items.d.ts +10 -0
- package/dist/schema/helpers/has-complex-array-items.d.ts.map +1 -0
- package/dist/schema/helpers/has-complex-array-items.js +22 -0
- package/dist/schema/helpers/has-complex-array-items.js.map +1 -0
- package/dist/schema/helpers/index.d.ts +12 -0
- package/dist/schema/helpers/index.d.ts.map +1 -0
- package/dist/schema/helpers/index.js +12 -0
- package/dist/schema/helpers/is-empty-schema-object.d.ts +8 -0
- package/dist/schema/helpers/is-empty-schema-object.d.ts.map +1 -0
- package/dist/schema/helpers/is-empty-schema-object.js +11 -0
- package/dist/schema/helpers/is-empty-schema-object.js.map +1 -0
- package/dist/schema/helpers/is-model-linkable.d.ts +15 -0
- package/dist/schema/helpers/is-model-linkable.d.ts.map +1 -0
- package/dist/schema/helpers/is-model-linkable.js +13 -0
- package/dist/schema/helpers/is-model-linkable.js.map +1 -0
- package/dist/schema/helpers/is-on-schema-target-path.d.ts +3 -0
- package/dist/schema/helpers/is-on-schema-target-path.d.ts.map +1 -0
- package/dist/schema/helpers/is-on-schema-target-path.js +6 -0
- package/dist/schema/helpers/is-on-schema-target-path.js.map +1 -0
- package/dist/schema/helpers/is-type-object.d.ts +5 -0
- package/dist/schema/helpers/is-type-object.d.ts.map +1 -0
- package/dist/schema/helpers/is-type-object.js +15 -0
- package/dist/schema/helpers/is-type-object.js.map +1 -0
- package/dist/schema/helpers/merge-all-of-schemas.d.ts +12 -0
- package/dist/schema/helpers/merge-all-of-schemas.d.ts.map +1 -0
- package/dist/schema/helpers/merge-all-of-schemas.js +151 -0
- package/dist/schema/helpers/merge-all-of-schemas.js.map +1 -0
- package/dist/schema/helpers/normalize-object-composition.d.ts +9 -0
- package/dist/schema/helpers/normalize-object-composition.d.ts.map +1 -0
- package/dist/schema/helpers/normalize-object-composition.js +29 -0
- package/dist/schema/helpers/normalize-object-composition.js.map +1 -0
- package/dist/schema/helpers/optimize-value-for-display.d.ts +13 -0
- package/dist/schema/helpers/optimize-value-for-display.d.ts.map +1 -0
- package/dist/schema/helpers/optimize-value-for-display.js +64 -0
- package/dist/schema/helpers/optimize-value-for-display.js.map +1 -0
- package/dist/schema/helpers/partition-all-of-compositions.d.ts +32 -0
- package/dist/schema/helpers/partition-all-of-compositions.d.ts.map +1 -0
- package/dist/schema/helpers/partition-all-of-compositions.js +67 -0
- package/dist/schema/helpers/partition-all-of-compositions.js.map +1 -0
- package/dist/schema/helpers/schema-composition.d.ts +4 -0
- package/dist/schema/helpers/schema-composition.d.ts.map +1 -0
- package/dist/schema/helpers/schema-composition.js +11 -0
- package/dist/schema/helpers/schema-composition.js.map +1 -0
- package/dist/schema/helpers/schema-cycle.d.ts +31 -0
- package/dist/schema/helpers/schema-cycle.d.ts.map +1 -0
- package/dist/schema/helpers/schema-cycle.js +8 -0
- package/dist/schema/helpers/schema-cycle.js.map +1 -0
- package/dist/schema/helpers/schema-expansion.d.ts +89 -0
- package/dist/schema/helpers/schema-expansion.d.ts.map +1 -0
- package/dist/schema/helpers/schema-expansion.js +93 -0
- package/dist/schema/helpers/schema-expansion.js.map +1 -0
- package/dist/schema/helpers/schema-keyboard-nav.d.ts +23 -0
- package/dist/schema/helpers/schema-keyboard-nav.d.ts.map +1 -0
- package/dist/schema/helpers/schema-keyboard-nav.js +36 -0
- package/dist/schema/helpers/schema-keyboard-nav.js.map +1 -0
- package/dist/schema/helpers/schema-name.d.ts +27 -0
- package/dist/schema/helpers/schema-name.d.ts.map +1 -0
- package/dist/schema/helpers/schema-name.js +40 -0
- package/dist/schema/helpers/schema-name.js.map +1 -0
- package/dist/schema/helpers/should-display-description.d.ts +10 -0
- package/dist/schema/helpers/should-display-description.d.ts.map +1 -0
- package/dist/schema/helpers/should-display-description.js +6 -0
- package/dist/schema/helpers/should-display-description.js.map +1 -0
- package/dist/schema/helpers/should-display-heading.d.ts +11 -0
- package/dist/schema/helpers/should-display-heading.d.ts.map +1 -0
- package/dist/schema/helpers/should-display-heading.js +6 -0
- package/dist/schema/helpers/should-display-heading.js.map +1 -0
- package/dist/schema/helpers/should-render-array-item-composition.d.ts +10 -0
- package/dist/schema/helpers/should-render-array-item-composition.d.ts.map +1 -0
- package/dist/schema/helpers/should-render-array-item-composition.js +12 -0
- package/dist/schema/helpers/should-render-array-item-composition.js.map +1 -0
- package/dist/schema/helpers/sort-property-names.d.ts +23 -0
- package/dist/schema/helpers/sort-property-names.d.ts.map +1 -0
- package/dist/schema/helpers/sort-property-names.js +55 -0
- package/dist/schema/helpers/sort-property-names.js.map +1 -0
- package/dist/schema/helpers/unwrap-for-read.d.ts +48 -0
- package/dist/schema/helpers/unwrap-for-read.d.ts.map +1 -0
- package/dist/schema/helpers/unwrap-for-read.js +8 -0
- package/dist/schema/helpers/unwrap-for-read.js.map +1 -0
- package/dist/schema/index.d.ts +12 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +11 -0
- package/dist/schema/localization/index.d.ts +59 -0
- package/dist/schema/localization/index.d.ts.map +1 -0
- package/dist/schema/localization/index.js +18 -0
- package/dist/schema/localization/index.js.map +1 -0
- package/dist/schema/localization/locales/ar.d.ts +58 -0
- package/dist/schema/localization/locales/ar.d.ts.map +1 -0
- package/dist/schema/localization/locales/ar.js +60 -0
- package/dist/schema/localization/locales/ar.js.map +1 -0
- package/dist/schema/localization/locales/de.d.ts +58 -0
- package/dist/schema/localization/locales/de.d.ts.map +1 -0
- package/dist/schema/localization/locales/de.js +60 -0
- package/dist/schema/localization/locales/de.js.map +1 -0
- package/dist/schema/localization/locales/en.d.ts +58 -0
- package/dist/schema/localization/locales/en.d.ts.map +1 -0
- package/dist/schema/localization/locales/en.js +60 -0
- package/dist/schema/localization/locales/en.js.map +1 -0
- package/dist/schema/localization/locales/es.d.ts +58 -0
- package/dist/schema/localization/locales/es.d.ts.map +1 -0
- package/dist/schema/localization/locales/es.js +60 -0
- package/dist/schema/localization/locales/es.js.map +1 -0
- package/dist/schema/localization/locales/fr.d.ts +58 -0
- package/dist/schema/localization/locales/fr.d.ts.map +1 -0
- package/dist/schema/localization/locales/fr.js +60 -0
- package/dist/schema/localization/locales/fr.js.map +1 -0
- package/dist/schema/localization/locales/pt.d.ts +58 -0
- package/dist/schema/localization/locales/pt.d.ts.map +1 -0
- package/dist/schema/localization/locales/pt.js +60 -0
- package/dist/schema/localization/locales/pt.js.map +1 -0
- package/dist/schema/localization/locales/ru.d.ts +58 -0
- package/dist/schema/localization/locales/ru.d.ts.map +1 -0
- package/dist/schema/localization/locales/ru.js +60 -0
- package/dist/schema/localization/locales/ru.js.map +1 -0
- package/dist/schema/localization/locales/zh-cn.d.ts +58 -0
- package/dist/schema/localization/locales/zh-cn.d.ts.map +1 -0
- package/dist/schema/localization/locales/zh-cn.js +60 -0
- package/dist/schema/localization/locales/zh-cn.js.map +1 -0
- package/dist/schema/localization/translations.d.ts +460 -0
- package/dist/schema/localization/translations.d.ts.map +1 -0
- package/dist/schema/localization/translations.js +23 -0
- package/dist/schema/localization/translations.js.map +1 -0
- package/dist/schema/request-body-composition-index.d.ts +8 -0
- package/dist/schema/request-body-composition-index.d.ts.map +1 -0
- package/dist/schema/request-body-composition-index.js +6 -0
- package/dist/schema/request-body-composition-index.js.map +1 -0
- package/dist/schema/schema-tree.bench.d.ts +2 -0
- package/dist/schema/schema-tree.bench.d.ts.map +1 -0
- package/dist/schema/types.d.ts +51 -0
- package/dist/schema/types.d.ts.map +1 -0
- package/dist/shared/Badge.vue.d.ts +17 -0
- package/dist/shared/Badge.vue.d.ts.map +1 -0
- package/dist/shared/Badge.vue.js +9 -0
- package/dist/shared/Badge.vue.js.map +1 -0
- package/dist/shared/Badge.vue.script.js +16 -0
- package/dist/shared/Badge.vue.script.js.map +1 -0
- package/dist/shared/ScreenReader.vue.d.ts +21 -0
- package/dist/shared/ScreenReader.vue.d.ts.map +1 -0
- package/dist/shared/ScreenReader.vue.js +7 -0
- package/dist/shared/ScreenReader.vue.js.map +1 -0
- package/dist/shared/ScreenReader.vue.script.js +19 -0
- package/dist/shared/ScreenReader.vue.script.js.map +1 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +3 -0
- package/dist/specification-extensions/ExtensionValue.vue.d.ts +13 -0
- package/dist/specification-extensions/ExtensionValue.vue.d.ts.map +1 -0
- package/dist/specification-extensions/ExtensionValue.vue.js +7 -0
- package/dist/specification-extensions/ExtensionValue.vue.js.map +1 -0
- package/dist/specification-extensions/ExtensionValue.vue.script.js +84 -0
- package/dist/specification-extensions/ExtensionValue.vue.script.js.map +1 -0
- package/dist/specification-extensions/SpecificationExtensions.vue.d.ts +9 -0
- package/dist/specification-extensions/SpecificationExtensions.vue.d.ts.map +1 -0
- package/dist/specification-extensions/SpecificationExtensions.vue.js +7 -0
- package/dist/specification-extensions/SpecificationExtensions.vue.js.map +1 -0
- package/dist/specification-extensions/SpecificationExtensions.vue.script.js +21 -0
- package/dist/specification-extensions/SpecificationExtensions.vue.script.js.map +1 -0
- package/dist/specification-extensions/index.d.ts +2 -0
- package/dist/specification-extensions/index.d.ts.map +1 -0
- package/dist/specification-extensions/index.js +2 -0
- package/dist/style.css +576 -15
- package/dist/styles/schema-tree.css +91 -0
- package/dist/styles/tailwind.config.css +22 -0
- package/dist/vue-styles.css +1 -1
- package/package.json +45 -7
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
2
|
+
/**
|
|
3
|
+
* Computes the structural type for a schema.
|
|
4
|
+
* This helper always returns type information, never schema titles or ref names.
|
|
5
|
+
*
|
|
6
|
+
* Priority order:
|
|
7
|
+
* 1. const values
|
|
8
|
+
* 2. Array types (with special handling for items)
|
|
9
|
+
* 3. type with contentEncoding
|
|
10
|
+
* 4. raw type
|
|
11
|
+
*/
|
|
12
|
+
export declare const getSchemaType: (valueOrRef: SchemaObject | ReferenceType<SchemaObject>) => string;
|
|
13
|
+
//# sourceMappingURL=get-schema-type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-schema-type.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/get-schema-type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAkC/G;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,GAAI,YAAY,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC,KAAG,MAwCtF,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { resolve as e } from "@scalar/workspace-store/resolve";
|
|
2
|
+
import { isArraySchema as t } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
|
|
3
|
+
//#region src/schema/helpers/get-schema-type.ts
|
|
4
|
+
var n = (e) => e ? `array ${e.includes(" | ") ? `(${e})` : e}[]` : "array", r = (t, r = !1) => {
|
|
5
|
+
if (!t.items) return "array";
|
|
6
|
+
let a = n(i(e.schema(t.items)));
|
|
7
|
+
return r ? a : t.nullable ? `${a} | null` : a;
|
|
8
|
+
}, i = (n) => {
|
|
9
|
+
if (!n) return "";
|
|
10
|
+
let i = e.schema(n);
|
|
11
|
+
if (i.const !== void 0) return "const";
|
|
12
|
+
if ("type" in i && Array.isArray(i.type)) {
|
|
13
|
+
if (i.type.includes("array") && i.items) {
|
|
14
|
+
let e = r(i, !0), t = i.type.filter((e) => e !== "array");
|
|
15
|
+
return t.length > 0 ? `${e} | ${t.join(" | ")}` : e;
|
|
16
|
+
}
|
|
17
|
+
return i.type.join(" | ");
|
|
18
|
+
}
|
|
19
|
+
return t(i) ? r(i, !1) : "type" in i && i.type && i.contentEncoding ? `${i.type} • ${i.contentEncoding}` : "type" in i ? i.type : "";
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as getSchemaType };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=get-schema-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-schema-type.js","names":[],"sources":["../../../src/schema/helpers/get-schema-type.ts"],"sourcesContent":["import { resolve } from '@scalar/workspace-store/resolve'\nimport type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\n\n/**\n * Formats an array type string with proper wrapping for union types.\n */\nconst formatArrayType = (itemType: string): string => {\n if (!itemType) {\n return 'array'\n }\n\n const wrappedItemType = itemType.includes(' | ') ? `(${itemType})` : itemType\n return `array ${wrappedItemType}[]`\n}\n\n/**\n * Handles array type processing for both single array types and union types containing array.\n */\nconst processArrayType = (value: Extract<SchemaObject, { type: 'array' }>, isUnionType: boolean = false): string => {\n if (!value.items) {\n return 'array'\n }\n\n const itemType = getSchemaType(resolve.schema(value.items))\n const baseType = formatArrayType(itemType)\n\n if (isUnionType) {\n return baseType\n }\n\n // Handle nullable arrays for non-union types\n return (value as any).nullable ? `${baseType} | null` : baseType\n}\n\n/**\n * Computes the structural type for a schema.\n * This helper always returns type information, never schema titles or ref names.\n *\n * Priority order:\n * 1. const values\n * 2. Array types (with special handling for items)\n * 3. type with contentEncoding\n * 4. raw type\n */\nexport const getSchemaType = (valueOrRef: SchemaObject | ReferenceType<SchemaObject>): string => {\n // Early return for falsy values\n if (!valueOrRef) {\n return ''\n }\n\n const value = resolve.schema(valueOrRef)\n\n // Handle const values first (highest priority)\n if (value.const !== undefined) {\n return 'const'\n }\n\n // Handle union types (array of types)\n if ('type' in value && Array.isArray(value.type)) {\n // Special case: union types containing 'array'\n // TODO: Correctly type array of types in SchemaObject\n if (value.type.includes('array') && (value as Extract<SchemaObject, { type: 'array' }>).items) {\n const arrayType = processArrayType(value as Extract<SchemaObject, { type: 'array' }>, true)\n const otherTypes = value.type.filter((t) => t !== 'array')\n\n return otherTypes.length > 0 ? `${arrayType} | ${otherTypes.join(' | ')}` : arrayType\n }\n\n // Regular union types\n return value.type.join(' | ')\n }\n\n // Handle single array type\n if (isArraySchema(value)) {\n return processArrayType(value, false)\n }\n\n // Handle type with content encoding\n if ('type' in value && value.type && value.contentEncoding) {\n return `${value.type} • ${value.contentEncoding}`\n }\n\n // Fallback to raw type\n return 'type' in value ? (value.type as string) : ''\n}\n"],"mappings":";;;AAOA,IAAM,KAAmB,MAClB,IAKE,SADiB,EAAS,SAAS,KAAK,IAAI,IAAI,EAAS,KAAK,EACrC,MAJvB,SAUL,KAAoB,GAAiD,IAAuB,OAAkB;CAClH,IAAI,CAAC,EAAM,OACT,OAAO;CAIT,IAAM,IAAW,EADA,EAAc,EAAQ,OAAO,EAAM,KAAK,CACxB,CAAQ;CAOzC,OALI,IACK,IAID,EAAc,WAAW,GAAG,EAAS,WAAW;AAC1D,GAYa,KAAiB,MAAmE;CAE/F,IAAI,CAAC,GACH,OAAO;CAGT,IAAM,IAAQ,EAAQ,OAAO,CAAU;CAGvC,IAAI,EAAM,UAAU,KAAA,GAClB,OAAO;CAIT,IAAI,UAAU,KAAS,MAAM,QAAQ,EAAM,IAAI,GAAG;EAGhD,IAAI,EAAM,KAAK,SAAS,OAAO,KAAM,EAAmD,OAAO;GAC7F,IAAM,IAAY,EAAiB,GAAmD,EAAI,GACpF,IAAa,EAAM,KAAK,QAAQ,MAAM,MAAM,OAAO;GAEzD,OAAO,EAAW,SAAS,IAAI,GAAG,EAAU,KAAK,EAAW,KAAK,KAAK,MAAM;EAC9E;EAGA,OAAO,EAAM,KAAK,KAAK,KAAK;CAC9B;CAaA,OAVI,EAAc,CAAK,IACd,EAAiB,GAAO,EAAK,IAIlC,UAAU,KAAS,EAAM,QAAQ,EAAM,kBAClC,GAAG,EAAM,KAAK,KAAK,EAAM,oBAI3B,UAAU,IAAS,EAAM,OAAkB;AACpD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
2
|
+
/**
|
|
3
|
+
* One run of a type signature. `word` is English describing a shape (`array of`,
|
|
4
|
+
* `or`) in the sans face; `ident` is something the reader would type (a model
|
|
5
|
+
* name, a type keyword) in the code face; `literal` is an enum or const value
|
|
6
|
+
* quoted as JSON; `punctuation` is the muted `|` between union members.
|
|
7
|
+
*/
|
|
8
|
+
type TypeSignatureToken = {
|
|
9
|
+
kind: 'word' | 'ident' | 'literal' | 'punctuation';
|
|
10
|
+
text: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Whether the signature will actually render this schema's enum values inline.
|
|
14
|
+
* SchemaProperty drops the separate value list for short enums on that
|
|
15
|
+
* assumption, so it must be checked: a `$ref` renders as the model name before
|
|
16
|
+
* reaching the enum branch, and a schema with no `type` renders no type detail,
|
|
17
|
+
* so in both cases the values would otherwise be shown nowhere.
|
|
18
|
+
*/
|
|
19
|
+
export declare const typeSignatureInlinesEnum: (valueOrRef: SchemaObject | ReferenceType<SchemaObject> | undefined, options?: {
|
|
20
|
+
hideModelNames?: boolean;
|
|
21
|
+
},
|
|
22
|
+
/** Set when recursing into an array's items, which need no `type` of their own. */
|
|
23
|
+
isItems?: boolean) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Compute the type signature of a schema as token runs: `array Planet[]` becomes
|
|
26
|
+
* `array of Planet`, where "array of" is English and `Planet` stays an
|
|
27
|
+
* identifier. Short enums render inline (`"standard" or "enterprise"`) because
|
|
28
|
+
* two values are a type, not a list worth its own rows. A `$ref` to a named
|
|
29
|
+
* model renders as the model name itself.
|
|
30
|
+
*/
|
|
31
|
+
export declare const getTypeSignatureTokens: (valueOrRef: SchemaObject | ReferenceType<SchemaObject> | undefined, options?: {
|
|
32
|
+
hideModelNames?: boolean;
|
|
33
|
+
}, depth?: number) => TypeSignatureToken[];
|
|
34
|
+
/**
|
|
35
|
+
* The tokens a row shows: the raw signature, renamed to the caller's resolved
|
|
36
|
+
* model name where the two would disagree.
|
|
37
|
+
*
|
|
38
|
+
* A `$ref` renders as the raw component key while the heading link and the
|
|
39
|
+
* models section show the target's `title`; the caller's name keeps them in
|
|
40
|
+
* agreement. Only a `$ref` may be renamed: an inline schema's
|
|
41
|
+
* single token is its real type (`integer`), not its `title`.
|
|
42
|
+
*/
|
|
43
|
+
export declare const getDisplayTypeSignatureTokens: (valueOrRef: SchemaObject | ReferenceType<SchemaObject> | undefined, options?: {
|
|
44
|
+
hideModelNames?: boolean;
|
|
45
|
+
modelName?: string | null;
|
|
46
|
+
}) => TypeSignatureToken[];
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=get-type-signature-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-type-signature-tokens.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/get-type-signature-tokens.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAI/G;;;;;GAKG;AACH,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,CAAA;IAClD,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AA+BD;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GACnC,YAAY,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC,GAAG,SAAS,EAClE,UAAS;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAO;AAC1C,mFAAmF;AACnF,iBAAe,KACd,OA2DF,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GACjC,YAAY,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC,GAAG,SAAS,EAClE,UAAS;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAO,EAC1C,cAAS,KACR,kBAAkB,EA8DpB,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B,GACxC,YAAY,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC,GAAG,SAAS,EAClE,UAAS;IAAE,cAAc,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAO,KACpE,kBAAkB,EA+CpB,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { getRefName as e } from "./get-ref-name.js";
|
|
2
|
+
import { getResolvedRef as t } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
|
+
import { resolve as n } from "@scalar/workspace-store/resolve";
|
|
4
|
+
//#region src/schema/helpers/get-type-signature-tokens.ts
|
|
5
|
+
var r = 3, i = [
|
|
6
|
+
"x-enumDescriptions",
|
|
7
|
+
"x-enum-descriptions",
|
|
8
|
+
"x-enum-varnames",
|
|
9
|
+
"x-enumNames"
|
|
10
|
+
], a = (e) => typeof e == "object" && e ? JSON.stringify(e) : typeof e == "string" ? `"${e}"` : String(e), o = (e) => ({
|
|
11
|
+
kind: "word",
|
|
12
|
+
text: e
|
|
13
|
+
}), s = (e) => ({
|
|
14
|
+
kind: "ident",
|
|
15
|
+
text: e
|
|
16
|
+
}), c = (e) => ({
|
|
17
|
+
kind: "literal",
|
|
18
|
+
text: e
|
|
19
|
+
}), l = () => ({
|
|
20
|
+
kind: "punctuation",
|
|
21
|
+
text: "|"
|
|
22
|
+
}), u = (e, t) => e.flatMap((e, n) => n === 0 ? e : [...t(), ...e]), d = (a, o = {}, s = !1) => {
|
|
23
|
+
if (!a || typeof a != "object" || "$ref" in a && typeof a.$ref == "string" && !o.hideModelNames && e(a.$ref)) return !1;
|
|
24
|
+
let c = o.hideModelNames ? n.schema(a) : t(a);
|
|
25
|
+
if (!c || typeof c != "object" || c.const !== void 0) return !1;
|
|
26
|
+
if (!i.some((e) => c[e]) && Array.isArray(c.enum) && c.enum.length > 0 && c.enum.length <= r) return !0;
|
|
27
|
+
if (!s && !("type" in c)) return !1;
|
|
28
|
+
let l = "type" in c ? c.type : void 0, u = l === "array" || Array.isArray(l) && l.includes("array"), f = "items" in c ? c.items : void 0;
|
|
29
|
+
return u && f && typeof f == "object" ? d(f, o, !0) : !1;
|
|
30
|
+
}, f = (d, f = {}, p = 0) => {
|
|
31
|
+
if (!d || typeof d != "object") return [];
|
|
32
|
+
if ("$ref" in d && typeof d.$ref == "string") {
|
|
33
|
+
let t = f.hideModelNames ? null : e(d.$ref);
|
|
34
|
+
if (t) return [s(t)];
|
|
35
|
+
}
|
|
36
|
+
let m = f.hideModelNames ? n.schema(d) : t(d);
|
|
37
|
+
return !m || typeof m != "object" ? [] : m.const === void 0 ? Array.isArray(m.enum) && m.enum.length > 0 && m.enum.length <= r && !i.some((e) => m[e]) ? u(m.enum.map((e) => [c(a(e))]), () => [o("or")]) : "type" in m && Array.isArray(m.type) ? u(m.type.map((e) => e === "array" ? h(m, f, p) : [s(String(e))]), () => [l()]) : "type" in m && m.type === "array" ? h(m, f, p) : "type" in m && m.type && m.contentEncoding ? [
|
|
38
|
+
s(String(m.type)),
|
|
39
|
+
o("•"),
|
|
40
|
+
s(m.contentEncoding)
|
|
41
|
+
] : "type" in m && m.type ? [s(String(m.type))] : [] : [c(a(m.const))];
|
|
42
|
+
}, p = (e, t = {}) => {
|
|
43
|
+
let n = f(e, { hideModelNames: t.hideModelNames }), r = t.modelName;
|
|
44
|
+
if (t.hideModelNames || !r) return n;
|
|
45
|
+
let i = (e) => !!e && typeof e == "object" && "$ref" in e;
|
|
46
|
+
if (n.length === 0 || n.length === 1 && n[0]?.text === "object" || i(e) && n.length === 1 && n[0]?.kind === "ident" && n[0]?.text !== r) return [s(r)];
|
|
47
|
+
let a = e && typeof e == "object" && "items" in e ? e.items : void 0, o = n[0], c = n[1];
|
|
48
|
+
if (i(a) && n.length === 2 && o?.kind === "word" && c?.kind === "ident" && r.endsWith("[]")) {
|
|
49
|
+
let e = r.slice(0, -2);
|
|
50
|
+
if (e && e !== c.text) return [o, s(e)];
|
|
51
|
+
}
|
|
52
|
+
return n;
|
|
53
|
+
}, m = 8, h = (e, t, n) => {
|
|
54
|
+
let r = "items" in e ? e.items : void 0;
|
|
55
|
+
if (!r || n >= m) return [s("array")];
|
|
56
|
+
let i = f(r, t, n + 1);
|
|
57
|
+
return i.length === 0 ? [s("array")] : [o("array of"), ...i];
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
export { p as getDisplayTypeSignatureTokens, f as getTypeSignatureTokens, d as typeSignatureInlinesEnum };
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=get-type-signature-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-type-signature-tokens.js","names":[],"sources":["../../../src/schema/helpers/get-type-signature-tokens.ts"],"sourcesContent":["import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\n\nimport { getRefName } from './get-ref-name'\n\n/**\n * One run of a type signature. `word` is English describing a shape (`array of`,\n * `or`) in the sans face; `ident` is something the reader would type (a model\n * name, a type keyword) in the code face; `literal` is an enum or const value\n * quoted as JSON; `punctuation` is the muted `|` between union members.\n */\ntype TypeSignatureToken = {\n kind: 'word' | 'ident' | 'literal' | 'punctuation'\n text: string\n}\n\n/** Enums up to this many values render inline in the type position. */\nconst INLINE_ENUM_LIMIT = 3\n\n/** Extensions that attach meaning to individual enum values. */\nconst ENUM_ANNOTATION_KEYS = ['x-enumDescriptions', 'x-enum-descriptions', 'x-enum-varnames', 'x-enumNames'] as const\n\n/** Quote an enum or const value the way JSON would. */\nconst formatLiteral = (value: unknown): string => {\n // Objects and arrays have no meaningful String() form (`[object Object]`), so\n // serialize them the way JSON would; primitives keep their existing rendering.\n if (value !== null && typeof value === 'object') {\n return JSON.stringify(value)\n }\n\n return typeof value === 'string' ? `\"${value}\"` : String(value)\n}\n\nconst word = (text: string): TypeSignatureToken => ({ kind: 'word', text })\nconst ident = (text: string): TypeSignatureToken => ({ kind: 'ident', text })\nconst literal = (text: string): TypeSignatureToken => ({\n kind: 'literal',\n text,\n})\nconst pipe = (): TypeSignatureToken => ({ kind: 'punctuation', text: '|' })\n\n/** Join token lists with a separator token, like Array.prototype.join. */\nconst joinTokens = (lists: TypeSignatureToken[][], separator: () => TypeSignatureToken[]): TypeSignatureToken[] =>\n lists.flatMap((tokens, index) => (index === 0 ? tokens : [...separator(), ...tokens]))\n\n/**\n * Whether the signature will actually render this schema's enum values inline.\n * SchemaProperty drops the separate value list for short enums on that\n * assumption, so it must be checked: a `$ref` renders as the model name before\n * reaching the enum branch, and a schema with no `type` renders no type detail,\n * so in both cases the values would otherwise be shown nowhere.\n */\nexport const typeSignatureInlinesEnum = (\n valueOrRef: SchemaObject | ReferenceType<SchemaObject> | undefined,\n options: { hideModelNames?: boolean } = {},\n /** Set when recursing into an array's items, which need no `type` of their own. */\n isItems = false,\n): boolean => {\n if (!valueOrRef || typeof valueOrRef !== 'object') {\n return false\n }\n\n // A named $ref returns the model name before ever reaching the enum branch.\n if (\n '$ref' in valueOrRef &&\n typeof valueOrRef.$ref === 'string' &&\n !options.hideModelNames &&\n getRefName(valueOrRef.$ref)\n ) {\n return false\n }\n\n // Display normalization can retain $ref alongside its resolved fields without\n // $ref-value. The structural view keeps those fields when names are hidden.\n const value = options.hideModelNames ? resolve.schema(valueOrRef) : getResolvedRef(valueOrRef)\n\n if (!value || typeof value !== 'object' || value.const !== undefined) {\n return false\n }\n\n // Bare literals cannot carry `x-enumDescriptions` or `x-enum-varnames`, so an\n // annotated enum keeps its value list (SchemaEnums' chip branch does the same).\n const annotated = ENUM_ANNOTATION_KEYS.some((key) => value[key])\n\n // getTypeSignatureTokens checks the schema's own enum right after const —\n // before any `type` handling — so a short, unannotated enum inlines whether or\n // not the schema has a `type`, and even when the type is `array` (e.g. a\n // schema carrying both `enum` and `type: array`). Mirror that order here, or\n // the value list renders a second copy of the same values.\n if (!annotated && Array.isArray(value.enum) && value.enum.length > 0 && value.enum.length <= INLINE_ENUM_LIMIT) {\n return true\n }\n\n // Past the enum branch, a schema with no `type` renders no signature to carry\n // the values. Items are exempt: the array signature's enum branch needs no\n // `type` of its own.\n if (!isItems && !('type' in value)) {\n return false\n }\n\n const type = 'type' in value ? value.type : undefined\n\n // `type: ['array', 'null']` takes the union branch, which still recurses into\n // items, so it inlines the item enum exactly like a plain array.\n const isArrayType = type === 'array' || (Array.isArray(type) && type.includes('array'))\n\n // An array with no own enum inlines its ITEMS' enum, resolved the same way\n // getEnumValues does, so the items must be tested here or the values render\n // twice.\n const items = 'items' in value ? value.items : undefined\n\n if (isArrayType && items && typeof items === 'object') {\n return typeSignatureInlinesEnum(items as SchemaObject, options, true)\n }\n\n return false\n}\n\n/**\n * Compute the type signature of a schema as token runs: `array Planet[]` becomes\n * `array of Planet`, where \"array of\" is English and `Planet` stays an\n * identifier. Short enums render inline (`\"standard\" or \"enterprise\"`) because\n * two values are a type, not a list worth its own rows. A `$ref` to a named\n * model renders as the model name itself.\n */\nexport const getTypeSignatureTokens = (\n valueOrRef: SchemaObject | ReferenceType<SchemaObject> | undefined,\n options: { hideModelNames?: boolean } = {},\n depth = 0,\n): TypeSignatureToken[] => {\n if (!valueOrRef || typeof valueOrRef !== 'object') {\n return []\n }\n\n // A $ref to a named model: the name is the type.\n if ('$ref' in valueOrRef && typeof valueOrRef.$ref === 'string') {\n const refName = options.hideModelNames ? null : getRefName(valueOrRef.$ref)\n\n if (refName) {\n return [ident(refName)]\n }\n }\n\n // Display normalization can retain $ref alongside its resolved fields without\n // $ref-value. The structural view keeps those fields when names are hidden.\n const value = options.hideModelNames ? resolve.schema(valueOrRef) : getResolvedRef(valueOrRef)\n\n if (!value || typeof value !== 'object') {\n return []\n }\n\n // const renders as its value, not as the word \"const\".\n if (value.const !== undefined) {\n return [literal(formatLiteral(value.const))]\n }\n\n // A short enum is the type, inline, unless its values carry descriptions or\n // names, which only the value list can show.\n if (\n Array.isArray(value.enum) &&\n value.enum.length > 0 &&\n value.enum.length <= INLINE_ENUM_LIMIT &&\n !ENUM_ANNOTATION_KEYS.some((key) => value[key])\n ) {\n return joinTokens(\n value.enum.map((entry) => [literal(formatLiteral(entry))]),\n () => [word('or')],\n )\n }\n\n // Union types: string | null with the pipe muted.\n if ('type' in value && Array.isArray(value.type)) {\n return joinTokens(\n value.type.map((entry) => (entry === 'array' ? arrayTokens(value, options, depth) : [ident(String(entry))])),\n () => [pipe()],\n )\n }\n\n if ('type' in value && value.type === 'array') {\n return arrayTokens(value, options, depth)\n }\n\n if ('type' in value && value.type && value.contentEncoding) {\n return [ident(String(value.type)), word('•'), ident(value.contentEncoding)]\n }\n\n if ('type' in value && value.type) {\n return [ident(String(value.type))]\n }\n\n return []\n}\n\n/**\n * The tokens a row shows: the raw signature, renamed to the caller's resolved\n * model name where the two would disagree.\n *\n * A `$ref` renders as the raw component key while the heading link and the\n * models section show the target's `title`; the caller's name keeps them in\n * agreement. Only a `$ref` may be renamed: an inline schema's\n * single token is its real type (`integer`), not its `title`.\n */\nexport const getDisplayTypeSignatureTokens = (\n valueOrRef: SchemaObject | ReferenceType<SchemaObject> | undefined,\n options: { hideModelNames?: boolean; modelName?: string | null } = {},\n): TypeSignatureToken[] => {\n const computedTokens = getTypeSignatureTokens(valueOrRef, { hideModelNames: options.hideModelNames })\n const modelName = options.modelName\n\n if (options.hideModelNames || !modelName) {\n return computedTokens\n }\n\n const isRef = (value: unknown): boolean => !!value && typeof value === 'object' && '$ref' in value\n\n // Nothing to render, or a bare `object` that the name describes better.\n if (computedTokens.length === 0 || (computedTokens.length === 1 && computedTokens[0]?.text === 'object')) {\n return [ident(modelName)]\n }\n\n // A direct `$ref`: the single identifier IS the raw key.\n if (\n isRef(valueOrRef) &&\n computedTokens.length === 1 &&\n computedTokens[0]?.kind === 'ident' &&\n computedTokens[0]?.text !== modelName\n ) {\n return [ident(modelName)]\n }\n\n /*\n * An array of a `$ref` keeps its \"array of\" word and renames only the item.\n * Only a caller name with a trailing `[]` describes the ITEM; the caller also\n * reports the array's OWN name here (a `$ref` to `FilterList`, an inline\n * `title` of `Planets`), and using that would claim each element is one.\n */\n const items = valueOrRef && typeof valueOrRef === 'object' && 'items' in valueOrRef ? valueOrRef.items : undefined\n\n const arrayWord = computedTokens[0]\n const itemToken = computedTokens[1]\n\n if (isRef(items) && computedTokens.length === 2 && arrayWord?.kind === 'word' && itemToken?.kind === 'ident') {\n if (modelName.endsWith('[]')) {\n const itemName = modelName.slice(0, -2)\n\n if (itemName && itemName !== itemToken.text) {\n return [arrayWord, ident(itemName)]\n }\n }\n }\n\n return computedTokens\n}\n\n/** Guard against a pathological items chain; deeper than this reads as noise anyway. */\nconst MAX_ARRAY_DEPTH = 8\n\nconst arrayTokens = (\n value: SchemaObject,\n options: { hideModelNames?: boolean },\n depth: number,\n): TypeSignatureToken[] => {\n const items = 'items' in value ? value.items : undefined\n\n if (!items || depth >= MAX_ARRAY_DEPTH) {\n return [ident('array')]\n }\n\n const itemTokens = getTypeSignatureTokens(items as SchemaObject | ReferenceType<SchemaObject>, options, depth + 1)\n\n if (itemTokens.length === 0) {\n return [ident('array')]\n }\n\n return [word('array of'), ...itemTokens]\n}\n"],"mappings":";;;;AAkBA,IAAM,IAAoB,GAGpB,IAAuB;CAAC;CAAsB;CAAuB;CAAmB;AAAa,GAGrG,KAAiB,MAGC,OAAO,KAAU,YAAnC,IACK,KAAK,UAAU,CAAK,IAGtB,OAAO,KAAU,WAAW,IAAI,EAAM,KAAK,OAAO,CAAK,GAG1D,KAAQ,OAAsC;CAAE,MAAM;CAAQ;AAAK,IACnE,KAAS,OAAsC;CAAE,MAAM;CAAS;AAAK,IACrE,KAAW,OAAsC;CACrD,MAAM;CACN;AACF,IACM,WAAkC;CAAE,MAAM;CAAe,MAAM;AAAI,IAGnE,KAAc,GAA+B,MACjD,EAAM,SAAS,GAAQ,MAAW,MAAU,IAAI,IAAS,CAAC,GAAG,EAAU,GAAG,GAAG,CAAM,CAAE,GAS1E,KACX,GACA,IAAwC,CAAC,GAEzC,IAAU,OACE;CAMZ,IALI,CAAC,KAAc,OAAO,KAAe,YAMvC,UAAU,KACV,OAAO,EAAW,QAAS,YAC3B,CAAC,EAAQ,kBACT,EAAW,EAAW,IAAI,GAE1B,OAAO;CAKT,IAAM,IAAQ,EAAQ,iBAAiB,EAAQ,OAAO,CAAU,IAAI,EAAe,CAAU;CAE7F,IAAI,CAAC,KAAS,OAAO,KAAU,YAAY,EAAM,UAAU,KAAA,GACzD,OAAO;CAYT,IAAI,CAPc,EAAqB,MAAM,MAAQ,EAAM,EAOtD,KAAa,MAAM,QAAQ,EAAM,IAAI,KAAK,EAAM,KAAK,SAAS,KAAK,EAAM,KAAK,UAAU,GAC3F,OAAO;CAMT,IAAI,CAAC,KAAW,EAAE,UAAU,IAC1B,OAAO;CAGT,IAAM,IAAO,UAAU,IAAQ,EAAM,OAAO,KAAA,GAItC,IAAc,MAAS,WAAY,MAAM,QAAQ,CAAI,KAAK,EAAK,SAAS,OAAO,GAK/E,IAAQ,WAAW,IAAQ,EAAM,QAAQ,KAAA;CAM/C,OAJI,KAAe,KAAS,OAAO,KAAU,WACpC,EAAyB,GAAuB,GAAS,EAAI,IAG/D;AACT,GASa,KACX,GACA,IAAwC,CAAC,GACzC,IAAQ,MACiB;CACzB,IAAI,CAAC,KAAc,OAAO,KAAe,UACvC,OAAO,CAAC;CAIV,IAAI,UAAU,KAAc,OAAO,EAAW,QAAS,UAAU;EAC/D,IAAM,IAAU,EAAQ,iBAAiB,OAAO,EAAW,EAAW,IAAI;EAE1E,IAAI,GACF,OAAO,CAAC,EAAM,CAAO,CAAC;CAE1B;CAIA,IAAM,IAAQ,EAAQ,iBAAiB,EAAQ,OAAO,CAAU,IAAI,EAAe,CAAU;CA6C7F,OA3CI,CAAC,KAAS,OAAO,KAAU,WACtB,CAAC,IAIN,EAAM,UAAU,KAAA,IAOlB,MAAM,QAAQ,EAAM,IAAI,KACxB,EAAM,KAAK,SAAS,KACpB,EAAM,KAAK,UAAU,KACrB,CAAC,EAAqB,MAAM,MAAQ,EAAM,EAAI,IAEvC,EACL,EAAM,KAAK,KAAK,MAAU,CAAC,EAAQ,EAAc,CAAK,CAAC,CAAC,CAAC,SACnD,CAAC,EAAK,IAAI,CAAC,CACnB,IAIE,UAAU,KAAS,MAAM,QAAQ,EAAM,IAAI,IACtC,EACL,EAAM,KAAK,KAAK,MAAW,MAAU,UAAU,EAAY,GAAO,GAAS,CAAK,IAAI,CAAC,EAAM,OAAO,CAAK,CAAC,CAAC,CAAE,SACrG,CAAC,EAAK,CAAC,CACf,IAGE,UAAU,KAAS,EAAM,SAAS,UAC7B,EAAY,GAAO,GAAS,CAAK,IAGtC,UAAU,KAAS,EAAM,QAAQ,EAAM,kBAClC;EAAC,EAAM,OAAO,EAAM,IAAI,CAAC;EAAG,EAAK,GAAG;EAAG,EAAM,EAAM,eAAe;CAAC,IAGxE,UAAU,KAAS,EAAM,OACpB,CAAC,EAAM,OAAO,EAAM,IAAI,CAAC,CAAC,IAG5B,CAAC,IArCC,CAAC,EAAQ,EAAc,EAAM,KAAK,CAAC,CAAC;AAsC/C,GAWa,KACX,GACA,IAAmE,CAAC,MAC3C;CACzB,IAAM,IAAiB,EAAuB,GAAY,EAAE,gBAAgB,EAAQ,eAAe,CAAC,GAC9F,IAAY,EAAQ;CAE1B,IAAI,EAAQ,kBAAkB,CAAC,GAC7B,OAAO;CAGT,IAAM,KAAS,MAA4B,CAAC,CAAC,KAAS,OAAO,KAAU,YAAY,UAAU;CAQ7F,IALI,EAAe,WAAW,KAAM,EAAe,WAAW,KAAK,EAAe,EAAE,EAAE,SAAS,YAM7F,EAAM,CAAU,KAChB,EAAe,WAAW,KAC1B,EAAe,EAAE,EAAE,SAAS,WAC5B,EAAe,EAAE,EAAE,SAAS,GAE5B,OAAO,CAAC,EAAM,CAAS,CAAC;CAS1B,IAAM,IAAQ,KAAc,OAAO,KAAe,YAAY,WAAW,IAAa,EAAW,QAAQ,KAAA,GAEnG,IAAY,EAAe,IAC3B,IAAY,EAAe;CAEjC,IAAI,EAAM,CAAK,KAAK,EAAe,WAAW,KAAK,GAAW,SAAS,UAAU,GAAW,SAAS,WAC/F,EAAU,SAAS,IAAI,GAAG;EAC5B,IAAM,IAAW,EAAU,MAAM,GAAG,EAAE;EAEtC,IAAI,KAAY,MAAa,EAAU,MACrC,OAAO,CAAC,GAAW,EAAM,CAAQ,CAAC;CAEtC;CAGF,OAAO;AACT,GAGM,IAAkB,GAElB,KACJ,GACA,GACA,MACyB;CACzB,IAAM,IAAQ,WAAW,IAAQ,EAAM,QAAQ,KAAA;CAE/C,IAAI,CAAC,KAAS,KAAS,GACrB,OAAO,CAAC,EAAM,OAAO,CAAC;CAGxB,IAAM,IAAa,EAAuB,GAAqD,GAAS,IAAQ,CAAC;CAMjH,OAJI,EAAW,WAAW,IACjB,CAAC,EAAM,OAAO,CAAC,IAGjB,CAAC,EAAK,UAAU,GAAG,GAAG,CAAU;AACzC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if array items have complex structure
|
|
4
|
+
* like: objects, references, discriminators, compositions, or nested arrays with complex items
|
|
5
|
+
*
|
|
6
|
+
* @param value - The schema object to check
|
|
7
|
+
* @returns true if the array has complex items, false otherwise
|
|
8
|
+
*/
|
|
9
|
+
export declare const hasComplexArrayItems: (value: SchemaObject | undefined) => boolean;
|
|
10
|
+
//# sourceMappingURL=has-complex-array-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has-complex-array-items.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/has-complex-array-items.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAkDhG;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,YAAY,GAAG,SAAS,KAAG,OA4BtE,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getResolvedRef as e } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
|
+
import { isArraySchema as t } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
|
|
3
|
+
//#region src/schema/helpers/has-complex-array-items.ts
|
|
4
|
+
var n = [
|
|
5
|
+
"allOf",
|
|
6
|
+
"oneOf",
|
|
7
|
+
"anyOf"
|
|
8
|
+
], r = (e) => "type" in e && e.type ? Array.isArray(e.type) ? e.type.includes("object") : e.type === "object" : "properties" in e, i = (e) => "$ref" in e || "discriminator" in e || n.some((t) => t in e), a = (n) => {
|
|
9
|
+
if (!t(n) || typeof n.items != "object") return !1;
|
|
10
|
+
if ("$ref" in n.items) return !0;
|
|
11
|
+
let a = e(n.items);
|
|
12
|
+
return a ? r(a) || i(a) || t(a) : !1;
|
|
13
|
+
}, o = (n) => {
|
|
14
|
+
if (!n || !t(n) || typeof n.items != "object") return !1;
|
|
15
|
+
if ("$ref" in n.items) return !0;
|
|
16
|
+
let o = e(n.items);
|
|
17
|
+
return o ? i(o) || r(o) ? !0 : a(o) : !1;
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { o as hasComplexArrayItems };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=has-complex-array-items.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has-complex-array-items.js","names":[],"sources":["../../../src/schema/helpers/has-complex-array-items.ts"],"sourcesContent":["import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\n\n/** Composition keywords that indicate complex schema structure */\nconst COMPOSITION_KEYWORDS = ['allOf', 'oneOf', 'anyOf'] as const\n\n/**\n * Checks if a schema has object type (either explicit type: 'object' or has properties)\n */\nconst isObjectType = (schema: SchemaObject): boolean => {\n // Check for explicit object type\n if ('type' in schema && schema.type) {\n if (Array.isArray(schema.type)) {\n return schema.type.includes('object')\n }\n return schema.type === 'object'\n }\n\n // Check for properties (implicit object type)\n return 'properties' in schema\n}\n\n/**\n * Checks if a schema has complex features (refs, compositions, discriminators)\n */\nconst hasComplexFeatures = (schema: SchemaObject): boolean =>\n '$ref' in schema || 'discriminator' in schema || COMPOSITION_KEYWORDS.some((keyword) => keyword in schema)\n\n/**\n * Checks if nested array items are complex\n */\nconst hasComplexNestedArrayItems = (items: SchemaObject): boolean => {\n if (!isArraySchema(items) || typeof items.items !== 'object') {\n return false\n }\n\n // Check for $ref in original nested items before resolving\n if ('$ref' in items.items) {\n return true\n }\n\n const nestedItems = getResolvedRef(items.items)\n if (!nestedItems) {\n return false\n }\n\n // Check if nested items are complex (objects, refs, compositions, or further nested arrays)\n return isObjectType(nestedItems) || hasComplexFeatures(nestedItems) || isArraySchema(nestedItems)\n}\n\n/**\n * Checks if array items have complex structure\n * like: objects, references, discriminators, compositions, or nested arrays with complex items\n *\n * @param value - The schema object to check\n * @returns true if the array has complex items, false otherwise\n */\nexport const hasComplexArrayItems = (value: SchemaObject | undefined): boolean => {\n // Early return for invalid inputs\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return false\n }\n\n // Check for $ref in original items before resolving (in case ref can't be resolved)\n if ('$ref' in value.items) {\n return true\n }\n\n const items = getResolvedRef(value.items)\n if (!items) {\n return false\n }\n\n // Check for complex features (refs, compositions, discriminators)\n if (hasComplexFeatures(items)) {\n return true\n }\n\n // Check if items are objects\n if (isObjectType(items)) {\n return true\n }\n\n // Check if items are nested arrays with complex items\n return hasComplexNestedArrayItems(items)\n}\n"],"mappings":";;;AAKA,IAAM,IAAuB;CAAC;CAAS;CAAS;AAAO,GAKjD,KAAgB,MAEhB,UAAU,KAAU,EAAO,OACzB,MAAM,QAAQ,EAAO,IAAI,IACpB,EAAO,KAAK,SAAS,QAAQ,IAE/B,EAAO,SAAS,WAIlB,gBAAgB,GAMnB,KAAsB,MAC1B,UAAU,KAAU,mBAAmB,KAAU,EAAqB,MAAM,MAAY,KAAW,CAAM,GAKrG,KAA8B,MAAiC;CACnE,IAAI,CAAC,EAAc,CAAK,KAAK,OAAO,EAAM,SAAU,UAClD,OAAO;CAIT,IAAI,UAAU,EAAM,OAClB,OAAO;CAGT,IAAM,IAAc,EAAe,EAAM,KAAK;CAM9C,OALK,IAKE,EAAa,CAAW,KAAK,EAAmB,CAAW,KAAK,EAAc,CAAW,IAJvF;AAKX,GASa,KAAwB,MAA6C;CAEhF,IAAI,CAAC,KAAS,CAAC,EAAc,CAAK,KAAK,OAAO,EAAM,SAAU,UAC5D,OAAO;CAIT,IAAI,UAAU,EAAM,OAClB,OAAO;CAGT,IAAM,IAAQ,EAAe,EAAM,KAAK;CAgBxC,OAfK,IAKD,EAAmB,CAAK,KAKxB,EAAa,CAAK,IACb,KAIF,EAA2B,CAAK,IAd9B;AAeX"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { inferDiscriminatorMappingComposition } from './get-compositions-to-render';
|
|
2
|
+
export { getRefName } from './get-ref-name';
|
|
3
|
+
export { getSchemaType } from './get-schema-type';
|
|
4
|
+
export { getTypeSignatureTokens } from './get-type-signature-tokens';
|
|
5
|
+
export { hasComplexArrayItems } from './has-complex-array-items';
|
|
6
|
+
export { isModelLinkable } from './is-model-linkable';
|
|
7
|
+
export { isTypeObject } from './is-type-object';
|
|
8
|
+
export { optimizeValueForDisplay } from './optimize-value-for-display';
|
|
9
|
+
export { handleTreeKeydown } from './schema-keyboard-nav';
|
|
10
|
+
export { getModelNameFromSchema, getModelNameWithArray } from './schema-name';
|
|
11
|
+
export { reduceNamesToObject, sortPropertyNames } from './sort-property-names';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,8BAA8B,CAAA;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getRefName as e } from "./get-ref-name.js";
|
|
2
|
+
import { hasComplexArrayItems as t } from "./has-complex-array-items.js";
|
|
3
|
+
import { inferDiscriminatorMappingComposition as n } from "./get-compositions-to-render.js";
|
|
4
|
+
import { isTypeObject as r } from "./is-type-object.js";
|
|
5
|
+
import { handleTreeKeydown as i } from "./schema-keyboard-nav.js";
|
|
6
|
+
import { getSchemaType as a } from "./get-schema-type.js";
|
|
7
|
+
import { getModelNameFromSchema as o, getModelNameWithArray as s } from "./schema-name.js";
|
|
8
|
+
import { reduceNamesToObject as c, sortPropertyNames as l } from "./sort-property-names.js";
|
|
9
|
+
import { getTypeSignatureTokens as u } from "./get-type-signature-tokens.js";
|
|
10
|
+
import { optimizeValueForDisplay as d } from "./optimize-value-for-display.js";
|
|
11
|
+
import { isModelLinkable as f } from "./is-model-linkable.js";
|
|
12
|
+
export { o as getModelNameFromSchema, s as getModelNameWithArray, e as getRefName, a as getSchemaType, u as getTypeSignatureTokens, i as handleTreeKeydown, t as hasComplexArrayItems, n as inferDiscriminatorMappingComposition, f as isModelLinkable, r as isTypeObject, d as optimizeValueForDisplay, c as reduceNamesToObject, l as sortPropertyNames };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
2
|
+
/**
|
|
3
|
+
* Determines if the given schema is an empty object schema.
|
|
4
|
+
* An empty object schema is defined as a schema with type 'object'
|
|
5
|
+
* and no defined properties, no additionalProperties (or set to false), and no patternProperties.
|
|
6
|
+
*/
|
|
7
|
+
export declare const isEmptySchemaObject: (schema: SchemaObject | undefined) => boolean;
|
|
8
|
+
//# sourceMappingURL=is-empty-schema-object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-empty-schema-object.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/is-empty-schema-object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,YAAY,GAAG,SAAS,KAAG,OAUtE,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isTypeObject as e } from "./is-type-object.js";
|
|
2
|
+
//#region src/schema/helpers/is-empty-schema-object.ts
|
|
3
|
+
var t = (t) => {
|
|
4
|
+
if (!e(t)) return !1;
|
|
5
|
+
let n = Object.keys(t.properties ?? {}).length === 0, r = t.additionalProperties === void 0 || t.additionalProperties === !1, i = Object.keys(t.patternProperties ?? {}).length === 0;
|
|
6
|
+
return n && r && i;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { t as isEmptySchemaObject };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=is-empty-schema-object.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-empty-schema-object.js","names":[],"sources":["../../../src/schema/helpers/is-empty-schema-object.ts"],"sourcesContent":["import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\n\nimport { isTypeObject } from './is-type-object'\n\n/**\n * Determines if the given schema is an empty object schema.\n * An empty object schema is defined as a schema with type 'object'\n * and no defined properties, no additionalProperties (or set to false), and no patternProperties.\n */\nexport const isEmptySchemaObject = (schema: SchemaObject | undefined): boolean => {\n if (!isTypeObject(schema)) {\n return false\n }\n\n const hasNoProperties = Object.keys(schema.properties ?? {}).length === 0\n const hasNoAdditionalProperties = schema.additionalProperties === undefined || schema.additionalProperties === false\n const hasNoPatternProperties = Object.keys(schema.patternProperties ?? {}).length === 0\n\n return hasNoProperties && hasNoAdditionalProperties && hasNoPatternProperties\n}\n"],"mappings":";;AASA,IAAa,KAAuB,MAA8C;CAChF,IAAI,CAAC,EAAa,CAAM,GACtB,OAAO;CAGT,IAAM,IAAkB,OAAO,KAAK,EAAO,cAAc,CAAC,CAAC,CAAC,CAAC,WAAW,GAClE,IAA4B,EAAO,yBAAyB,KAAA,KAAa,EAAO,yBAAyB,IACzG,IAAyB,OAAO,KAAK,EAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC,WAAW;CAEtF,OAAO,KAAmB,KAA6B;AACzD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SchemaOptions } from '../types';
|
|
2
|
+
/** The slice of schema options needed to decide whether a model name renders as a link. */
|
|
3
|
+
export type ModelLinkOptions = Pick<SchemaOptions, 'hideModels' | 'document'>;
|
|
4
|
+
/**
|
|
5
|
+
* A model name normally links to its entry in the models section. It should render as plain
|
|
6
|
+
* text when there is nothing to scroll to:
|
|
7
|
+
*
|
|
8
|
+
* - the whole models section is hidden via `hideModels`, or
|
|
9
|
+
* - the referenced schema itself is hidden via `x-internal` / `x-scalar-ignore`.
|
|
10
|
+
*
|
|
11
|
+
* The hidden check mirrors how the sidebar decides which schemas to drop (see `traverseSchemas`),
|
|
12
|
+
* so the link only shows when the model actually exists in the models section.
|
|
13
|
+
*/
|
|
14
|
+
export declare const isModelLinkable: (schemaKey: string | null | undefined, { hideModels, document }: ModelLinkOptions) => boolean;
|
|
15
|
+
//# sourceMappingURL=is-model-linkable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-model-linkable.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/is-model-linkable.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAG7C,2FAA2F;AAC3F,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,UAAU,CAAC,CAAA;AAE7E;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAC1B,WAAW,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,0BAA0B,gBAAgB,KACzC,OAUF,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { unwrapForRead as e } from "./unwrap-for-read.js";
|
|
2
|
+
import { getResolvedRef as t, mergeSiblingReferences as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
|
+
import { isHidden as r } from "@scalar/workspace-store/helpers/is-hidden";
|
|
4
|
+
//#region src/schema/helpers/is-model-linkable.ts
|
|
5
|
+
var i = (i, { hideModels: a, document: o }) => {
|
|
6
|
+
if (!i || a) return !1;
|
|
7
|
+
let s = e(o)?.components?.schemas?.[i];
|
|
8
|
+
return !r(t(s, n));
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { i as isModelLinkable };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=is-model-linkable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-model-linkable.js","names":[],"sources":["../../../src/schema/helpers/is-model-linkable.ts"],"sourcesContent":["import { getResolvedRef, mergeSiblingReferences } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { isHidden } from '@scalar/workspace-store/helpers/is-hidden'\n\nimport type { SchemaOptions } from '../types'\nimport { unwrapForRead } from './unwrap-for-read'\n\n/** The slice of schema options needed to decide whether a model name renders as a link. */\nexport type ModelLinkOptions = Pick<SchemaOptions, 'hideModels' | 'document'>\n\n/**\n * A model name normally links to its entry in the models section. It should render as plain\n * text when there is nothing to scroll to:\n *\n * - the whole models section is hidden via `hideModels`, or\n * - the referenced schema itself is hidden via `x-internal` / `x-scalar-ignore`.\n *\n * The hidden check mirrors how the sidebar decides which schemas to drop (see `traverseSchemas`),\n * so the link only shows when the model actually exists in the models section.\n */\nexport const isModelLinkable = (\n schemaKey: string | null | undefined,\n { hideModels, document }: ModelLinkOptions,\n): boolean => {\n if (!schemaKey || hideModels) {\n return false\n }\n\n // Walking down to a single component schema costs three proxied reads per row, so the\n // document is taken off the reactive and detect-changes layers first. See `unwrapForRead`.\n const schema = unwrapForRead(document)?.components?.schemas?.[schemaKey]\n\n return !isHidden(getResolvedRef(schema, mergeSiblingReferences))\n}\n"],"mappings":";;;;AAmBA,IAAa,KACX,GACA,EAAE,eAAY,kBACF;CACZ,IAAI,CAAC,KAAa,GAChB,OAAO;CAKT,IAAM,IAAS,EAAc,CAAQ,CAAC,EAAE,YAAY,UAAU;CAE9D,OAAO,CAAC,EAAS,EAAe,GAAQ,CAAsB,CAAC;AACjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-on-schema-target-path.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/is-on-schema-target-path.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,GAAG,SAAS,EAAE,QAAQ,MAAM,KAAG,OACD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-on-schema-target-path.js","names":[],"sources":["../../../src/schema/helpers/is-on-schema-target-path.ts"],"sourcesContent":["/** Match complete breadcrumb segments so `user` does not match `username`. */\nexport const isOnSchemaTargetPath = (path: string | undefined, target: string): boolean =>\n Boolean(path && target && (target === path || target.startsWith(`${path}.`)))\n"],"mappings":";AACA,IAAa,KAAwB,GAA0B,MAC7D,GAAQ,KAAQ,MAAW,MAAW,KAAQ,EAAO,WAAW,GAAG,EAAK,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-type-object.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/is-type-object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAKhG,eAAO,MAAM,YAAY,GAAI,QAAQ,OAAO,KAAG,MAAM,IAAI,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAsChG,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/schema/helpers/is-type-object.ts
|
|
2
|
+
var e = (e) => {
|
|
3
|
+
if (typeof e != "object" || !e || Array.isArray(e) || "oneOf" in e || "anyOf" in e || "allOf" in e || "not" in e) return !1;
|
|
4
|
+
let t = "type" in e;
|
|
5
|
+
if (t && Array.isArray(e.type)) return e.type.includes("object");
|
|
6
|
+
let n = t && e.type === "object";
|
|
7
|
+
if (n) return !0;
|
|
8
|
+
if (t && !n) return !1;
|
|
9
|
+
let r = "properties" in e, i = "additionalProperties" in e, a = "patternProperties" in e;
|
|
10
|
+
return r || i || a;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as isTypeObject };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=is-type-object.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-type-object.js","names":[],"sources":["../../../src/schema/helpers/is-type-object.ts"],"sourcesContent":["import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\n\n/*\n * Checks whether a JSON schema is of type object\n */\nexport const isTypeObject = (schema: unknown): schema is Extract<SchemaObject, { type: 'object' }> => {\n // null, primitive types, arrays\n if (schema === null || typeof schema !== 'object' || Array.isArray(schema)) {\n return false\n }\n\n // Check for composition keywords - if present, this should be handled by composition logic\n const hasComposition = 'oneOf' in schema || 'anyOf' in schema || 'allOf' in schema || 'not' in schema\n\n // If it has composition keywords, it should not be treated as a simple object schema\n if (hasComposition) {\n return false\n }\n\n const hasType = 'type' in schema\n\n // Handle union types (type: ['object', 'null'])\n if (hasType && Array.isArray(schema.type)) {\n return schema.type.includes('object')\n }\n\n const hasTypeObject = hasType && schema.type === 'object'\n\n // type: object\n if (hasTypeObject) {\n return true\n }\n\n // type: string, number, boolean, array, etc.\n if (hasType && !hasTypeObject) {\n return false\n }\n\n const hasProperties = 'properties' in schema\n const hasAdditionalProperties = 'additionalProperties' in schema\n const hasPatternProperties = 'patternProperties' in schema\n\n return hasProperties || hasAdditionalProperties || hasPatternProperties\n}\n"],"mappings":";AAKA,IAAa,KAAgB,MAAyE;CAUpG,IARuB,OAAO,KAAW,aAArC,KAAiD,MAAM,QAAQ,CAAM,KAKlD,WAAW,KAAU,WAAW,KAAU,WAAW,KAAU,SAAS,GAI7F,OAAO;CAGT,IAAM,IAAU,UAAU;CAG1B,IAAI,KAAW,MAAM,QAAQ,EAAO,IAAI,GACtC,OAAO,EAAO,KAAK,SAAS,QAAQ;CAGtC,IAAM,IAAgB,KAAW,EAAO,SAAS;CAGjD,IAAI,GACF,OAAO;CAIT,IAAI,KAAW,CAAC,GACd,OAAO;CAGT,IAAM,IAAgB,gBAAgB,GAChC,IAA0B,0BAA0B,GACpD,IAAuB,uBAAuB;CAEpD,OAAO,KAAiB,KAA2B;AACrD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
2
|
+
/**
|
|
3
|
+
* Merges multiple OpenAPI schema objects into a single schema object.
|
|
4
|
+
* Handles nested allOf compositions and merges properties recursively.
|
|
5
|
+
*
|
|
6
|
+
* @param schemas - Array of OpenAPI schema objects to merge
|
|
7
|
+
* @param rootSchema - Optional root schema to merge with the result
|
|
8
|
+
* @param seenRefs - `$ref` strings already being merged higher in the call stack
|
|
9
|
+
* @returns Merged schema object
|
|
10
|
+
*/
|
|
11
|
+
export declare const mergeAllOfSchemas: (schemas: SchemaObject | undefined, rootSchema?: SchemaObject, seenRefs?: Set<string>) => SchemaObject;
|
|
12
|
+
//# sourceMappingURL=merge-all-of-schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-all-of-schemas.d.ts","sourceRoot":"","sources":["../../../src/schema/helpers/merge-all-of-schemas.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAiDhG;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAC5B,SAAS,YAAY,GAAG,SAAS,EACjC,aAAa,YAAY,EACzB,WAAU,GAAG,CAAC,MAAM,CAAa,KAChC,YA2DF,CAAA"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { getResolvedRef as e } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
|
+
import { resolve as t } from "@scalar/workspace-store/resolve";
|
|
3
|
+
import { isArraySchema as n } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
|
|
4
|
+
import { isObjectEqual as r } from "@scalar/helpers/object/is-object-equal";
|
|
5
|
+
import { objectKeys as i } from "@scalar/helpers/object/object-keys";
|
|
6
|
+
//#region src/schema/helpers/merge-all-of-schemas.ts
|
|
7
|
+
var a = /* @__PURE__ */ new Set(["description", "title"]), o = [
|
|
8
|
+
"x-enum-varnames",
|
|
9
|
+
"x-enumNames",
|
|
10
|
+
"x-enum-descriptions",
|
|
11
|
+
"x-enumDescriptions"
|
|
12
|
+
], s = (e, t, n = !1) => {
|
|
13
|
+
let i = e.enum === void 0 ? t.enum?.slice() : t.enum === void 0 ? e.enum.slice() : e.enum.filter((e) => t.enum?.some((t) => r(e, t)));
|
|
14
|
+
if (i === void 0) return {};
|
|
15
|
+
let a = { enum: i };
|
|
16
|
+
for (let s of o) {
|
|
17
|
+
let o = t[s] !== void 0 && (n || e[s] === void 0) ? t : e, c = o[s], l = o.enum;
|
|
18
|
+
Array.isArray(c) ? a[s] = l === void 0 ? c : i.map((e) => c[l.findIndex((t) => r(e, t))] ?? "") : c !== void 0 && (s === "x-enum-descriptions" || s === "x-enumDescriptions") && (a[s] = c);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
}, c = (e, n, r = /* @__PURE__ */ new Set()) => {
|
|
22
|
+
if (!e?.allOf?.length || !Array.isArray(e.allOf)) return n || {};
|
|
23
|
+
let i = {}, { allOf: a, ...o } = e;
|
|
24
|
+
for (let n of e.allOf) {
|
|
25
|
+
if (!n || typeof n != "object") continue;
|
|
26
|
+
let e = t.schema(n);
|
|
27
|
+
if (e.allOf) {
|
|
28
|
+
l(i, c(e, void 0, r), !1, r);
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
l(i, e, !1, r);
|
|
32
|
+
}
|
|
33
|
+
Object.keys(o).length > 0 && l(i, o, !0, r), n && typeof n == "object" && (n.allOf ? l(i, c(n, void 0, r), !0, r) : l(i, n, !0, r));
|
|
34
|
+
let s = "discriminator" in o || !!(n && typeof n == "object" && "discriminator" in n);
|
|
35
|
+
return "discriminator" in i && !s && delete i.discriminator, i;
|
|
36
|
+
}, l = (r, o, l = !1, f = /* @__PURE__ */ new Set()) => {
|
|
37
|
+
let p = i(o);
|
|
38
|
+
if (p.length === 0) return;
|
|
39
|
+
let m = s(r, o, l);
|
|
40
|
+
for (let i of p) {
|
|
41
|
+
let s = i, p = e(o[i]);
|
|
42
|
+
if (p !== void 0) if (s === "required") Array.isArray(p) && p.length > 0 && (r.required?.length ? r.required = [.../* @__PURE__ */ new Set([...r.required, ...p])] : r.required = p.slice());
|
|
43
|
+
else if (s === "properties") p && typeof p == "object" && (r.properties ||= {}, u(r.properties, p, f));
|
|
44
|
+
else if (s === "items") {
|
|
45
|
+
let i = t.schema(p);
|
|
46
|
+
if (i) if (n(o)) if (r.items ||= {}, i.allOf) {
|
|
47
|
+
let e = c(i, void 0, f);
|
|
48
|
+
Object.assign(r.items, e);
|
|
49
|
+
} else d(e(r.items), i, f);
|
|
50
|
+
else if (i.allOf) {
|
|
51
|
+
let e = c(i, void 0, f);
|
|
52
|
+
"properties" in e && ("properties" in r || (r.properties = {}), "properties" in r && u(r.properties, e.properties, f));
|
|
53
|
+
} else "items" in r || (r.items = i);
|
|
54
|
+
} else if (i === "enum") continue;
|
|
55
|
+
else if (i === "oneOf" || i === "anyOf") Array.isArray(p) && p.length > 0 && (l || r[i] === void 0) && (r[i] = p);
|
|
56
|
+
else if (i === "allOf") continue;
|
|
57
|
+
else (l || a.has(s) || r[i] === void 0) && (r[i] = p);
|
|
58
|
+
}
|
|
59
|
+
Object.assign(r, m);
|
|
60
|
+
}, u = (e, r, i = /* @__PURE__ */ new Set()) => {
|
|
61
|
+
let a = Object.keys(r ?? {});
|
|
62
|
+
if (!(!r || !e || a.length === 0)) for (let o of a) {
|
|
63
|
+
let a = t.schema(r[o]);
|
|
64
|
+
if (!a) {
|
|
65
|
+
delete e[o];
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
if (typeof a != "object") {
|
|
69
|
+
e[o] = a;
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if (!e[o]) {
|
|
73
|
+
let s = r[o], l = s?.$ref;
|
|
74
|
+
if (s && typeof l == "string" && i.has(l)) {
|
|
75
|
+
e[o] = s;
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
let u = typeof l == "string" ? new Set(i).add(l) : i;
|
|
79
|
+
a.allOf ? e[o] = c(a, void 0, u) : n(a) && t.schema(a.items)?.allOf ? e[o] = {
|
|
80
|
+
...a,
|
|
81
|
+
items: c(t.schema(a.items), void 0, i)
|
|
82
|
+
} : r[o] && (e[o] = r[o]);
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
let l = t.schema(e[o]), d = a.$ref;
|
|
86
|
+
if (typeof d == "string" && i.has(d)) {
|
|
87
|
+
e[o] = l;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
let p = typeof d == "string" ? new Set(i).add(d) : i;
|
|
91
|
+
if (a.allOf) e[o] = c({ allOf: [l, a] }, void 0, p);
|
|
92
|
+
else if (n(a) && n(l) && a.items) {
|
|
93
|
+
let n = t.schema(l.items);
|
|
94
|
+
e[o] = {
|
|
95
|
+
...l,
|
|
96
|
+
type: "array",
|
|
97
|
+
items: n ? f(n, t.schema(a.items), p) : t.schema(a.items)
|
|
98
|
+
};
|
|
99
|
+
} else if ("properties" in l && "properties" in a) {
|
|
100
|
+
let t = {
|
|
101
|
+
...l,
|
|
102
|
+
...a
|
|
103
|
+
};
|
|
104
|
+
t.properties = { ...l.properties }, u(t.properties, a.properties, p), e[o] = t;
|
|
105
|
+
} else e[o] = {
|
|
106
|
+
...a,
|
|
107
|
+
...l,
|
|
108
|
+
...s(l, a)
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}, d = (e, n, r = /* @__PURE__ */ new Set()) => {
|
|
112
|
+
if (n.allOf || e.allOf) {
|
|
113
|
+
let i = [];
|
|
114
|
+
if (e.allOf) for (let n of e.allOf) i.push(t.schema(n));
|
|
115
|
+
else i.push(e);
|
|
116
|
+
if (n.allOf) for (let e of n.allOf) i.push(t.schema(e));
|
|
117
|
+
else i.push(n);
|
|
118
|
+
let a = c({ allOf: i }, void 0, r);
|
|
119
|
+
Object.assign(e, a);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
Object.assign(e, n), "properties" in e && "properties" in n && u(e.properties, n.properties, r);
|
|
123
|
+
}, f = (e, t, n = /* @__PURE__ */ new Set()) => {
|
|
124
|
+
let r = t.$ref;
|
|
125
|
+
return typeof r == "string" ? n.has(r) ? e : p(e, t, new Set(n).add(r)) : p(e, t, n);
|
|
126
|
+
}, p = (e, n, r = /* @__PURE__ */ new Set()) => {
|
|
127
|
+
if (e.allOf || n.allOf) {
|
|
128
|
+
let i = [];
|
|
129
|
+
if (e.allOf) for (let n of e.allOf) i.push(t.schema(n));
|
|
130
|
+
else i.push(e);
|
|
131
|
+
if (n.allOf) for (let e of n.allOf) i.push(t.schema(e));
|
|
132
|
+
else i.push(n);
|
|
133
|
+
return c({ allOf: i }, void 0, r);
|
|
134
|
+
}
|
|
135
|
+
if ("properties" in e && "properties" in n) {
|
|
136
|
+
let t = {
|
|
137
|
+
...e,
|
|
138
|
+
...n,
|
|
139
|
+
properties: { ...e.properties }
|
|
140
|
+
};
|
|
141
|
+
return u(t.properties, n.properties, r), t;
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
...e,
|
|
145
|
+
...n
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
//#endregion
|
|
149
|
+
export { c as mergeAllOfSchemas };
|
|
150
|
+
|
|
151
|
+
//# sourceMappingURL=merge-all-of-schemas.js.map
|