@antcde/component-library 0.1.25 → 0.1.26-rc.2
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 +2 -1
- package/dist/build/uno.js +40 -1
- package/dist/build/uno.safelist.d.ts +10 -0
- package/dist/build/uno.safelist.js +52 -0
- package/dist/build/uno.shortcuts.d.ts +27 -0
- package/dist/build/uno.shortcuts.js +209 -0
- package/dist/index.js +9020 -7853
- package/dist/test/vitest.js +3 -0
- package/dist/types/{src/components → components}/AntTourZone/_TourInfoCard.vue.d.ts +3 -2
- package/dist/types/components/AntTourZone/_TourRing.vue.d.ts +16 -0
- package/dist/types/{src/components → components}/AntTourZone/index.vue.d.ts +8 -16
- package/dist/types/components/BaseAntButton.vue.d.ts +9 -0
- package/dist/types/components/BaseAntCard.vue.d.ts +28 -0
- package/dist/types/components/BaseAntCreateCard.vue.d.ts +7 -0
- package/dist/types/{src/components → components}/BaseAntDatePicker.vue.d.ts +3 -2
- package/dist/types/{src/components → components}/BaseAntInput.vue.d.ts +13 -15
- package/dist/types/components/BaseAntLoading.vue.d.ts +3 -0
- package/dist/types/{src/components → components}/BaseAppCard/_BaseAppCardHint.vue.d.ts +2 -1
- package/dist/types/components/BaseAppCard/_BaseAppCardMedia.vue.d.ts +23 -0
- package/dist/types/components/BaseAppCard/_BaseAppCardTitle.vue.d.ts +6 -0
- package/dist/types/{src/components → components}/BaseAppCard/_BaseAppCardToolbar.vue.d.ts +3 -2
- package/dist/types/components/BaseAppCard/_BaseAppCardUpdate.vue.d.ts +9 -0
- package/dist/types/{src/components → components}/BaseAppCard/index.vue.d.ts +9 -13
- package/dist/types/{src/components → components}/BaseAppCardSkeleton.vue.d.ts +3 -2
- package/dist/types/{src/components → components}/BaseClickableIcon.vue.d.ts +2 -1
- package/dist/types/{src/components → components}/BaseConfirmDialog.vue.d.ts +7 -11
- package/dist/types/components/BaseDeleteDialog.vue.d.ts +43 -0
- package/dist/types/{src/components → components}/BaseDialog.vue.d.ts +7 -11
- package/dist/types/{src/components → components}/BaseLimitedButton.vue.d.ts +8 -12
- package/dist/types/{src/components → components}/BaseResizePanel.vue.d.ts +8 -12
- package/dist/types/{src/components → components}/BulkLabelsMenu.vue.d.ts +10 -14
- package/dist/types/{src/components → components}/DmsFilePicker/index.vue.d.ts +6 -7
- package/dist/types/{src/components → components}/FilePreviewContent/_PreviewDetails.vue.d.ts +3 -2
- package/dist/types/{src/components → components}/FilePreviewContent/_PreviewMeta.vue.d.ts +2 -1
- package/dist/types/{src/components → components}/FilePreviewContent/_PreviewUsages.vue.d.ts +2 -1
- package/dist/types/{src/components → components}/FilePreviewContent/index.vue.d.ts +11 -15
- package/dist/types/components/FilePreviewWindow/index.vue.d.ts +40 -0
- package/dist/types/components/FlowWindow/index.vue.d.ts +28 -0
- package/dist/types/components/FlowWindowContent/index.vue.d.ts +26 -0
- package/dist/types/components/GlobalLabelBadge.vue.d.ts +12 -0
- package/dist/types/{src/components → components}/RBAC/Permissions/PermissionCard.vue.d.ts +2 -1
- package/dist/types/components/RBAC/Permissions/PermissionsGroups.vue.d.ts +14 -0
- package/dist/types/{src/components → components}/RichTextEditor/_MentionPanel.vue.d.ts +3 -2
- package/dist/types/components/RichTextEditor/_Toolbar.vue.d.ts +7 -0
- package/dist/types/{src/components → components}/RichTextEditor/index.vue.d.ts +6 -6
- package/dist/types/{src/components → components}/StackedLabels/_LabelsMenuCard.vue.d.ts +3 -2
- package/dist/types/{src/components → components}/StackedLabels/index.vue.d.ts +3 -2
- package/dist/types/{src/components → components}/TasksFlow/components/_FlowBreadcrumb.vue.d.ts +2 -1
- package/dist/types/components/TasksFlow/components/_FlowEdgeConditionBooleanMode.vue.d.ts +10 -0
- package/dist/types/components/TasksFlow/components/_FlowEdgeConditionForm.vue.d.ts +27 -0
- package/dist/types/components/TasksFlow/components/_FlowEdgeConditionRow.vue.d.ts +13 -0
- package/dist/types/components/TasksFlow/components/_FlowEdgeConditionsDialog.vue.d.ts +14 -0
- package/dist/types/{src/components → components}/TasksFlow/components/_FlowEdgeDeleteDialog.vue.d.ts +4 -3
- package/dist/types/{src/components → components}/TasksFlow/components/_FlowEdgeLagMenu.vue.d.ts +5 -3
- package/dist/types/{src/components → components}/TasksFlow/components/_FlowLifecycleBar.vue.d.ts +3 -2
- package/dist/types/components/TasksFlow/components/_FlowSearch.vue.d.ts +6 -0
- package/dist/types/components/TasksFlow/components/_FlowStats.vue.d.ts +6 -0
- package/dist/types/{src/components → components}/TasksFlow/components/_FlowStructureTree.vue.d.ts +6 -6
- package/dist/types/{src/components → components}/TasksFlow/components/_FlowToolbar.vue.d.ts +3 -2
- package/dist/types/{src/components → components}/TasksFlow/components/_FlowTriggerMenu.vue.d.ts +2 -1
- package/dist/types/{src/components → components}/TasksFlow/components/_FlowVersionBar.vue.d.ts +2 -1
- package/dist/types/{src/components → components}/TasksFlow/components/_InsertTemplateDialog.vue.d.ts +7 -5
- package/dist/types/{src/components → components}/TasksFlow/components/_SubflowPanel.vue.d.ts +3 -2
- package/dist/types/{src/components → components}/TasksFlow/components/_VersionDiffView.vue.d.ts +5 -3
- package/dist/types/{src/components → components}/TasksFlow/components/_VersionPublishDialog.vue.d.ts +5 -3
- package/dist/types/components/TasksFlow/components/_dropzoneBackground.vue.d.ts +13 -0
- package/dist/types/components/TasksFlow/components/_flowEdge.vue.d.ts +7 -0
- package/dist/types/{src/components → components}/TasksFlow/components/_flowEditor.vue.d.ts +3 -2
- package/dist/types/components/TasksFlow/components/nodes/_DurationEditor.vue.d.ts +30 -0
- package/dist/types/{src/components → components}/TasksFlow/components/nodes/_NodeContextMenu.vue.d.ts +5 -3
- package/dist/types/components/TasksFlow/components/nodes/_NodeMeta.vue.d.ts +15 -0
- package/dist/types/components/TasksFlow/components/nodes/_UserPicker.vue.d.ts +29 -0
- package/dist/types/{src/components → components}/TasksFlow/components/nodes/_endpointNode.vue.d.ts +2 -1
- package/dist/types/components/TasksFlow/components/nodes/_swimlaneNode.vue.d.ts +7 -0
- package/dist/types/{src/components → components}/TasksFlow/components/nodes/_taskNode.vue.d.ts +2 -1
- package/dist/types/{src/components → components}/TasksFlow/components/nodes/_triggerNode.vue.d.ts +2 -1
- package/dist/types/components/TasksFlow/composables/__tests__/useTaskFlowDragDrop.spec.d.ts +1 -0
- package/dist/types/components/TasksFlow/composables/useEdgeConditionTables.d.ts +228 -0
- package/dist/types/components/TasksFlow/composables/useFlowEdgeConditionState.d.ts +21 -0
- package/dist/types/{src/components → components}/TasksFlow/composables/useTaskFlow.d.ts +3 -3
- package/dist/types/{src/components → components}/TasksFlow/composables/useTaskFlowEdgeConditions.d.ts +2 -2
- package/dist/types/{src/components → components}/TasksFlow/composables/useTaskFlowEdges.d.ts +3 -3
- package/dist/types/{src/components → components}/TasksFlow/index.vue.d.ts +3 -2
- package/dist/types/components/TasksFlow/utils/conditionOperators.d.ts +3 -0
- package/dist/types/{src/components → components}/UnifiedWindow/_WindowPresetMenu.vue.d.ts +2 -1
- package/dist/types/{src/components → components}/UnifiedWindow/_WindowTabs.vue.d.ts +2 -1
- package/dist/types/{src/components → components}/UnifiedWindow/index.vue.d.ts +12 -19
- package/dist/types/{src/components → components}/VersionPublishDialog.vue.d.ts +5 -3
- package/dist/types/{src/components → components}/_BaseAntInputField.vue.d.ts +11 -14
- package/dist/types/{src/components → components}/_BaseAntInputLabel.vue.d.ts +7 -11
- package/dist/types/components/form/AntActionMenu.vue.d.ts +30 -0
- package/dist/types/components/form/AntCheckboxCards.vue.d.ts +47 -0
- package/dist/types/components/form/AntDialogShell.vue.d.ts +66 -0
- package/dist/types/components/form/AntField.vue.d.ts +57 -0
- package/dist/types/components/form/AntFilterChips.types.d.ts +12 -0
- package/dist/types/components/form/AntFilterChips.vue.d.ts +31 -0
- package/dist/types/components/form/AntFilterSelect.types.d.ts +13 -0
- package/dist/types/components/form/AntFilterSelect.vue.d.ts +26 -0
- package/dist/types/components/form/AntHintBanner.vue.d.ts +36 -0
- package/dist/types/components/form/AntHintTip.vue.d.ts +24 -0
- package/dist/types/components/form/AntInput.vue.d.ts +98 -0
- package/dist/types/components/form/AntNumberField.vue.d.ts +32 -0
- package/dist/types/components/form/AntOptionPicker.types.d.ts +19 -0
- package/dist/types/components/form/AntOptionPicker.vue.d.ts +46 -0
- package/dist/types/components/form/AntPanelSection.vue.d.ts +34 -0
- package/dist/types/components/form/AntRadioCards.vue.d.ts +54 -0
- package/dist/types/components/form/AntSaveBar.vue.d.ts +70 -0
- package/dist/types/components/form/AntSearchField.vue.d.ts +32 -0
- package/dist/types/components/form/AntSectionCard.vue.d.ts +47 -0
- package/dist/types/components/form/AntSelect.vue.d.ts +79 -0
- package/dist/types/components/form/AntStatusPill.vue.d.ts +38 -0
- package/dist/types/components/form/AntToggle.vue.d.ts +30 -0
- package/dist/types/index.d.ts +79 -0
- package/lib/build/genSafelist.mjs +135 -0
- package/lib/build/qualifyIcon.ts +28 -0
- package/lib/build/uno.safelist.ts +52 -0
- package/lib/build/uno.shortcuts.ts +235 -0
- package/lib/build/uno.ts +41 -1
- package/lib/build/vuetify.ts +3 -1
- package/lib/test/mockVueRouter.ts +41 -1
- package/lib/test/vitest.ts +3 -0
- package/package.json +33 -30
- package/dist/types/src/components/AntTourZone/_TourRing.vue.d.ts +0 -15
- package/dist/types/src/components/BaseAntButton.vue.d.ts +0 -8
- package/dist/types/src/components/BaseAntCard.vue.d.ts +0 -30
- package/dist/types/src/components/BaseAntCreateCard.vue.d.ts +0 -6
- package/dist/types/src/components/BaseAntLoading.vue.d.ts +0 -2
- package/dist/types/src/components/BaseAppCard/_BaseAppCardMedia.vue.d.ts +0 -27
- package/dist/types/src/components/BaseAppCard/_BaseAppCardTitle.vue.d.ts +0 -5
- package/dist/types/src/components/BaseAppCard/_BaseAppCardUpdate.vue.d.ts +0 -8
- package/dist/types/src/components/BaseDeleteDialog.vue.d.ts +0 -48
- package/dist/types/src/components/FlowWindowContent/index.vue.d.ts +0 -55
- package/dist/types/src/components/GlobalLabelBadge.vue.d.ts +0 -11
- package/dist/types/src/components/RichTextEditor/_Toolbar.vue.d.ts +0 -6
- package/dist/types/src/components/TasksFlow/components/_FlowEdgeConditionsDialog.vue.d.ts +0 -10
- package/dist/types/src/components/TasksFlow/components/_FlowSearch.vue.d.ts +0 -7
- package/dist/types/src/components/TasksFlow/components/_FlowStats.vue.d.ts +0 -5
- package/dist/types/src/components/TasksFlow/components/_dropzoneBackground.vue.d.ts +0 -17
- package/dist/types/src/components/TasksFlow/components/_flowEdge.vue.d.ts +0 -9
- package/dist/types/src/components/TasksFlow/components/nodes/_DurationEditor.vue.d.ts +0 -33
- package/dist/types/src/components/TasksFlow/components/nodes/_NodeMeta.vue.d.ts +0 -14
- package/dist/types/src/components/TasksFlow/components/nodes/_UserPicker.vue.d.ts +0 -32
- package/dist/types/src/components/TasksFlow/components/nodes/_swimlaneNode.vue.d.ts +0 -6
- package/dist/types/src/index.d.ts +0 -39
- /package/dist/types/{src/components → components}/BaseAntInput.types.d.ts +0 -0
- /package/dist/types/{src/components → components}/DmsFilePicker/composables/usePickerNavigation.d.ts +0 -0
- /package/dist/types/{src/components → components}/DmsFilePicker/composables/usePickerUpload.d.ts +0 -0
- /package/dist/types/{src/components → components}/DmsFilePicker/utils/fileFormatting.d.ts +0 -0
- /package/dist/types/{src/components → components}/FilePreviewContent/fileFormat.d.ts +0 -0
- /package/dist/types/{src/components → components}/FilePreviewContent/types.d.ts +0 -0
- /package/dist/types/{src/components → components}/FilePreviewContent/usePreviewDetails.d.ts +0 -0
- /package/dist/types/{src/components → components}/RichTextEditor/_useInlineEdit.d.ts +0 -0
- /package/dist/types/{src/components → components}/RichTextEditor/_useMentionPicker.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/components/nodes/useTaskNodeState.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/_layoutEngine.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useAutoLayout.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useCriticalPath.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowAutoLayout.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowCache.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowCrud.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowDisplayElements.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowEditor.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowEndpoints.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowFetch.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowKeyboard.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowLifecycle.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowNotifications.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowOperations.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowRealtime.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowSearch.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowStructureTree.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowSubflows.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowToolbarDrag.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowUsers.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useFlowViewport.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useSwimlaneLayout.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useTaskFlowDragDrop.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useTaskFlowMappers.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useTaskFlowTypes.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useTemplateVersioning.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useTemplateVersioningState.d.ts +0 -0
- /package/dist/types/{src/components → components}/TasksFlow/composables/useTriggerExecution.d.ts +0 -0
- /package/dist/types/{src/components → components}/UnifiedWindow/types.d.ts +0 -0
- /package/dist/types/{src/components → components}/UnifiedWindow/useNativeFullscreen.d.ts +0 -0
- /package/dist/types/{src/components → components}/UnifiedWindow/useWindowDrag.d.ts +0 -0
- /package/dist/types/{src/components → components}/useResizePanel.d.ts +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The floating commit bar. How an ANT-OS form is saved.
|
|
3
|
+
*
|
|
4
|
+
* A dark glass pill fixed to the bottom centre, appearing only when the draft is
|
|
5
|
+
* dirty and reporting how many fields changed. The design system is explicit that
|
|
6
|
+
* this replaces "a Save button parked in the card", and that the page needs
|
|
7
|
+
* `pb-10` so the bar never covers the last field.
|
|
8
|
+
*
|
|
9
|
+
* ⚠️ Copy arrives as props with `te()`-guarded fallbacks to the store's own
|
|
10
|
+
* `store.manage.saveBar.*` keys. A shared component must not own a HOST
|
|
11
|
+
* translation key — but the four existing store call sites relied on those keys,
|
|
12
|
+
* so the fallback keeps them rendering byte-identically while any other app can
|
|
13
|
+
* pass its own strings. Same pattern as `AntDialogShell.closeLabel`.
|
|
14
|
+
*
|
|
15
|
+
* ── Which idiom is this? ──────────────────────────────────────────────────
|
|
16
|
+
* CURRENT. UnoCSS-first: native controls plus Vuetify only where it provides
|
|
17
|
+
* costly behaviour (overlay stack, popover anchoring, focus management).
|
|
18
|
+
* ─────────────────────────────────────────────────────────────────────────
|
|
19
|
+
*/
|
|
20
|
+
type __VLS_Props = {
|
|
21
|
+
visible: boolean;
|
|
22
|
+
count?: number;
|
|
23
|
+
saving?: boolean;
|
|
24
|
+
/** Creating rather than editing: an info dot, a `+` glyph, and the create copy. */
|
|
25
|
+
createMode?: boolean;
|
|
26
|
+
saveDisabled?: boolean;
|
|
27
|
+
discardLabel?: string;
|
|
28
|
+
createHint?: string;
|
|
29
|
+
createLabel?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Icon on the commit button, overriding the default.
|
|
32
|
+
*
|
|
33
|
+
* ⚠️ `mdi-plus` IS WRONG FOR A MULTI-STEP CREATE. The default assumes the button
|
|
34
|
+
* commits a new thing, and a plus on a button labelled "Continue" reads as "add
|
|
35
|
+
* another" — reported by a user, not inferred. A wizard passes an arrow for its
|
|
36
|
+
* intermediate steps and a tick for the last one.
|
|
37
|
+
*/
|
|
38
|
+
createIcon?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Render a BACK control at the left of the bar, and emit `back` when it is used.
|
|
41
|
+
*
|
|
42
|
+
* ⚠️ EXISTS SO A DESTRUCTIVE CONTROL NEED NOT SIT WHERE "BACK" IS EXPECTED. In a
|
|
43
|
+
* multi-step flow the discard button occupied the slot left of the primary
|
|
44
|
+
* action — which is where a hand goes to step backwards. A user reported
|
|
45
|
+
* repeatedly leaving a filled-in wizard by reflex, which is a report of losing
|
|
46
|
+
* work, not a preference. Pair this with `hideDiscard` and put discard somewhere
|
|
47
|
+
* a reflex will not find it.
|
|
48
|
+
*/
|
|
49
|
+
backLabel?: string;
|
|
50
|
+
/** Suppress the discard button, for a flow that sites it outside the bar. */
|
|
51
|
+
hideDiscard?: boolean;
|
|
52
|
+
saveLabel?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The "n unsaved changes" line, already pluralised and interpolated by the
|
|
55
|
+
* caller. Passed whole rather than as a count because plural rules belong to the
|
|
56
|
+
* caller's own locale files, not to a shared component.
|
|
57
|
+
*/
|
|
58
|
+
unsavedLabel?: string;
|
|
59
|
+
};
|
|
60
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
61
|
+
save: () => any;
|
|
62
|
+
discard: () => any;
|
|
63
|
+
back: () => any;
|
|
64
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
65
|
+
onSave?: (() => any) | undefined;
|
|
66
|
+
onDiscard?: (() => any) | undefined;
|
|
67
|
+
onBack?: (() => any) | undefined;
|
|
68
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
69
|
+
declare const _default: typeof __VLS_export;
|
|
70
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search input with clear button and optional shortcut hint.
|
|
3
|
+
*
|
|
4
|
+
* A native `<input>` in an `ant-pill-input` wrapper. Exposes `focus()`.
|
|
5
|
+
*
|
|
6
|
+
* ── Which idiom is this? ──────────────────────────────────────────────────
|
|
7
|
+
* CURRENT. UnoCSS-first: native controls plus Vuetify only where it provides
|
|
8
|
+
* costly behaviour (overlay stack, popover anchoring, focus management).
|
|
9
|
+
* Owns no copy — every label arrives as a prop.
|
|
10
|
+
*
|
|
11
|
+
* The `BaseAnt*` components are the SUPERSEDED idiom: thin wrappers around
|
|
12
|
+
* Vuetify fields. Do not use them for new work, and do not mix the two in one
|
|
13
|
+
* form — the border weights and label treatments do not match.
|
|
14
|
+
* ─────────────────────────────────────────────────────────────────────────
|
|
15
|
+
*/
|
|
16
|
+
type __VLS_Props = {
|
|
17
|
+
modelValue: string;
|
|
18
|
+
placeholder: string;
|
|
19
|
+
shortcutLabel: string;
|
|
20
|
+
clearLabel: string;
|
|
21
|
+
ariaLabel?: string;
|
|
22
|
+
};
|
|
23
|
+
declare function focus(): void;
|
|
24
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
|
|
25
|
+
focus: typeof focus;
|
|
26
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
27
|
+
"update:modelValue": (value: string) => any;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
29
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The workhorse panel of every ANT-OS screen.
|
|
3
|
+
*
|
|
4
|
+
* A bordered container with a HEADER BAND — title plus a one-line subtitle,
|
|
5
|
+
* separated from the body by a hairline — not a padded box with big text on top.
|
|
6
|
+
* Stack them `gap-4`; stack the fields inside them `gap-5`.
|
|
7
|
+
*
|
|
8
|
+
* ── Geometry is from the design system, NOT from the store ────────────────
|
|
9
|
+
* 16px radius, header `px-5 py-4` with a bottom hairline, title 14px/600,
|
|
10
|
+
* subtitle 12px, body padding 20px. The store's own `SectionCard.vue` (AAD-713)
|
|
11
|
+
* used a 24px radius, `px-6 pb-6`, a 16px/500 title and a 14px subtitle, and this
|
|
12
|
+
* component was extracted from it verbatim in AAD-980 before the system was
|
|
13
|
+
* available. 24px is the Vuetify `v-card` default and applies only to `v-*`
|
|
14
|
+
* components — the bespoke section scale is 16px.
|
|
15
|
+
*
|
|
16
|
+
* ── Which idiom is this? ──────────────────────────────────────────────────
|
|
17
|
+
* CURRENT. UnoCSS-first: native controls plus Vuetify only where it provides
|
|
18
|
+
* costly behaviour (overlay stack, popover anchoring, focus management).
|
|
19
|
+
* Owns no copy — every label arrives as a prop.
|
|
20
|
+
* ─────────────────────────────────────────────────────────────────────────
|
|
21
|
+
*/
|
|
22
|
+
type __VLS_Props = {
|
|
23
|
+
/** `flush` drops the body padding so `ant-section__row` children sit edge to edge. */
|
|
24
|
+
padding?: 'normal' | 'flush';
|
|
25
|
+
tone?: 'surface' | 'panel';
|
|
26
|
+
/** Drop the card chrome (border/background/radius) — for embedding inside a dialog. */
|
|
27
|
+
bare?: boolean;
|
|
28
|
+
};
|
|
29
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
|
|
30
|
+
type __VLS_Slots = {} & {
|
|
31
|
+
title?: (props: typeof __VLS_1) => any;
|
|
32
|
+
} & {
|
|
33
|
+
subtitle?: (props: typeof __VLS_3) => any;
|
|
34
|
+
} & {
|
|
35
|
+
action?: (props: typeof __VLS_5) => any;
|
|
36
|
+
} & {
|
|
37
|
+
default?: (props: typeof __VLS_7) => any;
|
|
38
|
+
};
|
|
39
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
40
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
41
|
+
declare const _default: typeof __VLS_export;
|
|
42
|
+
export default _default;
|
|
43
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
44
|
+
new (): {
|
|
45
|
+
$slots: S;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single-choice select.
|
|
3
|
+
*
|
|
4
|
+
* Native `<button>` trigger plus `v-menu` for popover anchoring only; the option list is native buttons. Deliberately NOT a `v-select`: Vuetify's `.v-field__outline` resolves to an effective rgba(0,0,0,0.33) against `border-ant`'s rgba(0,0,0,0.12), and its floating notched label is what makes a form read as raw Vuetify.
|
|
5
|
+
*
|
|
6
|
+
* ── Which idiom is this? ──────────────────────────────────────────────────
|
|
7
|
+
* CURRENT. UnoCSS-first: native controls plus Vuetify only where it provides
|
|
8
|
+
* costly behaviour (overlay stack, popover anchoring, focus management).
|
|
9
|
+
* Owns no copy — every label arrives as a prop.
|
|
10
|
+
*
|
|
11
|
+
* The `BaseAnt*` components are the SUPERSEDED idiom: thin wrappers around
|
|
12
|
+
* Vuetify fields. Do not use them for new work, and do not mix the two in one
|
|
13
|
+
* form — the border weights and label treatments do not match.
|
|
14
|
+
* ─────────────────────────────────────────────────────────────────────────
|
|
15
|
+
*/
|
|
16
|
+
export interface SelectOption<V extends string> {
|
|
17
|
+
title: string;
|
|
18
|
+
value: V;
|
|
19
|
+
/**
|
|
20
|
+
* An option the viewer cannot choose.
|
|
21
|
+
*
|
|
22
|
+
* Rendered and explained rather than hidden: an option that silently vanishes
|
|
23
|
+
* reads as a bug, while a disabled one with a reason teaches why.
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** Why the option is unavailable. Shown under it when `disabled`. */
|
|
27
|
+
hint?: string;
|
|
28
|
+
}
|
|
29
|
+
declare const __VLS_export: <T extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
30
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<({
|
|
31
|
+
options: SelectOption<T>[];
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Accessible name for the trigger.
|
|
36
|
+
*
|
|
37
|
+
* An explicit prop rather than a fallthrough `aria-label`: this component's
|
|
38
|
+
* root is `v-menu`, so an attribute written on `<Select>` lands on the overlay
|
|
39
|
+
* rather than on the button a screen reader actually announces.
|
|
40
|
+
*/
|
|
41
|
+
ariaLabel?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Render each option's `hint` even when the option is selectable.
|
|
44
|
+
*
|
|
45
|
+
* Off by default because the original callers pair `hint` with `disabled` to
|
|
46
|
+
* explain why an option cannot be chosen — showing that text on an enabled
|
|
47
|
+
* option would state a reason that no longer applies. Opt in when `hint` is a
|
|
48
|
+
* description rather than a refusal.
|
|
49
|
+
*/
|
|
50
|
+
showHints?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Tint the border to mark an invalid selection. Matches `AntInput.error`.
|
|
53
|
+
*
|
|
54
|
+
* Also sets `aria-invalid` on the trigger — the tint is the only signal a
|
|
55
|
+
* sighted user gets, and without the attribute a screen reader announced the
|
|
56
|
+
* select as valid while the form refused to submit.
|
|
57
|
+
*/
|
|
58
|
+
error?: boolean;
|
|
59
|
+
} & {
|
|
60
|
+
modelValue: T;
|
|
61
|
+
}) & {
|
|
62
|
+
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
63
|
+
}> & (typeof globalThis extends {
|
|
64
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
65
|
+
} ? P : {});
|
|
66
|
+
expose: (exposed: {}) => void;
|
|
67
|
+
attrs: any;
|
|
68
|
+
slots: {};
|
|
69
|
+
emit: (event: "update:modelValue", value: T) => void;
|
|
70
|
+
}>) => import('vue').VNode & {
|
|
71
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
72
|
+
};
|
|
73
|
+
declare const _default: typeof __VLS_export;
|
|
74
|
+
export default _default;
|
|
75
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
76
|
+
[K in keyof T]: T[K];
|
|
77
|
+
} : {
|
|
78
|
+
[K in keyof T as K]: T[K];
|
|
79
|
+
}) & {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type PillTone = 'success' | 'info' | 'primary' | 'warning' | 'error' | 'neutral';
|
|
2
|
+
/**
|
|
3
|
+
* The status token used wherever a row or card reports state.
|
|
4
|
+
*
|
|
5
|
+
* ⚠️ TONAL ONLY — saturated text on a 10% wash of the same channel. The design
|
|
6
|
+
* system is explicit that there is no flat or outlined status variant, because a
|
|
7
|
+
* FILLED pill means a selected filter chip; using one for status makes a state and
|
|
8
|
+
* a control look alike.
|
|
9
|
+
*
|
|
10
|
+
* Each tone has a default glyph, since a status carrying an icon is the shape the
|
|
11
|
+
* system uses everywhere. Pass `icon="false"` — or an empty string — to drop it.
|
|
12
|
+
*
|
|
13
|
+
* ── Which idiom is this? ──────────────────────────────────────────────────
|
|
14
|
+
* CURRENT. UnoCSS-first: native controls plus Vuetify only where it provides
|
|
15
|
+
* costly behaviour (overlay stack, popover anchoring, focus management).
|
|
16
|
+
* Owns no copy — every label arrives as a prop.
|
|
17
|
+
* ─────────────────────────────────────────────────────────────────────────
|
|
18
|
+
*/
|
|
19
|
+
type __VLS_Props = {
|
|
20
|
+
tone?: PillTone;
|
|
21
|
+
label?: string;
|
|
22
|
+
/** Overrides the tone's default glyph. An empty string renders none. */
|
|
23
|
+
icon?: string;
|
|
24
|
+
small?: boolean;
|
|
25
|
+
};
|
|
26
|
+
declare var __VLS_6: {};
|
|
27
|
+
type __VLS_Slots = {} & {
|
|
28
|
+
default?: (props: typeof __VLS_6) => any;
|
|
29
|
+
};
|
|
30
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Switch.
|
|
3
|
+
*
|
|
4
|
+
* A native `<button role="switch">` with an absolutely positioned knob. No Vuetify.
|
|
5
|
+
*
|
|
6
|
+
* ── Which idiom is this? ──────────────────────────────────────────────────
|
|
7
|
+
* CURRENT. UnoCSS-first: native controls plus Vuetify only where it provides
|
|
8
|
+
* costly behaviour (overlay stack, popover anchoring, focus management).
|
|
9
|
+
* Owns no copy — every label arrives as a prop.
|
|
10
|
+
*
|
|
11
|
+
* The `BaseAnt*` components are the SUPERSEDED idiom: thin wrappers around
|
|
12
|
+
* Vuetify fields. Do not use them for new work, and do not mix the two in one
|
|
13
|
+
* form — the border weights and label treatments do not match.
|
|
14
|
+
* ─────────────────────────────────────────────────────────────────────────
|
|
15
|
+
*/
|
|
16
|
+
type __VLS_Props = {
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_ModelProps = {
|
|
21
|
+
modelValue?: boolean;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
24
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
|
+
"update:modelValue": (value: boolean) => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as BaseAntButton } from './components/BaseAntButton.vue';
|
|
3
|
+
import { default as BaseAntCard } from './components/BaseAntCard.vue';
|
|
4
|
+
import { default as BaseAntCreateCard } from './components/BaseAntCreateCard.vue';
|
|
5
|
+
import { default as BaseAntDatePicker } from './components/BaseAntDatePicker.vue';
|
|
6
|
+
import { default as BaseAntInput } from './components/BaseAntInput.vue';
|
|
7
|
+
import { default as BaseAntLoading } from './components/BaseAntLoading.vue';
|
|
8
|
+
import { default as BaseAppCard } from './components/BaseAppCard/index.vue';
|
|
9
|
+
import { default as BaseAppCardSkeleton } from './components/BaseAppCardSkeleton.vue';
|
|
10
|
+
import { default as BaseClickableIcon } from './components/BaseClickableIcon.vue';
|
|
11
|
+
import { default as BaseConfirmDialog } from './components/BaseConfirmDialog.vue';
|
|
12
|
+
import { default as BaseDeleteDialog } from './components/BaseDeleteDialog.vue';
|
|
13
|
+
import { default as BaseDialog } from './components/BaseDialog.vue';
|
|
14
|
+
import { default as BaseLimitedButton } from './components/BaseLimitedButton.vue';
|
|
15
|
+
import { default as BaseResizePanel } from './components/BaseResizePanel.vue';
|
|
16
|
+
import { default as BulkLabelsMenu } from './components/BulkLabelsMenu.vue';
|
|
17
|
+
import { default as DmsFilePicker } from './components/DmsFilePicker/index.vue';
|
|
18
|
+
import { default as GlobalLabelBadge } from './components/GlobalLabelBadge.vue';
|
|
19
|
+
import { default as PermissionCard } from './components/RBAC/Permissions/PermissionCard.vue';
|
|
20
|
+
import { default as StackedLabels } from './components/StackedLabels/index.vue';
|
|
21
|
+
import { default as LabelsMenuCard } from './components/StackedLabels/_LabelsMenuCard.vue';
|
|
22
|
+
import { default as RichTextEditor } from './components/RichTextEditor/index.vue';
|
|
23
|
+
import { default as FilePreviewContent } from './components/FilePreviewContent/index.vue';
|
|
24
|
+
import { default as FlowWindowContent } from './components/FlowWindowContent/index.vue';
|
|
25
|
+
import { default as UnifiedWindow } from './components/UnifiedWindow/index.vue';
|
|
26
|
+
import { default as TaskFlow } from './components/TasksFlow/index.vue';
|
|
27
|
+
import { default as VersionPublishDialog } from './components/VersionPublishDialog.vue';
|
|
28
|
+
import { default as AntTourZone } from './components/AntTourZone/index.vue';
|
|
29
|
+
import { default as AntActionMenu } from './components/form/AntActionMenu.vue';
|
|
30
|
+
import { default as AntCheckboxCards } from './components/form/AntCheckboxCards.vue';
|
|
31
|
+
import { default as AntDialogShell } from './components/form/AntDialogShell.vue';
|
|
32
|
+
import { default as AntField } from './components/form/AntField.vue';
|
|
33
|
+
import { default as AntFilterChips } from './components/form/AntFilterChips.vue';
|
|
34
|
+
import { default as AntFilterSelect } from './components/form/AntFilterSelect.vue';
|
|
35
|
+
import { default as AntHintBanner } from './components/form/AntHintBanner.vue';
|
|
36
|
+
import { default as AntHintTip } from './components/form/AntHintTip.vue';
|
|
37
|
+
import { default as AntInput } from './components/form/AntInput.vue';
|
|
38
|
+
import { default as AntNumberField } from './components/form/AntNumberField.vue';
|
|
39
|
+
import { default as AntOptionPicker } from './components/form/AntOptionPicker.vue';
|
|
40
|
+
import { default as AntPanelSection } from './components/form/AntPanelSection.vue';
|
|
41
|
+
import { default as AntRadioCards } from './components/form/AntRadioCards.vue';
|
|
42
|
+
import { default as AntSaveBar } from './components/form/AntSaveBar.vue';
|
|
43
|
+
import { default as AntSearchField } from './components/form/AntSearchField.vue';
|
|
44
|
+
import { default as AntSectionCard } from './components/form/AntSectionCard.vue';
|
|
45
|
+
import { default as AntSelect } from './components/form/AntSelect.vue';
|
|
46
|
+
import { default as AntStatusPill } from './components/form/AntStatusPill.vue';
|
|
47
|
+
import { default as AntToggle } from './components/form/AntToggle.vue';
|
|
48
|
+
export type { AppLike } from './components/BaseAppCard/index.vue';
|
|
49
|
+
export type { ActionMenuItem } from './components/form/AntActionMenu.vue';
|
|
50
|
+
export type { CheckboxCardOption } from './components/form/AntCheckboxCards.vue';
|
|
51
|
+
export type { FilterChipOption } from './components/form/AntFilterChips.types';
|
|
52
|
+
export type { FilterSelectOption } from './components/form/AntFilterSelect.types';
|
|
53
|
+
export type { OptionRow } from './components/form/AntOptionPicker.types';
|
|
54
|
+
export type { RadioCardOption } from './components/form/AntRadioCards.vue';
|
|
55
|
+
export type { SelectOption } from './components/form/AntSelect.vue';
|
|
56
|
+
export type { PillTone } from './components/form/AntStatusPill.vue';
|
|
57
|
+
export type { MentionItem } from './components/RichTextEditor/index.vue';
|
|
58
|
+
export type { StackedLabel } from './components/StackedLabels/index.vue';
|
|
59
|
+
export type { FlowChannelSubscriber } from './components/TasksFlow/composables/useTaskFlow';
|
|
60
|
+
export type { WindowSizePreset, WindowTab } from './components/UnifiedWindow/types';
|
|
61
|
+
export * from '@antcde/vue-utils';
|
|
62
|
+
export { AntActionMenu, AntCheckboxCards, AntDialogShell, AntField, AntFilterChips, AntFilterSelect, AntHintBanner, AntHintTip, AntInput, AntNumberField, AntOptionPicker, AntPanelSection, AntRadioCards, AntSaveBar, AntSearchField, AntSectionCard, AntSelect, AntStatusPill, AntToggle, AntTourZone, BaseAntButton, BaseAntCard, BaseAntCreateCard, BaseAntDatePicker, BaseAntInput, BaseAntLoading, BaseAppCard, BaseAppCardSkeleton, BaseClickableIcon, BaseConfirmDialog, BaseDeleteDialog, BaseDialog, BaseLimitedButton, BaseResizePanel, BulkLabelsMenu, DmsFilePicker, FilePreviewContent, FlowWindowContent, GlobalLabelBadge, LabelsMenuCard, PermissionCard, RichTextEditor, StackedLabels, TaskFlow, UnifiedWindow, VersionPublishDialog, };
|
|
63
|
+
/**
|
|
64
|
+
* ⚠️ `BaseAntInput` and `BaseAntDatePicker` are the SUPERSEDED field idiom —
|
|
65
|
+
* wrappers around Vuetify fields, whose border weight and floating notched label
|
|
66
|
+
* are the reason forms built on them read as "raw Vuetify".
|
|
67
|
+
*
|
|
68
|
+
* For new work use the `Ant*` form primitives above (`AntInput`, `AntSelect`,
|
|
69
|
+
* `AntToggle`, `AntRadioCards`, …). They are left in place because rewriting
|
|
70
|
+
* `BaseAntInput` — 289 lines fanning a 30-member enum out to nine Vuetify
|
|
71
|
+
* components — is its own piece of work, not a side effect of anyone else's.
|
|
72
|
+
*
|
|
73
|
+
* @deprecated for new code. Do not mix the two idioms in one form.
|
|
74
|
+
*/
|
|
75
|
+
export declare const SUPERSEDED_FIELD_COMPONENTS: readonly ["BaseAntInput", "BaseAntDatePicker"];
|
|
76
|
+
declare const _default: {
|
|
77
|
+
install: (app: App) => void;
|
|
78
|
+
};
|
|
79
|
+
export default _default;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate the safelist of every utility class this library's own components use.
|
|
3
|
+
*
|
|
4
|
+
* ⚠️ WHY THIS EXISTS. UnoCSS's Vite plugin extracts class names only from files its
|
|
5
|
+
* pipeline includes — `.vue`, `.svelte`, `.jsx/.tsx`, `.md`, `.html`. A consuming
|
|
6
|
+
* app therefore never sees the classes written INSIDE this library, because by the
|
|
7
|
+
* time the app builds they live only in `dist/index.js`. The class is defined, the
|
|
8
|
+
* rule is never emitted, and there is NO build error: the element just renders
|
|
9
|
+
* naked. That is how `ant-cta` shipped invisible to the triggers app and how
|
|
10
|
+
* `ant-save-bar` broke the store's own save bar.
|
|
11
|
+
*
|
|
12
|
+
* A safelist fixes the whole class of failure rather than one instance, and it must
|
|
13
|
+
* be GENERATED rather than hand-kept: hand-listing the shortcut names covers only 9
|
|
14
|
+
* of the 57 classes actually at risk, leaving focus rings, transitions and toggle
|
|
15
|
+
* geometry silently missing.
|
|
16
|
+
*
|
|
17
|
+
* ⚠️ UNO IS THE ORACLE, not a regex. Candidates are scraped from templates and then
|
|
18
|
+
* run through the real generator; only those that actually produce a rule survive.
|
|
19
|
+
* That keeps prop names, computed identifiers and truncated fragments out of the
|
|
20
|
+
* list without maintaining a denylist that would rot.
|
|
21
|
+
*
|
|
22
|
+
* ⚠️ RUNS AS THE FIRST STEP OF `pnpm build`, so the list cannot go stale. An
|
|
23
|
+
* unenforced safelist is the same failure mode as the bug it replaces: correct today,
|
|
24
|
+
* silently wrong later, with nothing to tell you. `vite-node` is a devDependency for
|
|
25
|
+
* exactly this (the script imports the TypeScript factory).
|
|
26
|
+
*
|
|
27
|
+
* The committed output is what a consuming app compiles against, so it is checked in
|
|
28
|
+
* rather than generated at the consumer's build time.
|
|
29
|
+
*/
|
|
30
|
+
import { readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'
|
|
31
|
+
import { join } from 'node:path'
|
|
32
|
+
import { createGenerator } from 'unocss'
|
|
33
|
+
import { createAntUnoConfig } from './uno.ts'
|
|
34
|
+
|
|
35
|
+
const SRC = new URL('../../src', import.meta.url).pathname
|
|
36
|
+
|
|
37
|
+
function vueFiles(dir) {
|
|
38
|
+
return readdirSync(dir).flatMap((entry) => {
|
|
39
|
+
const p = join(dir, entry)
|
|
40
|
+
return statSync(p).isDirectory() ? vueFiles(p) : p.endsWith('.vue') ? [p] : []
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Split a class attribute's value into candidate tokens.
|
|
46
|
+
*
|
|
47
|
+
* ⚠️ BRACKET-AWARE ON PURPOSE. The previous `split(/[\s'`[\]{}(),:?]+/)` cut on
|
|
48
|
+
* `[`, `]`, `:` and `.`-free assumptions, so every arbitrary value (`h-[22px]`,
|
|
49
|
+
* `w-[38px]`, `font-[inherit]`) and every variant (`focus-visible:outline-2`,
|
|
50
|
+
* `hover:bg-ant-hover`) fell apart into fragments Uno does not recognise. They were
|
|
51
|
+
* dropped from the list, and AntToggle rendered at 0×0 in every consuming app while
|
|
52
|
+
* looking fine inside this library, where the source is scanned directly.
|
|
53
|
+
*
|
|
54
|
+
* Boundaries are whitespace, quotes, braces, parens, commas, `?` and Vue's array
|
|
55
|
+
* brackets — but not inside an arbitrary value, so `w-[calc(100vh-16px)]` survives
|
|
56
|
+
* intact. A `:` never splits:
|
|
57
|
+
* inside a token it is a variant separator; the JS ternary and object-key colons are
|
|
58
|
+
* whitespace- or quote-adjacent and end up as empty or non-letter tokens, which the
|
|
59
|
+
* `/^[a-z]/` test below removes anyway.
|
|
60
|
+
*/
|
|
61
|
+
function tokenize(value) {
|
|
62
|
+
const out = []
|
|
63
|
+
let cur = ''
|
|
64
|
+
let depth = 0
|
|
65
|
+
for (const ch of value) {
|
|
66
|
+
// A bracket ATTACHED to a token opens an arbitrary value (`w-[38px]`); one at a
|
|
67
|
+
// token boundary is Vue's array syntax (`:class="[cond && 'x']"`) and splits.
|
|
68
|
+
if (ch === '[' && (cur || depth > 0)) {
|
|
69
|
+
depth++
|
|
70
|
+
cur += ch
|
|
71
|
+
continue
|
|
72
|
+
}
|
|
73
|
+
if (ch === ']' && depth > 0) {
|
|
74
|
+
depth--
|
|
75
|
+
cur += ch
|
|
76
|
+
continue
|
|
77
|
+
}
|
|
78
|
+
if (depth === 0 && /[\s'"`{}(),?[\]]/.test(ch)) {
|
|
79
|
+
if (cur)
|
|
80
|
+
out.push(cur)
|
|
81
|
+
cur = ''
|
|
82
|
+
continue
|
|
83
|
+
}
|
|
84
|
+
cur += ch
|
|
85
|
+
}
|
|
86
|
+
if (cur)
|
|
87
|
+
out.push(cur)
|
|
88
|
+
return out
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const candidates = new Set()
|
|
92
|
+
for (const f of vueFiles(SRC)) {
|
|
93
|
+
const src = readFileSync(f, 'utf8')
|
|
94
|
+
for (const m of src.matchAll(/(?:class|:class)\s*=\s*"([^"]*)"/g)) {
|
|
95
|
+
for (const tok of tokenize(m[1])) {
|
|
96
|
+
const t = tok.replace(/^!/, '')
|
|
97
|
+
// ⚠️ A DOT IS NOT A DISQUALIFIER. This used to drop every token containing
|
|
98
|
+
// one, which silently excluded every fractional utility — `h-1.5`, `w-1.5`,
|
|
99
|
+
// `mt-0.5`, `gap-1.5`. Those only reach a consuming app through this list, so
|
|
100
|
+
// any that appear ONLY in a library component were never emitted and the
|
|
101
|
+
// element rendered without them. Uno's own `matched` set below is already the
|
|
102
|
+
// filter that keeps prop names out; this test was doing damage the oracle
|
|
103
|
+
// does not need.
|
|
104
|
+
if (t && /^[a-z]/.test(t))
|
|
105
|
+
candidates.add(t)
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const uno = await createGenerator(createAntUnoConfig())
|
|
111
|
+
|
|
112
|
+
// `matched` is the generator's own report of which tokens it recognised. Testing
|
|
113
|
+
// `css.trim()` instead is wrong — the result carries @layer boilerplate even when
|
|
114
|
+
// nothing matched, so every candidate "passes" and prop names end up in the list.
|
|
115
|
+
const { matched } = await uno.generate([...candidates].join(' '), { preflights: false })
|
|
116
|
+
const keep = [...candidates].filter(c => matched.has(c)).sort()
|
|
117
|
+
|
|
118
|
+
const packed = []
|
|
119
|
+
for (let i = 0; i < keep.length; i += 6)
|
|
120
|
+
packed.push(' ' + keep.slice(i, i + 6).map(c => `'${c}'`).join(', ') + ',')
|
|
121
|
+
|
|
122
|
+
writeFileSync(new URL('./uno.safelist.ts', import.meta.url), `/**
|
|
123
|
+
* GENERATED by lib/build/genSafelist.mjs — do not edit by hand.
|
|
124
|
+
*
|
|
125
|
+
* Every utility class this library's own components use, so a consuming app emits
|
|
126
|
+
* them even though UnoCSS never scans \`dist/index.js\`. See the generator for why.
|
|
127
|
+
*
|
|
128
|
+
* ${keep.length} classes, from ${candidates.size} candidates, filtered by asking Uno
|
|
129
|
+
* which ones actually resolve.
|
|
130
|
+
*/
|
|
131
|
+
export const libraryClassSafelist: string[] = [
|
|
132
|
+
${packed.join('\n')}
|
|
133
|
+
]
|
|
134
|
+
`)
|
|
135
|
+
console.log(`safelist: ${keep.length} classes kept of ${candidates.size} candidates`)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Give Iconify the COLLECTION it needs, because Vuetify has already taken it away.
|
|
3
|
+
*
|
|
4
|
+
* ⚠️ **VUETIFY STRIPS THE SET PREFIX BEFORE CALLING A SET'S COMPONENT.** `<v-icon
|
|
5
|
+
* icon="mdi-table" />` matches the registered set named `mdi` and this adapter is
|
|
6
|
+
* handed `table` — not `mdi-table`. Passing that straight to `<Icon>` gives Iconify
|
|
7
|
+
* a name with no collection, and Iconify then falls back to reading everything
|
|
8
|
+
* before the FIRST HYPHEN as the collection. So:
|
|
9
|
+
*
|
|
10
|
+
* | Vuetify prop | adapter receives | Iconify looked up |
|
|
11
|
+
* | ----------------------- | --------------------- | ---------------------------- |
|
|
12
|
+
* | `mdi-table` | `table` | nothing — no collection |
|
|
13
|
+
* | `mdi-file-delimited-outline` | `file-delimited-outline` | `file:delimited-outline` — 404 |
|
|
14
|
+
*
|
|
15
|
+
* That is why single-word icons rendered nothing and hyphenated ones fetched a
|
|
16
|
+
* nonexistent collection. Every icon in every app on this factory was affected, and
|
|
17
|
+
* nothing errored — the request 200s with an empty icon set.
|
|
18
|
+
*
|
|
19
|
+
* Defensive on both ends: a value that already names a collection is passed
|
|
20
|
+
* through, and a stray `mdi-` that survived is stripped rather than doubled.
|
|
21
|
+
*/
|
|
22
|
+
export function qualifyIcon(raw: string): string {
|
|
23
|
+
if (!raw)
|
|
24
|
+
return ''
|
|
25
|
+
if (raw.includes(':'))
|
|
26
|
+
return raw
|
|
27
|
+
return `mdi:${raw.startsWith('mdi-') ? raw.slice(4) : raw}`
|
|
28
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED by lib/build/genSafelist.mjs — do not edit by hand.
|
|
3
|
+
*
|
|
4
|
+
* Every utility class this library's own components use, so a consuming app emits
|
|
5
|
+
* them even though UnoCSS never scans `dist/index.js`. See the generator for why.
|
|
6
|
+
*
|
|
7
|
+
* 244 classes, from 947 candidates, filtered by asking Uno
|
|
8
|
+
* which ones actually resolve.
|
|
9
|
+
*/
|
|
10
|
+
export const libraryClassSafelist: string[] = [
|
|
11
|
+
'absolute', 'align-middle', 'align-start', 'ant-check', 'ant-check--on', 'ant-field-label',
|
|
12
|
+
'ant-hint-banner', 'ant-icon-button', 'ant-option-row', 'ant-option-row--on', 'ant-pill', 'ant-pill--sm',
|
|
13
|
+
'ant-pill-input', 'ant-pill-input--button', 'ant-pill-menu', 'ant-pill-menu__item', 'ant-pill-menu__item--active', 'ant-radio',
|
|
14
|
+
'ant-radio--on', 'ant-radio__dot', 'ant-save-bar', 'ant-section__header', 'basis-full', 'bg-ant-inset',
|
|
15
|
+
'bg-ant-panel', 'bg-ant-surface', 'bg-error', 'bg-primary', 'bg-primary/4', 'bg-primary/5',
|
|
16
|
+
'bg-success', 'bg-transparent', 'bg-warning', 'bg-white', 'bg-white/12', 'block',
|
|
17
|
+
'border', 'border-0', 'border-2', 'border-ant', 'border-b', 'border-error',
|
|
18
|
+
'border-none', 'border-opacity-50', 'border-primary', 'border-t', 'border-white/20', 'bottom-0',
|
|
19
|
+
'capitalize', 'cursor-help', 'cursor-not-allowed', 'cursor-pointer', 'disabled:cursor-not-allowed', 'disabled:hover:bg-transparent',
|
|
20
|
+
'disabled:opacity-50', 'duration-150', 'duration-200', 'ease-in', 'ease-out', 'flex',
|
|
21
|
+
'flex-1', 'flex-col', 'flex-grow-1', 'flex-shrink-0', 'flex-wrap', 'focus-visible:border-primary',
|
|
22
|
+
'focus-visible:opacity-100', 'focus-visible:outline-2', 'focus-visible:outline-offset-2', 'focus-visible:outline-primary', 'focus-within:border-primary', 'focus:border-error',
|
|
23
|
+
'focus:border-primary', 'focus:outline-none', 'focus:ring-error/10', 'focus:ring-primary/10', 'font-[inherit]', 'font-medium',
|
|
24
|
+
'font-mono', 'font-normal', 'font-semibold', 'gap-0.5', 'gap-1', 'gap-1.5',
|
|
25
|
+
'gap-2', 'gap-3', 'gap-8', 'gap-[5px]', 'gap-[6px]', 'grid',
|
|
26
|
+
'h-11', 'h-2', 'h-4', 'h-7', 'h-8', 'h-[18px]',
|
|
27
|
+
'h-[22px]', 'h-full', 'hover:bg-ant-hover', 'hover:bg-primary/6', 'hover:bg-primary/8', 'hover:bg-white/10',
|
|
28
|
+
'hover:opacity-100', 'inline-block', 'inline-flex', 'items-center', 'items-start', 'justify-between',
|
|
29
|
+
'justify-center', 'justify-end', 'justify-start', 'leading-none', 'leading-relaxed', 'leading-snug',
|
|
30
|
+
'leading-tight', 'left-0.5', 'lg:flex-initial', 'lg:min-w-[220px]', 'm-0', 'max-h-[88vh]',
|
|
31
|
+
'max-w-[180px]', 'max-w-[240px]', 'mb-1', 'mb-2', 'mb-2.5', 'mb-3',
|
|
32
|
+
'mb-4', 'md:basis-auto', 'md:flex-1', 'md:max-w-[420px]', 'md:min-w-[260px]', 'min-w-0',
|
|
33
|
+
'min-w-[168px]', 'min-w-[180px]', 'min-w-[200px]', 'ml-1', 'ml-2', 'mr-1',
|
|
34
|
+
'mr-2', 'ms-auto', 'mt-0.5', 'mt-1', 'mt-2', 'mt-3',
|
|
35
|
+
'mt-px', 'my-1', 'opacity-0', 'opacity-20', 'opacity-30', 'opacity-40',
|
|
36
|
+
'opacity-50', 'opacity-55', 'opacity-60', 'opacity-70', 'outline-none', 'overflow-hidden',
|
|
37
|
+
'overflow-y-auto', 'p-0', 'p-3.5', 'pa-2', 'pa-3', 'pb-0',
|
|
38
|
+
'pb-1', 'pb-2', 'pb-5', 'pl-1', 'pointer-events-none', 'position-relative',
|
|
39
|
+
'pr-1', 'pr-1.5', 'pt-1', 'pt-2', 'pt-3', 'pt-5',
|
|
40
|
+
'px-0', 'px-15', 'px-2', 'px-3', 'px-3.5', 'px-4',
|
|
41
|
+
'px-5', 'px-5.5', 'py-0', 'py-1', 'py-2', 'py-2.5',
|
|
42
|
+
'py-3', 'py-4', 'py-5', 'py-6', 'relative', 'resize-y',
|
|
43
|
+
'right-0', 'rounded', 'rounded-2xl', 'rounded-[12px]', 'rounded-[20px]', 'rounded-full',
|
|
44
|
+
'rounded-xl', 'shadow', 'shadow-sm', 'shrink-0', 'tabular-nums', 'text-[10px]',
|
|
45
|
+
'text-[11.5px]', 'text-[11px]', 'text-[12.5px]', 'text-[13.5px]', 'text-[13px]', 'text-black',
|
|
46
|
+
'text-body', 'text-center', 'text-error', 'text-heading', 'text-left', 'text-lg',
|
|
47
|
+
'text-muted', 'text-primary', 'text-sm', 'text-truncate', 'text-warning', 'text-white',
|
|
48
|
+
'text-white/45', 'text-wrap', 'text-xs', 'top-0.5', 'tracking-[0.16em]', 'transition-[border-color]',
|
|
49
|
+
'transition-all', 'transition-colors', 'transition-opacity', 'transition-transform', 'translate-x-0', 'translate-x-4',
|
|
50
|
+
'translate-y-4', 'truncate', 'uppercase', 'w-2', 'w-4', 'w-[18px]',
|
|
51
|
+
'w-[38px]', 'w-full', 'whitespace-normal', 'whitespace-nowrap',
|
|
52
|
+
]
|