@helloleo/plugins 0.1.20-beta.1 → 0.1.20

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 (132) hide show
  1. package/dist/index.js +9 -10
  2. package/package.json +1 -1
  3. package/src/tools/scaffold.ts +12 -20
  4. package/src/tools/setup-netsuite.ts +7 -4
  5. package/dist/templates/tanstack-start-2026-06-18/components.json +0 -22
  6. package/dist/templates/tanstack-start-2026-06-18/drizzle.config.ts +0 -20
  7. package/dist/templates/tanstack-start-2026-06-18/package.json +0 -103
  8. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/accordion.tsx +0 -51
  9. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/alert-dialog.tsx +0 -115
  10. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/alert.tsx +0 -49
  11. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/aspect-ratio.tsx +0 -5
  12. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/avatar.tsx +0 -47
  13. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/badge.tsx +0 -32
  14. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/breadcrumb.tsx +0 -101
  15. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/button.tsx +0 -49
  16. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/calendar.tsx +0 -177
  17. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/card.tsx +0 -55
  18. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/carousel.tsx +0 -240
  19. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/chart.tsx +0 -331
  20. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/checkbox.tsx +0 -26
  21. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/collapsible.tsx +0 -11
  22. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/command.tsx +0 -143
  23. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/context-menu.tsx +0 -187
  24. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/dialog.tsx +0 -104
  25. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/drawer.tsx +0 -98
  26. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/dropdown-menu.tsx +0 -188
  27. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/form.tsx +0 -171
  28. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/hover-card.tsx +0 -27
  29. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/input-otp.tsx +0 -69
  30. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/input.tsx +0 -22
  31. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/label.tsx +0 -21
  32. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/menubar.tsx +0 -229
  33. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/navigation-menu.tsx +0 -120
  34. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/pagination.tsx +0 -98
  35. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/popover.tsx +0 -31
  36. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/progress.tsx +0 -25
  37. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/radio-group.tsx +0 -36
  38. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/resizable.tsx +0 -37
  39. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/scroll-area.tsx +0 -44
  40. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/select.tsx +0 -152
  41. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/separator.tsx +0 -24
  42. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/sheet.tsx +0 -122
  43. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/sidebar.tsx +0 -744
  44. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/skeleton.tsx +0 -7
  45. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/slider.tsx +0 -23
  46. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/sonner.tsx +0 -23
  47. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/switch.tsx +0 -27
  48. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/table.tsx +0 -94
  49. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/tabs.tsx +0 -53
  50. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/textarea.tsx +0 -21
  51. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/toggle-group.tsx +0 -57
  52. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/toggle.tsx +0 -42
  53. package/dist/templates/tanstack-start-2026-06-18/src/components/ui/tooltip.tsx +0 -32
  54. package/dist/templates/tanstack-start-2026-06-18/src/db/index.ts +0 -9
  55. package/dist/templates/tanstack-start-2026-06-18/src/db/schema.ts +0 -18
  56. package/dist/templates/tanstack-start-2026-06-18/src/global.d.ts +0 -3
  57. package/dist/templates/tanstack-start-2026-06-18/src/hooks/use-mobile.tsx +0 -19
  58. package/dist/templates/tanstack-start-2026-06-18/src/lib/proxy.ts +0 -83
  59. package/dist/templates/tanstack-start-2026-06-18/src/lib/utils.ts +0 -6
  60. package/dist/templates/tanstack-start-2026-06-18/src/routeTree.gen.ts +0 -59
  61. package/dist/templates/tanstack-start-2026-06-18/src/router.tsx +0 -33
  62. package/dist/templates/tanstack-start-2026-06-18/src/routes/__root.tsx +0 -59
  63. package/dist/templates/tanstack-start-2026-06-18/src/routes/index.tsx +0 -33
  64. package/dist/templates/tanstack-start-2026-06-18/src/server.ts +0 -31
  65. package/dist/templates/tanstack-start-2026-06-18/src/styles.css +0 -214
  66. package/dist/templates/tanstack-start-2026-06-18/tsconfig.json +0 -27
  67. package/dist/templates/tanstack-start-2026-06-18/vite.config.ts +0 -17
  68. package/dist/templates/tanstack-start-2026-06-18/wrangler.jsonc +0 -27
  69. package/src/templates/tanstack-start-2026-06-18/components.json +0 -22
  70. package/src/templates/tanstack-start-2026-06-18/drizzle.config.ts +0 -20
  71. package/src/templates/tanstack-start-2026-06-18/package.json +0 -103
  72. package/src/templates/tanstack-start-2026-06-18/src/components/ui/accordion.tsx +0 -51
  73. package/src/templates/tanstack-start-2026-06-18/src/components/ui/alert-dialog.tsx +0 -115
  74. package/src/templates/tanstack-start-2026-06-18/src/components/ui/alert.tsx +0 -49
  75. package/src/templates/tanstack-start-2026-06-18/src/components/ui/aspect-ratio.tsx +0 -5
  76. package/src/templates/tanstack-start-2026-06-18/src/components/ui/avatar.tsx +0 -47
  77. package/src/templates/tanstack-start-2026-06-18/src/components/ui/badge.tsx +0 -32
  78. package/src/templates/tanstack-start-2026-06-18/src/components/ui/breadcrumb.tsx +0 -101
  79. package/src/templates/tanstack-start-2026-06-18/src/components/ui/button.tsx +0 -49
  80. package/src/templates/tanstack-start-2026-06-18/src/components/ui/calendar.tsx +0 -177
  81. package/src/templates/tanstack-start-2026-06-18/src/components/ui/card.tsx +0 -55
  82. package/src/templates/tanstack-start-2026-06-18/src/components/ui/carousel.tsx +0 -240
  83. package/src/templates/tanstack-start-2026-06-18/src/components/ui/chart.tsx +0 -331
  84. package/src/templates/tanstack-start-2026-06-18/src/components/ui/checkbox.tsx +0 -26
  85. package/src/templates/tanstack-start-2026-06-18/src/components/ui/collapsible.tsx +0 -11
  86. package/src/templates/tanstack-start-2026-06-18/src/components/ui/command.tsx +0 -143
  87. package/src/templates/tanstack-start-2026-06-18/src/components/ui/context-menu.tsx +0 -187
  88. package/src/templates/tanstack-start-2026-06-18/src/components/ui/dialog.tsx +0 -104
  89. package/src/templates/tanstack-start-2026-06-18/src/components/ui/drawer.tsx +0 -98
  90. package/src/templates/tanstack-start-2026-06-18/src/components/ui/dropdown-menu.tsx +0 -188
  91. package/src/templates/tanstack-start-2026-06-18/src/components/ui/form.tsx +0 -171
  92. package/src/templates/tanstack-start-2026-06-18/src/components/ui/hover-card.tsx +0 -27
  93. package/src/templates/tanstack-start-2026-06-18/src/components/ui/input-otp.tsx +0 -69
  94. package/src/templates/tanstack-start-2026-06-18/src/components/ui/input.tsx +0 -22
  95. package/src/templates/tanstack-start-2026-06-18/src/components/ui/label.tsx +0 -21
  96. package/src/templates/tanstack-start-2026-06-18/src/components/ui/menubar.tsx +0 -229
  97. package/src/templates/tanstack-start-2026-06-18/src/components/ui/navigation-menu.tsx +0 -120
  98. package/src/templates/tanstack-start-2026-06-18/src/components/ui/pagination.tsx +0 -98
  99. package/src/templates/tanstack-start-2026-06-18/src/components/ui/popover.tsx +0 -31
  100. package/src/templates/tanstack-start-2026-06-18/src/components/ui/progress.tsx +0 -25
  101. package/src/templates/tanstack-start-2026-06-18/src/components/ui/radio-group.tsx +0 -36
  102. package/src/templates/tanstack-start-2026-06-18/src/components/ui/resizable.tsx +0 -37
  103. package/src/templates/tanstack-start-2026-06-18/src/components/ui/scroll-area.tsx +0 -44
  104. package/src/templates/tanstack-start-2026-06-18/src/components/ui/select.tsx +0 -152
  105. package/src/templates/tanstack-start-2026-06-18/src/components/ui/separator.tsx +0 -24
  106. package/src/templates/tanstack-start-2026-06-18/src/components/ui/sheet.tsx +0 -122
  107. package/src/templates/tanstack-start-2026-06-18/src/components/ui/sidebar.tsx +0 -744
  108. package/src/templates/tanstack-start-2026-06-18/src/components/ui/skeleton.tsx +0 -7
  109. package/src/templates/tanstack-start-2026-06-18/src/components/ui/slider.tsx +0 -23
  110. package/src/templates/tanstack-start-2026-06-18/src/components/ui/sonner.tsx +0 -23
  111. package/src/templates/tanstack-start-2026-06-18/src/components/ui/switch.tsx +0 -27
  112. package/src/templates/tanstack-start-2026-06-18/src/components/ui/table.tsx +0 -94
  113. package/src/templates/tanstack-start-2026-06-18/src/components/ui/tabs.tsx +0 -53
  114. package/src/templates/tanstack-start-2026-06-18/src/components/ui/textarea.tsx +0 -21
  115. package/src/templates/tanstack-start-2026-06-18/src/components/ui/toggle-group.tsx +0 -57
  116. package/src/templates/tanstack-start-2026-06-18/src/components/ui/toggle.tsx +0 -42
  117. package/src/templates/tanstack-start-2026-06-18/src/components/ui/tooltip.tsx +0 -32
  118. package/src/templates/tanstack-start-2026-06-18/src/db/index.ts +0 -9
  119. package/src/templates/tanstack-start-2026-06-18/src/db/schema.ts +0 -18
  120. package/src/templates/tanstack-start-2026-06-18/src/global.d.ts +0 -3
  121. package/src/templates/tanstack-start-2026-06-18/src/hooks/use-mobile.tsx +0 -19
  122. package/src/templates/tanstack-start-2026-06-18/src/lib/proxy.ts +0 -83
  123. package/src/templates/tanstack-start-2026-06-18/src/lib/utils.ts +0 -6
  124. package/src/templates/tanstack-start-2026-06-18/src/routeTree.gen.ts +0 -59
  125. package/src/templates/tanstack-start-2026-06-18/src/router.tsx +0 -33
  126. package/src/templates/tanstack-start-2026-06-18/src/routes/__root.tsx +0 -59
  127. package/src/templates/tanstack-start-2026-06-18/src/routes/index.tsx +0 -33
  128. package/src/templates/tanstack-start-2026-06-18/src/server.ts +0 -31
  129. package/src/templates/tanstack-start-2026-06-18/src/styles.css +0 -214
  130. package/src/templates/tanstack-start-2026-06-18/tsconfig.json +0 -27
  131. package/src/templates/tanstack-start-2026-06-18/vite.config.ts +0 -17
  132. package/src/templates/tanstack-start-2026-06-18/wrangler.jsonc +0 -27
