@bridge-ui/vue 0.11.0 → 0.12.0

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 (94) hide show
  1. package/dist/Adapters/Examples/icon-fontawesome.js +52 -40
  2. package/dist/Adapters/Examples/icon-heroicons.js +43 -31
  3. package/dist/Adapters/Examples/icon-lucide.js +46 -34
  4. package/dist/Adapters/Examples/icon-phosphor.js +36 -24
  5. package/dist/Adapters/Examples/icon-tabler.js +44 -32
  6. package/dist/Adapters/Examples/rich-text-tiptap.d.ts +5 -0
  7. package/dist/Adapters/Examples/rich-text-tiptap.js +138 -0
  8. package/dist/Adapters/RichText/index.d.ts +1 -0
  9. package/dist/Adapters/RichText/index.js +2 -0
  10. package/dist/Adapters/RichText/mockRichTextAdapter.d.ts +5 -0
  11. package/dist/Adapters/RichText/useRichTextAdapter.d.ts +12 -0
  12. package/dist/Adapters/RichText/useRichTextAdapter.js +13 -0
  13. package/dist/Adapters/index.d.ts +1 -0
  14. package/dist/Adapters/index.js +2 -1
  15. package/dist/Components/ActionFooter/composables/useActionFooter.d.ts +6 -6
  16. package/dist/Components/Autocomplete/composables/useAutocomplete.js +2 -2
  17. package/dist/Components/Breadcrumb/Breadcrumb.vue.d.ts +17 -10
  18. package/dist/Components/Breadcrumb/Breadcrumb.vue_vue_type_script_setup_true_lang.js +7 -2
  19. package/dist/Components/Breadcrumb/breadcrumb.types.d.ts +22 -4
  20. package/dist/Components/Breadcrumb/breadcrumbInjectionKey.d.ts +5 -1
  21. package/dist/Components/Breadcrumb/composables/useBreadcrumb.d.ts +6 -5
  22. package/dist/Components/Breadcrumb/composables/useBreadcrumb.js +2 -0
  23. package/dist/Components/BreadcrumbItem/BreadcrumbItem.vue.d.ts +17 -11
  24. package/dist/Components/BreadcrumbItem/BreadcrumbItem.vue_vue_type_script_setup_true_lang.js +2 -0
  25. package/dist/Components/BreadcrumbItem/breadcrumbItem.types.d.ts +21 -3
  26. package/dist/Components/BreadcrumbItem/composables/useBreadcrumbItem.d.ts +10 -6
  27. package/dist/Components/BreadcrumbItem/composables/useBreadcrumbItem.js +65 -59
  28. package/dist/Components/Button/Button.vue.d.ts +17 -8
  29. package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +10 -10
  30. package/dist/Components/Button/button.types.d.ts +22 -5
  31. package/dist/Components/Button/composables/useButton.d.ts +198 -8
  32. package/dist/Components/Button/composables/useButton.js +101 -86
  33. package/dist/Components/ColorPicker/composables/useColorPicker.js +1 -1
  34. package/dist/Components/DataTable/DataTable.vue.d.ts +1 -1
  35. package/dist/Components/DataTable/composables/useDataTable.d.ts +1 -1
  36. package/dist/Components/DataTable/composables/useDataTable.js +288 -282
  37. package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
  38. package/dist/Components/Drawer/composables/useDrawer.js +2 -2
  39. package/dist/Components/FileUpload/FileUpload.js +5 -0
  40. package/dist/Components/FileUpload/FileUpload.vue.d.ts +28 -0
  41. package/dist/Components/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js +132 -0
  42. package/dist/Components/FileUpload/composables/useFileUpload.d.ts +70 -0
  43. package/dist/Components/FileUpload/composables/useFileUpload.js +210 -0
  44. package/dist/Components/FileUpload/fileUpload.types.d.ts +306 -0
  45. package/dist/Components/FileUpload/index.d.ts +3 -0
  46. package/dist/Components/FileUpload/index.js +3 -0
  47. package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
  48. package/dist/Components/Link/Link.vue.d.ts +17 -8
  49. package/dist/Components/Link/Link.vue_vue_type_script_setup_true_lang.js +30 -25
  50. package/dist/Components/Link/composables/useLink.d.ts +8 -6
  51. package/dist/Components/Link/composables/useLink.js +52 -45
  52. package/dist/Components/Link/link.types.d.ts +21 -4
  53. package/dist/Components/ListItem/ListItem.vue.d.ts +17 -15
  54. package/dist/Components/ListItem/ListItem.vue_vue_type_script_setup_true_lang.js +2 -0
  55. package/dist/Components/ListItem/composables/useListItem.d.ts +7 -6
  56. package/dist/Components/ListItem/composables/useListItem.js +108 -105
  57. package/dist/Components/ListItem/listItem.types.d.ts +19 -3
  58. package/dist/Components/Listbox/composables/useListbox.d.ts +2 -2
  59. package/dist/Components/Menu/composables/useMenu.js +6 -6
  60. package/dist/Components/Modal/composables/useModal.d.ts +1 -1
  61. package/dist/Components/Modal/composables/useModal.js +2 -2
  62. package/dist/Components/RichTextEditor/RichTextEditor.js +5 -0
  63. package/dist/Components/RichTextEditor/RichTextEditor.vue.d.ts +23 -0
  64. package/dist/Components/RichTextEditor/RichTextEditor.vue_vue_type_script_setup_true_lang.js +104 -0
  65. package/dist/Components/RichTextEditor/composables/useRichTextEditor.d.ts +488 -0
  66. package/dist/Components/RichTextEditor/composables/useRichTextEditor.js +226 -0
  67. package/dist/Components/RichTextEditor/index.d.ts +3 -0
  68. package/dist/Components/RichTextEditor/index.js +3 -0
  69. package/dist/Components/RichTextEditor/richTextEditor.types.d.ts +103 -0
  70. package/dist/Components/Select/composables/useSelect.js +2 -2
  71. package/dist/Components/Sidebar/SidebarListItem.vue.d.ts +17 -9
  72. package/dist/Components/Sidebar/SidebarListItem.vue_vue_type_script_setup_true_lang.js +2 -0
  73. package/dist/Components/Sidebar/composables/useSidebarListItem.js +1 -1
  74. package/dist/Components/Sidebar/sidebar.types.d.ts +2 -1
  75. package/dist/Components/Snackbar/composables/useSnackbar.js +1 -1
  76. package/dist/Components/Textarea/composables/useTextarea.js +1 -1
  77. package/dist/Components/Tooltip/composables/useTooltip.js +3 -3
  78. package/dist/Utils/linkAs.d.ts +29 -0
  79. package/dist/Utils/linkAs.js +18 -0
  80. package/dist/augments.d.ts +10 -0
  81. package/dist/index.d.ts +5 -0
  82. package/dist/index.js +175 -170
  83. package/dist/theme.css +3 -0
  84. package/docs/README.md +3 -0
  85. package/docs/components/Breadcrumb.md +16 -0
  86. package/docs/components/BridgeUIProvider.md +18 -1
  87. package/docs/components/Button.md +31 -19
  88. package/docs/components/DataTable.md +1 -1
  89. package/docs/components/FileUpload.md +122 -0
  90. package/docs/components/Link.md +28 -12
  91. package/docs/components/List.md +21 -19
  92. package/docs/components/RichTextEditor.md +88 -0
  93. package/docs/components/Sidebar.md +1 -1
  94. package/package.json +54 -18
