@wakastellar/ui 3.3.3 → 3.5.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 (140) hide show
  1. package/dist/badge-BbwO7QeZ.js +1 -0
  2. package/dist/badge-BfiocODp.mjs +23 -0
  3. package/dist/charts.cjs.js +1 -1
  4. package/dist/charts.es.js +1 -1
  5. package/dist/chunk-14q5BKub.js +1 -0
  6. package/dist/{chunk-BH6uBOac.mjs → chunk-Cr9pTUWm.mjs} +5 -5
  7. package/dist/cn-DEtaFQsA.js +1 -0
  8. package/dist/cn-DUn6aSIQ.mjs +24 -0
  9. package/dist/doc.cjs.js +2 -2
  10. package/dist/doc.es.js +19 -19
  11. package/dist/editor.cjs.js +48 -0
  12. package/dist/editor.d.ts +1 -0
  13. package/dist/editor.es.js +6551 -0
  14. package/dist/{exceljs.min-DG9M8IZ1.mjs → exceljs.min-DL1XYDll.mjs} +1 -1
  15. package/dist/{exceljs.min-BuefmDRS.js → exceljs.min-qeIfSCbF.js} +1 -1
  16. package/dist/export.cjs.js +1 -1
  17. package/dist/export.es.js +1 -1
  18. package/dist/index.cjs.js +150 -150
  19. package/dist/index.es.js +26782 -27591
  20. package/dist/input-BfaSAGVw.js +1 -0
  21. package/dist/input-DVr_Qkl8.mjs +14 -0
  22. package/dist/rich-text.cjs.js +1 -1
  23. package/dist/rich-text.es.js +1 -1
  24. package/dist/security-CyBpuklN.mjs +122 -0
  25. package/dist/security-bFWwDrlg.js +1 -0
  26. package/dist/separator-NrkltulH.js +1 -0
  27. package/dist/separator-ibN2mycs.mjs +51 -0
  28. package/dist/src/components/editor/blocks/index.d.ts +51 -0
  29. package/dist/src/components/editor/blocks/waka-acceptance-criteria-block.d.ts +60 -0
  30. package/dist/src/components/editor/blocks/waka-ai-assist-block.d.ts +58 -0
  31. package/dist/src/components/editor/blocks/waka-api-endpoint-block.d.ts +63 -0
  32. package/dist/src/components/editor/blocks/waka-code-playground-block.d.ts +61 -0
  33. package/dist/src/components/editor/blocks/waka-comment-thread-block.d.ts +85 -0
  34. package/dist/src/components/editor/blocks/waka-diagram-block.d.ts +52 -0
  35. package/dist/src/components/editor/blocks/waka-embed-block.d.ts +58 -0
  36. package/dist/src/components/editor/blocks/waka-slash-menu-block.d.ts +67 -0
  37. package/dist/src/components/editor/blocks/waka-user-story-block.d.ts +79 -0
  38. package/dist/src/components/editor/blocks/waka-version-diff-block.d.ts +73 -0
  39. package/dist/src/components/editor/index.d.ts +66 -0
  40. package/dist/src/components/editor/waka-ai-writer.d.ts +80 -0
  41. package/dist/src/components/editor/waka-collaborative-editor.d.ts +93 -0
  42. package/dist/src/components/editor/waka-diff-viewer.d.ts +71 -0
  43. package/dist/src/components/editor/waka-dnd-editor.d.ts +64 -0
  44. package/dist/src/components/editor/waka-document-editor.d.ts +92 -0
  45. package/dist/src/components/editor/waka-editor-elements.d.ts +79 -0
  46. package/dist/src/components/editor/waka-editor-leaves.d.ts +39 -0
  47. package/dist/src/components/editor/waka-editor-plugins.d.ts +41 -0
  48. package/dist/src/components/editor/waka-editor-toolbar.d.ts +20 -0
  49. package/dist/src/components/editor/waka-editor.d.ts +59 -0
  50. package/dist/src/components/editor/waka-floating-toolbar.d.ts +47 -0
  51. package/dist/src/components/editor/waka-markdown-editor.d.ts +60 -0
  52. package/dist/src/components/editor/waka-mention-editor.d.ts +125 -0
  53. package/dist/src/components/editor/waka-slash-menu.d.ts +70 -0
  54. package/dist/src/components/editor/waka-spec-editor.d.ts +88 -0
  55. package/dist/src/components/index.d.ts +1 -15
  56. package/dist/src/editor.d.ts +26 -0
  57. package/dist/textarea-CdQWggYG.js +1 -0
  58. package/dist/textarea-DJDXJ3nd.mjs +23 -0
  59. package/dist/types-C2St0wOW.js +1 -0
  60. package/dist/{types-B6GVaSIP.mjs → types-JnqoLyuv.mjs} +214 -211
  61. package/dist/{useDataTableImport-BPvfo--2.mjs → useDataTableImport-BWUFesPi.mjs} +3 -3
  62. package/dist/{useDataTableImport-Cm_pCKnO.js → useDataTableImport-T7ddpN5k.js} +3 -3
  63. package/dist/waka-doc-renderer-CTxC7Trf.js +3 -0
  64. package/dist/{waka-doc-renderer-BkIvas3z.mjs → waka-doc-renderer-Cw-Xnyen.mjs} +264 -281
  65. package/dist/waka-editor-plugins-DR6tpsUC.mjs +135 -0
  66. package/dist/waka-editor-plugins-sGSh9hn2.js +1 -0
  67. package/dist/waka-rich-text-editor-BlIdtknG.js +1 -0
  68. package/dist/waka-rich-text-editor-D1uA3zbB.js +1 -0
  69. package/dist/waka-rich-text-editor-DgSWiXMW.mjs +342 -0
  70. package/dist/waka-rich-text-editor-DndVJuDw.mjs +2 -0
  71. package/package.json +87 -2
  72. package/src/blocks/footer/index.tsx +1 -6
  73. package/src/blocks/login/index.tsx +1 -7
  74. package/src/blocks/profile/index.tsx +3 -5
  75. package/src/components/editor/blocks/index.ts +182 -0
  76. package/src/components/editor/blocks/waka-acceptance-criteria-block.tsx +326 -0
  77. package/src/components/editor/blocks/waka-ai-assist-block.tsx +284 -0
  78. package/src/components/editor/blocks/waka-api-endpoint-block.tsx +382 -0
  79. package/src/components/editor/blocks/waka-code-playground-block.tsx +331 -0
  80. package/src/components/editor/blocks/waka-comment-thread-block.tsx +448 -0
  81. package/src/components/editor/blocks/waka-diagram-block.tsx +293 -0
  82. package/src/components/editor/blocks/waka-embed-block.tsx +416 -0
  83. package/src/components/editor/blocks/waka-slash-menu-block.tsx +432 -0
  84. package/src/components/editor/blocks/waka-user-story-block.tsx +295 -0
  85. package/src/components/editor/blocks/waka-version-diff-block.tsx +426 -0
  86. package/src/components/editor/index.ts +279 -0
  87. package/src/components/editor/waka-ai-writer.tsx +434 -0
  88. package/src/components/editor/waka-collaborative-editor.tsx +426 -0
  89. package/src/components/editor/waka-diff-viewer.tsx +352 -0
  90. package/src/components/editor/waka-dnd-editor.tsx +284 -0
  91. package/src/components/editor/waka-document-editor.tsx +502 -0
  92. package/src/components/editor/waka-editor-elements.tsx +312 -0
  93. package/src/components/editor/waka-editor-leaves.tsx +101 -0
  94. package/src/components/editor/waka-editor-plugins.ts +207 -0
  95. package/src/components/editor/waka-editor-toolbar.tsx +358 -0
  96. package/src/components/editor/waka-editor.tsx +431 -0
  97. package/src/components/editor/waka-floating-toolbar.tsx +268 -0
  98. package/src/components/editor/waka-markdown-editor.tsx +395 -0
  99. package/src/components/editor/waka-mention-editor.tsx +459 -0
  100. package/src/components/editor/waka-slash-menu.tsx +392 -0
  101. package/src/components/editor/waka-spec-editor.tsx +657 -0
  102. package/src/components/index.ts +1 -18
  103. package/dist/chunk-BDDJmn7V.js +0 -1
  104. package/dist/cn-DnPbmOCy.js +0 -1
  105. package/dist/cn-DpLcAzrf.mjs +0 -22
  106. package/dist/separator-BDReXBvI.mjs +0 -59
  107. package/dist/separator-BKjNl9sI.js +0 -1
  108. package/dist/src/components/waka-actor-badge/index.d.ts +0 -8
  109. package/dist/src/components/waka-actors-list/index.d.ts +0 -18
  110. package/dist/src/components/waka-ai-assistant-button/index.d.ts +0 -8
  111. package/dist/src/components/waka-document-flyover/index.d.ts +0 -10
  112. package/dist/src/components/waka-document-preview-popup/index.d.ts +0 -26
  113. package/dist/src/components/waka-hour-balance-badge/index.d.ts +0 -8
  114. package/dist/src/components/waka-hour-consumption-table/index.d.ts +0 -15
  115. package/dist/src/components/waka-hour-pack-dialog/index.d.ts +0 -8
  116. package/dist/src/components/waka-project-stats-header/index.d.ts +0 -15
  117. package/dist/src/components/waka-step-comment-bubble/index.d.ts +0 -13
  118. package/dist/src/components/waka-step-comment-panel/index.d.ts +0 -20
  119. package/dist/src/components/waka-step-permission-matrix/index.d.ts +0 -12
  120. package/dist/src/components/waka-time-entry-dialog/index.d.ts +0 -16
  121. package/dist/src/components/waka-time-tracking-flyover/index.d.ts +0 -11
  122. package/dist/types-BH9cQRqZ.js +0 -1
  123. package/dist/waka-doc-renderer-BZ2-SqyT.js +0 -3
  124. package/dist/waka-rich-text-editor-BJGlQgpq.js +0 -1
  125. package/dist/waka-rich-text-editor-BJzzxeP1.mjs +0 -361
  126. package/dist/waka-rich-text-editor-wnXLwvUo.js +0 -1
  127. package/src/components/waka-actor-badge/index.tsx +0 -34
  128. package/src/components/waka-actors-list/index.tsx +0 -125
  129. package/src/components/waka-ai-assistant-button/index.tsx +0 -31
  130. package/src/components/waka-document-flyover/index.tsx +0 -36
  131. package/src/components/waka-document-preview-popup/index.tsx +0 -103
  132. package/src/components/waka-hour-balance-badge/index.tsx +0 -43
  133. package/src/components/waka-hour-consumption-table/index.tsx +0 -72
  134. package/src/components/waka-hour-pack-dialog/index.tsx +0 -72
  135. package/src/components/waka-project-stats-header/index.tsx +0 -69
  136. package/src/components/waka-step-comment-bubble/index.tsx +0 -71
  137. package/src/components/waka-step-comment-panel/index.tsx +0 -106
  138. package/src/components/waka-step-permission-matrix/index.tsx +0 -65
  139. package/src/components/waka-time-entry-dialog/index.tsx +0 -131
  140. package/src/components/waka-time-tracking-flyover/index.tsx +0 -41
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-14q5BKub.js`),t=require(`./cn-DEtaFQsA.js`);let n=require(`react`);n=e.a(n);let r=require(`class-variance-authority`),i=require(`react/jsx-runtime`);t.n();var a=(0,r.cva)(`inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80`,secondary:`border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80`,destructive:`border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80`,outline:`text-foreground`}},defaultVariants:{variant:`default`}});function o({className:e,variant:n,...r}){return(0,i.jsx)(`div`,{className:t.t(a({variant:n}),e),...r})}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -0,0 +1,23 @@
1
+ import { n as e, t } from "./cn-DUn6aSIQ.mjs";
2
+ import "react";
3
+ import { cva as n } from "class-variance-authority";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ //#region src/components/badge/index.tsx
6
+ e();
7
+ var i = n("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
8
+ variants: { variant: {
9
+ default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
10
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
11
+ destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
12
+ outline: "text-foreground"
13
+ } },
14
+ defaultVariants: { variant: "default" }
15
+ });
16
+ function a({ className: e, variant: n, ...a }) {
17
+ return /* @__PURE__ */ r("div", {
18
+ className: t(i({ variant: n }), e),
19
+ ...a
20
+ });
21
+ }
22
+ //#endregion
23
+ export { i as n, a as t };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./types-BH9cQRqZ.js`);exports.CHART_SIZE_MAP=e.t,exports.DEFAULT_CHART_COLORS=e.n,exports.WakaAreaChart=e.c,exports.WakaBarChart=e.u,exports.WakaChart=e.d,exports.WakaLineChart=e.l,exports.WakaMiniChart=e.a,exports.WakaPieChart=e.s,exports.WakaSparkline=e.o,exports.createChartColumn=e.r,exports.sparklineTemplate=e.i,exports.useChartTheme=e.f,exports.useRechartsLoader=e.p;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-14q5BKub.js`);const e=require(`./types-C2St0wOW.js`);exports.CHART_SIZE_MAP=e.t,exports.DEFAULT_CHART_COLORS=e.n,exports.WakaAreaChart=e.c,exports.WakaBarChart=e.u,exports.WakaChart=e.d,exports.WakaLineChart=e.l,exports.WakaMiniChart=e.a,exports.WakaPieChart=e.s,exports.WakaSparkline=e.o,exports.createChartColumn=e.r,exports.sparklineTemplate=e.i,exports.useChartTheme=e.f,exports.useRechartsLoader=e.p;
package/dist/charts.es.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./types-B6GVaSIP.mjs";
1
+ import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./types-JnqoLyuv.mjs";
2
2
  export { d as CHART_SIZE_MAP, o as DEFAULT_CHART_COLORS, t as WakaAreaChart, f as WakaBarChart, n as WakaChart, a as WakaLineChart, e as WakaMiniChart, u as WakaPieChart, s as WakaSparkline, l as createChartColumn, i as sparklineTemplate, r as useChartTheme, c as useRechartsLoader };
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
@@ -1,23 +1,23 @@
1
1
  //#region \0rolldown/runtime.js
2
- var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), s = (e, n) => {
2
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (e && (t = e(e = 0)), t), s = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), c = (e, n) => {
3
3
  let r = {};
4
4
  for (var i in e) t(r, i, {
5
5
  get: e[i],
6
6
  enumerable: !0
7
7
  });
8
8
  return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
9
- }, c = (e, i, o, s) => {
9
+ }, l = (e, i, o, s) => {
10
10
  if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
11
11
  get: ((e) => i[e]).bind(null, d),
12
12
  enumerable: !(s = n(i, d)) || s.enumerable
13
13
  });
14
14
  return e;
15
- }, l = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
15
+ }, u = (n, r, a) => (a = n == null ? {} : e(i(n)), l(r || !n || !n.__esModule ? t(a, "default", {
16
16
  value: n,
17
17
  enumerable: !0
18
- }) : a, n)), u = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
18
+ }) : a, n)), d = (e) => a.call(e, "module.exports") ? e["module.exports"] : l(t({}, "__esModule", { value: !0 }), e), f = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
19
19
  if (typeof require < "u") return require.apply(this, arguments);
20
20
  throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
21
21
  });
22
22
  //#endregion
23
- export { l as i, s as n, u as r, o as t };
23
+ export { d as a, f as i, o as n, u as o, c as r, s as t };
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-14q5BKub.js`);let t=require(`clsx`),n=require(`tailwind-merge`),r=require(`class-variance-authority`);function i(...e){return(0,n.twMerge)((0,t.clsx)(...e))}var a=e.n((()=>{i.variants=function(e){let t={variants:e.variants??{},defaultVariants:e.defaultVariants},n=(0,r.cva)(e.base??``,t);return e=>{let{class:t,className:r,...a}=e??{};return i(n(a),t,r)}}})),o,s=e.n((()=>{a(),o=(...e)=>i(e)}));Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -0,0 +1,24 @@
1
+ import { n as e } from "./chunk-Cr9pTUWm.mjs";
2
+ import { clsx as t } from "clsx";
3
+ import { twMerge as n } from "tailwind-merge";
4
+ import { cva as r } from "class-variance-authority";
5
+ //#region src/utils/tweak.ts
6
+ function i(...e) {
7
+ return n(t(...e));
8
+ }
9
+ var a = e((() => {
10
+ i.variants = function(e) {
11
+ let t = {
12
+ variants: e.variants ?? {},
13
+ defaultVariants: e.defaultVariants
14
+ }, n = r(e.base ?? "", t);
15
+ return (e) => {
16
+ let { class: t, className: r, ...a } = e ?? {};
17
+ return i(n(a), t, r);
18
+ };
19
+ };
20
+ })), o, s = e((() => {
21
+ a(), o = (...e) => i(e);
22
+ }));
23
+ //#endregion
24
+ export { i, s as n, a as r, o as t };
package/dist/doc.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./chunk-BDDJmn7V.js`),t=require(`./cn-DnPbmOCy.js`),n=require(`./waka-doc-renderer-BZ2-SqyT.js`),r=require(`./separator-BKjNl9sI.js`);let i=require(`react`);i=e.n(i);let a=require(`lucide-react`),o=require(`react/jsx-runtime`);function s({content:e,mode:s=`view`,canEdit:l=!1,onModeChange:u,onChange:d,debounceMs:f=1500,saveStatus:p=`idle`,navItems:m,activePageId:h,onPageChange:g,breadcrumbs:_,onBreadcrumbClick:v,searchPages:y,onSearchSelect:b,versions:x,currentVersion:S,onVersionChange:C,className:w}){let[T,E]=i.useState([]),[D,O]=i.useState(!1),[k,A]=i.useState(e);i.useEffect(()=>{A(e)},[e]);let j=i.useRef(),M=i.useCallback(e=>{A(e),j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{d?.(e)},f)},[d,f]);i.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);let N=m&&m.length>0,P=y&&y.length>0,F=x&&x.length>0&&S;return(0,o.jsxs)(`div`,{className:t.t(`relative flex min-h-screen`,w),children:[N&&(0,o.jsx)(r.r,{variant:`ghost`,size:`icon`,className:`fixed left-4 top-4 z-50 lg:hidden`,onClick:()=>O(!D),children:D?(0,o.jsx)(a.X,{className:`h-5 w-5`}):(0,o.jsx)(a.Menu,{className:`h-5 w-5`})}),N&&(0,o.jsx)(`aside`,{className:t.t(`fixed inset-y-0 left-0 z-40 w-72 shrink-0 border-r border-border/50 bg-background/95 backdrop-blur-md transition-transform duration-300 lg:relative lg:translate-x-0`,D?`translate-x-0`:`-translate-x-full`),children:(0,o.jsxs)(`div`,{className:`flex h-full flex-col gap-4 overflow-y-auto p-4`,children:[P&&(0,o.jsx)(n.o,{pages:y,onSelect:e=>{b?.(e),O(!1)}}),F&&(0,o.jsx)(n.a,{versions:x,current:S,onVersionChange:C}),(0,o.jsx)(n.s,{items:m,activeId:h,onItemClick:e=>{g?.(e),O(!1)}})]})}),N&&D&&(0,o.jsx)(`div`,{className:`fixed inset-0 z-30 bg-black/50 lg:hidden`,onClick:()=>O(!1)}),(0,o.jsxs)(`main`,{className:`flex min-w-0 flex-1 gap-8`,children:[(0,o.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl px-4 py-8 lg:px-8`,children:[(0,o.jsxs)(`div`,{className:`mb-6 flex flex-col gap-3`,children:[_&&_.length>0&&(0,o.jsx)(n.r,{items:_,onItemClick:v}),(0,o.jsx)(n.i,{content:k,mode:s,canEdit:l,onModeChange:u,saveStatus:p})]}),s===`view`?(0,o.jsx)(n.t,{content:k,onHeadingsExtracted:E}):(0,o.jsx)(c,{content:k,onChange:M,onHeadingsExtracted:E})]}),T.length>0&&(0,o.jsx)(`aside`,{className:`hidden w-56 shrink-0 py-8 xl:block`,children:(0,o.jsx)(n.c,{items:T})})]})]})}function c({content:e,onChange:t,onHeadingsExtracted:n}){let[r,a]=i.useState(null);return i.useEffect(()=>{(async()=>{try{let{WakaRichTextEditor:e}=await Promise.resolve().then(()=>require(`./waka-rich-text-editor-wnXLwvUo.js`));a(()=>e)}catch{}})()},[]),i.useEffect(()=>{let t=[],r=e.split(`
2
- `);for(let e of r){let n=e.match(/^(#{2,4})\s+(.+)$/);if(n){let e=n[1].length,r=n[2].replace(/[`*_~]/g,``),i=r.toLowerCase().replace(/[^\w\s-]/g,``).replace(/\s+/g,`-`);t.push({id:i,text:r,level:e})}}n(t)},[e,n]),r?(0,o.jsx)(r,{value:e,onChange:t,placeholder:`Écrivez votre documentation...`,minHeight:400,editable:!0}):(0,o.jsx)(`textarea`,{value:e,onChange:e=>t(e.target.value),className:`min-h-[400px] w-full rounded-lg border border-border/50 bg-background p-4 font-mono text-sm focus:outline-none focus:ring-2 focus:ring-primary/50`,placeholder:`Écrivez en markdown...`})}exports.WakaDocBreadcrumb=n.r,exports.WakaDocCallout=n.u,exports.WakaDocCodeBlock=n.l,exports.WakaDocNav=n.s,exports.WakaDocRenderer=n.t,exports.WakaDocSearch=n.o,exports.WakaDocShell=s,exports.WakaDocTable=n.n,exports.WakaDocToc=n.c,exports.WakaDocToolbar=n.i,exports.WakaDocVersion=n.a;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./chunk-14q5BKub.js`),t=require(`./cn-DEtaFQsA.js`),n=require(`./separator-NrkltulH.js`),r=require(`./waka-doc-renderer-CTxC7Trf.js`);let i=require(`react`);i=e.a(i);let a=require(`lucide-react`),o=require(`react/jsx-runtime`);function s({content:e,mode:s=`view`,canEdit:l=!1,onModeChange:u,onChange:d,debounceMs:f=1500,saveStatus:p=`idle`,navItems:m,activePageId:h,onPageChange:g,breadcrumbs:_,onBreadcrumbClick:v,searchPages:y,onSearchSelect:b,versions:x,currentVersion:S,onVersionChange:C,className:w}){let[T,E]=i.useState([]),[D,O]=i.useState(!1),[k,A]=i.useState(e);i.useEffect(()=>{A(e)},[e]);let j=i.useRef(),M=i.useCallback(e=>{A(e),j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{d?.(e)},f)},[d,f]);i.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);let N=m&&m.length>0,P=y&&y.length>0,F=x&&x.length>0&&S;return(0,o.jsxs)(`div`,{className:t.t(`relative flex min-h-screen`,w),children:[N&&(0,o.jsx)(n.n,{variant:`ghost`,size:`icon`,className:`fixed left-4 top-4 z-50 lg:hidden`,onClick:()=>O(!D),children:D?(0,o.jsx)(a.X,{className:`h-5 w-5`}):(0,o.jsx)(a.Menu,{className:`h-5 w-5`})}),N&&(0,o.jsx)(`aside`,{className:t.t(`fixed inset-y-0 left-0 z-40 w-72 shrink-0 border-r border-border/50 bg-background/95 backdrop-blur-md transition-transform duration-300 lg:relative lg:translate-x-0`,D?`translate-x-0`:`-translate-x-full`),children:(0,o.jsxs)(`div`,{className:`flex h-full flex-col gap-4 overflow-y-auto p-4`,children:[P&&(0,o.jsx)(r.o,{pages:y,onSelect:e=>{b?.(e),O(!1)}}),F&&(0,o.jsx)(r.a,{versions:x,current:S,onVersionChange:C}),(0,o.jsx)(r.s,{items:m,activeId:h,onItemClick:e=>{g?.(e),O(!1)}})]})}),N&&D&&(0,o.jsx)(`div`,{className:`fixed inset-0 z-30 bg-black/50 lg:hidden`,onClick:()=>O(!1)}),(0,o.jsxs)(`main`,{className:`flex min-w-0 flex-1 gap-8`,children:[(0,o.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl px-4 py-8 lg:px-8`,children:[(0,o.jsxs)(`div`,{className:`mb-6 flex flex-col gap-3`,children:[_&&_.length>0&&(0,o.jsx)(r.r,{items:_,onItemClick:v}),(0,o.jsx)(r.i,{content:k,mode:s,canEdit:l,onModeChange:u,saveStatus:p})]}),s===`view`?(0,o.jsx)(r.t,{content:k,onHeadingsExtracted:E}):(0,o.jsx)(c,{content:k,onChange:M,onHeadingsExtracted:E})]}),T.length>0&&(0,o.jsx)(`aside`,{className:`hidden w-56 shrink-0 py-8 xl:block`,children:(0,o.jsx)(r.c,{items:T})})]})]})}function c({content:e,onChange:t,onHeadingsExtracted:n}){let[r,a]=i.useState(null);return i.useEffect(()=>{(async()=>{try{let{WakaRichTextEditor:e}=await Promise.resolve().then(()=>require(`./waka-rich-text-editor-BlIdtknG.js`));a(()=>e)}catch{}})()},[]),i.useEffect(()=>{let t=[],r=e.split(`
2
+ `);for(let e of r){let n=e.match(/^(#{2,4})\s+(.+)$/);if(n){let e=n[1].length,r=n[2].replace(/[`*_~]/g,``),i=r.toLowerCase().replace(/[^\w\s-]/g,``).replace(/\s+/g,`-`);t.push({id:i,text:r,level:e})}}n(t)},[e,n]),r?(0,o.jsx)(r,{value:e,onChange:t,placeholder:`Écrivez votre documentation...`,minHeight:400,editable:!0}):(0,o.jsx)(`textarea`,{value:e,onChange:e=>t(e.target.value),className:`min-h-[400px] w-full rounded-lg border border-border/50 bg-background p-4 font-mono text-sm focus:outline-none focus:ring-2 focus:ring-primary/50`,placeholder:`Écrivez en markdown...`})}exports.WakaDocBreadcrumb=r.r,exports.WakaDocCallout=r.u,exports.WakaDocCodeBlock=r.l,exports.WakaDocNav=r.s,exports.WakaDocRenderer=r.t,exports.WakaDocSearch=r.o,exports.WakaDocShell=s,exports.WakaDocTable=r.n,exports.WakaDocToc=r.c,exports.WakaDocToolbar=r.i,exports.WakaDocVersion=r.a;
package/dist/doc.es.js CHANGED
@@ -1,15 +1,15 @@
1
- import { t as e } from "./cn-DpLcAzrf.mjs";
2
- import { a as t, c as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./waka-doc-renderer-BkIvas3z.mjs";
3
- import { r as d } from "./separator-BDReXBvI.mjs";
1
+ import { t as e } from "./cn-DUn6aSIQ.mjs";
2
+ import { n as t } from "./separator-ibN2mycs.mjs";
3
+ import { a as n, c as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "./waka-doc-renderer-Cw-Xnyen.mjs";
4
4
  import * as f from "react";
5
5
  import { Menu as p, X as m } from "lucide-react";
6
6
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
7
7
  //#region src/blocks/waka-doc-shell/index.tsx
8
- function _({ content: i, mode: a = "view", canEdit: u = !1, onModeChange: _, onChange: y, debounceMs: b = 1500, saveStatus: x = "idle", navItems: S, activePageId: C, onPageChange: w, breadcrumbs: T, onBreadcrumbClick: E, searchPages: D, onSearchSelect: O, versions: k, currentVersion: A, onVersionChange: j, className: M }) {
9
- let [N, P] = f.useState([]), [F, I] = f.useState(!1), [L, R] = f.useState(i);
8
+ function _({ content: a, mode: o = "view", canEdit: d = !1, onModeChange: _, onChange: y, debounceMs: b = 1500, saveStatus: x = "idle", navItems: S, activePageId: C, onPageChange: w, breadcrumbs: T, onBreadcrumbClick: E, searchPages: D, onSearchSelect: O, versions: k, currentVersion: A, onVersionChange: j, className: M }) {
9
+ let [N, P] = f.useState([]), [F, I] = f.useState(!1), [L, R] = f.useState(a);
10
10
  f.useEffect(() => {
11
- R(i);
12
- }, [i]);
11
+ R(a);
12
+ }, [a]);
13
13
  let z = f.useRef(), B = f.useCallback((e) => {
14
14
  R(e), z.current && clearTimeout(z.current), z.current = setTimeout(() => {
15
15
  y?.(e);
@@ -22,7 +22,7 @@ function _({ content: i, mode: a = "view", canEdit: u = !1, onModeChange: _, onC
22
22
  return /* @__PURE__ */ g("div", {
23
23
  className: e("relative flex min-h-screen", M),
24
24
  children: [
25
- V && /* @__PURE__ */ h(d, {
25
+ V && /* @__PURE__ */ h(t, {
26
26
  variant: "ghost",
27
27
  size: "icon",
28
28
  className: "fixed left-4 top-4 z-50 lg:hidden",
@@ -34,18 +34,18 @@ function _({ content: i, mode: a = "view", canEdit: u = !1, onModeChange: _, onC
34
34
  children: /* @__PURE__ */ g("div", {
35
35
  className: "flex h-full flex-col gap-4 overflow-y-auto p-4",
36
36
  children: [
37
- H && /* @__PURE__ */ h(o, {
37
+ H && /* @__PURE__ */ h(s, {
38
38
  pages: D,
39
39
  onSelect: (e) => {
40
40
  O?.(e), I(!1);
41
41
  }
42
42
  }),
43
- U && /* @__PURE__ */ h(t, {
43
+ U && /* @__PURE__ */ h(n, {
44
44
  versions: k,
45
45
  current: A,
46
46
  onVersionChange: j
47
47
  }),
48
- /* @__PURE__ */ h(c, {
48
+ /* @__PURE__ */ h(l, {
49
49
  items: S,
50
50
  activeId: C,
51
51
  onItemClick: (e) => {
@@ -65,17 +65,17 @@ function _({ content: i, mode: a = "view", canEdit: u = !1, onModeChange: _, onC
65
65
  className: "mx-auto w-full max-w-3xl px-4 py-8 lg:px-8",
66
66
  children: [/* @__PURE__ */ g("div", {
67
67
  className: "mb-6 flex flex-col gap-3",
68
- children: [T && T.length > 0 && /* @__PURE__ */ h(s, {
68
+ children: [T && T.length > 0 && /* @__PURE__ */ h(c, {
69
69
  items: T,
70
70
  onItemClick: E
71
- }), /* @__PURE__ */ h(r, {
71
+ }), /* @__PURE__ */ h(i, {
72
72
  content: L,
73
- mode: a,
74
- canEdit: u,
73
+ mode: o,
74
+ canEdit: d,
75
75
  onModeChange: _,
76
76
  saveStatus: x
77
77
  })]
78
- }), a === "view" ? /* @__PURE__ */ h(l, {
78
+ }), o === "view" ? /* @__PURE__ */ h(u, {
79
79
  content: L,
80
80
  onHeadingsExtracted: P
81
81
  }) : /* @__PURE__ */ h(v, {
@@ -85,7 +85,7 @@ function _({ content: i, mode: a = "view", canEdit: u = !1, onModeChange: _, onC
85
85
  })]
86
86
  }), N.length > 0 && /* @__PURE__ */ h("aside", {
87
87
  className: "hidden w-56 shrink-0 py-8 xl:block",
88
- children: /* @__PURE__ */ h(n, { items: N })
88
+ children: /* @__PURE__ */ h(r, { items: N })
89
89
  })]
90
90
  })
91
91
  ]
@@ -96,7 +96,7 @@ function v({ content: e, onChange: t, onHeadingsExtracted: n }) {
96
96
  return f.useEffect(() => {
97
97
  (async () => {
98
98
  try {
99
- let { WakaRichTextEditor: e } = await import("./waka-rich-text-editor-BJzzxeP1.mjs").then((e) => e.n);
99
+ let { WakaRichTextEditor: e } = await import("./waka-rich-text-editor-DndVJuDw.mjs");
100
100
  i(() => e);
101
101
  } catch {}
102
102
  })();
@@ -128,4 +128,4 @@ function v({ content: e, onChange: t, onHeadingsExtracted: n }) {
128
128
  });
129
129
  }
130
130
  //#endregion
131
- export { s as WakaDocBreadcrumb, u as WakaDocCallout, i as WakaDocCodeBlock, c as WakaDocNav, l as WakaDocRenderer, o as WakaDocSearch, _ as WakaDocShell, a as WakaDocTable, n as WakaDocToc, r as WakaDocToolbar, t as WakaDocVersion };
131
+ export { c as WakaDocBreadcrumb, d as WakaDocCallout, a as WakaDocCodeBlock, l as WakaDocNav, u as WakaDocRenderer, s as WakaDocSearch, _ as WakaDocShell, o as WakaDocTable, r as WakaDocToc, i as WakaDocToolbar, n as WakaDocVersion };