@voidzero-dev/vitepress-theme 0.1.38 → 0.1.41

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 (95) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index100.js +13 -6
  3. package/dist/index101.js +57 -4
  4. package/dist/index102.js +5 -3
  5. package/dist/index103.js +39 -7
  6. package/dist/index104.js +20 -32
  7. package/dist/index105.js +25 -57
  8. package/dist/index106.js +9 -8
  9. package/dist/index107.js +54 -11
  10. package/dist/index108.js +34 -56
  11. package/dist/index109.js +119 -6
  12. package/dist/index110.js +86 -33
  13. package/dist/index111.js +8 -21
  14. package/dist/index112.js +2 -25
  15. package/dist/index113.js +7204 -7
  16. package/dist/index114.js +1730 -52
  17. package/dist/index115.js +434 -31
  18. package/dist/index116.js +12 -117
  19. package/dist/index117.js +5323 -91
  20. package/dist/index118.js +2 -8
  21. package/dist/index119.js +32 -438
  22. package/dist/index120.js +1202 -5
  23. package/dist/index121.js +5 -2
  24. package/dist/index122.js +3 -1734
  25. package/dist/index18.js +2 -2
  26. package/dist/index27.js +1 -1
  27. package/dist/index3.js +3 -3
  28. package/dist/index30.js +8 -8
  29. package/dist/index34.js +12 -12
  30. package/dist/index36.js +7 -7
  31. package/dist/index38.js +40 -40
  32. package/dist/index40.js +6 -6
  33. package/dist/index41.js +4 -4
  34. package/dist/index42.js +3 -3
  35. package/dist/index43.js +4 -4
  36. package/dist/index44.js +1 -1
  37. package/dist/index45.js +1 -1
  38. package/dist/index46.js +1 -1
  39. package/dist/index47.js +1 -1
  40. package/dist/index48.js +1 -1
  41. package/dist/index49.js +1 -1
  42. package/dist/index50.js +2 -2
  43. package/dist/index51.js +2 -25
  44. package/dist/index52.js +16 -20
  45. package/dist/index53.js +16 -122
  46. package/dist/index54.js +18 -2
  47. package/dist/index55.js +1 -1
  48. package/dist/index56.js +34 -2
  49. package/dist/index57.js +1 -1
  50. package/dist/index58.js +1 -1
  51. package/dist/index59.js +2 -2
  52. package/dist/index6.js +29 -29
  53. package/dist/index60.js +2 -2
  54. package/dist/index61.js +1 -1
  55. package/dist/index62.js +2 -2
  56. package/dist/index63.js +2 -2
  57. package/dist/index64.js +2 -2
  58. package/dist/index65.js +2 -2
  59. package/dist/index66.js +2 -2
  60. package/dist/index67.js +2 -18
  61. package/dist/index68.js +20 -16
  62. package/dist/index69.js +122 -16
  63. package/dist/index7.js +2 -2
  64. package/dist/index70.js +2 -2
  65. package/dist/index71.js +2 -2
  66. package/dist/index72.js +3 -2
  67. package/dist/index73.js +52 -34
  68. package/dist/index74.js +44 -3
  69. package/dist/index75.js +53 -2
  70. package/dist/index76.js +2 -2
  71. package/dist/index77.js +2587 -2
  72. package/dist/index78.js +2 -2
  73. package/dist/index79.js +2 -2
  74. package/dist/index8.js +3 -3
  75. package/dist/index80.js +2 -2
  76. package/dist/index81.js +2 -2
  77. package/dist/index82.js +2 -49
  78. package/dist/index83.js +3 -44
  79. package/dist/index84.js +2 -2587
  80. package/dist/index85.js +2 -51
  81. package/dist/index86.js +2 -7207
  82. package/dist/index87.js +2 -14
  83. package/dist/index88.js +2 -5324
  84. package/dist/index89.js +2 -2
  85. package/dist/index90.js +1 -1
  86. package/dist/index91.js +1 -1
  87. package/dist/index92.js +10 -2
  88. package/dist/index93.js +7 -2
  89. package/dist/index94.js +5 -2
  90. package/dist/index95.js +4 -2
  91. package/dist/index96.js +6 -32
  92. package/dist/index97.js +31 -1200
  93. package/dist/index98.js +56 -3
  94. package/dist/index99.js +8 -9
  95. package/package.json +1 -1
