@almadar/shell-web 0.0.0-stage → 1.0.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.
- package/bundling.d.mts +18 -0
- package/bundling.mjs +28 -0
- package/dist/ArbitraryClassCompiler-CO_iASBn.d.ts +195 -0
- package/dist/AvlGlyph-EPJKFEO3.js +6 -0
- package/dist/AvlStateMachine-RKZIKNGC.js +9 -0
- package/dist/AvlTransitionDetail-63SD6GZF.js +11 -0
- package/dist/AvlTransitionExplainer-ZBTLOM3T.js +12 -0
- package/dist/BehaviorView-YS5G4GNB.js +11 -0
- package/dist/Canvas3DHost-BkZQB5l2.d.ts +552 -0
- package/dist/EventBusProvider-BFFHfN4O.d.ts +296 -0
- package/dist/FileTree-BCFnBEuQ.d.ts +254 -0
- package/dist/FlowCanvas-3JRMNJLV.css +1756 -0
- package/dist/FlowCanvas-AUMTWMNG.js +26 -0
- package/dist/GameAudioProvider-ceM_n0ey.d.ts +90 -0
- package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/dist/KernelEngineContext-CcxGYtlr.d.ts +33 -0
- package/dist/LayersPanel-M2LHWUFF.js +6 -0
- package/dist/ModuleCard-QHDGK5XK.js +7 -0
- package/dist/OrbInspector-MHLJ6OEE.css +1756 -0
- package/dist/OrbInspector-QCPEPUPH.js +26 -0
- package/dist/Select-B-iDdnvE.d.ts +185 -0
- package/dist/ServerBridge-Bqsj-lOU.d.ts +124 -0
- package/dist/ThemeContext-DJmO59xd.d.ts +147 -0
- package/dist/UISlotContext-Dl_ewwCI.d.ts +79 -0
- package/dist/UISlotRenderer-C7WWOK43.js +26 -0
- package/dist/UISlotRenderer-KVFO6J7R.css +1756 -0
- package/dist/auth/browser/index.d.ts +2 -0
- package/dist/auth/browser/index.js +2 -0
- package/dist/auth/react/index.d.ts +56 -0
- package/dist/auth/react/index.js +157 -0
- package/dist/avl/index.css +1756 -0
- package/dist/avl/index.d.ts +2248 -0
- package/dist/avl/index.js +2693 -0
- package/dist/avl-3d-context-BycmO6tG.d.ts +201 -0
- package/dist/avl-schema-parser-CtJxJ9KU.d.ts +132 -0
- package/dist/avl-zoom-state-CKMVuBFg.d.ts +17 -0
- package/dist/chunk-3BBUBJFF.js +339 -0
- package/dist/chunk-3S54FWRC.js +131 -0
- package/dist/chunk-3VZ36ZKO.js +775 -0
- package/dist/chunk-4T3P43NS.js +1133 -0
- package/dist/chunk-4YXBKHHM.js +11488 -0
- package/dist/chunk-57DC34LY.js +525 -0
- package/dist/chunk-5QTYQTPS.js +15 -0
- package/dist/chunk-A2LR6VQQ.js +349 -0
- package/dist/chunk-AB3X7QTE.js +505 -0
- package/dist/chunk-AE7VCQB6.js +561 -0
- package/dist/chunk-AGXD77SL.js +98 -0
- package/dist/chunk-AU7O65OX.js +66 -0
- package/dist/chunk-CPLN6NBQ.js +701 -0
- package/dist/chunk-DZBQA2OW.js +176 -0
- package/dist/chunk-E6KA4J6N.js +227 -0
- package/dist/chunk-EOWMARUB.js +16 -0
- package/dist/chunk-G7DCAZ22.js +19 -0
- package/dist/chunk-GFXCPUMX.js +1334 -0
- package/dist/chunk-HH5KSMH5.js +311 -0
- package/dist/chunk-ILQXJ2AR.js +280 -0
- package/dist/chunk-ILZ7ORX7.js +432 -0
- package/dist/chunk-K4MOPSEL.js +674 -0
- package/dist/chunk-LHP2TK7O.js +47587 -0
- package/dist/chunk-P4ZFUQFF.js +93 -0
- package/dist/chunk-PCR37T3U.js +296 -0
- package/dist/chunk-PRXQGGCO.js +580 -0
- package/dist/chunk-REXYVBUO.js +191 -0
- package/dist/chunk-ROICKAU7.js +24 -0
- package/dist/chunk-SP5CDJ6K.js +338 -0
- package/dist/chunk-TUPZWTRE.js +1051 -0
- package/dist/chunk-TXAUOLWZ.js +490 -0
- package/dist/chunk-TZZBINQY.js +82 -0
- package/dist/chunk-UTDC2NEA.js +14 -0
- package/dist/chunk-UU57VNS2.js +1053 -0
- package/dist/chunk-UXLE3IPR.js +421 -0
- package/dist/chunk-VO2TTLS5.js +94 -0
- package/dist/chunk-X3DMMX27.js +11 -0
- package/dist/chunk-YHMRX6YA.js +455 -0
- package/dist/components/index.css +1756 -0
- package/dist/components/index.d.ts +11299 -0
- package/dist/components/index.js +1110 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/context/index.js +8 -0
- package/dist/core.d.ts +2599 -0
- package/dist/core.js +3 -0
- package/dist/design-classes/index.cjs +431 -0
- package/dist/design-classes/index.d.cts +165 -0
- package/dist/design-classes/index.d.ts +165 -0
- package/dist/design-classes/index.js +399 -0
- package/dist/emojiItems-QGSNAABW.js +20 -0
- package/dist/fx-CmQjnHmT.d.ts +371 -0
- package/dist/hooks/index.d.ts +971 -0
- package/dist/hooks/index.js +8 -0
- package/dist/index.d.ts +408 -0
- package/dist/index.js +178 -0
- package/dist/katexPlugin-FA7NX4PE.css +1161 -0
- package/dist/katexPlugin-NCDKOOQY.js +2 -0
- package/dist/kernel-client-TZKGHJRY.js +516 -0
- package/dist/kernel-wire-wNdAPfhJ.d.ts +88 -0
- package/dist/lib/index.d.ts +602 -0
- package/dist/lib/index.js +1289 -0
- package/dist/paintDispatch-CuJLsr9Y.d.ts +688 -0
- package/dist/parseLessonSegments-GpCeMrb2.d.ts +334 -0
- package/dist/perf-CKiBKbkw.d.ts +22 -0
- package/dist/perf-Dr28-AgT.d.ts +57 -0
- package/dist/prism-X5YWKXO5.js +136 -0
- package/dist/providers/index.css +1756 -0
- package/dist/providers/index.d.ts +355 -0
- package/dist/providers/index.js +29 -0
- package/dist/renderer/index.d.ts +465 -0
- package/dist/renderer/index.js +4 -0
- package/dist/runtime/index.css +1756 -0
- package/dist/runtime/index.d.ts +239 -0
- package/dist/runtime/index.js +28 -0
- package/dist/slot-host-CPzrxLo9.d.ts +48 -0
- package/dist/ssr/index.cjs +9739 -0
- package/dist/ssr/index.d.cts +464 -0
- package/dist/ssr/index.d.ts +464 -0
- package/dist/ssr/index.js +9703 -0
- package/dist/storage/browser/index.d.ts +1 -0
- package/dist/storage/browser/index.js +2 -0
- package/dist/test-support.d.ts +42 -0
- package/dist/test-support.js +181 -0
- package/dist/themeTokens-CRd8AEDF.d.ts +125 -0
- package/dist/three/index.css +503 -0
- package/dist/three/index.d.ts +1185 -0
- package/dist/three/index.js +3908 -0
- package/dist/useUISlots-CiobNFGb.d.ts +211 -0
- package/dist/verification-C5pTeMJv.d.ts +66 -0
- package/dist/verificationRegistry-CVrcxG1s.d.ts +122 -0
- package/dist/wrapCallbackForEvent-B9QLbhxX.d.ts +19 -0
- package/index.css +199 -0
- package/package.json +273 -3
- package/src/core/lib/band-shapes.json +7 -0
- package/src/core/locales/ar.json +1276 -0
- package/src/core/locales/en.json +1276 -0
- package/src/core/locales/index.ts +54 -0
- package/src/core/locales/sl.json +1276 -0
- package/src/core/tokens/native-tokens.json +369 -0
- package/tailwind-compile.cjs +29 -0
- package/tailwind-preset.cjs +1020 -0
- package/themes/_base.css +451 -0
- package/themes/_contract.md +307 -0
- package/themes/_fonts-kenney.css +11 -0
- package/themes/_fonts.css +12 -0
- package/themes/_foundation.css +105 -0
- package/themes/_head.css +22 -0
- package/themes/_presets.css +67 -0
- package/themes/almadar-heritage.css +455 -0
- package/themes/almadar-website.css +269 -0
- package/themes/almadar.css +269 -0
- package/themes/aqua.css +455 -0
- package/themes/arabesque.css +459 -0
- package/themes/art-deco.css +457 -0
- package/themes/art-nouveau.css +459 -0
- package/themes/atelier.css +463 -0
- package/themes/bauhaus.css +461 -0
- package/themes/bloomberg-dense.css +463 -0
- package/themes/blueprint.css +457 -0
- package/themes/clay.css +449 -0
- package/themes/comic.css +453 -0
- package/themes/constructivist.css +457 -0
- package/themes/corporate.css +449 -0
- package/themes/cyberpunk.css +453 -0
- package/themes/frutiger-aero.css +458 -0
- package/themes/game-adventure.css +201 -0
- package/themes/game-rpg.css +203 -0
- package/themes/game-sci-fi.css +201 -0
- package/themes/game-ui-pack.css +200 -0
- package/themes/gazette.css +449 -0
- package/themes/glass.css +457 -0
- package/themes/gothic.css +453 -0
- package/themes/index.css +21 -0
- package/themes/ink-wash.css +459 -0
- package/themes/kawaii.css +459 -0
- package/themes/kflow.css +310 -0
- package/themes/kiosk.css +449 -0
- package/themes/linear-clean.css +463 -0
- package/themes/luxury.css +451 -0
- package/themes/mac-classic.css +455 -0
- package/themes/material.css +463 -0
- package/themes/memphis.css +453 -0
- package/themes/mid-century.css +455 -0
- package/themes/minimalist.css +449 -0
- package/themes/mudcloth.css +459 -0
- package/themes/nata.css +310 -0
- package/themes/neon.css +453 -0
- package/themes/neumorphic.css +451 -0
- package/themes/newsprint.css +455 -0
- package/themes/notion-editorial.css +463 -0
- package/themes/orb.css +465 -0
- package/themes/pixel.css +449 -0
- package/themes/prism.css +309 -0
- package/themes/rawi.css +310 -0
- package/themes/retro.css +452 -0
- package/themes/risograph.css +463 -0
- package/themes/scandi.css +469 -0
- package/themes/sketch.css +455 -0
- package/themes/solarpunk.css +469 -0
- package/themes/steampunk.css +451 -0
- package/themes/swiss.css +455 -0
- package/themes/terminal.css +466 -0
- package/themes/trait-wars.css +487 -0
- package/themes/ukiyo-e.css +459 -0
- package/themes/vaporwave.css +455 -0
- package/themes/victorian.css +453 -0
- package/themes/wabi-sabi.css +459 -0
- package/themes/win95.css +455 -0
- package/themes/wireframe.css +439 -0
- package/themes/zine.css +455 -0
- package/README.md +0 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export { OrbInspector } from './chunk-LHP2TK7O.js';
|
|
2
|
+
import './chunk-57DC34LY.js';
|
|
3
|
+
import './chunk-SP5CDJ6K.js';
|
|
4
|
+
import './chunk-CPLN6NBQ.js';
|
|
5
|
+
import './chunk-HH5KSMH5.js';
|
|
6
|
+
import './chunk-REXYVBUO.js';
|
|
7
|
+
import './chunk-AGXD77SL.js';
|
|
8
|
+
import './chunk-TXAUOLWZ.js';
|
|
9
|
+
import './chunk-AB3X7QTE.js';
|
|
10
|
+
import './chunk-DZBQA2OW.js';
|
|
11
|
+
import './chunk-TUPZWTRE.js';
|
|
12
|
+
import './chunk-TZZBINQY.js';
|
|
13
|
+
import './chunk-4T3P43NS.js';
|
|
14
|
+
import './chunk-PCR37T3U.js';
|
|
15
|
+
import './chunk-UXLE3IPR.js';
|
|
16
|
+
import './chunk-ILZ7ORX7.js';
|
|
17
|
+
import './chunk-3VZ36ZKO.js';
|
|
18
|
+
import './chunk-PRXQGGCO.js';
|
|
19
|
+
import './chunk-VO2TTLS5.js';
|
|
20
|
+
import './chunk-AE7VCQB6.js';
|
|
21
|
+
import './chunk-3BBUBJFF.js';
|
|
22
|
+
import './chunk-YHMRX6YA.js';
|
|
23
|
+
import './chunk-4YXBKHHM.js';
|
|
24
|
+
import './chunk-A2LR6VQQ.js';
|
|
25
|
+
import './chunk-P4ZFUQFF.js';
|
|
26
|
+
import './chunk-G7DCAZ22.js';
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { A11yProps, Asset, EventKey, EventPayload, EventEmit } from '@almadar/core';
|
|
3
|
+
import { I as IconInput } from './fx-CmQjnHmT.js';
|
|
4
|
+
|
|
5
|
+
type ButtonVariant = "primary" | "secondary" | "ghost" | "danger" | "success" | "warning" | "default" | "link";
|
|
6
|
+
type ButtonSize = "sm" | "md" | "lg";
|
|
7
|
+
/**
|
|
8
|
+
* @accessibleName label
|
|
9
|
+
* @role button
|
|
10
|
+
* @tokens --color-primary --color-primary-foreground --color-foreground
|
|
11
|
+
* @contrast primary-foreground primary
|
|
12
|
+
* @motion css
|
|
13
|
+
*/
|
|
14
|
+
interface ButtonProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, keyof A11yProps | 'onClick'>, A11yProps {
|
|
15
|
+
/** Additional CSS classes applied to the root element. */
|
|
16
|
+
className?: string;
|
|
17
|
+
variant?: ButtonVariant;
|
|
18
|
+
size?: ButtonSize;
|
|
19
|
+
isLoading?: boolean;
|
|
20
|
+
/** Left icon: a Lucide component or a canonical icon name string (e.g. "plus", "trash"). */
|
|
21
|
+
leftIcon?: IconInput;
|
|
22
|
+
/** Right icon: a Lucide component or a canonical icon name string. */
|
|
23
|
+
rightIcon?: IconInput;
|
|
24
|
+
/** Alias for leftIcon */
|
|
25
|
+
icon?: IconInput;
|
|
26
|
+
/** Alias for rightIcon */
|
|
27
|
+
iconRight?: IconInput;
|
|
28
|
+
/** Asset image rendered as the leading icon; takes precedence over icon/leftIcon when provided. */
|
|
29
|
+
iconAsset?: Asset;
|
|
30
|
+
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
31
|
+
action?: EventKey;
|
|
32
|
+
/** Payload to include with the action event
|
|
33
|
+
* @payloadFor action
|
|
34
|
+
*/
|
|
35
|
+
actionPayload?: EventPayload;
|
|
36
|
+
/**
|
|
37
|
+
* Button label text (alternative to children for schema-driven rendering)
|
|
38
|
+
* @example Button
|
|
39
|
+
*/
|
|
40
|
+
label?: string;
|
|
41
|
+
/** Disable the button (greys out, blocks click events) */
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
/** Native button type. `type` is reserved for the pattern discriminator in schema render specs. */
|
|
44
|
+
htmlType?: "button" | "submit" | "reset";
|
|
45
|
+
/** Makes the button a link: `#anchor` scrolls, an absolute URL loads, a path navigates in-app */
|
|
46
|
+
href?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Runs on activation, on the button or, with `href`, on the link; calling
|
|
49
|
+
* `preventDefault()` there keeps a link from following its `href`.
|
|
50
|
+
*/
|
|
51
|
+
onClick?: (event: React__default.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
52
|
+
/** Test identifier for automated tests */
|
|
53
|
+
'data-testid'?: string;
|
|
54
|
+
}
|
|
55
|
+
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
56
|
+
|
|
57
|
+
interface SelectOption$1 {
|
|
58
|
+
value: string;
|
|
59
|
+
label: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @accessibleName label
|
|
63
|
+
* @role textbox
|
|
64
|
+
* @tokens --color-card --color-border --color-foreground --color-muted-foreground
|
|
65
|
+
* @contrast foreground card
|
|
66
|
+
* @motion css
|
|
67
|
+
*/
|
|
68
|
+
interface InputProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "onChange" | Exclude<keyof A11yProps, "role" | "dir">>, Omit<A11yProps, "role" | "dir"> {
|
|
69
|
+
/** Additional CSS classes applied to the root element. */
|
|
70
|
+
className?: string;
|
|
71
|
+
/** Placeholder text */
|
|
72
|
+
placeholder?: string;
|
|
73
|
+
/** Current value */
|
|
74
|
+
value?: string | number;
|
|
75
|
+
/** Whether input is disabled */
|
|
76
|
+
disabled?: boolean;
|
|
77
|
+
/** Declarative event name for trait dispatch.
|
|
78
|
+
* @payloadTypeWhen value inputType=number->number
|
|
79
|
+
*/
|
|
80
|
+
action?: EventEmit<{
|
|
81
|
+
value: string | number;
|
|
82
|
+
}>;
|
|
83
|
+
/**
|
|
84
|
+
* Input type — selects the field's data mode. Use 'password' for masked
|
|
85
|
+
* credentials / secret / passphrase entry (there is no separate password
|
|
86
|
+
* pattern); 'email', 'tel', 'url', 'number', 'search', 'date', and 'time'
|
|
87
|
+
* for their respective values; and 'select' / 'textarea' for choice and
|
|
88
|
+
* multi-line entry in addition to the standard single-line types.
|
|
89
|
+
*/
|
|
90
|
+
inputType?: "text" | "email" | "password" | "number" | "tel" | "url" | "search" | "date" | "datetime-local" | "time" | "checkbox" | "select" | "textarea";
|
|
91
|
+
label?: string;
|
|
92
|
+
helperText?: string;
|
|
93
|
+
error?: string;
|
|
94
|
+
leftIcon?: IconInput;
|
|
95
|
+
rightIcon?: IconInput;
|
|
96
|
+
/** Lucide icon component or canonical kebab-case icon name string for left side */
|
|
97
|
+
icon?: IconInput;
|
|
98
|
+
/** Show clear button when input has value */
|
|
99
|
+
clearable?: boolean;
|
|
100
|
+
/** Callback or declarative event key when clear button is clicked */
|
|
101
|
+
onClear?: (() => void) | EventKey;
|
|
102
|
+
/** Options for select type */
|
|
103
|
+
options?: SelectOption$1[];
|
|
104
|
+
/** Rows for textarea type */
|
|
105
|
+
rows?: number;
|
|
106
|
+
/** onChange handler or declarative event key for trait dispatch */
|
|
107
|
+
onChange?: React__default.ChangeEventHandler<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement> | EventEmit<{
|
|
108
|
+
value: string;
|
|
109
|
+
} | {
|
|
110
|
+
checked: boolean;
|
|
111
|
+
}>;
|
|
112
|
+
}
|
|
113
|
+
declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>>;
|
|
114
|
+
|
|
115
|
+
type PatternVariant = 'star8' | 'star6' | 'khatam' | 'star10' | 'star12' | 'rosette-double' | 'rosette-filled' | 'seigaiha' | 'greek-key' | 'celtic-knot' | 'kolam' | 'arch' | 'arabesque-vine' | 'arabesque-net';
|
|
116
|
+
interface PatternTileProps extends A11yProps {
|
|
117
|
+
variant?: PatternVariant;
|
|
118
|
+
size?: number;
|
|
119
|
+
color?: string;
|
|
120
|
+
strokeWidth?: number;
|
|
121
|
+
className?: string;
|
|
122
|
+
}
|
|
123
|
+
declare const PatternTile: React__default.FC<PatternTileProps>;
|
|
124
|
+
declare function getTileDimensions(variant: PatternVariant, size: number): {
|
|
125
|
+
width: number;
|
|
126
|
+
height: number;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
interface SelectOption {
|
|
130
|
+
value: string;
|
|
131
|
+
label: string;
|
|
132
|
+
disabled?: boolean;
|
|
133
|
+
/** Leading content rendered in rich mode only (native mode ignores this). */
|
|
134
|
+
icon?: React__default.ReactNode;
|
|
135
|
+
/** Secondary line of text rendered below label in rich mode only. */
|
|
136
|
+
secondaryLabel?: string;
|
|
137
|
+
/** dir attribute applied to the option row in rich mode only. */
|
|
138
|
+
dir?: string;
|
|
139
|
+
}
|
|
140
|
+
interface SelectOptionGroup {
|
|
141
|
+
label: string;
|
|
142
|
+
options: SelectOption[];
|
|
143
|
+
}
|
|
144
|
+
/** @accessibleName label */
|
|
145
|
+
interface SelectProps extends Omit<React__default.SelectHTMLAttributes<HTMLSelectElement>, "children" | "onChange" | "multiple" | keyof A11yProps>, A11yProps {
|
|
146
|
+
/** Additional CSS classes applied to the root element. */
|
|
147
|
+
className?: string;
|
|
148
|
+
/** Visible label naming the control. */
|
|
149
|
+
label?: string;
|
|
150
|
+
/** Select options (flat list) */
|
|
151
|
+
options?: SelectOption[];
|
|
152
|
+
/** Grouped options — rendered as <optgroup> in native mode, sections in rich mode. */
|
|
153
|
+
groups?: SelectOptionGroup[];
|
|
154
|
+
/** Placeholder text */
|
|
155
|
+
placeholder?: string;
|
|
156
|
+
/** Current value (string for single, string[] for multiple) */
|
|
157
|
+
value?: string | string[];
|
|
158
|
+
/** Declarative event name for trait dispatch — emits `{ value }` on selection commit (same gestures as `onChange`). */
|
|
159
|
+
action?: EventEmit<{
|
|
160
|
+
value: string | string[];
|
|
161
|
+
}>;
|
|
162
|
+
/** Error message */
|
|
163
|
+
error?: string;
|
|
164
|
+
/** Allow selecting multiple values — activates the rich dropdown. */
|
|
165
|
+
multiple?: boolean;
|
|
166
|
+
/** Show a search input inside the dropdown — activates the rich dropdown. */
|
|
167
|
+
searchable?: boolean;
|
|
168
|
+
/** Show a clear button when a value is selected. */
|
|
169
|
+
clearable?: boolean;
|
|
170
|
+
/** onChange handler (native ChangeEvent) or declarative event key for trait dispatch */
|
|
171
|
+
onChange?: React__default.ChangeEventHandler<HTMLSelectElement> | EventEmit<{
|
|
172
|
+
value: string | string[];
|
|
173
|
+
}>;
|
|
174
|
+
/** Value-based change: a React callback (internal use) OR a declarative event
|
|
175
|
+
* key that emits `{ value }` on the bus (render-ui / lolo authoring). Mirrors
|
|
176
|
+
* the `onChange` handler|event convention so it's an event-emitting prop, not a
|
|
177
|
+
* bare callback. */
|
|
178
|
+
onValueChange?: ((value: string | string[]) => void) | EventEmit<{
|
|
179
|
+
value: string | string[];
|
|
180
|
+
}>;
|
|
181
|
+
}
|
|
182
|
+
declare const Select: React__default.ForwardRefExoticComponent<SelectProps & React__default.RefAttributes<HTMLSelectElement>>;
|
|
183
|
+
|
|
184
|
+
export { Button as B, Input as I, PatternTile as P, Select as S, getTileDimensions as j };
|
|
185
|
+
export type { ButtonProps as a, ButtonSize as b, ButtonVariant as c, InputProps as d, PatternTileProps as e, PatternVariant as f, SelectOption as g, SelectOptionGroup as h, SelectProps as i };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { ReactNode } from 'react';
|
|
3
|
+
import { EntityRow, TraitConfig, SkeletonNode, OrbitalSchema } from '@almadar/core';
|
|
4
|
+
import { EventTransport, AccessTokenProvider } from '@almadar/shell-runtime/client/EventTransport';
|
|
5
|
+
import './verification-C5pTeMJv.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Read + subscribe surface over the live trait binding stores. Snapshots
|
|
9
|
+
* are cached objects — a new reference only when the trait's entity
|
|
10
|
+
* actually changed (the `useSyncExternalStore` contract).
|
|
11
|
+
*/
|
|
12
|
+
interface EntityBindingSource {
|
|
13
|
+
/** Current entity snapshot for a trait (shared-entity traits read the shared store). */
|
|
14
|
+
getEntitySnapshot: (traitName: string) => EntityRow;
|
|
15
|
+
/** Merged render-time config (declared defaults < resolved < call-site). */
|
|
16
|
+
getConfig: (traitName: string) => TraitConfig | undefined;
|
|
17
|
+
/** Current state-machine state — evaluation context for `@state` in marked expressions. */
|
|
18
|
+
getState: (traitName: string) => string;
|
|
19
|
+
/** Subscribe to entity commits for a trait. Returns unsubscribe. */
|
|
20
|
+
subscribe: (traitName: string, callback: () => void) => () => void;
|
|
21
|
+
}
|
|
22
|
+
declare const EntityBindingContext: React.Context<EntityBindingSource | null>;
|
|
23
|
+
/**
|
|
24
|
+
* Bridge one trait's live bindings into React. With no provider (compiled
|
|
25
|
+
* shell, static renders) or no owning trait, returns empty bindings and
|
|
26
|
+
* never re-renders — markers resolve to the same `undefined` they would
|
|
27
|
+
* have resolved to at flush time against an empty entity.
|
|
28
|
+
*/
|
|
29
|
+
declare function useEntityBindingSnapshot(traitName: string | undefined): {
|
|
30
|
+
entity: EntityRow;
|
|
31
|
+
config: TraitConfig | undefined;
|
|
32
|
+
state: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
interface AwaitingSkeletonSource {
|
|
36
|
+
/** The predicted skeleton for a top-level slot, from a non-embedded awaiting render. */
|
|
37
|
+
forSlot: (slot: string) => SkeletonNode | undefined;
|
|
38
|
+
/** The predicted skeleton for an embedded trait's frame. */
|
|
39
|
+
forTrait: (traitName: string) => SkeletonNode | undefined;
|
|
40
|
+
subscribe: (callback: () => void) => () => void;
|
|
41
|
+
getVersion: () => number;
|
|
42
|
+
}
|
|
43
|
+
declare const AwaitingSkeletonContext: React.Context<AwaitingSkeletonSource | null>;
|
|
44
|
+
declare function useAwaitingSkeleton(target: {
|
|
45
|
+
slot: string;
|
|
46
|
+
} | {
|
|
47
|
+
trait: string;
|
|
48
|
+
}): SkeletonNode | undefined;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* EntitySchemaContext
|
|
52
|
+
*
|
|
53
|
+
* Provides the kernel's answer for which orbital owns each trait on the page.
|
|
54
|
+
* Not a data store: entity rows flow through the state machine's `@payload.data`
|
|
55
|
+
* binding and land on the rendering component's `entity` prop.
|
|
56
|
+
*
|
|
57
|
+
* @packageDocumentation
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
interface EntitySchemaContextValue {
|
|
61
|
+
/** Per-trait owning-orbital name, as the kernel's page circuit answers it; scopes each slot's events. */
|
|
62
|
+
orbitalsByTrait: ReadonlyMap<string, string>;
|
|
63
|
+
}
|
|
64
|
+
interface EntitySchemaProviderProps {
|
|
65
|
+
orbitalsByTrait: ReadonlyMap<string, string>;
|
|
66
|
+
children: React__default.ReactNode;
|
|
67
|
+
}
|
|
68
|
+
declare function EntitySchemaProvider({ orbitalsByTrait, children, }: EntitySchemaProviderProps): React__default.ReactElement;
|
|
69
|
+
declare function useEntitySchema(): EntitySchemaContextValue;
|
|
70
|
+
/** Null when no provider is present (UISlotRenderer may render outside one in compiled mode). */
|
|
71
|
+
declare function useEntitySchemaOptional(): EntitySchemaContextValue | null;
|
|
72
|
+
|
|
73
|
+
interface ServerBridgeContextValue {
|
|
74
|
+
connected: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* From the transport's `register()` result
|
|
77
|
+
* (`EventTransportRegisterResult.carriesCircuitState`, `@almadar/runtime`):
|
|
78
|
+
* `true` = the stateless topology (a posted leg must carry
|
|
79
|
+
* `traits`/`entityByTrait`), `false` = the server (or an in-process
|
|
80
|
+
* evaluator) holds circuit state itself.
|
|
81
|
+
*/
|
|
82
|
+
carriesCircuitState: boolean;
|
|
83
|
+
/** `register()` has resolved, so `carriesCircuitState` is the transport's
|
|
84
|
+
* real topology rather than the pre-register guess. */
|
|
85
|
+
topologyKnown: boolean;
|
|
86
|
+
/** The ONE transport this bridge manages the register/unregister
|
|
87
|
+
* lifecycle for — `useCircuitKernel` dispatches through it directly. */
|
|
88
|
+
transport: EventTransport;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @deprecated Alias for `@almadar/runtime`'s `EventTransport` (plan P5) —
|
|
92
|
+
* kept only because in-package consumers (`OrbPreview.tsx`) still import the name.
|
|
93
|
+
* Import `EventTransport` directly in new code.
|
|
94
|
+
*/
|
|
95
|
+
type ServerBridgeTransport = EventTransport;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Access the server bridge. Returns a no-op stub when outside the provider —
|
|
99
|
+
* `useCircuitKernel` treats an absent/no-op transport as offline (plan G7).
|
|
100
|
+
*/
|
|
101
|
+
declare function useServerBridge(): ServerBridgeContextValue;
|
|
102
|
+
interface ServerBridgeProviderProps {
|
|
103
|
+
schema: OrbitalSchema;
|
|
104
|
+
/** HTTP server URL (canonical playground-runtime / apps/builder-server). */
|
|
105
|
+
serverUrl?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Custom `EventTransport` (plan P5, `@almadar/runtime`). Use this for
|
|
108
|
+
* in-process execution (e.g. an in-process test harness invokes
|
|
109
|
+
* `OrbitalServerRuntime.processOrbitalEvent` directly via
|
|
110
|
+
* `createInProcessTransport`). Mutually exclusive with `serverUrl`.
|
|
111
|
+
*/
|
|
112
|
+
transport?: EventTransport;
|
|
113
|
+
/**
|
|
114
|
+
* Bearer token for the HTTP transport (`Authorization` on every fetch, and on the
|
|
115
|
+
* request that mints the SSE stream's single-use ticket, since EventSource cannot set headers).
|
|
116
|
+
* Ignored with a custom `transport`.
|
|
117
|
+
*/
|
|
118
|
+
getAccessToken?: AccessTokenProvider;
|
|
119
|
+
children: ReactNode;
|
|
120
|
+
}
|
|
121
|
+
declare function ServerBridgeProvider({ schema, serverUrl, transport: customTransport, getAccessToken, children, }: ServerBridgeProviderProps): React.JSX.Element;
|
|
122
|
+
|
|
123
|
+
export { EntitySchemaProvider as b, ServerBridgeProvider as e, useEntitySchemaOptional as f, useServerBridge as g, AwaitingSkeletonContext as h, EntityBindingContext as i, useAwaitingSkeleton as k, useEntityBindingSnapshot as l, useEntitySchema as u };
|
|
124
|
+
export type { AwaitingSkeletonSource as A, EntityBindingSource as E, ServerBridgeTransport as S, EntitySchemaContextValue as a, EntitySchemaProviderProps as c, ServerBridgeContextValue as d, ServerBridgeProviderProps as j };
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Unified ThemeContext - Single provider for theme and color mode
|
|
5
|
+
*
|
|
6
|
+
* Combines design theme selection (glass, wireframe, etc.) with
|
|
7
|
+
* color mode (light/dark) into a single, simple system.
|
|
8
|
+
*
|
|
9
|
+
* Uses a single data attribute: data-theme="glass-light" or data-theme="glass-dark"
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** Color mode preference */
|
|
15
|
+
type ColorMode = "light" | "dark" | "system";
|
|
16
|
+
/** Resolved color mode (what's actually applied) */
|
|
17
|
+
type ResolvedMode = "light" | "dark";
|
|
18
|
+
/** Theme definition */
|
|
19
|
+
interface UIThemeDefinition {
|
|
20
|
+
/** Theme identifier (e.g., "glass", "wireframe") */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Display name for UI (e.g., "Ocean Blue") */
|
|
23
|
+
displayName?: string;
|
|
24
|
+
/** Whether this theme has light mode styles */
|
|
25
|
+
hasLightMode?: boolean;
|
|
26
|
+
/** Whether this theme has dark mode styles */
|
|
27
|
+
hasDarkMode?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Theme context value */
|
|
31
|
+
interface ThemeContextValue {
|
|
32
|
+
/** Current theme name */
|
|
33
|
+
theme: string;
|
|
34
|
+
/** Current color mode setting (may be 'system') */
|
|
35
|
+
mode: ColorMode;
|
|
36
|
+
/** Resolved color mode (always 'light' or 'dark') */
|
|
37
|
+
resolvedMode: ResolvedMode;
|
|
38
|
+
/** Set the theme */
|
|
39
|
+
setTheme: (theme: string) => void;
|
|
40
|
+
/** Set the color mode */
|
|
41
|
+
setMode: (mode: ColorMode) => void;
|
|
42
|
+
/** Toggle between light and dark modes */
|
|
43
|
+
toggleMode: () => void;
|
|
44
|
+
/** Available themes */
|
|
45
|
+
availableThemes: UIThemeDefinition[];
|
|
46
|
+
/** The full theme string applied to data-theme (e.g., "glass-light") */
|
|
47
|
+
appliedTheme: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The theme in effect at a point of the React tree: what `data-theme`, mode
|
|
51
|
+
* class and inline token variables a subtree renders under. Portaled UI reads
|
|
52
|
+
* it so a modal takes the theme of the place it opened from.
|
|
53
|
+
*/
|
|
54
|
+
interface ThemeScope {
|
|
55
|
+
theme?: string;
|
|
56
|
+
mode?: ResolvedMode;
|
|
57
|
+
vars?: Readonly<Record<string, string>>;
|
|
58
|
+
/**
|
|
59
|
+
* A host's explicit theme pick (e.g. the playground picker): every
|
|
60
|
+
* `data-theme` a component declares inside this scope renders this key
|
|
61
|
+
* instead. Set only by `OrbitalThemeProvider`'s `override`.
|
|
62
|
+
*/
|
|
63
|
+
override?: string;
|
|
64
|
+
}
|
|
65
|
+
declare const ThemeScopeContext: React__default.Context<ThemeScope>;
|
|
66
|
+
declare function useThemeScope(): ThemeScope;
|
|
67
|
+
/**
|
|
68
|
+
* The mode a registry `data-theme` key was built with: `<name>-light` /
|
|
69
|
+
* `<name>-dark` of a declared theme that has that mode (the same construction
|
|
70
|
+
* as `appliedTheme`). Undefined for any key no declared theme builds.
|
|
71
|
+
*/
|
|
72
|
+
declare function registryKeyMode(key: string, themes: readonly UIThemeDefinition[]): ResolvedMode | undefined;
|
|
73
|
+
/** The declared theme and mode a registry key was built from, or undefined. */
|
|
74
|
+
declare function registryKeyTheme(key: string, themes: readonly UIThemeDefinition[]): {
|
|
75
|
+
theme: UIThemeDefinition;
|
|
76
|
+
mode: ResolvedMode;
|
|
77
|
+
} | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* A declared registry key as it renders: the key names a theme and its starting
|
|
80
|
+
* mode, and the viewer's mode wins when the theme has it. A key no declared
|
|
81
|
+
* theme builds passes through with no mode.
|
|
82
|
+
*/
|
|
83
|
+
declare function keyInViewerMode(key: string, themes: readonly UIThemeDefinition[], viewerMode: ResolvedMode): {
|
|
84
|
+
key: string;
|
|
85
|
+
mode?: ResolvedMode;
|
|
86
|
+
};
|
|
87
|
+
declare function themeHasMode(theme: UIThemeDefinition, mode: ResolvedMode): boolean;
|
|
88
|
+
/** The color mode in effect at this point of the tree: a pinned orbital theme's, else the document's. */
|
|
89
|
+
declare function useScopedMode(): ResolvedMode;
|
|
90
|
+
interface ThemeProviderProps {
|
|
91
|
+
children: React__default.ReactNode;
|
|
92
|
+
/** Available themes (will be merged with built-in themes) */
|
|
93
|
+
themes?: readonly UIThemeDefinition[] | UIThemeDefinition[];
|
|
94
|
+
/** Default theme name */
|
|
95
|
+
defaultTheme?: string;
|
|
96
|
+
/** Default color mode */
|
|
97
|
+
defaultMode?: ColorMode;
|
|
98
|
+
/** Optional target element ref — when provided, theme attributes are applied to this element instead of document.documentElement */
|
|
99
|
+
targetRef?: React__default.RefObject<HTMLElement>;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Unified ThemeProvider component
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```tsx
|
|
106
|
+
* // Basic usage with built-in themes
|
|
107
|
+
* <ThemeProvider defaultTheme="wireframe" defaultMode="light">
|
|
108
|
+
* <App />
|
|
109
|
+
* </ThemeProvider>
|
|
110
|
+
*
|
|
111
|
+
* // With custom themes from orbital schema
|
|
112
|
+
* import { THEMES } from './generated/theme-manifest';
|
|
113
|
+
* <ThemeProvider themes={THEMES} defaultTheme="glass" defaultMode="system">
|
|
114
|
+
* <App />
|
|
115
|
+
* </ThemeProvider>
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
119
|
+
/**
|
|
120
|
+
* Hook for accessing theme context
|
|
121
|
+
*
|
|
122
|
+
* @returns Theme context value
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```tsx
|
|
126
|
+
* const { theme, resolvedMode, toggleMode, setTheme } = useTheme();
|
|
127
|
+
*
|
|
128
|
+
* // Toggle dark mode
|
|
129
|
+
* <button onClick={toggleMode}>
|
|
130
|
+
* {resolvedMode === 'dark' ? 'Light' : 'Dark'}
|
|
131
|
+
* </button>
|
|
132
|
+
*
|
|
133
|
+
* // Change theme
|
|
134
|
+
* <select value={theme} onChange={(e) => setTheme(e.target.value)}>
|
|
135
|
+
* {availableThemes.map(t => (
|
|
136
|
+
* <option key={t.name} value={t.name}>{t.displayName || t.name}</option>
|
|
137
|
+
* ))}
|
|
138
|
+
* </select>
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
declare function useTheme(): ThemeContextValue;
|
|
142
|
+
type Theme = ColorMode;
|
|
143
|
+
type ResolvedTheme = ResolvedMode;
|
|
144
|
+
type DesignTheme = UIThemeDefinition;
|
|
145
|
+
|
|
146
|
+
export { ThemeProvider as c, ThemeScopeContext as e, registryKeyTheme as f, useTheme as g, useThemeScope as h, keyInViewerMode as k, registryKeyMode as r, themeHasMode as t, useScopedMode as u };
|
|
147
|
+
export type { ColorMode as C, DesignTheme as D, ResolvedMode as R, ThemeProviderProps as T, UIThemeDefinition as U, ResolvedTheme as a, Theme as b, ThemeScope as d };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { U as UISlotManager, a as SlotContent } from './useUISlots-CiobNFGb.js';
|
|
3
|
+
import { UISlot } from '@almadar/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* UISlotContext
|
|
7
|
+
*
|
|
8
|
+
* React context for providing the UI Slot Manager throughout the application.
|
|
9
|
+
* Traits use this context to render content into slots via render_ui effects.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```tsx
|
|
13
|
+
* // In App.tsx or layout
|
|
14
|
+
* <UISlotProvider>
|
|
15
|
+
* <App />
|
|
16
|
+
* </UISlotProvider>
|
|
17
|
+
*
|
|
18
|
+
* // In trait hooks or components
|
|
19
|
+
* const { render, clear } = useUISlots();
|
|
20
|
+
* render({ target: 'modal', pattern: 'form-section', props: {...} });
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @packageDocumentation
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Context for the UI Slot Manager
|
|
28
|
+
*/
|
|
29
|
+
declare const UISlotContext: React__default.Context<UISlotManager | null>;
|
|
30
|
+
interface UISlotProviderProps {
|
|
31
|
+
children: React__default.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Provider component that creates and provides the UI Slot Manager.
|
|
35
|
+
*
|
|
36
|
+
* Must wrap any components that use traits with render_ui effects.
|
|
37
|
+
*/
|
|
38
|
+
declare function UISlotProvider({ children }: UISlotProviderProps): React__default.ReactElement;
|
|
39
|
+
/**
|
|
40
|
+
* Hook to access the UI Slot Manager.
|
|
41
|
+
*
|
|
42
|
+
* Must be used within a UISlotProvider.
|
|
43
|
+
*
|
|
44
|
+
* @throws Error if used outside of UISlotProvider
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* function MyTraitHook() {
|
|
49
|
+
* const { render, clear } = useUISlots();
|
|
50
|
+
*
|
|
51
|
+
* const showModal = () => {
|
|
52
|
+
* render({
|
|
53
|
+
* target: 'modal',
|
|
54
|
+
* pattern: 'form-section',
|
|
55
|
+
* props: { title: 'Create Item' },
|
|
56
|
+
* });
|
|
57
|
+
* };
|
|
58
|
+
*
|
|
59
|
+
* const closeModal = () => {
|
|
60
|
+
* clear('modal');
|
|
61
|
+
* };
|
|
62
|
+
*
|
|
63
|
+
* return { showModal, closeModal };
|
|
64
|
+
* }
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
declare function useUISlots(): UISlotManager;
|
|
68
|
+
/**
|
|
69
|
+
* Hook to get content for a specific slot.
|
|
70
|
+
*
|
|
71
|
+
* Useful for components that only need to read slot state.
|
|
72
|
+
*/
|
|
73
|
+
declare function useSlotContent(slot: UISlot): SlotContent | null;
|
|
74
|
+
/**
|
|
75
|
+
* Hook to check if a slot has content.
|
|
76
|
+
*/
|
|
77
|
+
declare function useSlotHasContent(slot: UISlot): boolean;
|
|
78
|
+
|
|
79
|
+
export { UISlotContext as U, UISlotProvider as a, useSlotHasContent as b, useUISlots as c, useSlotContent as u };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export { SlotContainedContext, SlotContentRenderer, SuspenseConfigProvider, UISlotComponent, UISlotRenderer, renderPatternProps, renderPatternValue } from './chunk-LHP2TK7O.js';
|
|
2
|
+
import './chunk-57DC34LY.js';
|
|
3
|
+
import './chunk-SP5CDJ6K.js';
|
|
4
|
+
import './chunk-CPLN6NBQ.js';
|
|
5
|
+
import './chunk-HH5KSMH5.js';
|
|
6
|
+
import './chunk-REXYVBUO.js';
|
|
7
|
+
import './chunk-AGXD77SL.js';
|
|
8
|
+
import './chunk-TXAUOLWZ.js';
|
|
9
|
+
import './chunk-AB3X7QTE.js';
|
|
10
|
+
import './chunk-DZBQA2OW.js';
|
|
11
|
+
import './chunk-TUPZWTRE.js';
|
|
12
|
+
import './chunk-TZZBINQY.js';
|
|
13
|
+
import './chunk-4T3P43NS.js';
|
|
14
|
+
import './chunk-PCR37T3U.js';
|
|
15
|
+
import './chunk-UXLE3IPR.js';
|
|
16
|
+
import './chunk-ILZ7ORX7.js';
|
|
17
|
+
import './chunk-3VZ36ZKO.js';
|
|
18
|
+
import './chunk-PRXQGGCO.js';
|
|
19
|
+
import './chunk-VO2TTLS5.js';
|
|
20
|
+
import './chunk-AE7VCQB6.js';
|
|
21
|
+
import './chunk-3BBUBJFF.js';
|
|
22
|
+
import './chunk-YHMRX6YA.js';
|
|
23
|
+
import './chunk-4YXBKHHM.js';
|
|
24
|
+
import './chunk-A2LR6VQQ.js';
|
|
25
|
+
import './chunk-P4ZFUQFF.js';
|
|
26
|
+
import './chunk-G7DCAZ22.js';
|