@trypattern/sdk 0.0.0-stage → 0.1.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 (247) 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 +20 -0
  7. package/dist/api.js +34 -0
  8. package/dist/app.d.ts +106 -0
  9. package/dist/app.js +224 -0
  10. package/dist/appearance.d.ts +7 -0
  11. package/dist/appearance.js +2 -0
  12. package/dist/auth/sessionApi.d.ts +41 -0
  13. package/dist/auth/sessionApi.js +158 -0
  14. package/dist/auth/sessionStore.d.ts +20 -0
  15. package/dist/auth/sessionStore.js +40 -0
  16. package/dist/auth/user.d.ts +11 -0
  17. package/dist/auth/user.js +9 -0
  18. package/dist/builtins/Account.d.ts +25 -0
  19. package/dist/builtins/Account.js +15 -0
  20. package/dist/builtins/Palette.d.ts +29 -0
  21. package/dist/builtins/Palette.js +63 -0
  22. package/dist/builtins/SignIn.d.ts +28 -0
  23. package/dist/builtins/SignIn.js +60 -0
  24. package/dist/builtins/Toasts.d.ts +32 -0
  25. package/dist/builtins/Toasts.js +24 -0
  26. package/dist/builtins/actions.d.ts +2 -0
  27. package/dist/builtins/actions.js +45 -0
  28. package/dist/cache.d.ts +24 -0
  29. package/dist/cache.js +112 -0
  30. package/dist/cli/app.d.ts +2 -0
  31. package/dist/cli/app.js +1329 -0
  32. package/dist/cli/screenshot.d.ts +1 -0
  33. package/dist/cli/screenshot.js +96 -0
  34. package/dist/cli/tools.d.ts +12 -0
  35. package/dist/cli/tools.js +35 -0
  36. package/dist/components/AppFrame.d.ts +14 -0
  37. package/dist/components/AppFrame.js +64 -0
  38. package/dist/components/AppearancePicker.d.ts +1 -0
  39. package/dist/components/AppearancePicker.js +12 -0
  40. package/dist/components/Avatar.d.ts +9 -0
  41. package/dist/components/Avatar.js +63 -0
  42. package/dist/components/Badge.d.ts +11 -0
  43. package/dist/components/Badge.js +87 -0
  44. package/dist/components/Button.d.ts +23 -0
  45. package/dist/components/Button.js +249 -0
  46. package/dist/components/Card.d.ts +12 -0
  47. package/dist/components/Card.js +38 -0
  48. package/dist/components/CommandMenu.d.ts +23 -0
  49. package/dist/components/CommandMenu.js +214 -0
  50. package/dist/components/CommandPalette.d.ts +1 -0
  51. package/dist/components/CommandPalette.js +7 -0
  52. package/dist/components/Content.d.ts +7 -0
  53. package/dist/components/Content.js +24 -0
  54. package/dist/components/ContextMenu.d.ts +8 -0
  55. package/dist/components/ContextMenu.js +23 -0
  56. package/dist/components/Dialog.d.ts +11 -0
  57. package/dist/components/Dialog.js +81 -0
  58. package/dist/components/Divider.d.ts +6 -0
  59. package/dist/components/Divider.js +15 -0
  60. package/dist/components/EmptyState.d.ts +8 -0
  61. package/dist/components/EmptyState.js +24 -0
  62. package/dist/components/Form.d.ts +9 -0
  63. package/dist/components/Form.js +23 -0
  64. package/dist/components/Icon.d.ts +10 -0
  65. package/dist/components/Icon.js +22 -0
  66. package/dist/components/IconButton.d.ts +14 -0
  67. package/dist/components/IconButton.js +53 -0
  68. package/dist/components/Kbd.d.ts +6 -0
  69. package/dist/components/Kbd.js +67 -0
  70. package/dist/components/Link.d.ts +9 -0
  71. package/dist/components/Link.js +35 -0
  72. package/dist/components/ListRow.d.ts +12 -0
  73. package/dist/components/ListRow.js +62 -0
  74. package/dist/components/LoadingRows.d.ts +5 -0
  75. package/dist/components/LoadingRows.js +6 -0
  76. package/dist/components/Menu.d.ts +12 -0
  77. package/dist/components/Menu.js +33 -0
  78. package/dist/components/MenuItems.d.ts +21 -0
  79. package/dist/components/MenuItems.js +32 -0
  80. package/dist/components/Placement.d.ts +21 -0
  81. package/dist/components/Placement.js +1 -0
  82. package/dist/components/Popup.d.ts +8 -0
  83. package/dist/components/Popup.js +43 -0
  84. package/dist/components/PopupItem.d.ts +8 -0
  85. package/dist/components/PopupItem.js +51 -0
  86. package/dist/components/PropertyRow.d.ts +7 -0
  87. package/dist/components/PropertyRow.js +23 -0
  88. package/dist/components/Row.d.ts +16 -0
  89. package/dist/components/Row.js +27 -0
  90. package/dist/components/Screen.d.ts +13 -0
  91. package/dist/components/Screen.js +56 -0
  92. package/dist/components/Scrim.d.ts +8 -0
  93. package/dist/components/Scrim.js +40 -0
  94. package/dist/components/ScrollArea.d.ts +15 -0
  95. package/dist/components/ScrollArea.js +13 -0
  96. package/dist/components/SegmentedControl.d.ts +17 -0
  97. package/dist/components/SegmentedControl.js +68 -0
  98. package/dist/components/Select.d.ts +17 -0
  99. package/dist/components/Select.js +107 -0
  100. package/dist/components/SettingsRow.d.ts +8 -0
  101. package/dist/components/SettingsRow.js +32 -0
  102. package/dist/components/Sidebar.d.ts +20 -0
  103. package/dist/components/Sidebar.js +138 -0
  104. package/dist/components/SignInScreen.d.ts +1 -0
  105. package/dist/components/SignInScreen.js +40 -0
  106. package/dist/components/Size.d.ts +1 -0
  107. package/dist/components/Size.js +1 -0
  108. package/dist/components/Skeleton.d.ts +8 -0
  109. package/dist/components/Skeleton.js +48 -0
  110. package/dist/components/Spinner.d.ts +6 -0
  111. package/dist/components/Spinner.js +54 -0
  112. package/dist/components/Stack.d.ts +14 -0
  113. package/dist/components/Stack.js +19 -0
  114. package/dist/components/Switch.d.ts +10 -0
  115. package/dist/components/Switch.js +71 -0
  116. package/dist/components/Text.d.ts +21 -0
  117. package/dist/components/Text.js +77 -0
  118. package/dist/components/TextField.d.ts +25 -0
  119. package/dist/components/TextField.js +68 -0
  120. package/dist/components/Toaster.d.ts +1 -0
  121. package/dist/components/Toaster.js +83 -0
  122. package/dist/components/Tooltip.d.ts +8 -0
  123. package/dist/components/Tooltip.js +43 -0
  124. package/dist/components/controlLook.d.ts +60 -0
  125. package/dist/components/controlLook.js +67 -0
  126. package/dist/components/frame.d.ts +4 -0
  127. package/dist/components/frame.js +2 -0
  128. package/dist/components/icons.d.ts +58 -0
  129. package/dist/components/icons.js +105 -0
  130. package/dist/components/interaction.d.ts +12 -0
  131. package/dist/components/interaction.js +22 -0
  132. package/dist/components/spacing.d.ts +118 -0
  133. package/dist/components/spacing.js +46 -0
  134. package/dist/components/tones.d.ts +28 -0
  135. package/dist/components/tones.js +12 -0
  136. package/dist/entityStore.d.ts +46 -0
  137. package/dist/entityStore.js +160 -0
  138. package/dist/flows/accessFlows.d.ts +9 -0
  139. package/dist/flows/accessFlows.js +151 -0
  140. package/dist/flows/browser.d.ts +32 -0
  141. package/dist/flows/browser.js +164 -0
  142. package/dist/flows/contactSheet.d.ts +1 -0
  143. package/dist/flows/contactSheet.js +63 -0
  144. package/dist/flows/flowBrowser.d.ts +23 -0
  145. package/dist/flows/flowBrowser.js +21 -0
  146. package/dist/flows/flowSetup.d.ts +3 -0
  147. package/dist/flows/flowSetup.js +35 -0
  148. package/dist/flows/flows.d.ts +41 -0
  149. package/dist/flows/flows.js +148 -0
  150. package/dist/flows/screenshotName.d.ts +1 -0
  151. package/dist/flows/screenshotName.js +6 -0
  152. package/dist/gate.d.ts +8 -0
  153. package/dist/gate.js +52 -0
  154. package/dist/hooks/appContext.d.ts +14 -0
  155. package/dist/hooks/appContext.js +5 -0
  156. package/dist/hooks/appHooks.d.ts +21 -0
  157. package/dist/hooks/appHooks.js +24 -0
  158. package/dist/hooks/useAnimatesOnChange.d.ts +1 -0
  159. package/dist/hooks/useAnimatesOnChange.js +14 -0
  160. package/dist/hooks/useStoreState.d.ts +6 -0
  161. package/dist/hooks/useStoreState.js +5 -0
  162. package/dist/index.d.ts +40 -0
  163. package/dist/index.js +19 -0
  164. package/dist/memoryApi.d.ts +19 -0
  165. package/dist/memoryApi.js +42 -0
  166. package/dist/model.d.ts +94 -0
  167. package/dist/model.js +243 -0
  168. package/dist/page.d.ts +11 -0
  169. package/dist/page.js +9 -0
  170. package/dist/platform.d.ts +1 -0
  171. package/dist/platform.js +5 -0
  172. package/dist/react.d.ts +46 -0
  173. package/dist/react.js +38 -0
  174. package/dist/registered.d.ts +54 -0
  175. package/dist/registered.js +17 -0
  176. package/dist/routes.d.ts +38 -0
  177. package/dist/routes.js +21 -0
  178. package/dist/rules/checkAllFiles.d.ts +1 -0
  179. package/dist/rules/checkAllFiles.js +741 -0
  180. package/dist/rules/checkApiRouting.d.ts +1 -0
  181. package/dist/rules/checkApiRouting.js +112 -0
  182. package/dist/rules/lintPlugin.d.ts +252 -0
  183. package/dist/rules/lintPlugin.js +1157 -0
  184. package/dist/rules/messages.d.ts +48 -0
  185. package/dist/rules/messages.js +48 -0
  186. package/dist/rules/themeTokens.d.ts +6 -0
  187. package/dist/rules/themeTokens.js +64 -0
  188. package/dist/schema.d.ts +2 -0
  189. package/dist/schema.js +1 -0
  190. package/dist/server/auth.d.ts +115 -0
  191. package/dist/server/auth.js +131 -0
  192. package/dist/server/authService.d.ts +9 -0
  193. package/dist/server/authService.js +50 -0
  194. package/dist/server/createServer.d.ts +357 -0
  195. package/dist/server/createServer.js +62 -0
  196. package/dist/server/env.d.ts +15 -0
  197. package/dist/server/env.js +1 -0
  198. package/dist/server/index.d.ts +8 -0
  199. package/dist/server/index.js +5 -0
  200. package/dist/server/session.d.ts +28 -0
  201. package/dist/server/session.js +54 -0
  202. package/dist/server/sessions.d.ts +92 -0
  203. package/dist/server/sessions.js +47 -0
  204. package/dist/server/signInWire.d.ts +52 -0
  205. package/dist/server/signInWire.js +22 -0
  206. package/dist/server/tables.d.ts +242 -0
  207. package/dist/server/tables.js +246 -0
  208. package/dist/server/users.d.ts +189 -0
  209. package/dist/server/users.js +49 -0
  210. package/dist/shortcuts.d.ts +3 -0
  211. package/dist/shortcuts.js +40 -0
  212. package/dist/start.d.ts +20 -0
  213. package/dist/start.js +121 -0
  214. package/dist/state.d.ts +14 -0
  215. package/dist/state.js +17 -0
  216. package/dist/store.d.ts +43 -0
  217. package/dist/store.js +198 -0
  218. package/dist/subscribers.d.ts +5 -0
  219. package/dist/subscribers.js +13 -0
  220. package/dist/table.d.ts +143 -0
  221. package/dist/table.js +91 -0
  222. package/dist/tables.d.ts +77 -0
  223. package/dist/tables.js +216 -0
  224. package/dist/theme/reset.css +84 -0
  225. package/dist/theme/scales.d.ts +76 -0
  226. package/dist/theme/scales.js +82 -0
  227. package/dist/theme/tokens.stylex.d.ts +218 -0
  228. package/dist/theme/tokens.stylex.js +233 -0
  229. package/dist/vite/commandBridge.d.ts +2 -0
  230. package/dist/vite/commandBridge.js +46 -0
  231. package/dist/vite/designManifest.d.ts +25 -0
  232. package/dist/vite/designManifest.js +191 -0
  233. package/dist/vite/localWorker.d.ts +4 -0
  234. package/dist/vite/localWorker.js +59 -0
  235. package/dist/vite/rootAlias.d.ts +2 -0
  236. package/dist/vite/rootAlias.js +15 -0
  237. package/dist/vite/vite.d.ts +7 -0
  238. package/dist/vite/vite.js +88 -0
  239. package/dist/wire.d.ts +7 -0
  240. package/dist/wire.js +1 -0
  241. package/package.json +99 -3
  242. package/presets/lintPlugin.js +7 -0
  243. package/presets/oxlint.json +167 -0
  244. package/presets/register.d.ts +19 -0
  245. package/presets/server.d.ts +2 -0
  246. package/presets/tsconfig.app.json +29 -0
  247. package/presets/tsconfig.server.json +27 -0
