@webquark/browser 1.1.0-dev.9 → 1.1.1-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{action.props-N0urQtdP.js → action.props-CNe2JXR5.js} +1 -1
- package/dist/cjs/{dom-Dk77oFF6.js → dom-BYrqRYna.js} +1 -1
- package/dist/cjs/{field-CsrQGhG-.js → field-BRAR56Ex.js} +1 -1
- package/dist/cjs/{form-control-validity-D1ukC0_e.js → form-control-validity-BkilGb3E.js} +3 -3
- package/dist/cjs/{index-DWXhKHCB.js → index-BN-WdOQM.js} +17 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/q-accordion.cjs.entry.js +2 -2
- package/dist/cjs/q-alert.cjs.entry.js +2 -2
- package/dist/cjs/q-avatar.cjs.entry.js +2 -2
- package/dist/cjs/q-banner.cjs.entry.js +1 -1
- package/dist/cjs/q-button_3.cjs.entry.js +907 -0
- package/dist/cjs/q-card.cjs.entry.js +3 -3
- package/dist/cjs/q-carousel.cjs.entry.js +120 -18
- package/dist/cjs/q-chip.cjs.entry.js +2 -2
- package/dist/cjs/q-control-group.cjs.entry.js +64 -0
- package/dist/cjs/q-conversation-bubble.cjs.entry.js +1 -1
- package/dist/cjs/q-data-table.cjs.entry.js +4 -4
- package/dist/cjs/q-dialog.cjs.entry.js +4 -4
- package/dist/cjs/q-divider.cjs.entry.js +26 -0
- package/dist/cjs/q-dropdown.cjs.entry.js +320 -104
- package/dist/cjs/q-form.cjs.entry.js +17 -7
- package/dist/cjs/q-grid.cjs.entry.js +3 -3
- package/dist/cjs/q-icon.cjs.entry.js +1 -1
- package/dist/cjs/q-image-comparison.cjs.entry.js +2 -2
- package/dist/cjs/q-inline.cjs.entry.js +3 -3
- package/dist/cjs/q-input_2.cjs.entry.js +10 -8
- package/dist/cjs/q-link.cjs.entry.js +2 -2
- package/dist/cjs/q-map.cjs.entry.js +2 -2
- package/dist/cjs/q-media.cjs.entry.js +2 -2
- package/dist/cjs/q-navbar.cjs.entry.js +3 -3
- package/dist/cjs/q-pagination.cjs.entry.js +2 -2
- package/dist/cjs/q-panel.cjs.entry.js +7 -7
- package/dist/cjs/q-quantity-selector.cjs.entry.js +6 -6
- package/dist/cjs/q-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/q-reel.cjs.entry.js +24 -24
- package/dist/cjs/q-section.cjs.entry.js +2 -2
- package/dist/cjs/q-sidepanel.cjs.entry.js +5 -4
- package/dist/cjs/q-slider.cjs.entry.js +122 -0
- package/dist/cjs/q-stack.cjs.entry.js +3 -3
- package/dist/cjs/q-step-diagram-item.cjs.entry.js +2 -2
- package/dist/cjs/q-step-diagram.cjs.entry.js +4 -4
- package/dist/cjs/q-syntax-box.cjs.entry.js +180 -719
- package/dist/cjs/q-syntax-view.cjs.entry.js +65 -0
- package/dist/cjs/q-tabs.cjs.entry.js +2 -2
- package/dist/cjs/q-textarea.cjs.entry.js +8 -6
- package/dist/cjs/q-thumbnail.cjs.entry.js +3 -3
- package/dist/cjs/q-toast.cjs.entry.js +1 -1
- package/dist/cjs/q-toggle.cjs.entry.js +7 -7
- package/dist/cjs/q-toolbar.cjs.entry.js +4 -4
- package/dist/cjs/syntax-content-BmSExDiW.js +910 -0
- package/dist/cjs/{tokens-RMRaIOqv.js → tokens-BMrfol_M.js} +4 -1
- package/dist/cjs/webquark.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +6 -1
- package/dist/collection/components/actions/button/button.css +49 -9
- package/dist/collection/components/actions/button/{button.utils.unit.test.js → test/button.utils.unit.test.js} +1 -1
- package/dist/collection/components/communication/alert/alert.css +4 -1
- package/dist/collection/components/content/carousel/carousel.css +7 -0
- package/dist/collection/components/content/carousel/carousel.js +256 -10
- package/dist/collection/components/content/carousel/internals/autoplay.js +31 -6
- package/dist/collection/components/content/carousel/test/transitions.cmp.test.js +122 -0
- package/dist/collection/components/data-display/accordion/accordion.js +1 -1
- package/dist/collection/components/data-display/data-table/data-table.js +3 -3
- package/dist/collection/components/data-display/map/map.js +1 -1
- package/dist/collection/components/data-display/map/test/map.cmp.test.js +1 -1
- package/dist/collection/components/data-display/pagination/pagination.js +1 -1
- package/dist/collection/components/data-display/syntax-box/internals/formatters/css.js +4 -0
- package/dist/collection/components/data-display/syntax-box/internals/formatters/formatter.js +20 -0
- package/dist/collection/{utils → components/data-display/syntax-box/internals/formatters}/formatter.unit.test.js +38 -11
- package/dist/collection/components/data-display/syntax-box/internals/formatters/html.js +4 -0
- package/dist/collection/components/data-display/syntax-box/internals/formatters/javascript.js +4 -0
- package/dist/collection/{utils/formatter.js → components/data-display/syntax-box/internals/formatters/json.js} +2 -20
- package/dist/collection/components/data-display/syntax-box/internals/formatters/languages.js +15 -0
- package/dist/collection/components/data-display/syntax-box/internals/formatters/util/prettier.js +17 -0
- package/dist/collection/{utils → components/data-display/syntax-box/internals}/syntax.unit.test.js +1 -1
- package/dist/collection/components/data-display/syntax-box/internals/views.js +29 -0
- package/dist/collection/components/data-display/syntax-box/internals/views.unit.test.js +19 -0
- package/dist/collection/components/data-display/syntax-box/syntax-box.css +107 -36
- package/dist/collection/components/data-display/syntax-box/syntax-box.js +179 -637
- package/dist/collection/components/data-display/syntax-box/syntax-content.js +748 -0
- package/dist/collection/components/data-display/syntax-box/syntax-ui.js +8 -0
- package/dist/collection/components/data-display/syntax-box/test/format-fixtures.js +2 -2
- package/dist/collection/components/data-display/syntax-box/test/syntax-box.cmp.test.js +1 -1
- package/dist/collection/components/data-display/syntax-box/test/syntax-format.cmp.test.js +20 -20
- package/dist/collection/components/data-display/syntax-box/test/syntax-views.cmp.test.js +228 -0
- package/dist/collection/components/data-display/syntax-view/syntax-view.js +64 -0
- package/dist/collection/components/indicators/step-diagram/step-diagram.js +2 -2
- package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.js +1 -1
- package/dist/collection/components/inputs/dropdown/dropdown.css +148 -0
- package/dist/collection/components/inputs/dropdown/dropdown.js +422 -104
- package/dist/collection/components/inputs/dropdown/test/dropdown.cmp.test.js +28 -0
- package/dist/collection/components/inputs/dropdown/test/fit-options.cmp.test.js +120 -0
- package/dist/collection/components/inputs/dropdown/test/multiple.cmp.test.js +124 -0
- package/dist/collection/components/inputs/dropdown/test/search-mode.cmp.test.js +186 -0
- package/dist/collection/components/inputs/form/form.js +2 -2
- package/dist/collection/components/inputs/form/internals/controls.js +2 -2
- package/dist/collection/components/inputs/form/internals/field-state.js +6 -1
- package/dist/collection/components/inputs/form/internals/values.js +5 -0
- package/dist/collection/components/inputs/form/test/form-submit.cmp.test.js +14 -8
- package/dist/collection/components/inputs/input/input.css +42 -0
- package/dist/collection/components/inputs/input/input.js +31 -3
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.css +22 -0
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.js +4 -4
- package/dist/collection/components/inputs/radio-group/radio-group.js +2 -2
- package/dist/collection/components/inputs/slider/slider.css +44 -0
- package/dist/collection/components/inputs/slider/slider.js +383 -0
- package/dist/collection/components/inputs/slider/test/slider.cmp.test.js +45 -0
- package/dist/collection/components/inputs/textarea/textarea.css +20 -0
- package/dist/collection/components/inputs/textarea/textarea.js +30 -2
- package/dist/collection/components/inputs/toggle/test/toggle-layout.cmp.test.js +69 -0
- package/dist/collection/components/inputs/toggle/toggle.css +27 -0
- package/dist/collection/components/inputs/toggle/toggle.js +3 -3
- package/dist/collection/components/layout/control-group/control-group.css +108 -0
- package/dist/collection/components/layout/control-group/control-group.js +142 -0
- package/dist/collection/components/layout/control-group/test/control-group.cmp.test.js +163 -0
- package/dist/collection/components/layout/divider/divider.css +40 -0
- package/dist/collection/components/layout/divider/divider.js +121 -0
- package/dist/collection/components/layout/divider/test/divider.cmp.test.js +105 -0
- package/dist/collection/components/layout/grid/grid.js +1 -1
- package/dist/collection/components/layout/inline/inline.js +1 -1
- package/dist/collection/components/layout/navbar/navbar.js +2 -2
- package/dist/collection/components/layout/panel/panel.js +4 -4
- package/dist/collection/components/layout/scrollable/scrollable.js +3 -3
- package/dist/collection/components/layout/section/section.js +1 -1
- package/dist/collection/components/layout/sidepanel/internals/nav-items.js +2 -2
- package/dist/collection/components/layout/sidepanel/sidepanel.js +3 -0
- package/dist/collection/components/layout/stack/stack.js +1 -1
- package/dist/collection/components/layout/tabs/tabs.js +1 -1
- package/dist/collection/components/layout/toolbar/toolbar.js +2 -2
- package/dist/collection/components/media/avatar/avatar.js +1 -1
- package/dist/collection/components/media/image-comparison/image-comparison.js +1 -1
- package/dist/collection/components/media/media/media.js +1 -1
- package/dist/collection/components/media/reel/reel.js +23 -23
- package/dist/collection/components/media/reel/test/focus.cmp.test.js +33 -0
- package/dist/collection/components/media/thumbnail/thumbnail.js +2 -2
- package/dist/collection/components/overlays/dialog/dialog.js +2 -2
- package/dist/collection/components/overlays/tooltip/tooltip.js +2 -2
- package/dist/collection/theme/test/input-width.cmp.test.js +117 -0
- package/dist/collection/theme/test/presets.unit.test.js +58 -0
- package/dist/collection/theme/tokens.js +4 -1
- package/dist/collection/utils/dom.js +1 -1
- package/dist/collection/utils/form-control-validity.js +3 -3
- package/dist/components/index.js +1 -1
- package/dist/components/p-B610wOGe.js +1 -0
- package/dist/components/p-BGlbV43y.js +13 -0
- package/dist/components/{p-Dfp_If-_.js → p-BKWL9zOn.js} +1 -1
- package/dist/components/p-BxxU73QQ.js +1 -0
- package/dist/components/{p-Cg0Mv7Vb.js → p-CVEQfA-v.js} +1 -1
- package/dist/components/p-CpbWWDiY.js +1 -0
- package/dist/{webquark/p-Dhsn99q4.js → components/p-D2fczi8m.js} +1 -1
- package/dist/components/{p-6PPZ2sIO.js → p-D5vpGqZ9.js} +1 -1
- package/dist/components/p-DQIYo8zC.js +1 -0
- package/dist/components/p-DX6PCIPS.js +1 -0
- package/dist/components/p-DY9D4z7Z.js +1 -0
- package/dist/components/p-DbzjRzhu.js +1 -0
- package/dist/components/{p-DQhiqYeq.js → p-DkanItP3.js} +1 -1
- package/dist/components/{p-CKuPOxKN.js → p-RX4DjgmV.js} +1 -1
- package/dist/components/{p-DlIn_ZWk.js → p-Ts5oOvg8.js} +1 -1
- package/dist/components/p-u1Qz6OcP.js +1 -0
- package/dist/components/q-accordion.js +1 -1
- package/dist/components/q-alert.js +1 -1
- package/dist/components/q-avatar.js +1 -1
- package/dist/components/q-banner.js +1 -1
- package/dist/components/q-button.js +1 -1
- package/dist/components/q-card.js +1 -1
- package/dist/components/q-carousel.js +1 -1
- package/dist/components/q-chip.js +1 -1
- package/dist/components/q-control-group.d.ts +11 -0
- package/dist/components/q-control-group.js +1 -0
- package/dist/components/q-conversation-bubble.js +1 -1
- package/dist/components/q-data-table.js +1 -1
- package/dist/components/q-dialog.js +1 -1
- package/dist/components/q-divider.d.ts +11 -0
- package/dist/components/q-divider.js +1 -0
- package/dist/components/q-dropdown.js +1 -1
- package/dist/components/q-form.js +1 -1
- package/dist/components/q-grid.js +1 -1
- package/dist/components/q-icon.js +1 -1
- package/dist/components/q-image-comparison.js +1 -1
- package/dist/components/q-inline.js +1 -1
- package/dist/components/q-input.js +1 -1
- package/dist/components/q-link.js +1 -1
- package/dist/components/q-map.js +1 -1
- package/dist/components/q-media.js +1 -1
- package/dist/components/q-navbar.js +1 -1
- package/dist/components/q-pagination.js +1 -1
- package/dist/components/q-panel.js +1 -1
- package/dist/components/q-progress.js +1 -1
- package/dist/components/q-quantity-selector.js +1 -1
- package/dist/components/q-radio-group.js +1 -1
- package/dist/components/q-reel.js +1 -1
- package/dist/components/q-scrollable.js +1 -1
- package/dist/components/q-section.js +1 -1
- package/dist/components/q-sidepanel.js +2 -2
- package/dist/components/q-slider.d.ts +11 -0
- package/dist/components/q-slider.js +1 -0
- package/dist/components/q-stack.js +1 -1
- package/dist/components/q-step-diagram-item.js +1 -1
- package/dist/components/q-step-diagram.js +1 -1
- package/dist/components/q-syntax-box.js +1 -13
- package/dist/components/q-syntax-view.d.ts +11 -0
- package/dist/components/q-syntax-view.js +1 -0
- package/dist/components/q-tabs.js +1 -1
- package/dist/components/q-textarea.js +1 -1
- package/dist/components/q-thumbnail.js +1 -1
- package/dist/components/q-toast.js +1 -1
- package/dist/components/q-toggle.js +1 -1
- package/dist/components/q-toolbar.js +1 -1
- package/dist/components/q-tooltip.js +1 -1
- package/dist/esm/{action.props-CpnGza8z.js → action.props-CbSH7c-q.js} +1 -1
- package/dist/esm/{dom-ByfrUWx1.js → dom-B610wOGe.js} +2 -2
- package/dist/esm/{field-zfD6OQ02.js → field-D5xUxo11.js} +1 -1
- package/dist/esm/{form-control-validity-Bj2RJb2E.js → form-control-validity-BxxU73QQ.js} +3 -3
- package/dist/esm/{form-submit-action-CoEIvDqE.js → form-submit-action-BjjfVWyu.js} +1 -1
- package/dist/esm/{index-B5ElFlHv.js → index-CIMzZPQO.js} +16 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/q-accordion.entry.js +2 -2
- package/dist/esm/q-alert.entry.js +2 -2
- package/dist/esm/q-avatar.entry.js +2 -2
- package/dist/esm/q-banner.entry.js +1 -1
- package/dist/esm/q-button_3.entry.js +903 -0
- package/dist/esm/q-card.entry.js +3 -3
- package/dist/esm/q-carousel.entry.js +120 -18
- package/dist/esm/q-chip.entry.js +2 -2
- package/dist/esm/q-control-group.entry.js +62 -0
- package/dist/esm/q-conversation-bubble.entry.js +1 -1
- package/dist/esm/q-data-table.entry.js +4 -4
- package/dist/esm/q-dialog.entry.js +4 -4
- package/dist/esm/q-divider.entry.js +24 -0
- package/dist/esm/q-dropdown.entry.js +320 -104
- package/dist/esm/q-form.entry.js +18 -8
- package/dist/esm/q-grid.entry.js +3 -3
- package/dist/esm/q-icon.entry.js +1 -1
- package/dist/esm/q-image-comparison.entry.js +2 -2
- package/dist/esm/q-inline.entry.js +3 -3
- package/dist/esm/q-input_2.entry.js +10 -8
- package/dist/esm/q-link.entry.js +2 -2
- package/dist/esm/q-map.entry.js +2 -2
- package/dist/esm/q-media.entry.js +2 -2
- package/dist/esm/q-navbar.entry.js +3 -3
- package/dist/esm/q-pagination.entry.js +2 -2
- package/dist/esm/q-panel.entry.js +7 -7
- package/dist/esm/q-quantity-selector.entry.js +6 -6
- package/dist/esm/q-radio-group.entry.js +4 -4
- package/dist/esm/q-reel.entry.js +24 -24
- package/dist/esm/q-section.entry.js +2 -2
- package/dist/esm/q-sidepanel.entry.js +5 -4
- package/dist/esm/q-slider.entry.js +120 -0
- package/dist/esm/q-stack.entry.js +3 -3
- package/dist/esm/q-step-diagram-item.entry.js +2 -2
- package/dist/esm/q-step-diagram.entry.js +4 -4
- package/dist/esm/q-syntax-box.entry.js +180 -719
- package/dist/esm/q-syntax-view.entry.js +63 -0
- package/dist/esm/q-tabs.entry.js +2 -2
- package/dist/esm/q-textarea.entry.js +8 -6
- package/dist/esm/q-thumbnail.entry.js +3 -3
- package/dist/esm/q-toast.entry.js +1 -1
- package/dist/esm/q-toggle.entry.js +7 -7
- package/dist/esm/q-toolbar.entry.js +4 -4
- package/dist/esm/syntax-content-Cr9kSbmA.js +903 -0
- package/dist/esm/{tokens-B4Mg1xEw.js → tokens-DbzjRzhu.js} +4 -1
- package/dist/esm/webquark.js +3 -3
- package/dist/formatters/prettier/LICENSE +7 -0
- package/dist/formatters/prettier/THIRD-PARTY-NOTICES.md +7941 -0
- package/dist/formatters/prettier/html-fragment.mjs +1 -0
- package/dist/formatters/prettier/html-fragment.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/angular.mjs +1 -0
- package/dist/formatters/prettier/languages/angular.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/css.mjs +1 -0
- package/dist/formatters/prettier/languages/css.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/flow.mjs +1 -0
- package/dist/formatters/prettier/languages/flow.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/graphql.mjs +1 -0
- package/dist/formatters/prettier/languages/graphql.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/handlebars.mjs +1 -0
- package/dist/formatters/prettier/languages/handlebars.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/html.mjs +1 -0
- package/dist/formatters/prettier/languages/html.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/javascript.mjs +1 -0
- package/dist/formatters/prettier/languages/javascript.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/json-stringify.mjs +1 -0
- package/dist/formatters/prettier/languages/json-stringify.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/json.mjs +1 -0
- package/dist/formatters/prettier/languages/json.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/json5.mjs +1 -0
- package/dist/formatters/prettier/languages/json5.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/jsonc.mjs +1 -0
- package/dist/formatters/prettier/languages/jsonc.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/jsx.mjs +1 -0
- package/dist/formatters/prettier/languages/jsx.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/less.mjs +1 -0
- package/dist/formatters/prettier/languages/less.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/lwc.mjs +1 -0
- package/dist/formatters/prettier/languages/lwc.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/markdown.mjs +1 -0
- package/dist/formatters/prettier/languages/markdown.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/mdx.mjs +1 -0
- package/dist/formatters/prettier/languages/mdx.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/mjml.mjs +1 -0
- package/dist/formatters/prettier/languages/mjml.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/postcss.mjs +1 -0
- package/dist/formatters/prettier/languages/postcss.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/scss.mjs +1 -0
- package/dist/formatters/prettier/languages/scss.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/tsx.mjs +1 -0
- package/dist/formatters/prettier/languages/tsx.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/typescript.mjs +1 -0
- package/dist/formatters/prettier/languages/typescript.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/vue.mjs +1 -0
- package/dist/formatters/prettier/languages/vue.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/yaml.mjs +1 -0
- package/dist/formatters/prettier/languages/yaml.mjs.gz +0 -0
- package/dist/formatters/prettier/manifest.json +87 -0
- package/dist/formatters/prettier/plugins/acorn.mjs +17 -0
- package/dist/formatters/prettier/plugins/acorn.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/angular.mjs +7 -0
- package/dist/formatters/prettier/plugins/angular.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/babel.mjs +16 -0
- package/dist/formatters/prettier/plugins/babel.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/estree.mjs +44 -0
- package/dist/formatters/prettier/plugins/estree.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/flow.mjs +7 -0
- package/dist/formatters/prettier/plugins/flow.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/glimmer.mjs +37 -0
- package/dist/formatters/prettier/plugins/glimmer.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/graphql.mjs +17 -0
- package/dist/formatters/prettier/plugins/graphql.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/html.mjs +25 -0
- package/dist/formatters/prettier/plugins/html.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/markdown.mjs +70 -0
- package/dist/formatters/prettier/plugins/markdown.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/meriyah.mjs +9 -0
- package/dist/formatters/prettier/plugins/meriyah.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/postcss.mjs +62 -0
- package/dist/formatters/prettier/plugins/postcss.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/typescript.mjs +22 -0
- package/dist/formatters/prettier/plugins/typescript.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/yaml.mjs +150 -0
- package/dist/formatters/prettier/plugins/yaml.mjs.gz +0 -0
- package/dist/formatters/prettier/runtime.d.mts +2 -0
- package/dist/formatters/prettier/runtime.mjs +1 -0
- package/dist/formatters/prettier/runtime.mjs.gz +0 -0
- package/dist/formatters/prettier/standalone.mjs +29 -0
- package/dist/formatters/prettier/standalone.mjs.gz +0 -0
- package/dist/playground/components/theme-designer/dimension-tokens.js +9 -0
- package/dist/playground/components/theme-designer/token-row.js +60 -0
- package/dist/playground/dom-factory.js +76 -0
- package/dist/playground/utils/color.js +15 -0
- package/dist/playground/utils/dom.js +38 -0
- package/dist/playground/utils/index.js +2 -0
- package/dist/types/components/content/carousel/carousel.d.ts +23 -2
- package/dist/types/components/content/carousel/carousel.types.d.ts +6 -0
- package/dist/types/components/content/carousel/internals/autoplay.d.ts +5 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/css.d.ts +1 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/formatter.d.ts +10 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/formatter.types.d.ts +4 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/html.d.ts +1 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/javascript.d.ts +1 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/json.d.ts +6 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/languages.d.ts +27 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/util/prettier.d.ts +3 -0
- package/dist/types/{utils → components/data-display/syntax-box/internals}/syntax.d.ts +1 -1
- package/dist/types/components/data-display/syntax-box/internals/syntax.unit.test.d.ts +1 -0
- package/dist/types/components/data-display/syntax-box/internals/views.d.ts +11 -0
- package/dist/types/components/data-display/syntax-box/internals/views.unit.test.d.ts +1 -0
- package/dist/types/components/data-display/syntax-box/syntax-box.d.ts +66 -63
- package/dist/types/components/data-display/syntax-box/syntax-box.types.d.ts +1 -1
- package/dist/types/components/data-display/syntax-box/syntax-content.d.ts +41 -0
- package/dist/types/components/data-display/syntax-box/syntax-ui.d.ts +15 -0
- package/dist/types/components/data-display/syntax-box/test/format-fixtures.d.ts +1 -1
- package/dist/types/components/data-display/syntax-box/test/syntax-views.cmp.test.d.ts +1 -0
- package/dist/types/components/data-display/syntax-view/syntax-view.d.ts +48 -0
- package/dist/types/components/inputs/dropdown/dropdown.d.ts +45 -1
- package/dist/types/components/inputs/dropdown/test/fit-options.cmp.test.d.ts +3 -0
- package/dist/types/components/inputs/dropdown/test/multiple.cmp.test.d.ts +1 -0
- package/dist/types/components/inputs/dropdown/test/search-mode.cmp.test.d.ts +1 -0
- package/dist/types/components/inputs/form/internals/field-state.d.ts +1 -1
- package/dist/types/components/inputs/input/input.d.ts +3 -0
- package/dist/types/components/inputs/slider/slider.d.ts +45 -0
- package/dist/types/components/inputs/slider/test/slider.cmp.test.d.ts +1 -0
- package/dist/types/components/inputs/textarea/textarea.d.ts +3 -1
- package/dist/types/components/inputs/toggle/test/toggle-layout.cmp.test.d.ts +1 -0
- package/dist/types/components/layout/control-group/control-group.d.ts +20 -0
- package/dist/types/components/layout/control-group/test/control-group.cmp.test.d.ts +7 -0
- package/dist/types/components/layout/divider/divider.d.ts +15 -0
- package/dist/types/components/layout/divider/test/divider.cmp.test.d.ts +1 -0
- package/dist/types/components/layout/sidepanel/sidepanel.d.ts +2 -0
- package/dist/types/components/layout/sidepanel/sidepanel.types.d.ts +1 -0
- package/dist/types/components/media/reel/reel.d.ts +3 -3
- package/dist/types/components/media/reel/test/focus.cmp.test.d.ts +1 -0
- package/dist/types/components.d.ts +591 -13
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/components/theme-designer/dimension-tokens.d.ts +3 -0
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/components/theme-designer/token-row.d.ts +14 -0
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/dom-factory.d.ts +13 -0
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/color.d.ts +2 -0
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/dom.d.ts +15 -0
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/index.d.ts +2 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/theme/test/input-width.cmp.test.d.ts +3 -0
- package/dist/types/theme/test/presets.unit.test.d.ts +1 -0
- package/dist/types/theme/tokens.d.ts +9 -0
- package/dist/types/utils/form-control-validity.d.ts +2 -1
- package/dist/types/utils/form-field-adapter.d.ts +3 -3
- package/dist/webquark/p-014c2f4a.entry.js +1 -0
- package/dist/webquark/p-0389577c.entry.js +1 -0
- package/dist/webquark/p-041e17c1.entry.js +1 -0
- package/dist/webquark/p-0479c571.entry.js +1 -0
- package/dist/webquark/p-0ebca9be.entry.js +1 -0
- package/dist/webquark/{p-fe8c634a.entry.js → p-1bf375f7.entry.js} +2 -2
- package/dist/webquark/{p-6bfffa79.entry.js → p-20dc3ab5.entry.js} +1 -1
- package/dist/webquark/p-28d3348f.entry.js +1 -0
- package/dist/webquark/p-35c177d3.entry.js +1 -0
- package/dist/webquark/{p-99d785ca.entry.js → p-3a60086d.entry.js} +1 -1
- package/dist/webquark/{p-3bc4629c.entry.js → p-3ab798aa.entry.js} +1 -1
- package/dist/webquark/{p-9e78b796.entry.js → p-3b580baf.entry.js} +1 -1
- package/dist/webquark/{p-888e46a8.entry.js → p-3b65f787.entry.js} +1 -1
- package/dist/webquark/p-4bf610f8.entry.js +1 -0
- package/dist/webquark/{p-4d61b70d.entry.js → p-4d30227e.entry.js} +1 -1
- package/dist/webquark/{p-70d9ffde.entry.js → p-4de536ae.entry.js} +1 -1
- package/dist/webquark/{p-90b0858c.entry.js → p-4e4d70c9.entry.js} +1 -1
- package/dist/webquark/p-4efeb7c9.entry.js +1 -0
- package/dist/webquark/{p-dd115868.entry.js → p-51b3d71b.entry.js} +1 -1
- package/dist/webquark/p-778b6bbb.entry.js +1 -0
- package/dist/webquark/{p-f63b7214.entry.js → p-7da78b2f.entry.js} +1 -1
- package/dist/webquark/{p-9ff7e5a4.entry.js → p-7f8f986b.entry.js} +1 -1
- package/dist/webquark/p-8253c742.entry.js +1 -0
- package/dist/webquark/{p-059daa8a.entry.js → p-9a1ddeb7.entry.js} +1 -1
- package/dist/webquark/p-B610wOGe.js +1 -0
- package/dist/webquark/p-BxxU73QQ.js +1 -0
- package/dist/webquark/p-CIMzZPQO.js +3 -0
- package/dist/webquark/p-CfR85WgM.js +13 -0
- package/dist/{components/p-BofcK-7Z.js → webquark/p-D8p28N9s.js} +1 -1
- package/dist/webquark/p-DbzjRzhu.js +1 -0
- package/dist/webquark/{p-BOdNg0jc.js → p-DeOEN0si.js} +1 -1
- package/dist/webquark/{p-d0fbd2b1.entry.js → p-a2b1de23.entry.js} +1 -1
- package/dist/webquark/{p-48fb5228.entry.js → p-a55edc17.entry.js} +1 -1
- package/dist/webquark/p-a8808020.entry.js +1 -0
- package/dist/webquark/{p-f4f97e74.entry.js → p-b1084b3c.entry.js} +1 -1
- package/dist/webquark/{p-36118d90.entry.js → p-b6c4dff4.entry.js} +1 -1
- package/dist/webquark/p-b962e950.entry.js +1 -0
- package/dist/webquark/{p-023f8437.entry.js → p-bc369cd6.entry.js} +1 -1
- package/dist/webquark/p-c119a8ea.entry.js +1 -0
- package/dist/webquark/p-c6b77e9a.entry.js +1 -0
- package/dist/webquark/{p-030ecde3.entry.js → p-ca1c03b4.entry.js} +1 -1
- package/dist/webquark/{p-8ece2c62.entry.js → p-ce436162.entry.js} +1 -1
- package/dist/webquark/{p-0aa74ad6.entry.js → p-d0a47a7c.entry.js} +1 -1
- package/dist/webquark/{p-fec6fe0a.entry.js → p-e1fbc8fc.entry.js} +1 -1
- package/dist/webquark/{p-09cca7b9.entry.js → p-e32833ce.entry.js} +1 -1
- package/dist/webquark/p-e369a4aa.entry.js +1 -0
- package/dist/webquark/p-e4430c61.entry.js +1 -0
- package/dist/webquark/{p-f9ad63ff.entry.js → p-e9c0052b.entry.js} +1 -1
- package/dist/webquark/{p-f1bac94c.entry.js → p-f5c4ca18.entry.js} +1 -1
- package/dist/webquark/{p-64096386.entry.js → p-f6683126.entry.js} +1 -1
- package/dist/webquark/{p-DWO-pleQ.js → p-ojSDiptZ.js} +1 -1
- package/dist/webquark/webquark.css +1 -1
- package/dist/webquark/webquark.esm.js +1 -1
- package/package.json +6 -2
- package/dist/cjs/q-button_2.cjs.entry.js +0 -462
- package/dist/cjs/q-scrollable.cjs.entry.js +0 -449
- package/dist/components/p-B4Mg1xEw.js +0 -1
- package/dist/components/p-BH4gQWub.js +0 -1
- package/dist/components/p-Bj2RJb2E.js +0 -1
- package/dist/components/p-ByfrUWx1.js +0 -1
- package/dist/components/p-CN1ut2Lb.js +0 -1
- package/dist/components/p-ye27qtRo.js +0 -1
- package/dist/esm/q-button_2.entry.js +0 -459
- package/dist/esm/q-scrollable.entry.js +0 -447
- package/dist/types/utils/formatter.d.ts +0 -15
- package/dist/webquark/p-04c8cb9e.entry.js +0 -1
- package/dist/webquark/p-0ae43d6c.entry.js +0 -1
- package/dist/webquark/p-0c3aac3f.entry.js +0 -1
- package/dist/webquark/p-144ef339.entry.js +0 -1
- package/dist/webquark/p-296fbdb1.entry.js +0 -1
- package/dist/webquark/p-5f232b44.entry.js +0 -13
- package/dist/webquark/p-6e28cfe2.entry.js +0 -1
- package/dist/webquark/p-91fff6b6.entry.js +0 -1
- package/dist/webquark/p-923dac41.entry.js +0 -1
- package/dist/webquark/p-97a89cae.entry.js +0 -1
- package/dist/webquark/p-B4Mg1xEw.js +0 -1
- package/dist/webquark/p-B5ElFlHv.js +0 -3
- package/dist/webquark/p-Bj2RJb2E.js +0 -1
- package/dist/webquark/p-ByfrUWx1.js +0 -1
- package/dist/webquark/p-c523ec6f.entry.js +0 -1
- package/dist/webquark/p-d0253d64.entry.js +0 -1
- package/dist/webquark/p-f98f9439.entry.js +0 -1
- package/dist/webquark/p-fe200f68.entry.js +0 -1
- /package/dist/{types/components/actions/button/button.utils.unit.test.d.ts → collection/components/data-display/syntax-box/internals/formatters/formatter.types.js} +0 -0
- /package/dist/collection/{utils → components/data-display/syntax-box/internals}/syntax.js +0 -0
- /package/dist/types/{utils/formatter.unit.test.d.ts → components/actions/button/test/button.utils.unit.test.d.ts} +0 -0
- /package/dist/types/{utils/syntax.unit.test.d.ts → components/data-display/syntax-box/internals/formatters/formatter.unit.test.d.ts} +0 -0
|
@@ -0,0 +1,748 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { renderSyntaxActions, renderSyntaxScroller } from "./syntax-ui";
|
|
3
|
+
import { registerFormField } from "../../../utils/form-field-adapter";
|
|
4
|
+
import { isFieldDisabled, syncFieldHost } from "../../../utils/form-field-state";
|
|
5
|
+
import { syncNativeControlValidity } from "../../../utils/form-control-validity";
|
|
6
|
+
import { getSyntaxBoxCopyText, writeClipboardText } from "./internals/clipboard";
|
|
7
|
+
import { getSyntaxBoxEditorKeyAction } from "./internals/editor-key-action";
|
|
8
|
+
import { formatSource } from "./internals/formatters/formatter";
|
|
9
|
+
import { formatterLanguage, formatterLanguages } from "./internals/formatters/languages";
|
|
10
|
+
import { tokenizeSyntax } from "./internals/syntax";
|
|
11
|
+
import { normalizeSyntaxBoxValue, resolveInitialSyntaxBoxValue } from "./internals/value-sync";
|
|
12
|
+
import { ownContentNodes, revealSyntaxEditor, syntaxOwner, syntaxScrollRestorers, syntaxVisibility } from "./internals/views";
|
|
13
|
+
export const withSyntaxContent = (Base) => {
|
|
14
|
+
class SyntaxContent extends Base {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
}
|
|
18
|
+
/** Mirrored with `value`; prefer `code` for domain usage. */
|
|
19
|
+
code;
|
|
20
|
+
/** Form-value alias mirrored with `code` for compatibility. */
|
|
21
|
+
value;
|
|
22
|
+
/** Title in panel mode and tab label for a composed view. */
|
|
23
|
+
heading;
|
|
24
|
+
/** Accessible name for the editor; falls back to `heading`, then the language. */
|
|
25
|
+
ariaLabel = null;
|
|
26
|
+
variant = 'panel';
|
|
27
|
+
/** Explicit content height. Panel mode defaults to 110px; plain mode defaults to auto. */
|
|
28
|
+
height;
|
|
29
|
+
copyable = false;
|
|
30
|
+
editable = false;
|
|
31
|
+
/** Form field name used when the component is editable. */
|
|
32
|
+
name;
|
|
33
|
+
/** Marks the editable textarea as required for form validation. */
|
|
34
|
+
required = false;
|
|
35
|
+
/** Selects the formatter. HTML, JavaScript, CSS, and JSON also receive syntax highlighting. */
|
|
36
|
+
language = 'html';
|
|
37
|
+
/** Disables editing and panel actions. */
|
|
38
|
+
disabled = false;
|
|
39
|
+
/** Emitted when editable content is committed by the native change event or by formatting. */
|
|
40
|
+
qChange;
|
|
41
|
+
/** Emitted on each editable content input and after formatting. */
|
|
42
|
+
qInput;
|
|
43
|
+
// ======================== [2] INTERNAL STATE & REFS ========================
|
|
44
|
+
disabledState = false;
|
|
45
|
+
get isDisabled() {
|
|
46
|
+
return isFieldDisabled(this.el, this.disabled);
|
|
47
|
+
}
|
|
48
|
+
copied = false;
|
|
49
|
+
copyFailed = false;
|
|
50
|
+
formatMessage;
|
|
51
|
+
initialValue;
|
|
52
|
+
scrollPending = false;
|
|
53
|
+
copyRevision = 0;
|
|
54
|
+
formatRevision = 0;
|
|
55
|
+
copiedTimeoutId;
|
|
56
|
+
scrollableEl;
|
|
57
|
+
preEl;
|
|
58
|
+
contentEl;
|
|
59
|
+
actionsEl;
|
|
60
|
+
validationAnchor;
|
|
61
|
+
// ========================= [3] LIFECYCLE & WATCHERS =========================
|
|
62
|
+
watchCode(newCode) {
|
|
63
|
+
this.formatRevision++;
|
|
64
|
+
this.formatMessage = undefined;
|
|
65
|
+
const finalCode = normalizeSyntaxBoxValue(newCode, {
|
|
66
|
+
editable: this.editable,
|
|
67
|
+
});
|
|
68
|
+
if (finalCode !== newCode) {
|
|
69
|
+
this.code = finalCode;
|
|
70
|
+
}
|
|
71
|
+
if (this.value !== finalCode) {
|
|
72
|
+
this.value = finalCode;
|
|
73
|
+
}
|
|
74
|
+
this.syncFormValue(finalCode);
|
|
75
|
+
}
|
|
76
|
+
watchValue(newValue) {
|
|
77
|
+
this.formatRevision++;
|
|
78
|
+
this.formatMessage = undefined;
|
|
79
|
+
const finalVal = normalizeSyntaxBoxValue(newValue, {
|
|
80
|
+
editable: this.editable,
|
|
81
|
+
});
|
|
82
|
+
if (finalVal !== newValue) {
|
|
83
|
+
this.value = finalVal;
|
|
84
|
+
}
|
|
85
|
+
if (this.code !== finalVal) {
|
|
86
|
+
this.code = finalVal;
|
|
87
|
+
}
|
|
88
|
+
this.syncFormValue(finalVal);
|
|
89
|
+
}
|
|
90
|
+
watchLanguage() {
|
|
91
|
+
this.formatRevision++;
|
|
92
|
+
this.formatMessage = undefined;
|
|
93
|
+
}
|
|
94
|
+
watchConstraints() {
|
|
95
|
+
this.syncValidity();
|
|
96
|
+
}
|
|
97
|
+
watchEditable() {
|
|
98
|
+
this.formatRevision++;
|
|
99
|
+
if (this.editable)
|
|
100
|
+
this.watchCode(this.code);
|
|
101
|
+
this.syncFormValue(this.code);
|
|
102
|
+
}
|
|
103
|
+
componentWillLoad() {
|
|
104
|
+
const initial = resolveInitialSyntaxBoxValue({
|
|
105
|
+
code: this.code,
|
|
106
|
+
value: this.value,
|
|
107
|
+
editable: this.editable,
|
|
108
|
+
});
|
|
109
|
+
this.code = initial.code;
|
|
110
|
+
this.value = initial.value;
|
|
111
|
+
this.initialValue = initial.code;
|
|
112
|
+
this.syncFormValue(this.code);
|
|
113
|
+
}
|
|
114
|
+
formDisabledCallback() {
|
|
115
|
+
this.syncValidity();
|
|
116
|
+
}
|
|
117
|
+
componentDidLoad() {
|
|
118
|
+
syntaxScrollRestorers.set(this.el, () => this.resumeScroll());
|
|
119
|
+
syntaxVisibility.set(this.el, () => this.syncVisibility());
|
|
120
|
+
registerFormField(this.el, {
|
|
121
|
+
kind: 'text',
|
|
122
|
+
owner: () => this.internals?.form ?? null,
|
|
123
|
+
active: () => this.editable,
|
|
124
|
+
value: () => this.code ?? '',
|
|
125
|
+
assign: value => { this.value = value; },
|
|
126
|
+
reconcile: () => {
|
|
127
|
+
const textarea = this.el.shadowRoot?.querySelector('textarea');
|
|
128
|
+
if (textarea && textarea.value !== (this.code ?? ''))
|
|
129
|
+
textarea.value = this.code ?? '';
|
|
130
|
+
this.syncFormValue(this.code);
|
|
131
|
+
this.syncValidity();
|
|
132
|
+
},
|
|
133
|
+
reset: () => this.formResetCallback(),
|
|
134
|
+
validate: report => this.validate(report),
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
componentDidRender() {
|
|
138
|
+
this.syncVisibility();
|
|
139
|
+
this.syncLogSpacing();
|
|
140
|
+
}
|
|
141
|
+
syncLogSpacing = () => {
|
|
142
|
+
const slot = this.el.shadowRoot?.querySelector('.slotted-body > slot');
|
|
143
|
+
const hasLog = slot?.assignedElements().some(element => element.getAttribute('role') === 'log');
|
|
144
|
+
this.el.classList.toggle('q-syntax-log-content', Boolean(hasLog));
|
|
145
|
+
};
|
|
146
|
+
syncVisibility() {
|
|
147
|
+
const inactive = syntaxOwner(this.el)?.visible(this.el) === false;
|
|
148
|
+
if (inactive)
|
|
149
|
+
this.formatRevision++;
|
|
150
|
+
if (this.contentEl)
|
|
151
|
+
this.contentEl.inert = inactive;
|
|
152
|
+
if (this.actionsEl)
|
|
153
|
+
this.actionsEl.inert = inactive;
|
|
154
|
+
if (this.validationAnchor)
|
|
155
|
+
this.validationAnchor.hidden = !inactive;
|
|
156
|
+
this.syncValidity();
|
|
157
|
+
}
|
|
158
|
+
disconnectedCallback() {
|
|
159
|
+
this.formatRevision++;
|
|
160
|
+
this.copyRevision++;
|
|
161
|
+
this.clearCopiedTimeout();
|
|
162
|
+
}
|
|
163
|
+
formResetCallback() {
|
|
164
|
+
this.formatRevision++;
|
|
165
|
+
this.formatMessage = undefined;
|
|
166
|
+
this.code = this.initialValue;
|
|
167
|
+
this.value = this.initialValue;
|
|
168
|
+
this.syncFormValue(this.code);
|
|
169
|
+
this.syncValidity();
|
|
170
|
+
}
|
|
171
|
+
// ========================== [4] EXPOSED METHODS ==========================
|
|
172
|
+
/** Programmatically scrolls the read-only code body to the bottom when it is wrapped by q-scrollable. */
|
|
173
|
+
async scrollToBottom() {
|
|
174
|
+
const owner = syntaxOwner(this.el);
|
|
175
|
+
this.scrollPending = Boolean(owner && !owner.visible(this.el));
|
|
176
|
+
if (!this.scrollPending)
|
|
177
|
+
await this.scrollableEl?.scrollToBottom();
|
|
178
|
+
}
|
|
179
|
+
resumeScroll() {
|
|
180
|
+
if (this.scrollPending)
|
|
181
|
+
void this.scrollToBottom();
|
|
182
|
+
}
|
|
183
|
+
/** Returns whether editable content satisfies native constraints. */
|
|
184
|
+
async checkValidity() {
|
|
185
|
+
return this.validate(false);
|
|
186
|
+
}
|
|
187
|
+
/** Reports editable constraint violations and reveals the editor in its owning box. */
|
|
188
|
+
async reportValidity() {
|
|
189
|
+
return this.validate(true);
|
|
190
|
+
}
|
|
191
|
+
validate(report) {
|
|
192
|
+
this.syncValidity();
|
|
193
|
+
const textarea = this.el.shadowRoot?.querySelector('textarea');
|
|
194
|
+
if (report && this.editable && textarea?.validity.valid === false) {
|
|
195
|
+
revealSyntaxEditor(this.el);
|
|
196
|
+
textarea.focus({ preventScroll: true });
|
|
197
|
+
}
|
|
198
|
+
return report
|
|
199
|
+
? this.internals?.reportValidity?.() ?? textarea?.reportValidity?.() ?? true
|
|
200
|
+
: this.internals?.checkValidity?.() ?? textarea?.checkValidity?.() ?? true;
|
|
201
|
+
}
|
|
202
|
+
// =================== [5] EVENT HANDLERS & INTERNAL METHODS ===================
|
|
203
|
+
syncFormValue(value) {
|
|
204
|
+
if (!this.internals || typeof this.internals.setFormValue !== 'function')
|
|
205
|
+
return;
|
|
206
|
+
this.internals.setFormValue(this.editable ? value || '' : null);
|
|
207
|
+
this.syncValidity();
|
|
208
|
+
}
|
|
209
|
+
syncValidity() {
|
|
210
|
+
const disabled = syncFieldHost(this.el, this.disabled, this.name, this.required);
|
|
211
|
+
if (this.disabledState !== disabled)
|
|
212
|
+
this.disabledState = disabled;
|
|
213
|
+
const textarea = this.el.shadowRoot?.querySelector('textarea');
|
|
214
|
+
if (textarea) {
|
|
215
|
+
textarea.disabled = disabled;
|
|
216
|
+
textarea.required = this.required;
|
|
217
|
+
textarea.readOnly = this.el.hasAttribute('readonly');
|
|
218
|
+
if (textarea.value !== (this.code ?? ''))
|
|
219
|
+
textarea.value = this.code ?? '';
|
|
220
|
+
}
|
|
221
|
+
this.internals?.setFormValue?.(this.editable && !disabled ? this.code ?? '' : null);
|
|
222
|
+
if (!this.internals || !textarea || !this.editable) {
|
|
223
|
+
if (typeof this.internals?.setValidity === 'function') {
|
|
224
|
+
this.internals.setValidity({});
|
|
225
|
+
}
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
syncNativeControlValidity({
|
|
229
|
+
internals: this.internals,
|
|
230
|
+
control: textarea,
|
|
231
|
+
anchor: this.validationAnchor && !this.validationAnchor.hidden ? this.validationAnchor : textarea,
|
|
232
|
+
disabled: this.isDisabled,
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
clearCopiedTimeout() {
|
|
236
|
+
if (this.copiedTimeoutId !== undefined) {
|
|
237
|
+
clearTimeout(this.copiedTimeoutId);
|
|
238
|
+
this.copiedTimeoutId = undefined;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
scheduleCopyStateReset() {
|
|
242
|
+
this.clearCopiedTimeout();
|
|
243
|
+
this.copiedTimeoutId = setTimeout(() => {
|
|
244
|
+
this.copied = false;
|
|
245
|
+
this.copyFailed = false;
|
|
246
|
+
this.copiedTimeoutId = undefined;
|
|
247
|
+
}, 1500);
|
|
248
|
+
}
|
|
249
|
+
copyCode = async () => {
|
|
250
|
+
if (this.isDisabled)
|
|
251
|
+
return;
|
|
252
|
+
const revision = ++this.copyRevision;
|
|
253
|
+
const fallback = ownContentNodes(this.el).map(node => node.textContent ?? '').join('');
|
|
254
|
+
const codeToCopy = getSyntaxBoxCopyText(this.code, fallback);
|
|
255
|
+
try {
|
|
256
|
+
await writeClipboardText(codeToCopy);
|
|
257
|
+
if (!this.el.isConnected || revision !== this.copyRevision)
|
|
258
|
+
return;
|
|
259
|
+
this.copied = true;
|
|
260
|
+
this.copyFailed = false;
|
|
261
|
+
}
|
|
262
|
+
catch {
|
|
263
|
+
if (!this.el.isConnected || revision !== this.copyRevision)
|
|
264
|
+
return;
|
|
265
|
+
this.copied = false;
|
|
266
|
+
this.copyFailed = true;
|
|
267
|
+
}
|
|
268
|
+
this.scheduleCopyStateReset();
|
|
269
|
+
};
|
|
270
|
+
handleScroll = (e) => {
|
|
271
|
+
const textarea = e.target;
|
|
272
|
+
if (this.preEl) {
|
|
273
|
+
this.preEl.scrollLeft = textarea.scrollLeft;
|
|
274
|
+
this.preEl.scrollTop = textarea.scrollTop;
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
handleInput = (ev) => {
|
|
278
|
+
const target = ev.target;
|
|
279
|
+
this.code = target.value;
|
|
280
|
+
this.value = target.value;
|
|
281
|
+
this.qInput.emit(this.code);
|
|
282
|
+
};
|
|
283
|
+
handleChange = (ev) => {
|
|
284
|
+
const target = ev.target;
|
|
285
|
+
this.code = target.value;
|
|
286
|
+
this.value = target.value;
|
|
287
|
+
this.qChange.emit(this.code);
|
|
288
|
+
};
|
|
289
|
+
handleKeyDown = (ev) => {
|
|
290
|
+
const textarea = ev.target;
|
|
291
|
+
const action = getSyntaxBoxEditorKeyAction(ev, textarea.value, textarea.selectionStart, textarea.selectionEnd);
|
|
292
|
+
if (action.type === 'none') {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
if (action.type === 'blur') {
|
|
296
|
+
textarea.blur();
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
ev.preventDefault();
|
|
300
|
+
this.code = action.value;
|
|
301
|
+
this.value = action.value;
|
|
302
|
+
this.qInput.emit(this.code);
|
|
303
|
+
requestAnimationFrame(() => {
|
|
304
|
+
textarea.selectionStart = textarea.selectionEnd = action.caret;
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
handleFormat = async () => {
|
|
308
|
+
const language = formatterLanguage(this.language);
|
|
309
|
+
if (this.isDisabled || !this.editable || !language || !this.code)
|
|
310
|
+
return;
|
|
311
|
+
const revision = ++this.formatRevision;
|
|
312
|
+
const source = this.code;
|
|
313
|
+
const pending = formatSource(source, language);
|
|
314
|
+
const result = pending instanceof Promise ? await pending : pending;
|
|
315
|
+
if (revision !== this.formatRevision || this.code !== source || !this.el.isConnected || this.isDisabled)
|
|
316
|
+
return;
|
|
317
|
+
const label = formatterLanguages[language];
|
|
318
|
+
if (result.status === 'unavailable') {
|
|
319
|
+
this.formatMessage = `Could not load the ${label} formatter. Reload and try again.`;
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
if (result.status === 'failed') {
|
|
323
|
+
this.formatMessage = `Could not format this ${label} source.`;
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
this.code = result.code;
|
|
327
|
+
this.value = result.code;
|
|
328
|
+
this.formatMessage = result.status === 'invalid' ? `Invalid ${label}; source unchanged.`
|
|
329
|
+
: result.status === 'unsupported' ? `${label} formatting limit reached; source unchanged.` : undefined;
|
|
330
|
+
this.qInput.emit(result.code);
|
|
331
|
+
this.qChange.emit(result.code);
|
|
332
|
+
};
|
|
333
|
+
getCopyTooltipContent() {
|
|
334
|
+
if (this.copyFailed)
|
|
335
|
+
return 'Copy failed';
|
|
336
|
+
if (this.copied)
|
|
337
|
+
return 'Copied!';
|
|
338
|
+
return 'Copy';
|
|
339
|
+
}
|
|
340
|
+
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
341
|
+
renderContent(variant) {
|
|
342
|
+
const resolvedHeight = this.height !== undefined ? this.height : variant === 'panel' ? '110px' : 'auto';
|
|
343
|
+
const isScrollable = resolvedHeight !== 'auto' && resolvedHeight !== '';
|
|
344
|
+
const formatFeedback = this.editable ? this.formatMessage : undefined;
|
|
345
|
+
const highlighted = tokenizeSyntax(this.code ?? '', this.language).map(token => token.className ? h("span", { class: token.className }, token.text) : token.text);
|
|
346
|
+
const content = this.editable || this.code !== undefined ? (this.editable ? (h("div", { class: "editor-area", style: { height: resolvedHeight } }, h("span", { id: "syntax-box-keyboard-help", class: "visually-hidden" }, "Press Escape to leave the code editor. Press Tab to insert two spaces."), h("textarea", { class: "editor-textarea", value: this.code ?? '', name: this.name, disabled: this.isDisabled, required: this.required, "aria-label": this.ariaLabel?.trim() || this.heading?.trim() || `${this.language.toUpperCase()} code editor`, "aria-describedby": "syntax-box-keyboard-help", onInput: this.handleInput, onChange: this.handleChange, onScroll: this.handleScroll, onKeyDown: this.handleKeyDown }), h("pre", { class: "code-body", ref: el => (this.preEl = el) }, h("code", null, highlighted)))) : (h("pre", { class: "code-body" }, h("code", null, highlighted)))) : (h("div", { class: "slotted-body" }, h("slot", { onSlotchange: this.syncLogSpacing })));
|
|
347
|
+
const bodyContent = isScrollable && !this.editable
|
|
348
|
+
? renderSyntaxScroller(content, resolvedHeight, el => { this.scrollableEl = el; })
|
|
349
|
+
: content;
|
|
350
|
+
return [
|
|
351
|
+
this.editable && h("span", { class: "validation-anchor", tabindex: -1, ref: el => { this.validationAnchor = el; }, onFocus: () => {
|
|
352
|
+
revealSyntaxEditor(this.el);
|
|
353
|
+
this.el.shadowRoot?.querySelector('textarea')?.focus({ preventScroll: true });
|
|
354
|
+
} }),
|
|
355
|
+
h("div", { class: "view-content", ref: el => { this.contentEl = el; } }, variant === 'panel' && formatFeedback && h("div", { class: "format-feedback", role: "status" }, formatFeedback), bodyContent),
|
|
356
|
+
];
|
|
357
|
+
}
|
|
358
|
+
renderActions() {
|
|
359
|
+
const language = formatterLanguage(this.language);
|
|
360
|
+
return renderSyntaxActions({
|
|
361
|
+
editable: this.editable,
|
|
362
|
+
copyable: this.copyable,
|
|
363
|
+
disabled: this.isDisabled,
|
|
364
|
+
formatLabel: language && `Format ${formatterLanguages[language]}`,
|
|
365
|
+
copied: this.copied,
|
|
366
|
+
copyFeedback: this.getCopyTooltipContent(),
|
|
367
|
+
onFormat: this.handleFormat,
|
|
368
|
+
onCopy: this.copyCode,
|
|
369
|
+
ref: el => { this.actionsEl = el; },
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
static get properties() {
|
|
373
|
+
return {
|
|
374
|
+
"code": {
|
|
375
|
+
"type": "string",
|
|
376
|
+
"mutable": true,
|
|
377
|
+
"complexType": {
|
|
378
|
+
"original": "string",
|
|
379
|
+
"resolved": "string",
|
|
380
|
+
"references": {}
|
|
381
|
+
},
|
|
382
|
+
"required": false,
|
|
383
|
+
"optional": true,
|
|
384
|
+
"docs": {
|
|
385
|
+
"tags": [],
|
|
386
|
+
"text": "Mirrored with `value`; prefer `code` for domain usage."
|
|
387
|
+
},
|
|
388
|
+
"getter": false,
|
|
389
|
+
"setter": false,
|
|
390
|
+
"reflect": false,
|
|
391
|
+
"attribute": "code"
|
|
392
|
+
},
|
|
393
|
+
"value": {
|
|
394
|
+
"type": "string",
|
|
395
|
+
"mutable": true,
|
|
396
|
+
"complexType": {
|
|
397
|
+
"original": "string",
|
|
398
|
+
"resolved": "string",
|
|
399
|
+
"references": {}
|
|
400
|
+
},
|
|
401
|
+
"required": false,
|
|
402
|
+
"optional": true,
|
|
403
|
+
"docs": {
|
|
404
|
+
"tags": [],
|
|
405
|
+
"text": "Form-value alias mirrored with `code` for compatibility."
|
|
406
|
+
},
|
|
407
|
+
"getter": false,
|
|
408
|
+
"setter": false,
|
|
409
|
+
"reflect": false,
|
|
410
|
+
"attribute": "value"
|
|
411
|
+
},
|
|
412
|
+
"heading": {
|
|
413
|
+
"type": "string",
|
|
414
|
+
"mutable": false,
|
|
415
|
+
"complexType": {
|
|
416
|
+
"original": "string",
|
|
417
|
+
"resolved": "string",
|
|
418
|
+
"references": {}
|
|
419
|
+
},
|
|
420
|
+
"required": false,
|
|
421
|
+
"optional": true,
|
|
422
|
+
"docs": {
|
|
423
|
+
"tags": [],
|
|
424
|
+
"text": "Title in panel mode and tab label for a composed view."
|
|
425
|
+
},
|
|
426
|
+
"getter": false,
|
|
427
|
+
"setter": false,
|
|
428
|
+
"reflect": true,
|
|
429
|
+
"attribute": "heading"
|
|
430
|
+
},
|
|
431
|
+
"ariaLabel": {
|
|
432
|
+
"type": "string",
|
|
433
|
+
"mutable": false,
|
|
434
|
+
"complexType": {
|
|
435
|
+
"original": "string | null",
|
|
436
|
+
"resolved": "string",
|
|
437
|
+
"references": {}
|
|
438
|
+
},
|
|
439
|
+
"required": false,
|
|
440
|
+
"optional": false,
|
|
441
|
+
"docs": {
|
|
442
|
+
"tags": [],
|
|
443
|
+
"text": "Accessible name for the editor; falls back to `heading`, then the language."
|
|
444
|
+
},
|
|
445
|
+
"getter": false,
|
|
446
|
+
"setter": false,
|
|
447
|
+
"reflect": false,
|
|
448
|
+
"attribute": "aria-label",
|
|
449
|
+
"defaultValue": "null"
|
|
450
|
+
},
|
|
451
|
+
"variant": {
|
|
452
|
+
"type": "string",
|
|
453
|
+
"mutable": false,
|
|
454
|
+
"complexType": {
|
|
455
|
+
"original": "QSyntaxBoxVariant",
|
|
456
|
+
"resolved": "\"panel\" | \"plain\"",
|
|
457
|
+
"references": {
|
|
458
|
+
"QSyntaxBoxVariant": {
|
|
459
|
+
"location": "import",
|
|
460
|
+
"path": "./syntax-box.types",
|
|
461
|
+
"id": "../../../src/browser/components/data-display/syntax-box/syntax-box.types.ts::QSyntaxBoxVariant",
|
|
462
|
+
"referenceLocation": "QSyntaxBoxVariant"
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
"required": false,
|
|
467
|
+
"optional": false,
|
|
468
|
+
"docs": {
|
|
469
|
+
"tags": [],
|
|
470
|
+
"text": ""
|
|
471
|
+
},
|
|
472
|
+
"getter": false,
|
|
473
|
+
"setter": false,
|
|
474
|
+
"reflect": false,
|
|
475
|
+
"attribute": "variant",
|
|
476
|
+
"defaultValue": "'panel'"
|
|
477
|
+
},
|
|
478
|
+
"height": {
|
|
479
|
+
"type": "string",
|
|
480
|
+
"mutable": false,
|
|
481
|
+
"complexType": {
|
|
482
|
+
"original": "string",
|
|
483
|
+
"resolved": "string",
|
|
484
|
+
"references": {}
|
|
485
|
+
},
|
|
486
|
+
"required": false,
|
|
487
|
+
"optional": true,
|
|
488
|
+
"docs": {
|
|
489
|
+
"tags": [],
|
|
490
|
+
"text": "Explicit content height. Panel mode defaults to 110px; plain mode defaults to auto."
|
|
491
|
+
},
|
|
492
|
+
"getter": false,
|
|
493
|
+
"setter": false,
|
|
494
|
+
"reflect": false,
|
|
495
|
+
"attribute": "height"
|
|
496
|
+
},
|
|
497
|
+
"copyable": {
|
|
498
|
+
"type": "boolean",
|
|
499
|
+
"mutable": false,
|
|
500
|
+
"complexType": {
|
|
501
|
+
"original": "boolean",
|
|
502
|
+
"resolved": "boolean",
|
|
503
|
+
"references": {}
|
|
504
|
+
},
|
|
505
|
+
"required": false,
|
|
506
|
+
"optional": false,
|
|
507
|
+
"docs": {
|
|
508
|
+
"tags": [],
|
|
509
|
+
"text": ""
|
|
510
|
+
},
|
|
511
|
+
"getter": false,
|
|
512
|
+
"setter": false,
|
|
513
|
+
"reflect": false,
|
|
514
|
+
"attribute": "copyable",
|
|
515
|
+
"defaultValue": "false"
|
|
516
|
+
},
|
|
517
|
+
"editable": {
|
|
518
|
+
"type": "boolean",
|
|
519
|
+
"mutable": false,
|
|
520
|
+
"complexType": {
|
|
521
|
+
"original": "boolean",
|
|
522
|
+
"resolved": "boolean",
|
|
523
|
+
"references": {}
|
|
524
|
+
},
|
|
525
|
+
"required": false,
|
|
526
|
+
"optional": false,
|
|
527
|
+
"docs": {
|
|
528
|
+
"tags": [],
|
|
529
|
+
"text": ""
|
|
530
|
+
},
|
|
531
|
+
"getter": false,
|
|
532
|
+
"setter": false,
|
|
533
|
+
"reflect": true,
|
|
534
|
+
"attribute": "editable",
|
|
535
|
+
"defaultValue": "false"
|
|
536
|
+
},
|
|
537
|
+
"name": {
|
|
538
|
+
"type": "string",
|
|
539
|
+
"mutable": false,
|
|
540
|
+
"complexType": {
|
|
541
|
+
"original": "string",
|
|
542
|
+
"resolved": "string",
|
|
543
|
+
"references": {}
|
|
544
|
+
},
|
|
545
|
+
"required": false,
|
|
546
|
+
"optional": true,
|
|
547
|
+
"docs": {
|
|
548
|
+
"tags": [],
|
|
549
|
+
"text": "Form field name used when the component is editable."
|
|
550
|
+
},
|
|
551
|
+
"getter": false,
|
|
552
|
+
"setter": false,
|
|
553
|
+
"reflect": true,
|
|
554
|
+
"attribute": "name"
|
|
555
|
+
},
|
|
556
|
+
"required": {
|
|
557
|
+
"type": "boolean",
|
|
558
|
+
"mutable": false,
|
|
559
|
+
"complexType": {
|
|
560
|
+
"original": "boolean",
|
|
561
|
+
"resolved": "boolean",
|
|
562
|
+
"references": {}
|
|
563
|
+
},
|
|
564
|
+
"required": false,
|
|
565
|
+
"optional": false,
|
|
566
|
+
"docs": {
|
|
567
|
+
"tags": [],
|
|
568
|
+
"text": "Marks the editable textarea as required for form validation."
|
|
569
|
+
},
|
|
570
|
+
"getter": false,
|
|
571
|
+
"setter": false,
|
|
572
|
+
"reflect": true,
|
|
573
|
+
"attribute": "required",
|
|
574
|
+
"defaultValue": "false"
|
|
575
|
+
},
|
|
576
|
+
"language": {
|
|
577
|
+
"type": "string",
|
|
578
|
+
"mutable": false,
|
|
579
|
+
"complexType": {
|
|
580
|
+
"original": "QSyntaxBoxLanguage",
|
|
581
|
+
"resolved": "\"angular\" | \"css\" | \"flow\" | \"graphql\" | \"handlebars\" | \"html\" | \"javascript\" | \"json\" | \"json-stringify\" | \"json5\" | \"jsonc\" | \"jsx\" | \"less\" | \"lwc\" | \"markdown\" | \"mdx\" | \"mjml\" | \"postcss\" | \"scss\" | \"tsx\" | \"typescript\" | \"vue\" | \"yaml\"",
|
|
582
|
+
"references": {
|
|
583
|
+
"QSyntaxBoxLanguage": {
|
|
584
|
+
"location": "import",
|
|
585
|
+
"path": "./syntax-box.types",
|
|
586
|
+
"id": "../../../src/browser/components/data-display/syntax-box/syntax-box.types.ts::FormatterLanguage",
|
|
587
|
+
"referenceLocation": "QSyntaxBoxLanguage"
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
"required": false,
|
|
592
|
+
"optional": false,
|
|
593
|
+
"docs": {
|
|
594
|
+
"tags": [],
|
|
595
|
+
"text": "Selects the formatter. HTML, JavaScript, CSS, and JSON also receive syntax highlighting."
|
|
596
|
+
},
|
|
597
|
+
"getter": false,
|
|
598
|
+
"setter": false,
|
|
599
|
+
"reflect": false,
|
|
600
|
+
"attribute": "language",
|
|
601
|
+
"defaultValue": "'html'"
|
|
602
|
+
},
|
|
603
|
+
"disabled": {
|
|
604
|
+
"type": "boolean",
|
|
605
|
+
"mutable": false,
|
|
606
|
+
"complexType": {
|
|
607
|
+
"original": "boolean",
|
|
608
|
+
"resolved": "boolean",
|
|
609
|
+
"references": {}
|
|
610
|
+
},
|
|
611
|
+
"required": false,
|
|
612
|
+
"optional": false,
|
|
613
|
+
"docs": {
|
|
614
|
+
"tags": [],
|
|
615
|
+
"text": "Disables editing and panel actions."
|
|
616
|
+
},
|
|
617
|
+
"getter": false,
|
|
618
|
+
"setter": false,
|
|
619
|
+
"reflect": true,
|
|
620
|
+
"attribute": "disabled",
|
|
621
|
+
"defaultValue": "false"
|
|
622
|
+
}
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
static get states() {
|
|
626
|
+
return {
|
|
627
|
+
"disabledState": {},
|
|
628
|
+
"copied": {},
|
|
629
|
+
"copyFailed": {},
|
|
630
|
+
"formatMessage": {}
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
static get events() {
|
|
634
|
+
return [{
|
|
635
|
+
"method": "qChange",
|
|
636
|
+
"name": "qChange",
|
|
637
|
+
"bubbles": true,
|
|
638
|
+
"cancelable": true,
|
|
639
|
+
"composed": true,
|
|
640
|
+
"docs": {
|
|
641
|
+
"tags": [],
|
|
642
|
+
"text": "Emitted when editable content is committed by the native change event or by formatting."
|
|
643
|
+
},
|
|
644
|
+
"complexType": {
|
|
645
|
+
"original": "string",
|
|
646
|
+
"resolved": "string",
|
|
647
|
+
"references": {}
|
|
648
|
+
}
|
|
649
|
+
}, {
|
|
650
|
+
"method": "qInput",
|
|
651
|
+
"name": "qInput",
|
|
652
|
+
"bubbles": true,
|
|
653
|
+
"cancelable": true,
|
|
654
|
+
"composed": true,
|
|
655
|
+
"docs": {
|
|
656
|
+
"tags": [],
|
|
657
|
+
"text": "Emitted on each editable content input and after formatting."
|
|
658
|
+
},
|
|
659
|
+
"complexType": {
|
|
660
|
+
"original": "string",
|
|
661
|
+
"resolved": "string",
|
|
662
|
+
"references": {}
|
|
663
|
+
}
|
|
664
|
+
}];
|
|
665
|
+
}
|
|
666
|
+
static get methods() {
|
|
667
|
+
return {
|
|
668
|
+
"scrollToBottom": {
|
|
669
|
+
"complexType": {
|
|
670
|
+
"signature": "() => Promise<void>",
|
|
671
|
+
"parameters": [],
|
|
672
|
+
"references": {
|
|
673
|
+
"Promise": {
|
|
674
|
+
"location": "global",
|
|
675
|
+
"id": "global::Promise"
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
"return": "Promise<void>"
|
|
679
|
+
},
|
|
680
|
+
"docs": {
|
|
681
|
+
"text": "Programmatically scrolls the read-only code body to the bottom when it is wrapped by q-scrollable.",
|
|
682
|
+
"tags": []
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
"checkValidity": {
|
|
686
|
+
"complexType": {
|
|
687
|
+
"signature": "() => Promise<boolean>",
|
|
688
|
+
"parameters": [],
|
|
689
|
+
"references": {
|
|
690
|
+
"Promise": {
|
|
691
|
+
"location": "global",
|
|
692
|
+
"id": "global::Promise"
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
"return": "Promise<boolean>"
|
|
696
|
+
},
|
|
697
|
+
"docs": {
|
|
698
|
+
"text": "Returns whether editable content satisfies native constraints.",
|
|
699
|
+
"tags": []
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
"reportValidity": {
|
|
703
|
+
"complexType": {
|
|
704
|
+
"signature": "() => Promise<boolean>",
|
|
705
|
+
"parameters": [],
|
|
706
|
+
"references": {
|
|
707
|
+
"Promise": {
|
|
708
|
+
"location": "global",
|
|
709
|
+
"id": "global::Promise"
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
"return": "Promise<boolean>"
|
|
713
|
+
},
|
|
714
|
+
"docs": {
|
|
715
|
+
"text": "Reports editable constraint violations and reveals the editor in its owning box.",
|
|
716
|
+
"tags": []
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
static get watchers() {
|
|
722
|
+
return [{
|
|
723
|
+
"propName": "code",
|
|
724
|
+
"methodName": "watchCode"
|
|
725
|
+
}, {
|
|
726
|
+
"propName": "value",
|
|
727
|
+
"methodName": "watchValue"
|
|
728
|
+
}, {
|
|
729
|
+
"propName": "language",
|
|
730
|
+
"methodName": "watchLanguage"
|
|
731
|
+
}, {
|
|
732
|
+
"propName": "disabled",
|
|
733
|
+
"methodName": "watchConstraints"
|
|
734
|
+
}, {
|
|
735
|
+
"propName": "required",
|
|
736
|
+
"methodName": "watchConstraints"
|
|
737
|
+
}, {
|
|
738
|
+
"propName": "name",
|
|
739
|
+
"methodName": "watchConstraints"
|
|
740
|
+
}, {
|
|
741
|
+
"propName": "editable",
|
|
742
|
+
"methodName": "watchEditable"
|
|
743
|
+
}];
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
// An exported anonymous mixin cannot include private fields in its emitted declaration.
|
|
747
|
+
return SyntaxContent;
|
|
748
|
+
};
|