prismify-ui 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/CODE_OF_CONDUCT.md +79 -0
  3. package/LICENSE +21 -0
  4. package/README.md +38 -0
  5. package/dist/components/dashboard/PfDashboardGroup/index.vue.d.ts +42 -0
  6. package/dist/components/dashboard/PfDashboardNavbar/index.vue.d.ts +57 -0
  7. package/dist/components/dashboard/PfDashboardPanel/index.vue.d.ts +47 -0
  8. package/dist/components/dashboard/PfDashboardResizeHandle/index.vue.d.ts +28 -0
  9. package/dist/components/dashboard/PfDashboardSearch/index.vue.d.ts +99 -0
  10. package/dist/components/dashboard/PfDashboardSearchButton/index.vue.d.ts +71 -0
  11. package/dist/components/dashboard/PfDashboardSidebar/index.vue.d.ts +121 -0
  12. package/dist/components/dashboard/PfDashboardSidebarCollapse/index.vue.d.ts +65 -0
  13. package/dist/components/dashboard/PfDashboardSidebarToggle/index.vue.d.ts +65 -0
  14. package/dist/components/dashboard/PfDashboardToolbar/index.vue.d.ts +32 -0
  15. package/dist/components/dashboard/shared/injection.d.ts +30 -0
  16. package/dist/components/dashboard/shared/resize.d.ts +5 -0
  17. package/dist/components/dashboard/shared/storage.d.ts +10 -0
  18. package/dist/components/data/PfAccordion/index.vue.d.ts +167 -0
  19. package/dist/components/data/PfEmpty/index.vue.d.ts +83 -0
  20. package/dist/components/data/PfMarquee/index.vue.d.ts +97 -0
  21. package/dist/components/data/PfScrollArea/index.vue.d.ts +58 -0
  22. package/dist/components/data/PfTable/index.vue.d.ts +166 -0
  23. package/dist/components/data/PfTimeline/index.vue.d.ts +105 -0
  24. package/dist/components/data/PfTree/PfTreeBranch.vue.d.ts +78 -0
  25. package/dist/components/data/PfTree/PfTreeRow.vue.d.ts +107 -0
  26. package/dist/components/data/PfTree/index.vue.d.ts +222 -0
  27. package/dist/components/data/PfTree/treeContext.d.ts +19 -0
  28. package/dist/components/data/PfTree/treeItemDisplay.d.ts +5 -0
  29. package/dist/components/data/PfTree/treeTypes.d.ts +58 -0
  30. package/dist/components/data/PfUser/index.vue.d.ts +65 -0
  31. package/dist/components/editor/PfEditor/PfEditorImageUploadNode.vue.d.ts +3 -0
  32. package/dist/components/editor/PfEditor/imageUploadExtension.d.ts +10 -0
  33. package/dist/components/editor/PfEditor/index.vue.d.ts +47 -0
  34. package/dist/components/editor/PfEditorDragHandle/index.vue.d.ts +95 -0
  35. package/dist/components/editor/PfEditorEmojiMenu/index.vue.d.ts +43 -0
  36. package/dist/components/editor/PfEditorMentionMenu/index.vue.d.ts +53 -0
  37. package/dist/components/editor/PfEditorSuggestionMenu/index.vue.d.ts +49 -0
  38. package/dist/components/editor/PfEditorToolbar/index.vue.d.ts +67 -0
  39. package/dist/components/editor/utils/handlers.d.ts +7 -0
  40. package/dist/components/editor/utils/injection.d.ts +8 -0
  41. package/dist/components/editor/utils/mapEditorItems.d.ts +7 -0
  42. package/dist/components/editor/utils/types.d.ts +98 -0
  43. package/dist/components/editor/utils/useEditorMenu.d.ts +31 -0
  44. package/dist/components/element/PfAlert/index.vue.d.ts +98 -0
  45. package/dist/components/element/PfAvatar/index.vue.d.ts +43 -0
  46. package/dist/components/element/PfAvatarGroup/index.vue.d.ts +52 -0
  47. package/dist/components/element/PfAvatarGroup/injection.d.ts +6 -0
  48. package/dist/components/element/PfBadge/index.vue.d.ts +64 -0
  49. package/dist/components/element/PfBanner/index.vue.d.ts +67 -0
  50. package/dist/components/element/PfButton/index.vue.d.ts +108 -0
  51. package/dist/components/element/PfCard/index.vue.d.ts +34 -0
  52. package/dist/components/element/PfChip/index.vue.d.ts +49 -0
  53. package/dist/components/element/PfCollapsible/index.vue.d.ts +82 -0
  54. package/dist/components/element/PfContentSearchButton/index.vue.d.ts +75 -0
  55. package/dist/components/element/PfFieldGroup/index.vue.d.ts +48 -0
  56. package/dist/components/element/PfFieldGroup/injection.d.ts +6 -0
  57. package/dist/components/element/PfIcon/iconSizes.d.ts +3 -0
  58. package/dist/components/element/PfIcon/index.vue.d.ts +10 -0
  59. package/dist/components/element/PfIcon/paths.d.ts +14 -0
  60. package/dist/components/element/PfKbd/index.vue.d.ts +36 -0
  61. package/dist/components/element/PfProgress/index.vue.d.ts +69 -0
  62. package/dist/components/element/PfSeparator/index.vue.d.ts +58 -0
  63. package/dist/components/element/PfSkeleton/index.vue.d.ts +31 -0
  64. package/dist/components/form/PfCalendar/calendarGrid.d.ts +12 -0
  65. package/dist/components/form/PfCalendar/calendarSelection.d.ts +30 -0
  66. package/dist/components/form/PfCalendar/index.vue.d.ts +137 -0
  67. package/dist/components/form/PfCheckbox/index.vue.d.ts +84 -0
  68. package/dist/components/form/PfCheckboxGroup/index.vue.d.ts +82 -0
  69. package/dist/components/form/PfColorPicker/colorPicker.d.ts +46 -0
  70. package/dist/components/form/PfColorPicker/index.vue.d.ts +54 -0
  71. package/dist/components/form/PfFileUpload/index.vue.d.ts +258 -0
  72. package/dist/components/form/PfForm/index.vue.d.ts +75 -0
  73. package/dist/components/form/PfForm/injection.d.ts +32 -0
  74. package/dist/components/form/PfForm/validation.d.ts +9 -0
  75. package/dist/components/form/PfFormField/index.vue.d.ts +59 -0
  76. package/dist/components/form/PfInput/index.vue.d.ts +97 -0
  77. package/dist/components/form/PfInputDate/index.vue.d.ts +109 -0
  78. package/dist/components/form/PfInputDate/inputDateSegments.d.ts +36 -0
  79. package/dist/components/form/PfInputMenu/index.vue.d.ts +1410 -0
  80. package/dist/components/form/PfInputNumber/index.vue.d.ts +498 -0
  81. package/dist/components/form/PfInputTags/index.vue.d.ts +482 -0
  82. package/dist/components/form/PfInputTime/index.vue.d.ts +108 -0
  83. package/dist/components/form/PfInputTime/inputTimeSegments.d.ts +36 -0
  84. package/dist/components/form/PfPinInput/index.vue.d.ts +56 -0
  85. package/dist/components/form/PfRadio/index.vue.d.ts +76 -0
  86. package/dist/components/form/PfRadioGroup/index.vue.d.ts +74 -0
  87. package/dist/components/form/PfSelect/index.vue.d.ts +209 -0
  88. package/dist/components/form/PfSelectMenu/index.vue.d.ts +1034 -0
  89. package/dist/components/form/PfSlider/index.vue.d.ts +54 -0
  90. package/dist/components/form/PfSwitch/index.vue.d.ts +83 -0
  91. package/dist/components/form/PfTextarea/index.vue.d.ts +111 -0
  92. package/dist/components/form/groupItems.d.ts +36 -0
  93. package/dist/components/layout/PfApp/index.vue.d.ts +45 -0
  94. package/dist/components/layout/PfApp/injection.d.ts +43 -0
  95. package/dist/components/layout/PfContainer/index.vue.d.ts +27 -0
  96. package/dist/components/layout/PfError/index.vue.d.ts +113 -0
  97. package/dist/components/layout/PfFooter/index.vue.d.ts +38 -0
  98. package/dist/components/layout/PfHeader/index.vue.d.ts +132 -0
  99. package/dist/components/layout/PfMain/index.vue.d.ts +27 -0
  100. package/dist/components/navigation/PfBreadcrumb/index.vue.d.ts +156 -0
  101. package/dist/components/navigation/PfContentNavigation/index.vue.d.ts +196 -0
  102. package/dist/components/navigation/PfContentSurround/index.vue.d.ts +86 -0
  103. package/dist/components/navigation/PfContentToc/index.vue.d.ts +165 -0
  104. package/dist/components/navigation/PfFooterColumns/index.vue.d.ts +145 -0
  105. package/dist/components/navigation/PfLink/index.vue.d.ts +80 -0
  106. package/dist/components/navigation/PfNavigationMenu/index.vue.d.ts +187 -0
  107. package/dist/components/navigation/PfPagination/index.vue.d.ts +103 -0
  108. package/dist/components/navigation/PfStepper/index.vue.d.ts +107 -0
  109. package/dist/components/navigation/PfTabs/index.vue.d.ts +131 -0
  110. package/dist/components/overlay/PfContentSearch/index.vue.d.ts +181 -0
  111. package/dist/components/overlay/PfContextMenu/PfContextMenuItems.vue.d.ts +10 -0
  112. package/dist/components/overlay/PfContextMenu/index.vue.d.ts +57 -0
  113. package/dist/components/overlay/PfContextMenu/types.d.ts +40 -0
  114. package/dist/components/overlay/PfDrawer/index.vue.d.ts +106 -0
  115. package/dist/components/overlay/PfDropdownMenu/PfDropdownMenuItems.vue.d.ts +10 -0
  116. package/dist/components/overlay/PfDropdownMenu/index.vue.d.ts +74 -0
  117. package/dist/components/overlay/PfDropdownMenu/types.d.ts +58 -0
  118. package/dist/components/overlay/PfModal/index.vue.d.ts +138 -0
  119. package/dist/components/overlay/PfToast/index.vue.d.ts +128 -0
  120. package/dist/components/overlay/PfToaster/index.vue.d.ts +11 -0
  121. package/dist/components/overlay/PfTooltip/index.vue.d.ts +85 -0
  122. package/dist/composables/pfScrollAreaVirtual.d.ts +21 -0
  123. package/dist/composables/usePfApp.d.ts +7 -0
  124. package/dist/composables/usePfContentSearch.d.ts +11 -0
  125. package/dist/composables/usePfKbd.d.ts +14 -0
  126. package/dist/composables/usePfToast.d.ts +137 -0
  127. package/dist/composables/usePfVModelBound.d.ts +5 -0
  128. package/dist/index.d.ts +184 -0
  129. package/dist/prismify-ui.cjs +3 -0
  130. package/dist/prismify-ui.cjs.map +1 -0
  131. package/dist/prismify-ui.js +26967 -0
  132. package/dist/prismify-ui.js.map +1 -0
  133. package/dist/style.css +1 -0
  134. package/dist/utils/editor.d.ts +2 -0
  135. package/dist/utils/pfLinkQuery.d.ts +8 -0
  136. package/docs/README.md +17 -0
  137. package/docs/installation.md +120 -0
  138. package/docs/library-development.md +57 -0
  139. package/docs/theming.md +334 -0
  140. package/llms.txt +220 -0
  141. package/package.json +146 -0
  142. package/src/styles/_variables.scss +25 -0
  143. package/src/styles/index.scss +1 -0
  144. package/src/styles/mixins/_input-tag-pill.scss +72 -0
  145. package/src/styles/variables/_accordion.scss +15 -0
  146. package/src/styles/variables/_animation.scss +25 -0
  147. package/src/styles/variables/_breadcrumb.scss +11 -0
  148. package/src/styles/variables/_colors.scss +37 -0
  149. package/src/styles/variables/_contextMenu.scss +31 -0
  150. package/src/styles/variables/_dashboard.scss +8 -0
  151. package/src/styles/variables/_drawer.scss +34 -0
  152. package/src/styles/variables/_editor.scss +34 -0
  153. package/src/styles/variables/_effects.scss +6 -0
  154. package/src/styles/variables/_empty.scss +12 -0
  155. package/src/styles/variables/_fileUpload.scss +21 -0
  156. package/src/styles/variables/_footerColumns.scss +17 -0
  157. package/src/styles/variables/_layout.scss +294 -0
  158. package/src/styles/variables/_link.scss +8 -0
  159. package/src/styles/variables/_marquee.scss +6 -0
  160. package/src/styles/variables/_modal.scss +26 -0
  161. package/src/styles/variables/_navigationMenu.scss +46 -0
  162. package/src/styles/variables/_stepper.scss +15 -0
  163. package/src/styles/variables/_table.scss +29 -0
  164. package/src/styles/variables/_tabs.scss +18 -0
  165. package/src/styles/variables/_timeline.scss +11 -0
  166. package/src/styles/variables/_toast.scss +14 -0
  167. package/src/styles/variables/_tooltip.scss +16 -0
  168. package/src/styles/variables/_tree.scss +29 -0
  169. package/src/styles/variables/_typography.scss +19 -0