package/dist/wire.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import type { z } from 'zod';
2
+ type StaticTypeError<Message extends string> = Message;
3
+ type NotSameOnTheWire = StaticTypeError<'Command inputs and table columns must be the same on the wire and in code: no .transform(), .default() or .pipe()'>;
4
+ export type SameOnTheWire<S extends z.ZodRawShape> = {
5
+ [Key in keyof S]: [z.input<S[Key]>] extends [z.output<S[Key]>] ? [z.output<S[Key]>] extends [z.input<S[Key]>] ? S[Key] : NotSameOnTheWire : NotSameOnTheWire;
6
+ };
7
+ export {};
package/dist/wire.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,102 @@
1
1
  {
2
2
  "name": "@trypattern/sdk",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "files": [
6
+ "dist",
7
+ "presets"
8
+ ],
9
+ "bin": {
10
+ "app": "./dist/cli/app.js"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ },
17
+ "./react": {
18
+ "types": "./dist/react.d.ts",
19
+ "default": "./dist/react.js"
20
+ },
21
+ "./schema": {
22
+ "types": "./dist/schema.d.ts",
23
+ "default": "./dist/schema.js"
24
+ },
25
+ "./server": {
26
+ "types": "./dist/server/index.d.ts",
27
+ "default": "./dist/server/index.js"
28
+ },
29
+ "./flows": {
30
+ "types": "./dist/flows/flows.d.ts",
31
+ "default": "./dist/flows/flows.js"
32
+ },
33
+ "./vite": {
34
+ "types": "./dist/vite/vite.d.ts",
35
+ "default": "./dist/vite/vite.js"
36
+ },
37
+ "./lint": {
38
+ "types": "./dist/rules/lintPlugin.d.ts",
39
+ "default": "./dist/rules/lintPlugin.js"
40
+ },
41
+ "./tsconfig/app.json": "./presets/tsconfig.app.json",
42
+ "./tsconfig/server.json": "./presets/tsconfig.server.json",
43
+ "./tokens.stylex": {
44
+ "types": "./dist/theme/tokens.stylex.d.ts",
45
+ "default": "./dist/theme/tokens.stylex.js"
46
+ }
47
+ },
48
+ "publishConfig": {
49
+ "access": "public"
50
+ },
51
+ "dependencies": {
52
+ "@cloudflare/vite-plugin": "1.64.0",
53
+ "@cloudflare/workers-types": "5.20261015.1",
54
+ "@stylexjs/eslint-plugin": "0.19.1",
55
+ "@stylexjs/unplugin": "0.19.1",
56
+ "@types/node": "^24.19.2",
57
+ "@vitejs/plugin-react": "^6.1.2",
58
+ "drizzle-kit": "0.31.11",
59
+ "drizzle-orm": "0.45.4",
60
+ "hono": "4.13.13",
61
+ "oxc-transform-react": "0.152.0",
62
+ "oxlint": "^1.88.0",
63
+ "playwright-core": "1.63.0",
64
+ "prettier": "3.9.10",
65
+ "typescript": "~6.0.3",
66
+ "unplugin": "2.3.11",
67
+ "vite": "^8.3.4",
68
+ "vitest": "5.0.3",
69
+ "wrangler": "4.151.0",
70
+ "@base-ui/react": "1.8.0"
71
+ },
72
+ "peerDependencies": {
73
+ "react": "^19.3.0",
74
+ "react-router": "8.4.0",
75
+ "zod": "4.6.7",
76
+ "@stylexjs/stylex": "0.19.1",
77
+ "react-dom": "^19.3.0"
78
+ },
79
+ "devDependencies": {
80
+ "@types/react": "^19.3.0",
81
+ "react": "^19.3.0",
82
+ "react-router": "8.4.0",
83
+ "zod": "4.6.7",
84
+ "@stylexjs/stylex": "0.19.1",
85
+ "react-dom": "^19.3.0",
86
+ "@types/react-dom": "^19.3.0"
87
+ },
88
+ "prettier": {
89
+ "semi": false,
90
+ "singleQuote": true,
91
+ "trailingComma": "none"
92
+ },
93
+ "scripts": {
94
+ "check": "tsc -p . && oxlint -c oxlint.sdk.json src/components src/hooks src/theme && node tests/check-types.ts && vitest run --root tests/server && prettier --check src tests presets *.json",
95
+ "typecheck": "tsc -p .",
96
+ "test:types": "node tests/check-types.ts",
97
+ "test:server": "vitest run --root tests/server",
98
+ "format": "prettier --write src tests presets *.json",
99
+ "lint": "oxlint -c oxlint.sdk.json src/components src/hooks src/theme",
100
+ "build": "rm -rf dist && tsc -p tsconfig.build.json && cp src/theme/reset.css dist/theme/reset.css"
101
+ }
6
102
  }
