@omerdlw/base-framework 3.4.1 → 4.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.
Files changed (149) hide show
  1. package/dist/ambient/index.js +4 -5
  2. package/dist/background/index.js +3 -4
  3. package/dist/{chunk-DC4XZPDK.js → chunk-3FSDBJ7V.js} +4 -4
  4. package/dist/{chunk-DC4XZPDK.js.map → chunk-3FSDBJ7V.js.map} +1 -1
  5. package/dist/{chunk-GTJMM32W.js → chunk-5TQSH6KE.js} +6 -7
  6. package/dist/chunk-5TQSH6KE.js.map +1 -0
  7. package/dist/{chunk-DGVRHX3C.js → chunk-6P3F4JU3.js} +5 -6
  8. package/dist/{chunk-DGVRHX3C.js.map → chunk-6P3F4JU3.js.map} +1 -1
  9. package/dist/{chunk-3JLG24KI.js → chunk-AKPH5CEJ.js} +199 -9
  10. package/dist/chunk-AKPH5CEJ.js.map +1 -0
  11. package/dist/{chunk-KRHH3UQ6.js → chunk-AWLK2I56.js} +7 -8
  12. package/dist/{chunk-KRHH3UQ6.js.map → chunk-AWLK2I56.js.map} +1 -1
  13. package/dist/{chunk-M36DFIJ6.js → chunk-C527JOJQ.js} +4 -4
  14. package/dist/{chunk-M36DFIJ6.js.map → chunk-C527JOJQ.js.map} +1 -1
  15. package/dist/{chunk-E2QQJZYY.js → chunk-EXB7VFD3.js} +4 -4
  16. package/dist/{chunk-E2QQJZYY.js.map → chunk-EXB7VFD3.js.map} +1 -1
  17. package/dist/chunk-FG2AKFXP.js +108 -0
  18. package/dist/chunk-FG2AKFXP.js.map +1 -0
  19. package/dist/chunk-GA5SZ6E2.js +17 -0
  20. package/dist/{chunk-2E6OASVV.js.map → chunk-GA5SZ6E2.js.map} +1 -1
  21. package/dist/chunk-GG2ILNK2.js +44 -0
  22. package/dist/chunk-GG2ILNK2.js.map +1 -0
  23. package/dist/{chunk-VMR7ZKIF.js → chunk-JA75E4BG.js} +5 -5
  24. package/dist/{chunk-VMR7ZKIF.js.map → chunk-JA75E4BG.js.map} +1 -1
  25. package/dist/{chunk-BLWJZHRL.js → chunk-QZA5AIT6.js} +6 -9
  26. package/dist/chunk-QZA5AIT6.js.map +1 -0
  27. package/dist/{chunk-ST7QOM4O.js → chunk-T53WFIZN.js} +3 -3
  28. package/dist/{chunk-ST7QOM4O.js.map → chunk-T53WFIZN.js.map} +1 -1
  29. package/dist/{chunk-KN4KOTC7.js → chunk-WVED7PDH.js} +4 -4
  30. package/dist/{chunk-KN4KOTC7.js.map → chunk-WVED7PDH.js.map} +1 -1
  31. package/dist/{chunk-HPJWMBUS.js → chunk-XIFQMK2Z.js} +34 -37
  32. package/dist/chunk-XIFQMK2Z.js.map +1 -0
  33. package/dist/{chunk-7A47AXKI.js → chunk-YKHAFHB7.js} +4 -5
  34. package/dist/{chunk-7A47AXKI.js.map → chunk-YKHAFHB7.js.map} +1 -1
  35. package/dist/context-menu/index.js +7 -10
  36. package/dist/controls/index.js +3 -3
  37. package/dist/core/error/boundary.d.ts.map +1 -1
  38. package/dist/core/provider/index.d.ts +3 -8
  39. package/dist/core/provider/index.d.ts.map +1 -1
  40. package/dist/dock/index.js +6 -9
  41. package/dist/error/index.js +2 -5
  42. package/dist/foundation/recipes/index.d.ts +0 -7
  43. package/dist/foundation/recipes/index.d.ts.map +1 -1
  44. package/dist/index.js +15 -18
  45. package/dist/loading/index.js +2 -4
  46. package/dist/modal/index.js +10 -12
  47. package/dist/modal/index.js.map +1 -1
  48. package/dist/modules/dock/card/icon.d.ts.map +1 -1
  49. package/dist/modules/dock/card/use-card.d.ts +38 -38
  50. package/dist/modules/dock/media/controls.d.ts.map +1 -1
  51. package/dist/modules/dock/motion.d.ts +24 -24
  52. package/dist/modules/dock/status/model.d.ts.map +1 -1
  53. package/dist/modules/dock/surface/controls.d.ts.map +1 -1
  54. package/dist/modules/dock/surface/header-button.d.ts.map +1 -1
  55. package/dist/modules/dock/theme.d.ts +14 -14
  56. package/dist/modules/index.js +13 -16
  57. package/dist/modules/modal/container.d.ts.map +1 -1
  58. package/dist/notification/index.js +4 -4
  59. package/dist/overlay-ZCMQVNYT.js +12 -0
  60. package/dist/{overlay-YMLS3SAQ.js.map → overlay-ZCMQVNYT.js.map} +1 -1
  61. package/dist/provider/index.js +3 -8
  62. package/dist/react/theme/index.d.ts +7 -2
  63. package/dist/react/theme/index.d.ts.map +1 -1
  64. package/dist/react/theme/parts.d.ts +89 -0
  65. package/dist/react/theme/parts.d.ts.map +1 -0
  66. package/dist/recipes/index.js +1 -115
  67. package/dist/recipes/index.js.map +1 -1
  68. package/dist/theme/index.js +1 -1
  69. package/docs/README.md +11 -12
  70. package/docs/architecture-and-rules.md +8 -8
  71. package/docs/core-engine.md +11 -13
  72. package/docs/custom-modules.md +1 -1
  73. package/docs/design.md +60 -153
  74. package/docs/getting-started.md +3 -5
  75. package/docs/modules/README.md +1 -1
  76. package/docs/modules/background.md +1 -1
  77. package/docs/modules/context-menu.md +1 -1
  78. package/docs/modules/dock.md +23 -23
  79. package/docs/modules/error-boundary.md +1 -1
  80. package/docs/modules/loading.md +1 -1
  81. package/docs/modules/modal.md +1 -1
  82. package/package.json +1 -7
  83. package/templates/AGENTS.md +4 -3
  84. package/MIGRATION.md +0 -99
  85. package/dist/chunk-2E6OASVV.js +0 -17
  86. package/dist/chunk-3JLG24KI.js.map +0 -1
  87. package/dist/chunk-6LWCTP2Y.js +0 -448
  88. package/dist/chunk-6LWCTP2Y.js.map +0 -1
  89. package/dist/chunk-BLWJZHRL.js.map +0 -1
  90. package/dist/chunk-EBNZXYLT.js +0 -704
  91. package/dist/chunk-EBNZXYLT.js.map +0 -1
  92. package/dist/chunk-FLYL76ZT.js +0 -139
  93. package/dist/chunk-FLYL76ZT.js.map +0 -1
  94. package/dist/chunk-GTJMM32W.js.map +0 -1
  95. package/dist/chunk-HPJWMBUS.js.map +0 -1
  96. package/dist/chunk-ICFPSAJZ.js +0 -112
  97. package/dist/chunk-ICFPSAJZ.js.map +0 -1
  98. package/dist/chunk-S2ZOLTTS.js +0 -140
  99. package/dist/chunk-S2ZOLTTS.js.map +0 -1
  100. package/dist/foundation/recipes/anatomy.d.ts +0 -139
  101. package/dist/foundation/recipes/anatomy.d.ts.map +0 -1
  102. package/dist/foundation/recipes/define.d.ts +0 -133
  103. package/dist/foundation/recipes/define.d.ts.map +0 -1
  104. package/dist/overlay-YMLS3SAQ.js +0 -14
  105. package/dist/react/ui/components/avatar.d.ts +0 -10
  106. package/dist/react/ui/components/avatar.d.ts.map +0 -1
  107. package/dist/react/ui/components/button.d.ts +0 -6
  108. package/dist/react/ui/components/button.d.ts.map +0 -1
  109. package/dist/react/ui/components/carousel.d.ts +0 -27
  110. package/dist/react/ui/components/carousel.d.ts.map +0 -1
  111. package/dist/react/ui/components/checkbox.d.ts +0 -10
  112. package/dist/react/ui/components/checkbox.d.ts.map +0 -1
  113. package/dist/react/ui/components/icon.d.ts +0 -6
  114. package/dist/react/ui/components/icon.d.ts.map +0 -1
  115. package/dist/react/ui/components/image.d.ts +0 -6
  116. package/dist/react/ui/components/image.d.ts.map +0 -1
  117. package/dist/react/ui/components/indicator.d.ts +0 -55
  118. package/dist/react/ui/components/indicator.d.ts.map +0 -1
  119. package/dist/react/ui/components/input.d.ts +0 -10
  120. package/dist/react/ui/components/input.d.ts.map +0 -1
  121. package/dist/react/ui/components/loader.d.ts +0 -10
  122. package/dist/react/ui/components/loader.d.ts.map +0 -1
  123. package/dist/react/ui/components/segmented.d.ts +0 -6
  124. package/dist/react/ui/components/segmented.d.ts.map +0 -1
  125. package/dist/react/ui/components/select/options.d.ts +0 -22
  126. package/dist/react/ui/components/select/options.d.ts.map +0 -1
  127. package/dist/react/ui/components/select/select.d.ts +0 -6
  128. package/dist/react/ui/components/select/select.d.ts.map +0 -1
  129. package/dist/react/ui/components/skeleton.d.ts +0 -10
  130. package/dist/react/ui/components/skeleton.d.ts.map +0 -1
  131. package/dist/react/ui/components/switch.d.ts +0 -6
  132. package/dist/react/ui/components/switch.d.ts.map +0 -1
  133. package/dist/react/ui/components/tooltip/group.d.ts +0 -35
  134. package/dist/react/ui/components/tooltip/group.d.ts.map +0 -1
  135. package/dist/react/ui/components/tooltip/placement.d.ts +0 -42
  136. package/dist/react/ui/components/tooltip/placement.d.ts.map +0 -1
  137. package/dist/react/ui/components/tooltip/slot.d.ts +0 -23
  138. package/dist/react/ui/components/tooltip/slot.d.ts.map +0 -1
  139. package/dist/react/ui/components/tooltip/tooltip.d.ts +0 -13
  140. package/dist/react/ui/components/tooltip/tooltip.d.ts.map +0 -1
  141. package/dist/react/ui/index.d.ts +0 -20
  142. package/dist/react/ui/index.d.ts.map +0 -1
  143. package/dist/react/ui/provider.d.ts +0 -22
  144. package/dist/react/ui/provider.d.ts.map +0 -1
  145. package/dist/react/ui/types.d.ts +0 -341
  146. package/dist/react/ui/types.d.ts.map +0 -1
  147. package/dist/ui/index.d.ts +0 -1
  148. package/dist/ui/index.js +0 -2259
  149. package/dist/ui/index.js.map +0 -1
