@scalar/blocks 0.11.1 → 0.11.3
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 +28 -0
- package/dist/code-example/components/AsyncApiCodeExample.vue.js +111 -6
- package/dist/code-example/components/AsyncApiCodeExample.vue.js.map +1 -1
- package/dist/code-example/components/AsyncApiCodeExample3.vue.js +8 -0
- package/dist/code-example/components/AsyncApiCodeExample3.vue.js.map +1 -0
- package/dist/code-example/components/CodeExample.vue.d.ts +10 -0
- package/dist/code-example/components/CodeExample.vue.d.ts.map +1 -1
- package/dist/code-example/components/CodeExample.vue.js +297 -6
- package/dist/code-example/components/CodeExample.vue.js.map +1 -1
- package/dist/code-example/components/CodeExample3.vue.js +8 -0
- package/dist/code-example/components/CodeExample3.vue.js.map +1 -0
- package/dist/code-example/components/ExamplePicker.vue.d.ts +2 -0
- package/dist/code-example/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/code-example/components/ExamplePicker.vue.js +50 -4
- package/dist/code-example/components/ExamplePicker.vue.js.map +1 -1
- package/dist/code-example/components/ExamplePicker2.vue.js +6 -0
- package/dist/code-example/components/ExamplePicker2.vue.js.map +1 -0
- package/dist/code-example/components/HttpMethod.vue.js +32 -4
- package/dist/code-example/components/HttpMethod.vue.js.map +1 -1
- package/dist/code-example/components/HttpMethod2.vue.js +6 -0
- package/dist/code-example/components/HttpMethod2.vue.js.map +1 -0
- package/dist/code-example/helpers/filter-clients-by-query.js.map +1 -1
- package/dist/code-example/helpers/find-client.js.map +1 -1
- package/dist/code-example/helpers/format-language.js.map +1 -1
- package/dist/code-example/helpers/generate-client-options.js.map +1 -1
- package/dist/code-example/helpers/generate-code-snippet.d.ts +8 -2
- package/dist/code-example/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/code-example/helpers/generate-code-snippet.js +57 -27
- package/dist/code-example/helpers/generate-code-snippet.js.map +1 -1
- package/dist/code-example/helpers/get-asyncapi-example-context.js.map +1 -1
- package/dist/code-example/helpers/get-clients.js.map +1 -1
- package/dist/code-example/helpers/get-custom-code-samples.js.map +1 -1
- package/dist/code-example/helpers/get-generated-payload-example.js.map +1 -1
- package/dist/code-example/helpers/get-message-example-content.js.map +1 -1
- package/dist/code-example/helpers/get-secrets.js.map +1 -1
- package/dist/code-example/helpers/get-snippet.d.ts +2 -2
- package/dist/code-example/helpers/get-snippet.d.ts.map +1 -1
- package/dist/code-example/helpers/get-snippet.js +7 -9
- package/dist/code-example/helpers/get-snippet.js.map +1 -1
- package/dist/code-example/helpers/operation-to-har/operation-to-har.d.ts +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 -1
- 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 +2 -2
- 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 +102 -81
- package/dist/code-example/helpers/operation-to-har/process-body.js.map +1 -1
- package/dist/code-example/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
- package/dist/code-example/helpers/operation-to-har/process-parameters.js +110 -108
- package/dist/code-example/helpers/operation-to-har/process-parameters.js.map +1 -1
- package/dist/code-example/helpers/operation-to-har/process-security-schemes.js +6 -6
- package/dist/code-example/helpers/operation-to-har/process-security-schemes.js.map +1 -1
- package/dist/code-example/helpers/operation-to-har/process-server-url.js.map +1 -1
- package/dist/code-example/index.d.ts +1 -1
- package/dist/code-example/index.d.ts.map +1 -1
- package/dist/code-example/index.js +14 -14
- package/dist/code-example/mount-asyncapi.js +1 -1
- package/dist/code-example/mount-asyncapi.js.map +1 -1
- package/dist/code-example/mount.js +1 -1
- package/dist/code-example/mount.js.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/schema/LinkButton.vue.js.map +1 -1
- package/dist/schema/RenderString.vue.js +11 -4
- package/dist/schema/RenderString.vue.js.map +1 -1
- package/dist/schema/RenderString2.vue.js +6 -0
- package/dist/schema/RenderString2.vue.js.map +1 -0
- package/dist/schema/Schema.vue.js +235 -6
- package/dist/schema/Schema.vue.js.map +1 -1
- package/dist/schema/Schema3.vue.js +8 -0
- package/dist/schema/Schema3.vue.js.map +1 -0
- package/dist/schema/SchemaCollapsedPreview.vue.js +25 -4
- package/dist/schema/SchemaCollapsedPreview.vue.js.map +1 -1
- package/dist/schema/SchemaCollapsedPreview2.vue.js +6 -0
- package/dist/schema/SchemaCollapsedPreview2.vue.js.map +1 -0
- package/dist/schema/SchemaComposition.vue.js +232 -6
- package/dist/schema/SchemaComposition.vue.js.map +1 -1
- package/dist/schema/SchemaComposition3.vue.js +8 -0
- package/dist/schema/SchemaComposition3.vue.js.map +1 -0
- package/dist/schema/SchemaEnumPropertyItem.vue.d.ts +1 -0
- package/dist/schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -1
- package/dist/schema/SchemaEnumPropertyItem.vue.js +23 -4
- package/dist/schema/SchemaEnumPropertyItem.vue.js.map +1 -1
- package/dist/schema/SchemaEnumPropertyItem2.vue.js +6 -0
- package/dist/schema/SchemaEnumPropertyItem2.vue.js.map +1 -0
- package/dist/schema/SchemaEnums.vue.d.ts.map +1 -1
- package/dist/schema/SchemaEnums.vue.js +74 -6
- package/dist/schema/SchemaEnums.vue.js.map +1 -1
- package/dist/schema/SchemaEnums3.vue.js +8 -0
- package/dist/schema/SchemaEnums3.vue.js.map +1 -0
- package/dist/schema/SchemaGlyphPuck.vue.js +27 -4
- package/dist/schema/SchemaGlyphPuck.vue.js.map +1 -1
- package/dist/schema/SchemaGlyphPuck2.vue.js +6 -0
- package/dist/schema/SchemaGlyphPuck2.vue.js.map +1 -0
- package/dist/schema/SchemaGutterToggle.vue.js +40 -4
- package/dist/schema/SchemaGutterToggle.vue.js.map +1 -1
- package/dist/schema/SchemaGutterToggle2.vue.js +6 -0
- package/dist/schema/SchemaGutterToggle2.vue.js.map +1 -0
- package/dist/schema/SchemaHeading.vue.js +32 -6
- package/dist/schema/SchemaHeading.vue.js.map +1 -1
- package/dist/schema/SchemaHeading3.vue.js +8 -0
- package/dist/schema/SchemaHeading3.vue.js.map +1 -0
- package/dist/schema/SchemaObjectExampleCodeBlock.vue.js +42 -4
- package/dist/schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -1
- package/dist/schema/SchemaObjectExampleCodeBlock2.vue.js +6 -0
- package/dist/schema/SchemaObjectExampleCodeBlock2.vue.js.map +1 -0
- package/dist/schema/SchemaObjectProperties.vue.js +213 -4
- package/dist/schema/SchemaObjectProperties.vue.js.map +1 -1
- package/dist/schema/SchemaObjectProperties2.vue.js +6 -0
- package/dist/schema/SchemaObjectProperties2.vue.js.map +1 -0
- package/dist/schema/SchemaProperty.vue.d.ts +1 -1
- package/dist/schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/schema/SchemaProperty.vue.js +472 -6
- package/dist/schema/SchemaProperty.vue.js.map +1 -1
- package/dist/schema/SchemaProperty3.vue.js +8 -0
- package/dist/schema/SchemaProperty3.vue.js.map +1 -0
- package/dist/schema/SchemaPropertyDefault.vue.js +61 -6
- package/dist/schema/SchemaPropertyDefault.vue.js.map +1 -1
- package/dist/schema/SchemaPropertyDefault3.vue.js +8 -0
- package/dist/schema/SchemaPropertyDefault3.vue.js.map +1 -0
- package/dist/schema/SchemaPropertyDetail.vue.js +22 -6
- package/dist/schema/SchemaPropertyDetail.vue.js.map +1 -1
- package/dist/schema/SchemaPropertyDetail3.vue.js +8 -0
- package/dist/schema/SchemaPropertyDetail3.vue.js.map +1 -0
- package/dist/schema/SchemaPropertyExamples.vue.js +133 -6
- package/dist/schema/SchemaPropertyExamples.vue.js.map +1 -1
- package/dist/schema/SchemaPropertyExamples3.vue.js +8 -0
- package/dist/schema/SchemaPropertyExamples3.vue.js.map +1 -0
- package/dist/schema/SchemaPropertyHeading.vue.d.ts +1 -1
- package/dist/schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/schema/SchemaPropertyHeading.vue.js +312 -6
- package/dist/schema/SchemaPropertyHeading.vue.js.map +1 -1
- package/dist/schema/SchemaPropertyHeading3.vue.js +8 -0
- package/dist/schema/SchemaPropertyHeading3.vue.js.map +1 -0
- package/dist/schema/SchemaPropertyPattern.vue.js +42 -6
- package/dist/schema/SchemaPropertyPattern.vue.js.map +1 -1
- package/dist/schema/SchemaPropertyPattern3.vue.js +8 -0
- package/dist/schema/SchemaPropertyPattern3.vue.js.map +1 -0
- package/dist/schema/SchemaRailPanel.vue.js +53 -4
- package/dist/schema/SchemaRailPanel.vue.js.map +1 -1
- package/dist/schema/SchemaRailPanel2.vue.js +6 -0
- package/dist/schema/SchemaRailPanel2.vue.js.map +1 -0
- package/dist/schema/components/CopyLinkButton.vue.d.ts +5 -0
- package/dist/schema/components/CopyLinkButton.vue.d.ts.map +1 -1
- package/dist/schema/components/CopyLinkButton.vue.js +24 -4
- package/dist/schema/components/CopyLinkButton.vue.js.map +1 -1
- package/dist/schema/components/CopyLinkButton2.vue.js +6 -0
- package/dist/schema/components/CopyLinkButton2.vue.js.map +1 -0
- package/dist/schema/components/WithBreadcrumb.vue.js +15 -4
- package/dist/schema/components/WithBreadcrumb.vue.js.map +1 -1
- package/dist/schema/components/WithBreadcrumb2.vue.js +6 -0
- package/dist/schema/components/WithBreadcrumb2.vue.js.map +1 -0
- package/dist/schema/helpers/dynamic-scope.js.map +1 -1
- package/dist/schema/helpers/format-example.js.map +1 -1
- package/dist/schema/helpers/format-structured-value.d.ts +3 -0
- package/dist/schema/helpers/format-structured-value.d.ts.map +1 -0
- package/dist/schema/helpers/format-structured-value.js +6 -0
- package/dist/schema/helpers/format-structured-value.js.map +1 -0
- package/dist/schema/helpers/format-value.js.map +1 -1
- package/dist/schema/helpers/get-compositions-to-render.js.map +1 -1
- package/dist/schema/helpers/get-discriminator-values.js.map +1 -1
- package/dist/schema/helpers/get-enum-values.js.map +1 -1
- package/dist/schema/helpers/get-property-description.js.map +1 -1
- package/dist/schema/helpers/get-ref-name.js.map +1 -1
- package/dist/schema/helpers/get-rendered-example.js.map +1 -1
- package/dist/schema/helpers/get-schema-type.js.map +1 -1
- package/dist/schema/helpers/get-type-signature-tokens.d.ts.map +1 -1
- package/dist/schema/helpers/get-type-signature-tokens.js +37 -36
- package/dist/schema/helpers/get-type-signature-tokens.js.map +1 -1
- package/dist/schema/helpers/has-complex-array-items.js.map +1 -1
- package/dist/schema/helpers/is-empty-schema-object.js.map +1 -1
- package/dist/schema/helpers/is-model-linkable.js.map +1 -1
- package/dist/schema/helpers/is-on-schema-target-path.js.map +1 -1
- package/dist/schema/helpers/is-type-object.js.map +1 -1
- package/dist/schema/helpers/merge-all-of-schemas.js.map +1 -1
- package/dist/schema/helpers/normalize-object-composition.js.map +1 -1
- package/dist/schema/helpers/optimize-value-for-display.js.map +1 -1
- package/dist/schema/helpers/partition-all-of-compositions.js.map +1 -1
- package/dist/schema/helpers/schema-cycle.js.map +1 -1
- package/dist/schema/helpers/schema-expansion.js.map +1 -1
- package/dist/schema/helpers/schema-keyboard-nav.js.map +1 -1
- package/dist/schema/helpers/schema-name.js.map +1 -1
- package/dist/schema/helpers/should-display-description.js.map +1 -1
- package/dist/schema/helpers/should-display-heading.js.map +1 -1
- package/dist/schema/helpers/should-render-array-item-composition.js.map +1 -1
- package/dist/schema/helpers/sort-property-names.js.map +1 -1
- package/dist/schema/helpers/unwrap-for-read.js.map +1 -1
- package/dist/schema/index.js +8 -8
- package/dist/schema/localization/index.d.ts +1 -1
- package/dist/schema/localization/index.js.map +1 -1
- package/dist/schema/localization/translations.js.map +1 -1
- package/dist/shared/Badge.vue.js +13 -6
- package/dist/shared/Badge.vue.js.map +1 -1
- package/dist/shared/Badge3.vue.js +8 -0
- package/dist/shared/Badge3.vue.js.map +1 -0
- package/dist/shared/ExternalDocs.vue.js +43 -4
- package/dist/shared/ExternalDocs.vue.js.map +1 -1
- package/dist/shared/ExternalDocs2.vue.js +6 -0
- package/dist/shared/ExternalDocs2.vue.js.map +1 -0
- package/dist/shared/ExternalExampleStatus.vue.d.ts +12 -0
- package/dist/shared/ExternalExampleStatus.vue.d.ts.map +1 -0
- package/dist/shared/ExternalExampleStatus.vue.js +26 -0
- package/dist/shared/ExternalExampleStatus.vue.js.map +1 -0
- package/dist/shared/ExternalExampleStatus2.vue.js +6 -0
- package/dist/shared/ExternalExampleStatus2.vue.js.map +1 -0
- package/dist/shared/ScreenReader.vue.js +16 -4
- package/dist/shared/ScreenReader.vue.js.map +1 -1
- package/dist/shared/ScreenReader2.vue.js +6 -0
- package/dist/shared/ScreenReader2.vue.js.map +1 -0
- package/dist/shared/external-example-localization/index.d.ts +4 -0
- package/dist/shared/external-example-localization/index.d.ts.map +1 -0
- package/dist/shared/external-example-localization/index.js +17 -0
- package/dist/shared/external-example-localization/index.js.map +1 -0
- package/dist/shared/external-example-localization/locales/ar.d.ts +8 -0
- package/dist/shared/external-example-localization/locales/ar.d.ts.map +1 -0
- package/dist/shared/external-example-localization/locales/ar.js +9 -0
- package/dist/shared/external-example-localization/locales/ar.js.map +1 -0
- package/dist/shared/external-example-localization/locales/de.d.ts +8 -0
- package/dist/shared/external-example-localization/locales/de.d.ts.map +1 -0
- package/dist/shared/external-example-localization/locales/de.js +9 -0
- package/dist/shared/external-example-localization/locales/de.js.map +1 -0
- package/dist/shared/external-example-localization/locales/en.d.ts +8 -0
- package/dist/shared/external-example-localization/locales/en.d.ts.map +1 -0
- package/dist/shared/external-example-localization/locales/en.js +9 -0
- package/dist/shared/external-example-localization/locales/en.js.map +1 -0
- package/dist/shared/external-example-localization/locales/es.d.ts +8 -0
- package/dist/shared/external-example-localization/locales/es.d.ts.map +1 -0
- package/dist/shared/external-example-localization/locales/es.js +9 -0
- package/dist/shared/external-example-localization/locales/es.js.map +1 -0
- package/dist/shared/external-example-localization/locales/fr.d.ts +8 -0
- package/dist/shared/external-example-localization/locales/fr.d.ts.map +1 -0
- package/dist/shared/external-example-localization/locales/fr.js +9 -0
- package/dist/shared/external-example-localization/locales/fr.js.map +1 -0
- package/dist/shared/external-example-localization/locales/pt.d.ts +8 -0
- package/dist/shared/external-example-localization/locales/pt.d.ts.map +1 -0
- package/dist/shared/external-example-localization/locales/pt.js +9 -0
- package/dist/shared/external-example-localization/locales/pt.js.map +1 -0
- package/dist/shared/external-example-localization/locales/ru.d.ts +8 -0
- package/dist/shared/external-example-localization/locales/ru.d.ts.map +1 -0
- package/dist/shared/external-example-localization/locales/ru.js +9 -0
- package/dist/shared/external-example-localization/locales/ru.js.map +1 -0
- package/dist/shared/external-example-localization/locales/zh-cn.d.ts +8 -0
- package/dist/shared/external-example-localization/locales/zh-cn.d.ts.map +1 -0
- package/dist/shared/external-example-localization/locales/zh-cn.js +9 -0
- package/dist/shared/external-example-localization/locales/zh-cn.js.map +1 -0
- package/dist/shared/external-example-localization/locales/zh-tw.d.ts +8 -0
- package/dist/shared/external-example-localization/locales/zh-tw.d.ts.map +1 -0
- package/dist/shared/external-example-localization/locales/zh-tw.js +9 -0
- package/dist/shared/external-example-localization/locales/zh-tw.js.map +1 -0
- package/dist/shared/external-example-localization/translations.d.ts +67 -0
- package/dist/shared/external-example-localization/translations.d.ts.map +1 -0
- package/dist/shared/external-example-localization/translations.js +24 -0
- package/dist/shared/external-example-localization/translations.js.map +1 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +6 -4
- package/dist/specification-extensions/ExtensionValue.vue.js +89 -4
- package/dist/specification-extensions/ExtensionValue.vue.js.map +1 -1
- package/dist/specification-extensions/ExtensionValue2.vue.js +6 -0
- package/dist/specification-extensions/ExtensionValue2.vue.js.map +1 -0
- package/dist/specification-extensions/SpecificationExtensions.vue.js +76 -4
- package/dist/specification-extensions/SpecificationExtensions.vue.js.map +1 -1
- package/dist/specification-extensions/SpecificationExtensions2.vue.js +6 -0
- package/dist/specification-extensions/SpecificationExtensions2.vue.js.map +1 -0
- package/dist/specification-extensions/index.js +1 -1
- package/dist/style.css +13 -9
- package/dist/vue-styles.css +1 -1
- package/package.json +18 -18
- package/dist/code-example/components/AsyncApiCodeExample.vue_vue_type_script_setup_true_lang.js +0 -113
- package/dist/code-example/components/AsyncApiCodeExample.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/code-example/components/CodeExample.vue_vue_type_script_setup_true_lang.js +0 -275
- package/dist/code-example/components/CodeExample.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/code-example/components/ExamplePicker.vue_vue_type_script_setup_true_lang.js +0 -48
- package/dist/code-example/components/ExamplePicker.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/code-example/components/HttpMethod.vue_vue_type_script_setup_true_lang.js +0 -34
- package/dist/code-example/components/HttpMethod.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/RenderString.vue_vue_type_script_setup_true_lang.js +0 -13
- package/dist/schema/RenderString.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/Schema.vue_vue_type_script_setup_true_lang.js +0 -237
- package/dist/schema/Schema.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaCollapsedPreview.vue_vue_type_script_setup_true_lang.js +0 -27
- package/dist/schema/SchemaCollapsedPreview.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaComposition.vue_vue_type_script_setup_true_lang.js +0 -234
- package/dist/schema/SchemaComposition.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaEnumPropertyItem.vue_vue_type_script_setup_true_lang.js +0 -23
- package/dist/schema/SchemaEnumPropertyItem.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaEnums.vue_vue_type_script_setup_true_lang.js +0 -77
- package/dist/schema/SchemaEnums.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaGlyphPuck.vue_vue_type_script_setup_true_lang.js +0 -29
- package/dist/schema/SchemaGlyphPuck.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaGutterToggle.vue_vue_type_script_setup_true_lang.js +0 -42
- package/dist/schema/SchemaGutterToggle.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaHeading.vue_vue_type_script_setup_true_lang.js +0 -34
- package/dist/schema/SchemaHeading.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaObjectExampleCodeBlock.vue_vue_type_script_setup_true_lang.js +0 -44
- package/dist/schema/SchemaObjectExampleCodeBlock.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js +0 -215
- package/dist/schema/SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaProperty.vue_vue_type_script_setup_true_lang.js +0 -469
- package/dist/schema/SchemaProperty.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaPropertyDefault.vue_vue_type_script_setup_true_lang.js +0 -63
- package/dist/schema/SchemaPropertyDefault.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaPropertyDetail.vue_vue_type_script_setup_true_lang.js +0 -24
- package/dist/schema/SchemaPropertyDetail.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaPropertyExamples.vue_vue_type_script_setup_true_lang.js +0 -135
- package/dist/schema/SchemaPropertyExamples.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js +0 -314
- package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaPropertyPattern.vue_vue_type_script_setup_true_lang.js +0 -44
- package/dist/schema/SchemaPropertyPattern.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/SchemaRailPanel.vue_vue_type_script_setup_true_lang.js +0 -55
- package/dist/schema/SchemaRailPanel.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/components/CopyLinkButton.vue_vue_type_script_setup_true_lang.js +0 -25
- package/dist/schema/components/CopyLinkButton.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/schema/components/WithBreadcrumb.vue_vue_type_script_setup_true_lang.js +0 -17
- package/dist/schema/components/WithBreadcrumb.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/shared/Badge.vue_vue_type_script_setup_true_lang.js +0 -15
- package/dist/shared/Badge.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/shared/ExternalDocs.vue_vue_type_script_setup_true_lang.js +0 -45
- package/dist/shared/ExternalDocs.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/shared/ScreenReader.vue_vue_type_script_setup_true_lang.js +0 -18
- package/dist/shared/ScreenReader.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js +0 -91
- package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js +0 -78
- package/dist/specification-extensions/SpecificationExtensions.vue_vue_type_script_setup_true_lang.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js","names":["$slots","_openBlock","_createElementBlock","_Fragment","_renderList","_createBlock","Badge","_normalizeClass","_withCtx","_createTextVNode","_toDisplayString","_renderSlot","_unref","_createElementVNode","SchemaPropertyDetail","_createVNode","RenderString","SchemaPropertyDefault","SchemaPropertyPattern","SchemaPropertyExamples","Badge_default","RenderString_default","SchemaPropertyDefault_default","SchemaPropertyDetail_default","SchemaPropertyExamples_default","SchemaPropertyPattern_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","badgeClass","SchemaPropertyHeading_vue_vue_type_script_setup_true_lang_default","props","__props","useLocalization","fieldNumber","computed","protobufFieldNumber","recursiveTarget","schemaRecursiveTarget","presence","protobufPresence","presenceDescription","valueRef","toRef","positionedBadges","entries","badge","constValue","schema","isArraySchema","items","resolve","isDefined","getLeafConstraints","properties","isStringSchema","translate","isNumberSchema","validationProperties","modelLink","getModelNameWithArray","modelLinkable","isModelLinkable","signatureTokens","getDisplayTypeSignatureTokens","shouldShowType","propertyNamesDetail","parts","getSchemaType","detail","exampleValue","itemsSchema","hasExampleContent","examples","patternValue","openBlock","createElementBlock","Fragment","renderList","createBlock","index","normalizeClass","withCtx","createTextVNode","toDisplayString","_ctx","renderSlot","createCommentVNode","unref","ScalarTooltip","createElementVNode","_cache","token","property","createSlots","createVNode"],"sources":["../../src/schema/SchemaPropertyHeading.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarTooltip } from '@scalar/components/tooltip'\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { XBadge } from '@scalar/workspace-store/schemas/extensions/operation'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n isArraySchema,\n isNumberSchema,\n isStringSchema,\n} from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\nimport { computed, toRef } from 'vue'\n\nimport Badge from '../shared/Badge.vue'\nimport { getSchemaType } from './helpers/get-schema-type'\nimport { getDisplayTypeSignatureTokens } from './helpers/get-type-signature-tokens'\nimport {\n isModelLinkable,\n type ModelLinkOptions,\n} from './helpers/is-model-linkable'\nimport { getModelNameWithArray } from './helpers/schema-name'\nimport { useLocalization } from './localization'\nimport {\n protobufFieldNumber,\n protobufPresence,\n type ProtobufSchema,\n} from './protobuf-metadata'\nimport {\n schemaRecursiveTarget,\n type RecursiveSchema,\n} from './recursive-metadata'\nimport RenderString from './RenderString.vue'\nimport SchemaPropertyDefault from './SchemaPropertyDefault.vue'\nimport SchemaPropertyDetail from './SchemaPropertyDetail.vue'\nimport SchemaPropertyExamples from './SchemaPropertyExamples.vue'\nimport SchemaPropertyPattern from './SchemaPropertyPattern.vue'\n\nconst props = withDefaults(\n defineProps<{\n value: SchemaObject | undefined\n badges?: XBadge[]\n enum?: boolean\n isDiscriminator?: boolean\n /** Effective AsyncAPI variant value, separate from const/enum constraints. */\n discriminatorValue?: string\n required?: boolean\n additional?: boolean\n withExamples?: boolean\n hideModelNames?: boolean\n /**\n * Config for deciding whether a model name links to the models section. When the section or\n * the referenced model is hidden there is nothing to scroll to, so the name renders as plain text.\n */\n modelLinkOptions?: ModelLinkOptions\n /** When the schema was resolved from a $ref, pass the ref name so it displays as e.g. \"Data\" instead of \"object\". */\n modelName?: string | null\n /** Resolved propertyNames schema, used to surface key constraints like `format` for additional properties. */\n propertyNames?: SchemaObject\n eventBus?: WorkspaceEventBus | null\n /**\n * The row's name is a stand-in for keys the caller chooses\n * (`additionalProperties`) or keys matching a regex (`patternProperties`),\n * not a literal property. The heading says so in the signature line, where\n * the tree already describes shapes, instead of styling the name itself.\n */\n keyKind?: 'additional' | 'pattern'\n /**\n * The name of the schema this row loops back to. A cut cycle is a leaf, so\n * the signature line says why it does not expand; the model link beside it\n * already names the schema the loop returns to.\n */\n recursiveTo?: string\n }>(),\n {\n isDiscriminator: false,\n required: false,\n withExamples: true,\n hideModelNames: false,\n eventBus: null,\n },\n)\nconst { translate } = useLocalization()\n\n// Convert to reactive refs for composables\nconst fieldNumber = computed(\n () => (props.value as ProtobufSchema | undefined)?.[protobufFieldNumber],\n)\n\nconst recursiveTarget = computed(\n () =>\n props.recursiveTo ??\n (props.value as RecursiveSchema | undefined)?.[schemaRecursiveTarget],\n)\n\nconst presence = computed(\n () => (props.value as ProtobufSchema | undefined)?.[protobufPresence],\n)\nconst presenceDescription = computed(() =>\n presence.value === 'explicit'\n ? 'Explicit presence: Protobuf distinguishes an unset field from one set to its default value.'\n : 'Implicit presence: Protobuf does not distinguish an unset field from one set to its default value.',\n)\n\nconst valueRef = toRef(props, 'value')\nconst badgeClass = 'min-w-0 wrap-anywhere whitespace-normal'\n\nconst positionedBadges = computed<\n { before: XBadge[]; after: XBadge[] } | undefined\n>(() => {\n const entries = props.badges\n if (!entries) {\n return undefined\n }\n\n return {\n before: entries.filter((badge) => badge.position === 'before'),\n after: entries.filter((badge) => badge.position !== 'before'),\n }\n})\n\nconst constValue = computed(() => {\n if (!valueRef.value) {\n return undefined\n }\n\n const schema = valueRef.value\n\n // Direct const value\n if (schema.const !== undefined) {\n return schema.const\n }\n\n // Single-item enum acts as const\n if (schema.enum?.length === 1) {\n return schema.enum[0]\n }\n\n // Check items for const values (for arrays)\n if (isArraySchema(schema) && schema.items) {\n const items = resolve.schema(schema.items)\n\n if (isDefined(items.const)) {\n return items.const\n }\n\n if (items.enum?.length === 1) {\n return items.enum[0]\n }\n }\n\n return undefined\n})\n\ntype ValidationProperty = {\n key: string\n value: string | number\n prefix?: string\n code?: boolean\n truncate?: boolean\n}\n\n/**\n * Constraints that live on a leaf (string or number) schema: length, pattern,\n * format and numeric ranges. Extracted so they can be surfaced for a primitive\n * schema as well as for a primitive array's items, which are not rendered on\n * their own. See https://github.com/scalar/scalar/issues/9690\n */\nconst getLeafConstraints = (schema: SchemaObject) => {\n const properties: ValidationProperty[] = []\n\n if (isStringSchema(schema)) {\n if (isDefined(schema.minLength)) {\n properties.push({\n key: 'min-length',\n prefix: `${translate('schema.minLength')}: `,\n value: schema.minLength,\n })\n }\n\n if (isDefined(schema.maxLength)) {\n properties.push({\n key: 'max-length',\n prefix: `${translate('schema.maxLength')}: `,\n value: schema.maxLength,\n })\n }\n\n // pattern is rendered via SchemaPropertyPattern (hover dropdown), skip here\n }\n\n if ((isStringSchema(schema) || isNumberSchema(schema)) && schema.format) {\n properties.push({\n key: 'format',\n value: schema.format,\n truncate: true,\n })\n }\n\n if (isNumberSchema(schema)) {\n if (isDefined(schema.exclusiveMinimum)) {\n properties.push({\n key: 'exclusive-minimum',\n prefix: `${translate('schema.greaterThan')}: `,\n value: schema.exclusiveMinimum,\n })\n }\n\n if (isDefined(schema.minimum)) {\n properties.push({\n key: 'minimum',\n prefix: `${translate('schema.min')}: `,\n value: schema.minimum,\n })\n }\n\n if (isDefined(schema.exclusiveMaximum)) {\n properties.push({\n key: 'exclusive-maximum',\n prefix: `${translate('schema.lessThan')}: `,\n value: schema.exclusiveMaximum,\n })\n }\n\n if (isDefined(schema.maximum)) {\n properties.push({\n key: 'maximum',\n prefix: `${translate('schema.max')}: `,\n value: schema.maximum,\n })\n }\n\n if (isDefined(schema.multipleOf)) {\n properties.push({\n key: 'multiple-of',\n prefix: `${translate('schema.multipleOf')}: `,\n value: schema.multipleOf,\n })\n }\n }\n\n return properties\n}\n\nconst validationProperties = computed(() => {\n if (!valueRef.value) {\n return []\n }\n\n const schema = valueRef.value\n const properties: ValidationProperty[] = []\n\n // Array validation properties\n if (isArraySchema(schema)) {\n if (isDefined(schema.minItems) || isDefined(schema.maxItems)) {\n properties.push({\n key: 'array-range',\n value: `${schema.minItems ?? ''}…${schema.maxItems ?? ''}`,\n })\n }\n\n // Unique items\n if (schema.uniqueItems) {\n properties.push({\n key: 'unique-items',\n value: `${translate('schema.unique')}!`,\n })\n }\n }\n\n properties.push(...getLeafConstraints(schema))\n\n // Primitive array items carry their own constraints (e.g. an array of `uuid`\n // strings) but are not rendered separately, so surface them here.\n if (isArraySchema(schema) && schema.items) {\n properties.push(...getLeafConstraints(resolve.schema(schema.items)))\n }\n\n return properties\n})\n\n/** Link data for navigating to the referenced model in the sidebar. */\nconst modelLink = computed(() => {\n if (!props.value) {\n return null\n }\n\n if (props.hideModelNames) {\n return null\n }\n\n if (props.modelName) {\n return { schemaKey: props.modelName, label: props.modelName }\n }\n\n return getModelNameWithArray(props.value)\n})\n\n/** Whether the model name links to the models section, or renders as plain text. */\nconst modelLinkable = computed(() =>\n isModelLinkable(modelLink.value?.schemaKey, props.modelLinkOptions ?? {}),\n)\n\n/**\n * The type as a run of tokens rather than a single string — identifiers in\n * the code face, English words like `array of` in the sans face, and a muted\n * `|` so `string | null` reads as one type with an alternative.\n *\n * The token run and the screen-reader label are written straight into the\n * template instead of being their own components: the tree mounts one per\n * typed row, and a component instance costs more to create than the span it\n * renders. On a flat object the type cells would be most of the instance\n * count. The linked and the plain copy of the token markup below must stay\n * identical.\n */\nconst signatureTokens = computed(() =>\n getDisplayTypeSignatureTokens(props.value, {\n hideModelNames: props.hideModelNames,\n modelName: modelLink.value?.label,\n }),\n)\n\n/** Check if we should show the type information */\nconst shouldShowType = computed(() => {\n if (!props.value || !('type' in props.value)) {\n return false\n }\n\n // Always show type for arrays, even when items have const values\n if (props.value.type === 'array') {\n return true\n }\n\n // For non-arrays, only show if no const value at the schema level\n return !constValue.value\n})\n\n/**\n * Type and format of the property keys, derived from the propertyNames schema.\n *\n * For a map keyed by UUIDs this renders e.g. \"string · uuid\" so the key\n * constraints are not lost. Returns undefined when there is nothing to show.\n */\nconst propertyNamesDetail = computed(() => {\n const schema = props.propertyNames\n if (!schema) {\n return undefined\n }\n\n const parts = [getSchemaType(schema)]\n if ('format' in schema && typeof schema.format === 'string') {\n parts.push(schema.format)\n }\n\n const detail = parts.filter(Boolean).join(' · ')\n return detail.length > 0 ? detail : undefined\n})\n\nconst exampleValue = computed(() => {\n // Treat only `undefined` as \"not set\" — `null` is a valid example value on a nullable schema.\n if (\n props.value &&\n 'example' in props.value &&\n props.value.example !== undefined\n ) {\n return props.value.example\n }\n\n // An array's own examples take precedence over the fallback from its items.\n if (\n props.value &&\n isArraySchema(props.value) &&\n !props.value.examples?.length\n ) {\n const itemsSchema = resolve.schema(props.value.items)\n if (\n itemsSchema &&\n 'example' in itemsSchema &&\n itemsSchema.example !== undefined\n ) {\n return itemsSchema.example\n }\n }\n\n return undefined\n})\n\n/**\n * Whether the examples chip has anything to render.\n *\n * `SchemaPropertyExamples` already renders nothing without an example, but it\n * still mounts, and mounting is what installs its popup's window-level click\n * and keydown listeners. `withExamples` defaults to true, so without this gate\n * every property row on the page — including a plain `{ type: 'string' }` —\n * pays for a popup it never opens. Mirrors the component's own two branches.\n */\nconst hasExampleContent = computed((): boolean => {\n if (exampleValue.value !== undefined) {\n return true\n }\n\n const examples = props.value?.examples\n\n return (\n !!examples &&\n typeof examples === 'object' &&\n Object.keys(examples).length > 0\n )\n})\n\n/**\n * The regex `pattern` to surface via the hover dropdown. It lives on a string\n * schema, or on the items of a primitive array (which is not rendered on its\n * own, so its constraints are surfaced on the array heading — see\n * https://github.com/scalar/scalar/issues/9690).\n */\nconst patternValue = computed(() => {\n const schema = valueRef.value\n if (!schema) {\n return undefined\n }\n\n if (isStringSchema(schema) && schema.pattern) {\n return schema.pattern\n }\n\n if (isArraySchema(schema) && schema.items) {\n const items = resolve.schema(schema.items)\n if (isStringSchema(items) && items.pattern) {\n return items.pattern\n }\n }\n\n return undefined\n})\n</script>\n<template>\n <div\n class=\"property-heading [&>.property-detail:has(+.property-detail)]:mr-0\">\n <!-- `:has(+.property-detail)`: only a detail FOLLOWED BY another detail\n drops its right margin, because the `·` separator supplies the gap\n there. Not `:not(:last-of-type)`, which matches by element type: the\n collapsed preview and the trailing copy-link are spans as well, so it\n would strip the margin from the final detail and glue \"Addressrequired\"\n together on a collapsed row. -->\n <Badge\n v-for=\"(badge, index) in positionedBadges?.before\"\n :key=\"index\"\n :class=\"badgeClass\"\n :color=\"badge.color\">\n {{ badge.name }}\n </Badge>\n <div\n v-if=\"$slots.name\"\n class=\"property-name\"\n :class=\"{ deprecated: props.value?.deprecated }\">\n <slot name=\"name\" />\n </div>\n <ScalarTooltip\n v-if=\"fieldNumber !== undefined\"\n content=\"Protobuf field number\">\n <span class=\"text-c-3 font-code mr-2 text-xs\">\n <span aria-hidden=\"true\">#{{ fieldNumber }}</span>\n <span class=\"sr-only\">Protobuf field number: {{ fieldNumber }}</span>\n </span>\n </ScalarTooltip>\n <div\n v-if=\"props.isDiscriminator\"\n class=\"property-discriminator\">\n {{ translate('schema.discriminator') }}\n </div>\n <template v-if=\"props.value\">\n <!-- A map key reads `additionalProperty · string`: the keyword leads the\n detail list in the accent colour, like a type word, so the name\n above it can look like every other name. -->\n <SchemaPropertyDetail\n v-if=\"props.keyKind\"\n class=\"property-key-kind\">\n <span class=\"font-code text-c-accent\">{{\n props.keyKind === 'pattern' ? 'patternProperty' : 'additionalProperty'\n }}</span>\n </SchemaPropertyDetail>\n <!-- Type information -->\n <SchemaPropertyDetail\n v-if=\"shouldShowType\"\n truncate>\n <!-- The type is a token run (`array of Planet`) and a $ref link IS the\n type, not an appended `· Account` -->\n <!-- Written across lines on purpose: Vue drops whitespace-only text\n between two elements, so a single-line label would read\n `Type:string`. -->\n <span class=\"screenreader-only\"> {{ translate('schema.type') }}: </span>\n <button\n v-if=\"props.eventBus && modelLink?.schemaKey && modelLinkable\"\n class=\"text-c-2 hover:text-c-1 underline\"\n type=\"button\"\n @click=\"\n props.eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n <span\n v-if=\"signatureTokens.length\"\n class=\"property-type-signature text-c-2 text-(length:--scalar-mini)\">\n <template\n v-for=\"(token, index) in signatureTokens\"\n :key=\"index\">\n {{ index > 0 ? ' ' : ''\n }}<span\n class=\"property-type-token\"\n :class=\"[\n `property-type-token--${token.kind}`,\n token.kind === 'word' ? 'font-sans' : '',\n token.kind === 'ident' || token.kind === 'literal'\n ? 'font-code'\n : '',\n token.kind === 'punctuation' ? 'text-c-2' : '',\n ]\"\n >{{ token.text }}</span\n >\n </template>\n </span>\n </button>\n <span\n v-else-if=\"signatureTokens.length\"\n class=\"property-type-signature text-c-2 text-(length:--scalar-mini)\">\n <template\n v-for=\"(token, index) in signatureTokens\"\n :key=\"index\">\n {{ index > 0 ? ' ' : ''\n }}<span\n class=\"property-type-token\"\n :class=\"[\n `property-type-token--${token.kind}`,\n token.kind === 'word' ? 'font-sans' : '',\n token.kind === 'ident' || token.kind === 'literal'\n ? 'font-code'\n : '',\n token.kind === 'punctuation' ? 'text-c-2' : '',\n ]\"\n >{{ token.text }}</span\n >\n </template>\n </span>\n </SchemaPropertyDetail>\n\n <!-- A cycle reads `array of Satellite · recursive`, a modifier like\n `nullable`; the full sentence rides the tooltip. -->\n <SchemaPropertyDetail\n v-if=\"recursiveTarget\"\n class=\"property-recursive\"\n :title=\"\n translate('schema.recursiveReference', { name: recursiveTarget })\n \">\n {{ translate('schema.recursive') }}\n </SchemaPropertyDetail>\n\n <ScalarTooltip\n v-if=\"presence\"\n :content=\"presenceDescription\">\n <span class=\"text-c-2 mr-2 text-xs\">\n <span aria-hidden=\"true\">optional</span>\n <span class=\"sr-only\"\n >Optional ({{ presence }} presence). {{ presenceDescription }}</span\n >\n </span>\n </ScalarTooltip>\n\n <!-- Key constraints from propertyNames (e.g. \"keys: string · uuid\") -->\n <SchemaPropertyDetail\n v-if=\"propertyNamesDetail\"\n truncate>\n <template #prefix>{{ translate('schema.keys') }}:</template>\n {{ propertyNamesDetail }}\n </SchemaPropertyDetail>\n\n <!-- Dynamic validation properties from composable -->\n <SchemaPropertyDetail\n v-for=\"property in validationProperties\"\n :key=\"property.key\"\n :code=\"property.code\"\n :truncate=\"property.truncate\">\n <span\n v-if=\"property.key === 'format'\"\n class=\"screenreader-only\">\n {{ translate('schema.format') }}:\n </span>\n <template\n v-if=\"property.prefix\"\n #prefix>\n {{ property.prefix }}\n </template>\n {{ property.value }}\n </SchemaPropertyDetail>\n\n <!-- Enum indicator -->\n <SchemaPropertyDetail v-if=\"props.enum\">\n {{ translate('schema.enum') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.additional\"\n class=\"property-additional\">\n <template v-if=\"props.value?.['x-additionalPropertiesName']\">\n {{ props.value['x-additionalPropertiesName'] }}\n </template>\n <template v-else>{{ translate('schema.additionalProperties') }}</template>\n </div>\n <div\n v-if=\"props.value?.deprecated\"\n class=\"property-deprecated\">\n <Badge>{{ translate('schema.deprecated') }}</Badge>\n </div>\n <Badge\n v-for=\"(badge, index) in positionedBadges?.after\"\n :key=\"index\"\n :class=\"badgeClass\"\n :color=\"badge.color\">\n {{ badge.name }}\n </Badge>\n <span\n v-if=\"discriminatorValue !== undefined\"\n class=\"text-c-2\">\n {{ translate('schema.discriminatorValue') }}:\n <RenderString :value=\"discriminatorValue\" />\n </span>\n <!-- Don't use `isDefined` here, we want to show `const` when the value is `null` -->\n <div\n v-if=\"constValue !== undefined\"\n class=\"property-const\">\n <SchemaPropertyDetail truncate>\n <template #prefix>{{ translate('schema.const') }}: </template>\n <RenderString :value=\"constValue\" />\n </SchemaPropertyDetail>\n </div>\n <template v-else>\n <!-- Shows only when a composition is used (so props.value?.type is undefined) -->\n <SchemaPropertyDetail v-if=\"(props.value as any)?.nullable === true\">\n {{ translate('schema.nullable') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.value?.writeOnly\"\n class=\"property-write-only\">\n {{ translate('schema.writeOnly') }}\n </div>\n <div\n v-else-if=\"props.value?.readOnly\"\n class=\"property-read-only\">\n {{ translate('schema.readOnly') }}\n </div>\n <div\n v-if=\"props.required\"\n class=\"property-required\">\n {{ translate('schema.required') }}\n </div>\n <!-- Gated here, not only inside the component: each popup instance installs\n window-level click and keydown listeners for its dismissal, so mounting\n one per row costs the page a listener per row it never shows anything\n for. Same reason `SchemaPropertyPattern` below is gated. -->\n <SchemaPropertyDefault\n v-if=\"props.value?.default !== undefined\"\n :value=\"props.value?.default\" />\n <!--\n Pattern is a hover dropdown chip like Examples, not an inline constraint,\n so it sits beside the example. This keeps the real constraints (length,\n nullable, …) together in the dotted list. See #9966.\n -->\n <SchemaPropertyPattern\n v-if=\"patternValue\"\n :pattern=\"patternValue\" />\n <SchemaPropertyExamples\n v-if=\"props.withExamples && hasExampleContent\"\n :example=\"exampleValue\"\n :examples=\"props.value?.examples\" />\n <!-- The collapsed preview rides the end of the heading line -->\n <slot name=\"preview\" />\n <!-- Last so the tab order matches the visual order: the trailing copy-link\n is painted at the row's right edge, after every control to its left -->\n <slot name=\"trailing\" />\n </div>\n</template>\n<style scoped>\n.property-heading {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n row-gap: 9px;\n white-space: nowrap;\n}\n\n.property-heading:has(+ .children),\n.property-heading:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n.property-heading > * {\n margin-right: 9px;\n}\n\n.property-heading:last-child {\n margin-right: 0;\n}\n\n.property-name {\n max-width: 100%;\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-bold);\n font-size: var(--scalar-font-size-4);\n white-space: normal;\n overflow-wrap: break-word;\n}\n\n.property-additional {\n font-family: var(--scalar-font-code);\n}\n\n.property-required,\n.property-optional {\n color: var(--scalar-color-2);\n}\n\n.property-required {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-orange);\n}\n/*\n * Light-mode oranges are too bright on a light page for 13px text (the default\n * #ff5800 is 3.16:1), so blend the theme orange toward the text colour to reach\n * WCAG 1.4.3 (4.5:1) while keeping the hue and letting custom themes flow\n * through. Dark mode already passes (8.37:1) and keeps the plain token.\n */\n.light-mode .property-required {\n color: color-mix(\n in srgb,\n var(--scalar-color-orange),\n var(--scalar-color-1) 32%\n );\n}\n\n.property-read-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-blue);\n}\n\n.property-write-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-green);\n}\n\n.property-discriminator {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-purple);\n}\n\n.property-detail {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-2);\n display: flex;\n align-items: center;\n\n min-width: 0;\n}\n\n.property-const {\n color: var(--scalar-color-1);\n}\n\n.deprecated {\n text-decoration: line-through;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A,GAyGM6C,IA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A,EAArB,OAAO+C,EAAA,MAAU,GAAA,MAAA,GAAA,CAAA,OAAA,CAAA,C;;;GAU5BhB,EAAM,OAAO,aADrB9C,EAAA,GAAAC,EAIM,OAJNwC,IAIMhC,EADDE,EAAA4D,CAAA,CAAS,CAAA,kBAAA,CAAA,GAAA,CAAA,KAGDzB,EAAM,OAAO,YAD1B9C,EAAA,GAAAC,EAIM,OAJNyC,IAIMjC,EADDE,EAAA4D,CAAA,CAAS,CAAA,iBAAA,CAAA,GAAA,CAAA,K;GAGNzB,EAAM,YADd9C,EAAA,GAAAC,EAIM,OAJN0C,IAIMlC,EADDE,EAAA4D,CAAA,CAAS,CAAA,iBAAA,CAAA,GAAA,CAAA,K;GAONzB,EAAM,OAAO,YAAY,KAAA,I,aADjC9C,EAAA,GAAAI,EAEkCY,IAAA;;IAA/B,OAAO8B,EAAM,OAAO;;GAOf2C,EAAA,SADRzF,EAAA,GAAAI,EAE4Ba,IAAA;;IAAzB,SAASwE,EAAA;;GAEJ3C,EAAM,gBAAgByC,GAAA,SAD9BvF,EAAA,GAAAI,EAGsCc,IAAA;;IADnC,SAASmE,EAAA;IACT,UAAUvC,EAAM,OAAO;;GAE1BpC,EAAuB0F,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,EAAA;GAGvB1F,EAAwB0F,EAAA,QAAA,YAAA,CAAA,GAAA,KAAA,GAAA,EAAA"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import e from "./LinkButton.vue.js";
|
|
2
|
-
import { useLocalization as t } from "./localization/index.js";
|
|
3
|
-
import { createElementBlock as n, createElementVNode as r, createTextVNode as i, createVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, ref as l, toDisplayString as u, unref as d, withCtx as f } from "vue";
|
|
4
|
-
import { ScalarIcon as p } from "@scalar/components/icon";
|
|
5
|
-
import { useClipboard as m } from "@scalar/use-hooks/useClipboard";
|
|
6
|
-
import { onClickOutside as h, onKeyStroke as g } from "@vueuse/core";
|
|
7
|
-
// src/schema/SchemaPropertyPattern.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var _ = { class: "property-pattern-popup" }, v = ["aria-label"], y = /*@__PURE__*/ o({
|
|
9
|
-
__name: "SchemaPropertyPattern",
|
|
10
|
-
props: { pattern: {} },
|
|
11
|
-
setup(o) {
|
|
12
|
-
let { copyToClipboard: y } = m(), { translate: b } = t(), x = l(null), S = l(!1), C = () => {
|
|
13
|
-
S.value = !S.value;
|
|
14
|
-
}, w = () => {
|
|
15
|
-
S.value = !1;
|
|
16
|
-
};
|
|
17
|
-
return h(x, w), g("Escape", () => {
|
|
18
|
-
S.value && w();
|
|
19
|
-
}), (t, l) => (c(), n("div", {
|
|
20
|
-
ref_key: "rootRef",
|
|
21
|
-
ref: x,
|
|
22
|
-
class: s(["property-pattern", { "is-open": S.value }])
|
|
23
|
-
}, [a(e, {
|
|
24
|
-
class: "decoration-dotted",
|
|
25
|
-
onClick: C
|
|
26
|
-
}, {
|
|
27
|
-
default: f(() => [i(u(d(b)("schema.pattern")), 1)]),
|
|
28
|
-
_: 1
|
|
29
|
-
}), r("div", _, [r("button", {
|
|
30
|
-
"aria-label": `${d(b)("schema.copyPattern")}: ${o.pattern}`,
|
|
31
|
-
class: "property-pattern-value group",
|
|
32
|
-
type: "button",
|
|
33
|
-
onClick: l[0] ||= (e) => d(y)(o.pattern)
|
|
34
|
-
}, [r("code", null, u(o.pattern), 1), a(d(p), {
|
|
35
|
-
"aria-hidden": "true",
|
|
36
|
-
class: "group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3",
|
|
37
|
-
icon: "Clipboard",
|
|
38
|
-
size: "xs"
|
|
39
|
-
})], 8, v)])], 2));
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
export { y as default };
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=SchemaPropertyPattern.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaPropertyPattern.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeClass","_createVNode","LinkButton","_withCtx","_createTextVNode","_toDisplayString","_unref","_createElementVNode","LinkButton_default","_hoisted_1","_hoisted_2","SchemaPropertyPattern_vue_vue_type_script_setup_true_lang_default","useClipboard","useLocalization","rootRef","ref","isOpen","toggle","close","onClickOutside","onKeyStroke","openBlock","createElementBlock","normalizeClass","createVNode","withCtx","createTextVNode","toDisplayString","unref","translate","createElementVNode","__props","_cache","copyToClipboard","ScalarIcon"],"sources":["../../src/schema/SchemaPropertyPattern.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { onClickOutside, onKeyStroke } from '@vueuse/core'\nimport { ref } from 'vue'\n\nimport LinkButton from './LinkButton.vue'\nimport { useLocalization } from './localization'\n\nconst { pattern } = defineProps<{ pattern: string }>()\n\nconst { copyToClipboard } = useClipboard()\nconst { translate } = useLocalization()\n\n/**\n * The popup reveals on hover and keyboard focus purely via CSS. Touch devices\n * have no hover, so a click/tap also pins it open, and a second click, a click\n * outside, or Escape closes it again. Without this the full pattern was\n * unreachable on mobile — a regression from the old inline (truncated) text.\n */\nconst rootRef = ref<HTMLElement | null>(null)\nconst isOpen = ref(false)\n\nconst toggle = () => {\n isOpen.value = !isOpen.value\n}\n\nconst close = () => {\n isOpen.value = false\n}\n\nonClickOutside(rootRef, close)\nonKeyStroke('Escape', () => {\n if (isOpen.value) {\n close()\n }\n})\n</script>\n<template>\n <div\n ref=\"rootRef\"\n class=\"property-pattern\"\n :class=\"{ 'is-open': isOpen }\">\n <LinkButton\n class=\"decoration-dotted\"\n @click=\"toggle\">\n {{ translate('schema.pattern') }}\n </LinkButton>\n <div class=\"property-pattern-popup\">\n <button\n :aria-label=\"`${translate('schema.copyPattern')}: ${pattern}`\"\n class=\"property-pattern-value group\"\n type=\"button\"\n @click=\"copyToClipboard(pattern)\">\n <code>{{ pattern }}</code>\n <ScalarIcon\n aria-hidden=\"true\"\n class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n</template>\n<style scoped>\n@reference \"../style.css\";\n\n.property-pattern {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-mini);\n position: relative;\n}\n\n/*\n * Invisible bridge that fills the gap between the label and the popup, so the\n * pointer can travel down into the popup without dropping the `:hover` state.\n * Mirrors the same trick in SchemaPropertyExamples.vue.\n */\n.property-pattern:hover::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 20px;\n border-radius: var(--scalar-radius);\n}\n\n.property-pattern-popup {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translate3d(-50%, 0, 0);\n background-color: var(--scalar-background-1);\n box-shadow: var(--scalar-shadow-1);\n border-radius: var(--scalar-radius-lg);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 9px;\n min-width: 200px;\n /* Cap the width so the centered popup never overflows a narrow viewport\n * (mobile, modal). Long patterns wrap instead of widening it. */\n max-width: min(500px, calc(100vw - 32px));\n /* Cap the height too, so a very long multi-line regex scrolls inside the\n * popup instead of running off the bottom of the viewport. */\n max-height: min(400px, calc(100vh - 32px));\n overflow-y: auto;\n display: none;\n @apply z-context;\n}\n\n.property-pattern:hover .property-pattern-popup,\n.property-pattern:focus-within .property-pattern-popup,\n.property-pattern.is-open .property-pattern-popup {\n display: flex;\n}\n\n.property-pattern-value {\n font-family: var(--scalar-font-code);\n display: flex;\n gap: 8px;\n /* Top-align so the copy icon stays with the first line of a wrapped pattern. */\n align-items: flex-start;\n width: 100%;\n padding: 6px;\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n}\n\n.property-pattern-value code {\n font-family: var(--scalar-font-code);\n font-size: var(--scalar-font-size-3);\n color: var(--scalar-color-2);\n /* Wrap long regex so the full pattern is readable, not just copyable. */\n white-space: pre-wrap;\n word-break: break-word;\n overflow-wrap: anywhere;\n flex: 1;\n text-align: left;\n}\n</style>\n"],"mappings":";;;;;;;;;;;EAWA,IAAM,EAAE,uBAAoBc,EAAa,GACnC,EAAE,iBAAcC,EAAgB,GAQhCC,IAAUC,EAAwB,IAAI,GACtCC,IAASD,EAAI,EAAK,GAElBE,UAAe;GACnB,EAAO,QAAQ,CAACD,EAAO;EACzB,GAEME,UAAc;GAClB,EAAO,QAAQ;EACjB;E,OAEAC,EAAeL,GAASI,CAAK,GAC7BE,EAAY,gBAAgB;GAC1B,AAAIJ,EAAO,SACTE,EAAM;EAEV,CAAC,I,UAGCpB,EAAA,GAAAC,EAuBM,OAAA;GAtBA,SAAA;GAAJ,KAAIe;GACJ,OAAKd,EAAA,CAAC,oBAAkB,EAAA,WACHgB,EAAA,MAAM,CAAA,CAAA;E,IAC3Bf,EAIaC,GAAA;GAHX,OAAM;GACL,SAAOe;;GACR,SAAAd,QAAiC,CAA9BC,EAAAC,EAAAC,EAAAuB,CAAA,CAAS,CAAA,gBAAA,CAAA,GAAA,CAAA,C;;E,IAEdtB,EAaM,OAbNE,GAaM,CAZJF,EAWS,UAAA;GAVN,cAAU,GAAKD,EAAAuB,CAAA,CAAS,CAAA,oBAAA,EAAA,IAA2BE,EAAA;GACpD,OAAM;GACN,MAAK;GACJ,SAAK,AAAAC,EAAA,QAAA,MAAE1B,EAAA2B,CAAA,CAAe,CAACF,EAAA,OAAO;E,IAC/BxB,EAA0B,QAAA,MAAAF,EAAjB0B,EAAA,OAAO,GAAA,CAAA,GAChB9B,EAIcK,EAAA4B,CAAA,GAAA;GAHZ,eAAY;GACZ,OAAM;GACN,MAAK;GACL,MAAK"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { createBlock as e, createCommentVNode as t, createElementBlock as n, defineComponent as r, normalizeStyle as i, onBeforeUnmount as a, openBlock as o, renderSlot as s, resolveDynamicComponent as c, withCtx as l, withModifiers as u } from "vue";
|
|
2
|
-
// src/schema/SchemaRailPanel.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var d = /*@__PURE__*/ r({
|
|
4
|
-
__name: "SchemaRailPanel",
|
|
5
|
-
props: {
|
|
6
|
-
depth: {},
|
|
7
|
-
closeOnRail: {
|
|
8
|
-
type: Boolean,
|
|
9
|
-
default: !1
|
|
10
|
-
},
|
|
11
|
-
as: {
|
|
12
|
-
type: [
|
|
13
|
-
String,
|
|
14
|
-
Object,
|
|
15
|
-
Function
|
|
16
|
-
],
|
|
17
|
-
default: "div"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
emits: ["close"],
|
|
21
|
-
setup(r, { emit: d }) {
|
|
22
|
-
let f = d, p = null, m = () => {
|
|
23
|
-
p?.panel.removeAttribute("data-rail-hovered"), p?.row?.removeAttribute("data-child-rail-hovered"), p = null;
|
|
24
|
-
}, h = (e, t) => {
|
|
25
|
-
if (m(), !t) return;
|
|
26
|
-
let n = e.currentTarget instanceof HTMLElement ? e.currentTarget.parentElement : null;
|
|
27
|
-
if (!n) return;
|
|
28
|
-
let r = n.parentElement;
|
|
29
|
-
n.setAttribute("data-rail-hovered", ""), r?.setAttribute("data-child-rail-hovered", ""), p = {
|
|
30
|
-
panel: n,
|
|
31
|
-
row: r
|
|
32
|
-
};
|
|
33
|
-
}, g = () => {
|
|
34
|
-
m(), f("close");
|
|
35
|
-
};
|
|
36
|
-
return a(m), (a, d) => (o(), e(c(r.as), {
|
|
37
|
-
class: "schema-rail-panel schema-rail rail-hover:border-s-c-1 relative ps-[var(--schema-gutter,16px)]",
|
|
38
|
-
style: i({ "--schema-depth": r.depth })
|
|
39
|
-
}, {
|
|
40
|
-
default: l(() => [r.closeOnRail ? (o(), n("div", {
|
|
41
|
-
key: 0,
|
|
42
|
-
"aria-hidden": "true",
|
|
43
|
-
class: "rail-hit z-[1]",
|
|
44
|
-
"data-rail-hit": "",
|
|
45
|
-
onClick: u(g, ["stop"]),
|
|
46
|
-
onPointerenter: d[0] ||= (e) => h(e, !0),
|
|
47
|
-
onPointerleave: d[1] ||= (e) => h(e, !1)
|
|
48
|
-
}, null, 32)) : t("", !0), s(a.$slots, "default")]),
|
|
49
|
-
_: 3
|
|
50
|
-
}, 8, ["style"]));
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
export { d as default };
|
|
54
|
-
|
|
55
|
-
//# sourceMappingURL=SchemaRailPanel.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaRailPanel.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_normalizeStyle","_withCtx","_createElementBlock","_withModifiers","_renderSlot","SchemaRailPanel_vue_vue_type_script_setup_true_lang_default","__emit","emit","hovered","clearRailHover","setRailHover","on","panel","event","row","onStripClick","onBeforeUnmount","openBlock","createBlock","resolveDynamicComponent","__props","normalizeStyle","withCtx","createElementBlock","withModifiers","_cache","$event","createCommentVNode","renderSlot","_ctx"],"sources":["../../src/schema/SchemaRailPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onBeforeUnmount, type Component } from 'vue'\n\n/**\n * The railed panel of the schema tree: an expanded row's children behind a rail\n * that fades with depth. See the indentation model in SchemaProperty.vue.\n *\n * `--schema-depth` must stay inline on the element itself: the `schema-rail`\n * utility reads it for the fade. No margins of its own, because each surface\n * that joins the tree spaces its panel differently.\n */\nconst {\n depth,\n closeOnRail = false,\n as = 'div',\n} = defineProps<{\n /** Nesting depth of the panel, driving how far the rail fades */\n depth: number\n /** Render the pointer strip over the rail that closes the panel on click */\n closeOnRail?: boolean\n /** Panel root element or component, so a headless-ui DisclosurePanel can keep the rail recipe */\n as?: string | Component\n}>()\n\nconst emit = defineEmits<{\n (e: 'close'): void\n}>()\n\n/**\n * A hovered strip colours this panel's rail and lights the puck of the control\n * that owns the panel. Both used to be `:has(... :hover)` selectors, which made\n * every railed row a `:has()` invalidation anchor, so each element inserted\n * under an open row restyled its whole subtree. The strip's pointer events now\n * write the same state as attributes that exist only while it is hovered:\n * `data-rail-hovered` on the panel root and `data-child-rail-hovered` on the\n * panel's parent, the element the tailwind.config.css variants look through to\n * the control. Read off DOM adjacency exactly like the selectors they replace,\n * so every surface that rails a panel is covered without wiring.\n */\nlet hovered: { panel: HTMLElement; row: HTMLElement | null } | null = null\n\nconst clearRailHover = (): void => {\n hovered?.panel.removeAttribute('data-rail-hovered')\n hovered?.row?.removeAttribute('data-child-rail-hovered')\n hovered = null\n}\n\nconst setRailHover = (event: Event, on: boolean): void => {\n clearRailHover()\n\n if (!on) {\n return\n }\n\n const panel =\n event.currentTarget instanceof HTMLElement\n ? event.currentTarget.parentElement\n : null\n\n if (!panel) {\n return\n }\n\n const row = panel.parentElement\n panel.setAttribute('data-rail-hovered', '')\n row?.setAttribute('data-child-rail-hovered', '')\n hovered = { panel, row }\n}\n\n/**\n * Folding the panel hides the strip under the pointer, so no pointerleave ever\n * follows the click: the marks go before the close, or the puck stays lit.\n */\nconst onStripClick = (): void => {\n clearRailHover()\n emit('close')\n}\n\n/* The strip also disappears without a pointerleave when the panel unmounts,\n and the parent row it marked outlives it. */\nonBeforeUnmount(clearRailHover)\n</script>\n<template>\n <component\n :is=\"as\"\n class=\"schema-rail-panel schema-rail rail-hover:border-s-c-1 relative ps-[var(--schema-gutter,16px)]\"\n :style=\"{ '--schema-depth': depth }\">\n <!-- Pointer-only strip along the rail that folds the panel; hidden from\n assistive tech because the row's own toggle is the accessible control. -->\n <div\n v-if=\"closeOnRail\"\n aria-hidden=\"true\"\n class=\"rail-hit z-[1]\"\n data-rail-hit\n @click.stop=\"onStripClick\"\n @pointerenter=\"setRailHover($event, true)\"\n @pointerleave=\"setRailHover($event, false)\" />\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAwBA,IAAMU,IAAOD,GAeTE,IAAkE,MAEhEC,UAA6B;GAGjC,AAFAD,GAAS,MAAM,gBAAgB,mBAAmB,GAClDA,GAAS,KAAK,gBAAgB,yBAAyB,GACvD,IAAU;EACZ,GAEME,KAAgB,GAAc,MAAsB;GAGxD,IAFAD,EAAe,GAEX,CAACE,GACH;GAGF,IAAMC,IACJC,EAAM,yBAAyB,cAC3BA,EAAM,cAAc,gBACpB;GAEN,IAAI,CAACD,GACH;GAGF,IAAME,IAAMF,EAAM;GAGlB,AAFAA,EAAM,aAAa,qBAAqB,EAAE,GAC1CE,GAAK,aAAa,2BAA2B,EAAE,GAC/C,IAAU;IAAE;IAAO;GAAI;EACzB,GAMMC,UAA2B;GAE/B,AADAN,EAAe,GACfF,EAAK,OAAO;EACd;E,OAIAS,EAAgBP,CAAc,I,UAG5BZ,EAAA,GAAAC,EAeYC,EAdLqB,EAAA,EAAE,GAAA;GACP,OAAM;GACL,OAAKpB,EAAA,EAAA,kBAAsBoB,EAAA,MAAK,CAAA;;GAGjC,SAAAnB,QAOgD,CANxCmB,EAAA,eADRvB,EAAA,GAAAK,EAOgD,OAAA;;IAL9C,eAAY;IACZ,OAAM;IACN,iBAAA;IACC,SAAKC,EAAOY,GAAY,CAAA,MAAA,CAAA;IACxB,gBAAY,AAAAU,EAAA,QAAA,MAAEf,EAAagB,GAAM,EAAA;IACjC,gBAAY,AAAAD,EAAA,QAAA,MAAEf,EAAagB,GAAM,EAAA;G,2BACpCtB,EAAQyB,EAAA,QAAA,SAAA,C"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { useLocalization as e } from "../localization/index.js";
|
|
2
|
-
import { computed as t, createElementBlock as n, createElementVNode as r, createTextVNode as i, createVNode as a, defineComponent as o, openBlock as s, renderSlot as c, toDisplayString as l, unref as u } from "vue";
|
|
3
|
-
import { ScalarIconHash as d } from "@scalar/icons";
|
|
4
|
-
// src/schema/components/CopyLinkButton.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var f = { class: "sr-only" }, p = /*@__PURE__*/ o({
|
|
6
|
-
__name: "CopyLinkButton",
|
|
7
|
-
props: {
|
|
8
|
-
anchorId: {},
|
|
9
|
-
eventBus: {}
|
|
10
|
-
},
|
|
11
|
-
setup(o) {
|
|
12
|
-
let { translate: p } = e(), m = t(() => p("actions.copyLinkTo", { name: o.anchorId.split(".").pop() ?? "" }));
|
|
13
|
-
return (e, t) => (s(), n("button", {
|
|
14
|
-
class: "copy-link-trailing text-c-3 hover:text-c-1 -my-1.25 ms-1.25! -me-1.25! flex shrink-0 cursor-pointer items-center justify-center self-center p-1.25 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 pointer-coarse:hidden",
|
|
15
|
-
type: "button",
|
|
16
|
-
onClick: t[0] ||= () => o.eventBus?.emit("copy-url:nav-item", { id: o.anchorId })
|
|
17
|
-
}, [a(u(d), {
|
|
18
|
-
"aria-hidden": "true",
|
|
19
|
-
class: "size-3.5"
|
|
20
|
-
}), r("span", f, [c(e.$slots, "sr-label", {}, () => [i(l(m.value), 1)])])]));
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
export { p as default };
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=CopyLinkButton.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CopyLinkButton.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createVNode","_unref","_createElementVNode","_renderSlot","_createTextVNode","_toDisplayString","_hoisted_1","CopyLinkButton_vue_vue_type_script_setup_true_lang_default","useLocalization","copyLinkLabel","computed","translate","__props","openBlock","createElementBlock","_cache","createVNode","unref","ScalarIconHash","createElementVNode","renderSlot","_ctx","createTextVNode","toDisplayString"],"sources":["../../../src/schema/components/CopyLinkButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconHash } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '../localization'\n\n/**\n * A property row's deep-link affordance: the same hash the section headings\n * and the models list show, trailing the row's text in the flow of the heading\n * and revealed on hover or focus. It is a separate component so it can render\n * as the LAST child of the heading: inside `WithBreadcrumb`, which wraps the\n * name, it would come before the type in the tab order (WCAG 2.4.3).\n */\nconst { anchorId } = defineProps<{\n /** The anchor this button copies a link to */\n anchorId: string\n eventBus: WorkspaceEventBus | null\n}>()\n\nconst { translate } = useLocalization()\n\n/** Screen-reader label for the copy-link button, naming the deep-linked item. */\nconst copyLinkLabel = computed(() =>\n translate('actions.copyLinkTo', {\n name: anchorId.split('.').pop() ?? '',\n }),\n)\n</script>\n\n<template>\n <!-- A flex item of the heading, so it wraps with the text. Negative margins\n cancel the padding of the 24px hit area WCAG 2.5.8 asks for, so the box\n overhangs the line instead of taking room from it: vertically it never\n changes the line height, and horizontally the row gives up only the 10px\n gap and the 14px icon (5 + 24 - 5), which is what a collapsed preview\n before it truncates against.\n\n Both inline margins carry `!`: the heading's scoped `.property-heading > *`\n sets a 9px right margin, which is the end margin in LTR and the start\n margin in RTL, at the same specificity as the utility. Which one wins\n depends on whether the consumer's stylesheet puts the utilities before or\n after `vue-styles.css`.\n\n pointer-coarse drops it entirely rather than leaving it transparent: a\n touch pointer has no hover, so a still-laid-out button would be an\n invisible tap target AND would keep pushing long signature lines onto a\n second line just to show a control nobody can see. A deep link stays\n reachable there through the address bar. -->\n <button\n class=\"copy-link-trailing text-c-3 hover:text-c-1 -my-1.25 ms-1.25! -me-1.25! flex shrink-0 cursor-pointer items-center justify-center self-center p-1.25 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 pointer-coarse:hidden\"\n type=\"button\"\n @click=\"() => eventBus?.emit('copy-url:nav-item', { id: anchorId })\">\n <ScalarIconHash\n aria-hidden=\"true\"\n class=\"size-3.5\" />\n <span class=\"sr-only\">\n <slot name=\"sr-label\">{{ copyLinkLabel }}</slot>\n </span>\n </button>\n</template>\n"],"mappings":";;;;;;;;;;;EAoBA,IAAM,EAAE,iBAAcU,EAAgB,GAGhCC,IAAgBC,QACpBC,EAAU,sBAAsB,EAC9B,MAAMC,EAAA,SAAS,MAAM,GAAG,CAAC,CAAC,IAAI,KAAK,GACrC,CAAC,CACH;E,kBAsBEd,EAAA,GAAAC,EAUS,UAAA;GATP,OAAM;GACN,MAAK;GACJ,SAAK,AAAAgB,EAAA,aAAQH,EAAA,UAAU,KAAI,qBAAA,EAAA,IAA4BA,EAAA,SAAQ,CAAA;E,IAChEZ,EAEqBC,EAAAiB,CAAA,GAAA;GADnB,eAAY;GACZ,OAAM;E,IACRhB,EAEO,QAFPI,GAEO,CADLH,EAAgDkB,EAAA,QAAA,YAAA,CAAA,SAAA,CAAvBjB,EAAAC,EAAAI,EAAA,KAAa,GAAA,CAAA,C"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { createElementBlock as e, defineComponent as t, openBlock as n, renderSlot as r } from "vue";
|
|
2
|
-
// src/schema/components/WithBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var i = ["id"], a = /*@__PURE__*/ t({
|
|
4
|
-
__name: "WithBreadcrumb",
|
|
5
|
-
props: { breadcrumb: {} },
|
|
6
|
-
setup(t) {
|
|
7
|
-
return (a, o) => t.breadcrumb && t.breadcrumb.length > 0 ? (n(), e("div", {
|
|
8
|
-
key: 0,
|
|
9
|
-
id: t.breadcrumb.join("."),
|
|
10
|
-
class: "static scroll-mt-24",
|
|
11
|
-
tabindex: "-1"
|
|
12
|
-
}, [r(a.$slots, "default")], 8, i)) : r(a.$slots, "default", {}, void 0, void 0, 1);
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
export { a as default };
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=WithBreadcrumb.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WithBreadcrumb.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_renderSlot","_hoisted_1","WithBreadcrumb_vue_vue_type_script_setup_true_lang_default","__props","openBlock","createElementBlock","renderSlot","_ctx"],"sources":["../../../src/schema/components/WithBreadcrumb.vue"],"sourcesContent":["<script setup lang=\"ts\">\nconst { breadcrumb } = defineProps<{\n breadcrumb?: string[]\n}>()\n</script>\n\n<template>\n <template v-if=\"breadcrumb && breadcrumb.length > 0\">\n <!-- `tabindex=\"-1\"`: focusable programmatically but out of the tab order,\n so a deep link can move focus to its target instead of leaving keyboard\n and screen-reader users at the top of the document -->\n <div\n :id=\"breadcrumb.join('.')\"\n class=\"static scroll-mt-24\"\n tabindex=\"-1\">\n <!-- Content -->\n <slot />\n <!-- No copy button here: the row's heading renders it as its last child\n so tab order matches visual order. See CopyLinkButton.vue -->\n </div>\n </template>\n <template v-else>\n <slot />\n </template>\n</template>\n"],"mappings":";;;;;;E,iBAOkBK,EAAA,cAAcA,EAAA,WAAW,SAAM,KAI7CL,EAAA,GAAAC,EAQM,OAAA;;GAPH,IAAII,EAAA,WAAW,KAAI,GAAA;GACpB,OAAM;GACN,UAAS;E,IAETH,EAAQO,EAAA,QAAA,SAAA,C,YAMVP,EAAQO,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { computed as e, createElementBlock as t, defineComponent as n, mergeProps as r, openBlock as i, renderSlot as a, unref as o } from "vue";
|
|
2
|
-
import { useBindCx as s } from "@scalar/use-hooks/useBindCx";
|
|
3
|
-
// src/shared/Badge.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var c = /*@__PURE__*/ n({
|
|
5
|
-
inheritAttrs: !1,
|
|
6
|
-
__name: "Badge",
|
|
7
|
-
props: { color: {} },
|
|
8
|
-
setup(n) {
|
|
9
|
-
let { cx: c } = s(), l = e(() => n.color ? { "--badge-color": n.color } : void 0);
|
|
10
|
-
return (e, s) => (i(), t("div", r(o(c)("badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm", n.color && "bg-(--badge-color) text-auto-contrast-(--badge-color)"), { style: l.value }), [a(e.$slots, "default", {}, void 0, !0)], 16));
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
export { c as default };
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=Badge.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_mergeProps","_unref","_renderSlot","Badge_vue_vue_type_script_setup_true_lang_default","useBindCx","badgeStyle","computed","__props","openBlock","createElementBlock","mergeProps","unref","cx","renderSlot","_ctx"],"sources":["../../src/shared/Badge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nconst { color } = defineProps<{\n color?: string\n}>()\n\n// Merge fallthrough classes via `cx` so consumer classes can override the base styles.\ndefineOptions({ inheritAttrs: false })\n\nconst { cx } = useBindCx()\n\n// The color only goes in as a custom property; `text-auto-contrast-*` derives\n// readable text from it in CSS, where the browser can read any color format.\nconst badgeStyle = computed(() =>\n color ? { '--badge-color': color } : undefined,\n)\n</script>\n\n<template>\n <div\n v-bind=\"\n cx(\n 'badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm',\n color && 'bg-(--badge-color) text-auto-contrast-(--badge-color)',\n )\n \"\n :style=\"badgeStyle\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n/* Colour variants are keyed on the `text-*` class a consumer passes in. */\n.badge.text-orange {\n background: color-mix(in srgb, var(--scalar-color-orange), transparent 90%);\n border: transparent;\n}\n.badge.text-yellow {\n background: color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);\n border: transparent;\n}\n.badge.text-red {\n background: color-mix(in srgb, var(--scalar-color-red), transparent 90%);\n border: transparent;\n}\n.badge.text-purple {\n background: color-mix(in srgb, var(--scalar-color-purple), transparent 90%);\n border: transparent;\n}\n.badge.text-green {\n background: color-mix(in srgb, var(--scalar-color-green), transparent 90%);\n border: transparent;\n}\n</style>\n"],"mappings":";;;;;;;;EAWA,IAAM,EAAE,UAAOM,EAAU,GAInBC,IAAaC,QACjBC,EAAA,QAAQ,EAAE,iBAAiBA,EAAA,MAAM,IAAI,KAAA,CACvC;E,kBAIET,EAAA,GAAAC,EASM,OATNC,EACiBC,EAAAW,CAAA,CAAE,C,+EAAiGL,EAAA,SAAK,uD,GAMtH,EAAA,OAAOF,EAAA,MAAU,CAAA,GAAA,CAClBH,EAAQY,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,EAAA,C"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createVNode as i, defineComponent as a, openBlock as o, resolveDynamicComponent as s, toDisplayString as c, unref as l, withCtx as u } from "vue";
|
|
2
|
-
import { ScalarIconBook as d } from "@scalar/icons";
|
|
3
|
-
import { getResolvedRef as f } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
4
|
-
import { sanitizeUrl as p } from "@scalar/helpers/url/is-safe-url";
|
|
5
|
-
// src/shared/ExternalDocs.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var m = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "group narrow:border-r-0 narrow:first:ml-0 flex items-center border-r first:ml-auto last:border-r-0"
|
|
9
|
-
}, h = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "ml-1 empty:hidden"
|
|
12
|
-
}, g = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "ml-1 empty:hidden"
|
|
15
|
-
}, _ = /*@__PURE__*/ a({
|
|
16
|
-
__name: "ExternalDocs",
|
|
17
|
-
props: { value: {} },
|
|
18
|
-
setup(a) {
|
|
19
|
-
let _ = e(() => {
|
|
20
|
-
let e = f(a.value);
|
|
21
|
-
return e && typeof e.url == "string" && e.url ? e : void 0;
|
|
22
|
-
}), v = e(() => p(_.value?.url));
|
|
23
|
-
return (e, a) => _.value ? (o(), r("div", m, [(o(), t(s(v.value ? "a" : "span"), {
|
|
24
|
-
"aria-label": _.value.description || _.value.url,
|
|
25
|
-
class: "text-c-1 hover:bg-b-2 narrow:border mr-2 flex min-h-7 min-w-7 items-center rounded-lg px-2 py-1 no-underline group-last:mr-0",
|
|
26
|
-
href: v.value,
|
|
27
|
-
rel: v.value ? "noopener noreferrer" : void 0,
|
|
28
|
-
target: v.value ? "_blank" : void 0
|
|
29
|
-
}, {
|
|
30
|
-
default: u(() => [i(l(d), {
|
|
31
|
-
class: "size-3 text-current",
|
|
32
|
-
weight: "bold"
|
|
33
|
-
}), _.value.description ? (o(), r("span", h, c(_.value.description), 1)) : (o(), r("span", g, c(_.value.url), 1))]),
|
|
34
|
-
_: 1
|
|
35
|
-
}, 8, [
|
|
36
|
-
"aria-label",
|
|
37
|
-
"href",
|
|
38
|
-
"rel",
|
|
39
|
-
"target"
|
|
40
|
-
]))])) : n("", !0);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
export { _ as default };
|
|
44
|
-
|
|
45
|
-
//# sourceMappingURL=ExternalDocs.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalDocs.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createBlock","_resolveDynamicComponent","_withCtx","_createVNode","_unref","_toDisplayString","_hoisted_1","_hoisted_2","_hoisted_3","ExternalDocs_vue_vue_type_script_setup_true_lang_default","documentation","computed","resolved","getResolvedRef","__props","url","sanitizeUrl","openBlock","createElementBlock","createBlock","resolveDynamicComponent","withCtx","createVNode","unref","ScalarIconBook","toDisplayString","createCommentVNode"],"sources":["../../src/shared/ExternalDocs.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { sanitizeUrl } from '@scalar/helpers/url/is-safe-url'\nimport { ScalarIconBook } from '@scalar/icons'\nimport {\n getResolvedRef,\n type NodeInput,\n} from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { ExternalDocumentationObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { value } = defineProps<{\n value?: NodeInput<ExternalDocumentationObject>\n}>()\n\nconst documentation = computed<ExternalDocumentationObject | undefined>(() => {\n const resolved = getResolvedRef(value)\n return resolved && typeof resolved.url === 'string' && resolved.url\n ? resolved\n : undefined\n})\n/** Unsafe URL protocols fall back to a plain-text label. */\nconst url = computed<string | undefined>(() =>\n sanitizeUrl(documentation.value?.url),\n)\n</script>\n\n<template>\n <template v-if=\"documentation\">\n <div\n class=\"group narrow:border-r-0 narrow:first:ml-0 flex items-center border-r first:ml-auto last:border-r-0\">\n <component\n :is=\"url ? 'a' : 'span'\"\n :aria-label=\"documentation.description || documentation.url\"\n class=\"text-c-1 hover:bg-b-2 narrow:border mr-2 flex min-h-7 min-w-7 items-center rounded-lg px-2 py-1 no-underline group-last:mr-0\"\n :href=\"url\"\n :rel=\"url ? 'noopener noreferrer' : undefined\"\n :target=\"url ? '_blank' : undefined\">\n <ScalarIconBook\n class=\"size-3 text-current\"\n weight=\"bold\" />\n <span\n v-if=\"documentation.description\"\n class=\"ml-1 empty:hidden\">\n {{ documentation.description }}\n </span>\n <span\n v-else\n class=\"ml-1 empty:hidden\">\n {{ documentation.url }}\n </span>\n </component>\n </div>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAcA,IAAMY,IAAgBC,QAAwD;GAC5E,IAAMC,IAAWC,EAAeC,EAAA,KAAK;GACrC,OAAOF,KAAY,OAAOA,EAAS,OAAQ,YAAYA,EAAS,MAC5DA,IACA,KAAA;EACN,CAAC,GAEKG,IAAMJ,QACVK,EAAYN,EAAc,OAAO,GAAG,CACtC;E,iBAIkBA,EAAA,SACdZ,EAAA,GAAAC,EAuBM,OAvBNO,GAuBM,EArBJR,EAAA,GAAAE,EAoBYC,EAnBLc,EAAA,QAAG,MAAA,MAAA,GAAA;GACP,cAAYL,EAAA,MAAc,eAAeA,EAAA,MAAc;GACxD,OAAM;GACL,MAAMK,EAAA;GACN,KAAKA,EAAA,QAAG,wBAA2B,KAAA;GACnC,QAAQA,EAAA,QAAG,WAAc,KAAA;;GAC1B,SAAAb,QAEkB,CAFlBC,EAEkBC,EAAAoB,CAAA,GAAA;IADhB,OAAM;IACN,QAAO;G,IAEDd,EAAA,MAAc,eADtBZ,EAAA,GAAAC,EAIO,QAJPQ,GAIOF,EADFK,EAAA,MAAc,WAAW,GAAA,CAAA,MAE9BZ,EAAA,GAAAC,EAIO,QAJPS,GAIOH,EADFK,EAAA,MAAc,GAAG,GAAA,CAAA,E"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { createElementBlock as e, defineComponent as t, openBlock as n, renderSlot as r } from "vue";
|
|
2
|
-
// src/shared/ScreenReader.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var i = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "screenreader-only"
|
|
6
|
-
}, a = /*@__PURE__*/ t({
|
|
7
|
-
__name: "ScreenReader",
|
|
8
|
-
props: { if: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
default: !0
|
|
11
|
-
} },
|
|
12
|
-
setup(t) {
|
|
13
|
-
return (t, a) => t.$props.if ? (n(), e("span", i, [r(t.$slots, "default")])) : r(t.$slots, "default", {}, void 0, void 0, 1);
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
export { a as default };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=ScreenReader.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenReader.vue_vue_type_script_setup_true_lang.js","names":["$props","_openBlock","_createElementBlock","_renderSlot","_hoisted_1","ScreenReader_vue_vue_type_script_setup_true_lang_default","_ctx","openBlock","createElementBlock","renderSlot"],"sources":["../../src/shared/ScreenReader.vue"],"sourcesContent":["<script setup lang=\"ts\">\nwithDefaults(\n defineProps<{\n if?: boolean\n }>(),\n {\n if: true,\n },\n)\n</script>\n<template>\n <span\n v-if=\"$props.if\"\n class=\"screenreader-only\">\n <slot />\n </span>\n <slot v-else />\n</template>\n<!--\n `.screenreader-only` is declared globally in styles/tailwind.config.css rather\n than scoped here, so other components can hide text without wrapping it in\n this component.\n-->\n"],"mappings":";;;;;;;;;;;;E,iBAYUA,EAAAA,OAAO,MADfC,EAAA,GAAAC,EAIO,QAJPE,GAIO,CADLD,EAAQG,EAAA,QAAA,SAAA,C,MAEVH,EAAeG,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import e from "../schema/SchemaGutterToggle.vue.js";
|
|
2
|
-
import t from "../schema/SchemaRailPanel.vue.js";
|
|
3
|
-
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, normalizeClass as l, openBlock as u, ref as d, renderList as f, resolveComponent as p, toDisplayString as m, unref as h, useId as g, withCtx as _ } from "vue";
|
|
4
|
-
// src/specification-extensions/ExtensionValue.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var v = ["id", "aria-hidden"], y = ["id"], b = { class: "font-code break-words whitespace-pre-wrap" }, x = /*@__PURE__*/ c({
|
|
6
|
-
__name: "ExtensionValue",
|
|
7
|
-
props: {
|
|
8
|
-
name: {},
|
|
9
|
-
value: {},
|
|
10
|
-
depth: { default: 0 },
|
|
11
|
-
compact: {
|
|
12
|
-
type: Boolean,
|
|
13
|
-
default: !1
|
|
14
|
-
},
|
|
15
|
-
arrayItem: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: !1
|
|
18
|
-
},
|
|
19
|
-
ancestors: { default: () => [] },
|
|
20
|
-
topLevel: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: !1
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
setup(c) {
|
|
26
|
-
let x = g(), S = g(), C = r(() => c.depth === 0 || c.topLevel), w = d(C.value), T = r(() => c.ancestors.includes(c.value)), E = r(() => c.value === null || typeof c.value != "object" || T.value ? [] : Array.isArray(c.value) ? c.value.map((e, t) => [`[${t}]`, e]) : Object.entries(c.value)), D = r(() => E.value.length > 0), O = r(() => c.arrayItem && D.value ? Array.isArray(c.value) ? "[…]" : "{…}" : !c.arrayItem && !D.value ? `${c.name}:` : c.name), k = r(() => T.value ? "[Circular]" : typeof c.value == "string" ? JSON.stringify(c.value) : c.value !== null && typeof c.value == "object" ? Array.isArray(c.value) ? "[]" : "{}" : String(c.value));
|
|
27
|
-
return (r, d) => {
|
|
28
|
-
let g = p("ExtensionValue", !0);
|
|
29
|
-
return u(), o("div", { class: l(["relative min-w-0 py-0.5", {
|
|
30
|
-
"ps-8": c.compact ? C.value && D.value : c.depth === 0,
|
|
31
|
-
"flex items-baseline gap-x-2": !c.arrayItem && !D.value
|
|
32
|
-
}]) }, [s("dt", { class: l(c.arrayItem && !D.value ? "sr-only" : "relative flex min-h-5 min-w-0 flex-wrap items-baseline gap-x-2") }, [
|
|
33
|
-
D.value ? (u(), i(h(e), {
|
|
34
|
-
key: 0,
|
|
35
|
-
class: "absolute start-[calc(0px_-_var(--schema-gutter,16px)_-_var(--schema-toggle-half,12px))] top-[0.5lh] -translate-y-1/2",
|
|
36
|
-
fallbackLabel: c.name,
|
|
37
|
-
nameId: h(x),
|
|
38
|
-
open: w.value,
|
|
39
|
-
panelId: h(S),
|
|
40
|
-
panelRendered: w.value,
|
|
41
|
-
onToggle: d[0] ||= (e) => w.value = !w.value
|
|
42
|
-
}, null, 8, [
|
|
43
|
-
"fallbackLabel",
|
|
44
|
-
"nameId",
|
|
45
|
-
"open",
|
|
46
|
-
"panelId",
|
|
47
|
-
"panelRendered"
|
|
48
|
-
])) : a("", !0),
|
|
49
|
-
!c.arrayItem || D.value ? (u(), o("span", {
|
|
50
|
-
key: 1,
|
|
51
|
-
id: c.arrayItem ? void 0 : h(x),
|
|
52
|
-
"aria-hidden": c.arrayItem || void 0,
|
|
53
|
-
class: "font-code min-w-0 font-medium break-words"
|
|
54
|
-
}, m(O.value), 9, v)) : a("", !0),
|
|
55
|
-
c.arrayItem ? (u(), o("span", {
|
|
56
|
-
key: 2,
|
|
57
|
-
id: h(x),
|
|
58
|
-
class: "sr-only"
|
|
59
|
-
}, "Array item " + m(c.name), 9, y)) : a("", !0)
|
|
60
|
-
], 2), D.value && w.value ? (u(), i(h(t), {
|
|
61
|
-
key: 0,
|
|
62
|
-
id: h(S),
|
|
63
|
-
as: "dd",
|
|
64
|
-
class: "mt-0.5",
|
|
65
|
-
depth: c.depth + 1
|
|
66
|
-
}, {
|
|
67
|
-
default: _(() => [s("dl", null, [(u(!0), o(n, null, f(E.value, ([e, t]) => (u(), i(g, {
|
|
68
|
-
key: e,
|
|
69
|
-
ancestors: [...c.ancestors, c.value],
|
|
70
|
-
arrayItem: Array.isArray(c.value),
|
|
71
|
-
depth: c.depth + 1,
|
|
72
|
-
name: e,
|
|
73
|
-
value: t
|
|
74
|
-
}, null, 8, [
|
|
75
|
-
"ancestors",
|
|
76
|
-
"arrayItem",
|
|
77
|
-
"depth",
|
|
78
|
-
"name",
|
|
79
|
-
"value"
|
|
80
|
-
]))), 128))])]),
|
|
81
|
-
_: 1
|
|
82
|
-
}, 8, ["id", "depth"])) : D.value ? a("", !0) : (u(), o("dd", {
|
|
83
|
-
key: 1,
|
|
84
|
-
class: l(["text-c-2 min-w-0", { "flex-1": !c.arrayItem }])
|
|
85
|
-
}, [s("code", b, m(k.value), 1)], 2))], 2);
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
export { x as default };
|
|
90
|
-
|
|
91
|
-
//# sourceMappingURL=ExtensionValue.vue_vue_type_script_setup_true_lang.js.map
|
package/dist/specification-extensions/ExtensionValue.vue_vue_type_script_setup_true_lang.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionValue.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_createBlock","_unref","SchemaGutterToggle","_toDisplayString","SchemaRailPanel","_withCtx","_Fragment","_renderList","SchemaGutterToggle_default","SchemaRailPanel_default","_hoisted_1","_hoisted_2","_hoisted_3","ExtensionValue_vue_vue_type_script_setup_true_lang_default","nameId","useId","panelId","isTopLevel","computed","__props","open","ref","circular","children","index","item","expandable","label","text","_component_ExtensionValue","resolveComponent","openBlock","createElementBlock","normalizeClass","createElementVNode","createBlock","unref","_cache","createCommentVNode","toDisplayString","withCtx","Fragment","renderList","childName","childValue"],"sources":["../../src/specification-extensions/ExtensionValue.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, useId } from 'vue'\n\nimport { SchemaGutterToggle, SchemaRailPanel } from '../schema'\n\nconst {\n name,\n value,\n depth = 0,\n compact = false,\n arrayItem = false,\n ancestors = [],\n topLevel = false,\n} = defineProps<{\n name: string\n value: unknown\n depth?: number\n /** Primitive values can align with the surrounding panel content. */\n compact?: boolean\n /** Array entries display only their values; keep their names for assistive technology. */\n arrayItem?: boolean\n /** Only ancestors count as cycles; shared sibling values remain independently expandable. */\n ancestors?: readonly unknown[]\n /** Treat a direct child of the extensions disclosure as a top-level extension. */\n topLevel?: boolean\n}>()\n\nconst nameId = useId()\nconst panelId = useId()\nconst isTopLevel = computed<boolean>(() => depth === 0 || topLevel)\nconst open = ref(isTopLevel.value)\nconst circular = computed<boolean>(() => ancestors.includes(value))\nconst children = computed<[string, unknown][]>(() => {\n if (value === null || typeof value !== 'object' || circular.value) {\n return []\n }\n return Array.isArray(value)\n ? value.map((item, index) => [`[${index}]`, item])\n : Object.entries(value)\n})\nconst expandable = computed<boolean>(() => children.value.length > 0)\nconst label = computed<string>(() => {\n if (arrayItem && expandable.value) {\n return Array.isArray(value) ? '[…]' : '{…}'\n }\n return !arrayItem && !expandable.value ? `${name}:` : name\n})\nconst text = computed<string>(() => {\n if (circular.value) {\n return '[Circular]'\n }\n if (typeof value === 'string') {\n return JSON.stringify(value)\n }\n if (value !== null && typeof value === 'object') {\n return Array.isArray(value) ? '[]' : '{}'\n }\n return String(value)\n})\n</script>\n\n<template>\n <div\n class=\"relative min-w-0 py-0.5\"\n :class=\"{\n 'ps-8': compact ? isTopLevel && expandable : depth === 0,\n 'flex items-baseline gap-x-2': !arrayItem && !expandable,\n }\">\n <dt\n :class=\"\n arrayItem && !expandable\n ? 'sr-only'\n : 'relative flex min-h-5 min-w-0 flex-wrap items-baseline gap-x-2'\n \">\n <SchemaGutterToggle\n v-if=\"expandable\"\n class=\"absolute start-[calc(0px_-_var(--schema-gutter,16px)_-_var(--schema-toggle-half,12px))] top-[0.5lh] -translate-y-1/2\"\n :fallbackLabel=\"name\"\n :nameId=\"nameId\"\n :open=\"open\"\n :panelId=\"panelId\"\n :panelRendered=\"open\"\n @toggle=\"open = !open\" />\n <span\n v-if=\"!arrayItem || expandable\"\n :id=\"arrayItem ? undefined : nameId\"\n :aria-hidden=\"arrayItem || undefined\"\n class=\"font-code min-w-0 font-medium break-words\"\n >{{ label }}</span\n >\n <span\n v-if=\"arrayItem\"\n :id=\"nameId\"\n class=\"sr-only\"\n >Array item {{ name }}</span\n >\n </dt>\n <SchemaRailPanel\n v-if=\"expandable && open\"\n :id=\"panelId\"\n as=\"dd\"\n class=\"mt-0.5\"\n :depth=\"depth + 1\">\n <dl>\n <ExtensionValue\n v-for=\"[childName, childValue] in children\"\n :key=\"childName\"\n :ancestors=\"[...ancestors, value]\"\n :arrayItem=\"Array.isArray(value)\"\n :depth=\"depth + 1\"\n :name=\"childName\"\n :value=\"childValue\" />\n </dl>\n </SchemaRailPanel>\n <dd\n v-else-if=\"!expandable\"\n class=\"text-c-2 min-w-0\"\n :class=\"{ 'flex-1': !arrayItem }\">\n <code class=\"font-code break-words whitespace-pre-wrap\">{{ text }}</code>\n </dd>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EA2BA,IAAMkB,IAAS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.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import e from "../schema/SchemaGutterToggle.vue.js";
|
|
2
|
-
import t from "../schema/SchemaRailPanel.vue.js";
|
|
3
|
-
import { useLocalization as n } from "../schema/localization/index.js";
|
|
4
|
-
import r from "./ExtensionValue.vue.js";
|
|
5
|
-
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, normalizeClass as f, openBlock as p, ref as m, renderList as h, toDisplayString as g, unref as _, useId as v, withCtx as y } from "vue";
|
|
6
|
-
// src/specification-extensions/SpecificationExtensions.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var b = { class: "relative flex min-h-5 min-w-0 items-baseline" }, x = ["id"], S = { class: "min-w-0" }, C = /*@__PURE__*/ d({
|
|
8
|
-
__name: "SpecificationExtensions",
|
|
9
|
-
props: {
|
|
10
|
-
extensions: {},
|
|
11
|
-
compact: {
|
|
12
|
-
type: Boolean,
|
|
13
|
-
default: !1
|
|
14
|
-
},
|
|
15
|
-
collapsible: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: !1
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
setup(d) {
|
|
21
|
-
let { translate: C } = n(), w = a(() => Object.keys(d.extensions).length), T = a(() => C("schema.extensionCount", { count: String(w.value) })), E = v(), D = v(), O = m(!1);
|
|
22
|
-
return (n, a) => w.value && d.collapsible ? (p(), c("div", {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: f(["relative min-w-0 py-0.5 ps-8 text-base", { "my-2": !d.compact }])
|
|
25
|
-
}, [l("div", b, [u(_(e), {
|
|
26
|
-
class: "absolute start-[calc(0px_-_var(--schema-gutter,16px)_-_var(--schema-toggle-half,12px))] top-[0.5lh] -translate-y-1/2",
|
|
27
|
-
fallbackLabel: T.value,
|
|
28
|
-
nameId: _(E),
|
|
29
|
-
open: O.value,
|
|
30
|
-
panelId: _(D),
|
|
31
|
-
panelRendered: O.value,
|
|
32
|
-
onToggle: a[0] ||= (e) => O.value = !O.value
|
|
33
|
-
}, null, 8, [
|
|
34
|
-
"fallbackLabel",
|
|
35
|
-
"nameId",
|
|
36
|
-
"open",
|
|
37
|
-
"panelId",
|
|
38
|
-
"panelRendered"
|
|
39
|
-
]), l("span", {
|
|
40
|
-
id: _(E),
|
|
41
|
-
class: "text-c-2 min-w-0 font-medium break-words"
|
|
42
|
-
}, g(T.value), 9, x)]), O.value ? (p(), o(_(t), {
|
|
43
|
-
key: 0,
|
|
44
|
-
id: _(D),
|
|
45
|
-
class: "mt-0.5",
|
|
46
|
-
depth: 1
|
|
47
|
-
}, {
|
|
48
|
-
default: y(() => [l("dl", S, [(p(!0), c(i, null, h(d.extensions, (e, t) => (p(), o(r, {
|
|
49
|
-
key: t,
|
|
50
|
-
compact: d.compact,
|
|
51
|
-
depth: 1,
|
|
52
|
-
name: t,
|
|
53
|
-
topLevel: "",
|
|
54
|
-
value: e
|
|
55
|
-
}, null, 8, [
|
|
56
|
-
"compact",
|
|
57
|
-
"name",
|
|
58
|
-
"value"
|
|
59
|
-
]))), 128))])]),
|
|
60
|
-
_: 1
|
|
61
|
-
}, 8, ["id"])) : s("", !0)], 2)) : w.value ? (p(), c("dl", {
|
|
62
|
-
key: 1,
|
|
63
|
-
class: f(["min-w-0 text-base", { "my-2": !d.compact }])
|
|
64
|
-
}, [(p(!0), c(i, null, h(d.extensions, (e, t) => (p(), o(r, {
|
|
65
|
-
key: t,
|
|
66
|
-
compact: d.compact,
|
|
67
|
-
name: t,
|
|
68
|
-
value: e
|
|
69
|
-
}, null, 8, [
|
|
70
|
-
"compact",
|
|
71
|
-
"name",
|
|
72
|
-
"value"
|
|
73
|
-
]))), 128))], 2)) : s("", !0);
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
export { C as default };
|
|
77
|
-
|
|
78
|
-
//# sourceMappingURL=SpecificationExtensions.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SpecificationExtensions.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_createVNode","_unref","SchemaGutterToggle","_toDisplayString","_createBlock","SchemaRailPanel","_withCtx","_Fragment","_renderList","ExtensionValue","SchemaGutterToggle_default","SchemaRailPanel_default","ExtensionValue_default","_hoisted_1","_hoisted_2","_hoisted_3","SpecificationExtensions_vue_vue_type_script_setup_true_lang_default","useLocalization","count","computed","__props","heading","translate","headingId","useId","panelId","open","ref","openBlock","createElementBlock","normalizeClass","createElementVNode","createVNode","unref","_cache","toDisplayString","createBlock","withCtx","Fragment","renderList","name","createCommentVNode"],"sources":["../../src/specification-extensions/SpecificationExtensions.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, useId } from 'vue'\n\nimport { SchemaGutterToggle, SchemaRailPanel } from '../schema'\nimport { useLocalization } from '../schema/localization'\nimport ExtensionValue from './ExtensionValue.vue'\n\n/** Display extension values using the same property rows and controls as schemas. */\nconst {\n extensions,\n compact = false,\n collapsible = false,\n} = defineProps<{\n /** Selected extension keys and their original values, in display order. */\n extensions: Record<string, unknown>\n /** Let the containing panel provide spacing around primitive values. */\n compact?: boolean\n /**\n * Fold the values under an \"Extensions (n)\" row, closed until opened, with\n * the same disclosure control as nested values. For surfaces where the\n * extensions matter less than the content around them.\n */\n collapsible?: boolean\n}>()\n\nconst { translate } = useLocalization()\n\nconst count = computed<number>(() => Object.keys(extensions).length)\nconst heading = computed<string>(() =>\n translate('schema.extensionCount', { count: String(count.value) }),\n)\nconst headingId = useId()\nconst panelId = useId()\nconst open = ref(false)\n</script>\n\n<template>\n <div\n v-if=\"count && collapsible\"\n class=\"relative min-w-0 py-0.5 ps-8 text-base\"\n :class=\"{ 'my-2': !compact }\">\n <div class=\"relative flex min-h-5 min-w-0 items-baseline\">\n <SchemaGutterToggle\n class=\"absolute start-[calc(0px_-_var(--schema-gutter,16px)_-_var(--schema-toggle-half,12px))] top-[0.5lh] -translate-y-1/2\"\n :fallbackLabel=\"heading\"\n :nameId=\"headingId\"\n :open=\"open\"\n :panelId=\"panelId\"\n :panelRendered=\"open\"\n @toggle=\"open = !open\" />\n <span\n :id=\"headingId\"\n class=\"text-c-2 min-w-0 font-medium break-words\"\n >{{ heading }}</span\n >\n </div>\n <SchemaRailPanel\n v-if=\"open\"\n :id=\"panelId\"\n class=\"mt-0.5\"\n :depth=\"1\">\n <dl class=\"min-w-0\">\n <ExtensionValue\n v-for=\"(value, name) in extensions\"\n :key=\"name\"\n :compact=\"compact\"\n :depth=\"1\"\n :name=\"name\"\n topLevel\n :value=\"value\" />\n </dl>\n </SchemaRailPanel>\n </div>\n <dl\n v-else-if=\"count\"\n class=\"min-w-0 text-base\"\n :class=\"{ 'my-2': !compact }\">\n <ExtensionValue\n v-for=\"(value, name) in extensions\"\n :key=\"name\"\n :compact=\"compact\"\n :name=\"name\"\n :value=\"value\" />\n </dl>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAyBA,IAAM,EAAE,iBAAcqB,EAAgB,GAEhCC,IAAQC,QAAuB,OAAO,KAAKC,EAAA,UAAU,CAAC,CAAC,MAAM,GAC7DC,IAAUF,QACdG,EAAU,yBAAyB,EAAE,OAAO,OAAOJ,EAAM,KAAK,EAAE,CAAC,CACnE,GACMK,IAAYC,EAAM,GAClBC,IAAUD,EAAM,GAChBE,IAAOC,EAAI,EAAK;E,iBAKZT,EAAA,SAASE,EAAA,eADjBxB,EAAA,GAAAC,EAmCM,OAAA;;GAjCJ,OAAKC,EAAA,CAAC,0CAAwC,EAAA,QAAA,CAC3BsB,EAAA,QAAO,CAAA,CAAA;E,IAC1BrB,EAcM,OAdNc,GAcM,CAbJb,EAO2BC,EAAAC,CAAA,GAAA;GANzB,OAAM;GACL,eAAemB,EAAA;GACf,QAAQpB,EAAAsB,CAAA;GACR,MAAMG,EAAA;GACN,SAASzB,EAAAwB,CAAA;GACT,eAAeC,EAAA;GACf,UAA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