@@ -1,68 +1,80 @@
1
1
  import { defineComponent as e, h as t } from "vue";
2
2
  import { get as n, isArray as r, isObject as i, isString as a } from "es-toolkit/compat";
3
- import { faAnglesLeft as o, faAnglesRight as s, faBell as c, faCalendarDays as l, faCheck as u, faChevronDown as d, faChevronLeft as f, faChevronRight as p, faChevronUp as m, faCircleCheck as h, faCircleExclamation as g, faCircleInfo as _, faCircleXmark as v, faClock as y, faDownload as b, faEye as x, faEyeSlash as S, faFilter as C, faInbox as w, faMagnifyingGlass as T, faMinus as E, faPalette as D, faPlus as O, faSpinner as k, faTableColumns as A, faTriangleExclamation as j, faUpDown as M, faUser as N, faXmark as P } from "@fortawesome/free-solid-svg-icons";
4
- import { FontAwesomeIcon as F } from "@fortawesome/vue-fontawesome";
3
+ import { faAnglesLeft as o, faAnglesRight as s, faBell as c, faBold as l, faCalendarDays as u, faCheck as d, faChevronDown as f, faChevronLeft as p, faChevronRight as m, faChevronUp as h, faCircleCheck as g, faCircleExclamation as _, faCircleInfo as v, faCircleXmark as y, faClock as b, faCode as x, faDownload as S, faEye as C, faEyeSlash as w, faFilter as T, faHeading as E, faInbox as D, faItalic as O, faLink as k, faListOl as A, faListUl as j, faMagnifyingGlass as M, faMinus as N, faPalette as P, faPlus as F, faQuoteLeft as I, faSpinner as L, faStrikethrough as R, faTableColumns as z, faTriangleExclamation as B, faUnderline as V, faUpDown as H, faUser as U, faXmark as W } from "@fortawesome/free-solid-svg-icons";
4
+ import { FontAwesomeIcon as G } from "@fortawesome/vue-fontawesome";
5
5
  //#region src/Adapters/Examples/icon-fontawesome.ts