@@ -10,11 +10,10 @@
10
10
  | :--------------------------------- | :-------------------- | :----------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
11
  | `@omerdlw/base-framework/utils` | `foundation/utils/` | ✅ | Scheduling, stores, string/number/object helpers, motion retiming (`defineMotion`, `retime`), `report`, `toUserMessage`. Foundation layer: imports nothing from other layers. |
12
12
  | `@omerdlw/base-framework/result` | `foundation/result/` | ✅ | `Result<T, E>`, `createSafeAction`. → [result.md](./modules/result.md) |
13
- | `@omerdlw/base-framework/recipes` | `foundation/recipes/` | ✅ | Server-safe `defineUi`, recipes, `cn`, `createCn`, `ANATOMY`. → [design.md](./design.md) |
13
+ | `@omerdlw/base-framework/recipes` | `foundation/recipes/` | ✅ | Server-safe `defineRecipe`, `splitVariants`, `cn`, `createCn`. → [design.md](./design.md) |
14
14
  | `@omerdlw/base-framework/events` | `foundation/events/` | ✅ | `globalEvents` bus, `EVENT_TYPES`, `FrameworkEventMap`. |
15
15
  | `@omerdlw/base-framework/hooks` | `react/hooks/` | client | Universal React hooks. |
16
- | `@omerdlw/base-framework/theme` | `react/theme/` | client | Theme specs and provider (shared by core and modules). |
17
- | `@omerdlw/base-framework/ui` | `react/ui/` | client | Styled components (`Button`, `Icon`, `Loader`, `Tooltip`, …) the modules render with too. → [design.md](./design.md) |
16
+ | `@omerdlw/base-framework/theme` | `react/theme/` | client | Theme specs and provider (shared by core and modules); the app's `components` and `icons` the modules draw with. → [design.md](./design.md) |
18
17
  | `@omerdlw/base-framework/kernel` | `core/kernel/` | client | Module host, registry, `usePage`. → [kernel.md](./modules/kernel.md) |
19
18
  | `@omerdlw/base-framework/error` | `core/error/` | client | Boundaries, reporter. → [error-boundary.md](./modules/error-boundary.md) |
20
19
  | `@omerdlw/base-framework/provider` | `core/provider/` | client | `CoreProvider`: the one component that assembles everything. |
@@ -40,16 +39,15 @@ Server-safe entries (`utils`, `recipes`, `result`, `events`) must not import Rea
40
39
  </Compose>
