@fumadocs/api-docs 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/css/generated/shared.css +1 -0
- package/css/preset.css +1 -0
- package/dist/.translations/index.d.ts +28 -0
- package/dist/.translations/keys.js +28 -0
- package/dist/_virtual/_rolldown/runtime.js +4 -0
- package/dist/auto-anchor/client.d.ts +16 -0
- package/dist/auto-anchor/client.js +20 -0
- package/dist/auto-anchor/index.d.ts +9 -0
- package/dist/auto-anchor/index.js +17 -0
- package/dist/codegen.d.ts +38 -0
- package/dist/codegen.js +35 -0
- package/dist/components/accordion.d.ts +22 -0
- package/dist/components/accordion.js +67 -0
- package/dist/components/dialog.d.ts +39 -0
- package/dist/components/dialog.js +61 -0
- package/dist/components/input.d.ts +8 -0
- package/dist/components/input.js +17 -0
- package/dist/components/playground/inputs.d.ts +50 -0
- package/dist/components/playground/inputs.js +426 -0
- package/dist/components/playground/schema.d.ts +66 -0
- package/dist/components/playground/schema.js +144 -0
- package/dist/components/schema/client.d.ts +17 -0
- package/dist/components/schema/client.js +415 -0
- package/dist/components/schema/index.d.ts +102 -0
- package/dist/components/schema/index.js +276 -0
- package/dist/components/select-tab.d.ts +33 -0
- package/dist/components/select-tab.js +56 -0
- package/dist/components/select.d.ts +16 -0
- package/dist/components/select.js +72 -0
- package/dist/components/spinner.d.ts +7 -0
- package/dist/components/spinner.js +14 -0
- package/dist/i18n.d.ts +7 -0
- package/dist/i18n.js +7 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/bundle.js +239 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/dereference.js +187 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.d.ts +157 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.js +136 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/normalize-args.js +41 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/options.d.ts +166 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/options.js +124 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parse.js +109 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/binary.js +30 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/json.js +46 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/text.js +36 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/yaml.js +49 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/pointer.d.ts +96 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/pointer.js +242 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/ref.d.ts +190 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/ref.js +247 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/refs.d.ts +134 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/refs.js +210 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolve-external.js +100 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/file.js +41 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/http.js +112 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/types/index.d.ts +133 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js +8 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/errors.d.ts +34 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/errors.js +146 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/is-windows.js +5 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/maybe.js +18 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/next.js +11 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/plugins.js +99 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/schema-resources.js +30 -0
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js +315 -0
- package/dist/node_modules/.pnpm/@fastify_deepmerge@3.2.1/node_modules/@fastify/deepmerge/index.js +108 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js +110 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js +138 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js +674 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js +141 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js +102 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js +223 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js +28 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js +18 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js +133 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js +61 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js +146 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js +23 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js +48 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js +172 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js +31 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js +433 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js +113 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js +72 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js +583 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.js +18 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +42 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.js +50 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.js +20 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.js +51 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.js +16 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.js +36 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.js +19 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.js +85 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.js +59 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js +12 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js +25 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js +12 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js +16 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +57 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +96 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +29 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +16 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +89 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +87 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +16 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js +62 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js +60 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js +59 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +34 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js +31 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +51 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +61 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +17 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +52 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +41 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +17 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js +130 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js +14 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js +22 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js +112 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +101 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +14 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js +35 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +46 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +45 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js +22 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +20 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +15 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js +10 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js +23 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js +19 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js +13 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +46 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +59 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js +27 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +17 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js +49 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js +48 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js +18 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +28 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +33 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +47 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +28 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +27 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +38 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js +72 -0
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +70 -0
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +33 -0
- package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js +236 -0
- package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js +187 -0
- package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js +282 -0
- package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +78 -0
- package/dist/schema/bundle.d.ts +2 -0
- package/dist/schema/bundle.js +2 -0
- package/dist/schema/dereference.d.ts +19 -0
- package/dist/schema/dereference.js +49 -0
- package/dist/schema/index.d.ts +21 -0
- package/dist/schema/index.js +0 -0
- package/dist/schema/merge.d.ts +12 -0
- package/dist/schema/merge.js +156 -0
- package/dist/schema/ref.d.ts +20 -0
- package/dist/schema/ref.js +43 -0
- package/dist/schema/resolve-ref.d.ts +4 -0
- package/dist/schema/resolve-ref.js +11 -0
- package/dist/schema/sample.d.ts +12 -0
- package/dist/schema/sample.js +442 -0
- package/dist/schema/to-string.d.ts +10 -0
- package/dist/schema/to-string.js +51 -0
- package/dist/utils/cn.js +2 -0
- package/dist/utils/deep-equal.js +21 -0
- package/dist/utils/id-to-title.d.ts +4 -0
- package/dist/utils/id-to-title.js +12 -0
- package/dist/utils/is-plain-object.js +8 -0
- package/dist/utils/merge-refs.js +11 -0
- package/dist/utils/url.d.ts +5 -0
- package/dist/utils/url.js +13 -0
- package/package.json +105 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Fuma
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@source inline("!isDefined *:data-[collapsible=true]:order-last *:min-w-0 --min-height --radix-popover-content-available-width -mx-3 -translate-x-1/2 -translate-y-1/2 @container @default @fuma-translate/react @fumari/stf @md:grid-cols-2 @param @radix-ui/react-accordion @radix-ui/react-dialog @radix-ui/react-select [&_svg]:size-3.5 a absolute accordion actual additionalProperties again ajv aliasName allOf always an anchor anchorIdStartsWith anchorSegments and animate-spin any anyFields anyOf applicable aria-label array as asSchema autoIds avoid backdrop-blur-sm be behavior bg-black/30 bg-fd-background/50 bg-fd-muted bg-fd-popover bg-fd-primary bg-fd-secondary binary block body boolean border border-b border-fd-primary/20 border-t both button buttonVariants catch children class-variance-authority className client clientHeight closed cn code col-span-full collapsible collisionPadding color const content createContext ctx current currentValue cva dark:text-yellow-400 data-[disabled]:opacity-50 data-[disabled]:pointer-events-none data-[state=closed]:animate-fd-accordion-up data-[state=closed]:animate-fd-dialog-out data-[state=closed]:animate-fd-fade-out data-[state=open]:animate-fd-accordion-down data-[state=open]:animate-fd-dialog-in data-[state=open]:animate-fd-fade-in data-[state=open]:text-fd-accent-foreground data-collapsible data-object-search-input data-placeholder:text-fd-muted-foreground dataEngine decoded default defaultValue deferredValue define delete deprecated depth dereference dereferenceShallow dereferenced description disabled:cursor-not-allowed disabled:opacity-50 display displayName div doc docRoot duplicated duration-200 dynamic element else empty empty:hidden end end-2 engine ensure enum example examples exclusiveMax exclusiveMin export extends fallback false fd-scroll-container field fieldData fieldLabelVariants fieldName fields file files filtered first first:border-t-0 firstItemRef fixed flex flex-1 flex-col flex-col-reverse flex-row flex-wrap focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-fd-ring focus-within:[&_svg]:text-fd-primary focus-within:ring-2 focus-within:ring-fd-ring focus:bg-fd-accent focus:outline-none focus:ring focus:ring-fd-ring focus:text-fd-accent-foreground font-medium font-mono font-semibold for format forwardRef from function gap-0.5 gap-1 gap-1.5 gap-2 gap-4 generate generateDefault generated ghost grid grid-cols-1 group-data-[state=open]/accordion:rotate-90 group/accordion h-10 h-9 h-[240px] h-px hash hidden hiddenProperties highlighted hook hover:bg-fd-accent hover:text-fd-accent-foreground hover:underline htmlFor i icon-sm icon-xs id idx if ignore import in in-popover include index indexItemMatch info infoTags initial inline-flex input inset-0 instanceof integer interface invalid is isDefined isDuplicated isDynamic isLazy isNumber isRequired it item itemId items items-center items-start j justify-center key kind label labelVariants labels last:border-b-0 lazy leading-none left-1/2 length let line-through lucide-react match matching max max-h-[460px] max-w-(--radix-popover-content-available-width) max-w-full max-w-lg mb-auto md me-auto merge mergeAllOf mergeRefs min min-h-(--min-height,200px) min-w-0 ms-auto mt-2 multiple multipleOf must mx-1 my-1 my-2 my-2! name namespace nested never new next not-prose note null number object objectSearchOverrides objects of omit onChange onClick onKeyDown onOpenAutoFocus onOpenChange onScrollEnd onValueChange oneOf only opacity-80 open or order-last out outline outline-none overflow-hidden overflow-x-auto overflow-y-hidden overview p-1 p-1.5 p-2 p-4 param parentItem parentPathIndex part path pathIndex pathName pattern patternProperties pb-0 pe-2 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 placeholder placeholder:text-fd-muted-foreground playground popover popoverRef position prev preventScroll primitive prop properties property props prose-no-margin ps-2 ps-3 ps-6 pt-0 px px-2 px-3 px-4 py-0 py-1 py-1.5 py-2 py-4 quiet range raw rawRef rawSearch re-triggering react read readOnly ref refs remove removeItem render renderMarkdown renderTypeInfoTrigger represents required resize-none resolver return role root rootId rotate-90 rounded-lg rounded-md rounded-sm rounded-xl s-highlight same sample satisfies schema schemaPropKeys schemaToString scroll scroll-m-20 scrollTop search secondary section segments select-none selected selectedType sep setError setInfo setNextName setOpen setPath setSearch setShow setValue shadow-lg shadow-md shadow-sm show showExample showSelect shrink-0 simplified single size size-3.5 size-4 skipNonRequired skipReadOnly slotType sm sm:flex-row sm:gap-2 sm:justify-end sm:text-start smooth stable states status step stf sticky store strict string stringifyFieldKey such svg t tab tabDepth tabValues tag tags target text text-[0.8125rem] text-center text-end text-fd-foreground text-fd-muted-foreground text-fd-muted-foreground/70 text-fd-popover-foreground text-fd-primary text-fd-primary-foreground text-fd-secondary-foreground text-lg text-orange-400 text-red-400 text-red-400/80 text-sm text-start text-xs text-yellow-600 that the tiem to toolbar top top-0 top-1/2 top-10 top-2 tracking-tight transition-colors transition-transform trigger true truncate try type typeName typeVariants typeof types undefined underline union unionField unknown updateInfo updated url use useAnchorId useCopyButton useFieldValue useMemo useNamespace useObject useRef useState useTranslations validateFormats validateSchema value valueIn valueSchema values variant variants w-0 w-[600px] w-fit w-full will with wrap-break-word write writeOnly x-playground-lazy z-20 z-50");
|
package/css/preset.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import './generated/shared.css';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region src/.translations/index.d.ts
|
|
2
|
+
type Translations = {
|
|
3
|
+
"Default(schema UI)": string;
|
|
4
|
+
"Deprecated(schema UI)": string;
|
|
5
|
+
"Enter Property Name(playground)": string;
|
|
6
|
+
"Enter value(playground)": string;
|
|
7
|
+
"Example(schema UI)": string;
|
|
8
|
+
"Filter Properties(schema UI)": string;
|
|
9
|
+
"Format(schema UI)": string;
|
|
10
|
+
"Items(schema UI)": string;
|
|
11
|
+
"Length(schema UI)": string;
|
|
12
|
+
"Match(schema UI)": string;
|
|
13
|
+
"Multiple Of(schema UI)": string;
|
|
14
|
+
"New Item(playground)": string;
|
|
15
|
+
"New(playground)": string;
|
|
16
|
+
"No property matching(schema UI)": string;
|
|
17
|
+
"Properties(schema UI)": string;
|
|
18
|
+
"Range(schema UI)": string;
|
|
19
|
+
"Remove Item(playground)(aria-label)": string;
|
|
20
|
+
"Select(playground)": string;
|
|
21
|
+
"Selected(playground)": string;
|
|
22
|
+
"Show Property(playground)": string;
|
|
23
|
+
"Unset(playground)": string;
|
|
24
|
+
"Upload(playground)": string;
|
|
25
|
+
"Value in(schema UI)": string;
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { Translations };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region src/.translations/keys.json
|
|
2
|
+
var keys_default = [
|
|
3
|
+
"Default(schema UI)",
|
|
4
|
+
"Deprecated(schema UI)",
|
|
5
|
+
"Enter Property Name(playground)",
|
|
6
|
+
"Enter value(playground)",
|
|
7
|
+
"Example(schema UI)",
|
|
8
|
+
"Filter Properties(schema UI)",
|
|
9
|
+
"Format(schema UI)",
|
|
10
|
+
"Items(schema UI)",
|
|
11
|
+
"Length(schema UI)",
|
|
12
|
+
"Match(schema UI)",
|
|
13
|
+
"Multiple Of(schema UI)",
|
|
14
|
+
"New Item(playground)",
|
|
15
|
+
"New(playground)",
|
|
16
|
+
"No property matching(schema UI)",
|
|
17
|
+
"Properties(schema UI)",
|
|
18
|
+
"Range(schema UI)",
|
|
19
|
+
"Remove Item(playground)(aria-label)",
|
|
20
|
+
"Select(playground)",
|
|
21
|
+
"Selected(playground)",
|
|
22
|
+
"Show Property(playground)",
|
|
23
|
+
"Unset(playground)",
|
|
24
|
+
"Upload(playground)",
|
|
25
|
+
"Value in(schema UI)"
|
|
26
|
+
];
|
|
27
|
+
//#endregion
|
|
28
|
+
export { keys_default as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/auto-anchor/client.d.ts
|
|
4
|
+
/** Append segment to anchor IDs */
|
|
5
|
+
declare function AnchorSection({
|
|
6
|
+
segments,
|
|
7
|
+
children
|
|
8
|
+
}: {
|
|
9
|
+
segments: string[];
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
declare function useAnchorId(segments: false): null;
|
|
13
|
+
declare function useAnchorId(segments: string[]): string;
|
|
14
|
+
declare function useAnchorId(segments: string[] | false): string | null;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { AnchorSection, useAnchorId };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { anchorSegments } from "./index.js";
|
|
3
|
+
import { createContext, use, useMemo } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/auto-anchor/client.tsx
|
|
6
|
+
const AnchorContext = createContext([]);
|
|
7
|
+
/** Append segment to anchor IDs */
|
|
8
|
+
function AnchorSection({ segments, children }) {
|
|
9
|
+
const v = use(AnchorContext);
|
|
10
|
+
return /* @__PURE__ */ jsx(AnchorContext, {
|
|
11
|
+
value: useMemo(() => [...v, ...segments], [v, segments]),
|
|
12
|
+
children
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function useAnchorId(segments) {
|
|
16
|
+
if (!segments) return null;
|
|
17
|
+
return anchorSegments(...use(AnchorContext), ...segments);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { AnchorSection, useAnchorId };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/auto-anchor/index.d.ts
|
|
2
|
+
/** slugify segments, append `\0` to keep segment as-is */
|
|
3
|
+
declare function anchorSegments(...segs: string[]): string;
|
|
4
|
+
/**
|
|
5
|
+
* Check if `id1` starts with `id2`
|
|
6
|
+
*/
|
|
7
|
+
declare function anchorIdStartsWith(id1: string, id2: string): boolean;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { anchorIdStartsWith, anchorSegments };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { slug } from "github-slugger";
|
|
2
|
+
//#region src/auto-anchor/index.ts
|
|
3
|
+
/** slugify segments, append `\0` to keep segment as-is */
|
|
4
|
+
function anchorSegments(...segs) {
|
|
5
|
+
const mapped = [];
|
|
6
|
+
for (const seg of segs) if (seg.startsWith("\0")) mapped.push(seg.slice(1));
|
|
7
|
+
else if (seg.length > 0) mapped.push(slug(seg));
|
|
8
|
+
return mapped.join(".");
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Check if `id1` starts with `id2`
|
|
12
|
+
*/
|
|
13
|
+
function anchorIdStartsWith(id1, id2) {
|
|
14
|
+
return id1 === id2 || id1.startsWith(`${id2}.`);
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { anchorIdStartsWith, anchorSegments };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region src/codegen.d.ts
|
|
2
|
+
interface CodeUsageGeneratorRegistry<Data = unknown, Context = unknown> {
|
|
3
|
+
add: (id: string, generator: CodeUsageGenerator<Data, Context>) => void;
|
|
4
|
+
get: (id: string) => CodeUsageGenerator<Data, Context> | undefined;
|
|
5
|
+
addInline: (generator: InlineCodeUsageGenerator<Data, Context>) => void;
|
|
6
|
+
/**
|
|
7
|
+
* @returns if the generator is removed
|
|
8
|
+
*/
|
|
9
|
+
remove: (id: string) => boolean;
|
|
10
|
+
map: () => Map<string, CodeUsageGenerator<Data, Context>>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Generate code example for given programming language
|
|
14
|
+
*/
|
|
15
|
+
interface CodeUsageGenerator<Data = unknown, Context = unknown> {
|
|
16
|
+
generate: (data: Data, context: Context) => string;
|
|
17
|
+
lang: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Generate code example for given programming language
|
|
22
|
+
*/
|
|
23
|
+
interface InlineCodeUsageGenerator<Data = unknown, Context = unknown> {
|
|
24
|
+
id?: string;
|
|
25
|
+
lang: string;
|
|
26
|
+
label?: string;
|
|
27
|
+
/**
|
|
28
|
+
* either:
|
|
29
|
+
* - code
|
|
30
|
+
* - a function imported from a file with "use client" directive
|
|
31
|
+
* - false (disabled)
|
|
32
|
+
*/
|
|
33
|
+
source?: string | CodeUsageGeneratorFn<Data, Context> | false;
|
|
34
|
+
}
|
|
35
|
+
declare function createCodeUsageGeneratorRegistry<Data, Context>(inherit?: CodeUsageGeneratorRegistry<Data, Context>): CodeUsageGeneratorRegistry<Data, Context>;
|
|
36
|
+
type CodeUsageGeneratorFn<Data, Context> = (data: Data, context: Context) => string;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { CodeUsageGenerator, CodeUsageGeneratorRegistry, InlineCodeUsageGenerator, createCodeUsageGeneratorRegistry };
|
package/dist/codegen.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region src/codegen.ts
|
|
2
|
+
function createCodeUsageGeneratorRegistry(inherit) {
|
|
3
|
+
const registry = new Map(inherit?.map());
|
|
4
|
+
return {
|
|
5
|
+
add(id, generator) {
|
|
6
|
+
registry.set(id, generator);
|
|
7
|
+
},
|
|
8
|
+
get(id) {
|
|
9
|
+
return registry.get(id);
|
|
10
|
+
},
|
|
11
|
+
addInline(generator) {
|
|
12
|
+
const source = generator.source;
|
|
13
|
+
const id = generator.id ?? generator.lang;
|
|
14
|
+
if (!source) {
|
|
15
|
+
this.remove(id);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
registry.set(id, {
|
|
19
|
+
lang: generator.lang,
|
|
20
|
+
label: generator.label,
|
|
21
|
+
generate() {
|
|
22
|
+
return typeof source === "string" ? source : "";
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
remove(id) {
|
|
27
|
+
return registry.delete(id);
|
|
28
|
+
},
|
|
29
|
+
map() {
|
|
30
|
+
return registry;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { createCodeUsageGeneratorRegistry };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import * as Primitive from "@radix-ui/react-accordion";
|
|
3
|
+
|
|
4
|
+
//#region src/components/accordion.d.ts
|
|
5
|
+
declare function Accordions({
|
|
6
|
+
type,
|
|
7
|
+
defaultValue,
|
|
8
|
+
...props
|
|
9
|
+
}: Omit<ComponentProps<typeof Primitive.Root>, 'value' | 'onValueChange'>): import("react").JSX.Element;
|
|
10
|
+
declare function AccordionItem({
|
|
11
|
+
value,
|
|
12
|
+
className,
|
|
13
|
+
anchorSegments,
|
|
14
|
+
...props
|
|
15
|
+
}: ComponentProps<typeof Primitive.Item> & {
|
|
16
|
+
/** define the accordion as an anchor section */anchorSegments?: string[];
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
declare function AccordionContent(props: ComponentProps<typeof Primitive.Content>): import("react").JSX.Element;
|
|
19
|
+
declare function AccordionHeader(props: ComponentProps<typeof Primitive.Header>): import("react").JSX.Element;
|
|
20
|
+
declare function AccordionTrigger(props: ComponentProps<typeof Primitive.Trigger>): import("react").JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger, Accordions };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { anchorIdStartsWith } from "../auto-anchor/index.js";
|
|
3
|
+
import { AnchorSection, useAnchorId } from "../auto-anchor/client.js";
|
|
4
|
+
import { cn } from "../utils/cn.js";
|
|
5
|
+
import { createContext, use, useEffect, useMemo, useState } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import * as Primitive from "@radix-ui/react-accordion";
|
|
8
|
+
import { ChevronRight } from "lucide-react";
|
|
9
|
+
//#region src/components/accordion.tsx
|
|
10
|
+
const Context = createContext(null);
|
|
11
|
+
function Accordions({ type, defaultValue, ...props }) {
|
|
12
|
+
const [value, setValue] = useState(() => type === "multiple" ? defaultValue ?? [] : defaultValue ?? "");
|
|
13
|
+
return /* @__PURE__ */ jsx(Context, {
|
|
14
|
+
value: useMemo(() => ({
|
|
15
|
+
type,
|
|
16
|
+
setValue
|
|
17
|
+
}), [type]),
|
|
18
|
+
children: /* @__PURE__ */ jsx(Primitive.Root, {
|
|
19
|
+
type,
|
|
20
|
+
value,
|
|
21
|
+
onValueChange: setValue,
|
|
22
|
+
...props
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function AccordionItem({ value, className, anchorSegments, ...props }) {
|
|
27
|
+
const ctx = use(Context);
|
|
28
|
+
const id = useAnchorId(anchorSegments ?? false);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (id && anchorIdStartsWith(window.location.hash.slice(1), id)) ctx.setValue(ctx.type === "single" ? value : [value]);
|
|
31
|
+
}, [
|
|
32
|
+
value,
|
|
33
|
+
id,
|
|
34
|
+
ctx
|
|
35
|
+
]);
|
|
36
|
+
const content = /* @__PURE__ */ jsx(Primitive.Item, {
|
|
37
|
+
value,
|
|
38
|
+
className: cn("scroll-m-20 border-b last:border-b-0", className),
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
return anchorSegments ? /* @__PURE__ */ jsx(AnchorSection, {
|
|
42
|
+
segments: anchorSegments,
|
|
43
|
+
children: content
|
|
44
|
+
}) : content;
|
|
45
|
+
}
|
|
46
|
+
function AccordionContent(props) {
|
|
47
|
+
return /* @__PURE__ */ jsx(Primitive.Content, {
|
|
48
|
+
...props,
|
|
49
|
+
className: cn("overflow-hidden data-[state=closed]:animate-fd-accordion-up data-[state=open]:animate-fd-accordion-down", props.className)
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function AccordionHeader(props) {
|
|
53
|
+
return /* @__PURE__ */ jsx(Primitive.Header, {
|
|
54
|
+
...props,
|
|
55
|
+
className: cn("not-prose flex text-fd-foreground font-medium", props.className),
|
|
56
|
+
children: props.children
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function AccordionTrigger(props) {
|
|
60
|
+
return /* @__PURE__ */ jsxs(Primitive.Trigger, {
|
|
61
|
+
...props,
|
|
62
|
+
className: cn("flex flex-1 items-center gap-1 text-start group/accordion py-2 focus-visible:outline-none", props.className),
|
|
63
|
+
children: [/* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 text-fd-muted-foreground shrink-0 transition-transform group-data-[state=open]/accordion:rotate-90" }), props.children]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger, Accordions };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
|
|
4
|
+
//#region src/components/dialog.d.ts
|
|
5
|
+
declare const Dialog: import("react").FC<DialogPrimitive.DialogProps>;
|
|
6
|
+
declare const DialogTrigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogPortal: import("react").FC<DialogPrimitive.DialogPortalProps>;
|
|
8
|
+
declare const DialogClose: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare function DialogOverlay({
|
|
10
|
+
className,
|
|
11
|
+
ref,
|
|
12
|
+
...props
|
|
13
|
+
}: ComponentProps<typeof DialogPrimitive.Overlay>): import("react").JSX.Element;
|
|
14
|
+
declare function DialogContent({
|
|
15
|
+
className,
|
|
16
|
+
children,
|
|
17
|
+
ref,
|
|
18
|
+
...props
|
|
19
|
+
}: ComponentProps<typeof DialogPrimitive.Content>): import("react").JSX.Element;
|
|
20
|
+
declare function DialogHeader({
|
|
21
|
+
className,
|
|
22
|
+
...props
|
|
23
|
+
}: ComponentProps<'div'>): import("react").JSX.Element;
|
|
24
|
+
declare function DialogFooter({
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: ComponentProps<'div'>): import("react").JSX.Element;
|
|
28
|
+
declare function DialogTitle({
|
|
29
|
+
className,
|
|
30
|
+
ref,
|
|
31
|
+
...props
|
|
32
|
+
}: ComponentProps<typeof DialogPrimitive.Title>): import("react").JSX.Element;
|
|
33
|
+
declare function DialogDescription({
|
|
34
|
+
className,
|
|
35
|
+
ref,
|
|
36
|
+
...props
|
|
37
|
+
}: ComponentProps<typeof DialogPrimitive.Description>): import("react").JSX.Element;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { X } from "lucide-react";
|
|
5
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
6
|
+
import { buttonVariants } from "fumadocs-ui/components/ui/button";
|
|
7
|
+
//#region src/components/dialog.tsx
|
|
8
|
+
const Dialog = DialogPrimitive.Root;
|
|
9
|
+
const DialogTrigger = DialogPrimitive.Trigger;
|
|
10
|
+
const DialogPortal = DialogPrimitive.Portal;
|
|
11
|
+
const DialogClose = DialogPrimitive.Close;
|
|
12
|
+
function DialogOverlay({ className, ref, ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
|
|
14
|
+
ref,
|
|
15
|
+
className: cn("fixed inset-0 z-50 bg-black/30 backdrop-blur-sm data-[state=open]:animate-fd-fade-in data-[state=closed]:animate-fd-fade-out", className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function DialogContent({ className, children, ref, ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
|
|
21
|
+
ref,
|
|
22
|
+
className: cn("fixed left-1/2 top-1/2 z-50 flex flex-col gap-4 w-full max-w-lg -translate-x-1/2 -translate-y-1/2 border bg-fd-popover p-4 shadow-lg rounded-xl duration-200 data-[state=open]:animate-fd-dialog-in data-[state=closed]:animate-fd-dialog-out focus-visible:outline-none", className),
|
|
23
|
+
...props,
|
|
24
|
+
children: [children, /* @__PURE__ */ jsx(DialogPrimitive.Close, {
|
|
25
|
+
"aria-label": "Close",
|
|
26
|
+
className: cn(buttonVariants({
|
|
27
|
+
size: "icon-sm",
|
|
28
|
+
color: "ghost"
|
|
29
|
+
}), "absolute end-2 top-2 text-fd-muted-foreground/70"),
|
|
30
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
31
|
+
})]
|
|
32
|
+
})] });
|
|
33
|
+
}
|
|
34
|
+
function DialogHeader({ className, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx("div", {
|
|
36
|
+
className: cn("flex flex-col gap-1.5 text-center sm:text-start", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function DialogFooter({ className, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx("div", {
|
|
42
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-2", className),
|
|
43
|
+
...props
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function DialogTitle({ className, ref, ...props }) {
|
|
47
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
|
|
48
|
+
ref,
|
|
49
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function DialogDescription({ className, ref, ...props }) {
|
|
54
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
|
|
55
|
+
ref,
|
|
56
|
+
className: cn("text-sm text-fd-muted-foreground", className),
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/input.d.ts
|
|
4
|
+
type InputProps = React$1.InputHTMLAttributes<HTMLInputElement>;
|
|
5
|
+
declare const labelVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
6
|
+
declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Input, InputProps, labelVariants };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cn } from "../utils/cn.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
//#region src/components/input.tsx
|
|
6
|
+
const labelVariants = cva("text-xs font-medium text-fd-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
7
|
+
const Input = React$1.forwardRef(({ className, type, ...props }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsx("input", {
|
|
9
|
+
type,
|
|
10
|
+
className: cn("flex h-9 w-full rounded-md border bg-fd-secondary px-2 py-1.5 text-[0.8125rem] text-fd-secondary-foreground transition-colors placeholder:text-fd-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-fd-ring disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
11
|
+
ref,
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
Input.displayName = "Input";
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Input, labelVariants };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ParsedSchema } from "../../schema/index.js";
|
|
2
|
+
import { ComponentProps, HTMLAttributes, ReactNode } from "react";
|
|
3
|
+
import { FieldKey } from "@fumari/stf";
|
|
4
|
+
|
|
5
|
+
//#region src/components/playground/inputs.d.ts
|
|
6
|
+
declare function ObjectInput({
|
|
7
|
+
field: _field,
|
|
8
|
+
fieldName,
|
|
9
|
+
...props
|
|
10
|
+
}: {
|
|
11
|
+
field: Exclude<ParsedSchema, boolean>;
|
|
12
|
+
fieldName: FieldKey;
|
|
13
|
+
} & ComponentProps<'div'>): import("react").JSX.Element;
|
|
14
|
+
declare function JsonInput({
|
|
15
|
+
fieldName
|
|
16
|
+
}: {
|
|
17
|
+
fieldName: FieldKey;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
declare function FieldInput({
|
|
20
|
+
field,
|
|
21
|
+
fieldName,
|
|
22
|
+
isRequired,
|
|
23
|
+
...props
|
|
24
|
+
}: HTMLAttributes<HTMLElement> & {
|
|
25
|
+
field: Exclude<ParsedSchema, boolean>;
|
|
26
|
+
isRequired?: boolean;
|
|
27
|
+
fieldName: FieldKey;
|
|
28
|
+
}): import("react").JSX.Element | undefined;
|
|
29
|
+
declare function FieldSet({
|
|
30
|
+
field: _field,
|
|
31
|
+
fieldName,
|
|
32
|
+
toolbar,
|
|
33
|
+
name,
|
|
34
|
+
isRequired,
|
|
35
|
+
depth,
|
|
36
|
+
slotType,
|
|
37
|
+
collapsible,
|
|
38
|
+
...props
|
|
39
|
+
}: HTMLAttributes<HTMLElement> & {
|
|
40
|
+
isRequired?: boolean;
|
|
41
|
+
name?: ReactNode;
|
|
42
|
+
field: ParsedSchema;
|
|
43
|
+
fieldName: FieldKey;
|
|
44
|
+
depth?: number;
|
|
45
|
+
slotType?: ReactNode;
|
|
46
|
+
toolbar?: ReactNode;
|
|
47
|
+
collapsible?: boolean;
|
|
48
|
+
}): import("react").JSX.Element | undefined;
|
|
49
|
+
//#endregion
|
|
50
|
+
export { FieldInput, FieldSet, JsonInput, ObjectInput };
|