mlform 0.1.7 → 0.1.9
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/README.md +42 -13
- package/dist/builtins-ml-pjab8_gu.js +3878 -0
- package/dist/{design-system-CrrSGfFB.js → design-system-CIU_vH6O.js} +612 -415
- package/dist/errors-CTNw8fwS.js +8 -0
- package/dist/kit-QY6zff-h.js +1888 -0
- package/dist/mlform/behaviors.mjs +32 -0
- package/dist/mlform/builtins-ml.mjs +2 -0
- package/dist/mlform/design-system.mjs +2 -2
- package/dist/mlform/kit.mjs +3 -3
- package/dist/mlform/presentation.mjs +2 -0
- package/dist/mlform/primitives.mjs +2 -2
- package/dist/mlform/runtime.mjs +4 -0
- package/dist/mlform/schema.mjs +102 -0
- package/dist/mlform/transport.mjs +2 -2
- package/dist/mlform.mjs +8 -4
- package/dist/presentation-BrlVO4oV.js +200 -0
- package/dist/{primitives-BqjFDDhL.js → primitives-Di95y_ur.js} +1653 -1561
- package/dist/runtime-C5iTM3uu.js +1839 -0
- package/dist/strings-CWwrrYzz.js +4 -0
- package/dist/{transport-A1RsnZhD.js → transport-B6ePTLFK.js} +345 -372
- package/dist/types/behaviors/index.d.ts +3 -0
- package/dist/types/builtins-ml/definitions/fields/boolean.d.ts +9 -0
- package/dist/types/builtins-ml/definitions/fields/category.d.ts +12 -0
- package/dist/types/builtins-ml/definitions/fields/date.d.ts +10 -0
- package/dist/types/builtins-ml/definitions/fields/long-text.d.ts +11 -0
- package/dist/types/{src/engine/builtins → builtins-ml/definitions}/fields/mapped-category.d.ts +3 -2
- package/dist/types/{src/engine/builtins → builtins-ml/definitions}/fields/multi-choice.d.ts +3 -2
- package/dist/types/builtins-ml/definitions/fields/number.d.ts +12 -0
- package/dist/types/builtins-ml/definitions/fields/rating.d.ts +10 -0
- package/dist/types/builtins-ml/definitions/fields/series-helpers.d.ts +52 -0
- package/dist/types/builtins-ml/definitions/fields/series.d.ts +3 -0
- package/dist/types/{src/engine/builtins → builtins-ml/definitions}/fields/single-choice.d.ts +3 -2
- package/dist/types/builtins-ml/definitions/fields/text.d.ts +11 -0
- package/dist/types/{src/engine/builtins → builtins-ml/definitions}/index.d.ts +13 -34
- package/dist/types/builtins-ml/definitions/reports/classifier.d.ts +9 -0
- package/dist/types/builtins-ml/definitions/reports/regressor.d.ts +9 -0
- package/dist/types/{src/engine/builtins → builtins-ml/definitions}/shared.d.ts +25 -1
- package/dist/types/builtins-ml/index.d.ts +5 -0
- package/dist/types/design-system/recipes/index.d.ts +3 -0
- package/dist/types/{src/design-system → design-system}/registry/builtins.d.ts +0 -3
- package/dist/types/{src/design-system → design-system}/registry/index.d.ts +3 -1
- package/dist/types/design-system/runtime/controller-helpers.d.ts +12 -0
- package/dist/types/design-system/runtime/fingerprint.d.ts +8 -0
- package/dist/types/design-system/runtime/host-observer.d.ts +1 -0
- package/dist/types/design-system/runtime/hydration-state.d.ts +13 -0
- package/dist/types/design-system/runtime/inherited-scheme.d.ts +5 -0
- package/dist/types/design-system/runtime/media.d.ts +19 -0
- package/dist/types/design-system/themes/airbnb.d.ts +2 -0
- package/dist/types/design-system/themes/clickhouse.d.ts +2 -0
- package/dist/types/design-system/themes/index.d.ts +4 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/kit/accordion-root-styles.d.ts +1 -0
- package/dist/types/kit/accordion-root.d.ts +24 -0
- package/dist/types/kit/accordion.d.ts +2 -0
- package/dist/types/kit/constants.d.ts +33 -0
- package/dist/types/{src/kit → kit}/defaults.d.ts +4 -4
- package/dist/types/kit/error-navigation.d.ts +2 -0
- package/dist/types/kit/index.d.ts +9 -0
- package/dist/types/kit/layout-helpers.d.ts +29 -0
- package/dist/types/kit/layout-node-render.d.ts +18 -0
- package/dist/types/kit/layout-node-resolver.d.ts +3 -0
- package/dist/types/kit/layout-types.d.ts +124 -0
- package/dist/types/kit/layout-utils.d.ts +9 -0
- package/dist/types/kit/layout.d.ts +8 -0
- package/dist/types/{src/kit/types.d.ts → kit/mount-types.d.ts} +6 -4
- package/dist/types/kit/panel-nav.d.ts +9 -0
- package/dist/types/{src/questionnaire/primitives/components → kit}/step-indicator.d.ts +3 -3
- package/dist/types/kit/tabs-root-styles.d.ts +1 -0
- package/dist/types/kit/tabs-root.d.ts +24 -0
- package/dist/types/kit/tabs.d.ts +2 -0
- package/dist/types/kit/types.d.ts +5 -0
- package/dist/types/kit/view-layout-state.d.ts +14 -0
- package/dist/types/kit/view-navigation.d.ts +8 -0
- package/dist/types/kit/view-snapshot-cache.d.ts +14 -0
- package/dist/types/kit/view-snapshot.d.ts +15 -0
- package/dist/types/kit/view-types.d.ts +172 -0
- package/dist/types/kit/view.d.ts +8 -0
- package/dist/types/kit/wizard-constants.d.ts +19 -0
- package/dist/types/kit/wizard-root-styles.d.ts +1 -0
- package/dist/types/kit/wizard-root.d.ts +23 -0
- package/dist/types/kit/wizard.d.ts +2 -0
- package/dist/types/packs/default.d.ts +2 -0
- package/dist/types/packs/index.d.ts +3 -0
- package/dist/types/packs/ml.d.ts +2 -0
- package/dist/types/packs/shared.d.ts +24 -0
- package/dist/types/presentation/define-explanation-kind.d.ts +11 -0
- package/dist/types/presentation/define-field-kind.d.ts +18 -0
- package/dist/types/presentation/define-report-kind.d.ts +15 -0
- package/dist/types/presentation/index.d.ts +10 -0
- package/dist/types/presentation/register-kind.d.ts +6 -0
- package/dist/types/presentation/registry.d.ts +15 -0
- package/dist/types/presentation/types/explanation.d.ts +32 -0
- package/dist/types/presentation/types/field.d.ts +36 -0
- package/dist/types/presentation/types/report.d.ts +41 -0
- package/dist/types/{src/primitives → primitives}/base-explanation-element.d.ts +2 -1
- package/dist/types/{src/primitives → primitives}/base-field-element.d.ts +2 -1
- package/dist/types/{src/primitives → primitives}/base-report-element.d.ts +2 -1
- package/dist/types/primitives/components/error-focus.d.ts +4 -0
- package/dist/types/{src/primitives → primitives}/components/explanation-panel.d.ts +4 -2
- package/dist/types/primitives/components/field-frame-feedback.d.ts +9 -0
- package/dist/types/primitives/components/field-frame-styles.d.ts +1 -0
- package/dist/types/{src/primitives → primitives}/components/field-frame.d.ts +5 -3
- package/dist/types/{src/primitives → primitives}/components/form-errors.d.ts +1 -1
- package/dist/types/primitives/components/form-root-presenters.d.ts +17 -0
- package/dist/types/primitives/components/form-root-split-styles.d.ts +1 -0
- package/dist/types/primitives/components/form-root-state.d.ts +19 -0
- package/dist/types/primitives/components/form-root-styles.d.ts +1 -0
- package/dist/types/primitives/components/form-root-templates.d.ts +42 -0
- package/dist/types/{src/primitives → primitives}/components/form-root.d.ts +4 -2
- package/dist/types/{src/primitives → primitives}/components/presentation.d.ts +1 -1
- package/dist/types/{src/primitives → primitives}/components/report-frame.d.ts +4 -2
- package/dist/types/{src/primitives → primitives}/components/submit-button.d.ts +1 -1
- package/dist/types/{src/primitives → primitives}/constants.d.ts +1 -1
- package/dist/types/primitives/fields/series-field-helpers.d.ts +23 -0
- package/dist/types/primitives/fields/series-field-renderers.d.ts +18 -0
- package/dist/types/primitives/fields/series-field-styles.d.ts +1 -0
- package/dist/types/{src/primitives → primitives}/mount-form.d.ts +1 -1
- package/dist/types/primitives/presentation.d.ts +8 -0
- package/dist/types/{src/primitives → primitives}/types.d.ts +4 -1
- package/dist/types/runtime/create-runtime-helpers.d.ts +11 -0
- package/dist/types/{src/engine → runtime}/errors.d.ts +3 -3
- package/dist/types/runtime/fields/state-calculations.d.ts +25 -0
- package/dist/types/runtime/fields/state.d.ts +2 -0
- package/dist/types/runtime/form.d.ts +1 -0
- package/dist/types/runtime/index.d.ts +12 -0
- package/dist/types/runtime/runtime-behaviors.d.ts +23 -0
- package/dist/types/runtime/runtime-controller.d.ts +34 -0
- package/dist/types/runtime/runtime-refresh.d.ts +14 -0
- package/dist/types/runtime/runtime-values.d.ts +19 -0
- package/dist/types/runtime/submission/create-submitter.d.ts +2 -0
- package/dist/types/runtime/submission/error-flow.d.ts +19 -0
- package/dist/types/runtime/submission/field-updates.d.ts +14 -0
- package/dist/types/runtime/submission/pending-patches.d.ts +2 -0
- package/dist/types/runtime/submission/report-updates.d.ts +16 -0
- package/dist/types/runtime/submission/stream-events.d.ts +13 -0
- package/dist/types/runtime/submission/stream-progress.d.ts +4 -0
- package/dist/types/runtime/submission/submitter.d.ts +2 -0
- package/dist/types/runtime/submission/types.d.ts +60 -0
- package/dist/types/runtime/types/behavior.d.ts +32 -0
- package/dist/types/runtime/types/explanation.d.ts +15 -0
- package/dist/types/runtime/types/field.d.ts +17 -0
- package/dist/types/{src/engine → runtime}/types/form.d.ts +8 -11
- package/dist/types/{src/engine → runtime}/types/index.d.ts +1 -2
- package/dist/types/runtime/types/registry.d.ts +6 -0
- package/dist/types/runtime/types/report.d.ts +13 -0
- package/dist/types/{src/engine → runtime}/types/transport.d.ts +2 -2
- package/dist/types/{src/engine → runtime}/utils.d.ts +2 -2
- package/dist/types/{src/engine/validation/field.d.ts → runtime/validation/field-state.d.ts} +3 -19
- package/dist/types/runtime/validation/field-validator.d.ts +18 -0
- package/dist/types/runtime/validation/field.d.ts +2 -0
- package/dist/types/schema/index.d.ts +7 -0
- package/dist/types/schema/normalize.d.ts +2 -0
- package/dist/types/schema/registry.d.ts +9 -0
- package/dist/types/schema/types/explanation.d.ts +43 -0
- package/dist/types/{src/engine → schema}/types/field.d.ts +3 -45
- package/dist/types/schema/types/form.d.ts +13 -0
- package/dist/types/schema/types/report.d.ts +43 -0
- package/dist/types/shared/index.d.ts +3 -0
- package/dist/types/shared/object.d.ts +1 -0
- package/dist/types/shared/strings.d.ts +1 -0
- package/dist/types/transport/composition/fanout-helpers.d.ts +2 -0
- package/dist/types/transport/composition/fanout-options.d.ts +9 -0
- package/dist/types/transport/composition/fanout.d.ts +2 -0
- package/dist/types/{src/transport → transport}/composition/index.d.ts +1 -0
- package/dist/types/transport/composition/quorum-fanout.d.ts +2 -0
- package/dist/types/{src/transport → transport}/errors.d.ts +1 -1
- package/dist/types/transport/internal-core.d.ts +21 -0
- package/dist/types/transport/internal-errors.d.ts +21 -0
- package/dist/types/transport/internal-request.d.ts +21 -0
- package/dist/types/transport/internal-routing.d.ts +25 -0
- package/dist/types/transport/internal-sse.d.ts +14 -0
- package/dist/types/transport/internal-stream.d.ts +13 -0
- package/dist/types/transport/internal.d.ts +6 -0
- package/dist/types/transport/types/options-http.d.ts +85 -0
- package/dist/types/transport/types/options-middleware.d.ts +96 -0
- package/dist/types/transport/types/options-routing.d.ts +82 -0
- package/dist/types/transport/types/options.d.ts +3 -0
- package/dist/utils-J5o8lkea.js +29 -0
- package/package.json +26 -14
- package/dist/engine-CEy1IX7y.js +0 -5367
- package/dist/kit-DrrbtxI2.js +0 -76
- package/dist/mlform/engine.mjs +0 -3
- package/dist/mlform/questionnaire.mjs +0 -640
- package/dist/types/src/design-system/recipes/index.d.ts +0 -4
- package/dist/types/src/design-system/themes/index.d.ts +0 -5
- package/dist/types/src/engine/builtins/fields/boolean.d.ts +0 -8
- package/dist/types/src/engine/builtins/fields/category.d.ts +0 -11
- package/dist/types/src/engine/builtins/fields/date.d.ts +0 -9
- package/dist/types/src/engine/builtins/fields/long-text.d.ts +0 -10
- package/dist/types/src/engine/builtins/fields/number.d.ts +0 -11
- package/dist/types/src/engine/builtins/fields/rating.d.ts +0 -9
- package/dist/types/src/engine/builtins/fields/series.d.ts +0 -20
- package/dist/types/src/engine/builtins/fields/text.d.ts +0 -10
- package/dist/types/src/engine/builtins/reports/classifier.d.ts +0 -8
- package/dist/types/src/engine/builtins/reports/regressor.d.ts +0 -8
- package/dist/types/src/engine/declarative/explanation.d.ts +0 -2
- package/dist/types/src/engine/declarative/field.d.ts +0 -2
- package/dist/types/src/engine/declarative/report.d.ts +0 -2
- package/dist/types/src/engine/index.d.ts +0 -11
- package/dist/types/src/engine/registry/index.d.ts +0 -26
- package/dist/types/src/engine/submission/submitter.d.ts +0 -40
- package/dist/types/src/engine/types/explanation.d.ts +0 -109
- package/dist/types/src/engine/types/report.d.ts +0 -87
- package/dist/types/src/index.d.ts +0 -7
- package/dist/types/src/kit/constants.d.ts +0 -4
- package/dist/types/src/kit/index.d.ts +0 -4
- package/dist/types/src/questionnaire/constants.d.ts +0 -31
- package/dist/types/src/questionnaire/defaults.d.ts +0 -8
- package/dist/types/src/questionnaire/engine/controller.d.ts +0 -12
- package/dist/types/src/questionnaire/engine/schema.d.ts +0 -9
- package/dist/types/src/questionnaire/errors.d.ts +0 -3
- package/dist/types/src/questionnaire/index.d.ts +0 -6
- package/dist/types/src/questionnaire/mount.d.ts +0 -3
- package/dist/types/src/questionnaire/primitives/components/questionnaire-root.d.ts +0 -23
- package/dist/types/src/questionnaire/primitives/register.d.ts +0 -0
- package/dist/types/src/questionnaire/types.d.ts +0 -69
- package/dist/types/src/shared/index.d.ts +0 -1
- package/dist/types/src/transport/composition/fanout.d.ts +0 -3
- package/dist/types/src/transport/internal.d.ts +0 -110
- package/dist/types/src/transport/types/options.d.ts +0 -258
- package/dist/types/{src/design-system → design-system}/constants.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/contract/component-keys.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/contract/component-tokens.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/contract/global-tokens.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/contract/index.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/contract/token-keys.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/index.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/recipes/contrast.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/recipes/default.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/recipes/minimal.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/recipes/soft.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/registry/create-registry.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/registry/deep-freeze.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/registry/define-recipe.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/registry/define-theme.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/registry/define-token-maps.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/diagnostics.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/index.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/merge-config.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/migrate-tokens.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/resolve-mode.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/resolve-recipe.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/resolve-theme.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/resolve-tokens.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/apply-tokens.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/attach-design-system.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/create-stylesheet.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/declarations.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/design-system-controller.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/host-state.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/hydrate-design-system.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/index.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/themes/cobalt.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/themes/graphite.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/themes/neutral.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/themes/sage.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/themes/sunset.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/tokens/base.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/tokens/contrast.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/tokens/density.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/tokens/forced-colors.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/tokens/index.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/tokens/motion.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/types.d.ts +0 -0
- package/dist/types/{src/kit → kit}/mount-form.d.ts +0 -0
- package/dist/types/{src/engine/declarative → presentation/types}/presentation.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/base-async-report-element.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/components/declarative-explanation.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/components/declarative-field.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/components/declarative-report.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/components/unsupported-component.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/controller-binding.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/fields/boolean-field.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/fields/category-field.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/fields/date-field.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/fields/long-text-field.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/fields/multi-choice-field.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/fields/number-field.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/fields/rating-field.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/fields/series-field.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/fields/single-choice-field.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/fields/text-field.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/index.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/register.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/registry.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/reports/classifier-report.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/reports/regressor-report.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/utils.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/comparison.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/constants.d.ts +0 -0
- package/dist/types/{src/engine/form.d.ts → runtime/create-runtime.d.ts} +0 -0
- package/dist/types/{src/engine → runtime}/equality.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/explanations/controller.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/explanations/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/fields/controller.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/fields/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/paths.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/reports/controller.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/reports/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/schema/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/state/engine.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/state/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/state/snapshots.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/state/store.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/abort.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/explanations.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/lifecycle.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/pipeline.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/reports.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/request.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/result.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/types/pipeline.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/validation/conditions.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/validation/form.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/validation/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/values.d.ts +0 -0
- package/dist/types/{src/engine → schema}/types/registry.d.ts +1 -1
- /package/dist/types/{src/shared → shared}/errors.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/capabilities.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/clone.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/composition/fallback.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/composition/hedged.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/composition/load-balancing.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/composition/pipeline.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/composition/racing.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/composition/routing.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/constants.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/index.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/auth.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/cache.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/circuit-breaker.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/dedup.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/index.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/logging.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/metrics.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/pipe.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/rate-limit.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/retry.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/timeout.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/tracing.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/transform.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/policy-context.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/protocols/graphql.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/protocols/grpc.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/protocols/index.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/protocols/json.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/protocols/sse.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/protocols/websocket.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/runtime.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/state/cache-store.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/state/circuit-breaker.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/state/health.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/state/index.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/state/rate-limiter.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/state/session.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/capabilities.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/core.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/events.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/index.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/middleware.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/session.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/state.d.ts +0 -0
|
@@ -187,44 +187,206 @@ var e = [
|
|
|
187
187
|
density: "comfortable",
|
|
188
188
|
motion: "subtle",
|
|
189
189
|
tokens: { "--mlf-shell-bg": "transparent" }
|
|
190
|
-
}, s =
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
190
|
+
}, s = [
|
|
191
|
+
o,
|
|
192
|
+
{
|
|
193
|
+
id: "minimal",
|
|
194
|
+
label: "Minimal",
|
|
195
|
+
density: "compact",
|
|
196
|
+
motion: "none",
|
|
197
|
+
tokens: {
|
|
198
|
+
"--mlf-shadow-md": "none",
|
|
199
|
+
"--mlf-shadow-lg": "none"
|
|
200
|
+
},
|
|
201
|
+
components: {
|
|
202
|
+
hero: { tokens: {
|
|
203
|
+
"--mlf-hero-bg": "var(--mlf-color-surface)",
|
|
204
|
+
"--mlf-hero-shadow": "none"
|
|
205
|
+
} },
|
|
206
|
+
field: { tokens: {
|
|
207
|
+
"--mlf-field-bg": "var(--mlf-color-surface)",
|
|
208
|
+
"--mlf-field-shadow": "none"
|
|
209
|
+
} },
|
|
210
|
+
report: { tokens: {
|
|
211
|
+
"--mlf-report-bg": "var(--mlf-color-surface)",
|
|
212
|
+
"--mlf-report-shadow": "none"
|
|
213
|
+
} },
|
|
214
|
+
submit: { tokens: {
|
|
215
|
+
"--mlf-submit-shadow": "none",
|
|
216
|
+
"--mlf-submit-shadow-hover": "none"
|
|
217
|
+
} }
|
|
218
|
+
}
|
|
198
219
|
},
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
"--mlf-
|
|
206
|
-
"--mlf-field-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
220
|
+
{
|
|
221
|
+
id: "soft",
|
|
222
|
+
label: "Soft",
|
|
223
|
+
density: "comfortable",
|
|
224
|
+
motion: "subtle",
|
|
225
|
+
components: {
|
|
226
|
+
hero: { tokens: { "--mlf-hero-bg": "radial-gradient(circle at top left, color-mix(in srgb, var(--mlf-color-accent) 10%, transparent), transparent 42%), linear-gradient(180deg, color-mix(in srgb, var(--mlf-color-surface) 92%, var(--mlf-color-surface-elevated)), color-mix(in srgb, var(--mlf-color-surface-muted) 88%, var(--mlf-color-surface-elevated)))" } },
|
|
227
|
+
field: { tokens: { "--mlf-field-bg": "linear-gradient(180deg, color-mix(in srgb, var(--mlf-color-surface) 96%, var(--mlf-color-surface-elevated)), color-mix(in srgb, var(--mlf-color-surface-muted) 94%, var(--mlf-color-surface-elevated)))" } },
|
|
228
|
+
report: { tokens: { "--mlf-report-bg": "linear-gradient(180deg, color-mix(in srgb, var(--mlf-color-surface) 95%, var(--mlf-color-surface-elevated)), color-mix(in srgb, var(--mlf-color-surface-muted) 92%, var(--mlf-color-surface-elevated)))" } }
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
a
|
|
232
|
+
], c = {
|
|
233
|
+
id: "airbnb",
|
|
234
|
+
label: "Airbnb",
|
|
235
|
+
schemes: {
|
|
236
|
+
light: {
|
|
237
|
+
colorScheme: "light",
|
|
238
|
+
tokens: {
|
|
239
|
+
"--mlf-font-family": "\"Airbnb Cereal VF\", Circular, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
|
|
240
|
+
"--mlf-shadow-sm": "rgba(0, 0, 0, 0.02) 0px 0px 0px 1px, rgba(0, 0, 0, 0.04) 0px 2px 6px, rgba(0, 0, 0, 0.10) 0px 4px 8px",
|
|
241
|
+
"--mlf-shadow-md": "rgba(0, 0, 0, 0.08) 0px 4px 12px",
|
|
242
|
+
"--mlf-shadow-lg": "rgba(0, 0, 0, 0.10) 0px 8px 24px, rgba(0, 0, 0, 0.06) 0px 2px 8px",
|
|
243
|
+
"--mlf-radius-sm": "8px",
|
|
244
|
+
"--mlf-radius-md": "14px",
|
|
245
|
+
"--mlf-radius-lg": "20px",
|
|
246
|
+
"--mlf-radius-xl": "32px",
|
|
247
|
+
"--mlf-radius-full": "9999px",
|
|
248
|
+
"--mlf-color-bg": "#ffffff",
|
|
249
|
+
"--mlf-color-surface": "#ffffff",
|
|
250
|
+
"--mlf-color-surface-muted": "#f7f7f7",
|
|
251
|
+
"--mlf-color-surface-elevated": "#ffffff",
|
|
252
|
+
"--mlf-color-text": "#222222",
|
|
253
|
+
"--mlf-color-text-muted": "#6a6a6a",
|
|
254
|
+
"--mlf-color-border": "#dddddd",
|
|
255
|
+
"--mlf-color-border-strong": "#c1c1c1",
|
|
256
|
+
"--mlf-color-accent": "#ff385c",
|
|
257
|
+
"--mlf-color-accent-hover": "#e00b41",
|
|
258
|
+
"--mlf-color-accent-soft": "rgba(255, 56, 92, 0.12)",
|
|
259
|
+
"--mlf-color-success": "#008a05",
|
|
260
|
+
"--mlf-color-warning": "#b26a00",
|
|
261
|
+
"--mlf-color-danger": "#c13515",
|
|
262
|
+
"--mlf-color-danger-soft": "rgba(193, 53, 21, 0.12)",
|
|
263
|
+
"--mlf-color-focus-ring": "rgba(34, 34, 34, 0.24)",
|
|
264
|
+
"--mlf-color-overlay": "rgba(255, 255, 255, 0.82)",
|
|
265
|
+
"--mlf-color-hover-surface": "#f2f2f2",
|
|
266
|
+
"--mlf-color-chart-track": "rgba(34, 34, 34, 0.12)",
|
|
267
|
+
"--mlf-color-premium-luxe": "#460479",
|
|
268
|
+
"--mlf-color-premium-plus": "#92174d",
|
|
269
|
+
"--mlf-color-legal": "#428bff"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
dark: {
|
|
273
|
+
colorScheme: "dark",
|
|
274
|
+
tokens: {
|
|
275
|
+
"--mlf-font-family": "\"Airbnb Cereal VF\", Circular, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
|
|
276
|
+
"--mlf-shadow-sm": "rgba(0, 0, 0, 0.36) 0px 0px 0px 1px, rgba(0, 0, 0, 0.32) 0px 2px 6px, rgba(0, 0, 0, 0.42) 0px 4px 8px",
|
|
277
|
+
"--mlf-shadow-md": "rgba(0, 0, 0, 0.38) 0px 6px 18px",
|
|
278
|
+
"--mlf-shadow-lg": "rgba(0, 0, 0, 0.44) 0px 16px 42px, rgba(0, 0, 0, 0.30) 0px 4px 14px",
|
|
279
|
+
"--mlf-radius-sm": "8px",
|
|
280
|
+
"--mlf-radius-md": "14px",
|
|
281
|
+
"--mlf-radius-lg": "20px",
|
|
282
|
+
"--mlf-radius-xl": "32px",
|
|
283
|
+
"--mlf-radius-full": "9999px",
|
|
284
|
+
"--mlf-color-bg": "#121212",
|
|
285
|
+
"--mlf-color-surface": "#1c1c1c",
|
|
286
|
+
"--mlf-color-surface-muted": "#262626",
|
|
287
|
+
"--mlf-color-surface-elevated": "#2b2b2b",
|
|
288
|
+
"--mlf-color-text": "#f7f7f7",
|
|
289
|
+
"--mlf-color-text-muted": "#b0b0b0",
|
|
290
|
+
"--mlf-color-border": "#3a3a3a",
|
|
291
|
+
"--mlf-color-border-strong": "#505050",
|
|
292
|
+
"--mlf-color-accent": "#ff385c",
|
|
293
|
+
"--mlf-color-accent-hover": "#ff5a75",
|
|
294
|
+
"--mlf-color-accent-soft": "rgba(255, 56, 92, 0.18)",
|
|
295
|
+
"--mlf-color-success": "#2fbd59",
|
|
296
|
+
"--mlf-color-warning": "#ffb340",
|
|
297
|
+
"--mlf-color-danger": "#ff6b5f",
|
|
298
|
+
"--mlf-color-danger-soft": "rgba(255, 107, 95, 0.16)",
|
|
299
|
+
"--mlf-color-focus-ring": "rgba(255, 56, 92, 0.34)",
|
|
300
|
+
"--mlf-color-overlay": "rgba(18, 18, 18, 0.84)",
|
|
301
|
+
"--mlf-color-hover-surface": "#333333",
|
|
302
|
+
"--mlf-color-chart-track": "rgba(247, 247, 247, 0.14)",
|
|
303
|
+
"--mlf-color-premium-luxe": "#b26bff",
|
|
304
|
+
"--mlf-color-premium-plus": "#ff6bb0",
|
|
305
|
+
"--mlf-color-legal": "#7aa7ff"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
226
308
|
}
|
|
227
309
|
}, l = {
|
|
310
|
+
id: "clickhouse",
|
|
311
|
+
label: "ClickHouse",
|
|
312
|
+
schemes: {
|
|
313
|
+
light: {
|
|
314
|
+
colorScheme: "light",
|
|
315
|
+
tokens: {
|
|
316
|
+
"--mlf-font-family": "Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif",
|
|
317
|
+
"--mlf-font-family-mono": "\"JetBrains Mono\", \"SFMono-Regular\", Consolas, \"Liberation Mono\", monospace",
|
|
318
|
+
"--mlf-shadow-sm": "none",
|
|
319
|
+
"--mlf-shadow-md": "none",
|
|
320
|
+
"--mlf-shadow-lg": "none",
|
|
321
|
+
"--mlf-radius-sm": "6px",
|
|
322
|
+
"--mlf-radius-md": "8px",
|
|
323
|
+
"--mlf-radius-lg": "12px",
|
|
324
|
+
"--mlf-radius-xl": "12px",
|
|
325
|
+
"--mlf-radius-full": "9999px",
|
|
326
|
+
"--mlf-color-bg": "#f7f7f2",
|
|
327
|
+
"--mlf-color-surface": "#ffffff",
|
|
328
|
+
"--mlf-color-surface-muted": "#eeeeea",
|
|
329
|
+
"--mlf-color-surface-elevated": "#f4f4ef",
|
|
330
|
+
"--mlf-color-text": "#0a0a0a",
|
|
331
|
+
"--mlf-color-text-muted": "#5a5a5a",
|
|
332
|
+
"--mlf-color-border": "#d8d8cf",
|
|
333
|
+
"--mlf-color-border-strong": "#bdbdaf",
|
|
334
|
+
"--mlf-color-accent": "#e6eb52",
|
|
335
|
+
"--mlf-color-accent-hover": "#d6dc3f",
|
|
336
|
+
"--mlf-color-accent-soft": "rgba(230, 235, 82, 0.28)",
|
|
337
|
+
"--mlf-color-success": "#16803a",
|
|
338
|
+
"--mlf-color-warning": "#9a7b00",
|
|
339
|
+
"--mlf-color-danger": "#c73939",
|
|
340
|
+
"--mlf-color-danger-soft": "rgba(199, 57, 57, 0.12)",
|
|
341
|
+
"--mlf-color-focus-ring": "rgba(230, 235, 82, 0.42)",
|
|
342
|
+
"--mlf-color-overlay": "rgba(247, 247, 242, 0.84)",
|
|
343
|
+
"--mlf-color-hover-surface": "#eeeeea",
|
|
344
|
+
"--mlf-color-chart-track": "rgba(10, 10, 10, 0.12)",
|
|
345
|
+
"--mlf-color-code-bg": "#1a1a1a",
|
|
346
|
+
"--mlf-color-code-text": "#e6e6e6",
|
|
347
|
+
"--mlf-color-info": "#3b82f6"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
dark: {
|
|
351
|
+
colorScheme: "dark",
|
|
352
|
+
tokens: {
|
|
353
|
+
"--mlf-font-family": "Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif",
|
|
354
|
+
"--mlf-font-family-mono": "\"JetBrains Mono\", \"SFMono-Regular\", Consolas, \"Liberation Mono\", monospace",
|
|
355
|
+
"--mlf-shadow-sm": "none",
|
|
356
|
+
"--mlf-shadow-md": "none",
|
|
357
|
+
"--mlf-shadow-lg": "none",
|
|
358
|
+
"--mlf-radius-sm": "6px",
|
|
359
|
+
"--mlf-radius-md": "8px",
|
|
360
|
+
"--mlf-radius-lg": "12px",
|
|
361
|
+
"--mlf-radius-xl": "12px",
|
|
362
|
+
"--mlf-radius-full": "9999px",
|
|
363
|
+
"--mlf-color-bg": "#0a0a0a",
|
|
364
|
+
"--mlf-color-surface": "#121212",
|
|
365
|
+
"--mlf-color-surface-muted": "#1a1a1a",
|
|
366
|
+
"--mlf-color-surface-elevated": "#242424",
|
|
367
|
+
"--mlf-color-text": "#ffffff",
|
|
368
|
+
"--mlf-color-text-muted": "#cccccc",
|
|
369
|
+
"--mlf-color-border": "#2a2a2a",
|
|
370
|
+
"--mlf-color-border-strong": "#3a3a3a",
|
|
371
|
+
"--mlf-color-accent": "#faff69",
|
|
372
|
+
"--mlf-color-accent-hover": "#e6eb52",
|
|
373
|
+
"--mlf-color-accent-soft": "rgba(250, 255, 105, 0.16)",
|
|
374
|
+
"--mlf-color-success": "#22c55e",
|
|
375
|
+
"--mlf-color-warning": "#facc15",
|
|
376
|
+
"--mlf-color-danger": "#ef4444",
|
|
377
|
+
"--mlf-color-danger-soft": "rgba(239, 68, 68, 0.16)",
|
|
378
|
+
"--mlf-color-focus-ring": "rgba(250, 255, 105, 0.42)",
|
|
379
|
+
"--mlf-color-overlay": "rgba(10, 10, 10, 0.86)",
|
|
380
|
+
"--mlf-color-hover-surface": "#242424",
|
|
381
|
+
"--mlf-color-chart-track": "rgba(255, 255, 255, 0.14)",
|
|
382
|
+
"--mlf-color-code-bg": "#1a1a1a",
|
|
383
|
+
"--mlf-color-code-text": "#e6e6e6",
|
|
384
|
+
"--mlf-color-code-muted": "#888888",
|
|
385
|
+
"--mlf-color-info": "#3b82f6"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}, u = {
|
|
228
390
|
id: "cobalt",
|
|
229
391
|
label: "Cobalt",
|
|
230
392
|
schemes: {
|
|
@@ -280,7 +442,7 @@ var e = [
|
|
|
280
442
|
}
|
|
281
443
|
}
|
|
282
444
|
}
|
|
283
|
-
},
|
|
445
|
+
}, d = {
|
|
284
446
|
id: "graphite",
|
|
285
447
|
label: "Graphite",
|
|
286
448
|
schemes: {
|
|
@@ -336,7 +498,7 @@ var e = [
|
|
|
336
498
|
}
|
|
337
499
|
}
|
|
338
500
|
}
|
|
339
|
-
},
|
|
501
|
+
}, f = {
|
|
340
502
|
id: "neutral",
|
|
341
503
|
label: "Neutral",
|
|
342
504
|
schemes: {
|
|
@@ -372,119 +534,127 @@ var e = [
|
|
|
372
534
|
}
|
|
373
535
|
}
|
|
374
536
|
}
|
|
375
|
-
},
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
537
|
+
}, p = [
|
|
538
|
+
l,
|
|
539
|
+
c,
|
|
540
|
+
f,
|
|
541
|
+
u,
|
|
542
|
+
{
|
|
543
|
+
id: "sage",
|
|
544
|
+
label: "Sage",
|
|
545
|
+
schemes: {
|
|
546
|
+
light: {
|
|
547
|
+
colorScheme: "light",
|
|
548
|
+
tokens: {
|
|
549
|
+
"--mlf-color-bg": "#f2f6f1",
|
|
550
|
+
"--mlf-color-surface": "#fbfdfb",
|
|
551
|
+
"--mlf-color-surface-muted": "#e8efe6",
|
|
552
|
+
"--mlf-color-surface-elevated": "#ffffff",
|
|
553
|
+
"--mlf-color-text": "#203126",
|
|
554
|
+
"--mlf-color-text-muted": "#5e7264",
|
|
555
|
+
"--mlf-color-border": "#cfdbcf",
|
|
556
|
+
"--mlf-color-border-strong": "#bbccbc",
|
|
557
|
+
"--mlf-color-accent": "#2f7d57",
|
|
558
|
+
"--mlf-color-accent-hover": "#256847",
|
|
559
|
+
"--mlf-color-accent-soft": "rgba(47, 125, 87, 0.12)",
|
|
560
|
+
"--mlf-color-success": "#2d8a57",
|
|
561
|
+
"--mlf-color-warning": "#bd7d29",
|
|
562
|
+
"--mlf-color-danger": "#b94a48",
|
|
563
|
+
"--mlf-color-danger-soft": "rgba(185, 74, 72, 0.12)",
|
|
564
|
+
"--mlf-color-focus-ring": "rgba(47, 125, 87, 0.24)",
|
|
565
|
+
"--mlf-color-overlay": "rgba(251, 253, 251, 0.78)",
|
|
566
|
+
"--mlf-color-hover-surface": "#dde9db",
|
|
567
|
+
"--mlf-color-chart-track": "rgba(32, 49, 38, 0.12)"
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
dark: {
|
|
571
|
+
colorScheme: "dark",
|
|
572
|
+
tokens: {
|
|
573
|
+
"--mlf-shadow-sm": "0 1px 3px rgba(0, 0, 0, 0.45)",
|
|
574
|
+
"--mlf-shadow-md": "0 14px 30px rgba(0, 0, 0, 0.35)",
|
|
575
|
+
"--mlf-shadow-lg": "0 24px 60px rgba(0, 0, 0, 0.28)",
|
|
576
|
+
"--mlf-color-bg": "#121a15",
|
|
577
|
+
"--mlf-color-surface": "#182119",
|
|
578
|
+
"--mlf-color-surface-muted": "#203024",
|
|
579
|
+
"--mlf-color-surface-elevated": "#24372a",
|
|
580
|
+
"--mlf-color-text": "#edf5ef",
|
|
581
|
+
"--mlf-color-text-muted": "#a8b9aa",
|
|
582
|
+
"--mlf-color-border": "#304234",
|
|
583
|
+
"--mlf-color-border-strong": "#3f5544",
|
|
584
|
+
"--mlf-color-accent": "#59b07d",
|
|
585
|
+
"--mlf-color-accent-hover": "#74c492",
|
|
586
|
+
"--mlf-color-accent-soft": "rgba(89, 176, 125, 0.16)",
|
|
587
|
+
"--mlf-color-success": "#67d595",
|
|
588
|
+
"--mlf-color-warning": "#efbb67",
|
|
589
|
+
"--mlf-color-danger": "#ff8e8a",
|
|
590
|
+
"--mlf-color-danger-soft": "rgba(255, 142, 138, 0.14)",
|
|
591
|
+
"--mlf-color-focus-ring": "rgba(89, 176, 125, 0.3)",
|
|
592
|
+
"--mlf-color-overlay": "rgba(18, 26, 21, 0.84)",
|
|
593
|
+
"--mlf-color-hover-surface": "#2a3d30",
|
|
594
|
+
"--mlf-color-chart-track": "rgba(168, 185, 170, 0.18)"
|
|
595
|
+
}
|
|
428
596
|
}
|
|
429
597
|
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
id: "sunset",
|
|
601
|
+
label: "Sunset",
|
|
602
|
+
schemes: {
|
|
603
|
+
light: {
|
|
604
|
+
colorScheme: "light",
|
|
605
|
+
tokens: {
|
|
606
|
+
"--mlf-color-bg": "#fff6f0",
|
|
607
|
+
"--mlf-color-surface": "#fffdfb",
|
|
608
|
+
"--mlf-color-surface-muted": "#ffe9dd",
|
|
609
|
+
"--mlf-color-surface-elevated": "#ffffff",
|
|
610
|
+
"--mlf-color-text": "#3b241d",
|
|
611
|
+
"--mlf-color-text-muted": "#7f5a50",
|
|
612
|
+
"--mlf-color-border": "#f0cdbb",
|
|
613
|
+
"--mlf-color-border-strong": "#e0b59f",
|
|
614
|
+
"--mlf-color-accent": "#d96a3a",
|
|
615
|
+
"--mlf-color-accent-hover": "#be5628",
|
|
616
|
+
"--mlf-color-accent-soft": "rgba(217, 106, 58, 0.14)",
|
|
617
|
+
"--mlf-color-success": "#2e8c63",
|
|
618
|
+
"--mlf-color-warning": "#d18a20",
|
|
619
|
+
"--mlf-color-danger": "#ca4a45",
|
|
620
|
+
"--mlf-color-danger-soft": "rgba(202, 74, 69, 0.12)",
|
|
621
|
+
"--mlf-color-focus-ring": "rgba(217, 106, 58, 0.24)",
|
|
622
|
+
"--mlf-color-overlay": "rgba(255, 253, 251, 0.8)",
|
|
623
|
+
"--mlf-color-hover-surface": "#ffdcca",
|
|
624
|
+
"--mlf-color-chart-track": "rgba(59, 36, 29, 0.12)"
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
dark: {
|
|
628
|
+
colorScheme: "dark",
|
|
629
|
+
tokens: {
|
|
630
|
+
"--mlf-shadow-sm": "0 1px 3px rgba(0, 0, 0, 0.45)",
|
|
631
|
+
"--mlf-shadow-md": "0 14px 30px rgba(0, 0, 0, 0.35)",
|
|
632
|
+
"--mlf-shadow-lg": "0 24px 60px rgba(0, 0, 0, 0.28)",
|
|
633
|
+
"--mlf-color-bg": "#1e1512",
|
|
634
|
+
"--mlf-color-surface": "#261b18",
|
|
635
|
+
"--mlf-color-surface-muted": "#32231f",
|
|
636
|
+
"--mlf-color-surface-elevated": "#392925",
|
|
637
|
+
"--mlf-color-text": "#fff1ea",
|
|
638
|
+
"--mlf-color-text-muted": "#d3b0a3",
|
|
639
|
+
"--mlf-color-border": "#513830",
|
|
640
|
+
"--mlf-color-border-strong": "#68473d",
|
|
641
|
+
"--mlf-color-accent": "#ff986b",
|
|
642
|
+
"--mlf-color-accent-hover": "#ffb089",
|
|
643
|
+
"--mlf-color-accent-soft": "rgba(255, 152, 107, 0.16)",
|
|
644
|
+
"--mlf-color-success": "#57c694",
|
|
645
|
+
"--mlf-color-warning": "#ffc36d",
|
|
646
|
+
"--mlf-color-danger": "#ff8d86",
|
|
647
|
+
"--mlf-color-danger-soft": "rgba(255, 141, 134, 0.14)",
|
|
648
|
+
"--mlf-color-focus-ring": "rgba(255, 152, 107, 0.3)",
|
|
649
|
+
"--mlf-color-overlay": "rgba(30, 21, 18, 0.84)",
|
|
650
|
+
"--mlf-color-hover-surface": "#422d27",
|
|
651
|
+
"--mlf-color-chart-track": "rgba(211, 176, 163, 0.18)"
|
|
652
|
+
}
|
|
484
653
|
}
|
|
485
654
|
}
|
|
486
|
-
}
|
|
487
|
-
|
|
655
|
+
},
|
|
656
|
+
d
|
|
657
|
+
], m = (e) => {
|
|
488
658
|
if (typeof e == "object" && e && !Object.isFrozen(e)) {
|
|
489
659
|
Object.freeze(e);
|
|
490
660
|
for (let t of Object.values(e)) m(t);
|
|
@@ -522,7 +692,7 @@ var e = [
|
|
|
522
692
|
}])) : void 0,
|
|
523
693
|
sharedTokens: e.sharedTokens ? { ...e.sharedTokens } : void 0
|
|
524
694
|
});
|
|
525
|
-
},
|
|
695
|
+
}, ee = class e {
|
|
526
696
|
#e = /* @__PURE__ */ new Map();
|
|
527
697
|
#t = /* @__PURE__ */ new Map();
|
|
528
698
|
#n = /* @__PURE__ */ new Map();
|
|
@@ -607,59 +777,48 @@ var e = [
|
|
|
607
777
|
for (let [e, n] of this.#n) t.#n.set(e, new Map(n));
|
|
608
778
|
return t;
|
|
609
779
|
}
|
|
610
|
-
},
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
p,
|
|
615
|
-
u
|
|
616
|
-
], b = [
|
|
617
|
-
o,
|
|
618
|
-
s,
|
|
619
|
-
c,
|
|
620
|
-
a
|
|
621
|
-
], x = () => {
|
|
622
|
-
let e = v();
|
|
623
|
-
for (let t of y) e.registerTheme(t);
|
|
624
|
-
for (let t of b) e.registerRecipe(t);
|
|
780
|
+
}, _ = () => new ee(), v = () => {
|
|
781
|
+
let e = _();
|
|
782
|
+
for (let t of p) e.registerTheme(t);
|
|
783
|
+
for (let t of s) e.registerRecipe(t);
|
|
625
784
|
return e;
|
|
626
|
-
},
|
|
785
|
+
}, y = v(), b = new Set(i), te = (t) => {
|
|
627
786
|
for (let n of e) if (t.startsWith(`--mlf-${n}-`)) return n;
|
|
628
787
|
return null;
|
|
629
|
-
},
|
|
788
|
+
}, ne = (e) => {
|
|
630
789
|
for (let t of Object.keys(e)) {
|
|
631
|
-
if (!
|
|
632
|
-
let e =
|
|
790
|
+
if (!b.has(t)) throw Error(`[mlform] Unknown global token "${t}"`);
|
|
791
|
+
let e = te(t);
|
|
633
792
|
if (e) throw Error(`[mlform] Token "${t}" belongs to component "${e}". Use defineComponentTokens("${e}", ...)`);
|
|
634
793
|
}
|
|
635
794
|
return { ...e };
|
|
636
|
-
},
|
|
795
|
+
}, re = (e, t) => {
|
|
637
796
|
for (let n of Object.keys(t)) {
|
|
638
|
-
if (!
|
|
797
|
+
if (!b.has(n)) throw Error(`[mlform] Unknown token "${n}" for component "${e}"`);
|
|
639
798
|
if (!n.startsWith(`--mlf-${e}-`)) throw Error(`[mlform] Token "${n}" does not belong to component "${e}"`);
|
|
640
799
|
}
|
|
641
800
|
return { tokens: { ...t } };
|
|
642
|
-
},
|
|
643
|
-
if (n) for (let r of Object.keys(n)) !r.startsWith("--mlf-") ||
|
|
801
|
+
}, x = new Set(i), S = /var\(\s*(--mlf-[a-z0-9-]+)\s*[,)]/g, C = (e, t, n) => {
|
|
802
|
+
if (n) for (let r of Object.keys(n)) !r.startsWith("--mlf-") || x.has(r) || e.push({
|
|
644
803
|
code: "unknown-token-key",
|
|
645
804
|
path: t,
|
|
646
805
|
value: r,
|
|
647
806
|
message: `[mlform] Unknown design-system token "${r}" at ${t}`
|
|
648
807
|
});
|
|
649
|
-
},
|
|
650
|
-
if (r) for (let i of Object.keys(r)) !i.startsWith("--mlf-") || !
|
|
808
|
+
}, w = (e, t, n, r) => {
|
|
809
|
+
if (r) for (let i of Object.keys(r)) !i.startsWith("--mlf-") || !x.has(i) || i.startsWith(`--mlf-${t}-`) || e.push({
|
|
651
810
|
code: "misplaced-component-token",
|
|
652
811
|
path: n,
|
|
653
812
|
value: i,
|
|
654
813
|
message: `[mlform] Token "${i}" does not belong to component "${t}" at ${n}`
|
|
655
814
|
});
|
|
656
|
-
},
|
|
815
|
+
}, ie = (e, t, n) => {
|
|
657
816
|
if (n) for (let [r, i] of Object.entries(n)) {
|
|
658
|
-
|
|
817
|
+
S.lastIndex = 0;
|
|
659
818
|
let n;
|
|
660
|
-
for (; (n =
|
|
819
|
+
for (; (n = S.exec(i)) !== null;) {
|
|
661
820
|
let i = n[1];
|
|
662
|
-
!t.has(i) &&
|
|
821
|
+
!t.has(i) && x.has(i) && e.push({
|
|
663
822
|
code: "broken-token-reference",
|
|
664
823
|
path: r,
|
|
665
824
|
value: i,
|
|
@@ -667,7 +826,7 @@ var e = [
|
|
|
667
826
|
});
|
|
668
827
|
}
|
|
669
828
|
}
|
|
670
|
-
},
|
|
829
|
+
}, T = (e) => {
|
|
671
830
|
let t = /* @__PURE__ */ new Set();
|
|
672
831
|
return e.filter((e) => {
|
|
673
832
|
let n = [
|
|
@@ -678,7 +837,7 @@ var e = [
|
|
|
678
837
|
].join("|");
|
|
679
838
|
return t.has(n) ? !1 : (t.add(n), !0);
|
|
680
839
|
});
|
|
681
|
-
},
|
|
840
|
+
}, E = (t, n, r, i) => {
|
|
682
841
|
let a = [];
|
|
683
842
|
typeof t.theme == "string" && !n.getTheme(t.theme) && a.push({
|
|
684
843
|
code: "unknown-theme-id",
|
|
@@ -690,17 +849,17 @@ var e = [
|
|
|
690
849
|
path: "recipe",
|
|
691
850
|
value: t.recipe,
|
|
692
851
|
message: `[mlform] Unknown recipe "${t.recipe}". Falling back to "${i.id}"`
|
|
693
|
-
}),
|
|
694
|
-
for (let [e, t] of Object.entries(r.variants ?? {}))
|
|
695
|
-
|
|
696
|
-
for (let [e, t] of Object.entries(i.components ?? {}))
|
|
697
|
-
|
|
852
|
+
}), C(a, `theme "${r.id}".sharedTokens`, r.sharedTokens), C(a, `theme "${r.id}".schemes.light.tokens`, r.schemes.light.tokens), C(a, `theme "${r.id}".schemes.dark.tokens`, r.schemes.dark?.tokens);
|
|
853
|
+
for (let [e, t] of Object.entries(r.variants ?? {})) C(a, `theme "${r.id}".variants.${e}.tokens`, t.tokens);
|
|
854
|
+
C(a, `recipe "${i.id}".tokens`, i.tokens);
|
|
855
|
+
for (let [e, t] of Object.entries(i.components ?? {})) C(a, `recipe "${i.id}".components.${e}.tokens`, t?.tokens), w(a, e, `recipe "${i.id}".components.${e}.tokens`, t?.tokens);
|
|
856
|
+
C(a, "overrides.tokens", t.overrides?.tokens);
|
|
698
857
|
for (let n of e) {
|
|
699
858
|
let e = t.overrides?.components?.[n];
|
|
700
|
-
|
|
859
|
+
C(a, `overrides.components.${n}.tokens`, e?.tokens), w(a, n, `overrides.components.${n}.tokens`, e?.tokens);
|
|
701
860
|
}
|
|
702
|
-
return
|
|
703
|
-
},
|
|
861
|
+
return T(a);
|
|
862
|
+
}, D = (e, t, n) => {
|
|
704
863
|
if (!e.variant) return [];
|
|
705
864
|
let r = t.variants?.[e.variant];
|
|
706
865
|
return r ? r.baseScheme === n ? [] : [{
|
|
@@ -716,46 +875,46 @@ var e = [
|
|
|
716
875
|
}];
|
|
717
876
|
}, ae = (e) => {
|
|
718
877
|
let t = [];
|
|
719
|
-
return
|
|
720
|
-
},
|
|
878
|
+
return ie(t, new Set(Object.keys(e)), e), T(t);
|
|
879
|
+
}, O = (e, t) => {
|
|
721
880
|
if (t.length !== 0) {
|
|
722
881
|
for (let n of t) e.onWarning?.(n);
|
|
723
882
|
if (e.strict) throw Error(t.map((e) => e.message).join("\n"));
|
|
724
883
|
}
|
|
725
|
-
},
|
|
884
|
+
}, k = "light", A = (e, t) => t === "light" || !!e.schemes.dark, oe = (e, t, n = {}) => {
|
|
726
885
|
let r = e.mode ?? "auto";
|
|
727
886
|
return r === "light" || r === "dark" ? r === "dark" && !t.schemes.dark ? {
|
|
728
887
|
requestedMode: r,
|
|
729
|
-
effectiveScheme:
|
|
888
|
+
effectiveScheme: k,
|
|
730
889
|
effectiveModeSource: "theme-fallback"
|
|
731
890
|
} : {
|
|
732
891
|
requestedMode: r,
|
|
733
892
|
effectiveScheme: r,
|
|
734
893
|
effectiveModeSource: "explicit"
|
|
735
|
-
} : r === "auto" ? n.systemScheme &&
|
|
894
|
+
} : r === "auto" ? n.systemScheme && A(t, n.systemScheme) ? {
|
|
736
895
|
requestedMode: r,
|
|
737
896
|
effectiveScheme: n.systemScheme,
|
|
738
897
|
effectiveModeSource: "system"
|
|
739
898
|
} : {
|
|
740
899
|
requestedMode: r,
|
|
741
|
-
effectiveScheme:
|
|
900
|
+
effectiveScheme: k,
|
|
742
901
|
effectiveModeSource: "theme-fallback"
|
|
743
|
-
} : n.inheritedScheme &&
|
|
902
|
+
} : n.inheritedScheme && A(t, n.inheritedScheme) ? {
|
|
744
903
|
requestedMode: r,
|
|
745
904
|
effectiveScheme: n.inheritedScheme,
|
|
746
905
|
effectiveModeSource: n.inheritedSource ?? "default"
|
|
747
906
|
} : {
|
|
748
907
|
requestedMode: r,
|
|
749
|
-
effectiveScheme:
|
|
908
|
+
effectiveScheme: k,
|
|
750
909
|
effectiveModeSource: "theme-fallback"
|
|
751
910
|
};
|
|
752
911
|
}, se = (e, t) => {
|
|
753
912
|
let n = e.recipe, r = t.getRecipe("default") ?? o;
|
|
754
913
|
return n && typeof n != "string" ? n : typeof n == "string" ? t.getRecipe(n) ?? r : r;
|
|
755
914
|
}, ce = (e, t) => {
|
|
756
|
-
let n = e.theme, r = t.getTheme("neutral") ??
|
|
915
|
+
let n = e.theme, r = t.getTheme("neutral") ?? f;
|
|
757
916
|
return n && typeof n != "string" ? n : typeof n == "string" ? t.getTheme(n) ?? r : r;
|
|
758
|
-
},
|
|
917
|
+
}, j = (t) => {
|
|
759
918
|
let n = {};
|
|
760
919
|
for (let r of e) {
|
|
761
920
|
let e = t[r]?.tokens;
|
|
@@ -764,7 +923,7 @@ var e = [
|
|
|
764
923
|
return n;
|
|
765
924
|
}, le = {
|
|
766
925
|
...r,
|
|
767
|
-
...
|
|
926
|
+
...j(t)
|
|
768
927
|
}, ue = {
|
|
769
928
|
"--mlf-border-width": "1.5px",
|
|
770
929
|
"--mlf-ring-width": "5px",
|
|
@@ -886,7 +1045,7 @@ var e = [
|
|
|
886
1045
|
}, _e = (e, t, n, r, i, a, o, s = {}) => {
|
|
887
1046
|
let c = e.overrides?.density ?? (s.prefersMoreContrast ? "spacious" : n.density), l = e.overrides?.motion ?? (s.prefersReducedMotion ? "none" : n.motion), u = {
|
|
888
1047
|
...e.overrides?.tokens,
|
|
889
|
-
...
|
|
1048
|
+
...j(e.overrides?.components ?? {})
|
|
890
1049
|
}, d = (e.variant && t.variants?.[e.variant]?.baseScheme === r ? e.variant : null) ?? (s.prefersMoreContrast && t.variants?.[`high-contrast-${r}`] ? `high-contrast-${r}` : null), f = s.prefersMoreContrast ? ue : {}, p = s.forcedColors ? fe : {}, m = {
|
|
891
1050
|
...le,
|
|
892
1051
|
...de[c],
|
|
@@ -894,9 +1053,9 @@ var e = [
|
|
|
894
1053
|
...f,
|
|
895
1054
|
...me(t, r, d),
|
|
896
1055
|
...n.tokens,
|
|
897
|
-
...
|
|
1056
|
+
...j(n.components ?? {}),
|
|
898
1057
|
...e.overrides?.tokens,
|
|
899
|
-
...
|
|
1058
|
+
...j(e.overrides?.components ?? {}),
|
|
900
1059
|
...p
|
|
901
1060
|
}, h = ge(m);
|
|
902
1061
|
return {
|
|
@@ -929,7 +1088,7 @@ var e = [
|
|
|
929
1088
|
},
|
|
930
1089
|
components: n.size > 0 ? Object.fromEntries(n) : void 0
|
|
931
1090
|
};
|
|
932
|
-
},
|
|
1091
|
+
}, M = (...e) => e.reduce((e, t) => ({
|
|
933
1092
|
mode: t?.mode ?? e.mode,
|
|
934
1093
|
theme: t?.theme ?? e.theme,
|
|
935
1094
|
recipe: t?.recipe ?? e.recipe,
|
|
@@ -938,7 +1097,7 @@ var e = [
|
|
|
938
1097
|
strict: t?.strict ?? e.strict,
|
|
939
1098
|
onWarning: t?.onWarning ?? e.onWarning,
|
|
940
1099
|
overrides: ve(e.overrides, t?.overrides)
|
|
941
|
-
}), {}),
|
|
1100
|
+
}), {}), N = (e, t, n = "source-wins") => {
|
|
942
1101
|
let r = new Map(t.map((e) => [e.from, e.to])), i = { ...e }, a = {};
|
|
943
1102
|
for (let [o, s] of Object.entries(e)) {
|
|
944
1103
|
let e = r.get(o) ?? o;
|
|
@@ -951,29 +1110,29 @@ var e = [
|
|
|
951
1110
|
else a[e] = s;
|
|
952
1111
|
}
|
|
953
1112
|
return a;
|
|
954
|
-
},
|
|
1113
|
+
}, P = (e, t) => {
|
|
955
1114
|
let n = Object.fromEntries(Object.entries(e.schemes).map(([e, n]) => [e, n && {
|
|
956
1115
|
...n,
|
|
957
|
-
tokens:
|
|
1116
|
+
tokens: N(n.tokens, t)
|
|
958
1117
|
}]));
|
|
959
1118
|
return {
|
|
960
1119
|
...e,
|
|
961
1120
|
schemes: n,
|
|
962
|
-
sharedTokens: e.sharedTokens ?
|
|
1121
|
+
sharedTokens: e.sharedTokens ? N(e.sharedTokens, t) : void 0
|
|
963
1122
|
};
|
|
964
|
-
},
|
|
965
|
-
let r = ce(e, t), i = se(e, t), a =
|
|
966
|
-
|
|
967
|
-
let o = oe(e, r, n), s =
|
|
968
|
-
s.length > 0 && (a.push(...s),
|
|
1123
|
+
}, F = (e = {}, t = y, n = {}) => {
|
|
1124
|
+
let r = ce(e, t), i = se(e, t), a = E(e, t, r, i);
|
|
1125
|
+
O(e, a);
|
|
1126
|
+
let o = oe(e, r, n), s = D(e, r, o.effectiveScheme);
|
|
1127
|
+
s.length > 0 && (a.push(...s), O(e, s));
|
|
969
1128
|
let c = _e(e, r, i, o.effectiveScheme, o.requestedMode, o.effectiveModeSource, a, n), l = ae(c.tokens);
|
|
970
|
-
return l.length > 0 && (c.warnings.push(...l),
|
|
971
|
-
},
|
|
1129
|
+
return l.length > 0 && (c.warnings.push(...l), O(e, l)), c;
|
|
1130
|
+
}, ye = { change: "ml-design-system-change" }, I = {
|
|
972
1131
|
prefersDarkScheme: "(prefers-color-scheme: dark)",
|
|
973
1132
|
prefersReducedMotion: "(prefers-reduced-motion: reduce)",
|
|
974
1133
|
prefersMoreContrast: "(prefers-contrast: more)",
|
|
975
1134
|
forcedColors: "(forced-colors: active)"
|
|
976
|
-
},
|
|
1135
|
+
}, L = {
|
|
977
1136
|
explicitScheme: "data-color-scheme",
|
|
978
1137
|
inheritedScheme: "data-mlf-scheme",
|
|
979
1138
|
effectiveScheme: "data-mlf-effective-scheme",
|
|
@@ -985,17 +1144,106 @@ var e = [
|
|
|
985
1144
|
signature: "data-mlf-signature",
|
|
986
1145
|
style: "style",
|
|
987
1146
|
class: "class"
|
|
988
|
-
},
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
],
|
|
1147
|
+
}, be = [L.explicitScheme], xe = [
|
|
1148
|
+
L.inheritedScheme,
|
|
1149
|
+
L.effectiveScheme,
|
|
1150
|
+
L.explicitScheme,
|
|
1151
|
+
L.style,
|
|
1152
|
+
L.class
|
|
1153
|
+
], R = (e) => {
|
|
1154
|
+
if (!e) return null;
|
|
1155
|
+
let t = e.trim().toLowerCase();
|
|
1156
|
+
return t === "light" || t === "dark" ? t : null;
|
|
1157
|
+
}, Se = (e, t) => {
|
|
1158
|
+
if ((t.mode ?? "auto") !== "inherit") return {
|
|
1159
|
+
scheme: null,
|
|
1160
|
+
source: null
|
|
1161
|
+
};
|
|
1162
|
+
if (t.hostSchemeResolver) {
|
|
1163
|
+
let n = t.hostSchemeResolver(e);
|
|
1164
|
+
if (n) return {
|
|
1165
|
+
scheme: n,
|
|
1166
|
+
source: "host-resolver"
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
let n = R(e.getAttribute(L.explicitScheme));
|
|
1170
|
+
if (n) return {
|
|
1171
|
+
scheme: n,
|
|
1172
|
+
source: "host-attribute"
|
|
1173
|
+
};
|
|
1174
|
+
let r = e.parentElement;
|
|
1175
|
+
for (; r;) {
|
|
1176
|
+
let e = R(r.getAttribute(L.inheritedScheme)) ?? R(r.getAttribute(L.effectiveScheme)) ?? R(r.getAttribute(L.explicitScheme));
|
|
1177
|
+
if (e) return {
|
|
1178
|
+
scheme: e,
|
|
1179
|
+
source: "host-attribute"
|
|
1180
|
+
};
|
|
1181
|
+
r = r.parentElement;
|
|
1182
|
+
}
|
|
1183
|
+
if (typeof window > "u") return {
|
|
1184
|
+
scheme: null,
|
|
1185
|
+
source: null
|
|
1186
|
+
};
|
|
1187
|
+
let i = window.getComputedStyle(e).colorScheme;
|
|
1188
|
+
return i.includes("dark") ? {
|
|
1189
|
+
scheme: "dark",
|
|
1190
|
+
source: "host-style"
|
|
1191
|
+
} : i.includes("light") ? {
|
|
1192
|
+
scheme: "light",
|
|
1193
|
+
source: "host-style"
|
|
1194
|
+
} : {
|
|
1195
|
+
scheme: null,
|
|
1196
|
+
source: null
|
|
1197
|
+
};
|
|
1198
|
+
}, Ce = () => typeof window < "u" && typeof window.matchMedia == "function" ? {
|
|
1199
|
+
scheme: window.matchMedia(I.prefersDarkScheme),
|
|
1200
|
+
motion: window.matchMedia(I.prefersReducedMotion),
|
|
1201
|
+
contrast: window.matchMedia(I.prefersMoreContrast),
|
|
1202
|
+
forcedColors: window.matchMedia(I.forcedColors)
|
|
1203
|
+
} : {
|
|
1204
|
+
scheme: null,
|
|
1205
|
+
motion: null,
|
|
1206
|
+
contrast: null,
|
|
1207
|
+
forcedColors: null
|
|
1208
|
+
}, we = (e, t) => {
|
|
1209
|
+
typeof e.addEventListener == "function" ? e.addEventListener("change", t) : e.addListener?.(t);
|
|
1210
|
+
}, Te = (e, t) => {
|
|
1211
|
+
typeof e.removeEventListener == "function" ? e.removeEventListener("change", t) : e.removeListener?.(t);
|
|
1212
|
+
}, Ee = (e) => ({
|
|
1213
|
+
prefersDarkScheme: e.scheme?.matches ?? !1,
|
|
1214
|
+
prefersReducedMotion: e.motion?.matches ?? !1,
|
|
1215
|
+
prefersMoreContrast: e.contrast?.matches ?? !1,
|
|
1216
|
+
forcedColors: e.forcedColors?.matches ?? !1
|
|
1217
|
+
}), De = (e) => {
|
|
1218
|
+
for (let t of e) t.query && we(t.query, t.listener);
|
|
1219
|
+
}, Oe = (e) => {
|
|
1220
|
+
for (let t of e) t.query && Te(t.query, t.listener);
|
|
1221
|
+
}, ke = (e, t, n, r) => Ee({
|
|
1222
|
+
scheme: e,
|
|
1223
|
+
motion: t,
|
|
1224
|
+
contrast: n,
|
|
1225
|
+
forcedColors: r
|
|
1226
|
+
}), z = (e, t, n, r) => {
|
|
1227
|
+
let i = Se(e, t);
|
|
1228
|
+
return F(t, n, {
|
|
1229
|
+
inheritedScheme: i.scheme,
|
|
1230
|
+
inheritedSource: i.source ?? void 0,
|
|
1231
|
+
systemScheme: r.prefersDarkScheme ? "dark" : "light",
|
|
1232
|
+
prefersReducedMotion: r.prefersReducedMotion,
|
|
1233
|
+
prefersMoreContrast: r.prefersMoreContrast,
|
|
1234
|
+
forcedColors: r.forcedColors
|
|
1235
|
+
});
|
|
1236
|
+
}, Ae = (e, t) => {
|
|
1237
|
+
e.dispatchEvent(new CustomEvent(ye.change, {
|
|
1238
|
+
detail: { designSystem: t },
|
|
1239
|
+
bubbles: !0,
|
|
1240
|
+
composed: !0
|
|
1241
|
+
}));
|
|
1242
|
+
}, je = (e) => {
|
|
995
1243
|
let t = 2166136261;
|
|
996
1244
|
for (let n = 0; n < e.length; n += 1) t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
|
|
997
1245
|
return (t >>> 0).toString(16).padStart(8, "0");
|
|
998
|
-
},
|
|
1246
|
+
}, B = (e) => `v1:${je([
|
|
999
1247
|
e.effectiveScheme,
|
|
1000
1248
|
e.themeId,
|
|
1001
1249
|
e.variant ?? "",
|
|
@@ -1003,47 +1251,47 @@ var e = [
|
|
|
1003
1251
|
e.density,
|
|
1004
1252
|
e.motion,
|
|
1005
1253
|
...Object.entries(e.tokens).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => `${e}:${t}`)
|
|
1006
|
-
].join("|"))}`,
|
|
1254
|
+
].join("|"))}`, V = (e) => {
|
|
1007
1255
|
let t = {
|
|
1008
|
-
[
|
|
1009
|
-
[
|
|
1010
|
-
[
|
|
1011
|
-
[
|
|
1012
|
-
[
|
|
1013
|
-
[
|
|
1014
|
-
[
|
|
1256
|
+
[L.themeId]: e.themeId,
|
|
1257
|
+
[L.recipeId]: e.recipeId,
|
|
1258
|
+
[L.effectiveScheme]: e.effectiveScheme,
|
|
1259
|
+
[L.inheritedScheme]: e.effectiveScheme,
|
|
1260
|
+
[L.density]: e.density,
|
|
1261
|
+
[L.motion]: e.motion,
|
|
1262
|
+
[L.signature]: B(e)
|
|
1015
1263
|
};
|
|
1016
|
-
return e.variant && (t[
|
|
1017
|
-
},
|
|
1264
|
+
return e.variant && (t[L.variantId] = e.variant), t;
|
|
1265
|
+
}, H = (e) => {
|
|
1018
1266
|
for (let t = 0; t < e.length; t += 1) if (e.charCodeAt(t) <= 31) return !0;
|
|
1019
1267
|
return !1;
|
|
1020
|
-
},
|
|
1268
|
+
}, Me = (e) => {
|
|
1021
1269
|
if (!e.trim()) throw Error("[mlform] createDesignSystemStylesheet requires a non-empty selector");
|
|
1022
|
-
if (e.includes("{") || e.includes("}") || e.includes(";") ||
|
|
1023
|
-
},
|
|
1270
|
+
if (e.includes("{") || e.includes("}") || e.includes(";") || H(e)) throw Error("[mlform] createDesignSystemStylesheet selector contains unsafe characters");
|
|
1271
|
+
}, Ne = (e, t) => {
|
|
1024
1272
|
if (!e.startsWith("--")) throw Error(`[mlform] Invalid design-system token "${e}"`);
|
|
1025
|
-
if (t.includes("{") || t.includes("}") || t.includes(";") ||
|
|
1026
|
-
}, U = (e) => Object.entries(e.tokens).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => (
|
|
1273
|
+
if (t.includes("{") || t.includes("}") || t.includes(";") || H(t)) throw Error(`[mlform] Token "${e}" contains unsafe stylesheet characters`);
|
|
1274
|
+
}, U = (e) => Object.entries(e.tokens).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => (Ne(e, t), [e, t])), W = (e, t) => {
|
|
1027
1275
|
let n = /* @__PURE__ */ new Set();
|
|
1028
1276
|
for (let [r, i] of U(t)) e.setProperty(r, i), n.add(r);
|
|
1029
1277
|
return n;
|
|
1030
1278
|
}, G = [
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1279
|
+
L.themeId,
|
|
1280
|
+
L.variantId,
|
|
1281
|
+
L.recipeId,
|
|
1282
|
+
L.effectiveScheme,
|
|
1283
|
+
L.inheritedScheme,
|
|
1284
|
+
L.density,
|
|
1285
|
+
L.motion,
|
|
1286
|
+
L.signature
|
|
1039
1287
|
], K = (e, t, n) => {
|
|
1040
|
-
let r =
|
|
1288
|
+
let r = V(t);
|
|
1041
1289
|
for (let t of G) {
|
|
1042
1290
|
let n = r[t];
|
|
1043
1291
|
n === void 0 ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
1044
1292
|
}
|
|
1045
1293
|
return n === "view-transition" && (e.style.viewTransitionName = "mlf-design-system"), e.style.colorScheme = t.effectiveScheme, W(e.style, t);
|
|
1046
|
-
},
|
|
1294
|
+
}, Pe = (e, t, n, r, i) => {
|
|
1047
1295
|
for (let n of t) {
|
|
1048
1296
|
let t = r.get(n) ?? null;
|
|
1049
1297
|
t === null ? e.style.removeProperty(n) : e.style.setProperty(n, t);
|
|
@@ -1053,7 +1301,7 @@ var e = [
|
|
|
1053
1301
|
r === null ? e.removeAttribute(t) : e.setAttribute(t, r);
|
|
1054
1302
|
}
|
|
1055
1303
|
i === null ? e.style.removeProperty("color-scheme") : e.style.colorScheme = i, e.style.removeProperty("view-transition-name");
|
|
1056
|
-
}, q = (e) => e ? Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => `${e}:${t}`).join(",") : "",
|
|
1304
|
+
}, q = (e) => e ? Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => `${e}:${t}`).join(",") : "", Fe = (e) => {
|
|
1057
1305
|
let t = Object.entries(e.variants ?? {}).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => `${e}:${t.baseScheme}:${q(t.tokens)}`).join(";");
|
|
1058
1306
|
return [
|
|
1059
1307
|
e.id,
|
|
@@ -1065,7 +1313,7 @@ var e = [
|
|
|
1065
1313
|
q(e.sharedTokens),
|
|
1066
1314
|
t
|
|
1067
1315
|
].join("|");
|
|
1068
|
-
},
|
|
1316
|
+
}, Ie = (e) => {
|
|
1069
1317
|
let t = Object.entries(e.components ?? {}).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => `${e}:${q(t?.tokens)}`).join(";");
|
|
1070
1318
|
return [
|
|
1071
1319
|
e.id,
|
|
@@ -1075,17 +1323,73 @@ var e = [
|
|
|
1075
1323
|
q(e.tokens),
|
|
1076
1324
|
t
|
|
1077
1325
|
].join("|");
|
|
1078
|
-
},
|
|
1079
|
-
let t = typeof e.theme == "string" ? `ref:${e.theme}` : e.theme ? `inline:${
|
|
1326
|
+
}, Le = (e) => {
|
|
1327
|
+
let t = typeof e.theme == "string" ? `ref:${e.theme}` : e.theme ? `inline:${Fe(e.theme)}` : "", n = typeof e.recipe == "string" ? `ref:${e.recipe}` : e.recipe ? `inline:${Ie(e.recipe)}` : "", r = e.overrides, i = q(r?.tokens), a = Object.entries(r?.components ?? {}).sort(([e], [t]) => e.localeCompare(t)).filter(([, e]) => !!e?.tokens).map(([e, t]) => `${e}:${q(t.tokens)}`).join(";");
|
|
1080
1328
|
return `${e.mode ?? ""}|${t}|${n}|${e.variant ?? ""}|${e.strict ?? ""}|${r?.density ?? ""}|${r?.motion ?? ""}|${i}|${a}`;
|
|
1081
|
-
}, J = (e, t) => `${t.prefersDarkScheme}|${t.prefersReducedMotion}|${t.prefersMoreContrast}|${t.forcedColors}|${
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
},
|
|
1088
|
-
|
|
1329
|
+
}, J = (e, t) => `${t.prefersDarkScheme}|${t.prefersReducedMotion}|${t.prefersMoreContrast}|${t.forcedColors}|${Le(e)}`, Y = (e, t, n) => {
|
|
1330
|
+
for (let r of Object.keys(n)) {
|
|
1331
|
+
if (t.has(r)) continue;
|
|
1332
|
+
let n = e.style.getPropertyValue(r);
|
|
1333
|
+
t.set(r, n === "" ? null : n);
|
|
1334
|
+
}
|
|
1335
|
+
}, X = (e, t, n, r) => {
|
|
1336
|
+
let i = new Set(Object.keys(r));
|
|
1337
|
+
for (let r of t) {
|
|
1338
|
+
if (i.has(r)) continue;
|
|
1339
|
+
let t = n.get(r) ?? null;
|
|
1340
|
+
t === null ? e.style.removeProperty(r) : e.style.setProperty(r, t);
|
|
1341
|
+
}
|
|
1342
|
+
}, Re = (e, t) => {
|
|
1343
|
+
let n = V(t);
|
|
1344
|
+
for (let t of G) {
|
|
1345
|
+
let r = n[t];
|
|
1346
|
+
if (r === void 0) {
|
|
1347
|
+
if (e.hasAttribute(t)) return !1;
|
|
1348
|
+
continue;
|
|
1349
|
+
}
|
|
1350
|
+
if (e.getAttribute(t) !== r) return !1;
|
|
1351
|
+
}
|
|
1352
|
+
if (e.getAttribute(L.signature) === n[L.signature]) return !0;
|
|
1353
|
+
if (e.style.colorScheme !== t.effectiveScheme) return !1;
|
|
1354
|
+
let r = /* @__PURE__ */ new Map();
|
|
1355
|
+
for (let t = 0; t < e.style.length; t += 1) {
|
|
1356
|
+
let n = e.style.item(t);
|
|
1357
|
+
n.startsWith("--mlf-") && r.set(n, e.style.getPropertyValue(n).trim());
|
|
1358
|
+
}
|
|
1359
|
+
let i = Object.entries(t.tokens);
|
|
1360
|
+
if (r.size === i.length) {
|
|
1361
|
+
for (let [e, t] of i) if (r.get(e) !== t) return !1;
|
|
1362
|
+
return !0;
|
|
1363
|
+
}
|
|
1364
|
+
if (typeof window > "u") return !1;
|
|
1365
|
+
let a = window.getComputedStyle(e);
|
|
1366
|
+
for (let [e, t] of i) if (a.getPropertyValue(e).trim() !== t) return !1;
|
|
1367
|
+
return !0;
|
|
1368
|
+
}, ze = (e, t, n) => Re(e, n.resolved) ? (Y(e, t, n.resolved.tokens), {
|
|
1369
|
+
appliedTokens: new Set(Object.keys(n.resolved.tokens)),
|
|
1370
|
+
resolved: n.resolved,
|
|
1371
|
+
signature: B(n.resolved),
|
|
1372
|
+
envSnapshot: n.envSnapshot
|
|
1373
|
+
}) : null, Be = (e, t, n, r) => {
|
|
1374
|
+
!e || t.has(n) || (t.add(n), e.observe(n, {
|
|
1375
|
+
attributes: !0,
|
|
1376
|
+
childList: r,
|
|
1377
|
+
subtree: !1,
|
|
1378
|
+
attributeFilter: [...xe]
|
|
1379
|
+
}));
|
|
1380
|
+
}, Z = (e, t, n) => {
|
|
1381
|
+
if (!t) return;
|
|
1382
|
+
let r = [e], i = e.parentElement;
|
|
1383
|
+
for (; i;) r.push(i), i = i.parentElement;
|
|
1384
|
+
if (r.length === n.size && r.every((e) => n.has(e))) return;
|
|
1385
|
+
t.disconnect(), n.clear(), n.add(e), t.observe(e, {
|
|
1386
|
+
attributes: !0,
|
|
1387
|
+
childList: !1,
|
|
1388
|
+
subtree: !1,
|
|
1389
|
+
attributeFilter: [...be]
|
|
1390
|
+
});
|
|
1391
|
+
let a = e.parentElement;
|
|
1392
|
+
for (; a;) Be(t, n, a, !0), a = a.parentElement;
|
|
1089
1393
|
}, Q = class {
|
|
1090
1394
|
#e;
|
|
1091
1395
|
#t;
|
|
@@ -1115,9 +1419,9 @@ var e = [
|
|
|
1115
1419
|
#T = "";
|
|
1116
1420
|
#E = null;
|
|
1117
1421
|
constructor({ host: e, registry: t, getConfig: n, onChange: r, transition: i, hydrate: a }) {
|
|
1118
|
-
this.#e = e, this.#t = t ??
|
|
1119
|
-
let o =
|
|
1120
|
-
this.#i = o
|
|
1422
|
+
this.#e = e, this.#t = t ?? y, this.#n = n, this.#r = r, this.#p = i ?? "none", this.#f = a ?? !1, this.#y = e.style.colorScheme || null;
|
|
1423
|
+
let o = Ce();
|
|
1424
|
+
this.#i = o.scheme, this.#o = o.motion, this.#c = o.contrast, this.#u = o.forcedColors, this.#a = () => this.refresh(), this.#s = () => this.refresh(), this.#l = () => this.refresh(), this.#d = () => this.refresh(), this.#m = typeof MutationObserver < "u" ? new MutationObserver(() => this.refresh()) : null, this.#h = this.#t.onChange(() => {
|
|
1121
1425
|
this.#S = "", this.#T = "", this.refresh();
|
|
1122
1426
|
});
|
|
1123
1427
|
for (let t of G) this.#_.set(t, e.getAttribute(t));
|
|
@@ -1125,37 +1429,46 @@ var e = [
|
|
|
1125
1429
|
get resolved() {
|
|
1126
1430
|
return this.#E;
|
|
1127
1431
|
}
|
|
1432
|
+
get #D() {
|
|
1433
|
+
return [
|
|
1434
|
+
{
|
|
1435
|
+
query: this.#i,
|
|
1436
|
+
listener: this.#a
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
query: this.#o,
|
|
1440
|
+
listener: this.#s
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
query: this.#c,
|
|
1444
|
+
listener: this.#l
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
query: this.#u,
|
|
1448
|
+
listener: this.#d
|
|
1449
|
+
}
|
|
1450
|
+
];
|
|
1451
|
+
}
|
|
1128
1452
|
connect() {
|
|
1129
|
-
this.#x || (this.#x = !0,
|
|
1453
|
+
this.#x || (this.#x = !0, De(this.#D), Z(this.#e, this.#m, this.#g), !(this.#f && this.#k()) && this.refresh());
|
|
1130
1454
|
}
|
|
1131
1455
|
disconnect() {
|
|
1132
|
-
this.#x && (this.#x = !1,
|
|
1456
|
+
this.#x && (this.#x = !1, Oe(this.#D), this.#A(), this.#m?.disconnect(), this.#h?.(), this.#g.clear(), Pe(this.#e, this.#b, this.#_, this.#v, this.#y), this.#b.clear(), this.#S = "", this.#T = "", this.#E = null);
|
|
1133
1457
|
}
|
|
1134
1458
|
refresh() {
|
|
1135
1459
|
if (!this.#x) return;
|
|
1136
|
-
this.#
|
|
1137
|
-
let e = this.#n(), t = this.#
|
|
1460
|
+
Z(this.#e, this.#m, this.#g);
|
|
1461
|
+
let e = this.#n(), t = this.#j(), n = J(e, t);
|
|
1138
1462
|
if (n === this.#T && (e.mode ?? "auto") !== "inherit") return;
|
|
1139
|
-
let r = this.#
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
forcedColors: t.forcedColors
|
|
1146
|
-
}), a = z(i);
|
|
1147
|
-
if (this.#T = n, a === this.#S) return;
|
|
1148
|
-
let o = this.#E;
|
|
1149
|
-
this.#S = a, this.#E = i, this.#D(() => {
|
|
1150
|
-
this.#j(i.tokens), this.#M(i.tokens), this.#b = K(this.#e, i, this.#p), this.#r?.(i), this.#e.dispatchEvent(new CustomEvent(be.change, {
|
|
1151
|
-
detail: { designSystem: i },
|
|
1152
|
-
bubbles: !0,
|
|
1153
|
-
composed: !0
|
|
1154
|
-
}));
|
|
1155
|
-
}, i, o);
|
|
1463
|
+
let r = z(this.#e, e, this.#t, t), i = B(r);
|
|
1464
|
+
if (this.#T = n, i === this.#S) return;
|
|
1465
|
+
let a = this.#E;
|
|
1466
|
+
this.#S = i, this.#E = r, this.#O(() => {
|
|
1467
|
+
Y(this.#e, this.#v, r.tokens), X(this.#e, this.#b, this.#v, r.tokens), this.#b = K(this.#e, r, this.#p), this.#r?.(r), Ae(this.#e, r);
|
|
1468
|
+
}, r, a);
|
|
1156
1469
|
}
|
|
1157
|
-
#
|
|
1158
|
-
this.#
|
|
1470
|
+
#O(e, t, n) {
|
|
1471
|
+
this.#A();
|
|
1159
1472
|
let r = new AbortController();
|
|
1160
1473
|
if (this.#C = r, this.#p === "none") {
|
|
1161
1474
|
r.signal.aborted || e(), this.#C = null;
|
|
@@ -1178,137 +1491,21 @@ var e = [
|
|
|
1178
1491
|
}, i);
|
|
1179
1492
|
this.#w = typeof a == "function" ? a : null;
|
|
1180
1493
|
}
|
|
1181
|
-
#O() {
|
|
1182
|
-
let e = this.#n();
|
|
1183
|
-
if ((e.mode ?? "auto") !== "inherit") return {
|
|
1184
|
-
scheme: null,
|
|
1185
|
-
source: null
|
|
1186
|
-
};
|
|
1187
|
-
if (e.hostSchemeResolver) {
|
|
1188
|
-
let t = e.hostSchemeResolver(this.#e);
|
|
1189
|
-
if (t) return {
|
|
1190
|
-
scheme: t,
|
|
1191
|
-
source: "host-resolver"
|
|
1192
|
-
};
|
|
1193
|
-
}
|
|
1194
|
-
let t = Y(this.#e.getAttribute(R.explicitScheme));
|
|
1195
|
-
if (t) return {
|
|
1196
|
-
scheme: t,
|
|
1197
|
-
source: "host-attribute"
|
|
1198
|
-
};
|
|
1199
|
-
let n = this.#e.parentElement;
|
|
1200
|
-
for (; n;) {
|
|
1201
|
-
let e = Y(n.getAttribute(R.inheritedScheme)) ?? Y(n.getAttribute(R.effectiveScheme)) ?? Y(n.getAttribute(R.explicitScheme));
|
|
1202
|
-
if (e) return {
|
|
1203
|
-
scheme: e,
|
|
1204
|
-
source: "host-attribute"
|
|
1205
|
-
};
|
|
1206
|
-
n = n.parentElement;
|
|
1207
|
-
}
|
|
1208
|
-
if (typeof window > "u") return {
|
|
1209
|
-
scheme: null,
|
|
1210
|
-
source: null
|
|
1211
|
-
};
|
|
1212
|
-
let r = window.getComputedStyle(this.#e).colorScheme;
|
|
1213
|
-
return r.includes("dark") ? {
|
|
1214
|
-
scheme: "dark",
|
|
1215
|
-
source: "host-style"
|
|
1216
|
-
} : r.includes("light") ? {
|
|
1217
|
-
scheme: "light",
|
|
1218
|
-
source: "host-style"
|
|
1219
|
-
} : {
|
|
1220
|
-
scheme: null,
|
|
1221
|
-
source: null
|
|
1222
|
-
};
|
|
1223
|
-
}
|
|
1224
1494
|
#k() {
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
if (e.length === this.#g.size && e.every((e) => this.#g.has(e))) return;
|
|
1229
|
-
this.#m.disconnect(), this.#g.clear(), this.#g.add(this.#e), this.#m.observe(this.#e, {
|
|
1230
|
-
attributes: !0,
|
|
1231
|
-
childList: !1,
|
|
1232
|
-
subtree: !1,
|
|
1233
|
-
attributeFilter: [...xe]
|
|
1495
|
+
let e = this.#n(), t = this.#j(), n = z(this.#e, e, this.#t, t), r = ze(this.#e, this.#v, {
|
|
1496
|
+
resolved: n,
|
|
1497
|
+
envSnapshot: J(e, t)
|
|
1234
1498
|
});
|
|
1235
|
-
|
|
1236
|
-
for (; n;) this.#A(n, !0), n = n.parentElement;
|
|
1237
|
-
}
|
|
1238
|
-
#A(e, t) {
|
|
1239
|
-
!this.#m || this.#g.has(e) || (this.#g.add(e), this.#m.observe(e, {
|
|
1240
|
-
attributes: !0,
|
|
1241
|
-
childList: t,
|
|
1242
|
-
subtree: !1,
|
|
1243
|
-
attributeFilter: [...Se]
|
|
1244
|
-
}));
|
|
1245
|
-
}
|
|
1246
|
-
#j(e) {
|
|
1247
|
-
for (let t of Object.keys(e)) {
|
|
1248
|
-
if (this.#v.has(t)) continue;
|
|
1249
|
-
let e = this.#e.style.getPropertyValue(t);
|
|
1250
|
-
this.#v.set(t, e === "" ? null : e);
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
#M(e) {
|
|
1254
|
-
let t = new Set(Object.keys(e));
|
|
1255
|
-
for (let e of this.#b) {
|
|
1256
|
-
if (t.has(e)) continue;
|
|
1257
|
-
let n = this.#v.get(e) ?? null;
|
|
1258
|
-
n === null ? this.#e.style.removeProperty(e) : this.#e.style.setProperty(e, n);
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
|
-
#N() {
|
|
1262
|
-
return {
|
|
1263
|
-
prefersDarkScheme: this.#i?.matches ?? !1,
|
|
1264
|
-
prefersReducedMotion: this.#o?.matches ?? !1,
|
|
1265
|
-
prefersMoreContrast: this.#c?.matches ?? !1,
|
|
1266
|
-
forcedColors: this.#u?.matches ?? !1
|
|
1267
|
-
};
|
|
1499
|
+
return r ? (this.#b = r.appliedTokens, this.#E = r.resolved, this.#S = r.signature, this.#T = r.envSnapshot, !0) : !1;
|
|
1268
1500
|
}
|
|
1269
|
-
#
|
|
1270
|
-
let e = this.#n(), t = this.#N(), n = this.#O(), r = I(e, this.#t, {
|
|
1271
|
-
inheritedScheme: n.scheme,
|
|
1272
|
-
inheritedSource: n.source ?? void 0,
|
|
1273
|
-
systemScheme: t.prefersDarkScheme ? "dark" : "light",
|
|
1274
|
-
prefersReducedMotion: t.prefersReducedMotion,
|
|
1275
|
-
prefersMoreContrast: t.prefersMoreContrast,
|
|
1276
|
-
forcedColors: t.forcedColors
|
|
1277
|
-
});
|
|
1278
|
-
return this.#F(r) ? (this.#j(r.tokens), this.#b = new Set(Object.keys(r.tokens)), this.#E = r, this.#S = z(r), this.#T = J(e, t), !0) : !1;
|
|
1279
|
-
}
|
|
1280
|
-
#F(e) {
|
|
1281
|
-
let t = B(e);
|
|
1282
|
-
for (let e of G) {
|
|
1283
|
-
let n = t[e];
|
|
1284
|
-
if (n === void 0) {
|
|
1285
|
-
if (this.#e.hasAttribute(e)) return !1;
|
|
1286
|
-
continue;
|
|
1287
|
-
}
|
|
1288
|
-
if (this.#e.getAttribute(e) !== n) return !1;
|
|
1289
|
-
}
|
|
1290
|
-
if (this.#e.getAttribute(R.signature) === t[R.signature]) return !0;
|
|
1291
|
-
if (this.#e.style.colorScheme !== e.effectiveScheme) return !1;
|
|
1292
|
-
let n = /* @__PURE__ */ new Map();
|
|
1293
|
-
for (let e = 0; e < this.#e.style.length; e += 1) {
|
|
1294
|
-
let t = this.#e.style.item(e);
|
|
1295
|
-
t.startsWith("--mlf-") && n.set(t, this.#e.style.getPropertyValue(t).trim());
|
|
1296
|
-
}
|
|
1297
|
-
let r = Object.entries(e.tokens);
|
|
1298
|
-
if (n.size === r.length) {
|
|
1299
|
-
for (let [e, t] of r) if (n.get(e) !== t) return !1;
|
|
1300
|
-
return !0;
|
|
1301
|
-
}
|
|
1302
|
-
if (typeof window > "u") return !1;
|
|
1303
|
-
let i = window.getComputedStyle(this.#e);
|
|
1304
|
-
for (let [e, t] of r) if (i.getPropertyValue(e).trim() !== t) return !1;
|
|
1305
|
-
return !0;
|
|
1306
|
-
}
|
|
1307
|
-
#I() {
|
|
1501
|
+
#A() {
|
|
1308
1502
|
this.#C?.abort(), this.#C = null, this.#w?.(), this.#w = null;
|
|
1309
1503
|
}
|
|
1504
|
+
#j() {
|
|
1505
|
+
return ke(this.#i, this.#o, this.#c, this.#u);
|
|
1506
|
+
}
|
|
1310
1507
|
}, $ = (e, t = {}, n = !1) => {
|
|
1311
|
-
let r = (...e) => m(
|
|
1508
|
+
let r = (...e) => m(M(...e)), i = r(t.config), a = i, o = t.registry?.clone() ?? y.clone(), s = new Q({
|
|
1312
1509
|
host: e,
|
|
1313
1510
|
registry: o,
|
|
1314
1511
|
getConfig: () => a,
|
|
@@ -1338,15 +1535,15 @@ var e = [
|
|
|
1338
1535
|
s.disconnect();
|
|
1339
1536
|
}
|
|
1340
1537
|
});
|
|
1341
|
-
},
|
|
1538
|
+
}, Ve = (e, t = {}) => $(e, t), He = /^-?[_a-zA-Z][_a-zA-Z0-9-]*$/, Ue = (e) => {
|
|
1342
1539
|
if (!e.trim()) throw Error("[mlform] createDesignSystemStylesheet layer name must be non-empty");
|
|
1343
1540
|
if (e.includes("{") || e.includes("}") || e.includes(";")) throw Error("[mlform] createDesignSystemStylesheet layer name contains unsafe characters");
|
|
1344
|
-
if (e.split(".").some((e) => !
|
|
1345
|
-
},
|
|
1541
|
+
if (e.split(".").some((e) => !He.test(e))) throw Error("[mlform] createDesignSystemStylesheet layer name is not a valid CSS layer name");
|
|
1542
|
+
}, We = (e, t = ":host") => {
|
|
1346
1543
|
let n = typeof t == "string" ? { selector: t } : t, r = n.selector ?? ":host", i = n.layer;
|
|
1347
|
-
|
|
1544
|
+
Me(r), i && Ue(i);
|
|
1348
1545
|
let a = `${r} {\n${U(e).map(([e, t]) => ` ${e}: ${t};`).join("\n")}\n}`;
|
|
1349
1546
|
return i ? `@layer ${i} {\n${a}\n}` : a;
|
|
1350
|
-
},
|
|
1547
|
+
}, Ge = (e, t = {}) => $(e, t, !0);
|
|
1351
1548
|
//#endregion
|
|
1352
|
-
export { r as C, i as S, e as T,
|
|
1549
|
+
export { r as C, i as S, e as T, _, K as a, p as b, V as c, N as d, M as f, v as g, y as h, Q as i, F as l, ne as m, We as n, W as o, re as p, Ve as r, B as s, Ge as t, P as u, g as v, t as w, s as x, h as y };
|