41
40
  ```
42
41
 
43
- | Prop | Type | Meaning |
44
- | :---------------- | :-------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
45
- | `modules` | `readonly AnyCoreModule[]` | **Required.** Which modules to install (order does not matter; `uses` sorts them). Listing only some (`[dockModule, notificationModule]`) ships only those. Read **once** at mount. |
46
- | `registryEntries` | `readonly AppRegistryEntry[]` | Initial (static) registry entries: dock cards, global context menus… `{ type, items: { key: value } }`. |
47
- | `providers` | `readonly ProviderEntry[]` | Extra providers nested **inside** the module host (so they can use modules). A provider is a component or `[Component, props]`. |
48
- | `overlays` | `ReactNode` | Rendered after `children`, inside the pipeline. |
49
- | `slots` | `{ beforeContent?, afterContent?, overlays? }` | Positional content around `children`. |
50
- | `tooltip` | `boolean \| { delayDuration?, skipDelayDuration? }` | The framework's `TooltipProvider` (default on: 300 / 150 ms). `false` removes it (then `Tooltip` components need their own provider). |
42
+ | Prop | Type | Meaning |
43
+ | :---------------- | :--------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44
+ | `modules` | `readonly AnyCoreModule[]` | **Required.** Which modules to install (order does not matter; `uses` sorts them). Listing only some (`[dockModule, notificationModule]`) ships only those. Read **once** at mount. |
45
+ | `registryEntries` | `readonly AppRegistryEntry[]` | Initial (static) registry entries: dock cards, global context menus… `{ type, items: { key: value } }`. |
46
+ | `providers` | `readonly ProviderEntry[]` | Extra providers nested **inside** the module host (so they can use modules). A provider is a component or `[Component, props]`. |
47
+ | `overlays` | `ReactNode` | Rendered after `children`, inside the pipeline. |
48
+ | `slots` | `{ beforeContent?, afterContent?, overlays? }` | Positional content around `children`. |
51
49
 
52
- Resulting tree: `GlobalError` → `TooltipProvider` → `ModuleHost` (registry, page controller stack, module providers, backdrops, **children**, overlays; each module UI inside `ModuleError`) → your `providers` → `beforeContent`, `children`, `afterContent`, `overlays`, `slots.overlays`, `GlobalErrorListener`.
50
+ Resulting tree: `GlobalError` → `ModuleHost` (registry, page controller stack, module providers, backdrops, **children**, overlays; each module UI inside `ModuleError`) → your `providers` → `beforeContent`, `children`, `afterContent`, `overlays`, `slots.overlays`, `GlobalErrorListener`.
53
51
 
54
52
  `Compose` (from `@omerdlw/base-framework/kernel`) is the helper that nests provider lists; use it for your own pipelines.
55
53
 
@@ -170,7 +168,7 @@ The only numbers left in module code are relative stacking inside a module's own
170
168
 
171
169
  ## 9. Gotchas
172
170
 
173
- - Importing `@omerdlw/base-framework/hooks` or `@omerdlw/base-framework/ui` from a server-safe entry breaks the lint boundary and the Edge bundle.
171
+ - Importing `@omerdlw/base-framework/hooks` or `@omerdlw/base-framework/theme` from a server-safe entry breaks the lint boundary and the Edge bundle.
174
172
  - `createStore` snapshots are frozen in development: mutate through `publish`/`setState`, never in place.
175
173
  - `useStore` without a selector re-renders on every change; select a slice.
176
174
  - A theme file that is not listed in `src/config/index.ts` crashes the first component that uses it (by design, with a clear message).
@@ -146,7 +146,7 @@ Create `src/modules/tour/overlay.tsx`:
146
146
 
147
147
  import React from "react";
148
148
  import { useTheme } from "@omerdlw/base-framework/theme";
149
- import { Button } from "@omerdlw/base-framework/ui";
149
+ import { ThemeButton as Button } from "@omerdlw/base-framework/theme";
150
150
  import { useTour } from "./context";
151
151
  import { tourTheme } from "./constants";
152
152
 
package/docs/design.md CHANGED
@@ -1,185 +1,92 @@
1
- # Design — `@omerdlw/base-framework/ui`
1
+ # Design: the app's components, the framework's modules
2
2
 
3
- > **Read this first if you need to:** build an interface from the framework's components (Button, Input, Select, Switch, Checkbox, SegmentedControl, Carousel, Tooltip, Image, Avatar, Loader, Skeleton, indicators), give them your product's look, add your own variants, or understand why the framework ships no styles.
3
+ > **Read this first if you need to:** understand why the framework ships no UI, give the modules (dock, modal, error screen, loading, media bar…) your own button, icon, spinner and tooltip, or name the icons they show.
4
4
 
5
5
  ---
6
6
 
7
7
  ## 1. The idea
8
8
 
9
- The framework holds **no design**. No CSS file, no colour or size tokens, no motion values, no icon set. The modules (`dock`, `modal`, …) already work this way: they own mechanics and take every class and every timing from the app's theme. The components follow the same rule.
9
+ The framework holds **no design and no UI components**. There is no CSS file, no colour or size token, no motion value, no icon set and no `Button`. The modules own their mechanics and take every class and every timing from the app's theme ([theming.md](./theming.md)).
10
10
 
11
- - Each component is **behaviour plus an anatomy**: the parts it renders (`select.trigger`, `select.menu`, …) and the states it sets on them (`checked`, `active`, `visible`, `loading`, …). Every part starts as an empty recipe.
12
- - The app gives the parts their look in **one file** with `defineUi(...)`: a base, named variants, compound variants and defaults for each part (`cva`-shaped). It also gives the motion and the icons.
13
- - The result is a plain, **server-safe object**. A Server Component calls a part (`ui.parts.button.root({ intent: "primary" })`); `<UiProvider ui={ui}>` hands it to the components.
14
- - A one-line **module augmentation** types the components from the app's recipes: a variant the app wrote type-checks; one nobody wrote does not.
11
+ A module does still need a few pieces to draw: a button, an icon, a spinner and a tooltip. It never imports them. It renders the component the app hands to `ThemeProvider`:
15
12
 
16
- Without a ui, every component renders with no class at all and no animation. That is the contract, and a test holds it.
13
+ | Slot | What a module passes it | Without it |
14
+ | :-------- | :----------------------------------------------------------------------------------------- | :------------------------------- |
15
+ | `Button` | `ThemeButtonProps`: button attributes, `data-*`, `ref`; the look is the theme slot's class | a plain `<button type="button">` |
16
+ | `Icon` | `ThemeIconProps`: `icon` (a name), `size` in px, `className`, `color`, `style`, `onClick` | nothing |
17
+ | `Spinner` | `ThemeSpinnerProps`: `className`, `size` | nothing |
18
+ | `Tooltip` | `ThemeTooltipProps`: the trigger as `children`, `text`, `className`, `sideOffset` | the trigger alone |
17
19
 
18
- ```
19
- @omerdlw/base-framework/recipes defineUi, recipes, createCn, ANATOMY (server-safe)
20
- @omerdlw/base-framework/ui UiProvider + components ("use client")
21
- ```
22
-
23
- `design` sits beside `hooks` in the layer hierarchy: it imports `hooks`, `theme`, `kernel` and `utils`, and never imports a module. The modules render with its `Button`, `Icon`, `Loader` and `Tooltip`, so those pick up the app's look too.
20
+ The component library belongs to the app. A new app copies it from the template's `src/design/components` as source and changes it freely.
24
21
 
25
22
  ---
26
23
 
27
24
  ## 2. Setup
28
25
 
29
- ### 2.1 The ui
30
-
31
- ```ts
32
- // src/design/ui.ts — no "use client": Server Components import it too
33
- import { defineUi } from "@omerdlw/base-framework/recipes";
34
-
35
- export const ui = defineUi({
36
- parts: {
37
- button: {
38
- root: {
39
- base: "inline-flex items-center justify-center gap-2 font-medium",
40
- variants: {
41
- intent: {
42
- primary: "bg-primary text-on-primary",
43
- ghost: "bg-transparent",
44
- },
45
- size: { sm: "h-8 px-3 text-sm", md: "h-10 px-4" },
46
- },
47
- defaultVariants: { size: "md" },
48
- },
49
- busyLabel: { base: "invisible col-start-1 row-start-1" },
50
- busySpinner: { base: "col-start-1 row-start-1 grid place-items-center" },
51
- },
52
- // …every part you use
53
- },
54
- icons: {
55
- check: "lucide:check",
56
- chevron: "lucide:chevron-down",
57
- spinner: "lucide:loader",
58
- },
59
- motion: { follow: { type: "spring", stiffness: 500, damping: 40 } },
60
- });
61
-
62
- declare module "@omerdlw/base-framework/recipes" {
63
- interface UiRegister {
64
- ui: typeof ui;
65
- }
66
- }
67
- ```
68
-
69
- A part takes a recipe (`{ base, variants, compoundVariants, defaultVariants }`); `reset: true` drops what the anatomy declared. Your CSS (colours, type scale, utilities) lives in your app; the framework neither ships nor reads it.
70
-
71
- ### 2.2 The provider
72
-
73
26
  ```tsx
