@mechane-ai/elements 0.38.0 → 0.39.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.
@@ -1,227 +1,3 @@
1
1
  import { n as e, t } from "./navigation-D2_sGy3C.js";
2
- import { t as n } from "./header-styles-COxCYFZx.js";
3
- import { t as r } from "./style-composition-uYlczSsB.js";
4
- import { mergeProps as i } from "@base-ui/react/merge-props";
5
- import * as a from "@stylexjs/stylex";
6
- import { Children as o, useState as s } from "react";
7
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
- import { Tabs as u } from "@base-ui/react/tabs";
9
- // packages/navigation/src/tab-styles.ts
10
- var d = {
11
- list: {
12
- k1xSpc: "x78zum5",
13
- kOIVth: "xxhr3t",
14
- k7Eaqz: "xeuugli",
15
- kt9PQ7: "xso031l",
16
- kfdmCh: "x1q0q8m5",
17
- kL6WhQ: "x1qndepd",
18
- kXHlph: "xw2csxc",
19
- kCfx3h: "x16yzcw2",
20
- k3ag91: "x1mxyneg",
21
- kkwBia: "xyjviii",
22
- kc2wEk: "x1y2jzqp",
23
- k78XZB: "x12ub8kb",
24
- kVSElv: "xxwvzwo",
25
- k5sz9g: "x1ci5vm9",
26
- $$css: !0
27
- },
28
- item: {
29
- kVAEAm: "x1n2onr6",
30
- kB7OPa: "x9f619",
31
- k1xSpc: "x3nfvp2",
32
- kGNEyG: "x6s0dn4",
33
- kMnn75: "xkrqix3",
34
- kmuXW: "x2lah0s",
35
- kMv6JI: "x1hz01jw",
36
- k63SB2: "xj57cvi",
37
- khiITx: "xvmahel",
38
- kMzoRj: "xc342km",
39
- kAzted: "x1oec0jp",
40
- k8WAf4: "xn9t2bk",
41
- kg3NbH: "x1doqdfy",
42
- kWkggS: "xjbqb8w",
43
- kMwMTN: "x153jb6y",
44
- kkrTdU: "x1ypdohk",
45
- kGuDYH: "xtqrqnz",
46
- kLWn49: "x1778rvt",
47
- khDVqt: "xuxw1ft",
48
- k4DVmp: "xy7uoan",
49
- k2wZ5d: "xyg3wme",
50
- kEZPYj: "xoqm7u7",
51
- k5JduY: "x1s928wv",
52
- kwXMNM: "x1j6awrg",
53
- kcktkL: "x1ccaobo",
54
- k8Iv0R: "x1xrz1ek",
55
- k4zj60: "x3cntg4",
56
- ks3ayO: "xyhc2n1",
57
- kuyoRO: "x1t3xrl9",
58
- kv1rg7: "xdsp783",
59
- kKkqFp: "xv7chyw",
60
- k2znAY: "x1pgiufq",
61
- kuJC8G: "xrzcr2b",
62
- kY2PSQ: "x1nten1d",
63
- k54cxX: "x1wzsryr",
64
- kxhOdL: "x1hjdyp1",
65
- kiLJdH: "x1i5oxzy",
66
- kDPfah: "xx75q12",
67
- kAm7yQ: "x7dn452",
68
- kk7Lky: "xwj21n9",
69
- kXyCmE: "x1m8qfh3",
70
- kPJHz1: "x13qnu6",
71
- k7shQP: "x9v5kkp",
72
- kZs9gx: "x19rmrnh",
73
- kiEn40: "x1bqaal",
74
- $$css: !0
75
- }
76
- }, f = {
77
- navigation: {
78
- kt9PQ7: "x1qhh985",
79
- kUk6DE: "x12lumcd",
80
- ks0D6T: "x193iq5w",
81
- $$css: !0
82
- },
83
- actions: {
84
- k1xSpc: "x78zum5",
85
- kGNEyG: "x6s0dn4",
86
- kwnvtZ: "x1a02dak",
87
- kOIVth: "x1hnptsi",
88
- keTefX: "xvc5jky",
89
- k7Eaqz: "xeuugli",
90
- ks0D6T: "x193iq5w",
91
- kB7OPa: "x9f619",
92
- $$css: !0
93
- }
94
- };
95
- function p({ items: e, isEmbedded: t = !1, actions: r }) {
96
- return /* @__PURE__ */ l("div", {
97
- "aria-hidden": !0,
98
- inert: !0,
99
- ...{
100
- 0: { className: "x78zum5 x1a02dak x1qjc9v5 xeuugli x2lah0s xso031l x1q0q8m5 x1qndepd" },
101
- 1: { className: "x78zum5 x1a02dak x1qjc9v5 xeuugli x2lah0s x1q0q8m5 x1qndepd x1qhh985" }
102
- }[!!t | 0],
103
- children: [/* @__PURE__ */ c("div", {
104
- ...a.props(d.list, f.navigation),
105
- children: e.map((e) => /* @__PURE__ */ c("span", {
106
- ...a.props(d.item),
107
- children: e.label
108
- }, e.id))
109
- }), o.toArray(r).length > 0 && /* @__PURE__ */ c("div", {
110
- ...a.props(n.row, f.actions),
111
- children: r
112
- })]
113
- });
114
- }
115
- function m({ items: e, selectedId: t, onNavigate: r, label: i = "Page sections", isEmbedded: s = !1, actions: u }) {
116
- return /* @__PURE__ */ l("div", {
117
- ...{
118
- 0: { className: "x78zum5 x1a02dak x1qjc9v5 xeuugli x2lah0s xso031l x1q0q8m5 x1qndepd" },
119
- 1: { className: "x78zum5 x1a02dak x1qjc9v5 xeuugli x2lah0s x1q0q8m5 x1qndepd x1qhh985" }
120
- }[!!s | 0],
121
- children: [/* @__PURE__ */ c("nav", {
122
- "aria-label": i,
123
- ...a.props(d.list, f.navigation),
124
- children: e.map((e) => /* @__PURE__ */ c("a", {
125
- href: e.href,
126
- "aria-current": e.id === t ? "page" : void 0,
127
- ...a.props(d.item),
128
- onClick: (t) => {
129
- if (r === void 0 || t.defaultPrevented || t.button !== 0) return;
130
- let n = t.metaKey || t.ctrlKey, i = t.shiftKey || t.altKey;
131
- n || i || (t.preventDefault(), r(e.id));
132
- },
133
- children: e.label
134
- }, e.id))
135
- }), o.toArray(u).length > 0 && /* @__PURE__ */ c("div", {
136
- ...a.props(n.row, f.actions),
137
- children: u
138
- })]
139
- });
140
- }
141
- // packages/navigation/src/skip-link.tsx
142
- function h(e) {
143
- return /* @__PURE__ */ c("a", { ...i({ className: "xixxii4 x1ridm32 x12hha37 x1b4oyad x174j0rr x1mvvolr x9f619 xvv7f4i xj0a0fe x1ok0vyi xpvm0e4 xbixft x1hz01jw xk4h15q xtqrqnz x1778rvt xvmahel xujl8zx x1wfrlr2 x1tkds87 x1de710j x1gnsi0 x1cm8ssg" }, e) });
144
- }
145
- // packages/navigation/src/tabs.tsx
146
- function g({ className: e, style: t, ...n }) {
147
- return /* @__PURE__ */ c(u.Root, {
148
- ...n,
149
- ...r({
150
- className: e,
151
- style: t,
152
- styles: { className: "x1hz01jw xj57cvi xtqrqnz x1778rvt xbixft xvmahel xeuugli xsg5m96 x7bu0ch x18eqmq0" }
153
- })
154
- });
155
- }
156
- function _({ className: e, style: t, ...n }) {
157
- return /* @__PURE__ */ c(u.List, {
158
- ...n,
159
- ...r({
160
- className: e,
161
- style: t,
162
- styles: a.props(d.list)
163
- })
164
- });
165
- }
166
- function v({ className: e, style: t, ...n }) {
167
- return /* @__PURE__ */ c(u.Tab, {
168
- ...n,
169
- ...r({
170
- className: e,
171
- style: t,
172
- styles: a.props(d.item)
173
- })
174
- });
175
- }
176
- function y({ className: e, style: t, ...n }) {
177
- return /* @__PURE__ */ c(u.Panel, {
178
- ...n,
179
- ...r({
180
- className: e,
181
- style: t,
182
- styles: { className: "x1o3kwql xeuugli x1k57tk5 xcqfl4l xwqq6z6 x13qnu6 x9v5kkp x19rmrnh x7s97pk" }
183
- })
184
- });
185
- }
186
- var b = {
187
- Root: g,
188
- List: _,
189
- Tab: v,
190
- Panel: y
191
- };
192
- // packages/navigation/src/content-tabs.tsx
193
- function x(e) {
194
- let [t, n] = s(e.defaultSelectedId ?? e.items[0]?.id), r = e.navigation, i = r?.selectedId ?? t, a = e.items.find((e) => e.id === i) ?? e.items[0];
195
- return r === void 0 ? /* @__PURE__ */ l(b.Root, {
196
- value: a?.id,
197
- onValueChange: (e) => n(String(e)),
198
- className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j",
199
- children: [/* @__PURE__ */ c(b.List, {
200
- "aria-label": e.label,
201
- children: e.items.map((e) => /* @__PURE__ */ c(b.Tab, {
202
- value: e.id,
203
- children: e.label
204
- }, e.id))
205
- }), a !== void 0 && /* @__PURE__ */ c(b.Panel, {
206
- value: a.id,
207
- className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j xexx8yu",
208
- children: a.content
209
- }, a.id)]
210
- }) : /* @__PURE__ */ l("div", {
211
- className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j",
212
- children: [/* @__PURE__ */ c(m, {
213
- label: e.label,
214
- items: e.items.map((e) => ({
215
- id: e.id,
216
- label: e.label,
217
- href: r.href(e.id)
218
- })),
219
- selectedId: a?.id ?? "",
220
- onNavigate: r.onNavigate
221
- }), /* @__PURE__ */ c("div", {
222
- className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j xexx8yu",
223
- children: a?.content
224
- })]
225
- });
226
- }
227
- export { t as Breadcrumb, x as ContentTabs, e as Kbd, m as PageNavigation, p as PageNavigationPlaceholder, h as SkipLink, b as Tabs };
2
+ import { a as n, i as r, n as i, r as a, t as o } from "./src-CSWIG_op.js";
3
+ export { t as Breadcrumb, o as ContentTabs, e as Kbd, r as PageNavigation, n as PageNavigationPlaceholder, a as SkipLink, i as Tabs };
@@ -1,3 +1,4 @@
1
+ export { PageLayout, PageSection } from './page-layout.tsx';
1
2
  export { AppShell } from './app-shell.tsx';