package/dist/index110.js CHANGED
@@ -1,41 +1,94 @@
1
- import { renderSlotFragments as u } from "./index101.js";
2
- import { usePresence as f } from "./index108.js";
3
- import { defineComponent as d, toRefs as m, ref as h, getCurrentInstance as v, h as y } from "vue";
4
- import { unrefElement as w } from "./index105.js";
5
- var x = d({
6
- name: "Presence",
1
+ import { useId as b } from "./index99.js";
2
+ import { Primitive as y } from "./index105.js";
3
+ import { useCollection as I } from "./index107.js";
4
+ import { getFocusIntent as g, wrapArray as F, focusFirst as K } from "./index108.js";
5
+ import { injectRovingFocusGroupContext as S } from "./index109.js";
6
+ import { defineComponent as h, computed as u, onMounted as C, onUnmounted as w, createBlock as T, openBlock as q, unref as i, withCtx as s, createVNode as B, renderSlot as x, nextTick as R } from "vue";
7
+ var _ = /* @__PURE__ */ h({
8
+ __name: "RovingFocusItem",
7
9
  props: {
8
- present: {
10
+ tabStopId: {
11
+ type: String,
12
+ required: !1
13
+ },
14
+ focusable: {
15
+ type: Boolean,
16
+ required: !1,
17
+ default: !0
18
+ },
19
+ active: {
20
+ type: Boolean,
21
+ required: !1
22
+ },
23
+ allowShiftKey: {
24
+ type: Boolean,
25
+ required: !1
26
+ },
27
+ asChild: {
9
28
  type: Boolean,
10
- required: !0
29
+ required: !1
11
30
  },
12
- forceMount: { type: Boolean }
31
+ as: {
32
+ type: null,
33
+ required: !1,
34
+ default: "span"
35
+ }
13
36
  },
14
- slots: {},
15
- setup(l, { slots: a, expose: c }) {
16
- const { present: i, forceMount: p } = m(l), r = h(), { isPresent: t } = f(i, r);
17
- c({ present: t });
18
- let n = a.default({ present: t.value });
19
- n = u(n || []);
20
- const s = v();
21
- if (n && n?.length > 1) {
22
- const o = s?.parent?.type.name ? `<${s.parent.type.name} />` : "component";
23
- throw new Error([
24
- `Detected an invalid children for \`${o}\` for \`Presence\` component.`,
25
- "",
26
- "Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",
27
- "You can apply a few solutions:",
28
- ["Provide a single child element so that `presence` directive attach correctly.", "Ensure the first child is an actual element instead of a raw text node or comment node."].map((e) => ` - ${e}`).join(`
29
- `)
30
- ].join(`
31
- `));
37
+ setup(d) {
38
+ const n = d, t = S(), f = b(), l = u(() => n.tabStopId || f), c = u(() => t.currentTabStopId.value === l.value), { getItems: p, CollectionItem: m } = I();
39
+ C(() => {
40
+ n.focusable && t.onFocusableItemAdd();
41
+ }), w(() => {
42
+ n.focusable && t.onFocusableItemRemove();
43
+ });
44
+ function v(e) {
45
+ if (e.key === "Tab" && e.shiftKey) {
46
+ t.onItemShiftTab();
47
+ return;
48
+ }
49
+ if (e.target !== e.currentTarget) return;
50
+ const o = g(e, t.orientation.value, t.dir.value);
51
+ if (o !== void 0) {
52
+ if (e.metaKey || e.ctrlKey || e.altKey || !n.allowShiftKey && e.shiftKey) return;
53
+ e.preventDefault();
54
+ let a = [...p().map((r) => r.ref).filter((r) => r.dataset.disabled !== "")];
55
+ if (o === "last") a.reverse();
56
+ else if (o === "prev" || o === "next") {
57
+ o === "prev" && a.reverse();
58
+ const r = a.indexOf(e.currentTarget);
59
+ a = t.loop.value ? F(a, r + 1) : a.slice(r + 1);
60
+ }
61
+ R(() => K(a));
62
+ }
32
63
  }
33
- return () => p.value || i.value || t.value ? y(a.default({ present: t.value })[0], { ref: (o) => {
34
- const e = w(o);
35
- return typeof e?.hasAttribute > "u" || (e?.hasAttribute("data-reka-popper-content-wrapper") ? r.value = e.firstElementChild : r.value = e), e;
36
- } }) : null;
64
+ return (e, o) => (q(), T(i(m), null, {
65
+ default: s(() => [B(i(y), {
66
+ tabindex: c.value ? 0 : -1,
67
+ "data-orientation": i(t).orientation.value,
68
+ "data-active": e.active ? "" : void 0,
69
+ "data-disabled": e.focusable ? void 0 : "",
70
+ as: e.as,
71
+ "as-child": e.asChild,
72
+ onMousedown: o[0] || (o[0] = (a) => {
73
+ e.focusable ? i(t).onItemFocus(l.value) : a.preventDefault();
74
+ }),
75
+ onFocus: o[1] || (o[1] = (a) => i(t).onItemFocus(l.value)),
76
+ onKeydown: v
77
+ }, {
78
+ default: s(() => [x(e.$slots, "default")]),
79
+ _: 3
80
+ }, 8, [
81
+ "tabindex",
82
+ "data-orientation",
83
+ "data-active",
84
+ "data-disabled",
85
+ "as",
86
+ "as-child"
87
+ ])]),
88
+ _: 3
89
+ }));
37
90
  }
38
- });
91
+ }), j = _;
39
92
  export {
40
- x as Presence_default
93
+ j as RovingFocusItem_default
41
94
  };
package/dist/index111.js CHANGED
@@ -1,23 +1,10 @@
1
- import { renderSlotFragments as s } from "./index101.js";
2
- import { defineComponent as d, Comment as l, mergeProps as f, cloneVNode as c } from "vue";
3
- const a = d({
4
- name: "PrimitiveSlot",
5
- inheritAttrs: !1,
6
- setup(u, { attrs: t, slots: o }) {
7
- return () => {
8
- if (!o.default) return null;
9
- const e = s(o.default()), n = e.findIndex((p) => p.type !== l);
10
- if (n === -1) return e;
11
- const r = e[n];
12
- delete r.props?.ref;
13
- const m = r.props ? f(t, r.props) : t, i = c({
14
- ...r,
15
- props: {}
16
- }, m);
17
- return e.length === 1 ? i : (e[n] = i, e);
18
- };
19
- }
20
- });
1
+ function e(n, t) {
2
+ return `${n}-trigger-${t}`;
3
+ }
4
+ function r(n, t) {
5
+ return `${n}-content-${t}`;
6
+ }
21
7
  export {
22
- a as Slot
8
+ r as makeContentId,
9
+ e as makeTriggerId
23
10
  };
package/dist/index112.js CHANGED
@@ -1,27 +1,4 @@
1
- import { Slot as r } from "./index111.js";
2
- import { defineComponent as f, h as a } from "vue";
3
- const l = [
4
- "area",
5
- "img",
6
- "input"
7
- ], d = f({
8
- name: "Primitive",
9
- inheritAttrs: !1,
10
- props: {
11
- asChild: {
12
- type: Boolean,
13
- default: !1
14
- },
15
- as: {
16
- type: [String, Object],
17
- default: "div"
18
- }
19
- },
20
- setup(t, { attrs: i, slots: n }) {
21
- const e = t.asChild ? "template" : t.as;
22
- return typeof e == "string" && l.includes(e) ? () => a(e, i) : e !== "template" ? () => a(t.as, i, { default: n.default }) : () => a(r, i, { default: n.default });
23
- }
24
- });
1
+ import f from "./index56.js";
25
2
  export {
26
- d as Primitive
3
+ f as default
27
4
  };