@notis_ai/cli 0.2.0-beta.160.1 → 0.2.0-beta.161.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.
@@ -5,28 +5,31 @@
5
5
  "private": true,
6
6
  "type": "module",
7
7
  "scripts": {
8
+ "type-check": "tsc --noEmit",
8
9
  "dev": "vite --configLoader runner",
9
10
  "build": "vite build --configLoader runner"
10
11
  },
11
12
  "dependencies": {
12
13
  "@notis/sdk": "file:./packages/sdk",
13
14
  "@phosphor-icons/react": "^2.1.10",
14
- "@radix-ui/react-slot": "^1.1.0",
15
+ "@radix-ui/react-slot": "^1.3.3",
15
16
  "class-variance-authority": "^0.7.0",
16
17
  "clsx": "^2.1.1",
17
- "react": "^19.0.0",
18
- "react-dom": "^19.0.0",
19
- "tailwind-merge": "^2.6.0",
18
+ "react": "^19.2.8",
19
+ "react-dom": "^19.2.8",
20
+ "tailwind-merge": "^3.6.0",
20
21
  "tailwindcss-animate": "^1.0.7"
21
22
  },
22
23
  "devDependencies": {
23
24
  "@types/node": "^22.0.0",
24
- "@types/react": "^19.0.0",
25
- "@types/react-dom": "^19.0.0",
26
- "@vitejs/plugin-react": "^4.0.0",
27
- "postcss": "^8.0.0",
28
- "tailwindcss": "^3.4.0",
29
- "typescript": "^5.0.0",
30
- "vite": "^6.0.0"
25
+ "@types/react": "^19.2.18",
26
+ "@types/react-dom": "^19.2.7",
27
+ "@vitejs/plugin-react": "^6.1.1",
28
+ "postcss": "^8.5.28",
29
+ "tailwindcss": "^4.3.3",
30
+ "@typescript/native": "npm:typescript@^7.0.2",
31
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
32
+ "vite": "^8.2.2",
33
+ "@tailwindcss/postcss": "^4.3.3"
31
34
  }
32
35
  }
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^20.0.0",
32
- "@types/react": "^19.0.0",
33
- "@types/react-dom": "^19.0.0",
34
- "typescript": "^5.0.0"
32
+ "@types/react": "^19.2.18",
33
+ "@types/react-dom": "^19.2.7",
34
+ "typescript": "^7.0.2"
35
35
  }
36
36
  }
@@ -8,13 +8,11 @@
8
8
  * The portal injects the live Notis theme variables at render time.
9
9
  */
10
10
 