2
3
  export { NavigationRail } from './navigation-rail.tsx';
3
4
  export type { NavigationRailLink, NavigationRailProps } from './navigation-rail.tsx';
@@ -7,14 +8,12 @@ export { DetailPage } from './detail-page.tsx';
7
8
  export { FocusPage } from './focus-page.tsx';
8
9
  export { Workbench, WorkbenchScroll, WorkbenchFooter } from './workbench.tsx';
9
10
  export { ViewStack } from './view-stack.tsx';
10
- export { PageToolbar, ToolbarAction } from './page-toolbar.tsx';
11
+ export { ToolbarAction } from './page-toolbar.tsx';
11
12
  export type { PageContentProps } from './page-content.tsx';
12
13
  export { PageContent } from './page-content.tsx';
13
- export { ReportContent } from './report-content.tsx';
14
- export type { ReportContentProps } from './report-content.tsx';
15
14
  export { CollectionLayout } from './collection-layout.tsx';
16
15
  export type { CollectionLayoutProps } from './collection-layout.tsx';
17
- export type { RecordPageRootProps, RecordPageToolbarProps, RecordPageBodyProps, RecordPageHeaderProps, RecordPageContentProps, RecordPageAsideProps, } from './record-page.tsx';
16
+ export type { RecordPageBodyProps, RecordPageHeaderProps, RecordPageContentProps, RecordPageAsideProps, } from './record-page.tsx';
18
17
  export { RecordPage } from './record-page.tsx';