74
- // app/providers.tsx ("use client")
75
- import { TooltipProvider, UiProvider } from "@omerdlw/base-framework/ui";
76
- import { ui } from "@/design/ui";
77
-
78
- <UiProvider ui={ui}>
79
- <TooltipProvider delayDuration={300}>{children}</TooltipProvider>
80
- </UiProvider>;
27
+ "use client";
28
+
29
+ import {
30
+ ThemeProvider,
31
+ type ThemeComponents,
32
+ } from "@omerdlw/base-framework/theme";
33
+ import { Button } from "@/design/components/button";
34
+ import { Icon } from "@/design/components/icon";
35
+ import { Spinner } from "@/design/components/loader";
36
+ import { Tooltip } from "@/design/components/tooltip";
37
+
38
+ const COMPONENTS: Partial<ThemeComponents> = { Button, Icon, Spinner, Tooltip };
39
+
40
+ const ICONS = {
41
+ back: "solar:alt-arrow-left-bold",
42
+ close: "solar:close-bold",
43
+ error: "solar:danger-circle-bold",
44
+ // …
45
+ };
46
+
47
+ export function DesignProvider({ children }: { children: React.ReactNode }) {
48
+ return (
49
+ <ThemeProvider components={COMPONENTS} icons={ICONS} themes={themes}>
50
+ {children}
51
+ </ThemeProvider>
52
+ );
53
+ }
81
54
  ```
82
55
 
83
- A nested `UiProvider` restyles a subtree. Mount `TooltipProvider` from the library to set the open delay and skip window for a subtree (a `Tooltip` without one uses a shared default group, 700 / 300 ms).
56
+ A nested `ThemeProvider` merges its `components` and `icons` over its parent's, so a subtree can swap one slot. Tooltip timing (open delay, skip window) belongs to the app's own tooltip provider.
84
57
 
85
58
  ---
86
59
 
87
- ## 3. What the app gives
88
-
89
- ### 3.1 Parts
90
-
91
- | Level | Where | Reach |
92
- | :----------- | :------------------------------------------------ | :------------------- |
93
- | **Recipes** | `defineUi({ parts })` | one part, everywhere |
94
- | **Subtree** | a nested `<UiProvider ui={otherUi}>` | one part, below it |
95
- | **Instance** | `className` (root) and `classNames={{ part: … }}` | one element |
96
-
97
- A variant you add arrives as a prop the component never named; it styles the part and never reaches the DOM. A component of your own can live in the same system: `defineUi({ parts: { badge: { root: { … } } } })` and call `ui.parts.badge.root(…)`.
98
-
99
- ### 3.2 Motion
100
-
101
- ```ts
102
- defineUi({
103
- motion: {
104
- follow: { type: "spring", stiffness: 500, damping: 40 }, // segmented pill, highlight
105
- menu: {
106
- // select menu; custom = 1 or -1 (opens down / up)
107
- initial: (rise) => ({ opacity: 0, y: rise * -8 }),
108
- animate: { opacity: 1, y: 0, transition: { duration: 0.3 } },
109
- exit: (rise) => ({
110
- opacity: 0,
111
- y: rise * -6,
112
- transition: { duration: 0.15 },
113
- }),
114
- },
115
- option: {
116
- // each option; custom = its index
117
- initial: { opacity: 0 },
118
- animate: (index) => ({ opacity: 1, transition: { delay: 0.02 * index } }),
119
- },
120
- glide: { duration: 0.8, ease: [0.5, 0, 0.1, 1] }, // carousel arrows
121
- },
122
- });
123
- ```
124
-
125
- `menu` and `option` are `motion/react` variants (`initial`, `animate`, `exit`). Leave a key out and that part does not animate: the pill and the highlight jump, the menu appears, the carousel scrolls in one step. Every value is retimed by `ThemeProvider motion`'s tempo and replaced by its `still` transition for reduced motion.
126
-
127
- ### 3.3 Icons and labels
60
+ ## 3. Icons
128
61
 
129
- `icons` names the Iconify glyphs the components draw: `check`, `selected`, `chevron`, `previous`, `next`, `spinner`. An icon you leave out is not drawn. Icons have no size of their own: give the part a size (`size-4 text-[length:16px]`), or pass `size` to `Icon`.
62
+ When an app gives a module an icon (a dock card's `icon`, an action's `icon`), the module passes the string straight to the app's `Icon`.
130
63
 
131
- `labels` (`loading`, `placeholder`, `empty`, `previous`, `next`) are text for screen readers and empty states. They default to English so a component is never silent; override them for your language.
64
+ The framework's own icons are named by **key** (`FrameworkIcon`). The app's `icons` map turns each key into a name its `Icon` understands. A key the map does not name is passed through unchanged.
132
65
 
133
- ### 3.4 Your class names in `cn`
66
+ | Key | Where it shows |
67
+ | :----------------------------------------- | :------------------------------ |
68
+ | `close` | modal close, dock surface close |
69
+ | `back`, `next` | dock controls, breadcrumbs |
70
+ | `error` | error boundary fallback |
71
+ | `danger`, `forbidden` | route guard status cards |
72
+ | `wifi`, `wifiOff` | online / offline status |
73
+ | `play`, `pause` | dock header and media bar |
74
+ | `rewind`, `forward`, `pip`, `repeat` | media bar |
75
+ | `volumeMuted`, `volumeSmall`, `volumeLoud` | media bar volume |
134
76
 
135
- `cn` is `tailwind-merge`, knowing only Tailwind's own classes. Teach it your names so a later class of the same family wins:
136
-
137
- ```ts
138
- defineUi({
139
- merge: {
140
- theme: { radius: ["card", "tile"], spacing: ["control-md"] },
141
- classGroups: {
142
- "font-size": ["type-body", "type-meta"],
143
- duration: ["duration-move"],
144
- },
145
- },
146
- });
147
- ui.cn("type-body", "type-meta"); // "type-meta"
148
- ```
149
-
150
- `theme` extends Tailwind's scales; `classGroups` lists whole class names per group.
77
+ In a module of your own, draw with `ThemeButton`, `ThemeIcon`, `ThemeSpinner` and `ThemeTooltip` from `@omerdlw/base-framework/theme`. They read the same slots.
151
78
 
152
79
  ---
153
80
 
154
- ## 4. Components
155
-
156
- Every part below starts empty. "States" are the variants the component sets itself; give them classes, or leave them blank.
157
-
158
- | Component | Parts (`classNames` keys) | States | Notes |
159
- | :------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
160
- | `Button` | `root`, `bare`, `busy`, `busyLabel`, `busySpinner` | — | With an `intent` prop it draws `root`, without one `bare`. `loading` stacks `busyLabel` and `busySpinner` inside `busy`. Pass `href` to render a `next/link` with the same classes. |
161
- | `Input`, `Textarea` | `field`, `area` | — | `Textarea` draws `field` plus `area`. |
162
- | `Switch` | `track`, `thumb` | — | `data-state="checked"/"unchecked"` on both; `role="switch"`, `onCheckedChange`. |
163
- | `Checkbox`, `CheckboxIndicator` | `root`, `box`, `glyph` | `checked` (box, glyph) | `pending` plays the loader. |
164
- | `SegmentedControl` | `root`, `segment`, `pill`, `chosen`, `icon`, `count` | `active` (segment) | Tabs with a sliding pill; `chosen` paints the active tab until the pill is measured. |
165
- | `Select` | `root`, `trigger`, `value`, `label`, `placeholder`, `chevron`, `menu`, `option`, `highlight`, `optionBody`, `text`, `description`, `icon`, `check`, `empty` | — | Listbox: arrows, Enter/Space, Escape; flips up; anchor positioning where supported; scroll lock while open. `offset` and `collisionPadding` (px, default 0); the room left in the viewport is `--select-available-height` on the menu. `floatingProps` for the portal. |
166
- | `Carousel` | `root`, `track`, `slide`, `arrow`, `icon` | `side`, `visible` (arrow) | Touch, wheel, mouse drag; arrow glide; `onNearEnd`. `trackProps` for data hooks; inject `glide`, `renderSlide`, `ready`, `frameSelector` to drive it from your own engine. |
167
- | `Tooltip`, `TooltipProvider` | `content`, `label` | — | Built-in placement (flip, `align`, shift); `sideOffset`/`collisionPadding` default to 0. Content gets `data-state` (`delayed-open`, `instant-open`, `closed`), `data-side`, `data-align` and `--tooltip-*` vars; stays mounted for its exit animation. `contentProps`, `triggerRef`. The content's `z-index` is copied to the `[data-tooltip-wrapper]` portal. |
168
- | `Image` | `frame`, `picture`, `fallback` | `layout` (frame, picture), `loading` (frame) | `loading` is true until the picture decodes (paused off screen); CORS retry; fallback. |
169
- | `Avatar` | `root`, `image`, `initials` | — | `size` sets width and height inline; without it the root's classes size it. |
170
- | `Loader`, `Spinner` | `root`, `label`, `overlay`, `dots`, `dot`, `spinner`, `icon` | `over` (root) | Three `dot`s inside `dots`; `size` sets `--loader-size` on `dots`. Over content, `label` keeps the width and `overlay` holds the dots. |
171
- | `SkeletonBlock`, `SkeletonLines` | `block`, `lines`, `line`, `bar` | — | `SkeletonLines` draws one `bar` per width inside a `line`. |
172
- | `SlidingPill`, `useSlidingPill`, `SlidingHighlight`, `HighlightGroup`, `useHighlight` | `highlight.fill` | — | Positioned inline (absolute, no pointer events); the `follow` motion moves them. |
173
- | `Icon` | — | — | Iconify. `size` in px, or let its class size it (`1em`). |
174
-
175
- Pure helpers for your own racks: `glideTarget`, `rackClip`, `readScroll`, `useDragScroll`.
81
+ ## 4. Recipes
82
+
83
+ `@omerdlw/base-framework/recipes` remains, and is server-safe: `defineRecipe`, `extendRecipe`, `compileRecipe`, `splitVariants`, `cn` and `createCn`. They are tools for writing the app's own component recipes; the framework defines none of its own.
176
84
 
177
85
  ---
178
86
 
179
87
  ## 5. Rules
180
88
 
181
- 1. **No design in the framework.** A class, a colour, a duration or an icon name in `src/` is a bug; it belongs in the app's ui or theme.
182
- 2. **Write classes literally.** Tailwind reads source files; a class built at runtime is never generated.
183
- 3. **Style in `defineUi`, not at the call site.** `className` is for layout (`w-full`, `mt-4`), not for redrawing a part on every use.
184
- 4. **One ui per app.** Derive variants of it with `defineUi({ ...ui.config, … })` for a subtree.
185
- 5. **Server Components call parts, client components render components.** `ui.parts.*` is safe anywhere; components are `"use client"`.
89
+ 1. **No design in the framework.** A class, a colour, a duration, a component or an icon name in `src/` is a bug; it belongs in the app.
90
+ 2. **Modules draw through the slots.** Never import an app component into a module; use `ThemeButton`, `ThemeIcon`, `ThemeSpinner` and `ThemeTooltip`.
91
+ 3. **Name framework icons by key.** A new icon that a module shows needs a new `FrameworkIcon` key and a row in section 3.
92
+ 4. **Write classes literally.** Tailwind reads source files; a class built at runtime is never generated.
@@ -20,7 +20,7 @@ Before installing `@omerdlw/base-framework`, verify your environment:
20
20
  Install `@omerdlw/base-framework` alongside its required peer dependencies:
21
21
 
22
22
  ```bash
