react-material-design 0.5.2 → 0.5.4

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.
@@ -2,127 +2,129 @@ import { useTheme as e } from "../Theme/Theme.js";
2
2
  import ee from "../Button/context.js";
3
3
  import { IconProvider as te, convertIconDefinition as ne } from "../Icon/Icon.js";
4
4
  import { shallowEqual as re, waitAnimationNameEndEvent as ie } from "../../utils/index.js";
5
- import t from "../misc/OrderedCollection/index.js";
6
- import n from "../Divider/index.js";
7
- import { getComponentSizeName as ae } from "../types.js";
8
- import oe from "../Button/default/index.js";
9
- import r from "../Button/icon/index.js";
5
+ import ae from "../misc/OrderedCollection/index.js";
6
+ import t from "../Divider/index.js";
7
+ import { getComponentSizeName as oe } from "../types.js";
8
+ import n from "../Button/default/index.js";
9
+ import se from "../Button/icon/index.js";
10
10
  import './style.css';/* empty css */
11
- import { c as i } from "react/compiler-runtime";
12
- import se from "classnames";
13
- import { useEffect as ce, useEffectEvent as a, useId as o, useRef as s, useState as le } from "react";
14
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
15
- import { createPortal as ue } from "react-dom";
16
- import { useElementEventListener as de, useResizeObserver as fe } from "react-dom-event-hooks";
11
+ import { c as ce } from "react/compiler-runtime";
12
+ import r from "classnames";
13
+ import { useEffect as le, useEffectEvent as i, useId as ue, useRef as a, useState as de } from "react";
14
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
15
+ import { createPortal as fe } from "react-dom";
16
+ import { useElementEventListener as pe, useResizeObserver as c } from "react-dom-event-hooks";
17
17
  //#region lib/components/Dialog/Dialog.tsx
