@trypattern/sdk 0.0.0-stage → 0.1.1

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 (273) hide show
  1. package/README.md +127 -2
  2. package/dist/access.d.ts +31 -0
  3. package/dist/access.js +72 -0
  4. package/dist/actions.d.ts +57 -0
  5. package/dist/actions.js +198 -0
  6. package/dist/api.d.ts +30 -0
  7. package/dist/api.js +60 -0
  8. package/dist/app.d.ts +115 -0
  9. package/dist/app.js +266 -0
  10. package/dist/appInfo.d.ts +35 -0
  11. package/dist/appInfo.js +67 -0
  12. package/dist/appTitle.d.ts +6 -0
  13. package/dist/appTitle.js +3 -0
  14. package/dist/appearance.d.ts +7 -0
  15. package/dist/appearance.js +2 -0
  16. package/dist/auth/sessionApi.d.ts +41 -0
  17. package/dist/auth/sessionApi.js +158 -0
  18. package/dist/auth/sessionStore.d.ts +20 -0
  19. package/dist/auth/sessionStore.js +40 -0
  20. package/dist/auth/user.d.ts +11 -0
  21. package/dist/auth/user.js +9 -0
  22. package/dist/builtins/Account.d.ts +25 -0
  23. package/dist/builtins/Account.js +15 -0
  24. package/dist/builtins/AppSettings.d.ts +12 -0
  25. package/dist/builtins/AppSettings.js +31 -0
  26. package/dist/builtins/Palette.d.ts +29 -0
  27. package/dist/builtins/Palette.js +63 -0
  28. package/dist/builtins/SignIn.d.ts +28 -0
  29. package/dist/builtins/SignIn.js +60 -0
  30. package/dist/builtins/Toasts.d.ts +32 -0
  31. package/dist/builtins/Toasts.js +25 -0
  32. package/dist/builtins/actions.d.ts +2 -0
  33. package/dist/builtins/actions.js +45 -0
  34. package/dist/cache.d.ts +24 -0
  35. package/dist/cache.js +112 -0
  36. package/dist/cli/app.d.ts +2 -0
  37. package/dist/cli/app.js +1406 -0
  38. package/dist/cli/publishing.d.ts +21 -0
  39. package/dist/cli/publishing.js +493 -0
  40. package/dist/cli/screenshot.d.ts +1 -0
  41. package/dist/cli/screenshot.js +96 -0
  42. package/dist/cli/tools.d.ts +12 -0
  43. package/dist/cli/tools.js +35 -0
  44. package/dist/clock.d.ts +6 -0
  45. package/dist/clock.js +31 -0
  46. package/dist/components/AppFrame.d.ts +14 -0
  47. package/dist/components/AppFrame.js +64 -0
  48. package/dist/components/AppearancePicker.d.ts +1 -0
  49. package/dist/components/AppearancePicker.js +12 -0
  50. package/dist/components/Avatar.d.ts +9 -0
  51. package/dist/components/Avatar.js +63 -0
  52. package/dist/components/Badge.d.ts +11 -0
  53. package/dist/components/Badge.js +87 -0
  54. package/dist/components/Button.d.ts +24 -0
  55. package/dist/components/Button.js +252 -0
  56. package/dist/components/Card.d.ts +12 -0
  57. package/dist/components/Card.js +38 -0
  58. package/dist/components/CommandMenu.d.ts +23 -0
  59. package/dist/components/CommandMenu.js +214 -0
  60. package/dist/components/CommandPalette.d.ts +1 -0
  61. package/dist/components/CommandPalette.js +7 -0
  62. package/dist/components/Content.d.ts +7 -0
  63. package/dist/components/Content.js +24 -0
  64. package/dist/components/ContextMenu.d.ts +8 -0
  65. package/dist/components/ContextMenu.js +23 -0
  66. package/dist/components/CopyButton.d.ts +11 -0
  67. package/dist/components/CopyButton.js +16 -0
  68. package/dist/components/Dialog.d.ts +11 -0
  69. package/dist/components/Dialog.js +81 -0
  70. package/dist/components/Divider.d.ts +7 -0
  71. package/dist/components/Divider.js +30 -0
  72. package/dist/components/EmptyState.d.ts +8 -0
  73. package/dist/components/EmptyState.js +24 -0
  74. package/dist/components/Form.d.ts +9 -0
  75. package/dist/components/Form.js +23 -0
  76. package/dist/components/Icon.d.ts +10 -0
  77. package/dist/components/Icon.js +22 -0
  78. package/dist/components/IconButton.d.ts +14 -0
  79. package/dist/components/IconButton.js +53 -0
  80. package/dist/components/Kbd.d.ts +6 -0
  81. package/dist/components/Kbd.js +67 -0
  82. package/dist/components/Link.d.ts +14 -0
  83. package/dist/components/Link.js +44 -0
  84. package/dist/components/ListRow.d.ts +12 -0
  85. package/dist/components/ListRow.js +62 -0
  86. package/dist/components/LoadingRows.d.ts +5 -0
  87. package/dist/components/LoadingRows.js +6 -0
  88. package/dist/components/Menu.d.ts +12 -0
  89. package/dist/components/Menu.js +33 -0
  90. package/dist/components/MenuItems.d.ts +21 -0
  91. package/dist/components/MenuItems.js +32 -0
  92. package/dist/components/Placement.d.ts +21 -0
  93. package/dist/components/Placement.js +1 -0
  94. package/dist/components/Popup.d.ts +8 -0
  95. package/dist/components/Popup.js +43 -0
  96. package/dist/components/PopupItem.d.ts +8 -0
  97. package/dist/components/PopupItem.js +51 -0
  98. package/dist/components/PropertyRow.d.ts +7 -0
  99. package/dist/components/PropertyRow.js +23 -0
  100. package/dist/components/RadioGroup.d.ts +18 -0
  101. package/dist/components/RadioGroup.js +85 -0
  102. package/dist/components/Row.d.ts +16 -0
  103. package/dist/components/Row.js +27 -0
  104. package/dist/components/Screen.d.ts +13 -0
  105. package/dist/components/Screen.js +56 -0
  106. package/dist/components/Scrim.d.ts +8 -0
  107. package/dist/components/Scrim.js +40 -0
  108. package/dist/components/ScrollArea.d.ts +15 -0
  109. package/dist/components/ScrollArea.js +13 -0
  110. package/dist/components/SegmentedControl.d.ts +17 -0
  111. package/dist/components/SegmentedControl.js +68 -0
  112. package/dist/components/Select.d.ts +17 -0
  113. package/dist/components/Select.js +107 -0
  114. package/dist/components/SettingsRow.d.ts +8 -0
  115. package/dist/components/SettingsRow.js +32 -0
  116. package/dist/components/Sidebar.d.ts +20 -0
  117. package/dist/components/Sidebar.js +137 -0
  118. package/dist/components/SignInScreen.d.ts +1 -0
  119. package/dist/components/SignInScreen.js +40 -0
  120. package/dist/components/Size.d.ts +1 -0
  121. package/dist/components/Size.js +1 -0
  122. package/dist/components/Skeleton.d.ts +8 -0
  123. package/dist/components/Skeleton.js +48 -0
  124. package/dist/components/Spinner.d.ts +6 -0
  125. package/dist/components/Spinner.js +54 -0
  126. package/dist/components/Stack.d.ts +14 -0
  127. package/dist/components/Stack.js +19 -0
  128. package/dist/components/Switch.d.ts +10 -0
  129. package/dist/components/Switch.js +72 -0
  130. package/dist/components/Text.d.ts +21 -0
  131. package/dist/components/Text.js +77 -0
  132. package/dist/components/TextField.d.ts +25 -0
  133. package/dist/components/TextField.js +68 -0
  134. package/dist/components/Toaster.d.ts +1 -0
  135. package/dist/components/Toaster.js +83 -0
  136. package/dist/components/Tooltip.d.ts +8 -0
  137. package/dist/components/Tooltip.js +43 -0
  138. package/dist/components/controlLook.d.ts +70 -0
  139. package/dist/components/controlLook.js +80 -0
  140. package/dist/components/frame.d.ts +4 -0
  141. package/dist/components/frame.js +2 -0
  142. package/dist/components/icons.d.ts +59 -0
  143. package/dist/components/icons.js +111 -0
  144. package/dist/components/interaction.d.ts +12 -0
  145. package/dist/components/interaction.js +22 -0
  146. package/dist/components/spacing.d.ts +118 -0
  147. package/dist/components/spacing.js +46 -0
  148. package/dist/components/tones.d.ts +28 -0
  149. package/dist/components/tones.js +12 -0
  150. package/dist/entityStore.d.ts +46 -0
  151. package/dist/entityStore.js +160 -0
  152. package/dist/flows/accessFlows.d.ts +9 -0
  153. package/dist/flows/accessFlows.js +167 -0
  154. package/dist/flows/browser.d.ts +34 -0
  155. package/dist/flows/browser.js +167 -0
  156. package/dist/flows/contactSheet.d.ts +1 -0
  157. package/dist/flows/contactSheet.js +63 -0
  158. package/dist/flows/flowBrowser.d.ts +25 -0
  159. package/dist/flows/flowBrowser.js +23 -0
  160. package/dist/flows/flowSetup.d.ts +3 -0
  161. package/dist/flows/flowSetup.js +35 -0
  162. package/dist/flows/flows.d.ts +47 -0
  163. package/dist/flows/flows.js +175 -0
  164. package/dist/flows/screenshotName.d.ts +1 -0
  165. package/dist/flows/screenshotName.js +6 -0
  166. package/dist/gate.d.ts +8 -0
  167. package/dist/gate.js +52 -0
  168. package/dist/hooks/appContext.d.ts +15 -0
  169. package/dist/hooks/appContext.js +5 -0
  170. package/dist/hooks/appHooks.d.ts +21 -0
  171. package/dist/hooks/appHooks.js +24 -0
  172. package/dist/hooks/useAnimatesOnChange.d.ts +1 -0
  173. package/dist/hooks/useAnimatesOnChange.js +14 -0
  174. package/dist/hooks/useStoreState.d.ts +6 -0
  175. package/dist/hooks/useStoreState.js +5 -0
  176. package/dist/index.d.ts +44 -0
  177. package/dist/index.js +21 -0
  178. package/dist/memoryApi.d.ts +19 -0
  179. package/dist/memoryApi.js +42 -0
  180. package/dist/model.d.ts +94 -0
  181. package/dist/model.js +243 -0
  182. package/dist/page.d.ts +11 -0
  183. package/dist/page.js +9 -0
  184. package/dist/platform.d.ts +1 -0
  185. package/dist/platform.js +5 -0
  186. package/dist/publishWire.d.ts +271 -0
  187. package/dist/publishWire.js +168 -0
  188. package/dist/react.d.ts +49 -0
  189. package/dist/react.js +40 -0
  190. package/dist/registered.d.ts +60 -0
  191. package/dist/registered.js +19 -0
  192. package/dist/routes.d.ts +38 -0
  193. package/dist/routes.js +21 -0
  194. package/dist/rules/checkAllFiles.d.ts +1 -0
  195. package/dist/rules/checkAllFiles.js +749 -0
  196. package/dist/rules/checkApiRouting.d.ts +1 -0
  197. package/dist/rules/checkApiRouting.js +112 -0
  198. package/dist/rules/lintPlugin.d.ts +252 -0
  199. package/dist/rules/lintPlugin.js +1159 -0
  200. package/dist/rules/messages.d.ts +48 -0
  201. package/dist/rules/messages.js +48 -0
  202. package/dist/rules/themeTokens.d.ts +6 -0
  203. package/dist/rules/themeTokens.js +64 -0
  204. package/dist/schema.d.ts +4 -0
  205. package/dist/schema.js +2 -0
  206. package/dist/server/auth.d.ts +115 -0
  207. package/dist/server/auth.js +134 -0
  208. package/dist/server/authService.d.ts +9 -0
  209. package/dist/server/authService.js +50 -0
  210. package/dist/server/createServer.d.ts +402 -0
  211. package/dist/server/createServer.js +82 -0
  212. package/dist/server/env.d.ts +15 -0
  213. package/dist/server/env.js +1 -0
  214. package/dist/server/index.d.ts +13 -0
  215. package/dist/server/index.js +9 -0
  216. package/dist/server/services.d.ts +9 -0
  217. package/dist/server/services.js +47 -0
  218. package/dist/server/session.d.ts +29 -0
  219. package/dist/server/session.js +65 -0
  220. package/dist/server/sessions.d.ts +92 -0
  221. package/dist/server/sessions.js +47 -0
  222. package/dist/server/settings.d.ts +49 -0
  223. package/dist/server/settings.js +25 -0
  224. package/dist/server/signInWire.d.ts +53 -0
  225. package/dist/server/signInWire.js +23 -0
  226. package/dist/server/tables.d.ts +242 -0
  227. package/dist/server/tables.js +246 -0
  228. package/dist/server/users.d.ts +189 -0
  229. package/dist/server/users.js +49 -0
  230. package/dist/serviceClients.d.ts +5 -0
  231. package/dist/serviceClients.js +70 -0
  232. package/dist/services.d.ts +53 -0
  233. package/dist/services.js +30 -0
  234. package/dist/shortcuts.d.ts +3 -0
  235. package/dist/shortcuts.js +40 -0
  236. package/dist/start.d.ts +20 -0
  237. package/dist/start.js +145 -0
  238. package/dist/state.d.ts +14 -0
  239. package/dist/state.js +17 -0
  240. package/dist/store.d.ts +45 -0
  241. package/dist/store.js +208 -0
  242. package/dist/subscribers.d.ts +5 -0
  243. package/dist/subscribers.js +13 -0
  244. package/dist/table.d.ts +143 -0
  245. package/dist/table.js +91 -0
  246. package/dist/tables.d.ts +77 -0
  247. package/dist/tables.js +216 -0
  248. package/dist/theme/reset.css +84 -0
  249. package/dist/theme/scales.d.ts +76 -0
  250. package/dist/theme/scales.js +82 -0
  251. package/dist/theme/tokens.stylex.d.ts +218 -0
  252. package/dist/theme/tokens.stylex.js +233 -0
  253. package/dist/vite/commandBridge.d.ts +2 -0
  254. package/dist/vite/commandBridge.js +46 -0
  255. package/dist/vite/designManifest.d.ts +25 -0
  256. package/dist/vite/designManifest.js +191 -0
  257. package/dist/vite/localWorker.d.ts +4 -0
  258. package/dist/vite/localWorker.js +60 -0
  259. package/dist/vite/projectFile.d.ts +9 -0
  260. package/dist/vite/projectFile.js +17 -0
  261. package/dist/vite/rootAlias.d.ts +2 -0
  262. package/dist/vite/rootAlias.js +15 -0
  263. package/dist/vite/vite.d.ts +8 -0
  264. package/dist/vite/vite.js +95 -0
  265. package/dist/wire.d.ts +7 -0
  266. package/dist/wire.js +1 -0
  267. package/package.json +103 -3
  268. package/presets/lintPlugin.js +7 -0
  269. package/presets/oxlint.json +167 -0
  270. package/presets/register.d.ts +21 -0
  271. package/presets/server.d.ts +2 -0
  272. package/presets/tsconfig.app.json +29 -0
  273. package/presets/tsconfig.server.json +27 -0