11
- @tailwind base;
12
- @tailwind components;
13
- @tailwind utilities;
14
-
11
+ /* Framework-neutral styles: the app owns its Tailwind entry point. This file
12
+ * is also consumed in shadow roots and by apps on older Tailwind versions. */
15
13
  @layer base {
16
14
  * {
17
- @apply border-border;
15
+ border-color: hsl(var(--border));
18
16
  }
19
17
  [data-notis-app-root] {
20
18
  color: hsl(var(--foreground));
@@ -25,42 +23,78 @@
25
23
 
26
24
  @layer components {
27
25
  .notis-app-shell {
28
- @apply mx-auto w-full max-w-[var(--portal-page-max-width)] px-4 py-6 md:px-4 md:py-8;
26
+ margin-inline: auto;
27
+ width: 100%;
28
+ max-width: var(--portal-page-max-width);
29
+ padding: 1.5rem 1rem;
29
30
  }
30
31
 
31
- /* Flat panel. No border, no shadow: the design bar allows a single hairline
32
- * between sections and nothing around items. */
32
+ /* Flat panel: no border or shadow around items. */
33
33
  .notis-app-surface {
34
- @apply rounded-2xl bg-muted text-card-foreground;
34
+ border-radius: 1rem;
35
+ background-color: hsl(var(--muted));
36
+ color: hsl(var(--card-foreground));
35
37
  }
36
38
 
37
- /* List rows: hover and selection are carried by background tint only. Rows
38
- * read as tinted panels on mobile and as transparent rows on desktop. */
39
39
  .list-row {
40
- @apply rounded-xl bg-muted px-4 py-3 transition-colors lg:bg-transparent lg:hover:bg-muted/60;
40
+ border-radius: 0.75rem;
41
+ background-color: hsl(var(--muted));
42
+ padding: 0.75rem 1rem;
43
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
44
+ transition-duration: 150ms;
45
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
41
46
  }
42
47
 
43
48
  .list-row-selected {
44
- @apply bg-primary/[0.06] lg:bg-primary/[0.06] lg:hover:bg-primary/[0.06];
49
+ background-color: hsl(var(--primary) / 0.06);
45
50
  }
46
51
 
47
- /* Split (list + detail) pages are full-bleed: use these instead of
48
- * .notis-app-shell. The list pane is tinted and carries the one allowed
49
- * hairline; the detail pane sits on the plain background. */
52
+ /* Split pages are full-bleed; only the list pane carries a hairline. */
50
53
  .notis-app-split {
51
- @apply flex h-full min-h-0 w-full max-w-none flex-col lg:flex-row;
54
+ display: flex;
55
+ height: 100%;
56
+ min-height: 0;
57
+ width: 100%;
58
+ max-width: none;
59
+ flex-direction: column;
52
60
  }
53
61
 
54
62
  .notis-app-pane-list {
55
- @apply w-full shrink-0 bg-muted/40 lg:w-80 lg:border-r lg:border-border xl:w-96;
63
+ width: 100%;
64
+ flex-shrink: 0;
65
+ background-color: hsl(var(--muted) / 0.4);
56
66
  }
57
67
 
58
68
  .notis-app-pane-detail {
59
- @apply min-w-0 flex-1 bg-background;
69
+ min-width: 0;
70
+ flex: 1 1 0%;
71
+ background-color: hsl(var(--background));
60
72
  }
61
73
 
62
74
  .notis-app-section {
63
- @apply p-5 md:p-6;
75
+ padding: 1.25rem;
76
+ }
77
+
78
+ @media (min-width: 768px) {
79
+ .notis-app-shell { padding-block: 2rem; }
80
+ .notis-app-section { padding: 1.5rem; }
81
+ }
82
+
83
+ @media (min-width: 1024px) {
84
+ .list-row { background-color: transparent; }
85
+ .list-row:hover { background-color: hsl(var(--muted) / 0.6); }
86
+ .list-row-selected,
87
+ .list-row-selected:hover { background-color: hsl(var(--primary) / 0.06); }
88
+ .notis-app-split { flex-direction: row; }
89
+ .notis-app-pane-list {
90
+ width: 20rem;
91
+ border-right-width: 1px;
92
+ border-right-color: hsl(var(--border));
93
+ }
94
+ }
95
+
96
+ @media (min-width: 1280px) {
97
+ .notis-app-pane-list { width: 24rem; }
64
98
  }
65
99
  }
66
100
 
@@ -18,7 +18,17 @@ export function notisTailwindContent() {
18
18
  enforce: 'pre' as const,
19
19
  configResolved(config: { root: string }) { root = config.root; },
20
20
  transform(source: string, id: string) {
21
- if (!id.split('?')[0].endsWith('.css') || !/@tailwind\s/.test(source)) return null;
21
+ const stylesheet = id.split('?')[0];
22
+ if (!stylesheet.endsWith('.css')) return null;
23
+ // Tailwind 4 discovers dependency sources through CSS, not config.content.
24
+ // Keep the author's imports, configuration and PostCSS pipeline untouched.
25
+ if (/@import\s+(?:url\(\s*)?(['"])tailwindcss(?:\/[^'"]*)?\1/.test(source)) {
26
+ const sdkSource = dirname(fileURLToPath(import.meta.url));
27
+ const relativeSource = './' + relative(dirname(stylesheet), sdkSource).replaceAll('\\', '/');
28
+ const directive = `@source ${JSON.stringify(relativeSource)};`;
29
+ return source.includes(directive) ? null : { code: `${source}\n${directive}\n`, map: null };
30
+ }
31
+ if (!/@tailwind\s/.test(source)) return null;
22
32
  const explicit = source.match(/@config\s+(['"])(.*?)\1\s*;/);
23
33
  const config = explicit
24
34
  ? resolve(dirname(id.split('?')[0]), explicit[2])
@@ -13,24 +13,39 @@
13
13
  * Output: .notis/output/bundle/app.js + app.css
14
14
  */
15
15
 
16
+ import * as vite from 'vite';
16
17
  import type { NotisAppConfig } from './config';
17
18
  import { notisTailwindContent } from './tailwind';
18
19
 
19
- export function notisViteConfig(appConfig: NotisAppConfig) {
20
+ const externalReact = ['react', 'react-dom', 'react-dom/client', 'react/jsx-runtime', 'react/jsx-dev-runtime'];
21
+
22
+ export function notisViteConfig(appConfig: NotisAppConfig): vite.UserConfig {
23
+ // Vite 8 preserves external require() calls. App bundles run in a browser
24
+ // with an ESM import map, so bundled CommonJS dependencies must import React.
25
+ // Older pulled apps also receive this SDK; their Vite already does this.
26
+ const externalRequirePlugin = 'esmExternalRequirePlugin' in vite
27
+ && typeof vite.esmExternalRequirePlugin === 'function'
28
+ ? vite.esmExternalRequirePlugin({ external: externalReact })
29
+ : null;
20
30
  return {
21
31
  plugins: [
22
32
  notisTailwindContent(),
33
+ ...(externalRequirePlugin ? [externalRequirePlugin] : []),
23
34
  // @vitejs/plugin-react is added by the consumer's vite.config.ts
24
35
  // or auto-detected. We provide the config shape only.
25
36
  ],
26
37
  build: {
27
38
  lib: {
28
39
  entry: '.notis/_entry.tsx',
29
- formats: ['es'] as const,
40
+ formats: ['es'],
30
41
  fileName: () => 'app.js',
31
42
  },
43
+ // Keep Vite's compatibility alias: SDK refresh also serves historical
44
+ // Vite 5/6/7 apps, which do not understand rolldownOptions.
32
45
  rollupOptions: {
33
- external: ['react', 'react-dom', 'react-dom/client', 'react/jsx-runtime', 'react/jsx-dev-runtime'],
46
+ // On Vite 8 the plugin must own externalization as well as conversion:
47
+ // a top-level external match bypasses its require-to-import transform.
48
+ external: externalRequirePlugin ? [] : externalReact,
34
49
  output: {
35
50
  globals: {
36
51
  react: 'window.React',
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "types": ["node", "react", "react-dom"],
3
4
  "target": "ES2022",
4
5
  "module": "ESNext",
5
6
  "moduleResolution": "bundler",
@@ -1,7 +1,7 @@
1
1
  /** @type {import('postcss-load-config').Config} */
2
2
  const config = {
3
3
  plugins: {
4
- tailwindcss: {},
4
+ "@tailwindcss/postcss": {},
5
5
  },
6
6
  };
7
7
 
@@ -2,13 +2,7 @@ import type { Config } from 'tailwindcss';
2
2
  import tailwindAnimate from 'tailwindcss-animate';
3
3
 
4
4
  const config: Config = {
5
- darkMode: ['class'],
6
- content: [
7
- './app/**/*.{ts,tsx}',
8
- './components/**/*.{ts,tsx}',
9
- './lib/**/*.{ts,tsx}',
10
- './packages/sdk/src/**/*.{ts,tsx}',
11
- ],
5
+ darkMode: 'class',
12
6
  theme: {
13
7
  extend: {
14
8
  colors: {
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "types": ["node", "react", "react-dom", "vite/client"],
3
4
  "target": "ES2017",
4
5
  "lib": ["dom", "dom.iterable", "esnext"],
5
6
  "allowJs": true,