6
- var I = /* @__PURE__ */ new WeakMap();
7
- function L(e) {
6
+ var K = /* @__PURE__ */ new WeakMap();
7
+ function q(e) {
8
8
  return i(e) && r(e.icon) && a(e.prefix) && a(e.iconName);
9
9
  }
10
- function R(n) {
11
- let r = I.get(n);
10
+ function J(n) {
11
+ let r = K.get(n);
12
12
  if (r) return r;
13
13
  let i = e({
14
14
  inheritAttrs: !1,
15
15
  name: `FaIcon(${n.iconName})`,
16
16
  setup(e, { attrs: r }) {
17
- return () => t(F, {
17
+ return () => t(G, {
18
18
  ...r,
19
19
  icon: n
20
20
  });
21
21
  }
22
22
  });
23
- return I.set(n, i), i;
23
+ return K.set(n, i), i;
24
24
  }
25
- var z = {
26
- eye: x,
25
+ var Y = {
26
+ eye: C,
27
27
  bell: c,
28
- user: N,
29
- plus: O,
30
- inbox: w,
31
- clear: P,
32
- check: u,
33
- clock: y,
34
- minus: E,
35
- filter: C,
36
- loader: k,
37
- info: _,
38
- eyeOff: S,
39
- palette: D,
40
- error: v,
41
- download: b,
42
- success: h,
43
- chevronUp: m,
44
- columns: A,
45
- chevronUpDown: M,
46
- calendar: l,
47
- panelLeft: A,
48
- search: T,
49
- alert: g,
50
- chevronDown: d,
51
- chevronLeft: f,
28
+ bold: l,
29
+ code: x,
30
+ link: k,
31
+ user: U,
32
+ plus: F,
33
+ list: j,
34
+ inbox: D,
35
+ clear: W,
36
+ check: d,
37
+ clock: b,
38
+ minus: N,
39
+ filter: T,
40
+ italic: O,
41
+ loader: L,
42
+ info: v,
43
+ eyeOff: w,
44
+ palette: P,
45
+ quote: I,
46
+ heading1: E,
47
+ heading2: E,
48
+ heading3: E,
49
+ error: y,
50
+ download: S,
51
+ listOrdered: A,
52
+ success: g,
53
+ chevronUp: h,
54
+ underline: V,
55
+ columns: z,
56
+ chevronUpDown: H,
57
+ calendar: u,
58
+ panelLeft: z,
59
+ search: M,
60
+ alert: _,
61
+ chevronDown: f,
62
+ chevronLeft: p,
52
63
  chevronsLeft: o,
53
- chevronRight: p,
64
+ chevronRight: m,
54
65
  chevronsRight: s,
55
- warning: j
66
+ strikethrough: R,
67
+ warning: B
56
68
  };
57
- function B() {
69
+ function X() {
58
70
  return {
59
71
  resolve(e) {
60
- return n(z, e);
72
+ return n(Y, e);
61
73
  },
62
74
  normalize(e) {
63
- return L(e) ? R(e) : e;
75
+ return q(e) ? J(e) : e;
64
76
  }
65
77
  };
66
78
  }
67
79
  //#endregion
68
- export { B as createFontAwesomeIconAdapter, R as wrapFaIcon };
80
+ export { X as createFontAwesomeIconAdapter, J as wrapFaIcon };
@@ -1,42 +1,54 @@
1
1
  import { get as e } from "es-toolkit/compat";
2
- import { ArrowDownTrayIcon as t, ArrowPathIcon as n, Bars3Icon as r, BellIcon as i, CalendarDaysIcon as a, CheckCircleIcon as o, CheckIcon as s, ChevronDoubleLeftIcon as c, ChevronDoubleRightIcon as l, ChevronDownIcon as u, ChevronLeftIcon as d, ChevronRightIcon as f, ChevronUpDownIcon as p, ChevronUpIcon as m, ClockIcon as h, ExclamationCircleIcon as g, ExclamationTriangleIcon as _, EyeIcon as v, EyeSlashIcon as y, FunnelIcon as b, InboxIcon as x, InformationCircleIcon as S, MagnifyingGlassIcon as C, MinusIcon as w, PlusIcon as T, SwatchIcon as E, UserIcon as D, ViewColumnsIcon as O, XCircleIcon as k, XMarkIcon as A } from "@heroicons/vue/24/outline";
2
+ import { ArrowDownTrayIcon as t, ArrowPathIcon as n, Bars3Icon as r, BellIcon as i, BoldIcon as a, CalendarDaysIcon as o, ChatBubbleBottomCenterTextIcon as s, CheckCircleIcon as c, CheckIcon as l, ChevronDoubleLeftIcon as u, ChevronDoubleRightIcon as d, ChevronDownIcon as f, ChevronLeftIcon as p, ChevronRightIcon as m, ChevronUpDownIcon as h, ChevronUpIcon as g, ClockIcon as _, CodeBracketIcon as v, ExclamationCircleIcon as y, ExclamationTriangleIcon as b, EyeIcon as x, EyeSlashIcon as S, FunnelIcon as C, H1Icon as w, H2Icon as T, H3Icon as E, InboxIcon as D, InformationCircleIcon as O, ItalicIcon as k, LinkIcon as A, ListBulletIcon as j, MagnifyingGlassIcon as M, MinusIcon as N, NumberedListIcon as P, PlusIcon as F, StrikethroughIcon as I, SwatchIcon as L, UnderlineIcon as R, UserIcon as z, ViewColumnsIcon as B, XCircleIcon as V, XMarkIcon as H } from "@heroicons/vue/24/outline";
3
3
  //#region src/Adapters/Examples/icon-heroicons.ts
4
- var j = {
5
- eye: v,
4
+ var U = {
5
+ eye: x,
6
6
  bell: i,
7
- user: D,
8
- plus: T,
9
- inbox: x,
10
- clear: A,
11
- check: s,
12
- clock: h,
13
- minus: w,
14
- error: k,
15
- filter: b,
16
- palette: E,
17
- eyeOff: y,
7
+ bold: a,
8
+ link: A,
9
+ user: z,
10
+ plus: F,
11
+ inbox: D,
12
+ clear: H,
13
+ check: l,
14
+ clock: _,
15
+ minus: N,
16
+ heading1: w,
17
+ heading2: T,
18
+ heading3: E,
19
+ error: V,
20
+ filter: C,
21
+ italic: k,
22
+ palette: L,
23
+ list: j,
24
+ eyeOff: S,
18
25
  panelLeft: r,
26
+ code: v,
19
27
  loader: n,
20
- success: o,
21
- chevronUp: m,
22
- columns: O,
23
- calendar: a,
28
+ underline: R,
29
+ success: c,
30
+ chevronUp: g,
31
+ columns: B,
32
+ calendar: o,
24
33
  download: t,
25
- search: C,
26
- info: S,
27
- alert: g,
28
- chevronDown: u,
29
- chevronLeft: d,
30
- chevronRight: f,
31
- chevronUpDown: p,
32
- warning: _,
33
- chevronsLeft: c,
34
- chevronsRight: l
34
+ search: M,
35
+ info: O,
36
+ alert: y,
37
+ chevronDown: f,
38
+ chevronLeft: p,
39
+ listOrdered: P,
40
+ chevronRight: m,
41
+ strikethrough: I,
42
+ chevronUpDown: h,
43
+ warning: b,
44
+ chevronsLeft: u,
45
+ chevronsRight: d,
46
+ quote: s
35
47
  };
36
- function M() {
48
+ function W() {
37
49
  return { resolve(t) {
38
- return e(j, t);
50
+ return e(U, t);
39
51
  } };
40
52
  }
41
53
  //#endregion
42
- export { M as createHeroiconsIconAdapter };
54
+ export { W as createHeroiconsIconAdapter };
@@ -1,42 +1,54 @@
1
1
  import { get as e } from "es-toolkit/compat";
2
- import { Bell as t, Calendar as n, Check as r, ChevronDown as i, ChevronLeft as a, ChevronRight as o, ChevronUp as s, ChevronsLeft as c, ChevronsRight as l, ChevronsUpDown as u, CircleAlert as d, CircleCheck as f, CircleX as p, Clock as m, Columns3 as h, Download as g, Eye as _, EyeOff as v, Filter as y, Inbox as b, Info as x, Loader2 as S, Minus as C, Palette as w, PanelLeft as T, Plus as E, Search as D, TriangleAlert as O, User as k, X as A } from "@lucide/vue";
2
+ import { Bell as t, Bold as n, Calendar as r, Check as i, ChevronDown as a, ChevronLeft as o, ChevronRight as s, ChevronUp as c, ChevronsLeft as l, ChevronsRight as u, ChevronsUpDown as d, CircleAlert as f, CircleCheck as p, CircleX as m, Clock as h, Code as g, Columns3 as _, Download as v, Eye as y, EyeOff as b, Filter as x, Heading1 as S, Heading2 as C, Heading3 as w, Inbox as T, Info as E, Italic as D, Link as O, List as k, ListOrdered as A, Loader2 as j, Minus as M, Palette as N, PanelLeft as P, Plus as F, Quote as I, Search as L, Strikethrough as R, TriangleAlert as z, Underline as B, User as V, X as H } from "@lucide/vue";
3
3
  //#region src/Adapters/Examples/icon-lucide.ts
4
- var j = {
5
- eye: _,
6
- clear: A,
4
+ var U = {
5
+ eye: y,
6
+ clear: H,
7
7
  bell: t,
8
- info: x,
9
- user: k,
10
- plus: E,
11
- check: r,
12
- clock: m,
13
- inbox: b,
14
- minus: C,
15
- error: p,
16
- eyeOff: v,
17
- filter: y,
18
- search: D,
19
- loader: S,
20
- palette: w,
21
- columns: h,
22
- alert: d,
23
- calendar: n,
24
- download: g,
25
- success: f,
26
- chevronUp: s,
27
- panelLeft: T,
28
- warning: O,
29
- chevronDown: i,
30
- chevronLeft: a,
31
- chevronRight: o,
32
- chevronsLeft: c,
33
- chevronsRight: l,
34
- chevronUpDown: u
8
+ bold: n,
9
+ code: g,
10
+ info: E,
11
+ link: O,
12
+ list: k,
13
+ user: V,
14
+ plus: F,
15
+ check: i,
16
+ clock: h,
17
+ inbox: T,
18
+ minus: M,
19
+ quote: I,
20
+ error: m,
21
+ eyeOff: b,
22
+ filter: x,
23
+ italic: D,
24
+ search: L,
25
+ loader: j,
26
+ palette: N,
27
+ columns: _,
28
+ alert: f,
29
+ calendar: r,
30
+ download: v,
31
+ heading1: S,
32
+ heading2: C,
33
+ heading3: w,
34
+ success: p,
35
+ chevronUp: c,
36
+ panelLeft: P,
37
+ underline: B,
38
+ warning: z,
39
+ chevronDown: a,
40
+ chevronLeft: o,
41
+ listOrdered: A,
42
+ chevronRight: s,
43
+ chevronsLeft: l,
44
+ strikethrough: R,
45
+ chevronsRight: u,
46
+ chevronUpDown: d
35
47
  };
36
- function M() {
48
+ function W() {
37
49
  return { resolve(t) {
38
- return e(j, t);
50
+ return e(U, t);
39
51
  } };
40
52
  }
41
53
  //#endregion
42
- export { M as createLucideIconAdapter };
54
+ export { W as createLucideIconAdapter };
@@ -1,42 +1,54 @@
1
1
  import { get as e } from "es-toolkit/compat";
2
- import { PhBell as t, PhCalendarDots as n, PhCaretDoubleLeft as r, PhCaretDoubleRight as i, PhCaretDown as a, PhCaretLeft as o, PhCaretRight as s, PhCaretUp as c, PhCaretUpDown as l, PhCheck as u, PhCheckCircle as d, PhClock as f, PhColumns as p, PhDownloadSimple as m, PhEye as h, PhEyeSlash as g, PhFunnel as _, PhInfo as v, PhMagnifyingGlass as y, PhMinus as b, PhPalette as x, PhPlus as S, PhSidebar as C, PhSpinnerGap as w, PhTray as T, PhUser as E, PhWarning as D, PhWarningCircle as O, PhX as k, PhXCircle as A } from "@phosphor-icons/vue";
2
+ import { PhBell as t, PhCalendarDots as n, PhCaretDoubleLeft as r, PhCaretDoubleRight as i, PhCaretDown as a, PhCaretLeft as o, PhCaretRight as s, PhCaretUp as c, PhCaretUpDown as l, PhCheck as u, PhCheckCircle as d, PhClock as f, PhCode as p, PhColumns as m, PhDownloadSimple as h, PhEye as g, PhEyeSlash as _, PhFunnel as v, PhInfo as y, PhLink as b, PhListBullets as x, PhListNumbers as S, PhMagnifyingGlass as C, PhMinus as w, PhPalette as T, PhPlus as E, PhQuotes as D, PhSidebar as O, PhSpinnerGap as k, PhTextB as A, PhTextHOne as j, PhTextHThree as M, PhTextHTwo as N, PhTextItalic as P, PhTextStrikethrough as F, PhTextUnderline as I, PhTray as L, PhUser as R, PhWarning as z, PhWarningCircle as B, PhX as V, PhXCircle as H } from "@phosphor-icons/vue";
3
3
  //#region src/Adapters/Examples/icon-phosphor.ts
4
- var j = {
5
- eye: h,
6
- clear: k,
4
+ var U = {
5
+ eye: g,
6
+ clear: V,
7
7
  bell: t,
8
- info: v,
9
- user: E,
10
- plus: S,
11
- inbox: T,
8
+ code: p,
9
+ info: y,
10
+ link: b,
11
+ user: R,
12
+ plus: E,
13
+ bold: A,
14
+ inbox: L,
12
15
  check: u,
13
16
  clock: f,
14
- minus: b,
15
- error: A,
16
- filter: _,
17
- columns: p,
18
- eyeOff: g,
19
- palette: x,
20
- warning: D,
21
- loader: w,
17
+ minus: w,
18
+ quote: D,
19
+ error: H,
20
+ filter: v,
21
+ columns: m,
22
+ eyeOff: _,
23
+ palette: T,
24
+ warning: z,
25
+ list: x,
26
+ loader: k,
27
+ italic: P,
22
28
  chevronUp: c,
23
- panelLeft: C,
24
- alert: O,
29
+ panelLeft: O,
30
+ heading1: j,
31
+ heading2: N,
32
+ alert: B,
25
33
  success: d,
34
+ heading3: M,
26
35
  chevronDown: a,
27
36
  chevronLeft: o,
28
37
  calendar: n,
29
- search: y,
30
- download: m,
38
+ search: C,
39
+ download: h,
31
40
  chevronRight: s,
41
+ listOrdered: S,
42
+ underline: I,
32
43
  chevronUpDown: l,
33
44
  chevronsLeft: r,
34
- chevronsRight: i
45
+ chevronsRight: i,
46
+ strikethrough: F
35
47
  };
36
- function M() {
48
+ function W() {
37
49
  return { resolve(t) {
38
- return e(j, t);
50
+ return e(U, t);
39
51
  } };
40
52
  }
41
53
  //#endregion
42
- export { M as createPhosphorIconAdapter };
54
+ export { W as createPhosphorIconAdapter };
@@ -1,42 +1,54 @@
1
1
  import { get as e } from "es-toolkit/compat";
2
- import { IconAlertCircle as t, IconAlertTriangle as n, IconBell as r, IconCalendarMonth as i, IconCheck as a, IconChevronDown as o, IconChevronLeft as s, IconChevronRight as c, IconChevronUp as l, IconChevronsLeft as u, IconChevronsRight as d, IconCircleCheck as f, IconCircleX as p, IconClock as m, IconColumns3 as h, IconDownload as g, IconEye as _, IconEyeOff as v, IconFilter as y, IconInbox as b, IconInfoCircle as x, IconLayoutSidebar as S, IconLoader2 as C, IconMinus as w, IconPalette as T, IconPlus as E, IconSearch as D, IconSelector as O, IconUser as k, IconX as A } from "@tabler/icons-vue";
2
+ import { IconAlertCircle as t, IconAlertTriangle as n, IconBell as r, IconBold as i, IconCalendarMonth as a, IconCheck as o, IconChevronDown as s, IconChevronLeft as c, IconChevronRight as l, IconChevronUp as u, IconChevronsLeft as d, IconChevronsRight as f, IconCircleCheck as p, IconCircleX as m, IconClock as h, IconCode as g, IconColumns3 as _, IconDownload as v, IconEye as y, IconEyeOff as b, IconFilter as x, IconH1 as S, IconH2 as C, IconH3 as w, IconInbox as T, IconInfoCircle as E, IconItalic as D, IconLayoutSidebar as O, IconLink as k, IconList as A, IconListNumbers as j, IconLoader2 as M, IconMinus as N, IconPalette as P, IconPlus as F, IconQuote as I, IconSearch as L, IconSelector as R, IconStrikethrough as z, IconUnderline as B, IconUser as V, IconX as H } from "@tabler/icons-vue";
3
3
  //#region src/Adapters/Examples/icon-tabler.ts
4
- var j = {
5
- eye: _,
6
- clear: A,
4
+ var U = {
5
+ eye: y,
6
+ clear: H,
7
7
  bell: r,
8
- user: k,
9
- plus: E,
10
- inbox: b,
11
- check: a,
12
- clock: m,
13
- minus: w,
14
- error: p,
15
- eyeOff: v,
16
- filter: y,
17
- search: D,
18
- loader: C,
19
- info: x,
20
- palette: T,
21
- columns: h,
8
+ bold: i,
9
+ code: g,
10
+ link: k,
11
+ list: A,
12
+ user: V,
13
+ plus: F,
14
+ inbox: T,
15
+ check: o,
16
+ clock: h,
17
+ minus: N,
18
+ quote: I,
19
+ heading1: S,
20
+ heading2: C,
21
+ heading3: w,
22
+ error: m,
23
+ eyeOff: b,
24
+ filter: x,
25
+ italic: D,
26
+ search: L,
27
+ loader: M,
28
+ info: E,
29
+ palette: P,
30
+ columns: _,
22
31
  alert: t,
23
- download: g,
24
- success: f,
25
- chevronUp: l,
32
+ download: v,
33
+ success: p,
34
+ chevronUp: u,
35
+ underline: B,
26
36
  warning: n,
27
- chevronUpDown: O,
28
- calendar: i,
29
- panelLeft: S,
30
- chevronDown: o,
31
- chevronLeft: s,
32
- chevronRight: c,
33
- chevronsLeft: u,
34
- chevronsRight: d
37
+ chevronUpDown: R,
38
+ calendar: a,
39
+ panelLeft: O,
40
+ chevronDown: s,
41
+ chevronLeft: c,
42
+ listOrdered: j,
43
+ chevronRight: l,
44
+ chevronsLeft: d,
45
+ strikethrough: z,
46
+ chevronsRight: f
35
47
  };
36
- function M() {
48
+ function W() {
37
49
  return { resolve(t) {
38
- return e(j, t);
50
+ return e(U, t);
39
51
  } };
40
52
  }
41
53
  //#endregion
42
- export { M as createTablerIconAdapter };
54
+ export { W as createTablerIconAdapter };
@@ -0,0 +1,5 @@
1
+ import { RichTextEditorAdapter } from '@bridge-ui/core/Adapters';
2
+ /**
3
+ * Creates a TipTap-backed {@link RichTextEditorAdapter} for Bridge UI.
4
+ */
5
+ export declare function createTiptapRichTextAdapter(): RichTextEditorAdapter;
@@ -0,0 +1,138 @@
1
+ import { applyRichTextEditableA11y as e } from "@bridge-ui/core/Adapters";
2
+ import { get as t, isNil as n, isString as r } from "es-toolkit/compat";
3
+ import { Editor as i } from "@tiptap/core";
4
+ import a from "@tiptap/extension-link";
5
+ import o from "@tiptap/extension-placeholder";
6
+ import s from "@tiptap/extension-underline";
7
+ import c from "@tiptap/starter-kit";
8
+ //#region src/Adapters/Examples/rich-text-tiptap.ts
9
+ var l = [
10
+ "flex-1",
11
+ "outline-none",
12
+ "[&_p.is-editor-empty:first-child::before]:h-0",
13
+ "[&_p.is-editor-empty:first-child::before]:float-left",
14
+ "[&_p.is-editor-empty:first-child::before]:text-dark-400",
15
+ "[&_p.is-editor-empty:first-child::before]:pointer-events-none",
16
+ "[&_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]"
17
+ ].join(" ");
18
+ function u(e, t) {
19
+ return t === "json" ? e.getJSON() : e.getHTML();
20
+ }
21
+ function d(e, t) {
22
+ let r = e.extensionManager.extensions.find((e) => e.name === "placeholder");
23
+ n(r) || r.options.placeholder === t || (r.options.placeholder = t, e.view.dispatch(e.state.tr));
24
+ }
25
+ var f = {
26
+ bold: (e) => e.isActive("bold"),
27
+ link: (e) => e.isActive("link"),
28
+ italic: (e) => e.isActive("italic"),
29
+ strike: (e) => e.isActive("strike"),
30
+ codeBlock: (e) => e.isActive("codeBlock"),
31
+ underline: (e) => e.isActive("underline"),
32
+ blockquote: (e) => e.isActive("blockquote"),
33
+ bulletList: (e) => e.isActive("bulletList"),
34
+ orderedList: (e) => e.isActive("orderedList"),
35
+ heading1: (e) => e.isActive("heading", { level: 1 }),
36
+ heading2: (e) => e.isActive("heading", { level: 2 }),
37
+ heading3: (e) => e.isActive("heading", { level: 3 })
38
+ }, p = {
39
+ link: () => !0,
40
+ bold: (e) => e.can().toggleBold(),
41
+ italic: (e) => e.can().toggleItalic(),
42
+ strike: (e) => e.can().toggleStrike(),
43
+ codeBlock: (e) => e.can().toggleCodeBlock(),
44
+ underline: (e) => e.can().toggleUnderline(),
45
+ blockquote: (e) => e.can().toggleBlockquote(),
46
+ bulletList: (e) => e.can().toggleBulletList(),
47
+ orderedList: (e) => e.can().toggleOrderedList(),
48
+ heading1: (e) => e.can().toggleHeading({ level: 1 }),
49
+ heading2: (e) => e.can().toggleHeading({ level: 2 }),
50
+ heading3: (e) => e.can().toggleHeading({ level: 3 })
51
+ }, m = {
52
+ bold: (e) => e.chain().focus().toggleBold().run(),
53
+ italic: (e) => e.chain().focus().toggleItalic().run(),
54
+ strike: (e) => e.chain().focus().toggleStrike().run(),
55
+ codeBlock: (e) => e.chain().focus().toggleCodeBlock().run(),
56
+ underline: (e) => e.chain().focus().toggleUnderline().run(),
57
+ blockquote: (e) => e.chain().focus().toggleBlockquote().run(),
58
+ bulletList: (e) => e.chain().focus().toggleBulletList().run(),
59
+ orderedList: (e) => e.chain().focus().toggleOrderedList().run(),
60
+ heading1: (e) => e.chain().focus().toggleHeading({ level: 1 }).run(),
61
+ heading2: (e) => e.chain().focus().toggleHeading({ level: 2 }).run(),
62
+ heading3: (e) => e.chain().focus().toggleHeading({ level: 3 }).run(),
63
+ link: (e, t) => {
64
+ if (!n(t?.href) && t.href.length > 0) {
65
+ e.chain().focus().extendMarkRange("link").setLink({ href: t.href }).run();
66
+ return;
67
+ }
68
+ e.isActive("link") && e.chain().focus().unsetLink().run();
69
+ }
70
+ };
71
+ function h(e, n) {
72
+ return t(f, n, () => !1)(e);
73
+ }
74
+ function g(e, n) {
75
+ return t(p, n, () => !1)(e);
76
+ }
77
+ function _(e, n, r) {
78
+ t(m, n, () => void 0)(e, r);
79
+ }
80
+ function v() {
81
+ return { mount(t) {
82
+ let n = t.disabled === !0, f = t.readOnly === !0, p = !1, m = new i({
83
+ autofocus: !1,
84
+ element: t.element,
85
+ editable: !n && !f,
86
+ onSelectionUpdate: () => {
87
+ t.onSelectionChange?.();
88
+ },
89
+ editorProps: { attributes: { class: l } },
90
+ onUpdate: ({ editor: e }) => {
91
+ t.onChange(u(e, t.format));
92
+ },
93
+ content: t.value ?? (t.format === "json" ? {
94
+ type: "doc",
95
+ content: []
96
+ } : ""),
97
+ extensions: [
98
+ c,
99
+ s,
100
+ a.configure({ openOnClick: !1 }),
101
+ o.configure({ placeholder: t.placeholder ?? "" })
102
+ ]
103
+ });
104
+ return e(m.view.dom, t), {
105
+ getValue: () => u(m, t.format),
106
+ blur: () => {
107
+ p || m.commands.blur();
108
+ },
109
+ focus: () => {
110
+ p || m.commands.focus();
111
+ },
112
+ isActive: (e) => !p && h(m, e),
113
+ destroy: () => {
114
+ p || (p = !0, m.destroy());
115
+ },
116
+ can: (e) => p || n || f ? !1 : g(m, e),
117
+ setDisabled: (e) => {
118
+ p || (n = e, m.setEditable(!n && !f, !1));
119
+ },
120
+ setReadOnly: (e) => {
121
+ p || (f = e, m.setEditable(!n && !f, !1));
122
+ },
123
+ run: (e, t) => {
124
+ p || n || f || _(m, e, t);
125
+ },
126
+ setA11y: (t) => {
127
+ p || (e(m.view.dom, t), d(m, t.placeholder ?? ""));
128
+ },
129
+ setValue: (e) => {
130
+ if (p) return;
131
+ let n = t.format === "html" ? r(e) ? e : "" : e;
132
+ m.commands.setContent(n, { emitUpdate: !1 });
133
+ }
134
+ };
135
+ } };
136
+ }
137
+ //#endregion
138
+ export { v as createTiptapRichTextAdapter };
@@ -0,0 +1 @@
1
+ export { setRichTextAdapterForTests, useRichTextAdapter, } from './useRichTextAdapter';
@@ -0,0 +1,2 @@
1
+ import { setRichTextAdapterForTests as e, useRichTextAdapter as t } from "./useRichTextAdapter.js";
2
+ export { e as setRichTextAdapterForTests, t as useRichTextAdapter };
@@ -0,0 +1,5 @@
1
+ import { RichTextEditorAdapter } from '@bridge-ui/core/Adapters';
2
+ /**
3
+ * Creates a lightweight {@link RichTextEditorAdapter} for tests.
4
+ */
5
+ export declare function createMockRichTextAdapter(): RichTextEditorAdapter;
@@ -0,0 +1,12 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { RichTextEditorAdapter } from '@bridge-ui/core/Adapters';
3
+ /**
4
+ * Sets a process-wide rich-text adapter fallback. For tests only.
5
+ */
6
+ export declare function setRichTextAdapterForTests(adapter: undefined | RichTextEditorAdapter): void;
7
+ /**
8
+ * Returns the active rich-text adapter from {@link BridgeUIProvider}.
9
+ * `RichTextEditor` requires `global.richText` (e.g.
10
+ * `@bridge-ui/vue/Adapters/Examples/rich-text-tiptap`).
11
+ */
12
+ export declare function useRichTextAdapter(): ComputedRef<undefined | RichTextEditorAdapter>;
@@ -0,0 +1,13 @@
1
+ import { useBridgeUI as e } from "../../Provider/useBridgeUI.js";
2
+ import { computed as t } from "vue";
3
+ //#region src/Adapters/RichText/useRichTextAdapter.ts
4
+ var n;
5
+ function r(e) {
6
+ n = e;
7
+ }
8
+ function i() {
9
+ let r = e();
10
+ return t(() => r?.global.value.richText ?? n);
11
+ }
12
+ //#endregion
13
+ export { r as setRichTextAdapterForTests, i as useRichTextAdapter };
@@ -2,3 +2,4 @@ export { setDateAdapterForTests, useDateAdapter } from './Date';
2
2
  export { setI18nAdapterForTests, useI18nAdapter, useResolveMessage, } from './I18n';
3
3
  export { setIconAdapterForTests, useIconAdapter } from './Icon';
4
4
  export type { IconElement, IconSource, IconSourceValueOverrides, SemanticIconName, } from './Icon';
5
+ export { setRichTextAdapterForTests, useRichTextAdapter, } from './RichText';