@@ -0,0 +1,53 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ import { PfEditorMentionMenuItem } from '../utils/types';
3
+ type __VLS_Props = {
4
+ editor?: Editor;
5
+ items?: PfEditorMentionMenuItem[] | PfEditorMentionMenuItem[][];
6
+ char?: string;
7
+ pluginKey?: string;
8
+ filterFields?: string[];
9
+ limit?: number;
10
+ ignoreFilter?: boolean;
11
+ searchTerm?: string;
12
+ ui?: Partial<{
13
+ content: string;
14
+ viewport: string;
15
+ group: string;
16
+ label: string;
17
+ separator: string;
18
+ item: string;
19
+ itemLeadingIcon: string;
20
+ itemLeadingAvatar: string;
21
+ itemWrapper: string;
22
+ itemLabel: string;
23
+ itemDescription: string;
24
+ }>;
25
+ };
26
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
27
+ "update:searchTerm": (value: string) => any;
28
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
29
+ "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
30
+ }>, {
31
+ ui: Partial<{
32
+ content: string;
33
+ viewport: string;
34
+ group: string;
35
+ label: string;
36
+ separator: string;
37
+ item: string;
38
+ itemLeadingIcon: string;
39
+ itemLeadingAvatar: string;
40
+ itemWrapper: string;
41
+ itemLabel: string;
42
+ itemDescription: string;
43
+ }>;
44
+ items: PfEditorMentionMenuItem[] | PfEditorMentionMenuItem[][];
45
+ filterFields: string[];
46
+ ignoreFilter: boolean;
47
+ searchTerm: string;
48
+ editor: Editor;
49
+ pluginKey: string;
50
+ char: string;
51
+ limit: number;
52
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
53
+ export default _default;
@@ -0,0 +1,49 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ import { PfEditorCustomHandlers, PfEditorSuggestionMenuItem } from '../utils/types';
3
+ type __VLS_Props = {
4
+ editor?: Editor;
5
+ handlers?: PfEditorCustomHandlers;
6
+ items?: PfEditorSuggestionMenuItem[] | PfEditorSuggestionMenuItem[][];
7
+ char?: string;
8
+ pluginKey?: string;
9
+ filterFields?: string[];
10
+ limit?: number;
11
+ appendTo?: HTMLElement | (() => HTMLElement);
12
+ options?: Record<string, unknown>;
13
+ ui?: Partial<{
14
+ content: string;
15
+ viewport: string;
16
+ group: string;
17
+ label: string;
18
+ separator: string;
19
+ item: string;
20
+ itemLeadingIcon: string;
21
+ itemWrapper: string;
22
+ itemLabel: string;
23
+ itemDescription: string;
24
+ }>;
25
+ };
26
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
27
+ ui: Partial<{
28
+ content: string;
29
+ viewport: string;
30
+ group: string;
31
+ label: string;
32
+ separator: string;
33
+ item: string;
34
+ itemLeadingIcon: string;
35
+ itemWrapper: string;
36
+ itemLabel: string;
37
+ itemDescription: string;
38
+ }>;
39
+ items: PfEditorSuggestionMenuItem[] | PfEditorSuggestionMenuItem[][];
40
+ options: Record<string, unknown>;
41
+ filterFields: string[];
42
+ handlers: PfEditorCustomHandlers;
43
+ editor: Editor;
44
+ pluginKey: string;
45
+ char: string;
46
+ appendTo: HTMLElement | (() => HTMLElement);
47
+ limit: number;
48
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
49
+ export default _default;
@@ -0,0 +1,67 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ import { PfDropdownMenuContent } from '../../overlay/PfDropdownMenu/types';
3
+ import { PfEditorCustomHandlers, PfEditorToolbarItem } from '../utils/types';
4
+ type __VLS_Props = {
5
+ editor?: Editor;
6
+ handlers?: PfEditorCustomHandlers;
7
+ items?: PfEditorToolbarItem[] | PfEditorToolbarItem[][];
8
+ layout?: 'fixed' | 'bubble' | 'floating';
9
+ pluginKey?: unknown;
10
+ updateDelay?: number;
11
+ resizeDelay?: number;
12
+ shouldShow?: (...args: any[]) => boolean;
13
+ appendTo?: unknown;
14
+ options?: unknown;
15
+ content?: PfDropdownMenuContent;
16
+ ui?: Partial<{
17
+ root: string;
18
+ base: string;
19
+ group: string;
20
+ separator: string;
21
+ }>;
22
+ };
23
+ declare function __VLS_template(): {
24
+ attrs: Partial<{}>;
25
+ slots: Partial<Record<string, (_: {
26
+ item: PfEditorToolbarItem;
27
+ editor: Editor;
28
+ handlers: PfEditorCustomHandlers;
29
+ }) => any>> & Partial<Record<string, (_: {
30
+ item: PfEditorToolbarItem;
31
+ editor: Editor;
32
+ handlers: PfEditorCustomHandlers;
33
+ }) => any>> & Partial<Record<string, (_: {
34
+ item: PfEditorToolbarItem;
35
+ editor: Editor;
36
+ handlers: PfEditorCustomHandlers;
37
+ }) => any>>;
38
+ refs: {};
39
+ rootEl: any;
40
+ };
41
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
42
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
43
+ ui: Partial<{
44
+ root: string;
45
+ base: string;
46
+ group: string;
47
+ separator: string;
48
+ }>;
49
+ content: PfDropdownMenuContent;
50
+ items: PfEditorToolbarItem[] | PfEditorToolbarItem[][];
51
+ options: undefined;
52
+ layout: "fixed" | "bubble" | "floating";
53
+ handlers: PfEditorCustomHandlers;
54
+ editor: Editor;
55
+ pluginKey: undefined;
56
+ shouldShow: (...args: any[]) => boolean;
57
+ updateDelay: number;
58
+ resizeDelay: number;
59
+ appendTo: undefined;
60
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
61
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
62
+ export default _default;
63
+ type __VLS_WithTemplateSlots<T, S> = T & {
64
+ new (): {
65
+ $slots: S;
66
+ };
67
+ };
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ import { PfEditorCommandItem, PfEditorCustomHandlers } from './types';
3
+ export declare function createEditorHandlers(customHandlers?: PfEditorCustomHandlers): PfEditorCustomHandlers;
4
+ export declare function runEditorHandler(editor: Editor, handlers: PfEditorCustomHandlers, item: PfEditorCommandItem): boolean;
5
+ export declare function resolveItemDisabled(editor: Editor, handlers: PfEditorCustomHandlers, item: PfEditorCommandItem): boolean;
6
+ export declare function resolveItemActive(editor: Editor, handlers: PfEditorCustomHandlers, item: PfEditorCommandItem): boolean;
7
+ export declare function shouldApplyInlineHandler(editor: Editor): boolean;
@@ -0,0 +1,8 @@
1
+ import { InjectionKey, Ref } from 'vue';
2
+ import { Editor } from '@tiptap/vue-3';
3
+ import { PfEditorCustomHandlers } from './types';
4
+ export interface PfEditorContextValue {
5
+ editor: Ref<Editor | undefined>;
6
+ handlers: Ref<PfEditorCustomHandlers>;
7
+ }
8
+ export declare const PF_EDITOR_INJECTION_KEY: InjectionKey<PfEditorContextValue>;
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ import { PfDropdownMenuItem } from '../../overlay/PfDropdownMenu/types';
3
+ import { PfEditorCustomHandlers, PfEditorSuggestionMenuItem, PfEditorToolbarItem } from './types';
4
+ type EditorMappableItem = PfEditorToolbarItem | PfEditorSuggestionMenuItem;
5
+ export declare function mapEditorItem(editor: Editor, item: EditorMappableItem, handlers: PfEditorCustomHandlers): PfDropdownMenuItem;
6
+ export declare function mapEditorItems(editor: Editor, items: EditorMappableItem[] | EditorMappableItem[][], handlers: PfEditorCustomHandlers): PfDropdownMenuItem[][];
7
+ export {};
@@ -0,0 +1,98 @@
1
+ import { ChainedCommands, Editor, Extensions, JSONContent } from '@tiptap/vue-3';
2
+ import { MentionOptions } from '@tiptap/extension-mention';
3
+ import { PlaceholderOptions } from '@tiptap/extension-placeholder';
4
+ import { ImageOptions } from '@tiptap/extension-image';
5
+ import { NodeRangeOptions } from '@tiptap/extension-node-range';
6
+ import { StarterKitOptions } from '@tiptap/starter-kit';
7
+ export type PfEditorContentType = 'json' | 'html' | 'markdown';
8
+ export type PfEditorAlign = 'left' | 'center' | 'right' | 'justify';
9
+ export interface PfEditorHandler<TItem = unknown> {
10
+ canExecute: (editor: Editor, item?: TItem) => boolean;
11
+ execute: (editor: Editor, item?: TItem) => ChainedCommands;
12
+ isActive: (editor: Editor, item?: TItem) => boolean;
13
+ isDisabled?: (editor: Editor, item?: TItem) => boolean;
14
+ }
15
+ export type PfEditorCustomHandlers = Record<string, PfEditorHandler<any>>;
16
+ export interface PfEditorCommandItem {
17
+ kind?: string;
18
+ mark?: string;
19
+ align?: PfEditorAlign;
20
+ level?: number;
21
+ language?: string;
22
+ pos?: number;
23
+ }
24
+ export interface PfEditorToolbarItem extends PfEditorCommandItem {
25
+ type?: 'label' | 'separator';
26
+ label?: string;
27
+ description?: string;
28
+ icon?: string;
29
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
30
+ activeColor?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
31
+ variant?: 'solid' | 'outline' | 'soft' | 'subtle' | 'ghost' | 'link';
32
+ activeVariant?: 'solid' | 'outline' | 'soft' | 'subtle' | 'ghost' | 'link';
33
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
34
+ slot?: string;
35
+ disabled?: boolean;
36
+ loading?: boolean;
37
+ active?: boolean;
38
+ to?: string;
39
+ download?: boolean;
40
+ class?: string;
41
+ items?: PfEditorToolbarItem[] | PfEditorToolbarItem[][];
42
+ onClick?: (event: MouseEvent) => void;
43
+ }
44
+ export type PfEditorSuggestionMenuItem = Omit<PfEditorToolbarItem, 'items'> & {
45
+ items?: never;
46
+ };
47
+ export interface PfEditorMentionMenuItem {
48
+ id?: string | number;
49
+ label: string;
50
+ icon?: string;
51
+ description?: string;
52
+ disabled?: boolean;
53
+ avatar?: {
54
+ src?: string;
55
+ alt?: string;
56
+ icon?: string;
57
+ text?: string;
58
+ size?: '3xs' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
59
+ loading?: 'eager' | 'lazy';
60
+ };
61
+ }
62
+ export interface PfEditorEmojiMenuItem {
63
+ name: string;
64
+ emoji: string;
65
+ shortcodes?: string[];
66
+ tags?: string[];
67
+ group?: string;
68
+ fallbackImage?: string;
69
+ }
70
+ export interface PfEditorUi {
71
+ root?: string;
72
+ content?: string;
73
+ base?: string;
74
+ }
75
+ export interface PfEditorProps {
76
+ modelValue?: null | string | JSONContent | JSONContent[];
77
+ contentType?: PfEditorContentType;
78
+ starterKit?: Partial<StarterKitOptions>;
79
+ placeholder?: string | (Partial<PlaceholderOptions> & {
80
+ mode?: 'firstLine' | 'everyLine';
81
+ });
82
+ markdown?: Partial<{
83
+ markedOptions: Record<string, unknown>;
84
+ }> | false;
85
+ image?: boolean | Partial<ImageOptions>;
86
+ mention?: boolean | Partial<Omit<MentionOptions<any, any>, 'suggestion' | 'suggestions'>>;
87
+ handlers?: PfEditorCustomHandlers;
88
+ /**
89
+ * Required for correct block drag-and-drop (`PfEditorDragHandle` / `@tiptap/extension-drag-handle`).
90
+ * Enabled by default; pass `false` to disable.
91
+ */
92
+ nodeRange?: boolean | Partial<NodeRangeOptions>;
93
+ extensions?: Extensions;
94
+ editable?: boolean;
95
+ autofocus?: boolean | 'start' | 'end' | 'all';
96
+ textDirection?: 'ltr' | 'rtl' | 'auto';
97
+ ui?: PfEditorUi;
98
+ }
@@ -0,0 +1,31 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type MenuItem = Record<string, any>;
3
+ interface UseEditorMenuOptions<TItem extends MenuItem> {
4
+ editor: () => Editor | null | undefined;
5
+ char: string;
6
+ items: TItem[] | TItem[][];
7
+ limit?: number;
8
+ filterFields?: string[];
9
+ ignoreFilter?: boolean;
10
+ }
11
+ export declare function useEditorMenu<TItem extends MenuItem>(options: UseEditorMenuOptions<TItem>): {
12
+ isOpen: import('vue').Ref<boolean, boolean>;
13
+ searchTerm: import('vue').Ref<string, string>;
14
+ selectedIndex: import('vue').Ref<number, number>;
15
+ flatItems: import('vue').ComputedRef<any[]>;
16
+ activeItem: import('vue').ComputedRef<any>;
17
+ range: import('vue').Ref<{
18
+ from: number;
19
+ to: number;
20
+ } | null, {
21
+ from: number;
22
+ to: number;
23
+ } | {
24
+ from: number;
25
+ to: number;
26
+ } | null>;
27
+ closeMenu: () => void;
28
+ replaceTriggerWith: (editor: Editor, content: string) => boolean;
29
+ getFilteredGroups: () => TItem[][];
30
+ };
31
+ export {};
@@ -0,0 +1,98 @@
1
+ import { Component } from 'vue';
2
+ import { PfIconName } from '../PfIcon/paths';
3
+ import { PfBadgeAvatarProps } from '../PfBadge/index.vue';
4
+ export type PfAlertAvatarProps = PfBadgeAvatarProps;
5
+ export type PfAlertColor = 'error' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'neutral';
6
+ export type PfAlertVariant = 'solid' | 'outline' | 'soft' | 'subtle';
7
+ export type PfAlertButtonVariant = 'solid' | 'outline' | 'soft' | 'subtle' | 'ghost' | 'link';
8
+ export type PfAlertActionProps = Partial<{
9
+ label: string;
10
+ color: PfAlertColor;
11
+ variant: PfAlertButtonVariant;
12
+ size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
13
+ square: boolean;
14
+ block: boolean;
15
+ icon: PfIconName;
16
+ leading: boolean;
17
+ leadingIcon: PfIconName;
18
+ trailing: boolean;
19
+ trailingIcon: PfIconName;
20
+ iconOnly: boolean;
21
+ ariaLabel: string;
22
+ disabled: boolean;
23
+ loading: boolean;
24
+ loadingIcon: PfIconName;
25
+ loadingAuto: boolean;
26
+ type: 'button' | 'submit' | 'reset';
27
+ href: string;
28
+ to: string;
29
+ target: string;
30
+ rel: string;
31
+ download: boolean | string;
32
+ active: boolean;
33
+ activeColor: PfAlertColor;
34
+ activeVariant: PfAlertButtonVariant;
35
+ }>;
36
+ export type PfAlertCloseButtonProps = Omit<PfAlertActionProps, 'href' | 'to' | 'target' | 'rel' | 'download'>;
37
+ export type PfAlertUi = Partial<{
38
+ root: string;
39
+ leading: string;
40
+ wrapper: string;
41
+ title: string;
42
+ description: string;
43
+ icon: string;
44
+ avatar: string;
45
+ actions: string;
46
+ end: string;
47
+ close: string;
48
+ }>;
49
+ type __VLS_Props = {
50
+ as?: string | Component;
51
+ title?: string;
52
+ description?: string;
53
+ icon?: PfIconName;
54
+ avatar?: PfAlertAvatarProps;
55
+ color?: PfAlertColor;
56
+ variant?: PfAlertVariant;
57
+ orientation?: 'vertical' | 'horizontal';
58
+ actions?: PfAlertActionProps[];
59
+ close?: boolean | PfAlertCloseButtonProps;
60
+ closeIcon?: PfIconName;
61
+ ui?: PfAlertUi;
62
+ };
63
+ declare function onCloseClick(): void;
64
+ type __VLS_PublicProps = {
65
+ 'open'?: boolean;
66
+ } & __VLS_Props;
67
+ declare function __VLS_template(): {
68
+ attrs: Partial<{}>;
69
+ slots: {
70
+ leading?(_: {}): any;
71
+ title?(_: {}): any;
72
+ description?(_: {}): any;
73
+ actions?(_: {}): any;
74
+ actions?(_: {}): any;
75
+ close?(_: {
76
+ close: typeof onCloseClick;
77
+ }): any;
78
+ };
79
+ refs: {};
80
+ rootEl: any;
81
+ };
82
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
83
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
84
+ "update:open": (value: boolean) => any;
85
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
86
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
87
+ }>, {
88
+ color: PfAlertColor;
89
+ variant: PfAlertVariant;
90
+ orientation: "vertical" | "horizontal";
91
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
92
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
93
+ export default _default;
94
+ type __VLS_WithTemplateSlots<T, S> = T & {
95
+ new (): {
96
+ $slots: S;
97
+ };
98
+ };
@@ -0,0 +1,43 @@
1
+ import { Component } from 'vue';
2
+ import { PfIconName } from '../PfIcon/paths';
3
+ export type PfAvatarChipColor = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
4
+ export type PfAvatarChipProps = {
5
+ color?: PfAvatarChipColor;
6
+ };
7
+ type __VLS_Props = {
8
+ /**
9
+ * Override image tag/component: default `img`;
10
+ * with Nuxt `@nuxt/image` usually `{ img: 'NuxtImg' }` (string from global registration).
11
+ * Keep `<img>` explicitly: `{ img: 'img' }`. For a component object in `setup`, use `markRaw(Comp)`.
12
+ */
13
+ as?: {
14
+ img?: string | Component;
15
+ };
16
+ src?: string;
17
+ alt?: string;
18
+ icon?: PfIconName;
19
+ text?: string;
20
+ size?: '3xs' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
21
+ /** Ring around the avatar; object sets ring color. */
22
+ chip?: boolean | PfAvatarChipProps;
23
+ loading?: 'lazy' | 'eager';
24
+ /** See [fetchpriority](https://developer.mozilla.org/docs/Web/HTML/Element/img#fetchpriority) */
25
+ fetchPriority?: 'high' | 'low' | 'auto';
26
+ /** See [referrerpolicy](https://developer.mozilla.org/docs/Web/HTML/Element/img#referrerpolicy) */
27
+ referrerpolicy?: string;
28
+ crossorigin?: '' | 'anonymous' | 'use-credentials';
29
+ decoding?: 'async' | 'auto' | 'sync';
30
+ height?: number | string;
31
+ sizes?: string;
32
+ srcset?: string;
33
+ usemap?: string;
34
+ width?: number | string;
35
+ };
36
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
37
+ error: (event: Event) => any;
38
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
39
+ onError?: ((event: Event) => any) | undefined;
40
+ }>, {
41
+ size: "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
42
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
43
+ export default _default;
@@ -0,0 +1,52 @@
1
+ import { VNode, Component, PropType } from 'vue';
2
+ import { PfAvatarGroupSize } from './injection';
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ /**
5
+ * Root tag or component (like `component :is`).
6
+ */
7
+ as: {
8
+ type: PropType<string | Component>;
9
+ default: string;
10
+ };
11
+ /** Size for all avatars in the group (via provide to `PfAvatar`). */
12
+ size: {
13
+ type: PropType<PfAvatarGroupSize>;
14
+ default: string;
15
+ };
16
+ /**
17
+ * Max visible face avatars from the slot; rest collapse into `+N`.
18
+ * Omitted or ≤ 0 — no limit.
19
+ */
20
+ max: {
21
+ type: PropType<number | string | undefined>;
22
+ default: undefined;
23
+ };
24
+ }>, () => VNode<import('vue').RendererNode, import('vue').RendererElement, {
25
+ [key: string]: any;
26
+ }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
27
+ /**
28
+ * Root tag or component (like `component :is`).
29
+ */
30
+ as: {
31
+ type: PropType<string | Component>;
32
+ default: string;
33
+ };
34
+ /** Size for all avatars in the group (via provide to `PfAvatar`). */
35
+ size: {
36
+ type: PropType<PfAvatarGroupSize>;
37
+ default: string;
38
+ };
39
+ /**
40
+ * Max visible face avatars from the slot; rest collapse into `+N`.
41
+ * Omitted or ≤ 0 — no limit.
42
+ */
43
+ max: {
44
+ type: PropType<number | string | undefined>;
45
+ default: undefined;
46
+ };
47
+ }>> & Readonly<{}>, {
48
+ size: PfAvatarGroupSize;
49
+ as: string | Component;
50
+ max: string | number | undefined;
51
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
52
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ export type PfAvatarGroupSize = '3xs' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
3
+ export type PfAvatarGroupInjected = {
4
+ size: PfAvatarGroupSize;
5
+ };
6
+ export declare const PF_AVATAR_GROUP_INJECTION_KEY: InjectionKey<ComputedRef<PfAvatarGroupInjected>>;
@@ -0,0 +1,64 @@
1
+ import { Component } from 'vue';
2
+ import { PfAvatarChipProps } from '../PfAvatar/index.vue';
3
+ import { PfIconName } from '../PfIcon/paths';
4
+ export type PfBadgeAvatarProps = {
5
+ as?: {
6
+ img?: string | Component;
7
+ };
8
+ src?: string;
9
+ alt?: string;
10
+ icon?: PfIconName;
11
+ text?: string;
12
+ size?: '3xs' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
13
+ chip?: boolean | PfAvatarChipProps;
14
+ loading?: 'lazy' | 'eager';
15
+ fetchPriority?: 'high' | 'low' | 'auto';
16
+ referrerpolicy?: string;
17
+ crossorigin?: '' | 'anonymous' | 'use-credentials';
18
+ decoding?: 'async' | 'auto' | 'sync';
19
+ height?: number | string;
20
+ sizes?: string;
21
+ srcset?: string;
22
+ usemap?: string;
23
+ width?: number | string;
24
+ };
25
+ type __VLS_Props = {
26
+ as?: string | Component;
27
+ label?: string | number;
28
+ color?: 'error' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'neutral';
29
+ variant?: 'solid' | 'outline' | 'soft' | 'subtle';
30
+ /** In `PfFieldGroup`, inherits group `size` when no own `size` */
31
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
32
+ square?: boolean;
33
+ icon?: PfIconName;
34
+ avatar?: PfBadgeAvatarProps;
35
+ leading?: boolean;
36
+ leadingIcon?: PfIconName;
37
+ trailing?: boolean;
38
+ trailingIcon?: PfIconName;
39
+ };
40
+ declare function __VLS_template(): {
41
+ attrs: Partial<{}>;
42
+ slots: {
43
+ leading?(_: {}): any;
44
+ default?(_: {}): any;
45
+ trailing?(_: {}): any;
46
+ };
47
+ refs: {};
48
+ rootEl: any;
49
+ };
50
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
51
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
52
+ square: boolean;
53
+ color: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral";
54
+ variant: "solid" | "outline" | "soft" | "subtle";
55
+ leading: boolean;
56
+ trailing: boolean;
57
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
58
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
59
+ export default _default;
60
+ type __VLS_WithTemplateSlots<T, S> = T & {
61
+ new (): {
62
+ $slots: S;
63
+ };
64
+ };
@@ -0,0 +1,67 @@
1
+ import { Component } from 'vue';
2
+ import { PfIconName } from '../PfIcon/paths';
3
+ import { PfAlertActionProps, PfAlertCloseButtonProps } from '../PfAlert/index.vue';
4
+ export type PfBannerColor = 'error' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'neutral';
5
+ /** Button props for the `actions` prop (like `PfAlert`). */
6
+ export type PfBannerActionProps = PfAlertActionProps;
7
+ export type PfBannerCloseButtonProps = PfAlertCloseButtonProps;
8
+ export type PfBannerUi = Partial<{
9
+ root: string;
10
+ container: string;
11
+ left: string;
12
+ center: string;
13
+ right: string;
14
+ link: string;
15
+ icon: string;
16
+ title: string;
17
+ actions: string;
18
+ close: string;
19
+ }>;
20
+ type __VLS_Props = {
21
+ as?: string | Component;
22
+ /** Unique id: on close, written to `localStorage`; banner stays hidden after reload. */
23
+ id?: string;
24
+ title?: string;
25
+ icon?: PfIconName;
26
+ color?: PfBannerColor;
27
+ actions?: PfBannerActionProps[];
28
+ /** Link: `href` wins over `to` */
29
+ href?: string;
30
+ to?: string;
31
+ target?: '_blank' | '_parent' | '_self' | '_top' | string;
32
+ rel?: string;
33
+ close?: boolean | PfBannerCloseButtonProps;
34
+ closeIcon?: PfIconName;
35
+ ui?: PfBannerUi;
36
+ };
37
+ declare function dismissBanner(ev?: Event): void;
38
+ declare function __VLS_template(): {
39
+ attrs: Partial<{}>;
40
+ slots: {
41
+ leading?(_: {}): any;
42
+ leading?(_: {}): any;
43
+ title?(_: {}): any;
44
+ title?(_: {}): any;
45
+ actions?(_: {}): any;
46
+ close?(_: {
47
+ close: typeof dismissBanner;
48
+ }): any;
49
+ };
50
+ refs: {};
51
+ rootEl: any;
52
+ };
53
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
54
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
55
+ close: () => any;
56
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
57
+ onClose?: (() => any) | undefined;
58
+ }>, {
59
+ color: PfBannerColor;
60
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
61
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
62
+ export default _default;
63
+ type __VLS_WithTemplateSlots<T, S> = T & {
64
+ new (): {
65
+ $slots: S;
66
+ };
67
+ };