@uninterface/backend-element-plus 0.0.0-stage → 2.14.0-alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +61 -2
- package/THIRD-PARTY-NOTICES.md +37 -0
- package/capabilities.json +168 -0
- package/docs/README.md +47 -0
- package/docs/collections.md +211 -0
- package/docs/contract-adaptations.md +111 -0
- package/docs/customization.md +131 -0
- package/docs/examples/NativeReference.vue +147 -0
- package/docs/exports.md +32 -0
- package/docs/floating-panels.md +53 -0
- package/docs/font-licenses/inter.txt +93 -0
- package/docs/font-licenses/noto-sans-sc.txt +93 -0
- package/docs/font-licenses/noto-sans-tc.txt +93 -0
- package/docs/icon-licenses/Element-Plus.txt +21 -0
- package/docs/icon-licenses/SOURCES.md +47 -0
- package/docs/modals.md +29 -0
- package/docs/native-html.md +21 -0
- package/docs/navigation.md +31 -0
- package/docs/package-build.md +20 -0
- package/docs/presentation.md +291 -0
- package/docs/progress.md +9 -0
- package/docs/reviewed-components.md +76 -0
- package/docs/segmented-selection.md +22 -0
- package/docs/selection-feedback-panels.md +79 -0
- package/docs/setup.md +157 -0
- package/docs/strategies.md +89 -0
- package/docs/table-columns.md +37 -0
- package/docs/testing.md +29 -0
- package/docs/typography.md +93 -0
- package/document.css +102 -0
- package/esm/_virtual/_plugin-vue_export-helper.js +10 -0
- package/esm/capabilities.json.js +14 -0
- package/esm/package.json.js +14 -0
- package/esm/src/ChoiceGroup.css +23 -0
- package/esm/src/ChoiceGroup.vue.js +8 -0
- package/esm/src/ChoiceGroup2.vue.js +221 -0
- package/esm/src/CollectionCard.vue.js +4 -0
- package/esm/src/CollectionCard2.vue.js +199 -0
- package/esm/src/CollectionFilterEditor.vue.js +4 -0
- package/esm/src/CollectionFilterEditor2.vue.js +31 -0
- package/esm/src/CollectionHeaderFlow.vue.js +4 -0
- package/esm/src/CollectionHeaderFlow2.vue.js +33 -0
- package/esm/src/CollectionHeaderPart.vue.js +4 -0
- package/esm/src/CollectionHeaderPart2.vue.js +40 -0
- package/esm/src/CollectionQueryBadge.vue.js +4 -0
- package/esm/src/CollectionQueryBadge2.vue.js +86 -0
- package/esm/src/CollectionSortLayout.vue.js +4 -0
- package/esm/src/CollectionSortLayout2.vue.js +23 -0
- package/esm/src/CollectionStatus.vue.js +4 -0
- package/esm/src/CollectionStatus2.vue.js +135 -0
- package/esm/src/CollectionSummary.vue.js +4 -0
- package/esm/src/CollectionSummary2.vue.js +70 -0
- package/esm/src/CollectionTableActions.vue.js +13 -0
- package/esm/src/DrawerDepth.vue.js +4 -0
- package/esm/src/DrawerDepth2.vue.js +28 -0
- package/esm/src/DrawerDock.vue.js +4 -0
- package/esm/src/DrawerDock2.vue.js +26 -0
- package/esm/src/EntryBranch.vue.js +4 -0
- package/esm/src/EntryBranch2.vue.js +357 -0
- package/esm/src/EntryContent.css +10 -0
- package/esm/src/EntryContent.vue.js +8 -0
- package/esm/src/EntryContent2.vue.js +79 -0
- package/esm/src/EntryPopup.vue.js +4 -0
- package/esm/src/EntryPopup2.vue.js +164 -0
- package/esm/src/FeedbackItem.vue.js +4 -0
- package/esm/src/FeedbackItem2.vue.js +145 -0
- package/esm/src/FeedbackViewport.vue.js +4 -0
- package/esm/src/FeedbackViewport2.vue.js +42 -0
- package/esm/src/FieldError.vue.js +4 -0
- package/esm/src/FieldError2.vue.js +30 -0
- package/esm/src/FieldFailureTooltip.vue.js +4 -0
- package/esm/src/FieldFailureTooltip2.vue.js +96 -0
- package/esm/src/FileTypeIcon.vue.js +4 -0
- package/esm/src/FileTypeIcon2.vue.js +32 -0
- package/esm/src/FooterActions.vue.js +16 -0
- package/esm/src/MenuBridge.vue.js +4 -0
- package/esm/src/MenuBridge2.vue.js +68 -0
- package/esm/src/NativeMenu.vue.js +4 -0
- package/esm/src/NativeMenu2.vue.js +90 -0
- package/esm/src/OverlaySurface.vue.js +4 -0
- package/esm/src/OverlaySurface2.vue.js +195 -0
- package/esm/src/TableAddRow.vue.js +4 -0
- package/esm/src/TableAddRow2.vue.js +66 -0
- package/esm/src/TableFilterButton.vue.js +4 -0
- package/esm/src/TableFilterButton2.vue.js +35 -0
- package/esm/src/TemporalAction.vue.js +4 -0
- package/esm/src/TemporalAction2.vue.js +46 -0
- package/esm/src/TemporalEditor.vue.js +4 -0
- package/esm/src/TemporalEditor2.vue.js +113 -0
- package/esm/src/TemporalInput.vue.js +4 -0
- package/esm/src/TemporalInput2.vue.js +269 -0
- package/esm/src/TemporalMode.vue.js +4 -0
- package/esm/src/TemporalMode2.vue.js +149 -0
- package/esm/src/TemporalPicker.vue.js +4 -0
- package/esm/src/TemporalPicker2.vue.js +155 -0
- package/esm/src/TemporalRangeIcon.vue.js +4 -0
- package/esm/src/TemporalRangeIcon2.vue.js +67 -0
- package/esm/src/TemporalRangePicker.vue.js +4 -0
- package/esm/src/TemporalRangePicker2.vue.js +199 -0
- package/esm/src/TemporalTimePanel.vue.js +4 -0
- package/esm/src/TemporalTimePanel2.vue.js +53 -0
- package/esm/src/UiApp.vue.js +4 -0
- package/esm/src/UiApp2.vue.js +57 -0
- package/esm/src/UiBadge.vue.js +4 -0
- package/esm/src/UiBadge2.vue.js +44 -0
- package/esm/src/UiBreadcrumbs.css +7 -0
- package/esm/src/UiBreadcrumbs.vue.js +8 -0
- package/esm/src/UiBreadcrumbs2.vue.js +110 -0
- package/esm/src/UiButton.vue.js +4 -0
- package/esm/src/UiButton2.vue.js +167 -0
- package/esm/src/UiCard.vue.js +4 -0
- package/esm/src/UiCard2.vue.js +102 -0
- package/esm/src/UiCheckbox.vue.js +4 -0
- package/esm/src/UiCheckbox2.vue.js +105 -0
- package/esm/src/UiCheckboxGroup.vue.js +4 -0
- package/esm/src/UiCheckboxGroup2.vue.js +43 -0
- package/esm/src/UiCollapsible.css +7 -0
- package/esm/src/UiCollapsible.vue.js +8 -0
- package/esm/src/UiCollapsible2.vue.js +59 -0
- package/esm/src/UiCollectionFooter.vue.js +4 -0
- package/esm/src/UiCollectionFooter2.vue.js +64 -0
- package/esm/src/UiCollectionHeader.vue.js +4 -0
- package/esm/src/UiCollectionHeader2.vue.js +24 -0
- package/esm/src/UiCollectionView.vue.js +4 -0
- package/esm/src/UiCollectionView2.vue.js +239 -0
- package/esm/src/UiContent.vue.js +4 -0
- package/esm/src/UiContent2.vue.js +35 -0
- package/esm/src/UiDateInput.vue.js +4 -0
- package/esm/src/UiDateInput2.vue.js +46 -0
- package/esm/src/UiDateTimeInput.vue.js +4 -0
- package/esm/src/UiDateTimeInput2.vue.js +46 -0
- package/esm/src/UiDrawer.vue.js +4 -0
- package/esm/src/UiDrawer2.vue.js +98 -0
- package/esm/src/UiDrawerLayout.vue.js +4 -0
- package/esm/src/UiDrawerLayout2.vue.js +63 -0
- package/esm/src/UiEmpty.vue.js +4 -0
- package/esm/src/UiEmpty2.vue.js +51 -0
- package/esm/src/UiField.vue.js +4 -0
- package/esm/src/UiField2.vue.js +167 -0
- package/esm/src/UiFileCollection.vue.js +4 -0
- package/esm/src/UiFileCollection2.vue.js +54 -0
- package/esm/src/UiFileInput.vue.js +4 -0
- package/esm/src/UiFileInput2.vue.js +138 -0
- package/esm/src/UiFilePreview.vue.js +4 -0
- package/esm/src/UiFilePreview2.vue.js +104 -0
- package/esm/src/UiFloating.vue.js +4 -0
- package/esm/src/UiFloating2.vue.js +108 -0
- package/esm/src/UiForm.vue.js +4 -0
- package/esm/src/UiForm2.vue.js +47 -0
- package/esm/src/UiIcon.css +7 -0
- package/esm/src/UiIcon.vue.js +8 -0
- package/esm/src/UiIcon2.vue.js +27 -0
- package/esm/src/UiImagePreview.vue.js +4 -0
- package/esm/src/UiImagePreview2.vue.js +92 -0
- package/esm/src/UiInputFrame.vue.js +4 -0
- package/esm/src/UiInputFrame2.vue.js +62 -0
- package/esm/src/UiInputFrameSpacer.vue.js +4 -0
- package/esm/src/UiInputFrameSpacer2.vue.js +20 -0
- package/esm/src/UiKeyValueItem.vue.js +4 -0
- package/esm/src/UiKeyValueItem2.vue.js +29 -0
- package/esm/src/UiKeyValueList.vue.js +4 -0
- package/esm/src/UiKeyValueList2.vue.js +17 -0
- package/esm/src/UiLayout.vue.js +4 -0
- package/esm/src/UiLayout2.vue.js +156 -0
- package/esm/src/UiLink.vue.js +4 -0
- package/esm/src/UiLink2.vue.js +43 -0
- package/esm/src/UiList.vue.js +4 -0
- package/esm/src/UiList2.vue.js +247 -0
- package/esm/src/UiLoadingIndicator.vue.js +4 -0
- package/esm/src/UiLoadingIndicator2.vue.js +53 -0
- package/esm/src/UiLoadingRegion.vue.js +4 -0
- package/esm/src/UiLoadingRegion2.vue.js +100 -0
- package/esm/src/UiMenu.vue.js +4 -0
- package/esm/src/UiMenu2.vue.js +70 -0
- package/esm/src/UiModal.vue.js +4 -0
- package/esm/src/UiModal2.vue.js +145 -0
- package/esm/src/UiMultiSelect.vue.js +4 -0
- package/esm/src/UiMultiSelect2.vue.js +224 -0
- package/esm/src/UiNavMenu.vue.js +4 -0
- package/esm/src/UiNavMenu2.vue.js +86 -0
- package/esm/src/UiNavbar.vue.js +4 -0
- package/esm/src/UiNavbar2.vue.js +37 -0
- package/esm/src/UiNotice.vue.js +4 -0
- package/esm/src/UiNotice2.vue.js +186 -0
- package/esm/src/UiPaginator.vue.js +4 -0
- package/esm/src/UiPaginator2.vue.js +260 -0
- package/esm/src/UiPaginatorJumper.vue.js +4 -0
- package/esm/src/UiPaginatorJumper2.vue.js +90 -0
- package/esm/src/UiPaginatorSizeSelect.vue.js +4 -0
- package/esm/src/UiPaginatorSizeSelect2.vue.js +60 -0
- package/esm/src/UiPopover.vue.js +4 -0
- package/esm/src/UiPopover2.vue.js +93 -0
- package/esm/src/UiPreviewRegion.vue.js +4 -0
- package/esm/src/UiPreviewRegion2.vue.js +62 -0
- package/esm/src/UiProgressBar.vue.js +4 -0
- package/esm/src/UiProgressBar2.vue.js +44 -0
- package/esm/src/UiRadioGroup.vue.js +4 -0
- package/esm/src/UiRadioGroup2.vue.js +43 -0
- package/esm/src/UiRegionLayout.vue.js +4 -0
- package/esm/src/UiRegionLayout2.vue.js +106 -0
- package/esm/src/UiSegmentedSelect.css +72 -0
- package/esm/src/UiSegmentedSelect.vue.js +8 -0
- package/esm/src/UiSegmentedSelect2.vue.js +190 -0
- package/esm/src/UiSelect.vue.js +4 -0
- package/esm/src/UiSelect2.vue.js +209 -0
- package/esm/src/UiSuggestions.vue.js +4 -0
- package/esm/src/UiSuggestions2.vue.js +151 -0
- package/esm/src/UiSwitch.vue.js +4 -0
- package/esm/src/UiSwitch2.vue.js +108 -0
- package/esm/src/UiTabPanel.vue.js +4 -0
- package/esm/src/UiTabPanel2.vue.js +40 -0
- package/esm/src/UiTable.vue.js +4 -0
- package/esm/src/UiTable2.vue.js +740 -0
- package/esm/src/UiTabs.vue.js +4 -0
- package/esm/src/UiTabs2.vue.js +85 -0
- package/esm/src/UiTextInput.vue.js +4 -0
- package/esm/src/UiTextInput2.vue.js +108 -0
- package/esm/src/UiTimeInput.vue.js +4 -0
- package/esm/src/UiTimeInput2.vue.js +46 -0
- package/esm/src/UiTooltip.vue.js +4 -0
- package/esm/src/UiTooltip2.vue.js +72 -0
- package/esm/src/UiUploadProgress.vue.js +4 -0
- package/esm/src/UiUploadProgress2.vue.js +134 -0
- package/esm/src/UiUploadRegion.vue.js +4 -0
- package/esm/src/UiUploadRegion2.vue.js +230 -0
- package/esm/src/checkableDescription.js +104 -0
- package/esm/src/controlSize.js +29 -0
- package/esm/src/fieldPresentation.js +50 -0
- package/esm/src/focus.js +6 -0
- package/esm/src/formPresentation.js +6 -0
- package/esm/src/icons/external-link.vue.js +32 -0
- package/esm/src/icons/globe.vue.js +59 -0
- package/esm/src/icons/index.js +67 -0
- package/esm/src/icons/more-vertical.vue.js +13 -0
- package/esm/src/icons/more-vertical2.vue.js +4 -0
- package/esm/src/index.js +18 -0
- package/esm/src/integration.js +45 -0
- package/esm/src/layout.js +13 -0
- package/esm/src/menuPresentation.js +229 -0
- package/esm/src/navigationDropdownHeight.js +43 -0
- package/esm/src/selectEscape.js +11 -0
- package/esm/src/zOrder.js +17 -0
- package/esm/testing/browser-control-parts.js +25 -0
- package/esm/testing/dom.js +48 -0
- package/esm/testing/index.js +120 -0
- package/esm/testing/presentation-mapping.js +45 -0
- package/esm/testing/presentation-parts.js +49 -0
- package/font-bundled.css +6 -0
- package/font-family.css +23 -0
- package/font.css +6 -0
- package/hooks/vite.d.mts +3 -0
- package/hooks/vite.mjs +178 -0
- package/native-content.css +52 -0
- package/package.json +79 -4
- package/style.css +3546 -0
- package/types/src/ChoiceGroup.vue.d.ts +15 -0
- package/types/src/CollectionCard.vue.d.ts +42 -0
- package/types/src/CollectionFilterEditor.vue.d.ts +16 -0
- package/types/src/CollectionHeaderFlow.vue.d.ts +17 -0
- package/types/src/CollectionHeaderPart.vue.d.ts +24 -0
- package/types/src/CollectionQueryBadge.vue.d.ts +26 -0
- package/types/src/CollectionSortLayout.vue.d.ts +17 -0
- package/types/src/CollectionStatus.vue.d.ts +28 -0
- package/types/src/CollectionSummary.vue.d.ts +22 -0
- package/types/src/CollectionTableActions.vue.d.ts +13 -0
- package/types/src/DrawerDepth.vue.d.ts +7 -0
- package/types/src/DrawerDock.vue.d.ts +17 -0
- package/types/src/EntryBranch.vue.d.ts +31 -0
- package/types/src/EntryContent.vue.d.ts +35 -0
- package/types/src/EntryPopup.vue.d.ts +24 -0
- package/types/src/FeedbackItem.vue.d.ts +16 -0
- package/types/src/FeedbackViewport.vue.d.ts +19 -0
- package/types/src/FieldError.vue.d.ts +8 -0
- package/types/src/FieldFailureTooltip.vue.d.ts +17 -0
- package/types/src/FileTypeIcon.vue.d.ts +6 -0
- package/types/src/FooterActions.vue.d.ts +13 -0
- package/types/src/MenuBridge.vue.d.ts +13 -0
- package/types/src/NativeMenu.vue.d.ts +44 -0
- package/types/src/OverlaySurface.vue.d.ts +38 -0
- package/types/src/TableAddRow.vue.d.ts +18 -0
- package/types/src/TableFilterButton.vue.d.ts +7 -0
- package/types/src/TemporalAction.vue.d.ts +13 -0
- package/types/src/TemporalEditor.vue.d.ts +12 -0
- package/types/src/TemporalInput.vue.d.ts +9 -0
- package/types/src/TemporalMode.vue.d.ts +20 -0
- package/types/src/TemporalPicker.vue.d.ts +10 -0
- package/types/src/TemporalRangeIcon.vue.d.ts +7 -0
- package/types/src/TemporalRangePicker.vue.d.ts +17 -0
- package/types/src/TemporalTimePanel.vue.d.ts +14 -0
- package/types/src/UiApp.vue.d.ts +18 -0
- package/types/src/UiBadge.vue.d.ts +14 -0
- package/types/src/UiBreadcrumbs.vue.d.ts +24 -0
- package/types/src/UiButton.vue.d.ts +22 -0
- package/types/src/UiCard.vue.d.ts +24 -0
- package/types/src/UiCheckbox.vue.d.ts +10 -0
- package/types/src/UiCheckboxGroup.vue.d.ts +12 -0
- package/types/src/UiCollapsible.vue.d.ts +20 -0
- package/types/src/UiCollectionFooter.vue.d.ts +15 -0
- package/types/src/UiCollectionHeader.vue.d.ts +14 -0
- package/types/src/UiCollectionView.vue.d.ts +56 -0
- package/types/src/UiContent.vue.d.ts +14 -0
- package/types/src/UiDateInput.vue.d.ts +6 -0
- package/types/src/UiDateTimeInput.vue.d.ts +6 -0
- package/types/src/UiDrawer.vue.d.ts +40 -0
- package/types/src/UiDrawerLayout.vue.d.ts +16 -0
- package/types/src/UiEmpty.vue.d.ts +18 -0
- package/types/src/UiField.vue.d.ts +17 -0
- package/types/src/UiFileCollection.vue.d.ts +16 -0
- package/types/src/UiFileInput.vue.d.ts +6 -0
- package/types/src/UiFilePreview.vue.d.ts +6 -0
- package/types/src/UiFloating.vue.d.ts +14 -0
- package/types/src/UiForm.vue.d.ts +25 -0
- package/types/src/UiIcon.vue.d.ts +14 -0
- package/types/src/UiImagePreview.vue.d.ts +4 -0
- package/types/src/UiInputFrame.vue.d.ts +26 -0
- package/types/src/UiInputFrameSpacer.vue.d.ts +3 -0
- package/types/src/UiKeyValueItem.vue.d.ts +14 -0
- package/types/src/UiKeyValueList.vue.d.ts +13 -0
- package/types/src/UiLayout.vue.d.ts +17 -0
- package/types/src/UiLink.vue.d.ts +16 -0
- package/types/src/UiList.vue.d.ts +49 -0
- package/types/src/UiLoadingIndicator.vue.d.ts +14 -0
- package/types/src/UiLoadingRegion.vue.d.ts +17 -0
- package/types/src/UiMenu.vue.d.ts +59 -0
- package/types/src/UiModal.vue.d.ts +27 -0
- package/types/src/UiMultiSelect.vue.d.ts +16 -0
- package/types/src/UiNavMenu.vue.d.ts +36 -0
- package/types/src/UiNavbar.vue.d.ts +17 -0
- package/types/src/UiNotice.vue.d.ts +18 -0
- package/types/src/UiPaginator.vue.d.ts +4 -0
- package/types/src/UiPaginatorJumper.vue.d.ts +4 -0
- package/types/src/UiPaginatorSizeSelect.vue.d.ts +4 -0
- package/types/src/UiPopover.vue.d.ts +40 -0
- package/types/src/UiPreviewRegion.vue.d.ts +14 -0
- package/types/src/UiProgressBar.vue.d.ts +4 -0
- package/types/src/UiRadioGroup.vue.d.ts +12 -0
- package/types/src/UiRegionLayout.vue.d.ts +21 -0
- package/types/src/UiSegmentedSelect.vue.d.ts +12 -0
- package/types/src/UiSelect.vue.d.ts +14 -0
- package/types/src/UiSuggestions.vue.d.ts +37 -0
- package/types/src/UiSwitch.vue.d.ts +10 -0
- package/types/src/UiTabPanel.vue.d.ts +14 -0
- package/types/src/UiTable.vue.d.ts +90 -0
- package/types/src/UiTabs.vue.d.ts +20 -0
- package/types/src/UiTextInput.vue.d.ts +24 -0
- package/types/src/UiTimeInput.vue.d.ts +6 -0
- package/types/src/UiTooltip.vue.d.ts +25 -0
- package/types/src/UiUploadProgress.vue.d.ts +4 -0
- package/types/src/UiUploadRegion.vue.d.ts +6 -0
- package/types/src/checkableDescription.d.ts +7 -0
- package/types/src/controlSize.d.ts +2 -0
- package/types/src/fieldPresentation.d.ts +49 -0
- package/types/src/focus.d.ts +3 -0
- package/types/src/formPresentation.d.ts +3 -0
- package/types/src/icons/external-link.vue.d.ts +3 -0
- package/types/src/icons/globe.vue.d.ts +3 -0
- package/types/src/icons/index.d.ts +181 -0
- package/types/src/icons/more-vertical.vue.d.ts +3 -0
- package/types/src/index.d.ts +2 -0
- package/types/src/integration.d.ts +1426 -0
- package/types/src/layout.d.ts +2 -0
- package/types/src/menuPresentation.d.ts +30 -0
- package/types/src/navigationDropdownHeight.d.ts +3 -0
- package/types/src/selectEscape.d.ts +1 -0
- package/types/src/zOrder.d.ts +3 -0
- package/types/testing/browser-control-parts.d.ts +2 -0
- package/types/testing/dom.d.mts +3 -0
- package/types/testing/index.d.ts +3 -0
- package/types/testing/presentation-mapping.d.ts +33 -0
- package/types/testing/presentation-parts.d.mts +20 -0
package/hooks/vite.mjs
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises'
|
|
2
|
+
|
|
3
|
+
const inputIdentityFile =
|
|
4
|
+
/[/\\]element-plus[/\\]es[/\\]components[/\\]form[/\\]src[/\\]hooks[/\\]use-form-item\.mjs$/
|
|
5
|
+
const popupContentFile =
|
|
6
|
+
/[/\\]element-plus[/\\]es[/\\]components[/\\]popper[/\\]src[/\\]composables[/\\]use-content\.mjs$/
|
|
7
|
+
const tooltipContentFile =
|
|
8
|
+
/[/\\]element-plus[/\\]es[/\\]components[/\\]tooltip[/\\]src[/\\]content\.vue_vue_type_script_setup_true_lang\.mjs$/
|
|
9
|
+
const submenuFile =
|
|
10
|
+
/[/\\]element-plus[/\\]es[/\\]components[/\\]menu[/\\]src[/\\]sub-menu\.mjs$/
|
|
11
|
+
|
|
12
|
+
function integrateSubmenu(code) {
|
|
13
|
+
// ElSubMenu exposes the Teleport switch but omits its ElTooltip's host prop.
|
|
14
|
+
// Forward it so a native submenu can stay inside its owning dialog or popover.
|
|
15
|
+
const props = '\tpopperOffset: Number,'
|
|
16
|
+
const teleport = 'teleported: appendToBody.value,'
|
|
17
|
+
if (
|
|
18
|
+
!code.includes(props) ||
|
|
19
|
+
!code.includes(teleport) ||
|
|
20
|
+
code.includes('appendTo:')
|
|
21
|
+
)
|
|
22
|
+
throw new Error(
|
|
23
|
+
'Review Element Plus submenu host integration after the toolkit update.',
|
|
24
|
+
)
|
|
25
|
+
// A horizontal navigation dropdown scrolls above/below its header. Native
|
|
26
|
+
// Popper can shift its alignment at a viewport edge; it must not switch to a
|
|
27
|
+
// sideways flyout just because neither aligned vertical candidate fits exactly.
|
|
28
|
+
// Leave command menus, vertical roots and all nested flyouts unchanged.
|
|
29
|
+
const original =
|
|
30
|
+
'"top-end",\n\t\t\t"right-start",\n\t\t\t"left-start"\n\t\t] : ['
|
|
31
|
+
if (!code.includes(original))
|
|
32
|
+
throw new Error(
|
|
33
|
+
'Review Element Plus header navigation placement after the toolkit update.',
|
|
34
|
+
)
|
|
35
|
+
return code
|
|
36
|
+
.replace(
|
|
37
|
+
props,
|
|
38
|
+
`${props}\n\tappendTo: { type: definePropType([String, Object]) },`,
|
|
39
|
+
)
|
|
40
|
+
.replace(teleport, `${teleport}\n\t\t\t\tappendTo: props.appendTo,`)
|
|
41
|
+
.replace(
|
|
42
|
+
original,
|
|
43
|
+
'"top-end",\n\t\t\t...(props.popperClass === "element-navigation-popup" ? [] : ["right-start", "left-start"])\n\t\t] : [',
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function preserveInputIdentity(code) {
|
|
48
|
+
// Native ID management and registration still run on mount. The explicit
|
|
49
|
+
// ID must already be rendered for server labels and matching hydration.
|
|
50
|
+
const declaration = 'const inputId = ref();'
|
|
51
|
+
const registration = 'if (newId !== inputId.value) {'
|
|
52
|
+
if (!code.includes(declaration) || !code.includes(registration))
|
|
53
|
+
throw new Error(
|
|
54
|
+
'Review Element Plus input identity integration after the toolkit update.',
|
|
55
|
+
)
|
|
56
|
+
return (
|
|
57
|
+
code
|
|
58
|
+
.replace(declaration, 'const inputId = ref(props.id);')
|
|
59
|
+
// The immediate callback runs before idUnwatch is assigned. Keep
|
|
60
|
+
// initial native form registration even when the explicit ID matches.
|
|
61
|
+
.replace(registration, 'if (newId !== inputId.value || !idUnwatch) {')
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function observeInitialPopup(code) {
|
|
66
|
+
// Nonpersistent tooltips mount with visible=true. The native watcher never
|
|
67
|
+
// sees a change, so content growth would have no ResizeObserver at all.
|
|
68
|
+
const original =
|
|
69
|
+
'\t\tif (visible) stopResizeObserver = useResizeObserver(contentRef, update).stop;\n\t});'
|
|
70
|
+
if (!code.includes(original))
|
|
71
|
+
throw new Error(
|
|
72
|
+
'Review Element Plus initial popup observation after the toolkit update.',
|
|
73
|
+
)
|
|
74
|
+
return code.replace(
|
|
75
|
+
original,
|
|
76
|
+
original.replace('\n\t});', '\n\t}, { immediate: true });'),
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function updateAfterPopupEntrance(code) {
|
|
81
|
+
// Nested menu references can be measured while an ancestor is transformed.
|
|
82
|
+
// Let native Popper remeasure when the native entrance has actually finished.
|
|
83
|
+
const original = '\t\tconst onAfterShow = () => {\n\t\t\tonShow();'
|
|
84
|
+
if (!code.includes(original))
|
|
85
|
+
throw new Error(
|
|
86
|
+
'Review Element Plus popup entrance positioning after the toolkit update.',
|
|
87
|
+
)
|
|
88
|
+
return code.replace(
|
|
89
|
+
original,
|
|
90
|
+
'\t\tconst onAfterShow = () => {\n\t\t\tcontentRef.value?.updatePopper?.();\n\t\t\tonShow();',
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Native service components otherwise listen for Escape on the whole document.
|
|
95
|
+
// Only managed feedback opts out; ordinary upstream service behavior is untouched.
|
|
96
|
+
function scopeFeedbackKeyboard(code) {
|
|
97
|
+
const original =
|
|
98
|
+
/useEventListener\(document, "keydown", (onKeydown|keydown)\);/
|
|
99
|
+
if (!original.test(code))
|
|
100
|
+
throw new Error(
|
|
101
|
+
'Review Element Plus managed feedback keyboard integration after upgrade.',
|
|
102
|
+
)
|
|
103
|
+
// Rich managed message slots may contain forms/lists. Preserve native content
|
|
104
|
+
// classes while replacing only their paragraph wrapper with a flow container.
|
|
105
|
+
if (code.includes('ref_key: "messageRef"')) {
|
|
106
|
+
const paragraph = 'createElementBlock("p", {\n\t\t\t\t\t\tkey: 2,'
|
|
107
|
+
if (!code.includes(paragraph))
|
|
108
|
+
throw new Error(
|
|
109
|
+
'Review Element Plus managed message content after upgrade.',
|
|
110
|
+
)
|
|
111
|
+
code = code.replace(
|
|
112
|
+
paragraph,
|
|
113
|
+
'createElementBlock(__props.customClass === "element-managed-feedback" ? "div" : "p", {\n\t\t\t\t\t\tkey: 2,',
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
return code
|
|
117
|
+
.replace(
|
|
118
|
+
original,
|
|
119
|
+
'if (props.customClass !== "element-managed-feedback") $&',
|
|
120
|
+
)
|
|
121
|
+
.replace(
|
|
122
|
+
'nextZIndex();',
|
|
123
|
+
'if (props.customClass !== "element-managed-feedback") nextZIndex();',
|
|
124
|
+
)
|
|
125
|
+
.replace(
|
|
126
|
+
'zIndex: props.zIndex ?? currentZIndex.value',
|
|
127
|
+
'zIndex: props.customClass === "element-managed-feedback" ? undefined : props.zIndex ?? currentZIndex.value',
|
|
128
|
+
)
|
|
129
|
+
.replace(
|
|
130
|
+
'zIndex: currentZIndex.value',
|
|
131
|
+
'zIndex: props.customClass === "element-managed-feedback" ? undefined : currentZIndex.value',
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
const managedFeedbackFile =
|
|
135
|
+
/[/\\]element-plus[/\\]es[/\\]components[/\\](message|notification)[/\\]src[/\\](message|notification)\.vue_vue_type_script_setup_true_lang\.mjs$/
|
|
136
|
+
|
|
137
|
+
const integrations = [
|
|
138
|
+
{ filter: submenuFile, transform: integrateSubmenu },
|
|
139
|
+
{ filter: managedFeedbackFile, transform: scopeFeedbackKeyboard },
|
|
140
|
+
{ filter: inputIdentityFile, transform: preserveInputIdentity },
|
|
141
|
+
{ filter: popupContentFile, transform: observeInitialPopup },
|
|
142
|
+
{ filter: tooltipContentFile, transform: updateAfterPopupEntrance },
|
|
143
|
+
]
|
|
144
|
+
|
|
145
|
+
/** Guarded native lifecycle integration for pinned Element Plus 2.14.7. */
|
|
146
|
+
export default function createBackendPlugins() {
|
|
147
|
+
return {
|
|
148
|
+
name: 'uninterface-element-integration',
|
|
149
|
+
enforce: 'pre',
|
|
150
|
+
config() {
|
|
151
|
+
return {
|
|
152
|
+
optimizeDeps: {
|
|
153
|
+
esbuildOptions: {
|
|
154
|
+
plugins: [
|
|
155
|
+
{
|
|
156
|
+
name: 'uninterface-element-integration',
|
|
157
|
+
setup(build) {
|
|
158
|
+
// Prebundling must remain enabled: the toolkit imports CommonJS
|
|
159
|
+
// dependencies such as Day.js, which browsers cannot load directly.
|
|
160
|
+
for (const { filter, transform } of integrations)
|
|
161
|
+
build.onLoad({ filter }, async ({ path }) => ({
|
|
162
|
+
contents: transform(await readFile(path, 'utf8')),
|
|
163
|
+
loader: 'js',
|
|
164
|
+
}))
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
transform(code, id) {
|
|
173
|
+
const integration = integrations.find(({ filter }) => filter.test(id))
|
|
174
|
+
if (!integration) return
|
|
175
|
+
return { code: integration.transform(code), map: null }
|
|
176
|
+
},
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* Native HTML content baseline. Imported by style.css; no wrapper/class opt-in.
|
|
2
|
+
Higher-specificity component styles and toolkit component/utility layers retain ownership. */
|
|
3
|
+
a:where([href]) {
|
|
4
|
+
color: var(--el-color-primary);
|
|
5
|
+
text-decoration: underline;
|
|
6
|
+
text-underline-offset: 0.15em;
|
|
7
|
+
}
|
|
8
|
+
:where(a[href]):focus-visible {
|
|
9
|
+
outline: 2px solid var(--el-color-primary);
|
|
10
|
+
outline-offset: var(--element-contained-focus-offset, 2px);
|
|
11
|
+
}
|
|
12
|
+
:where(kbd) {
|
|
13
|
+
padding: 0.125em 0.25em;
|
|
14
|
+
border: 1px solid var(--el-border-color);
|
|
15
|
+
border-radius: 0.25em;
|
|
16
|
+
}
|
|
17
|
+
:where(mark) {
|
|
18
|
+
color: var(--el-text-color-primary);
|
|
19
|
+
background: var(--el-color-warning-light-7);
|
|
20
|
+
padding-inline: 0.125em;
|
|
21
|
+
}
|
|
22
|
+
/* Preserve whitespace while wrapping long source lines; no hidden or
|
|
23
|
+
keyboard-inaccessible horizontal scrollport is introduced by a bare pre. */
|
|
24
|
+
:where(pre) {
|
|
25
|
+
white-space: pre-wrap;
|
|
26
|
+
overflow-wrap: anywhere;
|
|
27
|
+
max-inline-size: 100%;
|
|
28
|
+
}
|
|
29
|
+
:where(code, kbd, samp) {
|
|
30
|
+
overflow-wrap: anywhere;
|
|
31
|
+
}
|
|
32
|
+
:where(p, li, h1, h2, h3, h4, h5, h6, a[href]) {
|
|
33
|
+
overflow-wrap: anywhere;
|
|
34
|
+
}
|
|
35
|
+
@media (forced-colors: active) {
|
|
36
|
+
:where(mark) {
|
|
37
|
+
background: Mark;
|
|
38
|
+
color: MarkText;
|
|
39
|
+
}
|
|
40
|
+
:where(a[href]):focus-visible {
|
|
41
|
+
outline-color: Highlight;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* A sole native prose block allocated as one peer uses the layout's gap.
|
|
46
|
+
Nested prose and explicit content insets keep their own spacing. */
|
|
47
|
+
.element-layout-item:where(:not([data-layout-region]))
|
|
48
|
+
> :where(h1, h2, h3, h4, h5, h6, p, ul, ol, pre, hr):where(:only-child):where(
|
|
49
|
+
:not([class])
|
|
50
|
+
) {
|
|
51
|
+
margin-block: 0;
|
|
52
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,81 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uninterface/backend-element-plus",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "2.14.0-alpha1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./types/src/index.d.ts",
|
|
9
|
+
"import": "./esm/src/index.js"
|
|
10
|
+
},
|
|
11
|
+
"./style.css": "./style.css",
|
|
12
|
+
"./capabilities.json": "./capabilities.json",
|
|
13
|
+
"./*.vue": {
|
|
14
|
+
"types": "./types/src/*.vue.d.ts",
|
|
15
|
+
"import": "./esm/src/*.vue.js"
|
|
16
|
+
},
|
|
17
|
+
"./integration": {
|
|
18
|
+
"types": "./types/src/integration.d.ts",
|
|
19
|
+
"import": "./esm/src/integration.js"
|
|
20
|
+
},
|
|
21
|
+
"./vite": {
|
|
22
|
+
"types": "./hooks/vite.d.mts",
|
|
23
|
+
"import": "./hooks/vite.mjs"
|
|
24
|
+
},
|
|
25
|
+
"./layout": {
|
|
26
|
+
"types": "./types/src/layout.d.ts",
|
|
27
|
+
"import": "./esm/src/layout.js"
|
|
28
|
+
},
|
|
29
|
+
"./testing": {
|
|
30
|
+
"types": "./types/testing/index.d.ts",
|
|
31
|
+
"import": "./esm/testing/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./testing/dom": {
|
|
34
|
+
"types": "./types/testing/dom.d.mts",
|
|
35
|
+
"import": "./esm/testing/dom.js"
|
|
36
|
+
},
|
|
37
|
+
"./focus": {
|
|
38
|
+
"types": "./types/src/focus.d.ts",
|
|
39
|
+
"import": "./esm/src/focus.js"
|
|
40
|
+
},
|
|
41
|
+
"./font.css": "./font.css",
|
|
42
|
+
"./font-bundled.css": "./font-bundled.css"
|
|
43
|
+
},
|
|
44
|
+
"sideEffects": [
|
|
45
|
+
"**/*.css"
|
|
46
|
+
],
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@element-plus/icons-vue": "2.3.2",
|
|
49
|
+
"@fontsource-variable/inter": "5.3.0",
|
|
50
|
+
"@fontsource-variable/noto-sans-sc": "5.3.1",
|
|
51
|
+
"@fontsource-variable/noto-sans-tc": "5.3.1",
|
|
52
|
+
"element-plus": "2.14.7"
|
|
53
|
+
},
|
|
54
|
+
"description": "Element Plus presentation backend for Uninterface.",
|
|
55
|
+
"repository": {
|
|
56
|
+
"type": "git",
|
|
57
|
+
"url": "git+https://github.com/uninterface/backend-element-plus.git"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"@uninterface/testing": "~0.0.2",
|
|
61
|
+
"@uninterface/uninterface": "~0.0.3",
|
|
62
|
+
"vue": "^3.5.43"
|
|
63
|
+
},
|
|
64
|
+
"peerDependenciesMeta": {
|
|
65
|
+
"@uninterface/testing": {
|
|
66
|
+
"optional": true
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"files": [
|
|
70
|
+
"esm/",
|
|
71
|
+
"types/",
|
|
72
|
+
"*.css",
|
|
73
|
+
"capabilities.json",
|
|
74
|
+
"docs/",
|
|
75
|
+
"hooks/",
|
|
76
|
+
"THIRD-PARTY-NOTICES.md"
|
|
77
|
+
],
|
|
78
|
+
"publishConfig": {
|
|
79
|
+
"access": "public"
|
|
80
|
+
}
|
|
81
|
+
}
|