@flextudio/scenario 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +260 -0
- package/bin/flex-scenario.mjs +895 -0
- package/commands/flex-spec.md +28 -0
- package/contract-data/README.md +267 -0
- package/contract-data/examples/README.md +147 -0
- package/contract-data/examples/basic/basic-list-detail.json +2521 -0
- package/contract-data/examples/basic/delivery-address-popup.json +2175 -0
- package/contract-data/examples/basic/fixedtop-floating-form.json +1524 -0
- package/contract-data/examples/basic/search-period-popup.json +1524 -0
- package/contract-data/examples/design/booking-wizard-3step.json +1335 -0
- package/contract-data/examples/design/list-detail-form-3step.json +1516 -0
- package/contract-data/examples/design/list-filter-2step.json +1365 -0
- package/contract-data/examples/design/list-filter-detail-3step.json +1570 -0
- package/contract-data/examples/design/result-entry-wizard-4step.json +1861 -0
- package/contract-data/examples/intent/mock-employee-list.json +54 -0
- package/contract-data/examples/intent/script-cart-flow.json +96 -0
- package/contract-data/examples/intent/script-dialog-confirm.json +61 -0
- package/contract-data/runtime/v1/collection/README.md +119 -0
- package/contract-data/runtime/v1/collection/_c.md +205 -0
- package/contract-data/runtime/v1/collection/category.md +165 -0
- package/contract-data/runtime/v1/collection/collection.md +135 -0
- package/contract-data/runtime/v1/collection/lifecycle.md +140 -0
- package/contract-data/runtime/v1/collection/naming.md +174 -0
- package/contract-data/runtime/v1/collection/sector.md +176 -0
- package/contract-data/runtime/v1/collection/status.md +114 -0
- package/contract-data/runtime/v1/intent-system/INTENT.md +552 -0
- package/contract-data/runtime/v1/intent-system/README.md +118 -0
- package/contract-data/runtime/v1/intent-system/intent.schema.json +164 -0
- package/contract-data/runtime/v1/intent-system/kinds/_base.mjs +137 -0
- package/contract-data/runtime/v1/intent-system/kinds/clearCategory.mjs +35 -0
- package/contract-data/runtime/v1/intent-system/kinds/copyStepValues.mjs +100 -0
- package/contract-data/runtime/v1/intent-system/kinds/deleteActive.mjs +45 -0
- package/contract-data/runtime/v1/intent-system/kinds/dialog.mjs +127 -0
- package/contract-data/runtime/v1/intent-system/kinds/reloadGroup.mjs +28 -0
- package/contract-data/runtime/v1/intent-system/kinds/updateActive.mjs +74 -0
- package/contract-data/runtime/v1/intent-system/materialize.mjs +495 -0
- package/contract-data/runtime/v1/script/README.md +37 -0
- package/contract-data/runtime/v1/script/current_step.md +112 -0
- package/contract-data/runtime/v1/script/f_collection.md +142 -0
- package/contract-data/runtime/v1/script/f_content.md +133 -0
- package/contract-data/runtime/v1/script/f_messagebox.md +132 -0
- package/contract-data/runtime/v1/script/scenario-gen-rules.md +264 -0
- package/contract-data/schema/v1/SKELETON-SHELL.md +120 -0
- package/contract-data/schema/v1/bottom-buttons.md +155 -0
- package/contract-data/schema/v1/bottom-buttons.schema.json +134 -0
- package/contract-data/schema/v1/control/_base.schema.json +1296 -0
- package/contract-data/schema/v1/control/button.md +147 -0
- package/contract-data/schema/v1/control/button.schema.json +55 -0
- package/contract-data/schema/v1/control/calendar-navigator.md +143 -0
- package/contract-data/schema/v1/control/calendar-navigator.schema.json +164 -0
- package/contract-data/schema/v1/control/calendar.md +128 -0
- package/contract-data/schema/v1/control/calendar.schema.json +18 -0
- package/contract-data/schema/v1/control/check-box.md +117 -0
- package/contract-data/schema/v1/control/check-box.schema.json +41 -0
- package/contract-data/schema/v1/control/combo.md +293 -0
- package/contract-data/schema/v1/control/combo.schema.json +23 -0
- package/contract-data/schema/v1/control/embed.md +211 -0
- package/contract-data/schema/v1/control/embed.schema.json +30 -0
- package/contract-data/schema/v1/control/image-box.md +237 -0
- package/contract-data/schema/v1/control/image-box.schema.json +49 -0
- package/contract-data/schema/v1/control/input-date.md +175 -0
- package/contract-data/schema/v1/control/input-date.schema.json +27 -0
- package/contract-data/schema/v1/control/input-file.md +192 -0
- package/contract-data/schema/v1/control/input-file.schema.json +139 -0
- package/contract-data/schema/v1/control/input-mask.md +89 -0
- package/contract-data/schema/v1/control/input-mask.schema.json +45 -0
- package/contract-data/schema/v1/control/input-number.md +55 -0
- package/contract-data/schema/v1/control/input-number.schema.json +24 -0
- package/contract-data/schema/v1/control/input-text.md +73 -0
- package/contract-data/schema/v1/control/input-text.schema.json +24 -0
- package/contract-data/schema/v1/control/label.md +127 -0
- package/contract-data/schema/v1/control/label.schema.json +113 -0
- package/contract-data/schema/v1/control/multi-input-box.md +51 -0
- package/contract-data/schema/v1/control/multi-input-box.schema.json +19 -0
- package/contract-data/schema/v1/control/other.schema.json +24 -0
- package/contract-data/schema/v1/control/radio-box.md +150 -0
- package/contract-data/schema/v1/control/radio-box.schema.json +87 -0
- package/contract-data/schema/v1/control/search.md +163 -0
- package/contract-data/schema/v1/control/search.schema.json +23 -0
- package/contract-data/schema/v1/control/tab.md +240 -0
- package/contract-data/schema/v1/control/tab.schema.json +112 -0
- package/contract-data/schema/v1/control/tree.md +278 -0
- package/contract-data/schema/v1/control/tree.schema.json +83 -0
- package/contract-data/schema/v1/control.md +264 -0
- package/contract-data/schema/v1/control.schema.json +30 -0
- package/contract-data/schema/v1/data-objects.md +278 -0
- package/contract-data/schema/v1/data-objects.schema.json +161 -0
- package/contract-data/schema/v1/data-sources.md +215 -0
- package/contract-data/schema/v1/data-sources.schema.json +184 -0
- package/contract-data/schema/v1/design-system/DESIGN.md +282 -0
- package/contract-data/schema/v1/design-system/README.md +235 -0
- package/contract-data/schema/v1/design-system/design.schema.json +496 -0
- package/contract-data/schema/v1/design-system/error-mapping.mjs +132 -0
- package/contract-data/schema/v1/design-system/materialize.mjs +1435 -0
- package/contract-data/schema/v1/design-system/tests/_base.additional-meta.test.mjs +98 -0
- package/contract-data/schema/v1/design-system/tests/_base.materialize.test.mjs +596 -0
- package/contract-data/schema/v1/design-system/tests/checklist.test.mjs +135 -0
- package/contract-data/schema/v1/design-system/tests/design.schema.test.mjs +487 -0
- package/contract-data/schema/v1/design-system/tests/error-mapping.test.mjs +244 -0
- package/contract-data/schema/v1/design-system/tests/materialize.test.mjs +1093 -0
- package/contract-data/schema/v1/design-system/tests/move-step.test.mjs +119 -0
- package/contract-data/schema/v1/design-system/tests/override.integration.test.mjs +116 -0
- package/contract-data/schema/v1/design-system/tokens.json +76 -0
- package/contract-data/schema/v1/events.md +467 -0
- package/contract-data/schema/v1/events.schema.json +272 -0
- package/contract-data/schema/v1/group.md +146 -0
- package/contract-data/schema/v1/group.schema.json +133 -0
- package/contract-data/schema/v1/mockup-data.md +186 -0
- package/contract-data/schema/v1/naming-objects.schema.json +133 -0
- package/contract-data/schema/v1/node.md +32 -0
- package/contract-data/schema/v1/node.schema.json +24 -0
- package/contract-data/schema/v1/patterns/_base.additional-meta.mjs +135 -0
- package/contract-data/schema/v1/patterns/_base.controls.mjs +759 -0
- package/contract-data/schema/v1/patterns/_base.icon.mjs +61 -0
- package/contract-data/schema/v1/patterns/_base.id.mjs +15 -0
- package/contract-data/schema/v1/patterns/_base.materialize.mjs +1181 -0
- package/contract-data/schema/v1/patterns/_base.style.mjs +312 -0
- package/contract-data/schema/v1/patterns/atom/badge.materialize.mjs +68 -0
- package/contract-data/schema/v1/patterns/atom/badge.schema.json +44 -0
- package/contract-data/schema/v1/patterns/atom/button.materialize.mjs +91 -0
- package/contract-data/schema/v1/patterns/atom/button.schema.json +70 -0
- package/contract-data/schema/v1/patterns/atom/checkbox.materialize.mjs +40 -0
- package/contract-data/schema/v1/patterns/atom/checkbox.schema.json +39 -0
- package/contract-data/schema/v1/patterns/atom/segmented-radio.materialize.mjs +67 -0
- package/contract-data/schema/v1/patterns/atom/segmented-radio.schema.json +49 -0
- package/contract-data/schema/v1/patterns/atom/switch.materialize.mjs +58 -0
- package/contract-data/schema/v1/patterns/atom/switch.schema.json +27 -0
- package/contract-data/schema/v1/patterns/molecule/checklist.materialize.mjs +130 -0
- package/contract-data/schema/v1/patterns/molecule/checklist.schema.json +63 -0
- package/contract-data/schema/v1/patterns/molecule/input-action.materialize.mjs +356 -0
- package/contract-data/schema/v1/patterns/molecule/input-action.schema.json +251 -0
- package/contract-data/schema/v1/patterns/molecule/input-button.materialize.mjs +183 -0
- package/contract-data/schema/v1/patterns/molecule/input-button.schema.json +141 -0
- package/contract-data/schema/v1/patterns/molecule/input-pair.materialize.mjs +254 -0
- package/contract-data/schema/v1/patterns/molecule/input-pair.schema.json +210 -0
- package/contract-data/schema/v1/scenario.md +112 -0
- package/contract-data/schema/v1/scenario.schema.json +161 -0
- package/contract-data/schema/v1/service/CustomSystem.md +139 -0
- package/contract-data/schema/v1/service/CustomSystem.schema.json +41 -0
- package/contract-data/schema/v1/service/Firestore.md +125 -0
- package/contract-data/schema/v1/service/Firestore.schema.json +28 -0
- package/contract-data/schema/v1/service/FlexAutoQuery.md +128 -0
- package/contract-data/schema/v1/service/FlexAutoQuery.schema.json +35 -0
- package/contract-data/schema/v1/service/FlexSQL.md +96 -0
- package/contract-data/schema/v1/service/FlexSQL.schema.json +33 -0
- package/contract-data/schema/v1/service/Flextudio API.md +161 -0
- package/contract-data/schema/v1/service/Flextudio API.schema.json +115 -0
- package/contract-data/schema/v1/service/Flextudio.md +87 -0
- package/contract-data/schema/v1/service/Flextudio.schema.json +26 -0
- package/contract-data/schema/v1/service/GoogleSheet.md +71 -0
- package/contract-data/schema/v1/service/GoogleSheet.schema.json +31 -0
- package/contract-data/schema/v1/service/README.md +127 -0
- package/contract-data/schema/v1/service/_base.schema.json +31 -0
- package/contract-data/schema/v1/service/ksystem.md +76 -0
- package/contract-data/schema/v1/service/ksystem.schema.json +36 -0
- package/contract-data/schema/v1/service-binding.md +228 -0
- package/contract-data/schema/v1/service-binding.schema.json +51 -0
- package/contract-data/schema/v1/step.md +546 -0
- package/contract-data/schema/v1/step.schema.json +258 -0
- package/contract-data/schema/v1/style-objects.md +183 -0
- package/contract-data/schema/v1/style-objects.schema.json +155 -0
- package/contract-data/spec/catalog.json +406 -0
- package/contract-data/spec/rules.md +400 -0
- package/node_modules/@flextudio/contract-core/contract.mjs +367 -0
- package/node_modules/@flextudio/contract-core/index.mjs +16 -0
- package/node_modules/@flextudio/contract-core/package.json +21 -0
- package/node_modules/@flextudio/contract-core/paths.mjs +72 -0
- package/node_modules/@flextudio/contract-core/schemas.mjs +474 -0
- package/node_modules/@flextudio/contract-core/validators.mjs +2471 -0
- package/node_modules/ajv/.runkit_example.js +23 -0
- package/node_modules/ajv/LICENSE +22 -0
- package/node_modules/ajv/README.md +207 -0
- package/node_modules/ajv/dist/2019.d.ts +19 -0
- package/node_modules/ajv/dist/2019.js +61 -0
- package/node_modules/ajv/dist/2019.js.map +1 -0
- package/node_modules/ajv/dist/2020.d.ts +19 -0
- package/node_modules/ajv/dist/2020.js +55 -0
- package/node_modules/ajv/dist/2020.js.map +1 -0
- package/node_modules/ajv/dist/ajv.d.ts +18 -0
- package/node_modules/ajv/dist/ajv.js +50 -0
- package/node_modules/ajv/dist/ajv.js.map +1 -0
- package/node_modules/ajv/dist/compile/codegen/code.d.ts +40 -0
- package/node_modules/ajv/dist/compile/codegen/code.js +156 -0
- package/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
- package/node_modules/ajv/dist/compile/codegen/index.d.ts +79 -0
- package/node_modules/ajv/dist/compile/codegen/index.js +697 -0
- package/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
- package/node_modules/ajv/dist/compile/codegen/scope.d.ts +79 -0
- package/node_modules/ajv/dist/compile/codegen/scope.js +143 -0
- package/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
- package/node_modules/ajv/dist/compile/errors.d.ts +13 -0
- package/node_modules/ajv/dist/compile/errors.js +123 -0
- package/node_modules/ajv/dist/compile/errors.js.map +1 -0
- package/node_modules/ajv/dist/compile/index.d.ts +80 -0
- package/node_modules/ajv/dist/compile/index.js +242 -0
- package/node_modules/ajv/dist/compile/index.js.map +1 -0
- package/node_modules/ajv/dist/compile/jtd/parse.d.ts +4 -0
- package/node_modules/ajv/dist/compile/jtd/parse.js +350 -0
- package/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -0
- package/node_modules/ajv/dist/compile/jtd/serialize.d.ts +4 -0
- package/node_modules/ajv/dist/compile/jtd/serialize.js +236 -0
- package/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -0
- package/node_modules/ajv/dist/compile/jtd/types.d.ts +6 -0
- package/node_modules/ajv/dist/compile/jtd/types.js +14 -0
- package/node_modules/ajv/dist/compile/jtd/types.js.map +1 -0
- package/node_modules/ajv/dist/compile/names.d.ts +20 -0
- package/node_modules/ajv/dist/compile/names.js +28 -0
- package/node_modules/ajv/dist/compile/names.js.map +1 -0
- package/node_modules/ajv/dist/compile/ref_error.d.ts +6 -0
- package/node_modules/ajv/dist/compile/ref_error.js +12 -0
- package/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
- package/node_modules/ajv/dist/compile/resolve.d.ts +12 -0
- package/node_modules/ajv/dist/compile/resolve.js +155 -0
- package/node_modules/ajv/dist/compile/resolve.js.map +1 -0
- package/node_modules/ajv/dist/compile/rules.d.ts +28 -0
- package/node_modules/ajv/dist/compile/rules.js +26 -0
- package/node_modules/ajv/dist/compile/rules.js.map +1 -0
- package/node_modules/ajv/dist/compile/util.d.ts +40 -0
- package/node_modules/ajv/dist/compile/util.js +178 -0
- package/node_modules/ajv/dist/compile/util.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/applicability.d.ts +6 -0
- package/node_modules/ajv/dist/compile/validate/applicability.js +19 -0
- package/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +4 -0
- package/node_modules/ajv/dist/compile/validate/boolSchema.js +50 -0
- package/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/dataType.d.ts +17 -0
- package/node_modules/ajv/dist/compile/validate/dataType.js +203 -0
- package/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/defaults.d.ts +2 -0
- package/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
- package/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/index.d.ts +42 -0
- package/node_modules/ajv/dist/compile/validate/index.js +520 -0
- package/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/keyword.d.ts +8 -0
- package/node_modules/ajv/dist/compile/validate/keyword.js +124 -0
- package/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/subschema.d.ts +47 -0
- package/node_modules/ajv/dist/compile/validate/subschema.js +81 -0
- package/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
- package/node_modules/ajv/dist/core.d.ts +174 -0
- package/node_modules/ajv/dist/core.js +618 -0
- package/node_modules/ajv/dist/core.js.map +1 -0
- package/node_modules/ajv/dist/jtd.d.ts +47 -0
- package/node_modules/ajv/dist/jtd.js +72 -0
- package/node_modules/ajv/dist/jtd.js.map +1 -0
- package/node_modules/ajv/dist/refs/data.json +13 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +2 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +28 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map +1 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +53 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +17 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +57 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +14 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +37 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +90 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +39 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +2 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +30 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map +1 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +48 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +17 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +51 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +37 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +90 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +55 -0
- package/node_modules/ajv/dist/refs/json-schema-draft-06.json +137 -0
- package/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
- package/node_modules/ajv/dist/refs/json-schema-secure.json +88 -0
- package/node_modules/ajv/dist/refs/jtd-schema.d.ts +3 -0
- package/node_modules/ajv/dist/refs/jtd-schema.js +118 -0
- package/node_modules/ajv/dist/refs/jtd-schema.js.map +1 -0
- package/node_modules/ajv/dist/runtime/equal.d.ts +6 -0
- package/node_modules/ajv/dist/runtime/equal.js +7 -0
- package/node_modules/ajv/dist/runtime/equal.js.map +1 -0
- package/node_modules/ajv/dist/runtime/parseJson.d.ts +18 -0
- package/node_modules/ajv/dist/runtime/parseJson.js +185 -0
- package/node_modules/ajv/dist/runtime/parseJson.js.map +1 -0
- package/node_modules/ajv/dist/runtime/quote.d.ts +5 -0
- package/node_modules/ajv/dist/runtime/quote.js +30 -0
- package/node_modules/ajv/dist/runtime/quote.js.map +1 -0
- package/node_modules/ajv/dist/runtime/re2.d.ts +6 -0
- package/node_modules/ajv/dist/runtime/re2.js +6 -0
- package/node_modules/ajv/dist/runtime/re2.js.map +1 -0
- package/node_modules/ajv/dist/runtime/timestamp.d.ts +5 -0
- package/node_modules/ajv/dist/runtime/timestamp.js +42 -0
- package/node_modules/ajv/dist/runtime/timestamp.js.map +1 -0
- package/node_modules/ajv/dist/runtime/ucs2length.d.ts +5 -0
- package/node_modules/ajv/dist/runtime/ucs2length.js +24 -0
- package/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
- package/node_modules/ajv/dist/runtime/uri.d.ts +6 -0
- package/node_modules/ajv/dist/runtime/uri.js +6 -0
- package/node_modules/ajv/dist/runtime/uri.js.map +1 -0
- package/node_modules/ajv/dist/runtime/validation_error.d.ts +7 -0
- package/node_modules/ajv/dist/runtime/validation_error.js +11 -0
- package/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
- package/node_modules/ajv/dist/standalone/index.d.ts +6 -0
- package/node_modules/ajv/dist/standalone/index.js +90 -0
- package/node_modules/ajv/dist/standalone/index.js.map +1 -0
- package/node_modules/ajv/dist/standalone/instance.d.ts +12 -0
- package/node_modules/ajv/dist/standalone/instance.js +35 -0
- package/node_modules/ajv/dist/standalone/instance.js.map +1 -0
- package/node_modules/ajv/dist/types/index.d.ts +183 -0
- package/node_modules/ajv/dist/types/index.js +3 -0
- package/node_modules/ajv/dist/types/index.js.map +1 -0
- package/node_modules/ajv/dist/types/json-schema.d.ts +125 -0
- package/node_modules/ajv/dist/types/json-schema.js +3 -0
- package/node_modules/ajv/dist/types/json-schema.js.map +1 -0
- package/node_modules/ajv/dist/types/jtd-schema.d.ts +174 -0
- package/node_modules/ajv/dist/types/jtd-schema.js +3 -0
- package/node_modules/ajv/dist/types/jtd-schema.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
- package/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +4 -0
- package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
- package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +7 -0
- package/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -0
- package/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +21 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +85 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +11 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
- package/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +13 -0
- package/node_modules/ajv/dist/vocabularies/applicator/index.js +44 -0
- package/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items.js +52 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items2020.js +30 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +4 -0
- package/node_modules/ajv/dist/vocabularies/applicator/not.js +26 -0
- package/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -0
- package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +75 -0
- package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +12 -0
- package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/properties.js +54 -0
- package/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +38 -0
- package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +13 -0
- package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/code.d.ts +17 -0
- package/node_modules/ajv/dist/vocabularies/code.js +131 -0
- package/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/core/id.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/core/id.js +10 -0
- package/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/core/index.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/core/index.js +16 -0
- package/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/core/ref.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/core/ref.js +122 -0
- package/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +10 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/types.js +9 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/draft2020.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/draft2020.js +23 -0
- package/node_modules/ajv/dist/vocabularies/draft2020.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/draft7.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
- package/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +30 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +51 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/index.js +9 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +16 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +10 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/errors.d.ts +9 -0
- package/node_modules/ajv/dist/vocabularies/errors.js +3 -0
- package/node_modules/ajv/dist/vocabularies/errors.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/format/format.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
- package/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/format/index.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/format/index.js +6 -0
- package/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +71 -0
- package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/jtd/elements.js +24 -0
- package/node_modules/ajv/dist/vocabularies/jtd/elements.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/jtd/enum.js +43 -0
- package/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +9 -0
- package/node_modules/ajv/dist/vocabularies/jtd/error.js +20 -0
- package/node_modules/ajv/dist/vocabularies/jtd/error.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +10 -0
- package/node_modules/ajv/dist/vocabularies/jtd/index.js +29 -0
- package/node_modules/ajv/dist/vocabularies/jtd/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/jtd/metadata.js +25 -0
- package/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +4 -0
- package/node_modules/ajv/dist/vocabularies/jtd/nullable.js +22 -0
- package/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +15 -0
- package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +22 -0
- package/node_modules/ajv/dist/vocabularies/jtd/properties.js +149 -0
- package/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +4 -0
- package/node_modules/ajv/dist/vocabularies/jtd/ref.js +67 -0
- package/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +10 -0
- package/node_modules/ajv/dist/vocabularies/jtd/type.js +69 -0
- package/node_modules/ajv/dist/vocabularies/jtd/type.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/jtd/union.js +12 -0
- package/node_modules/ajv/dist/vocabularies/jtd/union.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/jtd/values.js +51 -0
- package/node_modules/ajv/dist/vocabularies/jtd/values.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/metadata.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/metadata.js +18 -0
- package/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/next.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/next.js +8 -0
- package/node_modules/ajv/dist/vocabularies/next.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/index.js +7 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +40 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +65 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/const.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/validation/const.js +25 -0
- package/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +12 -0
- package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/validation/enum.js +48 -0
- package/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/index.d.ts +16 -0
- package/node_modules/ajv/dist/vocabularies/validation/index.js +33 -0
- package/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitContains.js +15 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitItems.js +24 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitLength.js +27 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +11 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +27 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +24 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +26 -0
- package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/validation/pattern.js +33 -0
- package/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/required.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/validation/required.js +79 -0
- package/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +9 -0
- package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +64 -0
- package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
- package/node_modules/ajv/lib/2019.ts +81 -0
- package/node_modules/ajv/lib/2020.ts +75 -0
- package/node_modules/ajv/lib/ajv.ts +70 -0
- package/node_modules/ajv/lib/compile/codegen/code.ts +169 -0
- package/node_modules/ajv/lib/compile/codegen/index.ts +852 -0
- package/node_modules/ajv/lib/compile/codegen/scope.ts +215 -0
- package/node_modules/ajv/lib/compile/errors.ts +184 -0
- package/node_modules/ajv/lib/compile/index.ts +324 -0
- package/node_modules/ajv/lib/compile/jtd/parse.ts +411 -0
- package/node_modules/ajv/lib/compile/jtd/serialize.ts +277 -0
- package/node_modules/ajv/lib/compile/jtd/types.ts +16 -0
- package/node_modules/ajv/lib/compile/names.ts +27 -0
- package/node_modules/ajv/lib/compile/ref_error.ts +13 -0
- package/node_modules/ajv/lib/compile/resolve.ts +149 -0
- package/node_modules/ajv/lib/compile/rules.ts +50 -0
- package/node_modules/ajv/lib/compile/util.ts +213 -0
- package/node_modules/ajv/lib/compile/validate/applicability.ts +22 -0
- package/node_modules/ajv/lib/compile/validate/boolSchema.ts +47 -0
- package/node_modules/ajv/lib/compile/validate/dataType.ts +230 -0
- package/node_modules/ajv/lib/compile/validate/defaults.ts +32 -0
- package/node_modules/ajv/lib/compile/validate/index.ts +582 -0
- package/node_modules/ajv/lib/compile/validate/keyword.ts +171 -0
- package/node_modules/ajv/lib/compile/validate/subschema.ts +135 -0
- package/node_modules/ajv/lib/core.ts +892 -0
- package/node_modules/ajv/lib/jtd.ts +132 -0
- package/node_modules/ajv/lib/refs/data.json +13 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +28 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +53 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +17 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +57 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +14 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +37 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +90 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +39 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +30 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +48 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +17 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +51 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +37 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +90 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +55 -0
- package/node_modules/ajv/lib/refs/json-schema-draft-06.json +137 -0
- package/node_modules/ajv/lib/refs/json-schema-draft-07.json +151 -0
- package/node_modules/ajv/lib/refs/json-schema-secure.json +88 -0
- package/node_modules/ajv/lib/refs/jtd-schema.ts +130 -0
- package/node_modules/ajv/lib/runtime/equal.ts +7 -0
- package/node_modules/ajv/lib/runtime/parseJson.ts +177 -0
- package/node_modules/ajv/lib/runtime/quote.ts +31 -0
- package/node_modules/ajv/lib/runtime/re2.ts +6 -0
- package/node_modules/ajv/lib/runtime/timestamp.ts +46 -0
- package/node_modules/ajv/lib/runtime/ucs2length.ts +20 -0
- package/node_modules/ajv/lib/runtime/uri.ts +6 -0
- package/node_modules/ajv/lib/runtime/validation_error.ts +13 -0
- package/node_modules/ajv/lib/standalone/index.ts +100 -0
- package/node_modules/ajv/lib/standalone/instance.ts +36 -0
- package/node_modules/ajv/lib/types/index.ts +244 -0
- package/node_modules/ajv/lib/types/json-schema.ts +187 -0
- package/node_modules/ajv/lib/types/jtd-schema.ts +273 -0
- package/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +56 -0
- package/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +118 -0
- package/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +22 -0
- package/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +14 -0
- package/node_modules/ajv/lib/vocabularies/applicator/contains.ts +109 -0
- package/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +112 -0
- package/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +11 -0
- package/node_modules/ajv/lib/vocabularies/applicator/if.ts +80 -0
- package/node_modules/ajv/lib/vocabularies/applicator/index.ts +53 -0
- package/node_modules/ajv/lib/vocabularies/applicator/items.ts +59 -0
- package/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +36 -0
- package/node_modules/ajv/lib/vocabularies/applicator/not.ts +38 -0
- package/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +82 -0
- package/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +91 -0
- package/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +12 -0
- package/node_modules/ajv/lib/vocabularies/applicator/properties.ts +57 -0
- package/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +50 -0
- package/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +13 -0
- package/node_modules/ajv/lib/vocabularies/code.ts +168 -0
- package/node_modules/ajv/lib/vocabularies/core/id.ts +10 -0
- package/node_modules/ajv/lib/vocabularies/core/index.ts +16 -0
- package/node_modules/ajv/lib/vocabularies/core/ref.ts +129 -0
- package/node_modules/ajv/lib/vocabularies/discriminator/index.ts +113 -0
- package/node_modules/ajv/lib/vocabularies/discriminator/types.ts +12 -0
- package/node_modules/ajv/lib/vocabularies/draft2020.ts +23 -0
- package/node_modules/ajv/lib/vocabularies/draft7.ts +17 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +31 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +51 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/index.ts +9 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +14 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +10 -0
- package/node_modules/ajv/lib/vocabularies/errors.ts +18 -0
- package/node_modules/ajv/lib/vocabularies/format/format.ts +120 -0
- package/node_modules/ajv/lib/vocabularies/format/index.ts +6 -0
- package/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +89 -0
- package/node_modules/ajv/lib/vocabularies/jtd/elements.ts +32 -0
- package/node_modules/ajv/lib/vocabularies/jtd/enum.ts +45 -0
- package/node_modules/ajv/lib/vocabularies/jtd/error.ts +23 -0
- package/node_modules/ajv/lib/vocabularies/jtd/index.ts +37 -0
- package/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +24 -0
- package/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +21 -0
- package/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +15 -0
- package/node_modules/ajv/lib/vocabularies/jtd/properties.ts +184 -0
- package/node_modules/ajv/lib/vocabularies/jtd/ref.ts +76 -0
- package/node_modules/ajv/lib/vocabularies/jtd/type.ts +75 -0
- package/node_modules/ajv/lib/vocabularies/jtd/union.ts +12 -0
- package/node_modules/ajv/lib/vocabularies/jtd/values.ts +58 -0
- package/node_modules/ajv/lib/vocabularies/metadata.ts +17 -0
- package/node_modules/ajv/lib/vocabularies/next.ts +8 -0
- package/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +7 -0
- package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +47 -0
- package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +85 -0
- package/node_modules/ajv/lib/vocabularies/validation/const.ts +28 -0
- package/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +23 -0
- package/node_modules/ajv/lib/vocabularies/validation/enum.ts +54 -0
- package/node_modules/ajv/lib/vocabularies/validation/index.ts +49 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +16 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +26 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +30 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +42 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +26 -0
- package/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +34 -0
- package/node_modules/ajv/lib/vocabularies/validation/pattern.ts +39 -0
- package/node_modules/ajv/lib/vocabularies/validation/required.ts +98 -0
- package/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +79 -0
- package/node_modules/ajv/package.json +126 -0
- package/node_modules/fast-deep-equal/LICENSE +21 -0
- package/node_modules/fast-deep-equal/README.md +96 -0
- package/node_modules/fast-deep-equal/es6/index.d.ts +2 -0
- package/node_modules/fast-deep-equal/es6/index.js +72 -0
- package/node_modules/fast-deep-equal/es6/react.d.ts +2 -0
- package/node_modules/fast-deep-equal/es6/react.js +79 -0
- package/node_modules/fast-deep-equal/index.d.ts +4 -0
- package/node_modules/fast-deep-equal/index.js +46 -0
- package/node_modules/fast-deep-equal/package.json +61 -0
- package/node_modules/fast-deep-equal/react.d.ts +2 -0
- package/node_modules/fast-deep-equal/react.js +53 -0
- package/node_modules/fast-uri/.gitattributes +2 -0
- package/node_modules/fast-uri/.github/dependabot.yml +13 -0
- package/node_modules/fast-uri/.github/workflows/ci.yml +106 -0
- package/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +24 -0
- package/node_modules/fast-uri/LICENSE +30 -0
- package/node_modules/fast-uri/README.md +152 -0
- package/node_modules/fast-uri/benchmark/benchmark.mjs +159 -0
- package/node_modules/fast-uri/benchmark/equal.mjs +51 -0
- package/node_modules/fast-uri/benchmark/non-simple-domain.mjs +22 -0
- package/node_modules/fast-uri/benchmark/package.json +17 -0
- package/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +24 -0
- package/node_modules/fast-uri/benchmark/ws-is-secure.mjs +65 -0
- package/node_modules/fast-uri/eslint.config.js +6 -0
- package/node_modules/fast-uri/index.js +406 -0
- package/node_modules/fast-uri/lib/schemes.js +267 -0
- package/node_modules/fast-uri/lib/utils.js +443 -0
- package/node_modules/fast-uri/package.json +68 -0
- package/node_modules/fast-uri/test/ajv.test.js +43 -0
- package/node_modules/fast-uri/test/equal.test.js +117 -0
- package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +501 -0
- package/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +120 -0
- package/node_modules/fast-uri/test/parse.test.js +323 -0
- package/node_modules/fast-uri/test/resolve.test.js +87 -0
- package/node_modules/fast-uri/test/rfc-3986.test.js +90 -0
- package/node_modules/fast-uri/test/security-normalization.test.js +39 -0
- package/node_modules/fast-uri/test/security.test.js +133 -0
- package/node_modules/fast-uri/test/serialize.test.js +151 -0
- package/node_modules/fast-uri/test/uri-js-compatibility.test.js +33 -0
- package/node_modules/fast-uri/test/uri-js.test.js +912 -0
- package/node_modules/fast-uri/test/util.test.js +38 -0
- package/node_modules/fast-uri/tsconfig.json +9 -0
- package/node_modules/fast-uri/types/index.d.ts +60 -0
- package/node_modules/fast-uri/types/index.test-d.ts +17 -0
- package/node_modules/json-schema-traverse/.eslintrc.yml +27 -0
- package/node_modules/json-schema-traverse/.github/FUNDING.yml +2 -0
- package/node_modules/json-schema-traverse/.github/workflows/build.yml +28 -0
- package/node_modules/json-schema-traverse/.github/workflows/publish.yml +27 -0
- package/node_modules/json-schema-traverse/LICENSE +21 -0
- package/node_modules/json-schema-traverse/README.md +95 -0
- package/node_modules/json-schema-traverse/index.d.ts +40 -0
- package/node_modules/json-schema-traverse/index.js +93 -0
- package/node_modules/json-schema-traverse/package.json +43 -0
- package/node_modules/json-schema-traverse/spec/.eslintrc.yml +6 -0
- package/node_modules/json-schema-traverse/spec/fixtures/schema.js +125 -0
- package/node_modules/json-schema-traverse/spec/index.spec.js +171 -0
- package/node_modules/require-from-string/index.js +34 -0
- package/node_modules/require-from-string/license +21 -0
- package/node_modules/require-from-string/package.json +28 -0
- package/node_modules/require-from-string/readme.md +56 -0
- package/package.json +51 -0
- package/scripts/api-call.mjs +59 -0
- package/scripts/auth.mjs +262 -0
- package/scripts/build-skill-payload.mjs +338 -0
- package/scripts/cleanup.mjs +166 -0
- package/scripts/install-paths.mjs +146 -0
- package/scripts/postinstall.mjs +218 -0
- package/scripts/postpack.mjs +43 -0
- package/scripts/prepack.mjs +222 -0
- package/scripts/tty-menu.mjs +100 -0
- package/skill/README.md +55 -0
- package/skill/SKILL.md +138 -0
- package/skill/catalog.json +406 -0
- package/skill/design-rules.md +282 -0
- package/skill/design-system.md +235 -0
- package/skill/docs/SKELETON-SHELL.md +120 -0
- package/skill/docs/bottom-buttons.md +155 -0
- package/skill/docs/control/button.md +147 -0
- package/skill/docs/control/calendar-navigator.md +143 -0
- package/skill/docs/control/calendar.md +128 -0
- package/skill/docs/control/check-box.md +117 -0
- package/skill/docs/control/combo.md +293 -0
- package/skill/docs/control/embed.md +211 -0
- package/skill/docs/control/image-box.md +237 -0
- package/skill/docs/control/input-date.md +175 -0
- package/skill/docs/control/input-file.md +192 -0
- package/skill/docs/control/input-mask.md +89 -0
- package/skill/docs/control/input-number.md +55 -0
- package/skill/docs/control/input-text.md +73 -0
- package/skill/docs/control/label.md +127 -0
- package/skill/docs/control/multi-input-box.md +51 -0
- package/skill/docs/control/radio-box.md +150 -0
- package/skill/docs/control/search.md +163 -0
- package/skill/docs/control/tab.md +240 -0
- package/skill/docs/control/tree.md +278 -0
- package/skill/docs/control.md +264 -0
- package/skill/docs/data-objects.md +278 -0
- package/skill/docs/data-sources.md +215 -0
- package/skill/docs/events.md +467 -0
- package/skill/docs/group.md +146 -0
- package/skill/docs/index.json +125 -0
- package/skill/docs/mockup-data.md +186 -0
- package/skill/docs/node.md +32 -0
- package/skill/docs/scenario.md +112 -0
- package/skill/docs/service/CustomSystem.md +139 -0
- package/skill/docs/service/Firestore.md +125 -0
- package/skill/docs/service/FlexAutoQuery.md +128 -0
- package/skill/docs/service/FlexSQL.md +96 -0
- package/skill/docs/service/Flextudio API.md +161 -0
- package/skill/docs/service/Flextudio.md +87 -0
- package/skill/docs/service/GoogleSheet.md +71 -0
- package/skill/docs/service/README.md +127 -0
- package/skill/docs/service/ksystem.md +76 -0
- package/skill/docs/service-binding.md +228 -0
- package/skill/docs/step.md +546 -0
- package/skill/docs/style-objects.md +183 -0
- package/skill/examples/README.md +147 -0
- package/skill/examples/basic/basic-list-detail.json +2521 -0
- package/skill/examples/basic/delivery-address-popup.json +2175 -0
- package/skill/examples/basic/fixedtop-floating-form.json +1524 -0
- package/skill/examples/basic/search-period-popup.json +1524 -0
- package/skill/examples/design/booking-wizard-3step.json +1335 -0
- package/skill/examples/design/list-detail-form-3step.json +1516 -0
- package/skill/examples/design/list-filter-2step.json +1365 -0
- package/skill/examples/design/list-filter-detail-3step.json +1570 -0
- package/skill/examples/design/result-entry-wizard-4step.json +1861 -0
- package/skill/examples/index.json +150 -0
- package/skill/examples/intent/mock-employee-list.json +54 -0
- package/skill/examples/intent/script-cart-flow.json +96 -0
- package/skill/examples/intent/script-dialog-confirm.json +61 -0
- package/skill/intent-rules.md +552 -0
- package/skill/intent-system.md +118 -0
- package/skill/patterns/atom/badge.json +103 -0
- package/skill/patterns/atom/button.json +111 -0
- package/skill/patterns/atom/checkbox.json +70 -0
- package/skill/patterns/atom/segmented-radio.json +92 -0
- package/skill/patterns/atom/switch.json +57 -0
- package/skill/patterns/index.json +471 -0
- package/skill/patterns/molecule/checklist.json +107 -0
- package/skill/patterns/molecule/input-action.json +355 -0
- package/skill/patterns/molecule/input-button.json +212 -0
- package/skill/patterns/molecule/input-pair.json +284 -0
- package/skill/references/build-sequence.md +55 -0
- package/skill/references/patterns-cheatsheet.md +87 -0
- package/skill/references/spec-evolve/README.md +43 -0
- package/skill/references/spec-evolve/conventions.md +92 -0
- package/skill/references/spec-evolve/data-connection.md +102 -0
- package/skill/references/spec-evolve/intake.md +41 -0
- package/skill/references/spec-evolve/key-roles.md +44 -0
- package/skill/references/spec-evolve/lint.md +27 -0
- package/skill/references/spec-evolve/mockup.md +50 -0
- package/skill/references/spec-evolve/query-screens.md +66 -0
- package/skill/references/spec-evolve/routing.md +43 -0
- package/skill/references/spec-evolve/spec-format.md +76 -0
- package/skill/references/spec-evolve/templates/master-detail.spec.md +97 -0
- package/skill/references/spec-evolve/templates/query-screen.spec.md +96 -0
- package/skill/references/spec-evolve/templates/static-prototype.spec.md +54 -0
- package/skill/references/spec-evolve/templates-index.json +26 -0
- package/skill/rules.md +400 -0
- package/skill/schemas/bottom-buttons.schema.json +134 -0
- package/skill/schemas/control/_base.schema.json +1296 -0
- package/skill/schemas/control/button.schema.json +55 -0
- package/skill/schemas/control/calendar-navigator.schema.json +164 -0
- package/skill/schemas/control/calendar.schema.json +18 -0
- package/skill/schemas/control/check-box.schema.json +41 -0
- package/skill/schemas/control/combo.schema.json +23 -0
- package/skill/schemas/control/embed.schema.json +30 -0
- package/skill/schemas/control/image-box.schema.json +49 -0
- package/skill/schemas/control/input-date.schema.json +27 -0
- package/skill/schemas/control/input-file.schema.json +139 -0
- package/skill/schemas/control/input-mask.schema.json +45 -0
- package/skill/schemas/control/input-number.schema.json +24 -0
- package/skill/schemas/control/input-text.schema.json +24 -0
- package/skill/schemas/control/label.schema.json +113 -0
- package/skill/schemas/control/multi-input-box.schema.json +19 -0
- package/skill/schemas/control/other.schema.json +24 -0
- package/skill/schemas/control/radio-box.schema.json +87 -0
- package/skill/schemas/control/search.schema.json +23 -0
- package/skill/schemas/control/tab.schema.json +112 -0
- package/skill/schemas/control/tree.schema.json +83 -0
- package/skill/schemas/control.schema.json +30 -0
- package/skill/schemas/data-objects.schema.json +161 -0
- package/skill/schemas/data-sources.schema.json +184 -0
- package/skill/schemas/design-system/design.schema.json +496 -0
- package/skill/schemas/events.schema.json +272 -0
- package/skill/schemas/group.schema.json +133 -0
- package/skill/schemas/index.json +362 -0
- package/skill/schemas/naming-objects.schema.json +133 -0
- package/skill/schemas/node.schema.json +24 -0
- package/skill/schemas/patterns/atom/badge.schema.json +44 -0
- package/skill/schemas/patterns/atom/button.schema.json +70 -0
- package/skill/schemas/patterns/atom/checkbox.schema.json +39 -0
- package/skill/schemas/patterns/atom/segmented-radio.schema.json +49 -0
- package/skill/schemas/patterns/atom/switch.schema.json +27 -0
- package/skill/schemas/patterns/molecule/checklist.schema.json +63 -0
- package/skill/schemas/patterns/molecule/input-action.schema.json +251 -0
- package/skill/schemas/patterns/molecule/input-button.schema.json +141 -0
- package/skill/schemas/patterns/molecule/input-pair.schema.json +210 -0
- package/skill/schemas/scenario.schema.json +161 -0
- package/skill/schemas/service/CustomSystem.schema.json +41 -0
- package/skill/schemas/service/Firestore.schema.json +28 -0
- package/skill/schemas/service/FlexAutoQuery.schema.json +35 -0
- package/skill/schemas/service/FlexSQL.schema.json +33 -0
- package/skill/schemas/service/Flextudio API.schema.json +115 -0
- package/skill/schemas/service/Flextudio.schema.json +26 -0
- package/skill/schemas/service/GoogleSheet.schema.json +31 -0
- package/skill/schemas/service/_base.schema.json +31 -0
- package/skill/schemas/service/ksystem.schema.json +36 -0
- package/skill/schemas/service-binding.schema.json +51 -0
- package/skill/schemas/step.schema.json +258 -0
- package/skill/schemas/style-objects.schema.json +155 -0
- package/skill/skill-guides/README.md +50 -0
- package/skill/skill-guides/control-options.md +126 -0
- package/skill/skill-guides/events.md +61 -0
- package/skill/skill-guides/failure-discipline.md +95 -0
- package/skill/skill-guides/index.json +40 -0
- package/skill/skill-guides/prompt-interview.md +92 -0
- package/skill/skill-guides/scripts.md +169 -0
- package/skill/skill-guides/step-navigation.md +98 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// design-system/tests/checklist.test.mjs
|
|
2
|
+
// 실행: node --test meta-contract/schema/v1/design-system/tests/checklist.test.mjs
|
|
3
|
+
//
|
|
4
|
+
// pattern.molecule.checklist — 라벨 + 체크박스 그리드. 출력 shape + 전체 트리
|
|
5
|
+
// strict 검증 (Group/Label/CheckBox 노드별 schema) 검증.
|
|
6
|
+
|
|
7
|
+
import { test } from "node:test";
|
|
8
|
+
import assert from "node:assert/strict";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
materializeFragment,
|
|
12
|
+
getPatternRegistry,
|
|
13
|
+
} from "../../patterns/_base.materialize.mjs";
|
|
14
|
+
import { buildAjv, buildKnownProps } from "../../../../core/schemas.mjs";
|
|
15
|
+
|
|
16
|
+
const { ajvStrict, schemaCache, schemaIndex } = buildAjv();
|
|
17
|
+
const knownProps = buildKnownProps(schemaCache);
|
|
18
|
+
const keyOf = (suf) => schemaIndex.find((s) => s.key?.endsWith(suf))?.key;
|
|
19
|
+
|
|
20
|
+
function schemaForNode(n) {
|
|
21
|
+
if (n.ContentsType === "Group") return keyOf("group.schema.json");
|
|
22
|
+
const map = { Label: "label.schema.json", CheckBox: "check-box.schema.json" };
|
|
23
|
+
return keyOf(map[n.ControlType] || "control.schema.json");
|
|
24
|
+
}
|
|
25
|
+
// 트리 전체를 노드별 schema 로 strict 검증 → denoise 후 미정의 필드 수집.
|
|
26
|
+
function collectUnknown(n, acc = []) {
|
|
27
|
+
const v = ajvStrict.getSchema(schemaForNode(n));
|
|
28
|
+
if (v) {
|
|
29
|
+
v(n);
|
|
30
|
+
for (const e of v.errors || []) {
|
|
31
|
+
if (!["unevaluatedProperties", "additionalProperties"].includes(e.keyword)) continue;
|
|
32
|
+
const p = e.params?.unevaluatedProperty ?? e.params?.additionalProperty;
|
|
33
|
+
if (p && !knownProps.has(p)) acc.push(`${n.ControlType || n.ContentsType}:${p}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (Array.isArray(n.Contents)) n.Contents.forEach((c) => collectUnknown(c, acc));
|
|
37
|
+
return acc;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
test("registry: checklist 패턴 등록됨", async () => {
|
|
41
|
+
const reg = await getPatternRegistry();
|
|
42
|
+
assert.ok(reg.has("checklist"));
|
|
43
|
+
assert.equal(reg.get("checklist").tier, "molecule");
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test("checklist: 2열 — 구조 / calc width / ItemBgColor / 라벨 Height 제거·아이템 Height 32px / strict clean", async () => {
|
|
47
|
+
const r = await materializeFragment({
|
|
48
|
+
checklist: {
|
|
49
|
+
label: "오더상태",
|
|
50
|
+
items: ["전체", "응대중", "처리중", "처리완료", "취소"],
|
|
51
|
+
lines: 2,
|
|
52
|
+
checkedColor: "surface.brand",
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
assert.deepEqual(r.errors, []);
|
|
56
|
+
|
|
57
|
+
const root = r.fragment;
|
|
58
|
+
assert.equal(root.ContentsType, "Group");
|
|
59
|
+
assert.equal(root.ContentsName, "오더상태");
|
|
60
|
+
assert.equal(root.DisplayStyle.FlexDirection, "column");
|
|
61
|
+
assert.equal(root.DisplayStyle.rowGapValue, "12");
|
|
62
|
+
|
|
63
|
+
const [labelCtrl, grid] = root.Contents;
|
|
64
|
+
assert.equal(labelCtrl.ControlType, "Label");
|
|
65
|
+
assert.equal(labelCtrl.labeltext, "오더상태");
|
|
66
|
+
assert.equal(labelCtrl.FontStyle.FontWeight, "SemiBold");
|
|
67
|
+
assert.equal(labelCtrl.Height, undefined); // Height 키 제거
|
|
68
|
+
|
|
69
|
+
assert.equal(grid.ContentsType, "Group");
|
|
70
|
+
assert.equal(grid.DisplayStyle.FlexDirection, "wrap");
|
|
71
|
+
assert.equal(grid.DisplayStyle.columnGapValue, "8");
|
|
72
|
+
assert.equal(grid.Contents.length, 5);
|
|
73
|
+
|
|
74
|
+
const first = grid.Contents[0];
|
|
75
|
+
assert.equal(first.ControlType, "CheckBox");
|
|
76
|
+
assert.equal(first.ControlStyle, "styleSquare");
|
|
77
|
+
assert.equal(first.Items[0].ItemName, "전체");
|
|
78
|
+
assert.equal(first.Width.SizeValue, "calc(50% - 4px)");
|
|
79
|
+
assert.equal(first.Width.SizeUnit, "text");
|
|
80
|
+
assert.deepEqual(first.Height, { MatchText: false, SizeValue: "32", SizeUnit: "px" }); // 기본 높이 32px
|
|
81
|
+
assert.equal(first.ItemBgStyle.ItemBgColor, "var(--colorMain)");
|
|
82
|
+
assert.equal(first.ItemBgStyle.UseItemBackground, true);
|
|
83
|
+
assert.equal(first.FontStyle.FontColor, "var(--colorGray1)");
|
|
84
|
+
|
|
85
|
+
// 전체 트리 strict 검증 — 미정의 필드 0.
|
|
86
|
+
assert.deepEqual(collectUnknown(root), []);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
test("checklist: 1열 → 아이템 Width 100%", async () => {
|
|
90
|
+
const r = await materializeFragment({
|
|
91
|
+
checklist: { label: "알림 채널", items: ["이메일", "SMS"], lines: 1 },
|
|
92
|
+
});
|
|
93
|
+
assert.deepEqual(r.errors, []);
|
|
94
|
+
const item = r.fragment.Contents[1].Contents[0];
|
|
95
|
+
assert.equal(item.Width.SizeValue, "100");
|
|
96
|
+
assert.equal(item.Width.SizeUnit, "%");
|
|
97
|
+
assert.deepEqual(collectUnknown(r.fragment), []);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
test("checklist: lines 기본값 1 (미지정)", async () => {
|
|
101
|
+
const r = await materializeFragment({
|
|
102
|
+
checklist: { label: "옵션", items: ["A", "B"] },
|
|
103
|
+
});
|
|
104
|
+
assert.deepEqual(r.errors, []);
|
|
105
|
+
assert.equal(r.fragment.Contents[1].Contents[0].Width.SizeValue, "100");
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
test("checklist: checkedColor 시맨틱 토큰 resolve", async () => {
|
|
109
|
+
const r = await materializeFragment({
|
|
110
|
+
checklist: { label: "x", items: ["a"], checkedColor: "semantic.success" },
|
|
111
|
+
});
|
|
112
|
+
assert.deepEqual(r.errors, []);
|
|
113
|
+
assert.equal(
|
|
114
|
+
r.fragment.Contents[1].Contents[0].ItemBgStyle.ItemBgColor,
|
|
115
|
+
"var(--colorSub1)",
|
|
116
|
+
);
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
test("checklist: override.grid 주입", async () => {
|
|
120
|
+
const r = await materializeFragment({
|
|
121
|
+
checklist: {
|
|
122
|
+
label: "x",
|
|
123
|
+
items: ["a"],
|
|
124
|
+
override: { grid: { UseDataConnection: true } },
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
assert.deepEqual(r.errors, []);
|
|
128
|
+
assert.equal(r.fragment.Contents[1].UseDataConnection, true);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
test("checklist: items 비면 materialize 에러", async () => {
|
|
132
|
+
const r = await materializeFragment({ checklist: { label: "x", items: [] } });
|
|
133
|
+
assert.equal(r.errors.length, 1);
|
|
134
|
+
assert.match(r.errors[0].message, /items/);
|
|
135
|
+
});
|
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
// design-system/tests/design.schema.test.mjs
|
|
2
|
+
// 실행: node --test meta-contract/schema/v1/design-system/tests/design.schema.test.mjs
|
|
3
|
+
//
|
|
4
|
+
// design.schema.json 의 무결성 + tokens.json / materialize.mjs 와의 sync 검증.
|
|
5
|
+
// Ajv 가 있으면 실제 validate / reject case 도 함께 검증. 부모 프로젝트의
|
|
6
|
+
// node_modules 에 ajv 가 설치되어 있어 worktree 안에서도 resolution 됨.
|
|
7
|
+
|
|
8
|
+
import { readFileSync } from "node:fs";
|
|
9
|
+
import { dirname, join, resolve } from "node:path";
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
11
|
+
import { test } from "node:test";
|
|
12
|
+
import assert from "node:assert/strict";
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
materializeDesign,
|
|
16
|
+
designKnownKeys,
|
|
17
|
+
designTokens,
|
|
18
|
+
} from "../materialize.mjs";
|
|
19
|
+
|
|
20
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
21
|
+
const DESIGN_SYSTEM_DIR = resolve(__dirname, "..");
|
|
22
|
+
const SCHEMA = JSON.parse(
|
|
23
|
+
readFileSync(join(DESIGN_SYSTEM_DIR, "design.schema.json"), "utf8"),
|
|
24
|
+
);
|
|
25
|
+
const TOKENS = JSON.parse(
|
|
26
|
+
readFileSync(join(DESIGN_SYSTEM_DIR, "tokens.json"), "utf8"),
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
30
|
+
// 구조 무결성
|
|
31
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
32
|
+
|
|
33
|
+
test("schema 기본 메타데이터 ($id / $schema / title / type)", () => {
|
|
34
|
+
assert.equal(typeof SCHEMA.$id, "string");
|
|
35
|
+
assert.ok(SCHEMA.$id.endsWith("/design.schema.json"));
|
|
36
|
+
assert.equal(typeof SCHEMA.$schema, "string");
|
|
37
|
+
assert.equal(SCHEMA.title, "design");
|
|
38
|
+
assert.equal(SCHEMA.type, "object");
|
|
39
|
+
assert.equal(SCHEMA.additionalProperties, false);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test("properties / $defs / examples 존재", () => {
|
|
43
|
+
assert.ok(SCHEMA.properties && typeof SCHEMA.properties === "object");
|
|
44
|
+
assert.ok(SCHEMA.$defs && typeof SCHEMA.$defs === "object");
|
|
45
|
+
assert.ok(Array.isArray(SCHEMA.examples));
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
49
|
+
// Sync: properties keys ↔ designKnownKeys
|
|
50
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
51
|
+
|
|
52
|
+
test("properties 의 키 집합 == designKnownKeys (materializer 와 sync)", () => {
|
|
53
|
+
const schemaKeys = new Set(Object.keys(SCHEMA.properties));
|
|
54
|
+
const knownKeys = new Set(designKnownKeys);
|
|
55
|
+
assert.deepEqual(schemaKeys, knownKeys);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
59
|
+
// Sync: enum ↔ tokens.json
|
|
60
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
61
|
+
|
|
62
|
+
test("text.enum == typography token 키 (tokens.json sync)", () => {
|
|
63
|
+
assert.deepEqual(
|
|
64
|
+
[...SCHEMA.properties.font.enum].sort(),
|
|
65
|
+
Object.keys(TOKENS.typography).sort(),
|
|
66
|
+
);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test("color $defs.colorSlot.enum == color token 키 (tokens.json sync)", () => {
|
|
70
|
+
assert.deepEqual(
|
|
71
|
+
[...SCHEMA.$defs.colorSlot.enum].sort(),
|
|
72
|
+
Object.keys(TOKENS.color).sort(),
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
test("color property 가 $defs.colorSlot 을 $ref (단일 source)", () => {
|
|
77
|
+
assert.equal(
|
|
78
|
+
SCHEMA.properties.color.$ref,
|
|
79
|
+
"#/$defs/colorSlot",
|
|
80
|
+
);
|
|
81
|
+
assert.equal(SCHEMA.properties.bg.$ref, "#/$defs/colorSlot");
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
test("border 의 색상 enum (false / 'none' 제외) == color token 키", () => {
|
|
85
|
+
// border 는 oneOf — 두 번째 branch 가 color string enum.
|
|
86
|
+
const stringBranch = SCHEMA.properties.border.oneOf.find(
|
|
87
|
+
(b) => b.type === "string",
|
|
88
|
+
);
|
|
89
|
+
assert.ok(stringBranch);
|
|
90
|
+
const colorSlotsInBorder = stringBranch.enum.filter((v) => v !== "none");
|
|
91
|
+
assert.deepEqual(
|
|
92
|
+
[...colorSlotsInBorder].sort(),
|
|
93
|
+
Object.keys(TOKENS.color).sort(),
|
|
94
|
+
);
|
|
95
|
+
assert.ok(stringBranch.enum.includes("none"));
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
test("elevation.enum == elevation token 키 (tokens.json sync)", () => {
|
|
99
|
+
assert.deepEqual(
|
|
100
|
+
[...SCHEMA.properties.elevation.enum].sort(),
|
|
101
|
+
Object.keys(TOKENS.elevation).sort(),
|
|
102
|
+
);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
test("surface.enum == surface 프리셋 키 (tokens.json sync)", () => {
|
|
106
|
+
assert.deepEqual(
|
|
107
|
+
[...SCHEMA.properties.surface.enum].sort(),
|
|
108
|
+
Object.keys(TOKENS.surface).sort(),
|
|
109
|
+
);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
test("surface 프리셋이 참조하는 키/슬롯이 모두 유효 (정합성)", () => {
|
|
113
|
+
const colorSlots = new Set(SCHEMA.$defs.colorSlot.enum);
|
|
114
|
+
const elevationSlots = new Set(SCHEMA.properties.elevation.enum);
|
|
115
|
+
for (const [variant, preset] of Object.entries(TOKENS.surface)) {
|
|
116
|
+
for (const k of Object.keys(preset)) {
|
|
117
|
+
assert.ok(
|
|
118
|
+
["bg", "border", "radius", "elevation"].includes(k),
|
|
119
|
+
`surface.${variant} 의 키 '${k}' 는 bg/border/radius/elevation 중 하나여야 함`,
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
if (preset.bg != null) assert.ok(colorSlots.has(preset.bg));
|
|
123
|
+
if (typeof preset.border === "string") assert.ok(colorSlots.has(preset.border));
|
|
124
|
+
if (preset.elevation != null) assert.ok(elevationSlots.has(preset.elevation));
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
test("typography token 과 designTokens 자체가 일치 (간접 회귀)", () => {
|
|
129
|
+
assert.deepEqual(
|
|
130
|
+
Object.keys(designTokens.typography).sort(),
|
|
131
|
+
Object.keys(TOKENS.typography).sort(),
|
|
132
|
+
);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
136
|
+
// Examples: materializer 가 거부 없이 처리해야 함
|
|
137
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
138
|
+
|
|
139
|
+
test("examples 모두 materializeDesign 통과", () => {
|
|
140
|
+
assert.ok(SCHEMA.examples.length > 0);
|
|
141
|
+
for (let i = 0; i < SCHEMA.examples.length; i++) {
|
|
142
|
+
const ex = SCHEMA.examples[i];
|
|
143
|
+
const { errors } = materializeDesign(ex, `examples[${i}]`);
|
|
144
|
+
assert.deepEqual(
|
|
145
|
+
errors,
|
|
146
|
+
[],
|
|
147
|
+
`examples[${i}] materialize errors: ${JSON.stringify(errors)}`,
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
153
|
+
// Ajv 실 검증 — 부모 node_modules 에 ajv 있을 때만 동작
|
|
154
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
155
|
+
|
|
156
|
+
let Ajv2020 = null;
|
|
157
|
+
try {
|
|
158
|
+
const mod = await import("ajv/dist/2020.js");
|
|
159
|
+
Ajv2020 = mod.default;
|
|
160
|
+
} catch {
|
|
161
|
+
// Ajv 미설치 환경 — sync 테스트만으로 한정 (테스트 자체는 통과 처리).
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const compileValidator = () => {
|
|
165
|
+
if (!Ajv2020) return null;
|
|
166
|
+
const ajv = new Ajv2020({ allErrors: true, strict: false });
|
|
167
|
+
return ajv.compile(SCHEMA);
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
test("Ajv: schema 자체 compile 성공", () => {
|
|
171
|
+
if (!Ajv2020) return;
|
|
172
|
+
const v = compileValidator();
|
|
173
|
+
assert.equal(typeof v, "function");
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
test("Ajv: examples 모두 schema validate 통과", () => {
|
|
177
|
+
if (!Ajv2020) return;
|
|
178
|
+
const v = compileValidator();
|
|
179
|
+
for (let i = 0; i < SCHEMA.examples.length; i++) {
|
|
180
|
+
const ok = v(SCHEMA.examples[i]);
|
|
181
|
+
assert.equal(
|
|
182
|
+
ok,
|
|
183
|
+
true,
|
|
184
|
+
`examples[${i}] schema fail: ${JSON.stringify(v.errors)}`,
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
test("Ajv: 모든 design 키 사용한 valid 객체 통과", () => {
|
|
190
|
+
if (!Ajv2020) return;
|
|
191
|
+
const v = compileValidator();
|
|
192
|
+
const obj = {
|
|
193
|
+
font: "body-large",
|
|
194
|
+
color: "body",
|
|
195
|
+
align: "start",
|
|
196
|
+
w: "full",
|
|
197
|
+
h: "text",
|
|
198
|
+
p: "16",
|
|
199
|
+
m: { t: 8, b: 8 },
|
|
200
|
+
bg: "card",
|
|
201
|
+
border: "hairline",
|
|
202
|
+
radius: "16",
|
|
203
|
+
elevation: "rect-shadow",
|
|
204
|
+
flex: { dir: "row", align: "between", valign: "center", gap: 8 },
|
|
205
|
+
caption: { font: "body-small", color: "body-soft" },
|
|
206
|
+
abs: { b: "20", r: "20" },
|
|
207
|
+
opacity: 80,
|
|
208
|
+
fixed: true,
|
|
209
|
+
};
|
|
210
|
+
const ok = v(obj);
|
|
211
|
+
assert.equal(ok, true, `expected valid: ${JSON.stringify(v.errors)}`);
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
test("Ajv: unknown design key 거부 (additionalProperties:false)", () => {
|
|
215
|
+
if (!Ajv2020) return;
|
|
216
|
+
const v = compileValidator();
|
|
217
|
+
const ok = v({ font: "body-large", sparkle: "high" });
|
|
218
|
+
assert.equal(ok, false);
|
|
219
|
+
assert.ok(
|
|
220
|
+
v.errors.some((e) => /additional property|sparkle/.test(JSON.stringify(e))),
|
|
221
|
+
);
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
test("Ajv: text 의 unknown role 거부", () => {
|
|
225
|
+
if (!Ajv2020) return;
|
|
226
|
+
const v = compileValidator();
|
|
227
|
+
assert.equal(v({ font: "huge" }), false);
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
test("Ajv: color 의 raw escape (var(--colorPurple)) 거부", () => {
|
|
231
|
+
if (!Ajv2020) return;
|
|
232
|
+
const v = compileValidator();
|
|
233
|
+
assert.equal(v({ color: "var(--colorPurple)" }), false);
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
test("Ajv: radius number 타입 거부 (string 만)", () => {
|
|
237
|
+
if (!Ajv2020) return;
|
|
238
|
+
const v = compileValidator();
|
|
239
|
+
assert.equal(v({ radius: 16 }), false);
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
test("Ajv: radius 음수/형식오류 거부", () => {
|
|
243
|
+
if (!Ajv2020) return;
|
|
244
|
+
const v = compileValidator();
|
|
245
|
+
assert.equal(v({ radius: "-8" }), false);
|
|
246
|
+
assert.equal(v({ radius: "8px" }), false);
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
test("Ajv: w='50' (단위 없음) 거부", () => {
|
|
250
|
+
if (!Ajv2020) return;
|
|
251
|
+
const v = compileValidator();
|
|
252
|
+
assert.equal(v({ w: "50" }), false);
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
test("Ajv: w='full' / 'text' / '48px' / '100%' 통과", () => {
|
|
256
|
+
if (!Ajv2020) return;
|
|
257
|
+
const v = compileValidator();
|
|
258
|
+
for (const w of ["full", "text", "48px", "100%", "50vh"]) {
|
|
259
|
+
assert.equal(v({ w }), true, `w='${w}' should pass`);
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
test("Ajv: p shorthand 1~4 값 통과", () => {
|
|
264
|
+
if (!Ajv2020) return;
|
|
265
|
+
const v = compileValidator();
|
|
266
|
+
for (const p of ["16", "16 20", "4 8 12", "4 8 12 16"]) {
|
|
267
|
+
assert.equal(v({ p }), true, `p='${p}' should pass`);
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
test("Ajv: p shorthand 5 값 거부", () => {
|
|
272
|
+
if (!Ajv2020) return;
|
|
273
|
+
const v = compileValidator();
|
|
274
|
+
assert.equal(v({ p: "1 2 3 4 5" }), false);
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
test("Ajv: p object { t, r, b, l } 통과 / unknown 키 거부", () => {
|
|
278
|
+
if (!Ajv2020) return;
|
|
279
|
+
const v = compileValidator();
|
|
280
|
+
assert.equal(v({ p: { t: 8, b: 8 } }), true);
|
|
281
|
+
assert.equal(v({ p: { top: 8 } }), false);
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
test("Ajv: flex 최소형 / 풀세트 통과", () => {
|
|
285
|
+
if (!Ajv2020) return;
|
|
286
|
+
const v = compileValidator();
|
|
287
|
+
assert.equal(v({ flex: { dir: "row" } }), true);
|
|
288
|
+
assert.equal(
|
|
289
|
+
v({ flex: { dir: "column", align: "between", valign: "center", gap: 8 } }),
|
|
290
|
+
true,
|
|
291
|
+
);
|
|
292
|
+
assert.equal(
|
|
293
|
+
v({ flex: { dir: "row", gap: { row: 8, col: 12 } } }),
|
|
294
|
+
true,
|
|
295
|
+
);
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
test("Ajv: flex.dir 누락 거부", () => {
|
|
299
|
+
if (!Ajv2020) return;
|
|
300
|
+
const v = compileValidator();
|
|
301
|
+
assert.equal(v({ flex: { align: "center" } }), false);
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
test("Ajv: flex unknown 키 거부", () => {
|
|
305
|
+
if (!Ajv2020) return;
|
|
306
|
+
const v = compileValidator();
|
|
307
|
+
assert.equal(v({ flex: { dir: "row", direction: "row-reverse" } }), false);
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
test("Ajv: border 객체 form 통과 (color/type/size, color/sides)", () => {
|
|
311
|
+
if (!Ajv2020) return;
|
|
312
|
+
const v = compileValidator();
|
|
313
|
+
assert.equal(
|
|
314
|
+
v({ border: { color: "hairline", type: "dashed", size: "2" } }),
|
|
315
|
+
true,
|
|
316
|
+
);
|
|
317
|
+
assert.equal(
|
|
318
|
+
v({ border: { color: "ink", sides: { t: "2", b: "2" } } }),
|
|
319
|
+
true,
|
|
320
|
+
);
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
test("Ajv: border 객체 form — size 와 sides 동시 사용 거부", () => {
|
|
324
|
+
if (!Ajv2020) return;
|
|
325
|
+
const v = compileValidator();
|
|
326
|
+
assert.equal(
|
|
327
|
+
v({ border: { color: "hairline", size: "1", sides: { t: "2" } } }),
|
|
328
|
+
false,
|
|
329
|
+
);
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
test("Ajv: border 객체 form — color 누락 거부", () => {
|
|
333
|
+
if (!Ajv2020) return;
|
|
334
|
+
const v = compileValidator();
|
|
335
|
+
assert.equal(v({ border: { type: "dashed" } }), false);
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
test("Ajv: border 객체 form — unknown type 거부", () => {
|
|
339
|
+
if (!Ajv2020) return;
|
|
340
|
+
const v = compileValidator();
|
|
341
|
+
assert.equal(
|
|
342
|
+
v({ border: { color: "hairline", type: "double" } }),
|
|
343
|
+
false,
|
|
344
|
+
);
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
test("Ajv: radius 객체 form 통과 / unknown 코너 거부", () => {
|
|
348
|
+
if (!Ajv2020) return;
|
|
349
|
+
const v = compileValidator();
|
|
350
|
+
assert.equal(v({ radius: { tl: "12", tr: "12", br: "0", bl: "0" } }), true);
|
|
351
|
+
assert.equal(v({ radius: { topLeft: "12" } }), false);
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
test("Ajv: caption text 5 roles 통과 / display 거부", () => {
|
|
355
|
+
if (!Ajv2020) return;
|
|
356
|
+
const v = compileValidator();
|
|
357
|
+
for (const t of ["body-large", "body-medium", "body-small", "caption", "micro"]) {
|
|
358
|
+
assert.equal(v({ caption: { font: t } }), true, `caption.font='${t}' should pass`);
|
|
359
|
+
}
|
|
360
|
+
assert.equal(v({ caption: { font: "display-large" } }), false);
|
|
361
|
+
assert.equal(v({ caption: { font: "title-medium" } }), false);
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
test("Ajv: caption color slot 통과 / raw 거부", () => {
|
|
365
|
+
if (!Ajv2020) return;
|
|
366
|
+
const v = compileValidator();
|
|
367
|
+
assert.equal(v({ caption: { color: "body-soft" } }), true);
|
|
368
|
+
assert.equal(v({ caption: { color: "#abc" } }), false);
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
test("Ajv: caption.text 문자열 통과 / 비문자열 거부", () => {
|
|
372
|
+
if (!Ajv2020) return;
|
|
373
|
+
const v = compileValidator();
|
|
374
|
+
assert.equal(v({ caption: { text: "이름" } }), true);
|
|
375
|
+
assert.equal(v({ caption: { text: "이름", font: "body-small" } }), true);
|
|
376
|
+
assert.equal(v({ caption: { text: 123 } }), false);
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
test("Ajv: abs { t,r,b,l } 통과 / unknown 키 거부", () => {
|
|
380
|
+
if (!Ajv2020) return;
|
|
381
|
+
const v = compileValidator();
|
|
382
|
+
assert.equal(v({ abs: { b: "20", r: "20" } }), true);
|
|
383
|
+
assert.equal(v({ abs: { top: 10 } }), false);
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
test("Ajv: opacity 정수 0..100 통과 / 범위 밖 거부 / 비정수 거부", () => {
|
|
387
|
+
if (!Ajv2020) return;
|
|
388
|
+
const v = compileValidator();
|
|
389
|
+
assert.equal(v({ opacity: 0 }), true);
|
|
390
|
+
assert.equal(v({ opacity: 100 }), true);
|
|
391
|
+
assert.equal(v({ opacity: 50 }), true);
|
|
392
|
+
assert.equal(v({ opacity: 150 }), false);
|
|
393
|
+
assert.equal(v({ opacity: -1 }), false);
|
|
394
|
+
assert.equal(v({ opacity: 50.5 }), false);
|
|
395
|
+
assert.equal(v({ opacity: "50" }), false);
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
test("Ajv: caption.pos / caption.align 통과 / unknown 거부", () => {
|
|
399
|
+
if (!Ajv2020) return;
|
|
400
|
+
const v = compileValidator();
|
|
401
|
+
assert.equal(v({ caption: { pos: "top" } }), true);
|
|
402
|
+
assert.equal(v({ caption: { pos: "left" } }), true);
|
|
403
|
+
assert.equal(v({ caption: { align: "start" } }), true);
|
|
404
|
+
assert.equal(v({ caption: { pos: "right" } }), false);
|
|
405
|
+
assert.equal(v({ caption: { align: "top" } }), false);
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
test("Ajv: itemBg color slot 통과 / raw 거부", () => {
|
|
409
|
+
if (!Ajv2020) return;
|
|
410
|
+
const v = compileValidator();
|
|
411
|
+
assert.equal(v({ itemBg: "card" }), true);
|
|
412
|
+
assert.equal(v({ itemBg: "subtle" }), true);
|
|
413
|
+
assert.equal(v({ itemBg: "#abc" }), false);
|
|
414
|
+
assert.equal(v({ itemBg: "var(--colorMain)" }), false);
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
test("Ajv: tabHeader 풀세트 통과", () => {
|
|
418
|
+
if (!Ajv2020) return;
|
|
419
|
+
const v = compileValidator();
|
|
420
|
+
assert.equal(
|
|
421
|
+
v({
|
|
422
|
+
tabHeader: {
|
|
423
|
+
container: { arrange: { type: "equal" }, bg: "card", p: "0 16" },
|
|
424
|
+
selectedContainer: { bg: "subtle" },
|
|
425
|
+
item: { font: "body-medium", color: "body-soft", align: "center" },
|
|
426
|
+
selectedItem: { color: "main", border: { color: "main", sides: { b: "2" } } },
|
|
427
|
+
},
|
|
428
|
+
}),
|
|
429
|
+
true,
|
|
430
|
+
);
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
test("Ajv: tabHeader.container 에 text 키 거부", () => {
|
|
434
|
+
if (!Ajv2020) return;
|
|
435
|
+
const v = compileValidator();
|
|
436
|
+
assert.equal(
|
|
437
|
+
v({ tabHeader: { container: { font: "body-medium" } } }),
|
|
438
|
+
false,
|
|
439
|
+
);
|
|
440
|
+
});
|
|
441
|
+
|
|
442
|
+
test("Ajv: tabHeader.item 에 arrange 키 거부", () => {
|
|
443
|
+
if (!Ajv2020) return;
|
|
444
|
+
const v = compileValidator();
|
|
445
|
+
assert.equal(
|
|
446
|
+
v({ tabHeader: { item: { arrange: { type: "equal" } } } }),
|
|
447
|
+
false,
|
|
448
|
+
);
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
test("Ajv: tabHeader unknown sub-block 거부", () => {
|
|
452
|
+
if (!Ajv2020) return;
|
|
453
|
+
const v = compileValidator();
|
|
454
|
+
assert.equal(v({ tabHeader: { footer: {} } }), false);
|
|
455
|
+
});
|
|
456
|
+
|
|
457
|
+
test("Ajv: arrange type / align enum 검증", () => {
|
|
458
|
+
if (!Ajv2020) return;
|
|
459
|
+
const v = compileValidator();
|
|
460
|
+
for (const t of ["match", "equal", "fixed"]) {
|
|
461
|
+
assert.equal(
|
|
462
|
+
v({ tabHeader: { container: { arrange: { type: t } } } }),
|
|
463
|
+
true,
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
assert.equal(
|
|
467
|
+
v({ tabHeader: { container: { arrange: { type: "stretch" } } } }),
|
|
468
|
+
false,
|
|
469
|
+
);
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
test("Ajv: border=false / 'none' / color slot 통과; 임의 색 거부", () => {
|
|
473
|
+
if (!Ajv2020) return;
|
|
474
|
+
const v = compileValidator();
|
|
475
|
+
assert.equal(v({ border: false }), true);
|
|
476
|
+
assert.equal(v({ border: "none" }), true);
|
|
477
|
+
assert.equal(v({ border: "hairline" }), true);
|
|
478
|
+
assert.equal(v({ border: "#abc" }), false);
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
test("Ajv: fixed boolean 만 통과", () => {
|
|
482
|
+
if (!Ajv2020) return;
|
|
483
|
+
const v = compileValidator();
|
|
484
|
+
assert.equal(v({ fixed: true }), true);
|
|
485
|
+
assert.equal(v({ fixed: false }), true);
|
|
486
|
+
assert.equal(v({ fixed: "yes" }), false);
|
|
487
|
+
});
|