@@ -0,0 +1,4 @@
1
+ export type Frame = {
2
+ onToggleSidebar: () => void;
3
+ };
4
+ export declare const FrameContext: import("react").Context<Frame | null>;
@@ -0,0 +1,2 @@
1
+ import { createContext } from 'react';
2
+ export const FrameContext = createContext(null);
@@ -0,0 +1,59 @@
1
+ import type { AppIconName } from '../registered.ts';
2
+ type FilledDrawing = {
3
+ readonly fill: string | readonly string[];
4
+ readonly rule?: 'evenodd';
5
+ };
6
+ export type IconDrawing = string | readonly string[] | FilledDrawing;
7
+ export type IconName = keyof typeof builtInIcons | AppIconName;
8
+ declare const builtInIcons: {
9
+ home: string[];
10
+ folder: string[];
11
+ settings: string[];
12
+ sun: {
13
+ fill: string[];
14
+ };
15
+ moon: {
16
+ fill: string;
17
+ };
18
+ monitor: {
19
+ fill: string[];
20
+ rule: "evenodd";
21
+ };
22
+ close: string;
23
+ chevronUpDown: string;
24
+ check: string;
25
+ plus: string;
26
+ trash: string[];
27
+ checkCircle: string[];
28
+ alertCircle: string[];
29
+ chevronDown: string;
30
+ chevronRight: string;
31
+ search: string[];
32
+ panelLeft: string[];
33
+ more: {
34
+ fill: string[];
35
+ };
36
+ help: string[];
37
+ bell: string[];
38
+ enter: string;
39
+ arrowLeft: string;
40
+ arrowUp: string;
41
+ arrowUpRight: string;
42
+ circle: string;
43
+ copy: string[];
44
+ arrowDown: string;
45
+ logOut: string[];
46
+ };
47
+ export declare const builtInIconNames: string[];
48
+ export declare function defineIcons<const Icons extends Record<string, IconDrawing>>(icons: Icons): Icons;
49
+ export declare function setAppIcons(icons: Readonly<Record<string, IconDrawing>>): void;
50
+ export declare function shapeOf(name: IconName): {
51
+ paths: readonly string[];
52
+ isFilled: boolean;
53
+ rule?: never;
54
+ } | {
55
+ paths: string[];
56
+ isFilled: boolean;
57
+ rule: "evenodd" | undefined;
58
+ };
59
+ export {};
@@ -0,0 +1,111 @@
1
+ const builtInIcons = {
2
+ home: [
3
+ 'M14.25 20.25H18.25C19.3546 20.25 20.25 19.3546 20.25 18.25V9.90496C20.25 9.32928 20.0019 8.78149 19.5702 8.40225L13.3202 2.91021C12.5644 2.24604 11.4356 2.24604 10.6798 2.91021L4.42977 8.40225C3.99813 8.78149 3.75 9.32928 3.75 9.90496V18.25C3.75 19.3546 4.64543 20.25 5.75 20.25H9.75V16.75C9.75 15.6454 10.6454 14.75 11.75 14.75H12.25C13.3546 14.75 14.25 15.6454 14.25 16.75V20.25Z'
4
+ ],
5
+ folder: [
6
+ 'M9.13202 3.75H4.75C3.64543 3.75 2.75 4.64543 2.75 5.75V17.25C2.75 18.3546 3.64543 19.25 4.75 19.25H19.25C20.3546 19.25 21.25 18.3546 21.25 17.25V7.75C21.25 6.64543 20.3546 5.75 19.25 5.75H12.8124C12.2915 5.75 11.7911 5.54674 11.4177 5.18345L10.5267 4.31655C10.1534 3.95326 9.65297 3.75 9.13202 3.75Z',
7
+ 'M2.75 12.75V11.75C2.75 10.6454 3.64543 9.75 4.75 9.75H19.25C20.3546 9.75 21.25 10.6454 21.25 11.75V12.75'
8
+ ],
9
+ settings: [
10
+ 'M7.878 5.21415L7.17474 5.05186C6.58003 4.91462 5.95657 5.09343 5.525 5.525C5.09343 5.95657 4.91462 6.58003 5.05186 7.17474L5.21415 7.878C5.40122 8.6886 5.06696 9.53036 4.37477 9.99182L3.51965 10.5619C3.03881 10.8825 2.75 11.4221 2.75 12C2.75 12.5779 3.03881 13.1175 3.51965 13.4381L4.37477 14.0082C5.06696 14.4696 5.40122 15.3114 5.21415 16.122L5.05186 16.8253C4.91462 17.42 5.09343 18.0434 5.525 18.475C5.95657 18.9066 6.58003 19.0854 7.17474 18.9481L7.878 18.7858C8.6886 18.5988 9.53036 18.933 9.99182 19.6252L10.5619 20.4804C10.8825 20.9612 11.4221 21.25 12 21.25C12.5779 21.25 13.1175 20.9612 13.4381 20.4804L14.0082 19.6252C14.4696 18.933 15.3114 18.5988 16.122 18.7858L16.8253 18.9481C17.42 19.0854 18.0434 18.9066 18.475 18.475C18.9066 18.0434 19.0854 17.42 18.9481 16.8253L18.7858 16.122C18.5988 15.3114 18.933 14.4696 19.6252 14.0082L20.4804 13.4381C20.9612 13.1175 21.25 12.5779 21.25 12C21.25 11.4221 20.9612 10.8825 20.4804 10.5619L19.6252 9.99182C18.933 9.53036 18.5988 8.6886 18.7858 7.878L18.9481 7.17473C19.0854 6.58003 18.9066 5.95657 18.475 5.525C18.0434 5.09343 17.42 4.91462 16.8253 5.05186L16.122 5.21415C15.3114 5.40122 14.4696 5.06696 14.0082 4.37477L13.4381 3.51965C13.1175 3.03881 12.5779 2.75 12 2.75C11.4221 2.75 10.8825 3.03881 10.5619 3.51965L9.99182 4.37477C9.53036 5.06696 8.6886 5.40122 7.878 5.21415Z',
11
+ 'M14.75 12C14.75 13.5188 13.5188 14.75 12 14.75C10.4812 14.75 9.25 13.5188 9.25 12C9.25 10.4812 10.4812 9.25 12 9.25C13.5188 9.25 14.75 10.4812 14.75 12Z'
12
+ ],
13
+ sun: {
14
+ fill: [
15
+ 'M13 2C13 1.44772 12.5523 1 12 1C11.4477 1 11 1.44772 11 2V3C11 3.55228 11.4477 4 12 4C12.5523 4 13 3.55228 13 3V2Z',
16
+ 'M13 21C13 20.4477 12.5523 20 12 20C11.4477 20 11 20.4477 11 21V22C11 22.5523 11.4477 23 12 23C12.5523 23 13 22.5523 13 22V21Z',
17
+ 'M19.777 4.22295C20.1675 4.61347 20.1675 5.24664 19.777 5.63716L19.0669 6.34716C18.6764 6.73768 18.0433 6.73768 17.6527 6.34716C17.2622 5.95664 17.2622 5.32347 17.6527 4.93295L18.3627 4.22295C18.7533 3.83242 19.3864 3.83242 19.777 4.22295Z',
18
+ 'M6.34726 19.0671C6.73779 18.6766 6.73779 18.0434 6.34726 17.6529C5.95674 17.2624 5.32357 17.2624 4.93305 17.6529L4.22305 18.3629C3.83253 18.7534 3.83253 19.3866 4.22305 19.7771C4.61357 20.1676 5.24674 20.1676 5.63726 19.7771L6.34726 19.0671Z',
19
+ 'M20 12C20 11.4477 20.4477 11 21 11H22C22.5523 11 23 11.4477 23 12C23 12.5523 22.5523 13 22 13H21C20.4477 13 20 12.5523 20 12Z',
20
+ 'M2 11C1.44772 11 1 11.4477 1 12C1 12.5523 1.44772 13 2 13H3C3.55228 13 4 12.5523 4 12C4 11.4477 3.55228 11 3 11H2Z',
21
+ 'M17.6527 17.6529C18.0433 17.2624 18.6764 17.2624 19.0669 17.6529L19.777 18.3629C20.1675 18.7534 20.1675 19.3866 19.777 19.7771C19.3864 20.1676 18.7533 20.1676 18.3627 19.7771L17.6527 19.0671C17.2622 18.6766 17.2622 18.0434 17.6527 17.6529Z',
22
+ 'M5.63726 4.22295C5.24674 3.83242 4.61357 3.83242 4.22305 4.22295C3.83253 4.61347 3.83253 5.24664 4.22305 5.63716L4.93305 6.34716C5.32357 6.73768 5.95674 6.73768 6.34726 6.34716C6.73779 5.95664 6.73779 5.32347 6.34726 4.93295L5.63726 4.22295Z',
23
+ 'M7.75736 7.75736C10.1005 5.41421 13.8995 5.41421 16.2426 7.75736C18.5858 10.1005 18.5858 13.8995 16.2426 16.2426C13.8995 18.5858 10.1005 18.5858 7.75736 16.2426C5.41421 13.8995 5.41421 10.1005 7.75736 7.75736Z'
24
+ ]
25
+ },
26
+ moon: {
27
+ fill: 'M12.0517 3.59971C12.2712 3.28123 12.2873 2.86472 12.0931 2.53021C11.8989 2.19569 11.5292 2.00315 11.1438 2.03581C6.0214 2.46985 2 6.76372 2 11.9979C2 17.5197 6.47632 21.996 11.9981 21.996C17.2324 21.996 21.5264 17.9745 21.9602 12.8519C21.9929 12.4664 21.8003 12.0968 21.4658 11.9026C21.1313 11.7084 20.7148 11.7246 20.3963 11.9441C19.4302 12.61 18.2602 12.9998 16.9961 12.9998C13.6824 12.9998 10.9961 10.3135 10.9961 6.99976C10.9961 5.73577 11.3858 4.56582 12.0517 3.59971Z'
28
+ },
29
+ monitor: {
30
+ fill: [
31
+ 'M6 3C3.79086 3 2 4.79086 2 7V12H22V7C22 4.79086 20.2091 3 18 3H6Z',
32
+ 'M2 14H22C22 16.2091 20.2091 18 18 18H15V21C15 21.5523 14.5523 22 14 22H10C9.44772 22 9 21.5523 9 21V18H6C3.79086 18 2 16.2091 2 14ZM11 18V20H13V18H11Z'
33
+ ],
34
+ rule: 'evenodd'
35
+ },
36
+ close: 'M6 6l12 12M18 6 6 18',
37
+ chevronUpDown: 'M8 9.5 12 5.5l4 4M8 14.5l4 4 4-4',
38
+ check: 'M5 12.5 9.5 17 19 7.5',
39
+ plus: 'M12 5v14M5 12h14',
40
+ trash: [
41
+ 'M4.75 6.75h14.5',
42
+ 'M9.75 6.75v-1a2 2 0 0 1 2-2h.5a2 2 0 0 1 2 2v1',
43
+ 'M6.75 6.75l.8 11.6a2 2 0 0 0 2 1.9h4.9a2 2 0 0 0 2-1.9l.8-11.6'
44
+ ],
45
+ checkCircle: [
46
+ 'M3.5 12a8.5 8.5 0 1 0 17 0a8.5 8.5 0 1 0 -17 0',
47
+ 'M8.75 12.25l2.25 2.25 4.25-4.5'
48
+ ],
49
+ alertCircle: [
50
+ 'M3.5 12a8.5 8.5 0 1 0 17 0a8.5 8.5 0 1 0 -17 0',
51
+ 'M12 8v4.5',
52
+ 'M11.5 15.75a0.5 0.5 0 1 0 1 0a0.5 0.5 0 1 0 -1 0'
53
+ ],
54
+ chevronDown: 'M7 10l5 5 5-5',
55
+ chevronRight: 'M10 7l5 5-5 5',
56
+ search: ['M4.5 11a6.5 6.5 0 1 0 13 0a6.5 6.5 0 1 0 -13 0', 'M16 16l4 4'],
57
+ panelLeft: [
58
+ 'M6.5 4.5h11a3 3 0 0 1 3 3v9a3 3 0 0 1 -3 3h-11a3 3 0 0 1 -3 -3v-9a3 3 0 0 1 3 -3Z',
59
+ 'M9.5 4.5v15'
60
+ ],
61
+ more: {
62
+ fill: [
63
+ 'M4.5 12a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0',
64
+ 'M10.5 12a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0',
65
+ 'M16.5 12a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0'
66
+ ]
67
+ },
68
+ help: [
69
+ 'M3.5 12a8.5 8.5 0 1 0 17 0a8.5 8.5 0 1 0 -17 0',
70
+ 'M9.75 9.5a2.25 2.25 0 1 1 3.4 1.95c-.7.4-1.15.9-1.15 1.55v.25',
71
+ 'M11.5 16.5a0.5 0.5 0 1 0 1 0a0.5 0.5 0 1 0 -1 0'
72
+ ],
73
+ bell: [
74
+ 'M6.5 16.5h11l-1.25-2V10a4.25 4.25 0 0 0-8.5 0v4.5Z',
75
+ 'M10.25 19a1.9 1.9 0 0 0 3.5 0'
76
+ ],
77
+ enter: 'M19 5v6.5a3 3 0 0 1-3 3H5.5M9 10.5l-4 4 4 4',
78
+ arrowLeft: 'M19 12H5M11 6l-6 6 6 6',
79
+ arrowUp: 'M12 19V5M6 11l6-6 6 6',
80
+ arrowUpRight: 'M7 17L17 7M8 7h9v9',
81
+ circle: 'M3.5 12a8.5 8.5 0 1 0 17 0a8.5 8.5 0 1 0 -17 0',
82
+ copy: [
83
+ 'M10 9h8.5a1.5 1.5 0 0 1 1.5 1.5V19a1.5 1.5 0 0 1-1.5 1.5H10A1.5 1.5 0 0 1 8.5 19v-8.5A1.5 1.5 0 0 1 10 9z',
84
+ 'M15.5 9V5.5A1.5 1.5 0 0 0 14 4H5.5A1.5 1.5 0 0 0 4 5.5V14a1.5 1.5 0 0 0 1.5 1.5H8.5'
85
+ ],
86
+ arrowDown: 'M12 5v14M6 13l6 6 6-6',
87
+ logOut: [
88
+ 'M14 4.5H7.5a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2H14',
89
+ 'M19.5 12H10M16 8.5l3.5 3.5-3.5 3.5'
90
+ ]
91
+ };
92
+ const builtIns = new Map(Object.entries(builtInIcons));
93
+ let appIcons = new Map();
94
+ export const builtInIconNames = Object.keys(builtInIcons);
95
+ export function defineIcons(icons) {
96
+ return icons;
97
+ }
98
+ export function setAppIcons(icons) {
99
+ appIcons = new Map(Object.entries(icons));
100
+ }
101
+ export function shapeOf(name) {
102
+ const drawing = appIcons.get(name) ?? builtIns.get(name) ?? [];
103
+ if (typeof drawing === 'string')
104
+ return { paths: [drawing], isFilled: false };
105
+ if (isPathList(drawing))
106
+ return { paths: drawing, isFilled: false };
107
+ return { paths: [drawing.fill].flat(), isFilled: true, rule: drawing.rule };
108
+ }
109
+ function isPathList(drawing) {
110
+ return Array.isArray(drawing);
111
+ }
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from 'react';
2
+ export type Interaction = {
3
+ primitive: 'AppFrame' | 'Button' | 'IconButton' | 'Link' | 'ListRow' | 'Select' | 'Switch' | 'SegmentedControl' | 'Menu' | 'ContextMenu' | 'CommandMenu' | 'TextField' | 'Form' | 'Dialog' | 'RadioGroup';
4
+ event: 'click' | 'change' | 'select' | 'open' | 'close' | 'submit' | 'navigate';
5
+ label: string;
6
+ page: string | null;
7
+ };
8
+ type Reported = Omit<Interaction, 'page'>;
9
+ export declare function setInteractionSink(next: (interaction: Reported) => void): void;
10
+ export declare function interact(interaction: Reported): void;
11
+ export declare function textOf(node: ReactNode): string;
12
+ export {};
@@ -0,0 +1,22 @@
1
+ import { Children, isValidElement } from 'react';
2
+ let sink = () => undefined;
3
+ export function setInteractionSink(next) {
4
+ sink = next;
5
+ }
6
+ export function interact(interaction) {
7
+ sink(interaction);
8
+ }
9
+ export function textOf(node) {
10
+ return Children.toArray(node)
11
+ .map((part) => {
12
+ if (typeof part === 'string' || typeof part === 'number') {
13
+ return String(part);
14
+ }
15
+ if (isValidElement(part)) {
16
+ return textOf(part.props.children);
17
+ }
18
+ return '';
19
+ })
20
+ .join('')
21
+ .trim();
22
+ }
@@ -0,0 +1,118 @@
1
+ import * as stylex from '@stylexjs/stylex';
2
+ export type SpaceName = 'none' | 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'xxxl';
3
+ export declare const gaps: Readonly<{
4
+ readonly none: Readonly<{
5
+ readonly gap: stylex.StyleXClassNameFor<"gap", 0>;
6
+ }>;
7
+ readonly xxs: Readonly<{
8
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
9
+ }>;
10
+ readonly xs: Readonly<{
11
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
12
+ }>;
13
+ readonly sm: Readonly<{
14
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
15
+ }>;
16
+ readonly md: Readonly<{
17
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
18
+ }>;
19
+ readonly lg: Readonly<{
20
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
21
+ }>;
22
+ readonly xl: Readonly<{
23
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
24
+ }>;
25
+ readonly xxl: Readonly<{
26
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
27
+ }>;
28
+ readonly xxxl: Readonly<{
29
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
30
+ }>;
31
+ }>;
32
+ export declare const paddings: Readonly<{
33
+ readonly none: Readonly<{
34
+ readonly padding: stylex.StyleXClassNameFor<"padding", 0>;
35
+ }>;
36
+ readonly xxs: Readonly<{
37
+ readonly padding: stylex.StyleXClassNameFor<"padding", string>;
38
+ }>;
39
+ readonly xs: Readonly<{
40
+ readonly padding: stylex.StyleXClassNameFor<"padding", string>;
41
+ }>;
42
+ readonly sm: Readonly<{
43
+ readonly padding: stylex.StyleXClassNameFor<"padding", string>;
44
+ }>;
45
+ readonly md: Readonly<{
46
+ readonly padding: stylex.StyleXClassNameFor<"padding", string>;
47
+ }>;
48
+ readonly lg: Readonly<{
49
+ readonly padding: stylex.StyleXClassNameFor<"padding", string>;
50
+ }>;
51
+ readonly xl: Readonly<{
52
+ readonly padding: stylex.StyleXClassNameFor<"padding", string>;
53
+ }>;
54
+ readonly xxl: Readonly<{
55
+ readonly padding: stylex.StyleXClassNameFor<"padding", string>;
56
+ }>;
57
+ readonly xxxl: Readonly<{
58
+ readonly padding: stylex.StyleXClassNameFor<"padding", string>;
59
+ }>;
60
+ }>;
61
+ export declare const paddingBlocks: Readonly<{
62
+ readonly none: Readonly<{
63
+ readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", 0>;
64
+ }>;
65
+ readonly xxs: Readonly<{
66
+ readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
67
+ }>;
68
+ readonly xs: Readonly<{
69
+ readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
70
+ }>;
71
+ readonly sm: Readonly<{
72
+ readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
73
+ }>;
74
+ readonly md: Readonly<{
75
+ readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
76
+ }>;
77
+ readonly lg: Readonly<{
78
+ readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
79
+ }>;
80
+ readonly xl: Readonly<{
81
+ readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
82
+ }>;
83
+ readonly xxl: Readonly<{
84
+ readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
85
+ }>;
86
+ readonly xxxl: Readonly<{
87
+ readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
88
+ }>;
89
+ }>;
90
+ export declare const paddingInlines: Readonly<{
91
+ readonly none: Readonly<{
92
+ readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", 0>;
93
+ }>;
94
+ readonly xxs: Readonly<{
95
+ readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
96
+ }>;
97
+ readonly xs: Readonly<{
98
+ readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
99
+ }>;
100
+ readonly sm: Readonly<{
101
+ readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
102
+ }>;
103
+ readonly md: Readonly<{
104
+ readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
105
+ }>;
106
+ readonly lg: Readonly<{
107
+ readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
108
+ }>;
109
+ readonly xl: Readonly<{
110
+ readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
111
+ }>;
112
+ readonly xxl: Readonly<{
113
+ readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
114
+ }>;
115
+ readonly xxxl: Readonly<{
116
+ readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
117
+ }>;
118
+ }>;
@@ -0,0 +1,46 @@
1
+ import * as stylex from '@stylexjs/stylex';
2
+ import { space } from "../theme/tokens.stylex.js";
3
+ export const gaps = stylex.create({
4
+ none: { gap: 0 },
5
+ xxs: { gap: space.xxs },
6
+ xs: { gap: space.xs },
7
+ sm: { gap: space.sm },
8
+ md: { gap: space.md },
9
+ lg: { gap: space.lg },
10
+ xl: { gap: space.xl },
11
+ xxl: { gap: space.xxl },
12
+ xxxl: { gap: space.xxxl }
13
+ });
14
+ export const paddings = stylex.create({
15
+ none: { padding: 0 },
16
+ xxs: { padding: space.xxs },
17
+ xs: { padding: space.xs },
18
+ sm: { padding: space.sm },
19
+ md: { padding: space.md },
20
+ lg: { padding: space.lg },
21
+ xl: { padding: space.xl },
22
+ xxl: { padding: space.xxl },
23
+ xxxl: { padding: space.xxxl }
24
+ });
25
+ export const paddingBlocks = stylex.create({
26
+ none: { paddingBlock: 0 },
27
+ xxs: { paddingBlock: space.xxs },
28
+ xs: { paddingBlock: space.xs },
29
+ sm: { paddingBlock: space.sm },
30
+ md: { paddingBlock: space.md },
31
+ lg: { paddingBlock: space.lg },
32
+ xl: { paddingBlock: space.xl },
33
+ xxl: { paddingBlock: space.xxl },
34
+ xxxl: { paddingBlock: space.xxxl }
35
+ });
36
+ export const paddingInlines = stylex.create({
37
+ none: { paddingInline: 0 },
38
+ xxs: { paddingInline: space.xxs },
39
+ xs: { paddingInline: space.xs },
40
+ sm: { paddingInline: space.sm },
41
+ md: { paddingInline: space.md },
42
+ lg: { paddingInline: space.lg },
43
+ xl: { paddingInline: space.xl },
44
+ xxl: { paddingInline: space.xxl },
45
+ xxxl: { paddingInline: space.xxxl }
46
+ });
@@ -0,0 +1,28 @@
1
+ import * as stylex from '@stylexjs/stylex';
2
+ export type Tone = 'inherit' | 'primary' | 'secondary' | 'tertiary' | 'brand' | 'danger' | 'positive' | 'warning';
3
+ export declare const tones: Readonly<{
4
+ readonly inherit: Readonly<{
5
+ readonly color: stylex.StyleXClassNameFor<"color", "inherit">;
6
+ }>;
7
+ readonly primary: Readonly<{
8
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
9
+ }>;
10
+ readonly secondary: Readonly<{
11
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
12
+ }>;
13
+ readonly tertiary: Readonly<{
14
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
15
+ }>;
16
+ readonly brand: Readonly<{
17
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
18
+ }>;
19
+ readonly danger: Readonly<{
20
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
21
+ }>;
22
+ readonly positive: Readonly<{
23
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
24
+ }>;
25
+ readonly warning: Readonly<{
26
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
27
+ }>;
28
+ }>;
@@ -0,0 +1,12 @@
1
+ import * as stylex from '@stylexjs/stylex';
2
+ import { colors } from "../theme/tokens.stylex.js";
3
+ export const tones = stylex.create({
4
+ inherit: { color: 'inherit' },
5
+ primary: { color: colors.primaryForeground },
6
+ secondary: { color: colors.secondaryForeground },
7
+ tertiary: { color: colors.tertiaryForeground },
8
+ brand: { color: colors.brandForeground },
9
+ danger: { color: colors.dangerForeground },
10
+ positive: { color: colors.positiveForeground },
11
+ warning: { color: colors.warningForeground }
12
+ });
@@ -0,0 +1,46 @@
1
+ import type { WriteOutcome } from './access.ts';
2
+ import type { Cached } from './cache.ts';
3
+ import { StoreBase } from './store.ts';
4
+ import type { Writes } from './table.ts';
5
+ export type Entity = {
6
+ id: string;
7
+ };
8
+ export type EntityApi<T extends Entity> = {
9
+ list: () => Promise<readonly T[]>;
10
+ create: (entity: T) => Promise<T>;
11
+ update: (entity: T) => Promise<T>;
12
+ remove: (id: string) => Promise<void>;
13
+ };
14
+ export type EntityCall = keyof EntityApi<Entity>;
15
+ export declare const entityCalls: readonly EntityCall[];
16
+ export type PendingWrite<T extends Entity> = {
17
+ kind: 'create' | 'update';
18
+ id: string;
19
+ row: T;
20
+ } | {
21
+ kind: 'remove';
22
+ id: string;
23
+ };
24
+ export type EntitySnapshot<T extends Entity> = {
25
+ status: 'idle' | 'loading' | 'ready' | 'failed';
26
+ items: readonly T[];
27
+ pending: readonly PendingWrite<T>[];
28
+ };
29
+ export type EntityDeps<T extends Entity> = {
30
+ api: EntityApi<T>;
31
+ cache: Cached<readonly T[]>;
32
+ writes: Writes;
33
+ };
34
+ export declare class WriteRefused extends Error {
35
+ readonly outcome: Exclude<WriteOutcome, 'saved' | 'failed'>;
36
+ constructor(outcome: Exclude<WriteOutcome, 'saved' | 'failed'>);
37
+ }
38
+ export declare class EntityStore<T extends Entity> extends StoreBase<EntitySnapshot<T>, EntityDeps<T>> {
39
+ #private;
40
+ protected initialState(): EntitySnapshot<T>;
41
+ load(): Promise<void>;
42
+ create(row: T): Promise<WriteOutcome>;
43
+ update(row: T): Promise<WriteOutcome>;
44
+ remove(id: string): Promise<WriteOutcome>;
45
+ forget(): void;
46
+ }
@@ -0,0 +1,160 @@
1
+ import { StoreBase } from "./store.js";
2
+ export const entityCalls = [
3
+ 'list',
4
+ 'create',
5
+ 'update',
6
+ 'remove'
7
+ ];
8
+ export class WriteRefused extends Error {
9
+ outcome;
10
+ constructor(outcome) {
11
+ super(`The server refused the write: ${outcome}`);
12
+ this.outcome = outcome;
13
+ }
14
+ }
15
+ function apply(items, write) {
16
+ if (write.kind === 'remove') {
17
+ return items.filter((item) => item.id !== write.id);
18
+ }
19
+ const { row } = write;
20
+ return items.some((item) => item.id === row.id)
21
+ ? items.map((item) => (item.id === row.id ? row : item))
22
+ : [...items, row];
23
+ }
24
+ function outcomeOf(failure) {
25
+ return failure instanceof WriteRefused ? failure.outcome : 'failed';
26
+ }
27
+ function isSameJson(a, b) {
28
+ if (Object.is(a, b))
29
+ return true;
30
+ if (typeof a !== 'object' || typeof b !== 'object' || !a || !b)
31
+ return false;
32
+ if (Array.isArray(a) !== Array.isArray(b))
33
+ return false;
34
+ const aKeys = Object.keys(a);
35
+ const bKeys = Object.keys(b);
36
+ return (aKeys.length === bKeys.length &&
37
+ aKeys.every((key) => isSameJson(Reflect.get(a, key), Reflect.get(b, key))));
38
+ }
39
+ function sameElements(a, b) {
40
+ return a.length === b.length && a.every((item, index) => item === b[index]);
41
+ }
42
+ function share(previous, next) {
43
+ const before = new Map(previous.map((item) => [item.id, item]));
44
+ const shared = next.map((item) => {
45
+ const kept = before.get(item.id);
46
+ return kept !== undefined && isSameJson(kept, item) ? kept : item;
47
+ });
48
+ return sameElements(previous, shared) ? previous : shared;
49
+ }
50
+ export class EntityStore extends StoreBase {
51
+ #server = this.state.items;
52
+ #queue = [];
53
+ #completedWrites = 0;
54
+ #generation = 0;
55
+ #loading;
56
+ initialState() {
57
+ const cached = this.deps.cache.read();
58
+ return {
59
+ status: cached === undefined ? 'idle' : 'ready',
60
+ items: cached ?? [],
61
+ pending: []
62
+ };
63
+ }
64
+ load() {
65
+ this.#loading ??= this.#fetch().finally(() => {
66
+ this.#loading = undefined;
67
+ });
68
+ return this.#loading;
69
+ }
70
+ create(row) {
71
+ return this.#write({ kind: 'create', id: row.id, row }, async () => ({
72
+ kind: 'create',
73
+ id: row.id,
74
+ row: await this.deps.api.create(row)
75
+ }));
76
+ }
77
+ update(row) {
78
+ return this.#write({ kind: 'update', id: row.id, row }, async () => ({
79
+ kind: 'update',
80
+ id: row.id,
81
+ row: await this.deps.api.update(row)
82
+ }));
83
+ }
84
+ remove(id) {
85
+ return this.#write({ kind: 'remove', id }, async () => {
86
+ await this.deps.api.remove(id);
87
+ return { kind: 'remove', id };
88
+ });
89
+ }
90
+ forget() {
91
+ this.#generation += 1;
92
+ this.#server = [];
93
+ this.#queue = [];
94
+ this.#loading = undefined;
95
+ this.set({ status: 'idle', items: [], pending: [] });
96
+ }
97
+ async #fetch() {
98
+ if (this.state.status !== 'ready')
99
+ this.set({ status: 'loading' });
100
+ const writesBefore = this.#completedWrites;
101
+ const generation = this.#generation;
102
+ try {
103
+ const items = await this.deps.api.list();
104
+ if (generation !== this.#generation)
105
+ return;
106
+ if (writesBefore !== this.#completedWrites)
107
+ return this.#fetch();
108
+ this.#server = items;
109
+ this.deps.cache.write(items);
110
+ this.#publish({ status: 'ready' });
111
+ }
112
+ catch {
113
+ if (generation !== this.#generation)
114
+ return;
115
+ if (this.state.status === 'loading')
116
+ this.set({ status: 'failed' });
117
+ }
118
+ }
119
+ async #write(write, send) {
120
+ const generation = this.#generation;
121
+ this.#queue = [...this.#queue, write];
122
+ this.#publish();
123
+ try {
124
+ const confirmed = await send();
125
+ if (generation !== this.#generation)
126
+ return 'failed';
127
+ this.#saved(confirmed);
128
+ return 'saved';
129
+ }
130
+ catch (failure) {
131
+ const outcome = outcomeOf(failure);
132
+ if (outcome === 'missing' && generation === this.#generation) {
133
+ this.#saved({ kind: 'remove', id: write.id });
134
+ }
135
+ return outcome;
136
+ }
137
+ finally {
138
+ if (generation === this.#generation) {
139
+ this.#queue = this.#queue.filter((queued) => queued !== write);
140
+ this.#publish();
141
+ }
142
+ }
143
+ }
144
+ #saved(write) {
145
+ this.#server = apply(this.#server, write);
146
+ this.#completedWrites += 1;
147
+ this.deps.cache.write(this.#server);
148
+ }
149
+ #publish(patch = {}) {
150
+ const { items, pending } = this.state;
151
+ const shown = this.deps.writes === 'optimistic'
152
+ ? this.#queue.reduce(apply, this.#server)
153
+ : this.#server;
154
+ this.set({
155
+ ...patch,
156
+ items: share(items, shown),
157
+ pending: sameElements(pending, this.#queue) ? pending : this.#queue
158
+ });
159
+ }
160
+ }
@@ -0,0 +1,9 @@
1
+ import type { AppClass, RunningApp } from '../app.ts';
2
+ import type { Tables } from '../table.ts';
3
+ type AnyApp = RunningApp<unknown, {
4
+ readonly path: string;
5
+ }>;
6
+ export declare function accessFlows<Group extends Tables>({ App }: {
7
+ App: AppClass<Group, AnyApp>;
8
+ }): void;
9
+ export {};