@@ -0,0 +1,7 @@
1
+ import { existsSync } from 'node:fs'
2
+
3
+ const source = new URL('../src/rules/lintPlugin.ts', import.meta.url)
4
+ const built = new URL('../dist/rules/lintPlugin.js', import.meta.url)
5
+ const plugin = await import(existsSync(source) ? source.href : built.href)
6
+
7
+ export default plugin.default
@@ -0,0 +1,167 @@
1
+ {
2
+ "$schema": "../node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["react", "typescript", "oxc", "import"],
4
+ "rules": {
5
+ "react/rules-of-hooks": "error",
6
+ "react/only-export-components": [
7
+ "warn",
8
+ {
9
+ "allowConstantExport": true
10
+ }
11
+ ],
12
+ "typescript/no-explicit-any": "error",
13
+ "typescript/no-non-null-assertion": "error",
14
+ "typescript/ban-ts-comment": "error",
15
+ "stylex/valid-styles": "error",
16
+ "stylex/valid-shorthands": "error",
17
+ "stylex/no-unused": "error",
18
+ "stylex/no-legacy-contextual-styles": "error",
19
+ "stylex/enforce-extension": "error",
20
+ "stylex/no-conflicting-props": "error",
21
+ "stylex/sort-keys": [
22
+ "error",
23
+ {
24
+ "order": "recess"
25
+ }
26
+ ],
27
+ "react/forbid-dom-props": [
28
+ "error",
29
+ {
30
+ "forbid": [
31
+ {
32
+ "propName": "style",
33
+ "message": "Use StyleX: {...stylex.props(styles.x)}. Inline style={} is not allowed."
34
+ }
35
+ ]
36
+ }
37
+ ],
38
+ "no-restricted-imports": [
39
+ "error",
40
+ {
41
+ "patterns": [
42
+ {
43
+ "group": ["*.css", "!./index.css"],
44
+ "message": "Plain CSS is not allowed (only src/index.css, which loads the font). Use StyleX."
45
+ },
46
+ {
47
+ "group": ["@base-ui/react", "@base-ui/react/*"],
48
+ "message": "Base UI lives inside @trypattern/sdk and is not a dependency of this app. Use the component from @trypattern/sdk/react. If a Base UI part has no primitive yet, that is an SDK change."
49
+ }
50
+ ],
51
+ "paths": [
52
+ {
53
+ "name": "react",
54
+ "importNames": ["memo", "useMemo", "useCallback"],
55
+ "message": "Do not write memo, useMemo or useCallback: the React Compiler (on in Pattern's Vite setup) memoizes every component and hook for you, so hand-written memoization is noise. If a component re-renders too much, check the dev log (app status prints its path) for a React Compiler diagnostic and fix the code it names. For a value that must be created once and kept for the component lifetime, use useState(() => create())."
56
+ },
57
+ {
58
+ "name": "react-router-dom",
59
+ "message": "Import from 'react-router' (or 'react-router/dom' for RouterProvider). react-router-dom is a legacy re-export."
60
+ },
61
+ {
62
+ "name": "react-router",
63
+ "importNames": [
64
+ "useLoaderData",
65
+ "useActionData",
66
+ "useFetcher",
67
+ "useFetchers",
68
+ "useRouteLoaderData",
69
+ "useNavigation",
70
+ "useSubmit",
71
+ "Form",
72
+ "redirect",
73
+ "data"
74
+ ],
75
+ "message": "React Router is used in data mode without loaders or actions: models own the state, so router-managed data would compete with it. Load data in the model's onPageOpen() instead."
76
+ },
77
+ {
78
+ "name": "react-router",
79
+ "importNames": [
80
+ "createBrowserRouter",
81
+ "createHashRouter",
82
+ "createMemoryRouter",
83
+ "Routes",
84
+ "Route",
85
+ "BrowserRouter",
86
+ "HashRouter",
87
+ "MemoryRouter"
88
+ ],
89
+ "message": "Pattern creates the router from `routes` in src/routes.tsx (startApp in the browser, defineFlow in flows). Add a page there as a child of AppLayout."
90
+ },
91
+ {
92
+ "name": "react-router",
93
+ "importNames": ["Link", "NavLink"],
94
+ "message": "Links come from @trypattern/sdk/react: <Link to=\"/issues\"> for words that go somewhere, and <ListRow to=\"/issues/1\"> for a row that opens a page. The sidebar's links are drawn by <AppFrame navigation={...}>."
95
+ }
96
+ ]
97
+ }
98
+ ],
99
+ "pattern/no-comments": "error",
100
+ "pattern/no-pointer-cursor": "error",
101
+ "pattern/use-tokens": "error",
102
+ "pattern/no-interactive-transition": "error",
103
+ "pattern/hover-uses-highlight": "error",
104
+ "pattern/scroll-view-only": "error",
105
+ "pattern/selectable-only": "error",
106
+ "pattern/dark-mode-in-tokens": "error",
107
+ "pattern/use-breakpoints": "error",
108
+ "pattern/no-classname-strings": "error",
109
+ "pattern/typed-style-prop": "error",
110
+ "pattern/component-file-name": "error",
111
+ "pattern/component-first": "error",
112
+ "pattern/routes-under-app-layout": "error",
113
+ "pattern/use-link": "error",
114
+ "pattern/stores-in-app": "error",
115
+ "pattern/state-via-hooks": "error",
116
+ "pattern/classes-not-factories": "error",
117
+ "pattern/explicit-access": "error",
118
+ "pattern/dev-only-sign-in": "error",
119
+ "import/no-default-export": "error",
120
+ "import/extensions": [
121
+ "error",
122
+ "always",
123
+ {
124
+ "ignorePackages": true
125
+ }
126
+ ],
127
+ "react/no-multi-comp": "error",
128
+ "pattern/no-route-data-apis": "error",
129
+ "pattern/model-members": "error",
130
+ "pattern/use-model-where": "error",
131
+ "pattern/model-by-name": "error",
132
+ "pattern/pure-getters": "error",
133
+ "pattern/actions-where": "error",
134
+ "pattern/pure-actions": "error",
135
+ "pattern/use-primitives": "error",
136
+ "pattern/no-widget-roles": "error",
137
+ "pattern/no-click-on-static": "error",
138
+ "pattern/primitive-names": "error",
139
+ "pattern/use-space-tokens": [
140
+ "error",
141
+ {
142
+ "sizes": true
143
+ }
144
+ ],
145
+ "pattern/text-via-text": "error",
146
+ "pattern/compose-in-screens": "error",
147
+ "pattern/no-hover-in-app": "error"
148
+ },
149
+ "jsPlugins": [
150
+ {
151
+ "name": "stylex",
152
+ "specifier": "@stylexjs/eslint-plugin"
153
+ },
154
+ {
155
+ "name": "pattern",
156
+ "specifier": "./lintPlugin.js"
157
+ }
158
+ ],
159
+ "overrides": [
160
+ {
161
+ "files": ["**/vite.config.ts", "**/server/worker.ts"],
162
+ "rules": {
163
+ "import/no-default-export": "off"
164
+ }
165
+ }
166
+ ]
167
+ }
@@ -0,0 +1,19 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ import type { tables } from '@/schema.ts'
4
+ import type { actionGroups } from '@/src/actions/index.ts'
5
+ import type { models } from '@/src/models/index.ts'
6
+ import type { routes } from '@/src/routes.tsx'
7
+ import type { stores } from '@/src/stores/index.ts'
8
+ import type { icons } from '@/src/theme/icons.ts'
9
+
10
+ declare module '@trypattern/sdk' {
11
+ interface Register {
12
+ models: typeof models
13
+ actionGroups: typeof actionGroups
14
+ tables: typeof tables
15
+ stores: typeof stores
16
+ routes: typeof routes
17
+ icons: typeof icons
18
+ }
19
+ }
@@ -0,0 +1,2 @@
1
+ /// <reference types="@cloudflare/workers-types" />
2
+ /// <reference types="vite/client" />
@@ -0,0 +1,29 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2023",
4
+ "module": "esnext",
5
+ "skipLibCheck": true,
6
+ "moduleResolution": "bundler",
7
+ "allowImportingTsExtensions": true,
8
+ "verbatimModuleSyntax": true,
9
+ "moduleDetection": "force",
10
+ "noEmit": true,
11
+ "strict": true,
12
+ "noUncheckedIndexedAccess": true,
13
+ "exactOptionalPropertyTypes": true,
14
+ "noImplicitOverride": true,
15
+ "noImplicitReturns": true,
16
+ "noUnusedLocals": true,
17
+ "noUnusedParameters": true,
18
+ "erasableSyntaxOnly": true,
19
+ "noFallthroughCasesInSwitch": true,
20
+ "lib": ["ES2023", "DOM"],
21
+ "types": [],
22
+ "allowArbitraryExtensions": true,
23
+ "jsx": "react-jsx",
24
+ "paths": {
25
+ "@/*": ["${configDir}/*"]
26
+ }
27
+ },
28
+ "files": ["./register.d.ts"]
29
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2023",
4
+ "module": "esnext",
5
+ "skipLibCheck": true,
6
+ "moduleResolution": "bundler",
7
+ "allowImportingTsExtensions": true,
8
+ "verbatimModuleSyntax": true,
9
+ "moduleDetection": "force",
10
+ "noEmit": true,
11
+ "strict": true,
12
+ "noUncheckedIndexedAccess": true,
13
+ "exactOptionalPropertyTypes": true,
14
+ "noImplicitOverride": true,
15
+ "noImplicitReturns": true,
16
+ "noUnusedLocals": true,
17
+ "noUnusedParameters": true,
18
+ "erasableSyntaxOnly": true,
19
+ "noFallthroughCasesInSwitch": true,
20
+ "lib": ["ES2023"],
21
+ "types": [],
22
+ "paths": {
23
+ "@/*": ["${configDir}/../*"]
24
+ }
25
+ },
26
+ "files": ["./server.d.ts"]
27
+ }