23
- npm install @omerdlw/base-framework motion @iconify-icon/react tailwind-merge
23
+ npm install @omerdlw/base-framework motion tailwind-merge
24
24
  ```
25
25
 
26
26
  ### Peer Dependencies Breakdown
@@ -28,14 +28,13 @@ npm install @omerdlw/base-framework motion @iconify-icon/react tailwind-merge
28
28
  | Package | Purpose in Base Framework |
29
29
  | :-------------------- | :-------------------------------------------------------------------------------- |
30
30
  | `motion` (`>=12.0.0`) | Hardware GPU-accelerated motion presets (`translate3d`, `scale`, spring physics). |
31
- | `@iconify-icon/react` | Unified SVG-free icon rendering via `<Icon icon="solar:..." />`. |
32
31
  | `tailwind-merge` | Conflict resolution behind `cn()` class merging. |
33
32
 
34
33
  ---
35
34
 
36
35
  ## 3. Styling
37
36
 
38
- The framework ships no CSS and no class names: Tailwind has nothing to scan in the package. Every class lives in your app, in your module themes ([theming.md](./theming.md)) and your `defineUi` ([design.md](./design.md)), so Tailwind finds it in your own sources. Your stylesheet is entirely yours:
37
+ The framework ships no CSS and no class names: Tailwind has nothing to scan in the package. Every class lives in your app, in your module themes ([theming.md](./theming.md)) and in your own components ([design.md](./design.md)), so Tailwind finds it in your own sources. Your stylesheet is entirely yours:
39
38
 
40
39
  ```css