19
18
  export type { ResizableRootProps, ResizablePaneProps, ResizableHandleProps } from './resizable.tsx';
20
19
  export { Resizable } from './resizable.tsx';
@@ -0,0 +1,29 @@
1
+ import type { ReactNode, Ref } from 'react';
2
+ import type { SectionHeadingProps } from '../../core/src/index.ts';
3
+ import type { PageNavigationPlaceholderProps, PageNavigationProps } from '../../navigation/src/index.ts';
4
+ import type { PageToolbarProps } from './page-toolbar.tsx';
5
+ type Navigation<Item extends string> = PageNavigationProps<Item> | (PageNavigationPlaceholderProps & {
6
+ readonly isPlaceholder: true;
7
+ });
8
+ type PageLayoutProps<Item extends string> = PageToolbarProps & {
9
+ readonly ref?: Ref<HTMLDivElement>;
10
+ readonly navigation?: Navigation<Item> | undefined;
11
+ readonly children: ReactNode;
12
+ readonly scrollRestorationId?: string;
13
+ };
14
+ export declare function PageLayout<Item extends string>({ ref, navigation, children, scrollRestorationId, ...toolbar }: PageLayoutProps<Item>): ReactNode;
15
+ type PageSectionProps = SectionHeadingProps & ({
16
+ readonly children: ReactNode;
17
+ readonly summary?: never;
18
+ readonly breakdown?: never;
19
+ } | {
20
+ readonly summary: ReactNode;
21
+ readonly breakdown?: ReactNode;
22
+ readonly children?: never;
23
+ } | {
24
+ readonly breakdown: ReactNode;
25
+ readonly summary?: ReactNode;
26
+ readonly children?: never;
27
+ });
28
+ export declare function PageSection({ children, summary, breakdown, ...heading }: PageSectionProps): ReactNode;
29
+ export {};
@@ -1,16 +1,15 @@
1
1
  import type { ComponentProps, ReactNode } from 'react';
