@talex-touch/tuffex 0.3.3 → 0.3.4
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 +49 -221
- package/dist/es/agents/index.js +1 -1
- package/dist/es/alert/index.d.ts +104 -1
- package/dist/es/alert/index.js +6 -0
- package/dist/es/alert/src/TxAlert.vue.d.ts +1 -0
- package/dist/es/alert/src/TxAlert.vue.js +2 -2
- package/dist/es/alert/src/TxAlert.vue2.js +6 -2
- package/dist/es/auto-sizer/index.js +1 -1
- package/dist/es/auto-sizer/src/TxAutoSizer.vue.js +2 -2
- package/dist/es/avatar/index.js +1 -1
- package/dist/es/avatar/src/TxAvatar.vue.js +1 -1
- package/dist/es/avatar/src/TxAvatar.vue2.js +47 -6
- package/dist/es/avatar/src/TxAvatarGroup.vue.js +1 -1
- package/dist/es/avatar/src/TxAvatarGroup.vue2.js +1 -1
- package/dist/es/avatar/src/types.d.ts +2 -1
- package/dist/es/badge/index.d.ts +78 -1
- package/dist/es/badge/index.js +6 -0
- package/dist/es/badge/src/TxBadge.vue.js +2 -2
- package/dist/es/base-anchor/index.d.ts +464 -0
- package/dist/es/base-anchor/index.js +6 -0
- package/dist/es/base-anchor/src/TxBaseAnchor.vue.d.ts +124 -0
- package/dist/es/base-anchor/src/TxBaseAnchor.vue.js +7 -0
- package/dist/es/base-anchor/src/TxBaseAnchor.vue2.js +798 -0
- package/dist/es/base-anchor/src/types.d.ts +36 -0
- package/dist/es/base-surface/index.d.ts +561 -0
- package/dist/es/base-surface/index.js +7 -0
- package/dist/es/base-surface/src/TxBaseSurface.vue.d.ts +123 -0
- package/dist/es/base-surface/src/TxBaseSurface.vue.js +1012 -0
- package/dist/es/base-surface/src/TxBaseSurface.vue2.js +6 -0
- package/dist/es/base-surface/src/style/index.css +105 -0
- package/dist/es/base-surface/src/types.d.ts +87 -0
- package/dist/es/blank-slate/index.d.ts +9 -9
- package/dist/es/blank-slate/index.js +1 -1
- package/dist/es/button/index.d.ts +45 -15
- package/dist/es/button/index.js +2 -1
- package/dist/es/button/src/button.vue.d.ts +7 -1
- package/dist/es/button/src/button.vue.js +50 -20
- package/dist/es/button/src/split-button.vue.js +31 -5
- package/dist/es/button/src/style/index.css +72 -15
- package/dist/es/button/src/types.d.ts +4 -0
- package/dist/es/card/index.d.ts +236 -56
- package/dist/es/card/index.js +1 -1
- package/dist/es/card/src/TxCard.vue.d.ts +40 -4
- package/dist/es/card/src/TxCard.vue.js +1 -1
- package/dist/es/card/src/TxCard.vue2.js +288 -57
- package/dist/es/card/src/types.d.ts +14 -1
- package/dist/es/card-item/index.d.ts +7 -7
- package/dist/es/card-item/index.js +1 -1
- package/dist/es/cascader/index.d.ts +15 -15
- package/dist/es/cascader/index.js +1 -1
- package/dist/es/cascader/src/TxCascader.vue.d.ts +1 -1
- package/dist/es/cascader/src/TxCascader.vue.js +1 -1
- package/dist/es/cascader/src/TxCascader.vue2.js +1 -3
- package/dist/es/chat/index.d.ts +18 -18
- package/dist/es/chat/index.js +1 -1
- package/dist/es/chat/src/TxChatComposer.vue.js +1 -1
- package/dist/es/chat/src/TxChatComposer.vue2.js +1 -0
- package/dist/es/chat/src/TxTypingIndicator.vue.d.ts +1 -1
- package/dist/es/code-editor/index.d.ts +387 -0
- package/dist/es/code-editor/index.js +8 -0
- package/dist/es/code-editor/src/TxCodeEditor.vue.d.ts +117 -0
- package/dist/es/code-editor/src/TxCodeEditor.vue.js +7 -0
- package/dist/es/code-editor/src/TxCodeEditor.vue2.js +658 -0
- package/dist/es/code-editor/src/TxCodeEditorToolbar.vue.d.ts +40 -0
- package/dist/es/code-editor/src/TxCodeEditorToolbar.vue.js +7 -0
- package/dist/es/code-editor/src/TxCodeEditorToolbar.vue2.js +89 -0
- package/dist/es/code-editor/src/types.d.ts +47 -0
- package/dist/es/command-palette/index.js +1 -1
- package/dist/es/command-palette/src/TxCommandPalette.vue.js +1 -1
- package/dist/es/command-palette/src/TxCommandPalette.vue2.js +128 -21
- package/dist/es/components.css +4253 -3117
- package/dist/es/components.d.ts +15 -2
- package/dist/es/components.js +44 -7
- package/dist/es/container/src/TxCol.vue.d.ts +1 -1
- package/dist/es/container/src/TxCol.vue2.js +1 -1
- package/dist/es/container/src/TxContainer.vue.d.ts +1 -1
- package/dist/es/container/src/TxRow.vue.d.ts +2 -2
- package/dist/es/container/src/TxRow.vue2.js +1 -1
- package/dist/es/context-menu/index.js +1 -1
- package/dist/es/context-menu/src/TxContextMenu.vue.js +1 -1
- package/dist/es/context-menu/src/TxContextMenu.vue2.js +4 -1
- package/dist/es/corner-overlay/index.js +1 -1
- package/dist/es/data-table/index.d.ts +15 -15
- package/dist/es/data-table/index.js +1 -1
- package/dist/es/data-table/src/TxDataTable.vue.d.ts +1 -1
- package/dist/es/date-picker/index.js +1 -1
- package/dist/es/dialog/index.js +1 -1
- package/dist/es/dialog/src/TxBlowDialog.vue.js +6 -2
- package/dist/es/dialog/src/TxBottomDialog.vue.js +1 -1
- package/dist/es/dialog/src/TxBottomDialog.vue2.js +6 -2
- package/dist/es/dialog/src/TxPopperDialog.vue.js +6 -2
- package/dist/es/dialog/src/TxTouchTip.vue.js +1 -1
- package/dist/es/dialog/src/TxTouchTip.vue2.js +25 -22
- package/dist/es/dialog/src/types.d.ts +1 -1
- package/dist/es/drawer/index.d.ts +24 -30
- package/dist/es/drawer/index.js +1 -1
- package/dist/es/drawer/src/TxDrawer.vue.d.ts +1 -4
- package/dist/es/drawer/src/TxDrawer.vue.js +8 -2
- package/dist/es/dropdown-menu/index.d.ts +81 -18
- package/dist/es/dropdown-menu/index.js +1 -1
- package/dist/es/dropdown-menu/src/TxDropdownMenu.vue.d.ts +11 -2
- package/dist/es/dropdown-menu/src/TxDropdownMenu.vue.js +1 -1
- package/dist/es/dropdown-menu/src/TxDropdownMenu.vue2.js +13 -3
- package/dist/es/dropdown-menu/src/types.d.ts +8 -1
- package/dist/es/edge-fade-mask/index.d.ts +120 -0
- package/dist/es/edge-fade-mask/index.js +6 -0
- package/dist/es/edge-fade-mask/src/TxEdgeFadeMask.vue.d.ts +51 -0
- package/dist/es/edge-fade-mask/src/TxEdgeFadeMask.vue.js +7 -0
- package/dist/es/edge-fade-mask/src/TxEdgeFadeMask.vue2.js +154 -0
- package/dist/es/edge-fade-mask/src/types.d.ts +9 -0
- package/dist/es/empty/index.js +1 -1
- package/dist/es/empty-state/index.d.ts +9 -9
- package/dist/es/empty-state/index.js +1 -1
- package/dist/es/empty-state/src/TxEmptyState.vue.js +1 -1
- package/dist/es/empty-state/src/TxEmptyState.vue2.js +25 -17
- package/dist/es/error-state/index.d.ts +131 -0
- package/dist/es/error-state/index.js +6 -0
- package/dist/es/error-state/src/TxErrorState.vue.d.ts +13 -0
- package/dist/es/error-state/src/TxErrorState.vue.js +35 -0
- package/dist/es/error-state/src/TxErrorState.vue2.js +5 -0
- package/dist/es/error-state/src/types.d.ts +3 -0
- package/dist/es/file-uploader/index.js +1 -1
- package/dist/es/flat-radio/index.d.ts +201 -0
- package/dist/es/flat-radio/index.js +8 -0
- package/dist/es/flat-radio/src/TxFlatRadio.vue.d.ts +51 -0
- package/dist/es/flat-radio/src/TxFlatRadio.vue.js +7 -0
- package/dist/es/flat-radio/src/TxFlatRadio.vue2.js +237 -0
- package/dist/es/flat-radio/src/TxFlatRadioItem.vue.d.ts +43 -0
- package/dist/es/flat-radio/src/TxFlatRadioItem.vue.js +7 -0
- package/dist/es/flat-radio/src/TxFlatRadioItem.vue2.js +87 -0
- package/dist/es/flat-radio/src/types.d.ts +28 -0
- package/dist/es/flat-radio/src/types.js +3 -0
- package/dist/es/flat-select/index.d.ts +159 -0
- package/dist/es/flat-select/index.js +8 -0
- package/dist/es/flat-select/src/TxFlatSelect.vue.d.ts +56 -0
- package/dist/es/flat-select/src/TxFlatSelect.vue.js +7 -0
- package/dist/es/flat-select/src/TxFlatSelect.vue2.js +208 -0
- package/dist/es/flat-select/src/TxFlatSelectItem.vue.d.ts +47 -0
- package/dist/es/flat-select/src/TxFlatSelectItem.vue.js +7 -0
- package/dist/es/flat-select/src/TxFlatSelectItem.vue2.js +71 -0
- package/dist/es/flat-select/src/types.d.ts +21 -0
- package/dist/es/flat-select/src/types.js +3 -0
- package/dist/es/flex/index.d.ts +33 -33
- package/dist/es/flex/index.js +1 -1
- package/dist/es/flex/src/TxFlex.vue.d.ts +3 -3
- package/dist/es/flip-overlay/index.d.ts +579 -0
- package/dist/es/flip-overlay/index.js +7 -0
- package/dist/es/flip-overlay/src/TxFlipOverlay.vue.d.ts +175 -0
- package/dist/es/flip-overlay/src/TxFlipOverlay.vue.js +982 -0
- package/dist/es/flip-overlay/src/TxFlipOverlay.vue3.js +6 -0
- package/dist/es/flip-overlay/src/types.d.ts +53 -0
- package/dist/es/floating/index.d.ts +145 -0
- package/dist/es/floating/index.js +8 -0
- package/dist/es/floating/src/TxFloating.vue.d.ts +45 -0
- package/dist/es/floating/src/TxFloating.vue.js +7 -0
- package/dist/es/floating/src/TxFloating.vue2.js +118 -0
- package/dist/es/floating/src/TxFloatingElement.vue.d.ts +39 -0
- package/dist/es/floating/src/TxFloatingElement.vue.js +7 -0
- package/dist/es/floating/src/TxFloatingElement.vue2.js +43 -0
- package/dist/es/floating/src/context.d.ts +7 -0
- package/dist/es/floating/src/context.js +3 -0
- package/dist/es/floating/src/types.d.ts +10 -0
- package/dist/es/form/index.d.ts +9 -9
- package/dist/es/form/index.js +1 -1
- package/dist/es/fusion/index.d.ts +15 -15
- package/dist/es/fusion/index.js +1 -1
- package/dist/es/fusion/src/TxFusion.vue.d.ts +1 -1
- package/dist/es/glass-surface/index.d.ts +30 -30
- package/dist/es/glass-surface/index.js +1 -1
- package/dist/es/glass-surface/src/TxGlassSurface.vue.d.ts +2 -2
- package/dist/es/glass-surface/src/TxGlassSurface.vue.js +16 -38
- package/dist/es/glow-text/index.d.ts +24 -6
- package/dist/es/glow-text/index.js +1 -1
- package/dist/es/glow-text/src/TxGlowText.vue.d.ts +3 -3
- package/dist/es/glow-text/src/TxGlowText.vue.js +1 -1
- package/dist/es/glow-text/src/TxGlowText.vue2.js +93 -10
- package/dist/es/glow-text/src/types.d.ts +2 -0
- package/dist/es/gradient-border/index.js +1 -1
- package/dist/es/gradual-blur/index.d.ts +42 -42
- package/dist/es/gradual-blur/index.js +1 -1
- package/dist/es/gradual-blur/src/TxGradualBlur.vue.d.ts +3 -3
- package/dist/es/gradual-blur/src/TxGradualBlur.vue.js +1 -1
- package/dist/es/grid/src/TxGrid.vue.d.ts +2 -2
- package/dist/es/grid/src/TxGrid.vue2.js +1 -1
- package/dist/es/grid-layout/index.js +1 -1
- package/dist/es/group-block/index.d.ts +321 -4
- package/dist/es/group-block/index.js +8 -2
- package/dist/es/group-block/src/TxBlockInput.vue.d.ts +90 -0
- package/dist/es/group-block/src/TxBlockInput.vue.js +94 -0
- package/dist/es/group-block/src/TxBlockInput.vue3.js +6 -0
- package/dist/es/group-block/src/TxBlockSelect.vue.d.ts +73 -0
- package/dist/es/group-block/src/TxBlockSelect.vue.js +76 -0
- package/dist/es/group-block/src/TxBlockSelect.vue3.js +6 -0
- package/dist/es/group-block/src/TxGroupBlock.vue.js +1 -1
- package/dist/es/group-block/src/types.d.ts +138 -0
- package/dist/es/guide-state/index.d.ts +131 -0
- package/dist/es/guide-state/index.js +6 -0
- package/dist/es/guide-state/src/TxGuideState.vue.d.ts +13 -0
- package/dist/es/guide-state/src/TxGuideState.vue.js +35 -0
- package/dist/es/guide-state/src/TxGuideState.vue2.js +5 -0
- package/dist/es/guide-state/src/types.d.ts +3 -0
- package/dist/es/icon/index.js +1 -1
- package/dist/es/icon/src/TxIcon.vue.js +1 -1
- package/dist/es/icon/src/TxIcon.vue2.js +10 -4
- package/dist/es/image-gallery/index.js +1 -1
- package/dist/es/image-uploader/index.js +1 -1
- package/dist/es/index.js +53 -13
- package/dist/es/input/index.d.ts +211 -1
- package/dist/es/input/index.js +2 -1
- package/dist/es/input/src/TxInput.vue.d.ts +21 -11
- package/dist/es/input/src/TxInput.vue.js +1 -1
- package/dist/es/input/src/TxInput.vue2.js +80 -23
- package/dist/es/keyframe-stroke-text/index.d.ts +146 -0
- package/dist/es/keyframe-stroke-text/index.js +6 -0
- package/dist/es/keyframe-stroke-text/src/TxKeyframeStrokeText.vue.d.ts +48 -0
- package/dist/es/keyframe-stroke-text/src/TxKeyframeStrokeText.vue.js +7 -0
- package/dist/es/keyframe-stroke-text/src/TxKeyframeStrokeText.vue2.js +102 -0
- package/dist/es/keyframe-stroke-text/src/types.d.ts +10 -0
- package/dist/es/layout-skeleton/index.js +1 -1
- package/dist/es/loading-overlay/index.d.ts +15 -15
- package/dist/es/loading-overlay/index.js +1 -1
- package/dist/es/loading-overlay/src/TxLoadingOverlay.vue.d.ts +1 -1
- package/dist/es/loading-overlay/src/TxLoadingOverlay.vue.js +12 -2
- package/dist/es/loading-state/index.d.ts +9 -9
- package/dist/es/loading-state/index.js +1 -1
- package/dist/es/markdown-view/index.d.ts +3 -3
- package/dist/es/markdown-view/index.js +1 -1
- package/dist/es/markdown-view/src/TxMarkdownView.vue.js +3 -2
- package/dist/es/modal/index.js +1 -1
- package/dist/es/modal/src/TxModal.vue.js +1 -1
- package/dist/es/modal/src/TxModal.vue2.js +26 -4
- package/dist/es/nav-bar/index.js +1 -1
- package/dist/es/no-data/index.d.ts +9 -9
- package/dist/es/no-data/index.js +1 -1
- package/dist/es/no-selection/index.d.ts +9 -9
- package/dist/es/no-selection/index.js +1 -1
- package/dist/es/node_modules/.pnpm/@codemirror_legacy-modes@6.5.2/node_modules/@codemirror/legacy-modes/mode/properties.js +62 -0
- package/dist/es/node_modules/.pnpm/@codemirror_legacy-modes@6.5.2/node_modules/@codemirror/legacy-modes/mode/toml.js +76 -0
- package/dist/es/node_modules/.pnpm/@lezer_common@1.5.0/node_modules/@lezer/common/dist/index.js +252 -0
- package/dist/es/node_modules/.pnpm/@lezer_highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js +682 -0
- package/dist/es/offline-state/index.d.ts +9 -9
- package/dist/es/offline-state/index.js +1 -1
- package/dist/es/outline-border/index.d.ts +18 -18
- package/dist/es/outline-border/index.js +1 -1
- package/dist/es/outline-border/src/TxOutlineBorder.vue.d.ts +1 -1
- package/dist/es/{utils → packages/tuffex/packages/utils}/toast.js +4 -1
- package/dist/es/packages/tuffex/packages/utils/z-index-manager.js +114 -0
- package/dist/es/packages/utils/env/index.js +8 -0
- package/dist/es/permission-state/index.d.ts +9 -9
- package/dist/es/permission-state/index.js +1 -1
- package/dist/es/picker/index.js +1 -1
- package/dist/es/picker/src/TxPicker.vue.js +1 -1
- package/dist/es/picker/src/TxPicker.vue2.js +6 -1
- package/dist/es/popover/index.d.ts +195 -82
- package/dist/es/popover/index.js +1 -1
- package/dist/es/popover/src/TxPopover.vue.d.ts +33 -16
- package/dist/es/popover/src/TxPopover.vue.js +1 -1
- package/dist/es/popover/src/TxPopover.vue2.js +147 -317
- package/dist/es/popover/src/types.d.ts +14 -3
- package/dist/es/progress-bar/index.d.ts +21 -21
- package/dist/es/progress-bar/index.js +1 -1
- package/dist/es/progress-bar/src/TxProgressBar.vue.d.ts +1 -1
- package/dist/es/radio/index.js +1 -1
- package/dist/es/radio/src/TxRadioGroup.vue2.js +1 -1
- package/dist/es/scroll/index.d.ts +42 -12
- package/dist/es/scroll/index.js +1 -1
- package/dist/es/scroll/src/TxScroll.vue.d.ts +11 -1
- package/dist/es/scroll/src/TxScroll.vue.js +1 -1
- package/dist/es/scroll/src/TxScroll.vue2.js +25 -13
- package/dist/es/scroll/src/runtime-capabilities.d.ts +2 -0
- package/dist/es/scroll/src/runtime-capabilities.js +67 -0
- package/dist/es/search-empty/index.d.ts +9 -9
- package/dist/es/search-empty/index.js +1 -1
- package/dist/es/search-input/index.js +1 -1
- package/dist/es/search-select/index.d.ts +9 -9
- package/dist/es/search-select/index.js +1 -1
- package/dist/es/search-select/src/TxSearchSelect.vue.d.ts +1 -1
- package/dist/es/search-select/src/TxSearchSelect.vue.js +1 -1
- package/dist/es/search-select/src/TxSearchSelect.vue2.js +105 -178
- package/dist/es/search-select/src/types.d.ts +1 -1
- package/dist/es/segmented-slider/index.js +1 -1
- package/dist/es/segmented-slider/src/TxSegmentedSlider.vue.js +1 -0
- package/dist/es/select/index.d.ts +366 -4
- package/dist/es/select/index.js +6 -9
- package/dist/es/select/src/TxSelect.vue.d.ts +23 -23
- package/dist/es/select/src/TxSelect.vue.js +2 -2
- package/dist/es/select/src/TxSelect.vue2.js +203 -152
- package/dist/es/select/src/TxSelectItem.vue.js +2 -2
- package/dist/es/select/src/TxSelectItem.vue2.js +44 -7
- package/dist/es/select/src/types.d.ts +34 -0
- package/dist/es/select/src/types.js +3 -0
- package/dist/es/skeleton/index.d.ts +7 -7
- package/dist/es/skeleton/index.js +1 -1
- package/dist/es/slider/index.d.ts +4 -4
- package/dist/es/slider/index.js +1 -1
- package/dist/es/sortable-list/index.js +1 -1
- package/dist/es/sortable-list/src/TxSortableList.vue.js +1 -1
- package/dist/es/sortable-list/src/TxSortableList.vue2.js +1 -1
- package/dist/es/spinner/index.d.ts +1 -1
- package/dist/es/spinner/index.js +1 -1
- package/dist/es/splitter/index.d.ts +15 -15
- package/dist/es/splitter/index.js +1 -1
- package/dist/es/splitter/src/TxSplitter.vue.d.ts +1 -1
- package/dist/es/stack/index.d.ts +33 -33
- package/dist/es/stack/index.js +1 -1
- package/dist/es/stack/src/TxStack.vue.d.ts +3 -3
- package/dist/es/stagger/index.d.ts +15 -15
- package/dist/es/stagger/index.js +1 -1
- package/dist/es/stagger/src/TxStagger.vue.d.ts +1 -1
- package/dist/es/stat-card/index.d.ts +46 -3
- package/dist/es/stat-card/index.js +1 -1
- package/dist/es/stat-card/src/TxStatCard.vue.d.ts +5 -1
- package/dist/es/stat-card/src/TxStatCard.vue.js +1 -1
- package/dist/es/stat-card/src/TxStatCard.vue2.js +247 -19
- package/dist/es/stat-card/src/types.d.ts +15 -0
- package/dist/es/status-badge/index.js +1 -1
- package/dist/es/switch/index.js +1 -0
- package/dist/es/tab-bar/index.d.ts +15 -15
- package/dist/es/tab-bar/index.js +1 -1
- package/dist/es/tab-bar/src/TxTabBar.vue.d.ts +1 -1
- package/dist/es/tabs/index.d.ts +18 -3
- package/dist/es/tabs/index.js +1 -1
- package/dist/es/tabs/src/TxTabs.vue.d.ts +10 -1
- package/dist/es/tabs/src/TxTabs.vue.js +1 -1
- package/dist/es/tabs/src/TxTabs.vue2.js +3 -1
- package/dist/es/tabs/src/types.d.ts +1 -0
- package/dist/es/tag/index.js +1 -1
- package/dist/es/tag-input/index.js +1 -1
- package/dist/es/text-transformer/index.d.ts +1 -1
- package/dist/es/text-transformer/index.js +1 -1
- package/dist/es/toast/index.js +1 -1
- package/dist/es/toast/src/TxToastHost.vue.js +18 -17
- package/dist/es/tooltip/index.d.ts +75 -178
- package/dist/es/tooltip/index.js +1 -1
- package/dist/es/tooltip/src/TxTooltip.vue.d.ts +21 -40
- package/dist/es/tooltip/src/TxTooltip.vue.js +1 -1
- package/dist/es/tooltip/src/TxTooltip.vue2.js +102 -350
- package/dist/es/tooltip/src/types.d.ts +8 -13
- package/dist/es/transfer/index.d.ts +131 -0
- package/dist/es/transfer/index.js +6 -0
- package/dist/es/transfer/src/TxTransfer.vue.d.ts +48 -0
- package/dist/es/transfer/src/TxTransfer.vue.js +7 -0
- package/dist/es/transfer/src/TxTransfer.vue2.js +217 -0
- package/dist/es/transfer/src/types.d.ts +17 -0
- package/dist/es/transition/index.d.ts +30 -30
- package/dist/es/transition/index.js +1 -1
- package/dist/es/transition/src/TxTransition.vue.d.ts +1 -1
- package/dist/es/transition/src/TxTransitionSmoothSize.vue.d.ts +1 -1
- package/dist/es/tree/index.d.ts +15 -15
- package/dist/es/tree/index.js +1 -1
- package/dist/es/tree/src/TxTree.vue.d.ts +1 -1
- package/dist/es/tree/src/TxTree.vue.js +1 -1
- package/dist/es/tree/src/TxTree.vue2.js +3 -2
- package/dist/es/tree/src/types.d.ts +1 -0
- package/dist/es/tree-select/index.d.ts +9 -9
- package/dist/es/tree-select/index.js +1 -1
- package/dist/es/tree-select/src/TxTreeSelect.vue.d.ts +1 -1
- package/dist/es/tree-select/src/TxTreeSelect.vue.js +1 -1
- package/dist/es/tree-select/src/TxTreeSelect.vue2.js +0 -2
- package/dist/es/tuff-logo-stroke/index.d.ts +146 -0
- package/dist/es/tuff-logo-stroke/index.js +6 -0
- package/dist/es/tuff-logo-stroke/src/TxTuffLogoStroke.vue.d.ts +48 -0
- package/dist/es/tuff-logo-stroke/src/TxTuffLogoStroke.vue.js +7 -0
- package/dist/es/tuff-logo-stroke/src/TxTuffLogoStroke.vue2.js +147 -0
- package/dist/es/tuff-logo-stroke/src/types.d.ts +10 -0
- package/dist/es/virtual-list/index.js +1 -1
- package/dist/lib/agents/index.js +1 -1
- package/dist/lib/alert/index.js +11 -0
- package/dist/lib/alert/src/TxAlert.vue.js +2 -2
- package/dist/lib/alert/src/TxAlert.vue2.js +5 -1
- package/dist/lib/auto-sizer/index.js +1 -1
- package/dist/lib/auto-sizer/src/TxAutoSizer.vue.js +2 -2
- package/dist/lib/avatar/index.js +1 -1
- package/dist/lib/avatar/src/TxAvatar.vue.js +1 -1
- package/dist/lib/avatar/src/TxAvatar.vue2.js +47 -6
- package/dist/lib/avatar/src/TxAvatarGroup.vue.js +1 -1
- package/dist/lib/avatar/src/TxAvatarGroup.vue2.js +1 -1
- package/dist/lib/badge/index.js +11 -0
- package/dist/lib/badge/src/TxBadge.vue.js +2 -2
- package/dist/lib/base-anchor/index.js +12 -0
- package/dist/lib/base-anchor/src/TxBaseAnchor.vue.js +11 -0
- package/dist/lib/base-anchor/src/TxBaseAnchor.vue2.js +802 -0
- package/dist/lib/base-surface/index.js +13 -0
- package/dist/lib/base-surface/src/TxBaseSurface.vue.js +1016 -0
- package/dist/lib/base-surface/src/TxBaseSurface.vue2.js +10 -0
- package/dist/lib/base-surface/src/style/index.css +105 -0
- package/dist/lib/blank-slate/index.js +1 -1
- package/dist/lib/button/index.js +2 -1
- package/dist/lib/button/src/button.vue.js +49 -19
- package/dist/lib/button/src/split-button.vue.js +30 -4
- package/dist/lib/button/src/style/index.css +72 -15
- package/dist/lib/card/index.js +1 -1
- package/dist/lib/card/src/TxCard.vue.js +1 -1
- package/dist/lib/card/src/TxCard.vue2.js +285 -54
- package/dist/lib/card-item/index.js +1 -1
- package/dist/lib/cascader/index.js +1 -1
- package/dist/lib/cascader/src/TxCascader.vue.js +1 -1
- package/dist/lib/cascader/src/TxCascader.vue2.js +1 -3
- package/dist/lib/chat/index.js +1 -1
- package/dist/lib/chat/src/TxChatComposer.vue.js +1 -1
- package/dist/lib/chat/src/TxChatComposer.vue2.js +1 -0
- package/dist/lib/code-editor/index.js +16 -0
- package/dist/lib/code-editor/src/TxCodeEditor.vue.js +11 -0
- package/dist/lib/code-editor/src/TxCodeEditor.vue2.js +662 -0
- package/dist/lib/code-editor/src/TxCodeEditorToolbar.vue.js +11 -0
- package/dist/lib/code-editor/src/TxCodeEditorToolbar.vue2.js +93 -0
- package/dist/lib/command-palette/index.js +1 -1
- package/dist/lib/command-palette/src/TxCommandPalette.vue.js +1 -1
- package/dist/lib/command-palette/src/TxCommandPalette.vue2.js +127 -20
- package/dist/lib/components.css +4253 -3117
- package/dist/lib/components.js +255 -178
- package/dist/lib/container/src/TxCol.vue2.js +1 -1
- package/dist/lib/container/src/TxRow.vue2.js +1 -1
- package/dist/lib/context-menu/index.js +1 -1
- package/dist/lib/context-menu/src/TxContextMenu.vue.js +1 -1
- package/dist/lib/context-menu/src/TxContextMenu.vue2.js +4 -1
- package/dist/lib/corner-overlay/index.js +1 -1
- package/dist/lib/data-table/index.js +1 -1
- package/dist/lib/date-picker/index.js +1 -1
- package/dist/lib/dialog/index.js +1 -1
- package/dist/lib/dialog/src/TxBlowDialog.vue.js +5 -1
- package/dist/lib/dialog/src/TxBottomDialog.vue.js +1 -1
- package/dist/lib/dialog/src/TxBottomDialog.vue2.js +5 -1
- package/dist/lib/dialog/src/TxPopperDialog.vue.js +5 -1
- package/dist/lib/dialog/src/TxTouchTip.vue.js +1 -1
- package/dist/lib/dialog/src/TxTouchTip.vue2.js +24 -21
- package/dist/lib/drawer/index.js +1 -1
- package/dist/lib/drawer/src/TxDrawer.vue.js +8 -2
- package/dist/lib/dropdown-menu/index.js +1 -1
- package/dist/lib/dropdown-menu/src/TxDropdownMenu.vue.js +1 -1
- package/dist/lib/dropdown-menu/src/TxDropdownMenu.vue2.js +13 -3
- package/dist/lib/edge-fade-mask/index.js +12 -0
- package/dist/lib/edge-fade-mask/src/TxEdgeFadeMask.vue.js +11 -0
- package/dist/lib/edge-fade-mask/src/TxEdgeFadeMask.vue2.js +158 -0
- package/dist/lib/empty/index.js +1 -1
- package/dist/lib/empty-state/index.js +1 -1
- package/dist/lib/empty-state/src/TxEmptyState.vue.js +1 -1
- package/dist/lib/empty-state/src/TxEmptyState.vue2.js +25 -17
- package/dist/lib/error-state/index.js +11 -0
- package/dist/lib/error-state/src/TxErrorState.vue.js +39 -0
- package/dist/lib/error-state/src/TxErrorState.vue2.js +9 -0
- package/dist/lib/file-uploader/index.js +1 -1
- package/dist/lib/flat-radio/index.js +16 -0
- package/dist/lib/flat-radio/src/TxFlatRadio.vue.js +11 -0
- package/dist/lib/flat-radio/src/TxFlatRadio.vue2.js +241 -0
- package/dist/lib/flat-radio/src/TxFlatRadioItem.vue.js +11 -0
- package/dist/lib/flat-radio/src/TxFlatRadioItem.vue2.js +91 -0
- package/dist/lib/flat-radio/src/types.js +7 -0
- package/dist/lib/flat-select/index.js +16 -0
- package/dist/lib/flat-select/src/TxFlatSelect.vue.js +11 -0
- package/dist/lib/flat-select/src/TxFlatSelect.vue2.js +212 -0
- package/dist/lib/flat-select/src/TxFlatSelectItem.vue.js +11 -0
- package/dist/lib/flat-select/src/TxFlatSelectItem.vue2.js +75 -0
- package/dist/lib/flat-select/src/types.js +7 -0
- package/dist/lib/flex/index.js +1 -1
- package/dist/lib/flip-overlay/index.js +13 -0
- package/dist/lib/flip-overlay/src/TxFlipOverlay.vue.js +986 -0
- package/dist/lib/flip-overlay/src/TxFlipOverlay.vue3.js +10 -0
- package/dist/lib/floating/index.js +16 -0
- package/dist/lib/floating/src/TxFloating.vue.js +11 -0
- package/dist/lib/floating/src/TxFloating.vue2.js +122 -0
- package/dist/lib/floating/src/TxFloatingElement.vue.js +11 -0
- package/dist/lib/floating/src/TxFloatingElement.vue2.js +47 -0
- package/dist/lib/floating/src/context.js +7 -0
- package/dist/lib/form/index.js +1 -1
- package/dist/lib/fusion/index.js +1 -1
- package/dist/lib/glass-surface/index.js +1 -1
- package/dist/lib/glass-surface/src/TxGlassSurface.vue.js +15 -37
- package/dist/lib/glow-text/index.js +1 -1
- package/dist/lib/glow-text/src/TxGlowText.vue.js +1 -1
- package/dist/lib/glow-text/src/TxGlowText.vue2.js +92 -9
- package/dist/lib/gradient-border/index.js +1 -1
- package/dist/lib/gradual-blur/index.js +1 -1
- package/dist/lib/gradual-blur/src/TxGradualBlur.vue.js +1 -1
- package/dist/lib/grid/src/TxGrid.vue2.js +1 -1
- package/dist/lib/grid-layout/index.js +1 -1
- package/dist/lib/group-block/index.js +11 -1
- package/dist/lib/group-block/src/TxBlockInput.vue.js +98 -0
- package/dist/lib/group-block/src/TxBlockInput.vue3.js +10 -0
- package/dist/lib/group-block/src/TxBlockSelect.vue.js +80 -0
- package/dist/lib/group-block/src/TxBlockSelect.vue3.js +10 -0
- package/dist/lib/group-block/src/TxGroupBlock.vue.js +1 -1
- package/dist/lib/guide-state/index.js +11 -0
- package/dist/lib/guide-state/src/TxGuideState.vue.js +39 -0
- package/dist/lib/guide-state/src/TxGuideState.vue2.js +9 -0
- package/dist/lib/icon/index.js +1 -1
- package/dist/lib/icon/src/TxIcon.vue.js +1 -1
- package/dist/lib/icon/src/TxIcon.vue2.js +9 -3
- package/dist/lib/image-gallery/index.js +1 -1
- package/dist/lib/image-uploader/index.js +1 -1
- package/dist/lib/index.js +269 -182
- package/dist/lib/input/index.js +7 -5
- package/dist/lib/input/src/TxInput.vue.js +1 -1
- package/dist/lib/input/src/TxInput.vue2.js +79 -22
- package/dist/lib/keyframe-stroke-text/index.js +12 -0
- package/dist/lib/keyframe-stroke-text/src/TxKeyframeStrokeText.vue.js +11 -0
- package/dist/lib/keyframe-stroke-text/src/TxKeyframeStrokeText.vue2.js +106 -0
- package/dist/lib/layout-skeleton/index.js +1 -1
- package/dist/lib/loading-overlay/index.js +1 -1
- package/dist/lib/loading-overlay/src/TxLoadingOverlay.vue.js +11 -1
- package/dist/lib/loading-state/index.js +1 -1
- package/dist/lib/markdown-view/index.js +1 -1
- package/dist/lib/markdown-view/src/TxMarkdownView.vue.js +3 -2
- package/dist/lib/modal/index.js +1 -1
- package/dist/lib/modal/src/TxModal.vue.js +1 -1
- package/dist/lib/modal/src/TxModal.vue2.js +25 -3
- package/dist/lib/nav-bar/index.js +1 -1
- package/dist/lib/no-data/index.js +1 -1
- package/dist/lib/no-selection/index.js +1 -1
- package/dist/lib/node_modules/.pnpm/@codemirror_legacy-modes@6.5.2/node_modules/@codemirror/legacy-modes/mode/properties.js +66 -0
- package/dist/lib/node_modules/.pnpm/@codemirror_legacy-modes@6.5.2/node_modules/@codemirror/legacy-modes/mode/toml.js +80 -0
- package/dist/lib/node_modules/.pnpm/@lezer_common@1.5.0/node_modules/@lezer/common/dist/index.js +257 -0
- package/dist/lib/node_modules/.pnpm/@lezer_highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js +688 -0
- package/dist/lib/offline-state/index.js +1 -1
- package/dist/lib/outline-border/index.js +1 -1
- package/dist/lib/{utils → packages/tuffex/packages/utils}/toast.js +4 -1
- package/dist/lib/packages/tuffex/packages/utils/z-index-manager.js +124 -0
- package/dist/lib/packages/utils/env/index.js +13 -0
- package/dist/lib/permission-state/index.js +1 -1
- package/dist/lib/picker/index.js +1 -1
- package/dist/lib/picker/src/TxPicker.vue.js +1 -1
- package/dist/lib/picker/src/TxPicker.vue2.js +6 -1
- package/dist/lib/popover/index.js +1 -1
- package/dist/lib/popover/src/TxPopover.vue.js +1 -1
- package/dist/lib/popover/src/TxPopover.vue2.js +146 -316
- package/dist/lib/progress-bar/index.js +1 -1
- package/dist/lib/radio/index.js +1 -1
- package/dist/lib/radio/src/TxRadioGroup.vue2.js +1 -1
- package/dist/lib/scroll/index.js +1 -1
- package/dist/lib/scroll/src/TxScroll.vue.js +1 -1
- package/dist/lib/scroll/src/TxScroll.vue2.js +25 -13
- package/dist/lib/scroll/src/runtime-capabilities.js +72 -0
- package/dist/lib/search-empty/index.js +1 -1
- package/dist/lib/search-input/index.js +1 -1
- package/dist/lib/search-select/index.js +1 -1
- package/dist/lib/search-select/src/TxSearchSelect.vue.js +1 -1
- package/dist/lib/search-select/src/TxSearchSelect.vue2.js +104 -177
- package/dist/lib/segmented-slider/index.js +1 -1
- package/dist/lib/segmented-slider/src/TxSegmentedSlider.vue.js +1 -0
- package/dist/lib/select/index.js +6 -9
- package/dist/lib/select/src/TxSelect.vue.js +2 -2
- package/dist/lib/select/src/TxSelect.vue2.js +202 -151
- package/dist/lib/select/src/TxSelectItem.vue.js +2 -2
- package/dist/lib/select/src/TxSelectItem.vue2.js +43 -6
- package/dist/lib/select/src/types.js +7 -0
- package/dist/lib/skeleton/index.js +1 -1
- package/dist/lib/slider/index.js +1 -1
- package/dist/lib/sortable-list/index.js +1 -1
- package/dist/lib/sortable-list/src/TxSortableList.vue.js +1 -1
- package/dist/lib/sortable-list/src/TxSortableList.vue2.js +1 -1
- package/dist/lib/spinner/index.js +1 -1
- package/dist/lib/splitter/index.js +1 -1
- package/dist/lib/stack/index.js +1 -1
- package/dist/lib/stagger/index.js +1 -1
- package/dist/lib/stat-card/index.js +1 -1
- package/dist/lib/stat-card/src/TxStatCard.vue.js +1 -1
- package/dist/lib/stat-card/src/TxStatCard.vue2.js +246 -18
- package/dist/lib/status-badge/index.js +1 -1
- package/dist/lib/switch/index.js +1 -0
- package/dist/lib/tab-bar/index.js +1 -1
- package/dist/lib/tabs/index.js +1 -1
- package/dist/lib/tabs/src/TxTabs.vue.js +1 -1
- package/dist/lib/tabs/src/TxTabs.vue2.js +3 -1
- package/dist/lib/tag/index.js +1 -1
- package/dist/lib/tag-input/index.js +1 -1
- package/dist/lib/text-transformer/index.js +1 -1
- package/dist/lib/toast/index.js +1 -1
- package/dist/lib/toast/src/TxToastHost.vue.js +17 -16
- package/dist/lib/tooltip/index.js +1 -1
- package/dist/lib/tooltip/src/TxTooltip.vue.js +1 -1
- package/dist/lib/tooltip/src/TxTooltip.vue2.js +101 -349
- package/dist/lib/transfer/index.js +12 -0
- package/dist/lib/transfer/src/TxTransfer.vue.js +11 -0
- package/dist/lib/transfer/src/TxTransfer.vue2.js +221 -0
- package/dist/lib/transition/index.js +1 -1
- package/dist/lib/tree/index.js +1 -1
- package/dist/lib/tree/src/TxTree.vue.js +1 -1
- package/dist/lib/tree/src/TxTree.vue2.js +3 -2
- package/dist/lib/tree-select/index.js +1 -1
- package/dist/lib/tree-select/src/TxTreeSelect.vue.js +1 -1
- package/dist/lib/tree-select/src/TxTreeSelect.vue2.js +0 -2
- package/dist/lib/tuff-logo-stroke/index.js +12 -0
- package/dist/lib/tuff-logo-stroke/src/TxTuffLogoStroke.vue.js +11 -0
- package/dist/lib/tuff-logo-stroke/src/TxTuffLogoStroke.vue2.js +151 -0
- package/dist/lib/virtual-list/index.js +1 -1
- package/package.json +37 -25
- package/dist/es/button/__tests__/button.test.d.ts +0 -1
- package/dist/es/button/__tests__/split-button.test.d.ts +0 -1
- package/dist/es/cascader/__tests__/cascader.test.d.ts +0 -1
- package/dist/es/command-palette/__tests__/command-palette.test.d.ts +0 -1
- package/dist/es/data-table/__tests__/data-table.test.d.ts +0 -1
- package/dist/es/file-uploader/__tests__/file-uploader.test.d.ts +0 -1
- package/dist/es/form/__tests__/form.test.d.ts +0 -1
- package/dist/es/search-select/__tests__/search-select.test.d.ts +0 -1
- package/dist/es/tag-input/__tests__/tag-input.test.d.ts +0 -1
- package/dist/es/tree/__tests__/tree.test.d.ts +0 -1
- package/dist/es/tree-select/__tests__/tree-select.test.d.ts +0 -1
- package/dist/es/virtual-list/__tests__/virtual-list.test.d.ts +0 -1
- /package/dist/es/{utils → packages/tuffex/packages/utils}/animation/auto-resize.js +0 -0
- /package/dist/es/{utils → packages/tuffex/packages/utils}/animation/flip.js +0 -0
- /package/dist/es/{utils → packages/tuffex/packages/utils}/dialog-manager.js +0 -0
- /package/dist/es/{utils → packages/tuffex/packages/utils}/env.js +0 -0
- /package/dist/es/{utils → packages/tuffex/packages/utils}/vibrate.js +0 -0
- /package/dist/es/{utils → packages/tuffex/packages/utils}/withInstall.js +0 -0
- /package/dist/lib/{utils → packages/tuffex/packages/utils}/animation/auto-resize.js +0 -0
- /package/dist/lib/{utils → packages/tuffex/packages/utils}/animation/flip.js +0 -0
- /package/dist/lib/{utils → packages/tuffex/packages/utils}/dialog-manager.js +0 -0
- /package/dist/lib/{utils → packages/tuffex/packages/utils}/env.js +0 -0
- /package/dist/lib/{utils → packages/tuffex/packages/utils}/vibrate.js +0 -0
- /package/dist/lib/{utils → packages/tuffex/packages/utils}/withInstall.js +0 -0
|
@@ -0,0 +1,682 @@
|
|
|
1
|
+
import { NodeProp } from '../../../../../@lezer_common@1.5.0/node_modules/@lezer/common/dist/index.js';
|
|
2
|
+
|
|
3
|
+
let nextTagID = 0;
|
|
4
|
+
/**
|
|
5
|
+
Highlighting tags are markers that denote a highlighting category.
|
|
6
|
+
They are [associated](#highlight.styleTags) with parts of a syntax
|
|
7
|
+
tree by a language mode, and then mapped to an actual CSS style by
|
|
8
|
+
a [highlighter](#highlight.Highlighter).
|
|
9
|
+
|
|
10
|
+
Because syntax tree node types and highlight styles have to be
|
|
11
|
+
able to talk the same language, CodeMirror uses a mostly _closed_
|
|
12
|
+
[vocabulary](#highlight.tags) of syntax tags (as opposed to
|
|
13
|
+
traditional open string-based systems, which make it hard for
|
|
14
|
+
highlighting themes to cover all the tokens produced by the
|
|
15
|
+
various languages).
|
|
16
|
+
|
|
17
|
+
It _is_ possible to [define](#highlight.Tag^define) your own
|
|
18
|
+
highlighting tags for system-internal use (where you control both
|
|
19
|
+
the language package and the highlighter), but such tags will not
|
|
20
|
+
be picked up by regular highlighters (though you can derive them
|
|
21
|
+
from standard tags to allow highlighters to fall back to those).
|
|
22
|
+
*/
|
|
23
|
+
class Tag {
|
|
24
|
+
/**
|
|
25
|
+
@internal
|
|
26
|
+
*/
|
|
27
|
+
constructor(
|
|
28
|
+
/**
|
|
29
|
+
The optional name of the base tag @internal
|
|
30
|
+
*/
|
|
31
|
+
name,
|
|
32
|
+
/**
|
|
33
|
+
The set of this tag and all its parent tags, starting with
|
|
34
|
+
this one itself and sorted in order of decreasing specificity.
|
|
35
|
+
*/
|
|
36
|
+
set,
|
|
37
|
+
/**
|
|
38
|
+
The base unmodified tag that this one is based on, if it's
|
|
39
|
+
modified @internal
|
|
40
|
+
*/
|
|
41
|
+
base,
|
|
42
|
+
/**
|
|
43
|
+
The modifiers applied to this.base @internal
|
|
44
|
+
*/
|
|
45
|
+
modified) {
|
|
46
|
+
this.name = name;
|
|
47
|
+
this.set = set;
|
|
48
|
+
this.base = base;
|
|
49
|
+
this.modified = modified;
|
|
50
|
+
/**
|
|
51
|
+
@internal
|
|
52
|
+
*/
|
|
53
|
+
this.id = nextTagID++;
|
|
54
|
+
}
|
|
55
|
+
toString() {
|
|
56
|
+
let { name } = this;
|
|
57
|
+
for (let mod of this.modified)
|
|
58
|
+
if (mod.name)
|
|
59
|
+
name = `${mod.name}(${name})`;
|
|
60
|
+
return name;
|
|
61
|
+
}
|
|
62
|
+
static define(nameOrParent, parent) {
|
|
63
|
+
let name = typeof nameOrParent == "string" ? nameOrParent : "?";
|
|
64
|
+
if (nameOrParent instanceof Tag)
|
|
65
|
+
parent = nameOrParent;
|
|
66
|
+
if (parent === null || parent === void 0 ? void 0 : parent.base)
|
|
67
|
+
throw new Error("Can not derive from a modified tag");
|
|
68
|
+
let tag = new Tag(name, [], null, []);
|
|
69
|
+
tag.set.push(tag);
|
|
70
|
+
if (parent)
|
|
71
|
+
for (let t of parent.set)
|
|
72
|
+
tag.set.push(t);
|
|
73
|
+
return tag;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
Define a tag _modifier_, which is a function that, given a tag,
|
|
77
|
+
will return a tag that is a subtag of the original. Applying the
|
|
78
|
+
same modifier to a twice tag will return the same value (`m1(t1)
|
|
79
|
+
== m1(t1)`) and applying multiple modifiers will, regardless or
|
|
80
|
+
order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).
|
|
81
|
+
|
|
82
|
+
When multiple modifiers are applied to a given base tag, each
|
|
83
|
+
smaller set of modifiers is registered as a parent, so that for
|
|
84
|
+
example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
|
|
85
|
+
`m1(m3(t1)`, and so on.
|
|
86
|
+
*/
|
|
87
|
+
static defineModifier(name) {
|
|
88
|
+
let mod = new Modifier(name);
|
|
89
|
+
return (tag) => {
|
|
90
|
+
if (tag.modified.indexOf(mod) > -1)
|
|
91
|
+
return tag;
|
|
92
|
+
return Modifier.get(tag.base || tag, tag.modified.concat(mod).sort((a, b) => a.id - b.id));
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
let nextModifierID = 0;
|
|
97
|
+
class Modifier {
|
|
98
|
+
constructor(name) {
|
|
99
|
+
this.name = name;
|
|
100
|
+
this.instances = [];
|
|
101
|
+
this.id = nextModifierID++;
|
|
102
|
+
}
|
|
103
|
+
static get(base, mods) {
|
|
104
|
+
if (!mods.length)
|
|
105
|
+
return base;
|
|
106
|
+
let exists = mods[0].instances.find(t => t.base == base && sameArray(mods, t.modified));
|
|
107
|
+
if (exists)
|
|
108
|
+
return exists;
|
|
109
|
+
let set = [], tag = new Tag(base.name, set, base, mods);
|
|
110
|
+
for (let m of mods)
|
|
111
|
+
m.instances.push(tag);
|
|
112
|
+
let configs = powerSet(mods);
|
|
113
|
+
for (let parent of base.set)
|
|
114
|
+
if (!parent.modified.length)
|
|
115
|
+
for (let config of configs)
|
|
116
|
+
set.push(Modifier.get(parent, config));
|
|
117
|
+
return tag;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function sameArray(a, b) {
|
|
121
|
+
return a.length == b.length && a.every((x, i) => x == b[i]);
|
|
122
|
+
}
|
|
123
|
+
function powerSet(array) {
|
|
124
|
+
let sets = [[]];
|
|
125
|
+
for (let i = 0; i < array.length; i++) {
|
|
126
|
+
for (let j = 0, e = sets.length; j < e; j++) {
|
|
127
|
+
sets.push(sets[j].concat(array[i]));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return sets.sort((a, b) => b.length - a.length);
|
|
131
|
+
}
|
|
132
|
+
new NodeProp({
|
|
133
|
+
combine(a, b) {
|
|
134
|
+
let cur, root, take;
|
|
135
|
+
while (a || b) {
|
|
136
|
+
if (!a || b && a.depth >= b.depth) {
|
|
137
|
+
take = b;
|
|
138
|
+
b = b.next;
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
take = a;
|
|
142
|
+
a = a.next;
|
|
143
|
+
}
|
|
144
|
+
if (cur && cur.mode == take.mode && !take.context && !cur.context)
|
|
145
|
+
continue;
|
|
146
|
+
let copy = new Rule(take.tags, take.mode, take.context);
|
|
147
|
+
if (cur)
|
|
148
|
+
cur.next = copy;
|
|
149
|
+
else
|
|
150
|
+
root = copy;
|
|
151
|
+
cur = copy;
|
|
152
|
+
}
|
|
153
|
+
return root;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
class Rule {
|
|
157
|
+
constructor(tags, mode, context, next) {
|
|
158
|
+
this.tags = tags;
|
|
159
|
+
this.mode = mode;
|
|
160
|
+
this.context = context;
|
|
161
|
+
this.next = next;
|
|
162
|
+
}
|
|
163
|
+
get opaque() { return this.mode == 0 /* Mode.Opaque */; }
|
|
164
|
+
get inherit() { return this.mode == 1 /* Mode.Inherit */; }
|
|
165
|
+
sort(other) {
|
|
166
|
+
if (!other || other.depth < this.depth) {
|
|
167
|
+
this.next = other;
|
|
168
|
+
return this;
|
|
169
|
+
}
|
|
170
|
+
other.next = this.sort(other.next);
|
|
171
|
+
return other;
|
|
172
|
+
}
|
|
173
|
+
get depth() { return this.context ? this.context.length : 0; }
|
|
174
|
+
}
|
|
175
|
+
Rule.empty = new Rule([], 2 /* Mode.Normal */, null);
|
|
176
|
+
/**
|
|
177
|
+
Define a [highlighter](#highlight.Highlighter) from an array of
|
|
178
|
+
tag/class pairs. Classes associated with more specific tags will
|
|
179
|
+
take precedence.
|
|
180
|
+
*/
|
|
181
|
+
function tagHighlighter(tags, options) {
|
|
182
|
+
let map = Object.create(null);
|
|
183
|
+
for (let style of tags) {
|
|
184
|
+
if (!Array.isArray(style.tag))
|
|
185
|
+
map[style.tag.id] = style.class;
|
|
186
|
+
else
|
|
187
|
+
for (let tag of style.tag)
|
|
188
|
+
map[tag.id] = style.class;
|
|
189
|
+
}
|
|
190
|
+
let { scope, all = null } = {};
|
|
191
|
+
return {
|
|
192
|
+
style: (tags) => {
|
|
193
|
+
let cls = all;
|
|
194
|
+
for (let tag of tags) {
|
|
195
|
+
for (let sub of tag.set) {
|
|
196
|
+
let tagClass = map[sub.id];
|
|
197
|
+
if (tagClass) {
|
|
198
|
+
cls = cls ? cls + " " + tagClass : tagClass;
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return cls;
|
|
204
|
+
},
|
|
205
|
+
scope
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
const t = Tag.define;
|
|
209
|
+
const comment = t(), name = t(), typeName = t(name), propertyName = t(name), literal = t(), string = t(literal), number = t(literal), content = t(), heading = t(content), keyword = t(), operator = t(), punctuation = t(), bracket = t(punctuation), meta = t();
|
|
210
|
+
/**
|
|
211
|
+
The default set of highlighting [tags](#highlight.Tag).
|
|
212
|
+
|
|
213
|
+
This collection is heavily biased towards programming languages,
|
|
214
|
+
and necessarily incomplete. A full ontology of syntactic
|
|
215
|
+
constructs would fill a stack of books, and be impractical to
|
|
216
|
+
write themes for. So try to make do with this set. If all else
|
|
217
|
+
fails, [open an
|
|
218
|
+
issue](https://github.com/codemirror/codemirror.next) to propose a
|
|
219
|
+
new tag, or [define](#highlight.Tag^define) a local custom tag for
|
|
220
|
+
your use case.
|
|
221
|
+
|
|
222
|
+
Note that it is not obligatory to always attach the most specific
|
|
223
|
+
tag possible to an element—if your grammar can't easily
|
|
224
|
+
distinguish a certain type of element (such as a local variable),
|
|
225
|
+
it is okay to style it as its more general variant (a variable).
|
|
226
|
+
|
|
227
|
+
For tags that extend some parent tag, the documentation links to
|
|
228
|
+
the parent.
|
|
229
|
+
*/
|
|
230
|
+
const tags = {
|
|
231
|
+
/**
|
|
232
|
+
A comment.
|
|
233
|
+
*/
|
|
234
|
+
comment,
|
|
235
|
+
/**
|
|
236
|
+
A line [comment](#highlight.tags.comment).
|
|
237
|
+
*/
|
|
238
|
+
lineComment: t(comment),
|
|
239
|
+
/**
|
|
240
|
+
A block [comment](#highlight.tags.comment).
|
|
241
|
+
*/
|
|
242
|
+
blockComment: t(comment),
|
|
243
|
+
/**
|
|
244
|
+
A documentation [comment](#highlight.tags.comment).
|
|
245
|
+
*/
|
|
246
|
+
docComment: t(comment),
|
|
247
|
+
/**
|
|
248
|
+
Any kind of identifier.
|
|
249
|
+
*/
|
|
250
|
+
name,
|
|
251
|
+
/**
|
|
252
|
+
The [name](#highlight.tags.name) of a variable.
|
|
253
|
+
*/
|
|
254
|
+
variableName: t(name),
|
|
255
|
+
/**
|
|
256
|
+
A type [name](#highlight.tags.name).
|
|
257
|
+
*/
|
|
258
|
+
typeName: typeName,
|
|
259
|
+
/**
|
|
260
|
+
A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
|
|
261
|
+
*/
|
|
262
|
+
tagName: t(typeName),
|
|
263
|
+
/**
|
|
264
|
+
A property or field [name](#highlight.tags.name).
|
|
265
|
+
*/
|
|
266
|
+
propertyName: propertyName,
|
|
267
|
+
/**
|
|
268
|
+
An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).
|
|
269
|
+
*/
|
|
270
|
+
attributeName: t(propertyName),
|
|
271
|
+
/**
|
|
272
|
+
The [name](#highlight.tags.name) of a class.
|
|
273
|
+
*/
|
|
274
|
+
className: t(name),
|
|
275
|
+
/**
|
|
276
|
+
A label [name](#highlight.tags.name).
|
|
277
|
+
*/
|
|
278
|
+
labelName: t(name),
|
|
279
|
+
/**
|
|
280
|
+
A namespace [name](#highlight.tags.name).
|
|
281
|
+
*/
|
|
282
|
+
namespace: t(name),
|
|
283
|
+
/**
|
|
284
|
+
The [name](#highlight.tags.name) of a macro.
|
|
285
|
+
*/
|
|
286
|
+
macroName: t(name),
|
|
287
|
+
/**
|
|
288
|
+
A literal value.
|
|
289
|
+
*/
|
|
290
|
+
literal,
|
|
291
|
+
/**
|
|
292
|
+
A string [literal](#highlight.tags.literal).
|
|
293
|
+
*/
|
|
294
|
+
string,
|
|
295
|
+
/**
|
|
296
|
+
A documentation [string](#highlight.tags.string).
|
|
297
|
+
*/
|
|
298
|
+
docString: t(string),
|
|
299
|
+
/**
|
|
300
|
+
A character literal (subtag of [string](#highlight.tags.string)).
|
|
301
|
+
*/
|
|
302
|
+
character: t(string),
|
|
303
|
+
/**
|
|
304
|
+
An attribute value (subtag of [string](#highlight.tags.string)).
|
|
305
|
+
*/
|
|
306
|
+
attributeValue: t(string),
|
|
307
|
+
/**
|
|
308
|
+
A number [literal](#highlight.tags.literal).
|
|
309
|
+
*/
|
|
310
|
+
number,
|
|
311
|
+
/**
|
|
312
|
+
An integer [number](#highlight.tags.number) literal.
|
|
313
|
+
*/
|
|
314
|
+
integer: t(number),
|
|
315
|
+
/**
|
|
316
|
+
A floating-point [number](#highlight.tags.number) literal.
|
|
317
|
+
*/
|
|
318
|
+
float: t(number),
|
|
319
|
+
/**
|
|
320
|
+
A boolean [literal](#highlight.tags.literal).
|
|
321
|
+
*/
|
|
322
|
+
bool: t(literal),
|
|
323
|
+
/**
|
|
324
|
+
Regular expression [literal](#highlight.tags.literal).
|
|
325
|
+
*/
|
|
326
|
+
regexp: t(literal),
|
|
327
|
+
/**
|
|
328
|
+
An escape [literal](#highlight.tags.literal), for example a
|
|
329
|
+
backslash escape in a string.
|
|
330
|
+
*/
|
|
331
|
+
escape: t(literal),
|
|
332
|
+
/**
|
|
333
|
+
A color [literal](#highlight.tags.literal).
|
|
334
|
+
*/
|
|
335
|
+
color: t(literal),
|
|
336
|
+
/**
|
|
337
|
+
A URL [literal](#highlight.tags.literal).
|
|
338
|
+
*/
|
|
339
|
+
url: t(literal),
|
|
340
|
+
/**
|
|
341
|
+
A language keyword.
|
|
342
|
+
*/
|
|
343
|
+
keyword,
|
|
344
|
+
/**
|
|
345
|
+
The [keyword](#highlight.tags.keyword) for the self or this
|
|
346
|
+
object.
|
|
347
|
+
*/
|
|
348
|
+
self: t(keyword),
|
|
349
|
+
/**
|
|
350
|
+
The [keyword](#highlight.tags.keyword) for null.
|
|
351
|
+
*/
|
|
352
|
+
null: t(keyword),
|
|
353
|
+
/**
|
|
354
|
+
A [keyword](#highlight.tags.keyword) denoting some atomic value.
|
|
355
|
+
*/
|
|
356
|
+
atom: t(keyword),
|
|
357
|
+
/**
|
|
358
|
+
A [keyword](#highlight.tags.keyword) that represents a unit.
|
|
359
|
+
*/
|
|
360
|
+
unit: t(keyword),
|
|
361
|
+
/**
|
|
362
|
+
A modifier [keyword](#highlight.tags.keyword).
|
|
363
|
+
*/
|
|
364
|
+
modifier: t(keyword),
|
|
365
|
+
/**
|
|
366
|
+
A [keyword](#highlight.tags.keyword) that acts as an operator.
|
|
367
|
+
*/
|
|
368
|
+
operatorKeyword: t(keyword),
|
|
369
|
+
/**
|
|
370
|
+
A control-flow related [keyword](#highlight.tags.keyword).
|
|
371
|
+
*/
|
|
372
|
+
controlKeyword: t(keyword),
|
|
373
|
+
/**
|
|
374
|
+
A [keyword](#highlight.tags.keyword) that defines something.
|
|
375
|
+
*/
|
|
376
|
+
definitionKeyword: t(keyword),
|
|
377
|
+
/**
|
|
378
|
+
A [keyword](#highlight.tags.keyword) related to defining or
|
|
379
|
+
interfacing with modules.
|
|
380
|
+
*/
|
|
381
|
+
moduleKeyword: t(keyword),
|
|
382
|
+
/**
|
|
383
|
+
An operator.
|
|
384
|
+
*/
|
|
385
|
+
operator,
|
|
386
|
+
/**
|
|
387
|
+
An [operator](#highlight.tags.operator) that dereferences something.
|
|
388
|
+
*/
|
|
389
|
+
derefOperator: t(operator),
|
|
390
|
+
/**
|
|
391
|
+
Arithmetic-related [operator](#highlight.tags.operator).
|
|
392
|
+
*/
|
|
393
|
+
arithmeticOperator: t(operator),
|
|
394
|
+
/**
|
|
395
|
+
Logical [operator](#highlight.tags.operator).
|
|
396
|
+
*/
|
|
397
|
+
logicOperator: t(operator),
|
|
398
|
+
/**
|
|
399
|
+
Bit [operator](#highlight.tags.operator).
|
|
400
|
+
*/
|
|
401
|
+
bitwiseOperator: t(operator),
|
|
402
|
+
/**
|
|
403
|
+
Comparison [operator](#highlight.tags.operator).
|
|
404
|
+
*/
|
|
405
|
+
compareOperator: t(operator),
|
|
406
|
+
/**
|
|
407
|
+
[Operator](#highlight.tags.operator) that updates its operand.
|
|
408
|
+
*/
|
|
409
|
+
updateOperator: t(operator),
|
|
410
|
+
/**
|
|
411
|
+
[Operator](#highlight.tags.operator) that defines something.
|
|
412
|
+
*/
|
|
413
|
+
definitionOperator: t(operator),
|
|
414
|
+
/**
|
|
415
|
+
Type-related [operator](#highlight.tags.operator).
|
|
416
|
+
*/
|
|
417
|
+
typeOperator: t(operator),
|
|
418
|
+
/**
|
|
419
|
+
Control-flow [operator](#highlight.tags.operator).
|
|
420
|
+
*/
|
|
421
|
+
controlOperator: t(operator),
|
|
422
|
+
/**
|
|
423
|
+
Program or markup punctuation.
|
|
424
|
+
*/
|
|
425
|
+
punctuation,
|
|
426
|
+
/**
|
|
427
|
+
[Punctuation](#highlight.tags.punctuation) that separates
|
|
428
|
+
things.
|
|
429
|
+
*/
|
|
430
|
+
separator: t(punctuation),
|
|
431
|
+
/**
|
|
432
|
+
Bracket-style [punctuation](#highlight.tags.punctuation).
|
|
433
|
+
*/
|
|
434
|
+
bracket,
|
|
435
|
+
/**
|
|
436
|
+
Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
|
|
437
|
+
tokens).
|
|
438
|
+
*/
|
|
439
|
+
angleBracket: t(bracket),
|
|
440
|
+
/**
|
|
441
|
+
Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
|
|
442
|
+
tokens).
|
|
443
|
+
*/
|
|
444
|
+
squareBracket: t(bracket),
|
|
445
|
+
/**
|
|
446
|
+
Parentheses (usually `(` and `)` tokens). Subtag of
|
|
447
|
+
[bracket](#highlight.tags.bracket).
|
|
448
|
+
*/
|
|
449
|
+
paren: t(bracket),
|
|
450
|
+
/**
|
|
451
|
+
Braces (usually `{` and `}` tokens). Subtag of
|
|
452
|
+
[bracket](#highlight.tags.bracket).
|
|
453
|
+
*/
|
|
454
|
+
brace: t(bracket),
|
|
455
|
+
/**
|
|
456
|
+
Content, for example plain text in XML or markup documents.
|
|
457
|
+
*/
|
|
458
|
+
content,
|
|
459
|
+
/**
|
|
460
|
+
[Content](#highlight.tags.content) that represents a heading.
|
|
461
|
+
*/
|
|
462
|
+
heading,
|
|
463
|
+
/**
|
|
464
|
+
A level 1 [heading](#highlight.tags.heading).
|
|
465
|
+
*/
|
|
466
|
+
heading1: t(heading),
|
|
467
|
+
/**
|
|
468
|
+
A level 2 [heading](#highlight.tags.heading).
|
|
469
|
+
*/
|
|
470
|
+
heading2: t(heading),
|
|
471
|
+
/**
|
|
472
|
+
A level 3 [heading](#highlight.tags.heading).
|
|
473
|
+
*/
|
|
474
|
+
heading3: t(heading),
|
|
475
|
+
/**
|
|
476
|
+
A level 4 [heading](#highlight.tags.heading).
|
|
477
|
+
*/
|
|
478
|
+
heading4: t(heading),
|
|
479
|
+
/**
|
|
480
|
+
A level 5 [heading](#highlight.tags.heading).
|
|
481
|
+
*/
|
|
482
|
+
heading5: t(heading),
|
|
483
|
+
/**
|
|
484
|
+
A level 6 [heading](#highlight.tags.heading).
|
|
485
|
+
*/
|
|
486
|
+
heading6: t(heading),
|
|
487
|
+
/**
|
|
488
|
+
A prose [content](#highlight.tags.content) separator (such as a horizontal rule).
|
|
489
|
+
*/
|
|
490
|
+
contentSeparator: t(content),
|
|
491
|
+
/**
|
|
492
|
+
[Content](#highlight.tags.content) that represents a list.
|
|
493
|
+
*/
|
|
494
|
+
list: t(content),
|
|
495
|
+
/**
|
|
496
|
+
[Content](#highlight.tags.content) that represents a quote.
|
|
497
|
+
*/
|
|
498
|
+
quote: t(content),
|
|
499
|
+
/**
|
|
500
|
+
[Content](#highlight.tags.content) that is emphasized.
|
|
501
|
+
*/
|
|
502
|
+
emphasis: t(content),
|
|
503
|
+
/**
|
|
504
|
+
[Content](#highlight.tags.content) that is styled strong.
|
|
505
|
+
*/
|
|
506
|
+
strong: t(content),
|
|
507
|
+
/**
|
|
508
|
+
[Content](#highlight.tags.content) that is part of a link.
|
|
509
|
+
*/
|
|
510
|
+
link: t(content),
|
|
511
|
+
/**
|
|
512
|
+
[Content](#highlight.tags.content) that is styled as code or
|
|
513
|
+
monospace.
|
|
514
|
+
*/
|
|
515
|
+
monospace: t(content),
|
|
516
|
+
/**
|
|
517
|
+
[Content](#highlight.tags.content) that has a strike-through
|
|
518
|
+
style.
|
|
519
|
+
*/
|
|
520
|
+
strikethrough: t(content),
|
|
521
|
+
/**
|
|
522
|
+
Inserted text in a change-tracking format.
|
|
523
|
+
*/
|
|
524
|
+
inserted: t(),
|
|
525
|
+
/**
|
|
526
|
+
Deleted text.
|
|
527
|
+
*/
|
|
528
|
+
deleted: t(),
|
|
529
|
+
/**
|
|
530
|
+
Changed text.
|
|
531
|
+
*/
|
|
532
|
+
changed: t(),
|
|
533
|
+
/**
|
|
534
|
+
An invalid or unsyntactic element.
|
|
535
|
+
*/
|
|
536
|
+
invalid: t(),
|
|
537
|
+
/**
|
|
538
|
+
Metadata or meta-instruction.
|
|
539
|
+
*/
|
|
540
|
+
meta,
|
|
541
|
+
/**
|
|
542
|
+
[Metadata](#highlight.tags.meta) that applies to the entire
|
|
543
|
+
document.
|
|
544
|
+
*/
|
|
545
|
+
documentMeta: t(meta),
|
|
546
|
+
/**
|
|
547
|
+
[Metadata](#highlight.tags.meta) that annotates or adds
|
|
548
|
+
attributes to a given syntactic element.
|
|
549
|
+
*/
|
|
550
|
+
annotation: t(meta),
|
|
551
|
+
/**
|
|
552
|
+
Processing instruction or preprocessor directive. Subtag of
|
|
553
|
+
[meta](#highlight.tags.meta).
|
|
554
|
+
*/
|
|
555
|
+
processingInstruction: t(meta),
|
|
556
|
+
/**
|
|
557
|
+
[Modifier](#highlight.Tag^defineModifier) that indicates that a
|
|
558
|
+
given element is being defined. Expected to be used with the
|
|
559
|
+
various [name](#highlight.tags.name) tags.
|
|
560
|
+
*/
|
|
561
|
+
definition: Tag.defineModifier("definition"),
|
|
562
|
+
/**
|
|
563
|
+
[Modifier](#highlight.Tag^defineModifier) that indicates that
|
|
564
|
+
something is constant. Mostly expected to be used with
|
|
565
|
+
[variable names](#highlight.tags.variableName).
|
|
566
|
+
*/
|
|
567
|
+
constant: Tag.defineModifier("constant"),
|
|
568
|
+
/**
|
|
569
|
+
[Modifier](#highlight.Tag^defineModifier) used to indicate that
|
|
570
|
+
a [variable](#highlight.tags.variableName) or [property
|
|
571
|
+
name](#highlight.tags.propertyName) is being called or defined
|
|
572
|
+
as a function.
|
|
573
|
+
*/
|
|
574
|
+
function: Tag.defineModifier("function"),
|
|
575
|
+
/**
|
|
576
|
+
[Modifier](#highlight.Tag^defineModifier) that can be applied to
|
|
577
|
+
[names](#highlight.tags.name) to indicate that they belong to
|
|
578
|
+
the language's standard environment.
|
|
579
|
+
*/
|
|
580
|
+
standard: Tag.defineModifier("standard"),
|
|
581
|
+
/**
|
|
582
|
+
[Modifier](#highlight.Tag^defineModifier) that indicates a given
|
|
583
|
+
[names](#highlight.tags.name) is local to some scope.
|
|
584
|
+
*/
|
|
585
|
+
local: Tag.defineModifier("local"),
|
|
586
|
+
/**
|
|
587
|
+
A generic variant [modifier](#highlight.Tag^defineModifier) that
|
|
588
|
+
can be used to tag language-specific alternative variants of
|
|
589
|
+
some common tag. It is recommended for themes to define special
|
|
590
|
+
forms of at least the [string](#highlight.tags.string) and
|
|
591
|
+
[variable name](#highlight.tags.variableName) tags, since those
|
|
592
|
+
come up a lot.
|
|
593
|
+
*/
|
|
594
|
+
special: Tag.defineModifier("special")
|
|
595
|
+
};
|
|
596
|
+
for (let name in tags) {
|
|
597
|
+
let val = tags[name];
|
|
598
|
+
if (val instanceof Tag)
|
|
599
|
+
val.name = name;
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
This is a highlighter that adds stable, predictable classes to
|
|
603
|
+
tokens, for styling with external CSS.
|
|
604
|
+
|
|
605
|
+
The following tags are mapped to their name prefixed with `"tok-"`
|
|
606
|
+
(for example `"tok-comment"`):
|
|
607
|
+
|
|
608
|
+
* [`link`](#highlight.tags.link)
|
|
609
|
+
* [`heading`](#highlight.tags.heading)
|
|
610
|
+
* [`emphasis`](#highlight.tags.emphasis)
|
|
611
|
+
* [`strong`](#highlight.tags.strong)
|
|
612
|
+
* [`keyword`](#highlight.tags.keyword)
|
|
613
|
+
* [`atom`](#highlight.tags.atom)
|
|
614
|
+
* [`bool`](#highlight.tags.bool)
|
|
615
|
+
* [`url`](#highlight.tags.url)
|
|
616
|
+
* [`labelName`](#highlight.tags.labelName)
|
|
617
|
+
* [`inserted`](#highlight.tags.inserted)
|
|
618
|
+
* [`deleted`](#highlight.tags.deleted)
|
|
619
|
+
* [`literal`](#highlight.tags.literal)
|
|
620
|
+
* [`string`](#highlight.tags.string)
|
|
621
|
+
* [`number`](#highlight.tags.number)
|
|
622
|
+
* [`variableName`](#highlight.tags.variableName)
|
|
623
|
+
* [`typeName`](#highlight.tags.typeName)
|
|
624
|
+
* [`namespace`](#highlight.tags.namespace)
|
|
625
|
+
* [`className`](#highlight.tags.className)
|
|
626
|
+
* [`macroName`](#highlight.tags.macroName)
|
|
627
|
+
* [`propertyName`](#highlight.tags.propertyName)
|
|
628
|
+
* [`operator`](#highlight.tags.operator)
|
|
629
|
+
* [`comment`](#highlight.tags.comment)
|
|
630
|
+
* [`meta`](#highlight.tags.meta)
|
|
631
|
+
* [`punctuation`](#highlight.tags.punctuation)
|
|
632
|
+
* [`invalid`](#highlight.tags.invalid)
|
|
633
|
+
|
|
634
|
+
In addition, these mappings are provided:
|
|
635
|
+
|
|
636
|
+
* [`regexp`](#highlight.tags.regexp),
|
|
637
|
+
[`escape`](#highlight.tags.escape), and
|
|
638
|
+
[`special`](#highlight.tags.special)[`(string)`](#highlight.tags.string)
|
|
639
|
+
are mapped to `"tok-string2"`
|
|
640
|
+
* [`special`](#highlight.tags.special)[`(variableName)`](#highlight.tags.variableName)
|
|
641
|
+
to `"tok-variableName2"`
|
|
642
|
+
* [`local`](#highlight.tags.local)[`(variableName)`](#highlight.tags.variableName)
|
|
643
|
+
to `"tok-variableName tok-local"`
|
|
644
|
+
* [`definition`](#highlight.tags.definition)[`(variableName)`](#highlight.tags.variableName)
|
|
645
|
+
to `"tok-variableName tok-definition"`
|
|
646
|
+
* [`definition`](#highlight.tags.definition)[`(propertyName)`](#highlight.tags.propertyName)
|
|
647
|
+
to `"tok-propertyName tok-definition"`
|
|
648
|
+
*/
|
|
649
|
+
tagHighlighter([
|
|
650
|
+
{ tag: tags.link, class: "tok-link" },
|
|
651
|
+
{ tag: tags.heading, class: "tok-heading" },
|
|
652
|
+
{ tag: tags.emphasis, class: "tok-emphasis" },
|
|
653
|
+
{ tag: tags.strong, class: "tok-strong" },
|
|
654
|
+
{ tag: tags.keyword, class: "tok-keyword" },
|
|
655
|
+
{ tag: tags.atom, class: "tok-atom" },
|
|
656
|
+
{ tag: tags.bool, class: "tok-bool" },
|
|
657
|
+
{ tag: tags.url, class: "tok-url" },
|
|
658
|
+
{ tag: tags.labelName, class: "tok-labelName" },
|
|
659
|
+
{ tag: tags.inserted, class: "tok-inserted" },
|
|
660
|
+
{ tag: tags.deleted, class: "tok-deleted" },
|
|
661
|
+
{ tag: tags.literal, class: "tok-literal" },
|
|
662
|
+
{ tag: tags.string, class: "tok-string" },
|
|
663
|
+
{ tag: tags.number, class: "tok-number" },
|
|
664
|
+
{ tag: [tags.regexp, tags.escape, tags.special(tags.string)], class: "tok-string2" },
|
|
665
|
+
{ tag: tags.variableName, class: "tok-variableName" },
|
|
666
|
+
{ tag: tags.local(tags.variableName), class: "tok-variableName tok-local" },
|
|
667
|
+
{ tag: tags.definition(tags.variableName), class: "tok-variableName tok-definition" },
|
|
668
|
+
{ tag: tags.special(tags.variableName), class: "tok-variableName2" },
|
|
669
|
+
{ tag: tags.definition(tags.propertyName), class: "tok-propertyName tok-definition" },
|
|
670
|
+
{ tag: tags.typeName, class: "tok-typeName" },
|
|
671
|
+
{ tag: tags.namespace, class: "tok-namespace" },
|
|
672
|
+
{ tag: tags.className, class: "tok-className" },
|
|
673
|
+
{ tag: tags.macroName, class: "tok-macroName" },
|
|
674
|
+
{ tag: tags.propertyName, class: "tok-propertyName" },
|
|
675
|
+
{ tag: tags.operator, class: "tok-operator" },
|
|
676
|
+
{ tag: tags.comment, class: "tok-comment" },
|
|
677
|
+
{ tag: tags.meta, class: "tok-meta" },
|
|
678
|
+
{ tag: tags.invalid, class: "tok-invalid" },
|
|
679
|
+
{ tag: tags.punctuation, class: "tok-punctuation" }
|
|
680
|
+
]);
|
|
681
|
+
|
|
682
|
+
export { Tag, tagHighlighter, tags };
|