41
40
  /* src/app/globals.css */
@@ -125,7 +124,7 @@ Create `src/app/page.tsx`:
125
124
  "use client";
126
125
 
127
126
  import { usePage } from "@omerdlw/base-framework/kernel";
128
- import { Button, Icon } from "@omerdlw/base-framework/ui";
127
+ import { Button, Icon } from "@/design/components"; // your own components
129
128
 
130
129
  export default function HomePage() {
131
130
  const page = usePage({
@@ -180,7 +179,6 @@ export default function HomePage() {
180
179
  | `@omerdlw/base-framework/result` | Functional error handling | `Result<T, E>`, `ok()`, `err()`, `isResult()`, `createSafeAction()` |
181
180
  | `@omerdlw/base-framework/events` | Cross-cutting event bus | `globalEvents`, `EVENT_TYPES`, `FrameworkEventMap` |
182
181
  | `@omerdlw/base-framework/theme` | Declarative theme engine (slots and motion) | `defineThemeSpec()`, `defineTheme()`, `ThemeProvider`, `useTheme()`, `useModuleMotion()`, `useMotionTokens()` |
183
- | `@omerdlw/base-framework/ui` | Unstyled components your `defineUi` styles | `Button`, `Icon`, `Select`, `Carousel`, `UiProvider`, … |
184
182
  | `@omerdlw/base-framework/hooks` | Universal React hooks | `useStore()`, `useClickOutside()`, `useGlobalEvent()`, `useRequiredContext()` |
185
183
  | `@omerdlw/base-framework/utils` | Pure runtime utilities | `clamp()`, `debounce()`, `throttle()`, `createStore()`, `createScheduler()`, `report()`, `defineMotion()`, `gpuTransform()` |
186
184
  | `@omerdlw/base-framework/error` | Isolated error boundaries | `GlobalError`, `ModuleError`, `UserError`, `toUserMessage()` |
@@ -163,7 +163,7 @@ Every page follows this skeleton (omit sections that do not apply). Keep it **ve
163
163
  src/app ─┐
164
164
  src/features ─┼─▶ @omerdlw/base-framework/<module> ──▶ @omerdlw/base-framework/kernel ──▶ @omerdlw/base-framework/{utils,hooks,events,result}
165
165
  src/core/provider.tsx ┘ │
166
- └──▶ @omerdlw/base-framework/ui, @omerdlw/base-framework/theme
166
+ └──▶ @omerdlw/base-framework/theme
167
167
  ```
168
168
 
169
169
  Modules are installed by `CoreProvider` from the list the app passes; orchestration drives modules through their `defineModule` definitions and never imports them.
@@ -200,6 +200,6 @@ Flat layout ([architecture §2.1](../architecture-and-rules.md#21-flat-layout-de
200
200
 
201
201
  ## 12. Dependencies
202
202
 
203
- - **Uses:** `@omerdlw/base-framework/kernel` (`defineModule`, `definePeer`, `useModuleRegistration`, `useRegistryValue`), `@omerdlw/base-framework/hooks`, `@omerdlw/base-framework/utils`, `@omerdlw/base-framework/ui` (`Spinner`), `@omerdlw/base-framework/theme`, `motion/react`, `next/navigation`; the route `src/app/api/background/youtube`.
203
+ - **Uses:** `@omerdlw/base-framework/kernel` (`defineModule`, `definePeer`, `useModuleRegistration`, `useRegistryValue`), `@omerdlw/base-framework/hooks`, `@omerdlw/base-framework/utils`, `@omerdlw/base-framework/theme` (`ThemeSpinner`), `@omerdlw/base-framework/theme`, `motion/react`, `next/navigation`; the route `src/app/api/background/youtube`.
204
204
  - **Peer:** `media` (read through `definePeer`, listed in `uses`).
205
205
  - **Used by:** `src/core/provider.tsx` (installs it) and every page that calls `usePage({ background })`; the dock and audio sources interact with it only through `media`.
@@ -244,6 +244,6 @@ No classes or colors in the module, except the pointer-following `left/top/posit
244
244
 
245
245
  ## 9. Dependencies
246
246
 
247
- - **Uses:** `@omerdlw/base-framework/kernel` (`defineModule`, `useModuleRegistration`, `useRegistryEntries`, `useModuleState`), `@omerdlw/base-framework/utils`, `@omerdlw/base-framework/hooks`, `@omerdlw/base-framework/ui` (`Icon`), `@omerdlw/base-framework/theme`, `next/navigation`, `motion/react`.
247
+ - **Uses:** `@omerdlw/base-framework/kernel` (`defineModule`, `useModuleRegistration`, `useRegistryEntries`, `useModuleState`), `@omerdlw/base-framework/utils`, `@omerdlw/base-framework/hooks`, `@omerdlw/base-framework/theme` (`ThemeIcon`), `@omerdlw/base-framework/theme`, `next/navigation`, `motion/react`.
248
248
  - **Peer:** `dock` — read with `useModuleState("dock", selectDockPageCard, null)`; works (without a default header) when the dock is not installed.
249
249
  - **Used by:** `src/core/provider.tsx` (installs it), `page.modules.contextMenu`, and features that register menus.
@@ -228,28 +228,28 @@ Everything below is exported from `@omerdlw/base-framework/dock`. Anything not l
228
228
 
229
229
  ### 6.1 `DockPageConfig` (the `dock` key of `usePage`)
230
230
 
231
- | Field | Type | Meaning |
232
- | :--------------------------------------- | :--------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
233
- | `title`, `description` | `string \| ReactNode` | Header text. `title` falls back to the page-level `title`. |
234
- | `icon` | iconify string (`"solar:home-2-bold"`), image URL, or node | Card icon. |
235
- | `iconOverlay` | `{ icon, title?, onClick? }` | Small badge on the icon. |
236
- | `badge` | `ReactNode` | Badge on the card. Update it live with `globalEvents.emit(DOCK_EVENTS.UPDATE_BADGE, { key: card.name.toLowerCase(), value, color? })` (`value` `null`/`""` hides it); needs `name`. |
237
- | `banner` / `bannerUrl` | `string \| { url, position, size, repeat, opacity }` | Header banner. Object form is flattened to `bannerUrl` + `banner*`. Individual fields: `bannerPosition`, `bannerSize`, `bannerRepeat`, `bannerOpacity`. |
238
- | `style` | `DockVisualStyleInput` | Per-card overrides for `card`, `icon`, `title`, `description` (`className`, CSS, `scale`, `size`), plus `active` / `inactive` / `hover` variants, `background`, `borderColor`. Merged section by section across registrations. |
239
- | `className`, `width` | | Extra class; card width in px (clamped to the viewport). |
240
- | `component`, `content`, `props` | | Replace the card body with your own component/node. |
241
- | `action`, `headerAction` | `ReactNode \| ComponentType` | Inline action under the header / in the header. Shown only on the card that owns the current path (or overlay cards). |
242
- | `actions` | `Partial<DockActionDescriptor>[]` | Toolbar actions while the page is mounted ([§10](#10-contextual-actions)). |
243
- | `guard` | `{ when: boolean, message?, onBlock? }` | Navigation guard while the page is mounted ([§12](#12-navigation-guards-and-transactions)). |
244
- | `surfaces` | `Record<string, SurfaceDef \| Component>` | Named surfaces opened with `page.modules.dock.surface("key", props)`. |
245
- | `name` | `string` | Stable name used for search and active-item matching. |
246
- | `path`, `targetPath` | `string` | `path` defaults to the current pathname. `targetPath` is where clicking navigates when it differs from `path`. |
247
- | `isLoading` | `boolean` | Show the loading skeleton card. Defaults from `usePage({ loading })` (`true`, a string, or `{ isLoading }`). |
248
- | `isOverlay`, `dismissible` | `boolean` | Overlay cards dim the page and ignore outside clicks. |
249
- | `dockPolicy` | `{ clearTransientState?, dismissSurfaces?, prefetch? }` | Route policy used when navigating **to** this card ([§12.4](#124-route-policy)). |
250
- | `keepWhenDescendant`, `prefetchDisabled` | `boolean \| (activePath, item) => boolean`, `boolean` | By default a card whose path is a **prefix of the active path** (an ancestor, except `/`) is removed from the stack so the same section is not shown twice; `keepWhenDescendant` keeps it. `prefetchDisabled` opts out of prefetch. |
251
- | `stackOrder` | `number` | Where the card sits in the stack under the active card, ascending from the card nearest to it. Cards without one keep registration order at `0`, and `/` falls back to last. Use a negative value to pull a card toward the active one. |
252
- | `registry` | `RegistryMetadata` | `priority`, `source`, `lifecycle`, … for this registration. |
231
+ | Field | Type | Meaning |
232
+ | :--------------------------------------- | :---------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
233
+ | `title`, `description` | `string \| ReactNode` | Header text. `title` falls back to the page-level `title`. |
234
+ | `icon` | icon name your `Icon` draws (`"solar:home-2-bold"`), image URL, or node | Card icon. |
235
+ | `iconOverlay` | `{ icon, title?, onClick? }` | Small badge on the icon. |
236
+ | `badge` | `ReactNode` | Badge on the card. Update it live with `globalEvents.emit(DOCK_EVENTS.UPDATE_BADGE, { key: card.name.toLowerCase(), value, color? })` (`value` `null`/`""` hides it); needs `name`. |
237
+ | `banner` / `bannerUrl` | `string \| { url, position, size, repeat, opacity }` | Header banner. Object form is flattened to `bannerUrl` + `banner*`. Individual fields: `bannerPosition`, `bannerSize`, `bannerRepeat`, `bannerOpacity`. |
238
+ | `style` | `DockVisualStyleInput` | Per-card overrides for `card`, `icon`, `title`, `description` (`className`, CSS, `scale`, `size`), plus `active` / `inactive` / `hover` variants, `background`, `borderColor`. Merged section by section across registrations. |
239
+ | `className`, `width` | | Extra class; card width in px (clamped to the viewport). |
240
+ | `component`, `content`, `props` | | Replace the card body with your own component/node. |
241
+ | `action`, `headerAction` | `ReactNode \| ComponentType` | Inline action under the header / in the header. Shown only on the card that owns the current path (or overlay cards). |
242
+ | `actions` | `Partial<DockActionDescriptor>[]` | Toolbar actions while the page is mounted ([§10](#10-contextual-actions)). |
243
+ | `guard` | `{ when: boolean, message?, onBlock? }` | Navigation guard while the page is mounted ([§12](#12-navigation-guards-and-transactions)). |
244
+ | `surfaces` | `Record<string, SurfaceDef \| Component>` | Named surfaces opened with `page.modules.dock.surface("key", props)`. |
245
+ | `name` | `string` | Stable name used for search and active-item matching. |
246
+ | `path`, `targetPath` | `string` | `path` defaults to the current pathname. `targetPath` is where clicking navigates when it differs from `path`. |
247
+ | `isLoading` | `boolean` | Show the loading skeleton card. Defaults from `usePage({ loading })` (`true`, a string, or `{ isLoading }`). |
248
+ | `isOverlay`, `dismissible` | `boolean` | Overlay cards dim the page and ignore outside clicks. |
249
+ | `dockPolicy` | `{ clearTransientState?, dismissSurfaces?, prefetch? }` | Route policy used when navigating **to** this card ([§12.4](#124-route-policy)). |
250
+ | `keepWhenDescendant`, `prefetchDisabled` | `boolean \| (activePath, item) => boolean`, `boolean` | By default a card whose path is a **prefix of the active path** (an ancestor, except `/`) is removed from the stack so the same section is not shown twice; `keepWhenDescendant` keeps it. `prefetchDisabled` opts out of prefetch. |
251
+ | `stackOrder` | `number` | Where the card sits in the stack under the active card, ascending from the card nearest to it. Cards without one keep registration order at `0`, and `/` falls back to last. Use a negative value to pull a card toward the active one. |
252
+ | `registry` | `RegistryMetadata` | `priority`, `source`, `lifecycle`, … for this registration. |
253
253
 
254
254
  How `usePage` turns the slice into registry entries (`dockModule.page`):
255
255
 
@@ -750,7 +750,7 @@ Gotchas:
750
750
 
751
751
  ## 20. Dependencies
752
752
 
753
- - **Uses:** `@omerdlw/base-framework/kernel` (`defineModule`, `definePeer`, `useRegistryEntries`, `useModuleRegistration`), `@omerdlw/base-framework/events`, `@omerdlw/base-framework/hooks`, `@omerdlw/base-framework/utils`, `@omerdlw/base-framework/ui`, `@omerdlw/base-framework/theme`, `next/navigation`, `motion/react`.
753
+ - **Uses:** `@omerdlw/base-framework/kernel` (`defineModule`, `definePeer`, `useRegistryEntries`, `useModuleRegistration`), `@omerdlw/base-framework/events`, `@omerdlw/base-framework/hooks`, `@omerdlw/base-framework/utils`, `@omerdlw/base-framework/theme` (`ThemeButton`, `ThemeIcon`, `ThemeTooltip`), `next/navigation`, `motion/react`.
754
754
  - **Peers:** `loading` (page-loading flag, `stopLoading` after navigation), `media` (session state and controls), `notification` (is a toast visible). Each is read through `definePeer` with an inert stand-in, and listed in `uses`.
755
755
  - **Used by:** `src/features/**` (surfaces, statuses, context actions, motion presets), `src/app/**` (`usePage({ dock })`, `registry.tsx`), `controls` and `notification` (they locate the dock by DOM id `dock-card-stack`), and the `context-menu` (reads the active card through `useModuleState("dock", …)`).
756
756
  - **Never imports** another module's source (enforced by `npm run check:architecture`).
@@ -155,5 +155,5 @@ Raw `Error.message` values (database, SDK, vendor wording) never reach the UI. `
155
155
 
156
156
  ## 11. Dependencies
157
157
 
158
- - **Uses:** `@omerdlw/base-framework/events` (`APP_ERROR`), `@omerdlw/base-framework/ui` (`Button`, `Icon` for the fallback), `@omerdlw/base-framework/theme`, `@omerdlw/base-framework/utils` (`report`, `setReportSink`, `toUserMessage`), `next/navigation` (`usePathname`).
158
+ - **Uses:** `@omerdlw/base-framework/events` (`APP_ERROR`), `@omerdlw/base-framework/theme` (`ThemeButton`, `ThemeIcon` for the fallback, icon key `error`), `@omerdlw/base-framework/theme`, `@omerdlw/base-framework/utils` (`report`, `setReportSink`, `toUserMessage`), `next/navigation` (`usePathname`).
159
159
  - **Used by:** `src/core/provider.tsx`; the dock (turns `APP_ERROR` into its error status) and the notification module (toasts `APP_ERROR` with `notify: true`) react to the event without importing this module.
@@ -153,5 +153,5 @@ No classes or inline styles in the module. The `loadingTheme` slot `overlay` (st
153
153
 
154
154
  ## 9. Dependencies
155
155
 
156
- - **Uses:** `@omerdlw/base-framework/kernel` (`defineModule`, `useModuleRegistration`, `useRegistryValue`), `@omerdlw/base-framework/ui` (`Spinner`), `@omerdlw/base-framework/hooks` (`useIsFullscreenStateActive`), `@omerdlw/base-framework/utils` (`createStore`), `@omerdlw/base-framework/theme`.
156
+ - **Uses:** `@omerdlw/base-framework/kernel` (`defineModule`, `useModuleRegistration`, `useRegistryValue`), `@omerdlw/base-framework/theme` (`ThemeSpinner`), `@omerdlw/base-framework/hooks` (`useIsFullscreenStateActive`), `@omerdlw/base-framework/utils` (`createStore`), `@omerdlw/base-framework/theme`.
157
157
  - **Used by:** `src/core/provider.tsx` (installs it); the **dock**, which reads `isLoading` and calls `stopLoading` through `definePeer("loading")` (inert when not installed); pages and features through `useLoading*` / `page.modules.loading`.
@@ -229,5 +229,5 @@ Flat layout ([architecture §2.1](../architecture-and-rules.md#21-flat-layout-de
229
229
 
230
230
  ## 10. Dependencies
231
231
 
232
- - **Uses:** `@omerdlw/base-framework/kernel` (`defineModule`, `useModuleRegistration`, `useRegistryEntries`, `ModuleBoundary`), `@omerdlw/base-framework/utils` (`acquireGlobalScrollLock`, `createStore`), `@omerdlw/base-framework/ui` (`Button`, `Icon`), `@omerdlw/base-framework/theme`, `motion/react`.
232
+ - **Uses:** `@omerdlw/base-framework/kernel` (`defineModule`, `useModuleRegistration`, `useRegistryEntries`, `ModuleBoundary`), `@omerdlw/base-framework/utils` (`acquireGlobalScrollLock`, `createStore`), `@omerdlw/base-framework/theme` (`ThemeButton`, `ThemeIcon`), `@omerdlw/base-framework/theme`, `motion/react`.
233
233
  - **Used by:** `src/core/provider.tsx` (installs it), pages and features through `useModal` / `page.modules.modal`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omerdlw/base-framework",
3
- "version": "3.4.1",
3
+ "version": "4.0.0",
4
4
  "description": "Microkernel engine and first-party declarative UI modules for app-like Next.js products.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -44,11 +44,6 @@
44
44
  "import": "./dist/theme/index.js",
45
45
  "default": "./dist/theme/index.js"
46
46
  },
47
- "./ui": {
48
- "types": "./dist/ui/index.d.ts",
49
- "import": "./dist/ui/index.js",
50
- "default": "./dist/ui/index.js"
51
- },
52
47
  "./kernel": {
53
48
  "types": "./dist/kernel/index.d.ts",
54
49
  "import": "./dist/kernel/index.js",
@@ -171,7 +166,6 @@
171
166
  }
172
167
  },
173
168
  "dependencies": {
174
- "@iconify-icon/react": "3.0.3",
175
169
  "tailwind-merge": "^3.7.0"
176
170
  },
177
171
  "devDependencies": {
@@ -11,7 +11,7 @@
11
11
  - **Core Framework:** `@omerdlw/base-framework` (Microkernel & Declarative UI Modules)
12
12
  - **Styling:** Tailwind CSS v4 (the app owns every token and utility; the framework ships no CSS)
13
13
  - **Motion:** Motion (v13) with hardware GPU acceleration (`translate3d`, `scale`). Framework modules ship no animation of their own: the dock, modal, toast, context-menu and background motion lives in this app's theme files (`motion` next to `slots`), with tempo and vocabulary from `defineMotion`. Change module animation there, never in the framework.
14
- - **Icons:** `@iconify-icon/react` via `<Icon icon="solar:..." />`
14
+ - **Icons:** the app's own `<Icon icon="solar:..." />`; the framework's modules draw with it through `ThemeProvider` `components` and name their icons by key (`icons`)
15
15
 
16
16
  ---
17
17
 
@@ -123,9 +123,10 @@ Always import from the exact subpaths exposed by `@omerdlw/base-framework`:
123
123
  | `useModal`, `useModalContext` | `@omerdlw/base-framework/modal` |
124
124
  | `useAmbientTheme` | `@omerdlw/base-framework/ambient` |
125
125
  | `report`, `createStore` | `@omerdlw/base-framework/utils` |
126
- | `cn`, `defineUi` | `@omerdlw/base-framework/recipes` |
126
+ | `cn`, `defineRecipe`, `splitVariants` | `@omerdlw/base-framework/recipes` |
127
+ | `ThemeProvider`, `defineTheme` | `@omerdlw/base-framework/theme` |
127
128
  | `useClickOutside`, `useGlobalEvent` | `@omerdlw/base-framework/hooks` |
128
- | `Button`, `Icon`, `Spinner`, `Tooltip` | `@omerdlw/base-framework/ui` |
129
+ | `Button`, `Icon`, `Spinner`, `Tooltip` | the app's own `src/design/components` |
129
130
 
130
131
  ### Rule 5: Modals and Surfaces Must Be Declared or Scoped
131
132