package/dist/index.js CHANGED
@@ -12566,7 +12566,7 @@ async function renderTemplate(templateId, vars, destDir) {
12566
12566
  }
12567
12567
 
12568
12568
  // src/tools/scaffold.ts
12569
- var SCAFFOLD_VERSION = "tanstack-start-2026-06-18";
12569
+ var SCAFFOLD_VERSION = "tanstack-router-2026-06-15";
12570
12570
  function projectUuidFromDir(dir) {
12571
12571
  return path3.basename(dir);
12572
12572
  }
@@ -12579,7 +12579,7 @@ async function writeBaseScaffold(opts, dir) {
12579
12579
  return [...created, leoPath];
12580
12580
  }
12581
12581
  var scaffold = tool({
12582
- description: "Scaffold a new React 19 + Vite + Tailwind CSS v4 + TanStack Start project " + "with shadcn/ui baked in, wired to @helloleo/runtime for Cloudflare " + "bindings (D1 + KV + R2). Renders the full template: TanStack file-based " + "routing + SSR (src/routes/, src/router.tsx), the Cloudflare Worker entry " + "(src/server.ts) + wrangler.jsonc (DB/KV/BUCKET bindings), a Drizzle DB " + "layer (src/db/schema.ts as the single source of truth, src/db/index.ts " + "typed client, drizzle.config.ts), the complete shadcn/ui component set " + "under src/components/ui, src/lib/utils.ts (cn helper), src/lib/proxy.ts " + "(HelloLeo integration proxy), src/styles.css (shadcn design tokens, " + "light+dark), plus package.json, vite.config.ts, tsconfig.json, " + "components.json, .gitignore and the generated src/routeTree.gen.ts. Call " + "this FIRST for any new project before adding routes and pages. For " + "NetSuite projects (NetSuite MCP in the live list), call `setup_netsuite` " + "INSTEAD -- it bundles base scaffold + OAuth wiring in one call. Do not " + "call both.",
12582
+ description: "Scaffold a new React 19 + Vite + Tailwind CSS v4 + TanStack Router project " + "with shadcn/ui baked in. Renders the full template: TanStack file-based " + "routing (src/routes/), the complete shadcn/ui component set under " + "src/components/ui, src/lib/utils.ts (cn helper), src/lib/proxy.ts " + "(HelloLeo integration proxy), src/styles.css (shadcn design tokens, " + "light+dark), plus package.json, vite.config.ts, tsconfig.json, " + "tsr.config.json, components.json, .gitignore and the generated " + "src/routeTree.gen.ts. Call this FIRST for any new project before adding " + "routes and pages. For NetSuite projects (NetSuite MCP in the live list), " + "call `setup_netsuite` INSTEAD -- it bundles base scaffold + OAuth wiring " + "in one call. Do not call both.",
12583
12583
  args: {
12584
12584
  name: tool.schema.string().optional().describe("Project name for package.json (default: leo-project)")
12585
12585
  },
@@ -12594,10 +12594,6 @@ var scaffold = tool({
12594
12594
  "UI: shadcn/ui components are already in src/components/ui -- import and",
12595
12595
  " use them; do not attempt to re-add via the shadcn CLI.",
12596
12596
  "Design system: edit tokens in src/styles.css (light + dark blocks).",
12597
- "Database: edit src/db/schema.ts (the single source of truth) -- `bun run",
12598
- " db:push` syncs it to the dev DB; the `dev` script does this for you.",
12599
- " Query via `import { db } from '#/db'` inside loaders/server functions.",
12600
- " KV + R2: `import { kv, storage } from '@helloleo/runtime'`.",
12601
12597
  "Data fetching: React Query is wired (QueryClient on the router context +",
12602
12598
  " QueryClientProvider). ALWAYS fetch with @tanstack/react-query --",
12603
12599
  " useQuery / useMutation in components, or a route loader calling",
@@ -12687,17 +12683,20 @@ export function signInWithNetSuite(returnTo: string = window.location.href) {
12687
12683
  // refuses to render -- looks like "nothing happens" to the user. Navigate
12688
12684
  // the top frame instead so the OAuth flow runs at the top level and the
12689
12685
  // callback redirect lands on the same top frame, which then reads the
12690
- // #nssid= fragment. Fallback to same-frame navigation if the top window
12691
- // is cross-origin and can't be reassigned.
12686
+ // #nssid= fragment. Use \`location.href =\` (NOT \`location.assign()\`):
12687
+ // reading the \`.assign\` method off a cross-origin \`window.top.location\`
12688
+ // throws a SecurityError, which would drop us into the same-frame fallback
12689
+ // and load NetSuite inside the iframe (X-Frame-Options: DENY -> "refused to
12690
+ // connect"). Assigning \`.href\` is a navigation, allowed cross-origin.
12692
12691
  try {
12693
12692
  if (window.top && window.top !== window) {
12694
- window.top.location.assign(url.toString());
12693
+ window.top.location.href = url.toString();
12695
12694
  return;
12696
12695
  }
12697
12696
  } catch {
12698
12697
  /* top window not accessible \u2014 fall through to same-frame navigation */
12699
12698
  }
12700
- window.location.assign(url.toString());
12699
+ window.location.href = url.toString();
12701
12700
  }
12702
12701
 
12703
12702
  export interface NetSuiteSession {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helloleo/plugins",
3
- "version": "0.1.20-beta.1",
3
+ "version": "0.1.20",
4
4
  "description": "OpenCode plugins for HelloLeo",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -8,11 +8,11 @@ import { renderTemplate } from "../template-render.ts";
8
8
  * Identifier for the scaffold template a project was generated from. It is
9
9
  * also the directory name under src/templates/. Written to .leo/project.json
10
10
  * so the webapp / leo-core can tell which template (and therefore which
11
- * conventions: TanStack Start file routing + SSR, Tailwind v4, shadcn/ui) a
11
+ * conventions: TanStack Router file routing, Tailwind v4, shadcn/ui) a
12
12
  * workspace was bootstrapped with. Bump this (and add a new templates/<id>/
13
13
  * dir) when the scaffold's shape changes.
14
14
  */
15
- export const SCAFFOLD_VERSION = "tanstack-start-2026-06-18";
15
+ export const SCAFFOLD_VERSION = "tanstack-router-2026-06-15";
16
16
 
17
17
  /**
18
18
  * The project workspace directory is named after the project UUID -- the
@@ -30,7 +30,7 @@ export interface BaseScaffoldOptions {
30
30
  }
31
31
 
32
32
  /**
33
- * Write the base scaffold by rendering the TanStack Start template into dir,
33
+ * Write the base scaffold by rendering the TanStack Router template into dir,
34
34
  * then adding .leo/project.json (template metadata the tool owns, not part of
35
35
  * the template tree). Shared between `scaffold` (frontend-only) and
36
36
  * `setup_netsuite` (base + OAuth files). Returns the relative paths written.
@@ -59,21 +59,17 @@ export async function writeBaseScaffold(
59
59
 
60
60
  export const scaffold = tool({
61
61
  description:
62
- "Scaffold a new React 19 + Vite + Tailwind CSS v4 + TanStack Start project " +
63
- "with shadcn/ui baked in, wired to @helloleo/runtime for Cloudflare " +
64
- "bindings (D1 + KV + R2). Renders the full template: TanStack file-based " +
65
- "routing + SSR (src/routes/, src/router.tsx), the Cloudflare Worker entry " +
66
- "(src/server.ts) + wrangler.jsonc (DB/KV/BUCKET bindings), a Drizzle DB " +
67
- "layer (src/db/schema.ts as the single source of truth, src/db/index.ts " +
68
- "typed client, drizzle.config.ts), the complete shadcn/ui component set " +
69
- "under src/components/ui, src/lib/utils.ts (cn helper), src/lib/proxy.ts " +
62
+ "Scaffold a new React 19 + Vite + Tailwind CSS v4 + TanStack Router project " +
63
+ "with shadcn/ui baked in. Renders the full template: TanStack file-based " +
64
+ "routing (src/routes/), the complete shadcn/ui component set under " +
65
+ "src/components/ui, src/lib/utils.ts (cn helper), src/lib/proxy.ts " +
70
66
  "(HelloLeo integration proxy), src/styles.css (shadcn design tokens, " +
71
67
  "light+dark), plus package.json, vite.config.ts, tsconfig.json, " +
72
- "components.json, .gitignore and the generated src/routeTree.gen.ts. Call " +
73
- "this FIRST for any new project before adding routes and pages. For " +
74
- "NetSuite projects (NetSuite MCP in the live list), call `setup_netsuite` " +
75
- "INSTEAD -- it bundles base scaffold + OAuth wiring in one call. Do not " +
76
- "call both.",
68
+ "tsr.config.json, components.json, .gitignore and the generated " +
69
+ "src/routeTree.gen.ts. Call this FIRST for any new project before adding " +
70
+ "routes and pages. For NetSuite projects (NetSuite MCP in the live list), " +
71
+ "call `setup_netsuite` INSTEAD -- it bundles base scaffold + OAuth wiring " +
72
+ "in one call. Do not call both.",
77
73
  args: {
78
74
  name: tool.schema
79
75
  .string()
@@ -91,10 +87,6 @@ export const scaffold = tool({
91
87
  "UI: shadcn/ui components are already in src/components/ui -- import and",
92
88
  " use them; do not attempt to re-add via the shadcn CLI.",
93
89
  "Design system: edit tokens in src/styles.css (light + dark blocks).",
94
- "Database: edit src/db/schema.ts (the single source of truth) -- `bun run",
95
- " db:push` syncs it to the dev DB; the `dev` script does this for you.",
96
- " Query via `import { db } from '#/db'` inside loaders/server functions.",
97
- " KV + R2: `import { kv, storage } from '@helloleo/runtime'`.",
98
90
  "Data fetching: React Query is wired (QueryClient on the router context +",
99
91
  " QueryClientProvider). ALWAYS fetch with @tanstack/react-query --",
100
92
  " useQuery / useMutation in components, or a route loader calling",
@@ -86,17 +86,20 @@ export function signInWithNetSuite(returnTo: string = window.location.href) {
86
86
  // refuses to render -- looks like "nothing happens" to the user. Navigate
87
87
  // the top frame instead so the OAuth flow runs at the top level and the
88
88
  // callback redirect lands on the same top frame, which then reads the
89
- // #nssid= fragment. Fallback to same-frame navigation if the top window
90
- // is cross-origin and can't be reassigned.
89
+ // #nssid= fragment. Use \`location.href =\` (NOT \`location.assign()\`):
90
+ // reading the \`.assign\` method off a cross-origin \`window.top.location\`
91
+ // throws a SecurityError, which would drop us into the same-frame fallback
92
+ // and load NetSuite inside the iframe (X-Frame-Options: DENY -> "refused to
93
+ // connect"). Assigning \`.href\` is a navigation, allowed cross-origin.
91
94
  try {
92
95
  if (window.top && window.top !== window) {
93
- window.top.location.assign(url.toString());
96
+ window.top.location.href = url.toString();
94
97
  return;
95
98
  }
96
99
  } catch {
97
100
  /* top window not accessible — fall through to same-frame navigation */
98
101
  }
99
- window.location.assign(url.toString());
102
+ window.location.href = url.toString();
100
103
  }
101
104
 
102
105
  export interface NetSuiteSession {
@@ -1,22 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "new-york",
4
- "rsc": false,
5
- "tsx": true,
6
- "tailwind": {
7
- "css": "src/styles.css",
8
- "baseColor": "slate",
9
- "cssVariables": true,
10
- "prefix": ""
11
- },
12
- "iconLibrary": "lucide",
13
- "rtl": false,
14
- "aliases": {
15
- "components": "@/components",
16
- "utils": "@/lib/utils",
17
- "ui": "@/components/ui",
18
- "lib": "@/lib",
19
- "hooks": "@/hooks"
20
- },
21
- "registries": {}
22
- }
@@ -1,20 +0,0 @@
1
- import { defineConfig } from 'drizzle-kit'
2
-
3
- // src/db/schema.ts is the single source of truth for the D1 / libsql schema.
4
- //
5
- // DEV: `drizzle-kit push --force` (the `dev` script) syncs the schema straight
6
- // into the cf-shim's libsql file. The url MUST match the shim's DEV_DB_PATH
7
- // default (.dev.db) so push and the running app open the same file.
8
- //
9
- // PROD: migrations are generated with `drizzle-kit generate` and applied to D1
10
- // with `wrangler d1 migrations apply DB --remote` (reads migrations_dir in
11
- // wrangler.jsonc) — so no d1-http driver or Cloudflare API env vars are needed
12
- // here.
13
- const devDbPath = process.env.DEV_DB_PATH ?? '.dev.db'
14
-
15
- export default defineConfig({
16
- dialect: 'sqlite',
17
- schema: './src/db/schema.ts',
18
- out: './drizzle',
19
- dbCredentials: { url: `file:${devDbPath}` },
20
- })
@@ -1,103 +0,0 @@
1
- {
2
- "name": "{{LEO_NAME}}",
3
- "private": true,
4
- "type": "module",
5
- "imports": {
6
- "#/*": "./src/*"
7
- },
8
- "scripts": {
9
- "dev": "drizzle-kit push --force && vite dev",
10
- "build": "oxlint --fix && vite build",
11
- "preview": "vite preview",
12
- "deploy": "bun run db:generate && vite build && wrangler deploy && wrangler d1 migrations apply DB --remote",
13
- "db:generate": "drizzle-kit generate",
14
- "db:push": "drizzle-kit push --force",
15
- "db:migrate": "wrangler d1 migrations apply DB --remote",
16
- "typecheck": "tsc --noEmit",
17
- "lint": "oxlint --fix",
18
- "test": "vitest run"
19
- },
20
- "dependencies": {
21
- "@helloleo/runtime": "^0.1.1",
22
- "@hookform/resolvers": "^5.2.2",
23
- "@radix-ui/react-accordion": "^1.2.12",
24
- "@radix-ui/react-alert-dialog": "^1.1.15",
25
- "@radix-ui/react-aspect-ratio": "^1.1.8",
26
- "@radix-ui/react-avatar": "^1.1.11",
27
- "@radix-ui/react-checkbox": "^1.3.3",
28
- "@radix-ui/react-collapsible": "^1.1.12",
29
- "@radix-ui/react-context-menu": "^2.2.16",
30
- "@radix-ui/react-dialog": "^1.1.15",
31
- "@radix-ui/react-dropdown-menu": "^2.1.16",
32
- "@radix-ui/react-hover-card": "^1.1.15",
33
- "@radix-ui/react-label": "^2.1.8",
34
- "@radix-ui/react-menubar": "^1.1.16",
35
- "@radix-ui/react-navigation-menu": "^1.2.14",
36
- "@radix-ui/react-popover": "^1.1.15",
37
- "@radix-ui/react-progress": "^1.1.8",
38
- "@radix-ui/react-radio-group": "^1.3.8",
39
- "@radix-ui/react-scroll-area": "^1.2.10",
40
- "@radix-ui/react-select": "^2.2.6",
41
- "@radix-ui/react-separator": "^1.1.8",
42
- "@radix-ui/react-slider": "^1.3.6",
43
- "@radix-ui/react-slot": "^1.2.4",
44
- "@radix-ui/react-switch": "^1.2.6",
45
- "@radix-ui/react-tabs": "^1.1.13",
46
- "@radix-ui/react-toggle": "^1.1.10",
47
- "@radix-ui/react-toggle-group": "^1.1.11",
48
- "@radix-ui/react-tooltip": "^1.2.8",
49
- "@tailwindcss/vite": "^4.1.18",
50
- "@tanstack/react-query": "^5.90.0",
51
- "@tanstack/react-router": "latest",
52
- "@tanstack/react-router-with-query": "latest",
53
- "@tanstack/react-start": "latest",
54
- "class-variance-authority": "^0.7.1",
55
- "clsx": "^2.1.1",
56
- "cmdk": "^1.1.1",
57
- "date-fns": "^4.1.0",
58
- "drizzle-orm": "^0.45.2",
59
- "embla-carousel-react": "^8.6.0",
60
- "input-otp": "^1.4.2",
61
- "lucide-react": "^0.575.0",
62
- "react": "^19.2.0",
63
- "react-day-picker": "^9.14.0",
64
- "react-dom": "^19.2.0",
65
- "react-hook-form": "^7.71.2",
66
- "react-resizable-panels": "^4.6.5",
67
- "recharts": "^2.15.4",
68
- "sonner": "^2.0.7",
69
- "tailwind-merge": "^3.5.0",
70
- "tailwindcss": "^4.1.18",
71
- "tw-animate-css": "^1.3.4",
72
- "vaul": "^1.1.2",
73
- "zod": "^3.24.2"
74
- },
75
- "devDependencies": {
76
- "@cloudflare/vite-plugin": "^1.13.0",
77
- "@cloudflare/workers-types": "^4.20250906.0",
78
- "@helloleo/vite-config": "^0.1.2",
79
- "@libsql/client": "^0.14.0",
80
- "@tailwindcss/typography": "^0.5.16",
81
- "drizzle-kit": "^0.31.10",
82
- "@tanstack/router-plugin": "latest",
83
- "@testing-library/dom": "^10.4.1",
84
- "@testing-library/react": "^16.3.0",
85
- "@types/node": "^22.10.2",
86
- "@types/react": "^19.2.0",
87
- "@types/react-dom": "^19.2.0",
88
- "@vitejs/plugin-react": "^6.0.1",
89
- "jsdom": "^28.1.0",
90
- "oxlint": "^1.69.0",
91
- "typescript": "^6.0.2",
92
- "vite": "^8.0.0",
93
- "vite-tsconfig-paths": "^6.0.0",
94
- "vitest": "^4.1.5",
95
- "wrangler": "^4.70.0"
96
- },
97
- "pnpm": {
98
- "onlyBuiltDependencies": [
99
- "esbuild",
100
- "lightningcss"
101
- ]
102
- }
103
- }
@@ -1,51 +0,0 @@
1
- import * as React from "react";
2
- import * as AccordionPrimitive from "@radix-ui/react-accordion";
3
- import { ChevronDown } from "lucide-react";
4
-
5
- import { cn } from "@/lib/utils";
6
-
7
- const Accordion = AccordionPrimitive.Root;
8
-
9
- const AccordionItem = React.forwardRef<
10
- React.ElementRef<typeof AccordionPrimitive.Item>,
11
- React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
12
- >(({ className, ...props }, ref) => (
13
- <AccordionPrimitive.Item ref={ref} className={cn("border-b", className)} {...props} />
14
- ));
15
- AccordionItem.displayName = "AccordionItem";
16
-
17
- const AccordionTrigger = React.forwardRef<
18
- React.ElementRef<typeof AccordionPrimitive.Trigger>,
19
- React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
20
- >(({ className, children, ...props }, ref) => (
21
- <AccordionPrimitive.Header className="flex">
22
- <AccordionPrimitive.Trigger
23
- ref={ref}
24
- className={cn(
25
- "flex flex-1 items-center justify-between py-4 text-sm font-medium cursor-pointer transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",
26
- className,
27
- )}
28
- {...props}
29
- >
30
- {children}
31
- <ChevronDown className="h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" />
32
- </AccordionPrimitive.Trigger>
33
- </AccordionPrimitive.Header>
34
- ));
35
- AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
36
-
37
- const AccordionContent = React.forwardRef<
38
- React.ElementRef<typeof AccordionPrimitive.Content>,
39
- React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
40
- >(({ className, children, ...props }, ref) => (
41
- <AccordionPrimitive.Content
42
- ref={ref}
43
- className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
44
- {...props}
45
- >
46
- <div className={cn("pb-4 pt-0", className)}>{children}</div>
47
- </AccordionPrimitive.Content>
48
- ));
49
- AccordionContent.displayName = AccordionPrimitive.Content.displayName;
50
-
51
- export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -1,115 +0,0 @@
1
- import * as React from "react";
2
- import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
-
4
- import { cn } from "@/lib/utils";
5
- import { buttonVariants } from "@/components/ui/button";
6
-
7
- const AlertDialog = AlertDialogPrimitive.Root;
8
-
9
- const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
10
-
11
- const AlertDialogPortal = AlertDialogPrimitive.Portal;
12
-
13
- const AlertDialogOverlay = React.forwardRef<
14
- React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
15
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
16
- >(({ className, ...props }, ref) => (
17
- <AlertDialogPrimitive.Overlay
18
- className={cn(
19
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
20
- className,
21
- )}
22
- {...props}
23
- ref={ref}
24
- />
25
- ));
26
- AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
27
-
28
- const AlertDialogContent = React.forwardRef<
29
- React.ElementRef<typeof AlertDialogPrimitive.Content>,
30
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
31
- >(({ className, ...props }, ref) => (
32
- <AlertDialogPortal>
33
- <AlertDialogOverlay />
34
- <AlertDialogPrimitive.Content
35
- ref={ref}
36
- className={cn(
37
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",
38
- className,
39
- )}
40
- {...props}
41
- />
42
- </AlertDialogPortal>
43
- ));
44
- AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
45
-
46
- const AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
47
- <div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props} />
48
- );
49
- AlertDialogHeader.displayName = "AlertDialogHeader";
50
-
51
- const AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
52
- <div
53
- className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)}
54
- {...props}
55
- />
56
- );
57
- AlertDialogFooter.displayName = "AlertDialogFooter";
58
-
59
- const AlertDialogTitle = React.forwardRef<
60
- React.ElementRef<typeof AlertDialogPrimitive.Title>,
61
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
62
- >(({ className, ...props }, ref) => (
63
- <AlertDialogPrimitive.Title
64
- ref={ref}
65
- className={cn("text-lg font-semibold", className)}
66
- {...props}
67
- />
68
- ));
69
- AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
70
-
71
- const AlertDialogDescription = React.forwardRef<
72
- React.ElementRef<typeof AlertDialogPrimitive.Description>,
73
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
74
- >(({ className, ...props }, ref) => (
75
- <AlertDialogPrimitive.Description
76
- ref={ref}
77
- className={cn("text-sm text-muted-foreground", className)}
78
- {...props}
79
- />
80
- ));
81
- AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
82
-
83
- const AlertDialogAction = React.forwardRef<
84
- React.ElementRef<typeof AlertDialogPrimitive.Action>,
85
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
86
- >(({ className, ...props }, ref) => (
87
- <AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />
88
- ));
89
- AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
90
-
91
- const AlertDialogCancel = React.forwardRef<
92
- React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
93
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
94
- >(({ className, ...props }, ref) => (
95
- <AlertDialogPrimitive.Cancel
96
- ref={ref}
97
- className={cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className)}
98
- {...props}
99
- />
100
- ));
101
- AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
102
-
103
- export {
104
- AlertDialog,
105
- AlertDialogPortal,
106
- AlertDialogOverlay,
107
- AlertDialogTrigger,
108
- AlertDialogContent,
109
- AlertDialogHeader,
110
- AlertDialogFooter,
111
- AlertDialogTitle,
112
- AlertDialogDescription,
113
- AlertDialogAction,
114
- AlertDialogCancel,
115
- };
@@ -1,49 +0,0 @@
1
- import * as React from "react";
2
- import { cva, type VariantProps } from "class-variance-authority";
3
-
4
- import { cn } from "@/lib/utils";
5
-
6
- const alertVariants = cva(
7
- "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
8
- {
9
- variants: {
10
- variant: {
11
- default: "bg-background text-foreground",
12
- destructive:
13
- "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
14
- },
15
- },
16
- defaultVariants: {
17
- variant: "default",
18
- },
19
- },
20
- );
21
-
22
- const Alert = React.forwardRef<
23
- HTMLDivElement,
24
- React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
25
- >(({ className, variant, ...props }, ref) => (
26
- <div ref={ref} role="alert" className={cn(alertVariants({ variant }), className)} {...props} />
27
- ));
28
- Alert.displayName = "Alert";
29
-
30
- const AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
31
- ({ className, ...props }, ref) => (
32
- <h5
33
- ref={ref}
34
- className={cn("mb-1 font-medium leading-none tracking-tight", className)}
35
- {...props}
36
- />
37
- ),
38
- );
39
- AlertTitle.displayName = "AlertTitle";
40
-
41
- const AlertDescription = React.forwardRef<
42
- HTMLParagraphElement,
43
- React.HTMLAttributes<HTMLParagraphElement>
44
- >(({ className, ...props }, ref) => (
45
- <div ref={ref} className={cn("text-sm [&_p]:leading-relaxed", className)} {...props} />
46
- ));
47
- AlertDescription.displayName = "AlertDescription";
48
-
49
- export { Alert, AlertTitle, AlertDescription };
@@ -1,5 +0,0 @@
1
- import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
2
-
3
- const AspectRatio = AspectRatioPrimitive.Root;
4
-
5
- export { AspectRatio };
@@ -1,47 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as AvatarPrimitive from "@radix-ui/react-avatar";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- const Avatar = React.forwardRef<
9
- React.ElementRef<typeof AvatarPrimitive.Root>,
10
- React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
11
- >(({ className, ...props }, ref) => (
12
- <AvatarPrimitive.Root
13
- ref={ref}
14
- className={cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className)}
15
- {...props}
16
- />
17
- ));
18
- Avatar.displayName = AvatarPrimitive.Root.displayName;
19
-
20
- const AvatarImage = React.forwardRef<
21
- React.ElementRef<typeof AvatarPrimitive.Image>,
22
- React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
23
- >(({ className, ...props }, ref) => (
24
- <AvatarPrimitive.Image
25
- ref={ref}
26
- className={cn("aspect-square h-full w-full", className)}
27
- {...props}
28
- />
29
- ));
30
- AvatarImage.displayName = AvatarPrimitive.Image.displayName;
31
-
32
- const AvatarFallback = React.forwardRef<
33
- React.ElementRef<typeof AvatarPrimitive.Fallback>,
34
- React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
35
- >(({ className, ...props }, ref) => (
36
- <AvatarPrimitive.Fallback
37
- ref={ref}
38
- className={cn(
39
- "flex h-full w-full items-center justify-center rounded-full bg-muted",
40
- className,
41
- )}
42
- {...props}
43
- />
44
- ));
45
- AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
46
-
47
- export { Avatar, AvatarImage, AvatarFallback };
@@ -1,32 +0,0 @@
1
- import * as React from "react";
2
- import { cva, type VariantProps } from "class-variance-authority";
3
-
4
- import { cn } from "@/lib/utils";
5
-
6
- const badgeVariants = cva(
7
- "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
8
- {
9
- variants: {
10
- variant: {
11
- default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
12
- secondary:
13
- "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
14
- destructive:
15
- "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
16
- outline: "text-foreground",
17
- },
18
- },
19
- defaultVariants: {
20
- variant: "default",
21
- },
22
- },
23
- );
24
-
25
- export interface BadgeProps
26
- extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
27
-
28
- function Badge({ className, variant, ...props }: BadgeProps) {
29
- return <div className={cn(badgeVariants({ variant }), className)} {...props} />;
30
- }
31
-
32
- export { Badge, badgeVariants };