@stackable-labs/sdk-extension-react 1.22.0 → 1.22.2

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.
package/dist/ui.d.ts DELETED
@@ -1,366 +0,0 @@
1
- /**
2
- * UI Component Wrappers for Extensions
3
- *
4
- * These are thin React components that render Remote DOM custom elements.
5
- * The host maps these custom elements to real React components (e.g., shadcn/ui).
6
- *
7
- * Extension developers use these as: <ui.Card>, <ui.Button>, etc.
8
- */
9
- import React from 'react';
10
- import type { AllowedIconName } from '@stackable-labs/sdk-extension-contracts';
11
- type RemoteInputChangeEvent = {
12
- target: {
13
- value: string;
14
- };
15
- };
16
- export declare const Card: (props: {
17
- className?: string;
18
- onClick?: () => void;
19
- children?: React.ReactNode;
20
- }) => import("react/jsx-runtime").JSX.Element;
21
- export declare const CardContent: (props: {
22
- className?: string;
23
- children?: React.ReactNode;
24
- }) => import("react/jsx-runtime").JSX.Element;
25
- export declare const CardHeader: (props: {
26
- className?: string;
27
- children?: React.ReactNode;
28
- }) => import("react/jsx-runtime").JSX.Element;
29
- export declare const Stack: (props: {
30
- gap?: string;
31
- direction?: "row" | "column";
32
- align?: string;
33
- className?: string;
34
- children?: React.ReactNode;
35
- }) => import("react/jsx-runtime").JSX.Element;
36
- export declare const Inline: (props: {
37
- gap?: string;
38
- align?: string;
39
- className?: string;
40
- children?: React.ReactNode;
41
- }) => import("react/jsx-runtime").JSX.Element;
42
- export declare const Text: (props: {
43
- className?: string;
44
- tone?: string;
45
- children?: React.ReactNode;
46
- }) => import("react/jsx-runtime").JSX.Element;
47
- export declare const Heading: (props: {
48
- level?: "1" | "2" | "3" | "4" | "5" | "6";
49
- className?: string;
50
- children?: React.ReactNode;
51
- }) => import("react/jsx-runtime").JSX.Element;
52
- export declare const Badge: (props: {
53
- variant?: string;
54
- tone?: string;
55
- className?: string;
56
- children?: React.ReactNode;
57
- }) => import("react/jsx-runtime").JSX.Element;
58
- export declare const Button: (props: {
59
- variant?: string;
60
- size?: string;
61
- disabled?: boolean;
62
- onClick?: () => void;
63
- type?: string;
64
- className?: string;
65
- title?: string;
66
- children?: React.ReactNode;
67
- }) => import("react/jsx-runtime").JSX.Element;
68
- export declare const Input: (props: {
69
- type?: string;
70
- placeholder?: string;
71
- value?: string;
72
- onChange?: (e: RemoteInputChangeEvent) => void;
73
- disabled?: boolean;
74
- className?: string;
75
- id?: string;
76
- }) => import("react/jsx-runtime").JSX.Element;
77
- export declare const Textarea: (props: {
78
- placeholder?: string;
79
- value?: string;
80
- onChange?: (e: RemoteInputChangeEvent) => void;
81
- disabled?: boolean;
82
- rows?: string;
83
- className?: string;
84
- id?: string;
85
- }) => import("react/jsx-runtime").JSX.Element;
86
- export declare const Select: (props: {
87
- value?: string;
88
- defaultValue?: string;
89
- onChange?: (e: RemoteInputChangeEvent) => void;
90
- placeholder?: string;
91
- disabled?: boolean;
92
- className?: string;
93
- children?: React.ReactNode;
94
- }) => import("react/jsx-runtime").JSX.Element;
95
- export declare const SelectOption: (props: {
96
- value: string;
97
- disabled?: boolean;
98
- className?: string;
99
- children?: React.ReactNode;
100
- }) => import("react/jsx-runtime").JSX.Element;
101
- export declare const Checkbox: (props: {
102
- checked?: boolean;
103
- onChange?: (e: RemoteInputChangeEvent) => void;
104
- disabled?: boolean;
105
- className?: string;
106
- id?: string;
107
- }) => import("react/jsx-runtime").JSX.Element;
108
- export declare const Switch: (props: {
109
- checked?: boolean;
110
- onChange?: (e: RemoteInputChangeEvent) => void;
111
- disabled?: boolean;
112
- size?: string;
113
- className?: string;
114
- id?: string;
115
- }) => import("react/jsx-runtime").JSX.Element;
116
- export declare const Label: (props: {
117
- htmlFor?: string;
118
- className?: string;
119
- children?: React.ReactNode;
120
- }) => import("react/jsx-runtime").JSX.Element;
121
- export declare const RadioGroup: (props: {
122
- value?: string;
123
- defaultValue?: string;
124
- onChange?: (e: RemoteInputChangeEvent) => void;
125
- className?: string;
126
- children?: React.ReactNode;
127
- }) => import("react/jsx-runtime").JSX.Element;
128
- export declare const RadioGroupItem: (props: {
129
- value: string;
130
- disabled?: boolean;
131
- className?: string;
132
- id?: string;
133
- }) => import("react/jsx-runtime").JSX.Element;
134
- export declare const Separator: (props: {
135
- className?: string;
136
- }) => import("react/jsx-runtime").JSX.Element;
137
- export declare const Tabs: (props: {
138
- defaultValue?: string;
139
- className?: string;
140
- children?: React.ReactNode;
141
- }) => import("react/jsx-runtime").JSX.Element;
142
- export declare const TabsList: (props: {
143
- className?: string;
144
- children?: React.ReactNode;
145
- }) => import("react/jsx-runtime").JSX.Element;
146
- export declare const TabsTrigger: (props: {
147
- value: string;
148
- className?: string;
149
- children?: React.ReactNode;
150
- }) => import("react/jsx-runtime").JSX.Element;
151
- export declare const TabsContent: (props: {
152
- value: string;
153
- className?: string;
154
- children?: React.ReactNode;
155
- }) => import("react/jsx-runtime").JSX.Element;
156
- export declare const ScrollArea: (props: {
157
- className?: string;
158
- children?: React.ReactNode;
159
- }) => import("react/jsx-runtime").JSX.Element;
160
- export declare const Skeleton: (props: {
161
- width?: string;
162
- height?: string;
163
- className?: string;
164
- }) => import("react/jsx-runtime").JSX.Element;
165
- export declare const Tooltip: (props: {
166
- content: string;
167
- className?: string;
168
- children?: React.ReactNode;
169
- }) => import("react/jsx-runtime").JSX.Element;
170
- export declare const Progress: (props: {
171
- value?: string;
172
- className?: string;
173
- }) => import("react/jsx-runtime").JSX.Element;
174
- export declare const Alert: (props: {
175
- variant?: string;
176
- title?: string;
177
- className?: string;
178
- children?: React.ReactNode;
179
- }) => import("react/jsx-runtime").JSX.Element;
180
- export declare const Collapsible: (props: {
181
- defaultOpen?: boolean;
182
- className?: string;
183
- children?: React.ReactNode;
184
- }) => import("react/jsx-runtime").JSX.Element;
185
- export declare const CollapsibleTrigger: (props: {
186
- className?: string;
187
- children?: React.ReactNode;
188
- }) => import("react/jsx-runtime").JSX.Element;
189
- export declare const CollapsibleContent: (props: {
190
- className?: string;
191
- children?: React.ReactNode;
192
- }) => import("react/jsx-runtime").JSX.Element;
193
- export declare const Avatar: (props: {
194
- src?: string;
195
- alt?: string;
196
- className?: string;
197
- }) => import("react/jsx-runtime").JSX.Element;
198
- export declare const Icon: (props: {
199
- name: AllowedIconName;
200
- size?: string;
201
- className?: string;
202
- }) => import("react/jsx-runtime").JSX.Element;
203
- export declare const Link: (props: {
204
- href?: string;
205
- target?: string;
206
- rel?: string;
207
- className?: string;
208
- children?: React.ReactNode;
209
- }) => import("react/jsx-runtime").JSX.Element;
210
- export declare const FooterLink: (props: {
211
- href?: string;
212
- children?: React.ReactNode;
213
- }) => import("react/jsx-runtime").JSX.Element;
214
- export declare const Menu: (props: {
215
- title?: string;
216
- className?: string;
217
- children?: React.ReactNode;
218
- }) => import("react/jsx-runtime").JSX.Element;
219
- export declare const MenuItem: (props: {
220
- icon?: AllowedIconName;
221
- label: string;
222
- description?: string;
223
- onClick?: () => void;
224
- className?: string;
225
- }) => import("react/jsx-runtime").JSX.Element;
226
- declare global {
227
- namespace JSX {
228
- interface IntrinsicElements {
229
- 'ui-card': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
230
- 'ui-card-content': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
231
- 'ui-card-header': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
232
- 'ui-button': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
233
- variant?: string;
234
- size?: string;
235
- disabled?: boolean;
236
- type?: string;
237
- title?: string;
238
- }, HTMLElement>;
239
- 'ui-text': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
240
- tone?: string;
241
- }, HTMLElement>;
242
- 'ui-heading': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
243
- level?: string;
244
- }, HTMLElement>;
245
- 'ui-badge': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
246
- variant?: string;
247
- tone?: string;
248
- }, HTMLElement>;
249
- 'ui-input': Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> & {
250
- type?: string;
251
- placeholder?: string;
252
- value?: string;
253
- onChange?: (e: RemoteInputChangeEvent) => void;
254
- disabled?: boolean;
255
- id?: string;
256
- };
257
- 'ui-textarea': Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> & {
258
- placeholder?: string;
259
- value?: string;
260
- onChange?: (e: RemoteInputChangeEvent) => void;
261
- disabled?: boolean;
262
- rows?: string;
263
- id?: string;
264
- };
265
- 'ui-select': Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> & {
266
- value?: string;
267
- defaultValue?: string;
268
- onChange?: (e: RemoteInputChangeEvent) => void;
269
- placeholder?: string;
270
- disabled?: boolean;
271
- };
272
- 'ui-select-option': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
273
- value?: string;
274
- disabled?: boolean;
275
- }, HTMLElement>;
276
- 'ui-checkbox': Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> & {
277
- checked?: boolean;
278
- onChange?: (e: RemoteInputChangeEvent) => void;
279
- disabled?: boolean;
280
- id?: string;
281
- };
282
- 'ui-switch': Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> & {
283
- checked?: boolean;
284
- onChange?: (e: RemoteInputChangeEvent) => void;
285
- disabled?: boolean;
286
- size?: string;
287
- id?: string;
288
- };
289
- 'ui-label': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
290
- htmlFor?: string;
291
- }, HTMLElement>;
292
- 'ui-radio-group': Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> & {
293
- value?: string;
294
- defaultValue?: string;
295
- onChange?: (e: RemoteInputChangeEvent) => void;
296
- };
297
- 'ui-radio-group-item': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
298
- value?: string;
299
- disabled?: boolean;
300
- id?: string;
301
- }, HTMLElement>;
302
- 'ui-stack': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
303
- gap?: string;
304
- direction?: string;
305
- align?: string;
306
- }, HTMLElement>;
307
- 'ui-inline': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
308
- gap?: string;
309
- align?: string;
310
- }, HTMLElement>;
311
- 'ui-separator': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
312
- 'ui-tabs': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
313
- defaultValue?: string;
314
- }, HTMLElement>;
315
- 'ui-tabs-list': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
316
- 'ui-tabs-trigger': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
317
- value?: string;
318
- }, HTMLElement>;
319
- 'ui-tabs-content': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
320
- value?: string;
321
- }, HTMLElement>;
322
- 'ui-scroll-area': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
323
- 'ui-avatar': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
324
- src?: string;
325
- alt?: string;
326
- }, HTMLElement>;
327
- 'ui-icon': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
328
- name?: string;
329
- size?: string;
330
- }, HTMLElement>;
331
- 'ui-link': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
332
- href?: string;
333
- target?: string;
334
- rel?: string;
335
- }, HTMLElement>;
336
- 'ui-menu-item': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
337
- icon?: string;
338
- label?: string;
339
- description?: string;
340
- }, HTMLElement>;
341
- 'ui-menu': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
342
- title?: string;
343
- }, HTMLElement>;
344
- 'ui-skeleton': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
345
- width?: string;
346
- height?: string;
347
- }, HTMLElement>;
348
- 'ui-tooltip': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
349
- content?: string;
350
- }, HTMLElement>;
351
- 'ui-progress': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
352
- value?: string;
353
- }, HTMLElement>;
354
- 'ui-alert': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
355
- variant?: string;
356
- title?: string;
357
- }, HTMLElement>;
358
- 'ui-collapsible': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
359
- defaultOpen?: boolean;
360
- }, HTMLElement>;
361
- 'ui-collapsible-trigger': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
362
- 'ui-collapsible-content': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
363
- }
364
- }
365
- }
366
- export {};
package/dist/ui.js DELETED
@@ -1,50 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- // ─── Layout ──────────────────────────────────────────────────────────────────
3
- export const Card = (props) => _jsx("ui-card", { ...props, children: props.children });
4
- export const CardContent = (props) => _jsx("ui-card-content", { ...props, children: props.children });
5
- export const CardHeader = (props) => _jsx("ui-card-header", { ...props, children: props.children });
6
- export const Stack = (props) => _jsx("ui-stack", { ...props, children: props.children });
7
- export const Inline = (props) => _jsx("ui-inline", { ...props, children: props.children });
8
- // ─── Text ────────────────────────────────────────────────────────────────────
9
- export const Text = (props) => _jsx("ui-text", { ...props, children: props.children });
10
- export const Heading = (props) => _jsx("ui-heading", { ...props, children: props.children });
11
- export const Badge = (props) => _jsx("ui-badge", { ...props, children: props.children });
12
- // ─── Inputs ──────────────────────────────────────────────────────────────────
13
- export const Button = (props) => _jsx("ui-button", { ...props, children: props.children });
14
- export const Input = (props) => _jsx("ui-input", { ...props });
15
- export const Textarea = (props) => _jsx("ui-textarea", { ...props });
16
- export const Select = (props) => _jsx("ui-select", { ...props, children: props.children });
17
- export const SelectOption = (props) => _jsx("ui-select-option", { ...props, children: props.children });
18
- export const Checkbox = (props) => _jsx("ui-checkbox", { ...props });
19
- export const Switch = (props) => _jsx("ui-switch", { ...props });
20
- export const Label = (props) => _jsx("ui-label", { ...props, children: props.children });
21
- export const RadioGroup = (props) => _jsx("ui-radio-group", { ...props, children: props.children });
22
- export const RadioGroupItem = (props) => _jsx("ui-radio-group-item", { ...props });
23
- // ─── Feedback / Navigation ───────────────────────────────────────────────────
24
- export const Separator = (props) => _jsx("ui-separator", { ...props });
25
- export const Tabs = (props) => _jsx("ui-tabs", { ...props, children: props.children });
26
- export const TabsList = (props) => _jsx("ui-tabs-list", { ...props, children: props.children });
27
- export const TabsTrigger = (props) => _jsx("ui-tabs-trigger", { ...props, children: props.children });
28
- export const TabsContent = (props) => _jsx("ui-tabs-content", { ...props, children: props.children });
29
- export const ScrollArea = (props) => _jsx("ui-scroll-area", { ...props, children: props.children });
30
- export const Skeleton = (props) => _jsx("ui-skeleton", { ...props });
31
- export const Tooltip = (props) => _jsx("ui-tooltip", { ...props, children: props.children });
32
- export const Progress = (props) => _jsx("ui-progress", { ...props });
33
- export const Alert = (props) => _jsx("ui-alert", { ...props, children: props.children });
34
- // ─── Collapsible ─────────────────────────────────────────────────────────────
35
- export const Collapsible = (props) => _jsx("ui-collapsible", { ...props, children: props.children });
36
- export const CollapsibleTrigger = (props) => _jsx("ui-collapsible-trigger", { ...props, children: props.children });
37
- export const CollapsibleContent = (props) => _jsx("ui-collapsible-content", { ...props, children: props.children });
38
- // ─── Avatar ──────────────────────────────────────────────────────────────────
39
- export const Avatar = (props) => _jsx("ui-avatar", { ...props });
40
- // ─── Icons ───────────────────────────────────────────────────────────────────
41
- export const Icon = (props) => _jsx("ui-icon", { ...props });
42
- export const Link = (props) => _jsx("ui-link", { ...props, children: props.children });
43
- // NOTE: Keep this implementation in sync with
44
- // packages/apps/host-app/src/components/FooterLink.tsx.
45
- // TODO: Abstract FooterLink into a shared React component package.
46
- export const FooterLink = (props) => (_jsx("ui-link", { ...props, target: "_blank", rel: "noopener noreferrer", className: "text-zinc-500 opacity-80 transition-colors hover:text-zinc-900 hover:opacity-100", children: props.children }));
47
- // ─── Composite ──────────────────────────────────────────────────────────────
48
- export const Menu = (props) => _jsx("ui-menu", { ...props, children: props.children });
49
- export const MenuItem = (props) => _jsx("ui-menu-item", { ...props });
50
- //# sourceMappingURL=ui.js.map
package/dist/ui.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.tsx"],"names":[],"mappings":";AAoBA,gFAAgF;AAEhF,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAIpB,EAAE,EAAE,CAAC,qBAAa,KAAK,YAAG,KAAK,CAAC,QAAQ,GAAW,CAAA;AAEpD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAG3B,EAAE,EAAE,CAAC,6BAAqB,KAAK,YAAG,KAAK,CAAC,QAAQ,GAAmB,CAAA;AAEpE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAG1B,EAAE,EAAE,CAAC,4BAAoB,KAAK,YAAG,KAAK,CAAC,QAAQ,GAAkB,CAAA;AAElE,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAMrB,EAAE,EAAE,CAAC,sBAAc,KAAK,YAAG,KAAK,CAAC,QAAQ,GAAY,CAAA;AAEtD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAKtB,EAAE,EAAE,CAAC,uBAAe,KAAK,YAAG,KAAK,CAAC,QAAQ,GAAa,CAAA;AAExD,gFAAgF;AAEhF,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAIpB,EAAE,EAAE,CAAC,qBAAa,KAAK,YAAG,KAAK,CAAC,QAAQ,GAAW,CAAA;AAEpD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAIvB,EAAE,EAAE,CAAC,wBAAgB,KAAK,YAAG,KAAK,CAAC,QAAQ,GAAc,CAAA;AAE1D,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAKrB,EAAE,EAAE,CAAC,sBAAc,KAAK,YAAG,KAAK,CAAC,QAAQ,GAAY,CAAA;AAEtD,gFAAgF;AA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A0B,CAAA;AAElF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAGlC,EAAE,EAAE,CAAC,oCAA4B,KAAK,YAAG,KAAK,CAAC,QAAQ,GAA0B,CAAA;AAElF,gFAAgF;AAEhF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAItB,EAAE,EAAE,CAAC,uBAAe,KAAK,GAAI,CAAA;AAE9B,gFAAgF;AAEhF,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAIpB,EAAE,EAAE,CAAC,qBAAa,KAAK,GAAI,CAAA;AAE5B,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAMpB,EAAE,EAAE,CAAC,qBAAa,KAAK,YAAG,KAAK,CAAC,QAAQ,GAAW,CAAA;AAEpD,8CAA8C;AAC9C,wDAAwD;AACxD,mEAAmE;AACnE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAG1B,EAAE,EAAE,CAAC,CACJ,qBACQ,KAAK,EACT,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAC,kFAAkF,YAE3F,KAAK,CAAC,QAAQ,GACP,CACb,CAAA;AAED,+EAA+E;AAE/E,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAIpB,EAAE,EAAE,CAAC,qBAAa,KAAK,YAAG,KAAK,CAAC,QAAQ,GAAW,CAAA;AAEpD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAMxB,EAAE,EAAE,CAAC,0BAAkB,KAAK,GAAI,CAAA"}
@@ -1,9 +0,0 @@
1
- /**
2
- * useContextData — reads host context on mount and returns all context fields.
3
- */
4
- import type { ContextData } from '@stackable-labs/sdk-extension-contracts';
5
- type UseContextDataResult = ContextData & {
6
- loading: boolean;
7
- };
8
- export declare const useContextData: () => UseContextDataResult;
9
- export {};
@@ -1,27 +0,0 @@
1
- /**
2
- * useContextData — reads host context on mount and returns all context fields.
3
- */
4
- import { useState, useEffect } from 'react';
5
- import { useCapabilities } from './hooks';
6
- export const useContextData = () => {
7
- const capabilities = useCapabilities();
8
- const [contextData, setContextData] = useState({});
9
- const [loading, setLoading] = useState(true);
10
- useEffect(() => {
11
- const loadContext = async () => {
12
- try {
13
- const ctx = await capabilities.context.read();
14
- setContextData(ctx);
15
- }
16
- catch (err) {
17
- console.error('Failed to read context:', err);
18
- }
19
- finally {
20
- setLoading(false);
21
- }
22
- };
23
- loadContext();
24
- }, []);
25
- return { ...contextData, loading };
26
- };
27
- //# sourceMappingURL=useContextData.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useContextData.js","sourceRoot":"","sources":["../src/useContextData.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAIzC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAyB,EAAE;IACvD,MAAM,YAAY,GAAG,eAAe,EAAE,CAAA;IAEtC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAc,EAAE,CAAC,CAAA;IAC/D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAU,IAAI,CAAC,CAAA;IAErD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE;YAC7B,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,CAAA;gBAC7C,cAAc,CAAC,GAAG,CAAC,CAAA;YACrB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAA;YAC/C,CAAC;oBAAS,CAAC;gBACT,UAAU,CAAC,KAAK,CAAC,CAAA;YACnB,CAAC;QACH,CAAC,CAAA;QACD,WAAW,EAAE,CAAA;IACf,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,EAAE,GAAG,WAAW,EAAE,OAAO,EAAE,CAAA;AACpC,CAAC,CAAA"}