18
- function u(u) {
19
- let p = i(74), m = o(), { setDialogState: h, dialogsContainer: g } = e("Dialog"), _ = s(null), v = s(null), y;
20
- p[0] === Symbol.for("react.memo_cache_sentinel") ? (y = [], p[0] = y) : y = p[0];
21
- let [b, _e] = le(y), x;
22
- p[1] === b ? x = p[2] : (x = b.filter(ge), p[1] = b, p[2] = x);
23
- let S = x, C;
24
- p[3] === b ? C = p[4] : (C = b.filter(he), p[3] = b, p[4] = C);
25
- let w = C, T;
26
- p[5] === Symbol.for("react.memo_cache_sentinel") ? (T = ["Content", "DialogAction"], p[5] = T) : T = p[5];
27
- let ve = T, E;
28
- p[6] === Symbol.for("react.memo_cache_sentinel") ? (E = {
18
+ function l(l) {
19
+ let d = ce(74), f = ue(), { setDialogState: p, dialogsContainer: m } = e("Dialog"), h = a(null), g = a(null), _;
20
+ d[0] === Symbol.for("react.memo_cache_sentinel") ? (_ = [], d[0] = _) : _ = d[0];
21
+ let [v, y] = de(_), b;
22
+ d[1] === v ? b = d[2] : (b = v.filter(_e).at(0), d[1] = v, d[2] = b);
23
+ let x = b, S;
24
+ d[3] === v ? S = d[4] : (S = v.filter(ge), d[3] = v, d[4] = S);
25
+ let C = S, w;
26
+ d[5] === Symbol.for("react.memo_cache_sentinel") ? (w = ["Content", "DialogAction"], d[5] = w) : w = d[5];
27
+ let ve = w, T;
28
+ d[6] === Symbol.for("react.memo_cache_sentinel") ? (T = {
29
29
  default: "text",
30
30
  icon: "standard"
31
- }, p[6] = E) : E = p[6];
32
- let ye = E, D;
33
- p[7] !== u.fullscreen || p[8] !== u.icon ? (D = u.fullscreen ? null : ne(u.icon), p[7] = u.fullscreen, p[8] = u.icon, p[9] = D) : D = p[9];
31
+ }, d[6] = T) : T = d[6];
32
+ let E = T, D;
33
+ d[7] !== l.fullscreen || d[8] !== l.icon ? (D = l.fullscreen ? null : ne(l.icon), d[7] = l.fullscreen, d[8] = l.icon, d[9] = D) : D = d[9];
34
34
  let O = D, k;
35
- p[10] === Symbol.for("react.memo_cache_sentinel") ? (k = (e) => {
35
+ d[10] === Symbol.for("react.memo_cache_sentinel") ? (k = (e) => {
36
36
  e.filter((e) => e.borderBoxSize.forEach((e) => {
37
- v.current?.checkVisibility() && (v.current.style.setProperty("--modal-width", `${e.inlineSize}px`), v.current.style.setProperty("--modal-height", `${e.blockSize}px`));
37
+ g.current?.checkVisibility() && (g.current.style.setProperty("--modal-width", `${e.inlineSize}px`), g.current.style.setProperty("--modal-height", `${e.blockSize}px`));
38
38
  }));
39
- }, p[10] = k) : k = p[10];
40
- let { saveRef: A } = fe(k), { saveRef: j } = de("scroll", f), M;
41
- p[11] !== m || p[12] !== h ? (M = () => {
42
- h(m, !0), _.current?.classList.remove("close"), _.current?.classList.add("open"), _.current?.showModal();
43
- }, p[11] = m, p[12] = h, p[13] = M) : M = p[13];
44
- let N = a(M), P;
45
- p[14] !== m || p[15] !== h ? (P = async () => {
46
- h(m, !1), _.current?.classList.remove("open"), _.current?.classList.add("close"), await ie(v.current, d), _.current?.classList.remove("close"), _.current?.close();
47
- }, p[14] = m, p[15] = h, p[16] = P) : P = p[16];
48
- let F = a(P), I;
49
- p[17] === u ? I = p[18] : (I = (e) => {
50
- e.stopPropagation(), u.onClose?.();
51
- }, p[17] = u, p[18] = I);
39
+ }, d[10] = k) : k = d[10];
40
+ let { saveRef: A } = c(k), { saveRef: j } = pe("scroll", he), M;
41
+ d[11] !== f || d[12] !== p ? (M = () => {
42
+ p(f, !0), h.current?.classList.remove("close"), h.current?.classList.add("open"), h.current?.showModal();
43
+ }, d[11] = f, d[12] = p, d[13] = M) : M = d[13];
44
+ let N = i(M), P;
45
+ d[14] !== f || d[15] !== p ? (P = async () => {
46
+ p(f, !1), h.current?.classList.remove("open"), h.current?.classList.add("close"), await ie(g.current, u), h.current?.classList.remove("close"), h.current?.close();
47
+ }, d[14] = f, d[15] = p, d[16] = P) : P = d[16];
48
+ let F = i(P), I;
49
+ d[17] === l ? I = d[18] : (I = (e) => {
50
+ e.stopPropagation(), l.onClose?.();
51
+ }, d[17] = l, d[18] = I);
52
52
  let L = I, R;
53
- p[19] === u ? R = p[20] : (R = (e) => {
54
- e.code.toLowerCase().includes("escape") && (e.stopPropagation(), e.preventDefault(), u.onClose?.());
55
- }, p[19] = u, p[20] = R);
53
+ d[19] === l ? R = d[20] : (R = (e) => {
54
+ e.code.toLowerCase().includes("escape") && (e.stopPropagation(), e.preventDefault(), l.onClose?.());
55
+ }, d[19] = l, d[20] = R);
56
56
  let z = R, B;
57
- p[21] !== F || p[22] !== N || p[23] !== u.open ? (B = () => {
58
- u.open ? N() : F();
59
- }, p[21] = F, p[22] = N, p[23] = u.open, p[24] = B) : B = p[24];
57
+ d[21] !== F || d[22] !== N || d[23] !== l.open ? (B = () => {
58
+ l.open ? N() : F();
59
+ }, d[21] = F, d[22] = N, d[23] = l.open, d[24] = B) : B = d[24];
60
60
  let V;
61
- if (p[25] === u.open ? V = p[26] : (V = [u.open], p[25] = u.open, p[26] = V), ce(B, V), !g) return null;
62
- let be = u.headline, H = u.fullscreen ? "dialog" : "alertdialog", U;
63
- p[27] !== u.fullscreen || p[28] !== u.headline || p[29] !== u.icon || p[30] !== u.size ? (U = se("modal", !u.fullscreen && u.size ? ae(u.size) : void 0, {
64
- fullscreen: u.fullscreen,
65
- headline: u.headline,
66
- icon: !u.fullscreen && u.icon
67
- }), p[27] = u.fullscreen, p[28] = u.headline, p[29] = u.icon, p[30] = u.size, p[31] = U) : U = p[31];
61
+ if (d[25] === l.open ? V = d[26] : (V = [l.open], d[25] = l.open, d[26] = V), le(B, V), !m) return null;
62
+ let ye = l.headline, H = l.fullscreen ? "dialog" : "alertdialog", U;
63
+ d[27] !== l.fullscreen || d[28] !== l.headline || d[29] !== l.icon || d[30] !== l.size ? (U = r("modal", !l.fullscreen && l.size ? oe(l.size) : void 0, {
64
+ fullscreen: l.fullscreen,
65
+ headline: l.headline,
66
+ icon: !l.fullscreen && l.icon
67
+ }), d[27] = l.fullscreen, d[28] = l.headline, d[29] = l.icon, d[30] = l.size, d[31] = U) : U = d[31];
68
68
  let W;
69
- p[32] !== O || p[33] !== u.buttonLabel || p[34] !== u.fullscreen || p[35] !== u.headline || p[36] !== u.onButtonClick || p[37] !== u.onClose || p[38] !== u.supportingText ? (W = u.fullscreen ? /* @__PURE__ */ l("div", {
69
+ d[32] !== O || d[33] !== l.buttonLabel || d[34] !== l.fullscreen || d[35] !== l.headline || d[36] !== l.onButtonClick || d[37] !== l.onClose || d[38] !== l.supportingText ? (W = l.fullscreen ? /* @__PURE__ */ s("div", {
70
70
  className: "header",
71
71
  children: [
72
- /* @__PURE__ */ c(r, {
72
+ /* @__PURE__ */ o(se, {
73
73
  className: "icon",
74
74
  color: "standard",
75
75
  icon: "close",
76
- onClick: u.onClose
76
+ onClick: l.onClose
77
77
  }),
78
- /* @__PURE__ */ c("span", {
78
+ /* @__PURE__ */ o("span", {
79
79
  className: "headline",
80
- children: u.headline
80
+ children: l.headline
81
81
  }),
82
- /* @__PURE__ */ c(oe, {
82
+ /* @__PURE__ */ o(n, {
83
83
  className: "action",
84
84
  color: "text",
85
- label: u.buttonLabel,
86
- onClick: u.onButtonClick
85
+ label: l.buttonLabel,
86
+ onClick: l.onButtonClick
87
87
  })
88
88
  ]
89
- }) : /* @__PURE__ */ l("div", {
89
+ }) : /* @__PURE__ */ s("div", {
90
90
  className: "description",
91
91
  children: [
92
- O && /* @__PURE__ */ c(te, {
92
+ O && /* @__PURE__ */ o(te, {
93
93
  size: 24,
94
94
  children: O
95
95
  }),
96
- u.headline && /* @__PURE__ */ c("span", {
96
+ l.headline && /* @__PURE__ */ o("span", {
97
97
  className: "headline",
98
- children: u.headline
98
+ children: l.headline
99
99
  }),
100
- /* @__PURE__ */ c("span", {
100
+ /* @__PURE__ */ o("span", {
101
101
  className: "supporting-text",
102
- children: u.supportingText
102
+ children: l.supportingText
103
103
  })
104
104
  ]
105
- }), p[32] = O, p[33] = u.buttonLabel, p[34] = u.fullscreen, p[35] = u.headline, p[36] = u.onButtonClick, p[37] = u.onClose, p[38] = u.supportingText, p[39] = W) : W = p[39];
105
+ }), d[32] = O, d[33] = l.buttonLabel, d[34] = l.fullscreen, d[35] = l.headline, d[36] = l.onButtonClick, d[37] = l.onClose, d[38] = l.supportingText, d[39] = W) : W = d[39];
106
106
  let G;
107
- p[40] !== S || p[41] !== u.fullscreen ? (G = !u.fullscreen && S && /* @__PURE__ */ c(n, {}), p[40] = S, p[41] = u.fullscreen, p[42] = G) : G = p[42];
107
+ d[40] !== x || d[41] !== l.fullscreen ? (G = !l.fullscreen && x && /* @__PURE__ */ o(t, {}), d[40] = x, d[41] = l.fullscreen, d[42] = G) : G = d[42];
108
108
  let K;
109
- p[43] !== S || p[44] !== j ? (K = !!S && /* @__PURE__ */ c("div", {
109
+ d[43] !== x || d[44] !== j ? (K = !!x && /* @__PURE__ */ o("div", {
110
110
  ref: j,
111
- className: "content",
112
- children: S.map(me)
113
- }), p[43] = S, p[44] = j, p[45] = K) : K = p[45];
111
+ className: r("content", x.className),
112
+ style: x.style,
113
+ ...x.dataset,
114
+ children: x.children
115
+ }), d[43] = x, d[44] = j, d[45] = K) : K = d[45];
114
116
  let q;
115
- p[46] !== S || p[47] !== u.fullscreen ? (q = !u.fullscreen && S && /* @__PURE__ */ c(n, {}), p[46] = S, p[47] = u.fullscreen, p[48] = q) : q = p[48];
117
+ d[46] !== x || d[47] !== l.fullscreen ? (q = !l.fullscreen && x && /* @__PURE__ */ o(t, {}), d[46] = x, d[47] = l.fullscreen, d[48] = q) : q = d[48];
116
118
  let J;
117
- p[49] !== w || p[50] !== u.fullscreen ? (J = !u.fullscreen && w && /* @__PURE__ */ c("div", {
119
+ d[49] !== C || d[50] !== l.fullscreen ? (J = !l.fullscreen && C && /* @__PURE__ */ o("div", {
118
120
  className: "actions",
119
- children: /* @__PURE__ */ c(ee, {
120
- color: ye,
121
- children: w.map(pe)
121
+ children: /* @__PURE__ */ o(ee, {
122
+ color: E,
123
+ children: C.map(me)
122
124
  })
123
- }), p[49] = w, p[50] = u.fullscreen, p[51] = J) : J = p[51];
125
+ }), d[49] = C, d[50] = l.fullscreen, d[51] = J) : J = d[51];
124
126
  let Y;
125
- p[52] !== A || p[53] !== W || p[54] !== G || p[55] !== K || p[56] !== q || p[57] !== J ? (Y = /* @__PURE__ */ l("div", {
127
+ d[52] !== A || d[53] !== W || d[54] !== G || d[55] !== K || d[56] !== q || d[57] !== J ? (Y = /* @__PURE__ */ s("div", {
126
128
  ref: A,
127
129
  className: "container",
128
130
  children: [
@@ -132,51 +134,48 @@ function u(u) {
132
134
  q,
133
135
  J
134
136
  ]
135
- }), p[52] = A, p[53] = W, p[54] = G, p[55] = K, p[56] = q, p[57] = J, p[58] = Y) : Y = p[58];
137
+ }), d[52] = A, d[53] = W, d[54] = G, d[55] = K, d[56] = q, d[57] = J, d[58] = Y) : Y = d[58];
136
138
  let X;
137
- p[59] !== U || p[60] !== Y ? (X = /* @__PURE__ */ c("div", {
138
- ref: v,
139
+ d[59] !== U || d[60] !== Y ? (X = /* @__PURE__ */ o("div", {
140
+ ref: g,
139
141
  className: U,
140
142
  children: Y
141
- }), p[59] = U, p[60] = Y, p[61] = X) : X = p[61];
143
+ }), d[59] = U, d[60] = Y, d[61] = X) : X = d[61];
142
144
  let Z;
143
- p[62] === u.children ? Z = p[63] : (Z = /* @__PURE__ */ c(t, {
145
+ d[62] === l.children ? Z = d[63] : (Z = /* @__PURE__ */ o(ae, {
144
146
  name: "Dialog",
145
147
  childName: ve,
146
- onChildrenChange: _e,
148
+ onChildrenChange: y,
147
149
  compareChild: re,
148
- children: u.children
149
- }), p[62] = u.children, p[63] = Z);
150
+ children: l.children
151
+ }), d[62] = l.children, d[63] = Z);
150
152
  let Q;
151
- p[64] !== L || p[65] !== z || p[66] !== u.headline || p[67] !== H || p[68] !== X || p[69] !== Z ? (Q = /* @__PURE__ */ l("dialog", {
152
- ref: _,
153
+ d[64] !== L || d[65] !== z || d[66] !== l.headline || d[67] !== H || d[68] !== X || d[69] !== Z ? (Q = /* @__PURE__ */ s("dialog", {
154
+ ref: h,
153
155
  className: "Dialog",
154
156
  onClose: L,
155
157
  onKeyDown: z,
156
- "aria-label": be,
158
+ "aria-label": ye,
157
159
  role: H,
158
160
  children: [X, Z]
159
- }), p[64] = L, p[65] = z, p[66] = u.headline, p[67] = H, p[68] = X, p[69] = Z, p[70] = Q) : Q = p[70];
161
+ }), d[64] = L, d[65] = z, d[66] = l.headline, d[67] = H, d[68] = X, d[69] = Z, d[70] = Q) : Q = d[70];
160
162
  let $;
161
- return p[71] !== g || p[72] !== Q ? ($ = ue(Q, g), p[71] = g, p[72] = Q, p[73] = $) : $ = p[73], $;
162
- }
163
- function pe(e) {
164
- return e.children;
163
+ return d[71] !== m || d[72] !== Q ? ($ = fe(Q, m), d[71] = m, d[72] = Q, d[73] = $) : $ = d[73], $;
165
164
  }
166
165
  function me(e) {
167
166
  return e.children;
168
167
  }
169
- function d(e) {
168
+ function u(e) {
170
169
  return /^dialog-\w+-container-close$/.test(e);
171
170
  }
172
- function f(e) {
171
+ function he(e) {
173
172
  e.target instanceof HTMLDivElement && (e.target.scrollTop ? e.target?.classList.add("on-scroll") : e.target?.classList.remove("on-scroll"));
174
173
  }
175
- function he(e) {
174
+ function ge(e) {
176
175
  return e.orderedCollectionName === "DialogAction";
177
176
  }
178
- function ge(e) {
177
+ function _e(e) {
179
178
  return e.orderedCollectionName === "Content";
180
179
  }
181
180
  //#endregion
182
- export { u as default };
181
+ export { l as default };
@@ -1,3 +1,4 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { MenubarProps } from './render';
2
2
  export { default as MenuSection, type MenuSectionProps } from './MenuSection';
3
- export default function Menubar(props: PropsWithChildren): import('react').JSX.Element;
3
+ export type { MenubarProps } from './render';
4
+ export default function Menubar(props: MenubarProps): import('react').JSX.Element;
@@ -1 +1 @@
1
- require('./style.css');const e=require("../../utils/index.cjs"),t=require("../misc/OrderedCollection/index.cjs"),n=require("../Button/default/index.cjs");;/* empty css */let r=require("react/compiler-runtime"),i=require("react"),a=require("react/jsx-runtime"),o=require("react-dom-event-hooks");function s(s){let l=(0,r.c)(19),u;l[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=[],l[0]=u):u=l[0];let[d,f]=(0,i.useState)(u),[p,m]=(0,i.useState)(),{saveRef:h,ref:g}=(0,o.useMultiElementRef)(),_=c,v;l[1]!==g||l[2]!==p?(v=e=>{e.target instanceof Node&&p&&!Array.from(g.current.values()).some(t=>t.contains(e.target))&&m(void 0)},l[1]=g,l[2]=p,l[3]=v):v=l[3],(0,o.useWindowEventListener)(`pointerdown`,v);let y;l[4]!==g||l[5]!==p?(y=e=>{e.target instanceof Node&&p&&(!e.target.parentElement?.parentElement?.classList.contains(`selectable`)||!Array.from(g.current.values()).some(t=>t.contains(e.target)))&&m(void 0)},l[4]=g,l[5]=p,l[6]=y):y=l[6],(0,o.useWindowEventListener)(`click`,y);let b;if(l[7]!==p||l[8]!==h||l[9]!==d){let e;l[11]!==p||l[12]!==h?(e=e=>(0,a.jsx)(n.default,{label:e.label,color:`text`,shape:`square`,size:`extra-small`,onClick:t=>{t.stopPropagation(),m(t=>t?void 0:e.id)},onPointerDown:_,onMouseEnter:()=>p&&m(e.id),menuRef:h,menuOpen:p===e.id,density:-3,menuOpenBehavior:`manual`,children:e.children},e.id),l[11]=p,l[12]=h,l[13]=e):e=l[13],b=d.map(e),l[7]=p,l[8]=h,l[9]=d,l[10]=b}else b=l[10];let x;l[14]===s.children?x=l[15]:(x=(0,a.jsx)(t.default,{childName:`MenuSection`,onChildrenChange:f,compareChild:e.shallowEqual,children:s.children}),l[14]=s.children,l[15]=x);let S;return l[16]!==b||l[17]!==x?(S=(0,a.jsxs)(`div`,{className:`Menubar`,children:[b,x]}),l[16]=b,l[17]=x,l[18]=S):S=l[18],S}function c(e){return e.stopPropagation()}exports.default=s;
1
+ require('./style.css');const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../Icon/Icon.cjs"),n=require("../../utils/index.cjs"),r=require("../misc/OrderedCollection/index.cjs"),i=require("../Button/default/index.cjs");;/* empty css */let a=require("react/compiler-runtime"),o=require("classnames");o=e.__toESM(o,1);let s=require("react"),c=require("react/jsx-runtime"),l=require("react-dom-event-hooks");function u(e){let u=(0,a.c)(40),h;u[0]===e?h=u[1]:(h=Object.fromEntries(Object.entries(e).filter(m)),u[0]=e,u[1]=h);let g=h,_;u[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=[],u[2]=_):_=u[2];let[v,y]=(0,s.useState)(_),b;u[3]===v?b=u[4]:(b=v.filter(p),u[3]=v,u[4]=b);let x=b,S;u[5]===v?S=u[6]:(S=v.filter(f).at(0),u[5]=v,u[6]=S);let C=S,[w,T]=(0,s.useState)(),{saveRef:E,ref:D}=(0,l.useMultiElementRef)(),O=d,k;u[7]===e.icon?k=u[8]:(k=t.convertIconDefinition(e.icon),u[7]=e.icon,u[8]=k);let A=k,j;u[9]!==D||u[10]!==w?(j=e=>{e.target instanceof Node&&w&&!Array.from(D.current.values()).some(t=>t.contains(e.target))&&T(void 0)},u[9]=D,u[10]=w,u[11]=j):j=u[11],(0,l.useWindowEventListener)(`pointerdown`,j);let M;u[12]!==D||u[13]!==w?(M=e=>{e.target instanceof Node&&w&&(!e.target.parentElement?.parentElement?.classList.contains(`selectable`)||!Array.from(D.current.values()).some(t=>t.contains(e.target)))&&T(void 0)},u[12]=D,u[13]=w,u[14]=M):M=u[14],(0,l.useWindowEventListener)(`click`,M);let N;u[15]===e.className?N=u[16]:(N=(0,o.default)(`Menubar`,e.className),u[15]=e.className,u[16]=N);let P;u[17]===A?P=u[18]:(P=A&&(0,c.jsx)(`div`,{className:`icon`,children:A}),u[17]=A,u[18]=P);let F;if(u[19]!==w||u[20]!==E||u[21]!==x){let e;u[23]!==w||u[24]!==E?(e=e=>(0,c.jsx)(i.default,{label:e.label,color:`text`,shape:`square`,size:`extra-small`,onClick:t=>{t.stopPropagation(),T(t=>t?void 0:e.id)},onPointerDown:O,onMouseEnter:()=>w&&T(e.id),menuRef:E,menuOpen:w===e.id,density:-3,menuOpenBehavior:`manual`,children:e.children},e.id),u[23]=w,u[24]=E,u[25]=e):e=u[25],F=x.map(e),u[19]=w,u[20]=E,u[21]=x,u[22]=F}else F=u[22];let I;u[26]===F?I=u[27]:(I=(0,c.jsx)(`div`,{className:`container`,children:F}),u[26]=F,u[27]=I);let L;u[28]===C?L=u[29]:(L=!!C&&(0,c.jsx)(`div`,{className:(0,o.default)(`content`,C.className),style:C.style,...C.dataset,children:C.children}),u[28]=C,u[29]=L);let R;u[30]===Symbol.for(`react.memo_cache_sentinel`)?(R=[`MenuSection`,`Content`],u[30]=R):R=u[30];let z;u[31]===e.children?z=u[32]:(z=(0,c.jsx)(r.default,{childName:R,onChildrenChange:y,compareChild:n.shallowEqual,children:e.children}),u[31]=e.children,u[32]=z);let B;return u[33]!==g||u[34]!==I||u[35]!==L||u[36]!==z||u[37]!==N||u[38]!==P?(B=(0,c.jsxs)(`div`,{...g,className:N,children:[P,I,L,z]}),u[33]=g,u[34]=I,u[35]=L,u[36]=z,u[37]=N,u[38]=P,u[39]=B):B=u[39],B}function d(e){return e.stopPropagation()}function f(e){return e.orderedCollectionName===`Content`}function p(e){return e.orderedCollectionName===`MenuSection`}function m(e){let[t]=e;return t.startsWith(`data-`)}exports.default=u;
@@ -1,3 +1,7 @@
1
+ import { IconDefinition } from '../Icon';
1
2
  import { PropsWithChildren } from 'react';
2
- export type MenubarProps = PropsWithChildren;
3
+ export interface MenubarProps extends PropsWithChildren {
4
+ icon?: IconDefinition;
5
+ className?: string;
6
+ }
3
7
  export default function MenubarRender(props: MenubarProps): import('react').JSX.Element;
@@ -1,58 +1,105 @@
1
- import { shallowEqual as e } from "../../utils/index.js";
2
- import t from "../misc/OrderedCollection/index.js";
3
- import n from "../Button/default/index.js";
1
+ import { convertIconDefinition as e } from "../Icon/Icon.js";
2
+ import { shallowEqual as t } from "../../utils/index.js";
3
+ import n from "../misc/OrderedCollection/index.js";
4
+ import r from "../Button/default/index.js";
4
5
  import './style.css';/* empty css */
5
- import { c as r } from "react/compiler-runtime";
6
- import { useState as i } from "react";
7
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
- import { useMultiElementRef as s, useWindowEventListener as c } from "react-dom-event-hooks";
6
+ import { c as i } from "react/compiler-runtime";
7
+ import a from "classnames";
8
+ import { useState as o } from "react";
9
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
10
+ import { useMultiElementRef as l, useWindowEventListener as u } from "react-dom-event-hooks";
9
11
  //#region lib/components/Menubar/render.tsx
10
- function l(l) {
11
- let d = r(19), f;
12
- d[0] === Symbol.for("react.memo_cache_sentinel") ? (f = [], d[0] = f) : f = d[0];
13
- let [p, m] = i(f), [h, g] = i(), { saveRef: _, ref: v } = s(), y = u, b;
14
- d[1] !== v || d[2] !== h ? (b = (e) => {
15
- e.target instanceof Node && h && !Array.from(v.current.values()).some((t) => t.contains(e.target)) && g(void 0);
16
- }, d[1] = v, d[2] = h, d[3] = b) : b = d[3], c("pointerdown", b);
17
- let x;
18
- d[4] !== v || d[5] !== h ? (x = (e) => {
19
- e.target instanceof Node && h && (!e.target.parentElement?.parentElement?.classList.contains("selectable") || !Array.from(v.current.values()).some((t) => t.contains(e.target))) && g(void 0);
20
- }, d[4] = v, d[5] = h, d[6] = x) : x = d[6], c("click", x);
21
- let S;
22
- if (d[7] !== h || d[8] !== _ || d[9] !== p) {
12
+ function d(d) {
13
+ let g = i(40), _;
14
+ g[0] === d ? _ = g[1] : (_ = Object.fromEntries(Object.entries(d).filter(h)), g[0] = d, g[1] = _);
15
+ let v = _, y;
16
+ g[2] === Symbol.for("react.memo_cache_sentinel") ? (y = [], g[2] = y) : y = g[2];
17
+ let [b, x] = o(y), S;
18
+ g[3] === b ? S = g[4] : (S = b.filter(m), g[3] = b, g[4] = S);
19
+ let C = S, w;
20
+ g[5] === b ? w = g[6] : (w = b.filter(p).at(0), g[5] = b, g[6] = w);
21
+ let T = w, [E, D] = o(), { saveRef: O, ref: k } = l(), A = f, j;
22
+ g[7] === d.icon ? j = g[8] : (j = e(d.icon), g[7] = d.icon, g[8] = j);
23
+ let M = j, N;
24
+ g[9] !== k || g[10] !== E ? (N = (e) => {
25
+ e.target instanceof Node && E && !Array.from(k.current.values()).some((t) => t.contains(e.target)) && D(void 0);
26
+ }, g[9] = k, g[10] = E, g[11] = N) : N = g[11], u("pointerdown", N);
27
+ let P;
28
+ g[12] !== k || g[13] !== E ? (P = (e) => {
29
+ e.target instanceof Node && E && (!e.target.parentElement?.parentElement?.classList.contains("selectable") || !Array.from(k.current.values()).some((t) => t.contains(e.target))) && D(void 0);
30
+ }, g[12] = k, g[13] = E, g[14] = P) : P = g[14], u("click", P);
31
+ let F;
32
+ g[15] === d.className ? F = g[16] : (F = a("Menubar", d.className), g[15] = d.className, g[16] = F);
33
+ let I;
34
+ g[17] === M ? I = g[18] : (I = M && /* @__PURE__ */ s("div", {
35
+ className: "icon",
36
+ children: M
37
+ }), g[17] = M, g[18] = I);
38
+ let L;
39
+ if (g[19] !== E || g[20] !== O || g[21] !== C) {
23
40
  let e;
24
- d[11] !== h || d[12] !== _ ? (e = (e) => /* @__PURE__ */ a(n, {
41
+ g[23] !== E || g[24] !== O ? (e = (e) => /* @__PURE__ */ s(r, {
25
42
  label: e.label,
26
43
  color: "text",
27
44
  shape: "square",
28
45
  size: "extra-small",
29
46
  onClick: (t) => {
30
- t.stopPropagation(), g((t) => t ? void 0 : e.id);
47
+ t.stopPropagation(), D((t) => t ? void 0 : e.id);
31
48
  },
32
- onPointerDown: y,
33
- onMouseEnter: () => h && g(e.id),
34
- menuRef: _,
35
- menuOpen: h === e.id,
49
+ onPointerDown: A,
50
+ onMouseEnter: () => E && D(e.id),
51
+ menuRef: O,
52
+ menuOpen: E === e.id,
36
53
  density: -3,
37
54
  menuOpenBehavior: "manual",
38
55
  children: e.children
39
- }, e.id), d[11] = h, d[12] = _, d[13] = e) : e = d[13], S = p.map(e), d[7] = h, d[8] = _, d[9] = p, d[10] = S;
40
- } else S = d[10];
41
- let C;
42
- d[14] === l.children ? C = d[15] : (C = /* @__PURE__ */ a(t, {
43
- childName: "MenuSection",
44
- onChildrenChange: m,
45
- compareChild: e,
46
- children: l.children
47
- }), d[14] = l.children, d[15] = C);
48
- let w;
49
- return d[16] !== S || d[17] !== C ? (w = /* @__PURE__ */ o("div", {
50
- className: "Menubar",
51
- children: [S, C]
52
- }), d[16] = S, d[17] = C, d[18] = w) : w = d[18], w;
56
+ }, e.id), g[23] = E, g[24] = O, g[25] = e) : e = g[25], L = C.map(e), g[19] = E, g[20] = O, g[21] = C, g[22] = L;
57
+ } else L = g[22];
58
+ let R;
59
+ g[26] === L ? R = g[27] : (R = /* @__PURE__ */ s("div", {
60
+ className: "container",
61
+ children: L
62
+ }), g[26] = L, g[27] = R);
63
+ let z;
64
+ g[28] === T ? z = g[29] : (z = !!T && /* @__PURE__ */ s("div", {
65
+ className: a("content", T.className),
66
+ style: T.style,
67
+ ...T.dataset,
68
+ children: T.children
69
+ }), g[28] = T, g[29] = z);
70
+ let B;
71
+ g[30] === Symbol.for("react.memo_cache_sentinel") ? (B = ["MenuSection", "Content"], g[30] = B) : B = g[30];
72
+ let V;
73
+ g[31] === d.children ? V = g[32] : (V = /* @__PURE__ */ s(n, {
74
+ childName: B,
75
+ onChildrenChange: x,
76
+ compareChild: t,
77
+ children: d.children
78
+ }), g[31] = d.children, g[32] = V);
79
+ let H;
80
+ return g[33] !== v || g[34] !== R || g[35] !== z || g[36] !== V || g[37] !== F || g[38] !== I ? (H = /* @__PURE__ */ c("div", {
81
+ ...v,
82
+ className: F,
83
+ children: [
84
+ I,
85
+ R,
86
+ z,
87
+ V
88
+ ]
89
+ }), g[33] = v, g[34] = R, g[35] = z, g[36] = V, g[37] = F, g[38] = I, g[39] = H) : H = g[39], H;
53
90
  }
54
- function u(e) {
91
+ function f(e) {
55
92
  return e.stopPropagation();
56
93
  }
94
+ function p(e) {
95
+ return e.orderedCollectionName === "Content";
96
+ }
97
+ function m(e) {
98
+ return e.orderedCollectionName === "MenuSection";
99
+ }
100
+ function h(e) {
101
+ let [t] = e;
102
+ return t.startsWith("data-");
103
+ }
57
104
  //#endregion
58
- export { l as default };
105
+ export { d as default };
@@ -1 +1 @@
1
- .Menubar{background-color:var(--md-sys-color-surface-container-high);padding-inline:var(--md-sys-measurement-space100)}
1
+ .Menubar{background-color:var(--md-sys-color-surface-container-high);padding-left:var(--md-sys-measurement-space100);align-items:center;gap:var(--md-sys-measurement-space100);display:flex}.Menubar>.icon{width:24px;height:24px;margin-left:var(--md-sys-measurement-space100)}.Menubar>.icon>img{max-width:100%;max-height:100%}.Menubar>.content{flex:1}
@@ -1 +1 @@
1
- require('./style.css');const e=require("../../../utils/hooks.cjs");;/* empty css */let t=require("react/compiler-runtime"),n=require("react"),r=require("react/jsx-runtime"),i=require("react-dom-event-hooks");function a(e){let t={...e};return delete t.id,delete t.orderedCollectionName,t}var o=(0,n.createContext)(null);function s(e,t){let r=(0,n.useContext)(o);if(!r&&(e||t))throw Error(`${t??`OrderedCollectionChild`} must be used in ${e??`OrderedCollection`} component`);return r}function c(e){let a=(0,t.c)(20),s;a[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={},a[0]=s):s=a[0];let[c,p]=(0,n.useState)(s),m;a[1]===Symbol.for(`react.memo_cache_sentinel`)?(m=[],a[1]=m):m=a[1];let h=(0,n.useRef)(m),g;a[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=(e,t,n)=>p(r=>({...r,[e]:{...n,orderedCollectionName:t}})),a[2]=g):g=a[2];let _=g,v;a[3]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>e.forEach(e=>e.removedNodes.forEach(e=>{e instanceof HTMLElement&&p(t=>{let n={...t};return e.dataset.id&&delete n[e.dataset.id],n})})),a[3]=v):v=a[3];let y;a[4]===Symbol.for(`react.memo_cache_sentinel`)?(y={childList:!0},a[4]=y):y=a[4];let{saveRef:b,ref:x}=(0,i.useMutationObserver)(v,y),S;a[5]===e.name?S=a[6]:(S={name:e.name,saveChildData:_},a[5]=e.name,a[6]=S);let C=S,w;a[7]!==e||a[8]!==x||a[9]!==c?(w=()=>{let t=(t,n)=>t.id===i[n]?.id?e.compareChild&&i[n]?!e.compareChild(t,i[n]):!1:!0,n=Array.isArray(e.childName)?e.childName:[e.childName],r,i;x.current&&(r=Array.from(x.current.querySelectorAll(`:scope > .OrderedCollectionChild:is(${n.map(f).join(`, `)})`)),i=r.map(d).filter(u).map(e=>c[e]?{...c[e],id:e}:null).filter(l),(h.current.length!==i.length||h.current.some(t))&&(e.onChildrenChange?.(i),h.current=i))},a[7]=e,a[8]=x,a[9]=c,a[10]=w):w=a[10];let T=(0,n.useEffectEvent)(w),E;a[11]===T?E=a[12]:(E=()=>T(),a[11]=T,a[12]=E),(0,n.useLayoutEffect)(E);let D;a[13]!==e.children||a[14]!==e.name||a[15]!==b?(D=(0,r.jsx)(`div`,{ref:b,className:`OrderedCollection`,"data-name":e.name,"aria-hidden":`true`,children:e.children}),a[13]=e.children,a[14]=e.name,a[15]=b,a[16]=D):D=a[16];let O;return a[17]!==C||a[18]!==D?(O=(0,r.jsx)(o,{value:C,children:D}),a[17]=C,a[18]=D,a[19]=O):O=a[19],O}function l(e){return!!e}function u(e){return typeof e==`string`}function d(e){return e.getAttribute(`data-id`)}function f(e){return`[data-name="${e}"]`}function p(i){let a=(0,t.c)(9),o=(0,n.useId)(),c=i.id??o,{saveChildData:l}=s(i.parentName,i.name),u,d;a[0]!==c||a[1]!==i.content||a[2]!==i.name||a[3]!==l?(u=()=>l(c,i.name,i.content),d=[c,i.content,i.name,l],a[0]=c,a[1]=i.content,a[2]=i.name,a[3]=l,a[4]=u,a[5]=d):(u=a[4],d=a[5]),e.useIsomorphicLayoutEffect(u,d);let f;return a[6]!==c||a[7]!==i.name?(f=(0,r.jsx)(`span`,{className:`OrderedCollectionChild`,"data-name":i.name,"data-id":c,"aria-hidden":`true`}),a[6]=c,a[7]=i.name,a[8]=f):f=a[8],f}exports.OrderedCollectionChild=p,exports.OrderedCollectionContext=o,exports.cleanOrderedCollectionProps=a,exports.default=c,exports.useOrderedCollection=s;
1
+ require('./style.css');const e=require("../../../utils/hooks.cjs");;/* empty css */let t=require("react/compiler-runtime"),n=require("react"),r=require("react/jsx-runtime"),i=require("react-dom-event-hooks");function a(e){let t={...e};return delete t.id,delete t.orderedCollectionName,t}var o=(0,n.createContext)(null);function s(e,t){let r=(0,n.useContext)(o);if(!r&&(e||t))throw Error(`${t??`OrderedCollectionChild`} must be used in ${e??`OrderedCollection`} component`);return r}function c(e){let a=(0,t.c)(20),s;a[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={},a[0]=s):s=a[0];let[c,p]=(0,n.useState)(s),m;a[1]===Symbol.for(`react.memo_cache_sentinel`)?(m=[],a[1]=m):m=a[1];let h=(0,n.useRef)(m),g;a[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=(e,t,n)=>p(r=>({...r,[e]:{...n,orderedCollectionName:t}})),a[2]=g):g=a[2];let _=g,v;a[3]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>e.forEach(e=>e.removedNodes.forEach(e=>{e instanceof HTMLElement&&p(t=>{let n={...t};return e.dataset.id&&delete n[e.dataset.id],n})})),a[3]=v):v=a[3];let y;a[4]===Symbol.for(`react.memo_cache_sentinel`)?(y={childList:!0},a[4]=y):y=a[4];let{saveRef:b,ref:x}=(0,i.useMutationObserver)(v,y),S;a[5]===e.name?S=a[6]:(S={name:e.name,saveChildData:_},a[5]=e.name,a[6]=S);let C=S,w;a[7]!==e||a[8]!==x||a[9]!==c?(w=()=>{let t=(t,n)=>t.id===i[n]?.id?e.compareChild&&i[n]?!e.compareChild(t,i[n]):!1:!0,n=Array.isArray(e.childName)?e.childName:[e.childName],r,i;x.current&&(r=Array.from(x.current.querySelectorAll(`:scope > .OrderedCollectionChild:is(${n.map(f).join(`, `)})`)),i=r.map(d).filter(u).map(e=>c[e]?{...c[e],id:c[e].id??e}:null).filter(l),(h.current.length!==i.length||h.current.some(t))&&(e.onChildrenChange?.(i),h.current=i))},a[7]=e,a[8]=x,a[9]=c,a[10]=w):w=a[10];let T=(0,n.useEffectEvent)(w),E;a[11]===T?E=a[12]:(E=()=>T(),a[11]=T,a[12]=E),(0,n.useLayoutEffect)(E);let D;a[13]!==e.children||a[14]!==e.name||a[15]!==b?(D=(0,r.jsx)(`div`,{ref:b,className:`OrderedCollection`,"data-name":e.name,"aria-hidden":`true`,children:e.children}),a[13]=e.children,a[14]=e.name,a[15]=b,a[16]=D):D=a[16];let O;return a[17]!==C||a[18]!==D?(O=(0,r.jsx)(o,{value:C,children:D}),a[17]=C,a[18]=D,a[19]=O):O=a[19],O}function l(e){return!!e}function u(e){return typeof e==`string`}function d(e){return e.getAttribute(`data-id`)}function f(e){return`[data-name="${e}"]`}function p(i){let a=(0,t.c)(9),o=(0,n.useId)(),c=i.id??o,{saveChildData:l}=s(i.parentName,i.name),u,d;a[0]!==c||a[1]!==i.content||a[2]!==i.name||a[3]!==l?(u=()=>l(c,i.name,i.content),d=[c,i.content,i.name,l],a[0]=c,a[1]=i.content,a[2]=i.name,a[3]=l,a[4]=u,a[5]=d):(u=a[4],d=a[5]),e.useIsomorphicLayoutEffect(u,d);let f;return a[6]!==c||a[7]!==i.name?(f=(0,r.jsx)(`span`,{className:`OrderedCollectionChild`,"data-name":i.name,"data-id":c,"aria-hidden":`true`}),a[6]=c,a[7]=i.name,a[8]=f):f=a[8],f}exports.OrderedCollectionChild=p,exports.OrderedCollectionContext=o,exports.cleanOrderedCollectionProps=a,exports.default=c,exports.useOrderedCollection=s;
@@ -47,7 +47,7 @@ function m(e) {
47
47
  let t = (t, n) => t.id === i[n]?.id ? e.compareChild && i[n] ? !e.compareChild(t, i[n]) : !1 : !0, n = Array.isArray(e.childName) ? e.childName : [e.childName], r, i;
48
48
  w.current && (r = Array.from(w.current.querySelectorAll(`:scope > .OrderedCollectionChild:is(${n.map(v).join(", ")})`)), i = r.map(_).filter(g).map((e) => a[e] ? {
49
49
  ...a[e],
50
- id: e
50
+ id: a[e].id ?? e
51
51
  } : null).filter(h), (m.current.length !== i.length || m.current.some(t)) && (e.onChildrenChange?.(i), m.current = i));
52
52
  }, n[7] = e, n[8] = w, n[9] = a, n[10] = D) : D = n[10];
53
53
  let O = i(D), k;
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../components/misc/OrderedCollection/index.cjs");let t=require("react/compiler-runtime"),n=require("react"),r=require("react/jsx-runtime");function i(i){let a=(0,t.c)(5),o=(0,n.useId)(),s;a[0]===i.children?s=a[1]:(s={children:i.children},a[0]=i.children,a[1]=s);let c=s,l;return a[2]!==c||a[3]!==o?(l=(0,r.jsx)(e.OrderedCollectionChild,{name:`Content`,id:o,content:c}),a[2]=c,a[3]=o,a[4]=l):l=a[4],l}exports.default=i;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../components/misc/OrderedCollection/index.cjs");let t=require("react/compiler-runtime"),n=require("react"),r=require("react/jsx-runtime");function i(i){let o=(0,t.c)(10),s=(0,n.useId)(),c;o[0]===i?c=o[1]:(c=Object.fromEntries(Object.entries(i).filter(a)),o[0]=i,o[1]=c);let l=c,u;o[2]!==l||o[3]!==i.children||o[4]!==i.className||o[5]!==i.style?(u={className:i.className,style:i.style,dataset:l,children:i.children},o[2]=l,o[3]=i.children,o[4]=i.className,o[5]=i.style,o[6]=u):u=o[6];let d=u,f;return o[7]!==d||o[8]!==s?(f=(0,r.jsx)(e.OrderedCollectionChild,{name:`Content`,id:s,content:d}),o[7]=d,o[8]=s,o[9]=f):f=o[9],f}function a(e){let[t]=e;return t.startsWith(`data-`)}exports.default=i;
@@ -1,3 +1,9 @@
1
- import { PropsWithChildren } from 'react';
2
- export type ContentProps = PropsWithChildren;
1
+ import { CSSProperties, PropsWithChildren } from 'react';
2
+ export interface ContentProps extends PropsWithChildren {
3
+ className?: string;
4
+ style?: CSSProperties;
5
+ }
6
+ export interface ContentData extends ContentProps {
7
+ dataset: Record<string, string | boolean>;
8
+ }
3
9
  export default function Content(props: ContentProps): import('react').JSX.Element;
@@ -4,14 +4,25 @@ import { useId as n } from "react";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  //#region lib/layouts/Content.tsx
6
6
  function i(i) {
7
- let a = t(5), o = n(), s;
8
- a[0] === i.children ? s = a[1] : (s = { children: i.children }, a[0] = i.children, a[1] = s);
9
- let c = s, l;
10
- return a[2] !== c || a[3] !== o ? (l = /* @__PURE__ */ r(e, {
7
+ let o = t(10), s = n(), c;
8
+ o[0] === i ? c = o[1] : (c = Object.fromEntries(Object.entries(i).filter(a)), o[0] = i, o[1] = c);
9
+ let l = c, u;
10
+ o[2] !== l || o[3] !== i.children || o[4] !== i.className || o[5] !== i.style ? (u = {
11
+ className: i.className,
12
+ style: i.style,
13
+ dataset: l,
14
+ children: i.children
15
+ }, o[2] = l, o[3] = i.children, o[4] = i.className, o[5] = i.style, o[6] = u) : u = o[6];
16
+ let d = u, f;
17
+ return o[7] !== d || o[8] !== s ? (f = /* @__PURE__ */ r(e, {
11
18
  name: "Content",
12
- id: o,
13
- content: c
14
- }), a[2] = c, a[3] = o, a[4] = l) : l = a[4], l;
19
+ id: s,
20
+ content: d
21
+ }), o[7] = d, o[8] = s, o[9] = f) : f = o[9], f;
22
+ }
23
+ function a(e) {
24
+ let [t] = e;
25
+ return t.startsWith("data-");
15
26
  }
16
27
  //#endregion
17
28
  export { i as default };
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});require('./style.css');const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utils/index.cjs"),n=require("../../components/misc/OrderedCollection/index.cjs"),r=require("../../components/ContextMenu/render.cjs"),i=require("../../components/Menubar/render.cjs"),a=require("../../components/Toolbar/Toolbar.render.cjs");;/* empty css */let o=require("react/compiler-runtime"),s=require("classnames");s=e.__toESM(s,1);let c=require("react"),l=require("react/jsx-runtime");function u(e){let r=(0,o.c)(48),i;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[],r[0]=i):i=r[0];let[a,u]=(0,c.useState)(i),v;r[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=[`Content`,`Menubar`,`Toolbar`,`ContextMenu`],r[1]=v):v=r[1];let y=v,b;r[2]===a?b=r[3]:(b=a.filter(_),r[2]=a,r[3]=b);let x=b,S;r[4]===a?S=r[5]:(S=a.filter(g),r[4]=a,r[5]=S);let ie=S,C;r[6]===a?C=r[7]:(C=a.filter(h),r[6]=a,r[7]=C);let w=C,T;r[8]===a?T=r[9]:(T=a.filter(m),r[8]=a,r[9]=T);let E=T,D;r[10]===w?D=r[11]:(D=w.filter(p),r[10]=w,r[11]=D);let O=D,k;r[12]===w?k=r[13]:(k=w.filter(f),r[12]=w,r[13]=k);let A=k,j;r[14]===A?j=r[15]:(j=A.filter(d),r[14]=A,r[15]=j);let M=j,N;r[16]===A?N=r[17]:(N=A.filter(re),r[16]=A,r[17]=N);let P=N,F=ie,I;r[18]!==O||r[19]!==P?(I=[...O,...P],r[18]=O,r[19]=P,r[20]=I):I=r[20];let L=I,R=M,z;r[21]===Symbol.for(`react.memo_cache_sentinel`)?(z=[],r[21]=z):z=r[21];let B=z,V=e.inlineContentPadding??e.contentPadding??!1,H=e.blockContentPadding??e.contentPadding??!1,U=ne,W;r[22]!==H||r[23]!==V?(W=(0,s.default)(`Page`,{"inline-padding":V,"block-padding":H}),r[22]=H,r[23]=V,r[24]=W):W=r[24];let G;r[25]===F?G=r[26]:(G=!!F.length&&(0,l.jsx)(`div`,{className:`tools top`,children:F.map(U)}),r[25]=F,r[26]=G);let K;r[27]===L?K=r[28]:(K=!!L.length&&(0,l.jsx)(`div`,{className:`tools bottom`,children:L.map(U)}),r[27]=L,r[28]=K);let q;r[29]===R?q=r[30]:(q=!!R.length&&(0,l.jsx)(`div`,{className:`tools left`,children:R.map(U)}),r[29]=R,r[30]=q);let J;r[31]===Symbol.for(`react.memo_cache_sentinel`)?(J=!!B.length&&(0,l.jsx)(`div`,{className:`tools right`,children:B.map(U)}),r[31]=J):J=r[31];let Y;r[32]===E?Y=r[33]:(Y=E.map(te),r[32]=E,r[33]=Y);let X;r[34]===x?X=r[35]:(X=x.map(ee),r[34]=x,r[35]=X);let Z;r[36]!==Y||r[37]!==X?(Z=(0,l.jsxs)(`div`,{className:`content`,children:[Y,X]}),r[36]=Y,r[37]=X,r[38]=Z):Z=r[38];let Q;r[39]===e.children?Q=r[40]:(Q=(0,l.jsx)(n.default,{name:`Page`,childName:y,onChildrenChange:u,compareChild:t.shallowEqual,children:e.children}),r[39]=e.children,r[40]=Q);let $;return r[41]!==W||r[42]!==G||r[43]!==K||r[44]!==q||r[45]!==Z||r[46]!==Q?($=(0,l.jsxs)(`div`,{className:W,children:[G,K,q,J,Z,Q]}),r[41]=W,r[42]=G,r[43]=K,r[44]=q,r[45]=Z,r[46]=Q,r[47]=$):$=r[47],$}function ee(e){return(0,l.jsx)(c.Fragment,{children:e.children},e.id)}function te(e){return(0,l.jsx)(r.default,{...e},e.id)}function ne(e){switch(e.orderedCollectionName){case`Menubar`:return(0,l.jsx)(i.default,{...e},e.id);case`Toolbar`:return(0,l.jsx)(a.default,{...e},e.id);default:return null}}function re(e){return!e.orientation||e.orientation===`horizontal`}function d(e){return e.orientation===`vertical`}function f(e){return e.variant===`floating`}function p(e){return e.variant===`docked`}function m(e){return e.orderedCollectionName===`ContextMenu`}function h(e){return e.orderedCollectionName===`Toolbar`}function g(e){return e.orderedCollectionName===`Menubar`}function _(e){return e.orderedCollectionName===`Content`}exports.default=u;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});require('./style.css');const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utils/index.cjs"),n=require("../../components/misc/OrderedCollection/index.cjs"),r=require("../../components/ContextMenu/render.cjs"),i=require("../../components/Menubar/render.cjs"),a=require("../../components/Toolbar/Toolbar.render.cjs");;/* empty css */let ee=require("react/compiler-runtime"),o=require("classnames");o=e.__toESM(o,1);let te=require("react"),s=require("react/jsx-runtime");function c(e){let r=(0,ee.c)(51),i;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[],r[0]=i):i=r[0];let[a,c]=(0,te.useState)(i),p;r[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=[`Content`,`Menubar`,`Toolbar`,`ContextMenu`],r[1]=p):p=r[1];let m=p,h;r[2]===a?h=r[3]:(h=a.filter(se).at(0),r[2]=a,r[3]=h);let g=h,_;r[4]===a?_=r[5]:(_=a.filter(oe),r[4]=a,r[5]=_);let v=_,y;r[6]===a?y=r[7]:(y=a.filter(f),r[6]=a,r[7]=y);let b=y,x;r[8]===a?x=r[9]:(x=a.filter(d),r[8]=a,r[9]=x);let S=x,C;r[10]===b?C=r[11]:(C=b.filter(ae),r[10]=b,r[11]=C);let w=C,T;r[12]===b?T=r[13]:(T=b.filter(ie),r[12]=b,r[13]=T);let E=T,D;r[14]===E?D=r[15]:(D=E.filter(re),r[14]=E,r[15]=D);let O=D,k;r[16]===E?k=r[17]:(k=E.filter(ne),r[16]=E,r[17]=k);let A=k,j=v,M;r[18]!==w||r[19]!==A?(M=[...w,...A],r[18]=w,r[19]=A,r[20]=M):M=r[20];let N=M,P=O,F;r[21]===Symbol.for(`react.memo_cache_sentinel`)?(F=[],r[21]=F):F=r[21];let I=F,L=e.inlineContentPadding??e.contentPadding??!1,R=e.blockContentPadding??e.contentPadding??!1,z=u,B;r[22]!==R||r[23]!==L?(B=(0,o.default)(`Page`,{"inline-padding":L,"block-padding":R}),r[22]=R,r[23]=L,r[24]=B):B=r[24];let V;r[25]===j?V=r[26]:(V=!!j.length&&(0,s.jsx)(`div`,{className:`tools top`,children:j.map(z)}),r[25]=j,r[26]=V);let H;r[27]===N?H=r[28]:(H=!!N.length&&(0,s.jsx)(`div`,{className:`tools bottom`,children:N.map(z)}),r[27]=N,r[28]=H);let U;r[29]===P?U=r[30]:(U=!!P.length&&(0,s.jsx)(`div`,{className:`tools left`,children:P.map(z)}),r[29]=P,r[30]=U);let W;r[31]===Symbol.for(`react.memo_cache_sentinel`)?(W=!!I.length&&(0,s.jsx)(`div`,{className:`tools right`,children:I.map(z)}),r[31]=W):W=r[31];let G=g?.className,K;r[32]===G?K=r[33]:(K=(0,o.default)(`content`,G),r[32]=G,r[33]=K);let q=g?.style,J=g?.dataset,Y;r[34]===S?Y=r[35]:(Y=S.map(l),r[34]=S,r[35]=Y);let X=g?.children,Z;r[36]!==K||r[37]!==q||r[38]!==J||r[39]!==Y||r[40]!==X?(Z=(0,s.jsxs)(`div`,{className:K,style:q,...J,children:[Y,X]}),r[36]=K,r[37]=q,r[38]=J,r[39]=Y,r[40]=X,r[41]=Z):Z=r[41];let Q;r[42]===e.children?Q=r[43]:(Q=(0,s.jsx)(n.default,{name:`Page`,childName:m,onChildrenChange:c,compareChild:t.shallowEqual,children:e.children}),r[42]=e.children,r[43]=Q);let $;return r[44]!==B||r[45]!==V||r[46]!==H||r[47]!==U||r[48]!==Z||r[49]!==Q?($=(0,s.jsxs)(`div`,{className:B,children:[V,H,U,W,Z,Q]}),r[44]=B,r[45]=V,r[46]=H,r[47]=U,r[48]=Z,r[49]=Q,r[50]=$):$=r[50],$}function l(e){return(0,s.jsx)(r.default,{...e},e.id)}function u(e){switch(e.orderedCollectionName){case`Menubar`:return(0,s.jsx)(i.default,{...e},e.id);case`Toolbar`:return(0,s.jsx)(a.default,{...e},e.id);default:return null}}function ne(e){return!e.orientation||e.orientation===`horizontal`}function re(e){return e.orientation===`vertical`}function ie(e){return e.variant===`floating`}function ae(e){return e.variant===`docked`}function d(e){return e.orderedCollectionName===`ContextMenu`}function f(e){return e.orderedCollectionName===`Toolbar`}function oe(e){return e.orderedCollectionName===`Menubar`}function se(e){return e.orderedCollectionName===`Content`}exports.default=c;