2
2
  import { Button } from '../../core/src/index.ts';
3
- type PageToolbarProps = {
3
+ export type PageToolbarProps = {
4
4
  readonly title: ReactNode;
5
5
  readonly actions?: ReactNode;
6
6
  readonly showBreadcrumb?: boolean;
7
7
  readonly showNavigation?: boolean;
8
- readonly views?: ReactNode;
9
8
  readonly leading?: ReactNode;
10
9
  };
11
10
  type ToolbarActionProps = Omit<ComponentProps<typeof Button>, 'variant' | 'xstyle'> & {
12
11
  readonly icon?: ReactNode;
13
12
  };
14
- export declare function PageToolbar({ title, actions, showBreadcrumb, showNavigation, views, leading, }: PageToolbarProps): ReactNode;
13
+ export declare function PageToolbar({ title, actions, showBreadcrumb, showNavigation, leading, }: PageToolbarProps): ReactNode;
15
14
  export declare function ToolbarAction({ icon, children, ...props }: ToolbarActionProps): ReactNode;
16
15
  export {};
@@ -1,7 +1,5 @@
1
1
  import type { ReactNode, Ref } from 'react';
2
- export type RecordPageRootProps = {
3
- readonly children: ReactNode;
4
- };
2
+ import type { PageNavigationProps } from '../../navigation/src/index.ts';
5
3
  export type RecordPageBodyProps = {
6
4
  readonly children: ReactNode;
7
5
  readonly isWide?: boolean;
@@ -9,7 +7,7 @@ export type RecordPageBodyProps = {
9
7
  export type RecordPageContentProps = {
10
8
  readonly children: ReactNode;
11
9
  };
12
- export type RecordPageToolbarProps = {
10
+ type RecordBackProps = {
13
11
  readonly backLabel: string;
14
12
  readonly backHref: string;
15
13
  readonly onBack?: () => void;
@@ -26,15 +24,16 @@ export type RecordPageAsideProps = {
26
24
  readonly children: ReactNode;
27
25
  readonly label?: string;
28
26
  };
29
- declare function RecordPageRoot({ children }: RecordPageRootProps): ReactNode;
30
- declare function RecordPageToolbar({ backLabel, backHref, onBack, actions, showNavigation, }: RecordPageToolbarProps): ReactNode;
27
+ declare function RecordLayout<Item extends string>({ navigation, children, ...props }: RecordBackProps & {
28
+ readonly navigation?: PageNavigationProps<Item> | undefined;
29
+ readonly children: ReactNode;
30
+ }): ReactNode;
31
31
  declare function RecordPageBody({ children, isWide }: RecordPageBodyProps): ReactNode;
32
32
  declare function RecordPageContent({ children }: RecordPageContentProps): ReactNode;
33
33
  declare function RecordPageHeader({ title, description, icon, titleRef }: RecordPageHeaderProps): ReactNode;
34
34
  declare function RecordPageAside({ children, label }: RecordPageAsideProps): ReactNode;
35
35
  export declare const RecordPage: {
36
- Root: typeof RecordPageRoot;
37
- Toolbar: typeof RecordPageToolbar;
36
+ Layout: typeof RecordLayout;
38
37
  Body: typeof RecordPageBody;
39
38
  Content: typeof RecordPageContent;
40
39
  Header: typeof RecordPageHeader;
@@ -4,21 +4,9 @@ export type ContentTab = {
4
4
  readonly label: string;
5
5
  readonly content: ReactNode;
6
6
  };
7
- export type ContentTabNavigation = {
8
- readonly selectedId: string;
9
- readonly onNavigate: (id: string) => void;
10
- readonly href: (id: string) => string;
11
- };
12
- type ContentTabsContent = {
7
+ export type ContentTabsProps = {
13
8
  readonly label: string;
14
9
  readonly items: ReadonlyArray<ContentTab>;
15
- };
16
- export type ContentTabsProps = ContentTabsContent & ({
17
- readonly navigation: ContentTabNavigation;
18
- readonly defaultSelectedId?: never;
19
- } | {
20
- readonly navigation?: undefined;
21
10
  readonly defaultSelectedId?: string;
22
- });
11
+ };
23
12
  export declare function ContentTabs(props: ContentTabsProps): ReactNode;
24
- export {};
@@ -4,4 +4,4 @@ export { PageNavigation, PageNavigationPlaceholder } from './page-navigation.tsx
4
4
  export { SkipLink } from './skip-link.tsx';
5
5
  export { Tabs } from './tabs.tsx';
6
6
  export { ContentTabs } from './content-tabs.tsx';
7
- export type { ContentTab, ContentTabNavigation, ContentTabsProps } from './content-tabs.tsx';
7
+ export type { ContentTab, ContentTabsProps } from './content-tabs.tsx';
@@ -7,15 +7,13 @@ export type PageNavigationItem<ItemId extends string = string> = {
7
7
  export type PageNavigationProps<ItemId extends string = string> = {
8
8
  readonly items: ReadonlyArray<PageNavigationItem<ItemId>>;
9
9
  readonly selectedId: ItemId;
10
- readonly onNavigate?: (id: ItemId) => void;
10
+ readonly onNavigate?: (item: PageNavigationItem<ItemId>) => void;
11
11
  readonly label?: string;
12
- readonly isEmbedded?: boolean;
13
12
  readonly actions?: ReactNode;
14
13
  };
15
14
  export type PageNavigationPlaceholderProps = {
16
15
  readonly items: ReadonlyArray<Pick<PageNavigationItem, 'id' | 'label'>>;
17
- readonly isEmbedded?: boolean;
18
16
  readonly actions?: ReactNode;
19
17
  };
20
- export declare function PageNavigationPlaceholder({ items, isEmbedded, actions, }: PageNavigationPlaceholderProps): ReactNode;
21
- export declare function PageNavigation<ItemId extends string>({ items, selectedId, onNavigate, label, isEmbedded, actions, }: PageNavigationProps<ItemId>): ReactNode;
18
+ export declare function PageNavigationPlaceholder({ items, actions }: PageNavigationPlaceholderProps): ReactNode;
19
+ export declare function PageNavigation<ItemId extends string>({ items, selectedId, onNavigate, label, actions, }: PageNavigationProps<ItemId>): ReactNode;
@@ -0,0 +1,205 @@
1
+ import { t as e } from "./header-styles-COxCYFZx.js";
2
+ import { t } from "./style-composition-uYlczSsB.js";
3
+ import { mergeProps as n } from "@base-ui/react/merge-props";
4
+ import * as r from "@stylexjs/stylex";
5
+ import { Children as i, useState as a } from "react";
6
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
+ import { Tabs as c } from "@base-ui/react/tabs";
8
+ // packages/navigation/src/tab-styles.ts
9
+ var l = {
10
+ list: {
11
+ k1xSpc: "x78zum5",
12
+ kOIVth: "xxhr3t",
13
+ k7Eaqz: "xeuugli",
14
+ kt9PQ7: "xso031l",
15
+ kfdmCh: "x1q0q8m5",
16
+ kL6WhQ: "x1qndepd",
17
+ kXHlph: "xw2csxc",
18
+ kCfx3h: "x16yzcw2",
19
+ k3ag91: "x1mxyneg",
20
+ kkwBia: "xyjviii",
21
+ kc2wEk: "x1y2jzqp",
22
+ k78XZB: "x12ub8kb",
23
+ kVSElv: "xxwvzwo",
24
+ k5sz9g: "x1ci5vm9",
25
+ $$css: !0
26
+ },
27
+ item: {
28
+ kVAEAm: "x1n2onr6",
29
+ kB7OPa: "x9f619",
30
+ k1xSpc: "x3nfvp2",
31
+ kGNEyG: "x6s0dn4",
32
+ kMnn75: "xkrqix3",
33
+ kmuXW: "x2lah0s",
34
+ kMv6JI: "x1hz01jw",
35
+ k63SB2: "xj57cvi",
36
+ khiITx: "xvmahel",
37
+ kMzoRj: "xc342km",
38
+ kAzted: "x1oec0jp",
39
+ k8WAf4: "xn9t2bk",
40
+ kg3NbH: "x1doqdfy",
41
+ kWkggS: "xjbqb8w",
42
+ kMwMTN: "x153jb6y",
43
+ kkrTdU: "x1ypdohk",
44
+ kGuDYH: "xtqrqnz",
45
+ kLWn49: "x1778rvt",
46
+ khDVqt: "xuxw1ft",
47
+ k4DVmp: "xy7uoan",
48
+ k2wZ5d: "xyg3wme",
49
+ kEZPYj: "xoqm7u7",
50
+ k5JduY: "x1s928wv",
51
+ kwXMNM: "x1j6awrg",
52
+ kcktkL: "x1ccaobo",
53
+ k8Iv0R: "x1xrz1ek",
54
+ k4zj60: "x3cntg4",
55
+ ks3ayO: "xyhc2n1",
56
+ kuyoRO: "x1t3xrl9",
57
+ kv1rg7: "xdsp783",
58
+ kKkqFp: "xv7chyw",
59
+ k2znAY: "x1pgiufq",
60
+ kuJC8G: "xrzcr2b",
61
+ kY2PSQ: "x1nten1d",
62
+ k54cxX: "x1wzsryr",
63
+ kxhOdL: "x1hjdyp1",
64
+ kiLJdH: "x1i5oxzy",
65
+ kDPfah: "xx75q12",
66
+ kAm7yQ: "x7dn452",
67
+ kk7Lky: "xwj21n9",
68
+ kXyCmE: "x1m8qfh3",
69
+ kPJHz1: "x13qnu6",
70
+ k7shQP: "x9v5kkp",
71
+ kZs9gx: "x19rmrnh",
72
+ kiEn40: "x1bqaal",
73
+ $$css: !0
74
+ }
75
+ }, u = {
76
+ navigation: {
77
+ kt9PQ7: "x1qhh985",
78
+ kUk6DE: "x12lumcd",
79
+ ks0D6T: "x193iq5w",
80
+ $$css: !0
81
+ },
82
+ actions: {
83
+ k1xSpc: "x78zum5",
84
+ kGNEyG: "x6s0dn4",
85
+ kwnvtZ: "x1a02dak",
86
+ kOIVth: "x1hnptsi",
87
+ keTefX: "xvc5jky",
88
+ k7Eaqz: "xeuugli",
89
+ ks0D6T: "x193iq5w",
90
+ kB7OPa: "x9f619",
91
+ $$css: !0
92
+ }
93
+ };
94
+ function d({ items: t, actions: n }) {
95
+ return /* @__PURE__ */ s("div", {
96
+ "aria-hidden": !0,
97
+ inert: !0,
98
+ className: "x78zum5 x1a02dak x1qjc9v5 xeuugli x2lah0s xso031l x1q0q8m5 x1qndepd",
99
+ children: [/* @__PURE__ */ o("div", {
100
+ ...r.props(l.list, u.navigation),
101
+ children: t.map((e) => /* @__PURE__ */ o("span", {
102
+ ...r.props(l.item),
103
+ children: e.label
104
+ }, e.id))
105
+ }), i.toArray(n).length > 0 && /* @__PURE__ */ o("div", {
106
+ ...r.props(e.row, u.actions),
107
+ children: n
108
+ })]
109
+ });
110
+ }
111
+ function f({ items: t, selectedId: n, onNavigate: a, label: c = "Page sections", actions: d }) {
112
+ return /* @__PURE__ */ s("div", {
113
+ className: "x78zum5 x1a02dak x1qjc9v5 xeuugli x2lah0s xso031l x1q0q8m5 x1qndepd",
114
+ children: [/* @__PURE__ */ o("nav", {
115
+ "aria-label": c,
116
+ ...r.props(l.list, u.navigation),
117
+ children: t.map((e) => /* @__PURE__ */ o("a", {
118
+ href: e.href,
119
+ "aria-current": e.id === n ? "page" : void 0,
120
+ ...r.props(l.item),
121
+ onClick: (t) => {
122
+ if (a === void 0 || t.defaultPrevented || t.button !== 0) return;
123
+ let n = t.metaKey || t.ctrlKey, r = t.shiftKey || t.altKey;
124
+ n || r || (t.preventDefault(), a(e));
125
+ },
126
+ children: e.label
127
+ }, e.id))
128
+ }), i.toArray(d).length > 0 && /* @__PURE__ */ o("div", {
129
+ ...r.props(e.row, u.actions),
130
+ children: d
131
+ })]
132
+ });
133
+ }
134
+ // packages/navigation/src/skip-link.tsx
135
+ function p(e) {
136
+ return /* @__PURE__ */ o("a", { ...n({ className: "xixxii4 x1ridm32 x12hha37 x1b4oyad x174j0rr x1mvvolr x9f619 xvv7f4i xj0a0fe x1ok0vyi xpvm0e4 xbixft x1hz01jw xk4h15q xtqrqnz x1778rvt xvmahel xujl8zx x1wfrlr2 x1tkds87 x1de710j x1gnsi0 x1cm8ssg" }, e) });
137
+ }
138
+ // packages/navigation/src/tabs.tsx
139
+ function m({ className: e, style: n, ...r }) {
140
+ return /* @__PURE__ */ o(c.Root, {
141
+ ...r,
142
+ ...t({
143
+ className: e,
144
+ style: n,
145
+ styles: { className: "x1hz01jw xj57cvi xtqrqnz x1778rvt xbixft xvmahel xeuugli xsg5m96 x7bu0ch x18eqmq0" }
146
+ })
147
+ });
148
+ }
149
+ function h({ className: e, style: n, ...i }) {
150
+ return /* @__PURE__ */ o(c.List, {
151
+ ...i,
152
+ ...t({
153
+ className: e,
154
+ style: n,
155
+ styles: r.props(l.list)
156
+ })
157
+ });
158
+ }
159
+ function g({ className: e, style: n, ...i }) {
160
+ return /* @__PURE__ */ o(c.Tab, {
161
+ ...i,
162
+ ...t({
163
+ className: e,
164
+ style: n,
165
+ styles: r.props(l.item)
166
+ })
167
+ });
168
+ }
169
+ function _({ className: e, style: n, ...r }) {
170
+ return /* @__PURE__ */ o(c.Panel, {
171
+ ...r,
172
+ ...t({
173
+ className: e,
174
+ style: n,
175
+ styles: { className: "x1o3kwql xeuugli x1k57tk5 xcqfl4l xwqq6z6 x13qnu6 x9v5kkp x19rmrnh x7s97pk" }
176
+ })
177
+ });
178
+ }
179
+ var v = {
180
+ Root: m,
181
+ List: h,
182
+ Tab: g,
183
+ Panel: _
184
+ };
185
+ // packages/navigation/src/content-tabs.tsx
186
+ function y(e) {
187
+ let [t, n] = a(e.defaultSelectedId ?? e.items[0]?.id), r = e.items.find((e) => e.id === t) ?? e.items[0];
188
+ return /* @__PURE__ */ s(v.Root, {
189
+ value: r?.id,
190
+ onValueChange: (e) => n(String(e)),
191
+ className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j",
192
+ children: [/* @__PURE__ */ o(v.List, {
193
+ "aria-label": e.label,
194
+ children: e.items.map((e) => /* @__PURE__ */ o(v.Tab, {
195
+ value: e.id,
196
+ children: e.label
197
+ }, e.id))
198
+ }), r !== void 0 && /* @__PURE__ */ o(v.Panel, {
199
+ value: r.id,
200
+ className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j x1odjw0f xexx8yu",
201
+ children: r.content
202
+ }, r.id)]
203
+ });
204
+ }
205
+ export { d as a, f as i, v as n, p as r, y as t };
@@ -1072,11 +1072,12 @@ var Q = {
1072
1072
  k7Eaqz: "xeuugli",
1073
1073
  ks0D6T: "x193iq5w",
1074
1074
  kB7OPa: "x9f619",
1075
- kOIVth: "xfko13i",
1076
- kmVPX3: "xlsiant",
1077
- kMzoRj: "xmkeg23",
1078
- ksu8eU: "x1y0btm7",
1079
- kVAM5u: "x1ey3b81",
1075
+ kOIVth: "xxhr3t",
1076
+ kmVPX3: "x1717udv",
1077
+ kMeerF: "x1qgsegg",
1078
+ kInvED: "x1g40iwv",
1079
+ k3XXqK: "xaatb59",
1080
+ kjBf7l: "x17owej5",
1080
1081
  kaIpWk: "x1ok0vyi",
1081
1082
  kWkggS: "xpvm0e4",
1082
1083
  kCfx3h: "x16yzcw2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mechane-ai/elements",
3
- "version": "0.38.0",
3
+ "version": "0.39.0",
4
4
  "description": "Elements by Mechane — React components for applications, AI interfaces, and analytical graphics",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -10,6 +10,7 @@
10
10
  },
11
11
  "files": [
12
12
  "dist",
13
+ "skills",
13
14
  "packages/foundations/src/constants.stylex.ts",
14
15
  "packages/foundations/src/tokens.stylex.ts",
15
16
  "styles.css",
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: elements-presentation
3
+ description:
4
+ Coordinate Elements route loading, chart feedback, and keyboard or pointer inspection in analytical workspaces.
5
+ ---
6
+
7
+ # Loading and inspecting reports
8
+
9
+ Give the route a `LoadingScope` from `/feedback` with a navigation identity. Keep the shell mounted. Wrap the entering
10
+ page in one `ContentReveal` so its heading and body enter together. A selection change inside a page should preserve the
11
+ controls and focus.
12
+
13
+ Render the **same** `AsyncRegion` across a read's pending and ready states. Pass a skeleton matching the result geometry
14
+ as its placeholder. Mounting the region only in the pending branch discards its history and skips the ready fade. Group
15
+ values a reader compares together. Keep available filters usable and preserve usable results while refreshing the same
16
+ selection. Use the component's delay and reduced-motion behavior. On a cold document, wait for session resolution before
17
+ showing account navigation or sign-in.
18
+
19
+ For a custom plot, start with `ChartFrame` and chart tones from `/charts`. Keep data meaning in the caller. For a
20
+ calendar heatmap, give each date a square cell, align week columns and day rows to one gap, and distinguish a missing
21
+ observation from the lowest score. A visible readout should provide the date and value on hover and selection. Give
22
+ keyboard users one tab stop with arrows in the plotted directions. Pointer exit restores the selected reading.
23
+
24
+ Inspect a fast cached navigation, hold and release a slow read, then navigate away mid-read. Check that the shell and
25
+ filters stay usable, the skeleton reserves the relevant space, and late responses belong to the active selection. Check
26
+ a chart on a narrow viewport, with reduced motion, and by keyboard alone.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: elements-workspace
3
+ description:
4
+ Compose or review an Elements application shell, full-width workspaces, task navigation, and aligned toolbars.
5
+ ---
6
+
7
+ # Workspace layout
8
+
9
+ Mount one `AppShell` around the authenticated router outlet. Keep its rail, secondary pane, collapse state and toolbar
10
+ in the same positions across destinations. Change the selected link and the secondary links for the active workspace. A
11
+ workspace with one page can name that page in the pane. On a phone use the shell's drawer and its navigation callback.
12
+
13
+ Use `DetailPage isWide` for a working surface such as a ledger, calendar, or chart dashboard. Give the pane one
14
+ responsive gutter. Constrain prose and individual forms locally. Keep a wide plot's horizontal scroll inside its figure.
15
+ At a wide desktop viewport, compare the right edge of a report header with its table and the edge of the pane.
16
+
17
+ Give repeatable tasks such as reviewing a queue a named navigation link with deep-link and Back support. Put filters in
18
+ the toolbar. Keep drill-down on the data mark or row it explains.
19
+
20
+ Use `ToggleGroup` from `/forms` for short sets of pressed choices. For a required selection, keep the active value when
21
+ pressing the selected item returns an empty array. Put the group beside a native Elements field and select. Compare
22
+ their outer heights with a fine pointer and a coarse pointer, and check wrapping at phone width.