@gridland/web 0.2.26 → 0.2.28
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.
- package/dist/core-shims.js +46163 -0
- package/dist/core-shims.js.map +7 -0
- package/dist/index.js +11 -6
- package/dist/index.js.map +3 -3
- package/dist/next-plugin.cjs +38 -31
- package/dist/next-plugin.cjs.map +1 -1
- package/dist/next-plugin.d.cts +4 -2
- package/dist/next-plugin.d.ts +4 -2
- package/dist/next-plugin.js +38 -31
- package/dist/next-plugin.js.map +1 -1
- package/dist/next.js +11 -6
- package/dist/next.js.map +3 -3
- package/dist/vite-plugin.d.ts +11 -6
- package/dist/vite-plugin.js +27 -43
- package/dist/vite-plugin.js.map +1 -1
- package/package.json +2 -2
- package/src/shims/zig-stub.ts +0 -20
package/dist/next-plugin.cjs
CHANGED
|
@@ -34,26 +34,24 @@ __export(next_plugin_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(next_plugin_exports);
|
|
36
36
|
var import_path = __toESM(require("path"), 1);
|
|
37
|
+
var import_fs = require("fs");
|
|
37
38
|
function withGridland(nextConfig = {}) {
|
|
38
39
|
const pkgRoot = import_path.default.resolve(__dirname, "..");
|
|
39
40
|
const opentuiRoot = import_path.default.resolve(pkgRoot, "../../opentui");
|
|
40
41
|
const coreRoot = import_path.default.resolve(opentuiRoot, "packages/core");
|
|
41
42
|
const reactRoot = import_path.default.resolve(opentuiRoot, "packages/react");
|
|
42
43
|
const uiRoot = import_path.default.resolve(opentuiRoot, "packages/ui");
|
|
44
|
+
const hasSource = (0, import_fs.existsSync)(import_path.default.resolve(reactRoot, "src/index.ts"));
|
|
43
45
|
function shimPath(p) {
|
|
44
46
|
return import_path.default.resolve(pkgRoot, p);
|
|
45
47
|
}
|
|
46
48
|
const coreFileShims = {
|
|
47
|
-
zig: "src/shims/zig-stub.ts",
|
|
48
49
|
buffer: "src/browser-buffer.ts",
|
|
49
50
|
"text-buffer": "src/shims/text-buffer-shim.ts",
|
|
50
51
|
"text-buffer-view": "src/shims/text-buffer-view-shim.ts",
|
|
51
52
|
"syntax-style": "src/shims/syntax-style-shim.ts",
|
|
52
|
-
renderer: "src/shims/renderer-stub.ts",
|
|
53
|
-
console: "src/shims/console-stub.ts",
|
|
54
53
|
"edit-buffer": "src/shims/edit-buffer-stub.ts",
|
|
55
54
|
"editor-view": "src/shims/editor-view-stub.ts",
|
|
56
|
-
NativeSpanFeed: "src/shims/native-span-feed-stub.ts",
|
|
57
55
|
"post/filters": "src/shims/filters-stub.ts",
|
|
58
56
|
"animation/Timeline": "src/shims/timeline-stub.ts"
|
|
59
57
|
};
|
|
@@ -66,42 +64,56 @@ function withGridland(nextConfig = {}) {
|
|
|
66
64
|
config = userWebpack(config, context);
|
|
67
65
|
}
|
|
68
66
|
const sharedAliases = {
|
|
69
|
-
//
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
// npm mode: @gridland/core resolves via package.json conditional exports.
|
|
68
|
+
// No alias needed.
|
|
69
|
+
// @opentui packages — source mode only (monorepo dev)
|
|
70
|
+
...hasSource ? {
|
|
71
|
+
"@opentui/core": import_path.default.resolve(coreRoot, "src/index.ts"),
|
|
72
|
+
"@opentui/react": import_path.default.resolve(reactRoot, "src/index.ts"),
|
|
73
|
+
"@opentui/ui": import_path.default.resolve(uiRoot, "src/index.ts")
|
|
74
|
+
} : {},
|
|
73
75
|
// FFI shims (no Zig/Bun on server or client in browser context)
|
|
74
76
|
"bun:ffi": shimPath("src/shims/bun-ffi.ts"),
|
|
75
77
|
"bun-ffi-structs": shimPath("src/shims/bun-ffi-structs.ts"),
|
|
76
78
|
bun: shimPath("src/shims/bun-ffi.ts"),
|
|
77
|
-
// Tree-sitter stubs
|
|
78
|
-
// "tree-sitter" matching "tree-sitter-styled-text" (webpack prefix match)
|
|
79
|
+
// Tree-sitter stubs
|
|
79
80
|
"tree-sitter-styled-text": shimPath("src/shims/tree-sitter-styled-text-stub.ts"),
|
|
80
81
|
"web-tree-sitter": shimPath("src/shims/tree-sitter-stub.ts"),
|
|
81
82
|
"hast-styled-text": shimPath("src/shims/hast-stub.ts"),
|
|
82
|
-
//
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
// Source-mode-only aliases
|
|
84
|
+
...hasSource ? {
|
|
85
|
+
[import_path.default.resolve(coreRoot, "src/lib/tree-sitter-styled-text")]: shimPath("src/shims/tree-sitter-styled-text-stub.ts"),
|
|
86
|
+
[import_path.default.resolve(coreRoot, "src/lib/tree-sitter")]: shimPath("src/shims/tree-sitter-stub.ts"),
|
|
87
|
+
[import_path.default.resolve(coreRoot, "src/lib/hast-styled-text")]: shimPath("src/shims/hast-stub.ts"),
|
|
88
|
+
[import_path.default.resolve(reactRoot, "src/reconciler/devtools-polyfill")]: shimPath("src/shims/devtools-polyfill-stub.ts")
|
|
89
|
+
} : {}
|
|
88
90
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
if (hasSource) {
|
|
92
|
+
for (const [key, shimFile] of Object.entries(coreFileShims)) {
|
|
93
|
+
sharedAliases[import_path.default.resolve(coreRoot, "src", key)] = shimPath(shimFile);
|
|
94
|
+
}
|
|
91
95
|
}
|
|
92
96
|
config.resolve = config.resolve || {};
|
|
93
97
|
config.resolve.alias = {
|
|
94
98
|
...config.resolve.alias,
|
|
95
99
|
...sharedAliases
|
|
96
100
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
config.resolve.modules = [
|
|
102
|
+
...config.resolve.modules || [],
|
|
103
|
+
import_path.default.resolve(process.cwd(), "node_modules"),
|
|
104
|
+
import_path.default.resolve(pkgRoot, "node_modules"),
|
|
105
|
+
import_path.default.resolve(pkgRoot, "../../node_modules")
|
|
106
|
+
];
|
|
107
|
+
if (hasSource) {
|
|
108
|
+
const renderablesDir = import_path.default.resolve(coreRoot, "src/renderables");
|
|
109
|
+
config.plugins.push(
|
|
110
|
+
new webpack.NormalModuleReplacementPlugin(/^\.\.\/index$/, (resource) => {
|
|
111
|
+
if (resource.context === renderablesDir) {
|
|
112
|
+
resource.request = shimPath("src/shims/slider-deps.ts");
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
);
|
|
116
|
+
}
|
|
105
117
|
if (!isServer) {
|
|
106
118
|
const clientAliases = {
|
|
107
119
|
"node:console": shimPath("src/shims/console.ts"),
|
|
@@ -118,11 +130,6 @@ function withGridland(nextConfig = {}) {
|
|
|
118
130
|
...config.resolve.alias,
|
|
119
131
|
...clientAliases
|
|
120
132
|
};
|
|
121
|
-
config.resolve.modules = [
|
|
122
|
-
...config.resolve.modules || [],
|
|
123
|
-
import_path.default.resolve(pkgRoot, "node_modules"),
|
|
124
|
-
import_path.default.resolve(pkgRoot, "../../node_modules")
|
|
125
|
-
];
|
|
126
133
|
config.plugins.push(
|
|
127
134
|
new webpack.NormalModuleReplacementPlugin(/^node:/, (resource) => {
|
|
128
135
|
resource.request = resource.request.replace(/^node:/, "");
|
package/dist/next-plugin.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/next-plugin.ts"],"sourcesContent":["import path from \"path\"\n\ntype WebpackConfig = any\ntype WebpackInstance = any\n\ninterface NextConfig {\n webpack?: (config: WebpackConfig, context: { isServer: boolean; webpack: WebpackInstance }) => WebpackConfig\n [key: string]: any\n}\n\n/**\n * Next.js plugin that configures webpack for Gridland.\n * Equivalent to `gridlandWebPlugin()` for Vite — handles module aliases,\n * FFI shims, tree-sitter stubs, Node.js built-in stubs, and circular\n * dependency fixes.\n *\n *
|
|
1
|
+
{"version":3,"sources":["../src/next-plugin.ts"],"sourcesContent":["import path from \"path\"\nimport { existsSync } from \"fs\"\n\ntype WebpackConfig = any\ntype WebpackInstance = any\n\ninterface NextConfig {\n webpack?: (config: WebpackConfig, context: { isServer: boolean; webpack: WebpackInstance }) => WebpackConfig\n [key: string]: any\n}\n\n/**\n * Next.js plugin that configures webpack for Gridland.\n * Equivalent to `gridlandWebPlugin()` for Vite — handles module aliases,\n * FFI shims, tree-sitter stubs, Node.js built-in stubs, and circular\n * dependency fixes.\n *\n * In **npm mode**, @gridland/core resolves via package.json conditional exports\n * (\"import\" → dist/browser.js). No aliasing needed.\n *\n * In **source mode**, the plugin handles @opentui/* resolution and file-level\n * browser shims for native-backed classes.\n */\nexport function withGridland(nextConfig: NextConfig = {}): NextConfig {\n // __dirname works natively in CJS; tsup shims it for ESM via import.meta.url\n const pkgRoot = path.resolve(__dirname, \"..\")\n\n // Resolve opentui package roots from the git submodule\n const opentuiRoot = path.resolve(pkgRoot, \"../../opentui\")\n const coreRoot = path.resolve(opentuiRoot, \"packages/core\")\n const reactRoot = path.resolve(opentuiRoot, \"packages/react\")\n const uiRoot = path.resolve(opentuiRoot, \"packages/ui\")\n\n // Detect whether opentui source is available (monorepo/submodule)\n const hasSource = existsSync(path.resolve(reactRoot, \"src/index.ts\"))\n\n function shimPath(p: string) {\n return path.resolve(pkgRoot, p)\n }\n\n // File-level shims — browser replacements for native-backed classes.\n // NOT needed for: zig (zig-registry.ts is browser-safe), renderer, console,\n // NativeSpanFeed (no longer in browser barrel).\n const coreFileShims: Record<string, string> = {\n buffer: \"src/browser-buffer.ts\",\n \"text-buffer\": \"src/shims/text-buffer-shim.ts\",\n \"text-buffer-view\": \"src/shims/text-buffer-view-shim.ts\",\n \"syntax-style\": \"src/shims/syntax-style-shim.ts\",\n \"edit-buffer\": \"src/shims/edit-buffer-stub.ts\",\n \"editor-view\": \"src/shims/editor-view-stub.ts\",\n \"post/filters\": \"src/shims/filters-stub.ts\",\n \"animation/Timeline\": \"src/shims/timeline-stub.ts\",\n }\n\n const userWebpack = nextConfig.webpack\n\n return {\n ...nextConfig,\n webpack: (config: WebpackConfig, context: { isServer: boolean; webpack: WebpackInstance }) => {\n const { isServer, webpack } = context\n\n // Chain user's webpack config first if provided\n if (userWebpack) {\n config = userWebpack(config, context)\n }\n\n const sharedAliases: Record<string, string> = {\n // npm mode: @gridland/core resolves via package.json conditional exports.\n // No alias needed.\n\n // @opentui packages — source mode only (monorepo dev)\n ...(hasSource ? {\n \"@opentui/core\": path.resolve(coreRoot, \"src/index.ts\"),\n \"@opentui/react\": path.resolve(reactRoot, \"src/index.ts\"),\n \"@opentui/ui\": path.resolve(uiRoot, \"src/index.ts\"),\n } : {}),\n\n // FFI shims (no Zig/Bun on server or client in browser context)\n \"bun:ffi\": shimPath(\"src/shims/bun-ffi.ts\"),\n \"bun-ffi-structs\": shimPath(\"src/shims/bun-ffi-structs.ts\"),\n bun: shimPath(\"src/shims/bun-ffi.ts\"),\n\n // Tree-sitter stubs\n \"tree-sitter-styled-text\": shimPath(\"src/shims/tree-sitter-styled-text-stub.ts\"),\n \"web-tree-sitter\": shimPath(\"src/shims/tree-sitter-stub.ts\"),\n \"hast-styled-text\": shimPath(\"src/shims/hast-stub.ts\"),\n\n // Source-mode-only aliases\n ...(hasSource ? {\n [path.resolve(coreRoot, \"src/lib/tree-sitter-styled-text\")]:\n shimPath(\"src/shims/tree-sitter-styled-text-stub.ts\"),\n [path.resolve(coreRoot, \"src/lib/tree-sitter\")]:\n shimPath(\"src/shims/tree-sitter-stub.ts\"),\n [path.resolve(coreRoot, \"src/lib/hast-styled-text\")]:\n shimPath(\"src/shims/hast-stub.ts\"),\n [path.resolve(reactRoot, \"src/reconciler/devtools-polyfill\")]:\n shimPath(\"src/shims/devtools-polyfill-stub.ts\"),\n } : {}),\n }\n\n // Core file shims (opentui source → browser shim) — source mode only\n if (hasSource) {\n for (const [key, shimFile] of Object.entries(coreFileShims)) {\n sharedAliases[path.resolve(coreRoot, \"src\", key)] = shimPath(shimFile)\n }\n }\n\n config.resolve = config.resolve || {}\n config.resolve.alias = {\n ...config.resolve.alias,\n ...sharedAliases,\n }\n\n // Allow webpack to resolve workspace packages\n config.resolve.modules = [\n ...(config.resolve.modules || []),\n path.resolve(process.cwd(), \"node_modules\"),\n path.resolve(pkgRoot, \"node_modules\"),\n path.resolve(pkgRoot, \"../../node_modules\"),\n ]\n\n // Slider circular dependency fix — source mode only\n if (hasSource) {\n const renderablesDir = path.resolve(coreRoot, \"src/renderables\")\n config.plugins.push(\n new webpack.NormalModuleReplacementPlugin(/^\\.\\.\\/index$/, (resource: any) => {\n if (resource.context === renderablesDir) {\n resource.request = shimPath(\"src/shims/slider-deps.ts\")\n }\n }),\n )\n }\n\n if (!isServer) {\n // Client-only: Node.js built-in stubs, events shim, console shim.\n const clientAliases: Record<string, string> = {\n \"node:console\": shimPath(\"src/shims/console.ts\"),\n \"events$\": shimPath(\"src/shims/events-shim.ts\"),\n \"fs/promises\": shimPath(\"src/shims/node-fs.ts\"),\n \"fs$\": shimPath(\"src/shims/node-fs.ts\"),\n \"path$\": shimPath(\"src/shims/node-path.ts\"),\n \"util$\": shimPath(\"src/shims/node-util.ts\"),\n \"os$\": shimPath(\"src/shims/node-os.ts\"),\n \"stream$\": shimPath(\"src/shims/node-stream.ts\"),\n \"url$\": shimPath(\"src/shims/node-url.ts\"),\n }\n\n config.resolve.alias = {\n ...config.resolve.alias,\n ...clientAliases,\n }\n\n // Strip `node:` and `bun:` prefixes from imports\n config.plugins.push(\n new webpack.NormalModuleReplacementPlugin(/^node:/, (resource: any) => {\n resource.request = resource.request.replace(/^node:/, \"\")\n }),\n new webpack.NormalModuleReplacementPlugin(/^bun:/, (resource: any) => {\n resource.request = resource.request.replace(/^bun:/, \"\")\n }),\n )\n }\n\n // Enable top-level await (used by opentui source code)\n config.experiments = {\n ...config.experiments,\n topLevelAwait: true,\n }\n\n return config\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,gBAA2B;AAsBpB,SAAS,aAAa,aAAyB,CAAC,GAAe;AAEpE,QAAM,UAAU,YAAAA,QAAK,QAAQ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AAgB,SAAS,sBAAsB;AAAA,UAC/C,WAAW,SAAS,0BAA0B;AAAA,UAC9C,eAAe,SAAS,sBAAsB;AAAA,UAC9C,OAAO,SAAS,sBAAsB;AAAA,UACtC,SAAS,SAAS,wBAAwB;AAAA,UAC1C,SAAS,SAAS,wBAAwB;AAAA,UAC1C,OAAO,SAAS,sBAAsB;AAAA,UACtC,WAAW,SAAS,0BAA0B;AAAA,UAC9C,QAAQ,SAAS,uBAAuB;AAAA,QAC1C;AAEA,eAAO,QAAQ,QAAQ;AAAA,UACrB,GAAG,OAAO,QAAQ;AAAA,UAClB,GAAG;AAAA,QACL;AAGA,eAAO,QAAQ;AAAA,UACb,IAAI,QAAQ,8BAA8B,UAAU,CAAC,aAAkB;AACrE,qBAAS,UAAU,SAAS,QAAQ,QAAQ,UAAU,EAAE;AAAA,UAC1D,CAAC;AAAA,UACD,IAAI,QAAQ,8BAA8B,SAAS,CAAC,aAAkB;AACpE,qBAAS,UAAU,SAAS,QAAQ,QAAQ,SAAS,EAAE;AAAA,UACzD,CAAC;AAAA,QACH;AAAA,MACF;AAGA,aAAO,cAAc;AAAA,QACnB,GAAG,OAAO;AAAA,QACV,eAAe;AAAA,MACjB;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["path"]}
|
package/dist/next-plugin.d.cts
CHANGED
|
@@ -13,9 +13,11 @@ interface NextConfig {
|
|
|
13
13
|
* FFI shims, tree-sitter stubs, Node.js built-in stubs, and circular
|
|
14
14
|
* dependency fixes.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
16
|
+
* In **npm mode**, @gridland/core resolves via package.json conditional exports
|
|
17
|
+
* ("import" → dist/browser.js). No aliasing needed.
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
+
* In **source mode**, the plugin handles @opentui/* resolution and file-level
|
|
20
|
+
* browser shims for native-backed classes.
|
|
19
21
|
*/
|
|
20
22
|
declare function withGridland(nextConfig?: NextConfig): NextConfig;
|
|
21
23
|
|
package/dist/next-plugin.d.ts
CHANGED
|
@@ -13,9 +13,11 @@ interface NextConfig {
|
|
|
13
13
|
* FFI shims, tree-sitter stubs, Node.js built-in stubs, and circular
|
|
14
14
|
* dependency fixes.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
16
|
+
* In **npm mode**, @gridland/core resolves via package.json conditional exports
|
|
17
|
+
* ("import" → dist/browser.js). No aliasing needed.
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
+
* In **source mode**, the plugin handles @opentui/* resolution and file-level
|
|
20
|
+
* browser shims for native-backed classes.
|
|
19
21
|
*/
|
|
20
22
|
declare function withGridland(nextConfig?: NextConfig): NextConfig;
|
|
21
23
|
|
package/dist/next-plugin.js
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
// src/next-plugin.ts
|
|
2
2
|
import path from "path";
|
|
3
|
+
import { existsSync } from "fs";
|
|
3
4
|
function withGridland(nextConfig = {}) {
|
|
4
5
|
const pkgRoot = path.resolve(__dirname, "..");
|
|
5
6
|
const opentuiRoot = path.resolve(pkgRoot, "../../opentui");
|
|
6
7
|
const coreRoot = path.resolve(opentuiRoot, "packages/core");
|
|
7
8
|
const reactRoot = path.resolve(opentuiRoot, "packages/react");
|
|
8
9
|
const uiRoot = path.resolve(opentuiRoot, "packages/ui");
|
|
10
|
+
const hasSource = existsSync(path.resolve(reactRoot, "src/index.ts"));
|
|
9
11
|
function shimPath(p) {
|
|
10
12
|
return path.resolve(pkgRoot, p);
|
|
11
13
|
}
|
|
12
14
|
const coreFileShims = {
|
|
13
|
-
zig: "src/shims/zig-stub.ts",
|
|
14
15
|
buffer: "src/browser-buffer.ts",
|
|
15
16
|
"text-buffer": "src/shims/text-buffer-shim.ts",
|
|
16
17
|
"text-buffer-view": "src/shims/text-buffer-view-shim.ts",
|
|
17
18
|
"syntax-style": "src/shims/syntax-style-shim.ts",
|
|
18
|
-
renderer: "src/shims/renderer-stub.ts",
|
|
19
|
-
console: "src/shims/console-stub.ts",
|
|
20
19
|
"edit-buffer": "src/shims/edit-buffer-stub.ts",
|
|
21
20
|
"editor-view": "src/shims/editor-view-stub.ts",
|
|
22
|
-
NativeSpanFeed: "src/shims/native-span-feed-stub.ts",
|
|
23
21
|
"post/filters": "src/shims/filters-stub.ts",
|
|
24
22
|
"animation/Timeline": "src/shims/timeline-stub.ts"
|
|
25
23
|
};
|
|
@@ -32,42 +30,56 @@ function withGridland(nextConfig = {}) {
|
|
|
32
30
|
config = userWebpack(config, context);
|
|
33
31
|
}
|
|
34
32
|
const sharedAliases = {
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
// npm mode: @gridland/core resolves via package.json conditional exports.
|
|
34
|
+
// No alias needed.
|
|
35
|
+
// @opentui packages — source mode only (monorepo dev)
|
|
36
|
+
...hasSource ? {
|
|
37
|
+
"@opentui/core": path.resolve(coreRoot, "src/index.ts"),
|
|
38
|
+
"@opentui/react": path.resolve(reactRoot, "src/index.ts"),
|
|
39
|
+
"@opentui/ui": path.resolve(uiRoot, "src/index.ts")
|
|
40
|
+
} : {},
|
|
39
41
|
// FFI shims (no Zig/Bun on server or client in browser context)
|
|
40
42
|
"bun:ffi": shimPath("src/shims/bun-ffi.ts"),
|
|
41
43
|
"bun-ffi-structs": shimPath("src/shims/bun-ffi-structs.ts"),
|
|
42
44
|
bun: shimPath("src/shims/bun-ffi.ts"),
|
|
43
|
-
// Tree-sitter stubs
|
|
44
|
-
// "tree-sitter" matching "tree-sitter-styled-text" (webpack prefix match)
|
|
45
|
+
// Tree-sitter stubs
|
|
45
46
|
"tree-sitter-styled-text": shimPath("src/shims/tree-sitter-styled-text-stub.ts"),
|
|
46
47
|
"web-tree-sitter": shimPath("src/shims/tree-sitter-stub.ts"),
|
|
47
48
|
"hast-styled-text": shimPath("src/shims/hast-stub.ts"),
|
|
48
|
-
//
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
// Source-mode-only aliases
|
|
50
|
+
...hasSource ? {
|
|
51
|
+
[path.resolve(coreRoot, "src/lib/tree-sitter-styled-text")]: shimPath("src/shims/tree-sitter-styled-text-stub.ts"),
|
|
52
|
+
[path.resolve(coreRoot, "src/lib/tree-sitter")]: shimPath("src/shims/tree-sitter-stub.ts"),
|
|
53
|
+
[path.resolve(coreRoot, "src/lib/hast-styled-text")]: shimPath("src/shims/hast-stub.ts"),
|
|
54
|
+
[path.resolve(reactRoot, "src/reconciler/devtools-polyfill")]: shimPath("src/shims/devtools-polyfill-stub.ts")
|
|
55
|
+
} : {}
|
|
54
56
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
if (hasSource) {
|
|
58
|
+
for (const [key, shimFile] of Object.entries(coreFileShims)) {
|
|
59
|
+
sharedAliases[path.resolve(coreRoot, "src", key)] = shimPath(shimFile);
|
|
60
|
+
}
|
|
57
61
|
}
|
|
58
62
|
config.resolve = config.resolve || {};
|
|
59
63
|
config.resolve.alias = {
|
|
60
64
|
...config.resolve.alias,
|
|
61
65
|
...sharedAliases
|
|
62
66
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
config.resolve.modules = [
|
|
68
|
+
...config.resolve.modules || [],
|
|
69
|
+
path.resolve(process.cwd(), "node_modules"),
|
|
70
|
+
path.resolve(pkgRoot, "node_modules"),
|
|
71
|
+
path.resolve(pkgRoot, "../../node_modules")
|
|
72
|
+
];
|
|
73
|
+
if (hasSource) {
|
|
74
|
+
const renderablesDir = path.resolve(coreRoot, "src/renderables");
|
|
75
|
+
config.plugins.push(
|
|
76
|
+
new webpack.NormalModuleReplacementPlugin(/^\.\.\/index$/, (resource) => {
|
|
77
|
+
if (resource.context === renderablesDir) {
|
|
78
|
+
resource.request = shimPath("src/shims/slider-deps.ts");
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
);
|
|
82
|
+
}
|
|
71
83
|
if (!isServer) {
|
|
72
84
|
const clientAliases = {
|
|
73
85
|
"node:console": shimPath("src/shims/console.ts"),
|
|
@@ -84,11 +96,6 @@ function withGridland(nextConfig = {}) {
|
|
|
84
96
|
...config.resolve.alias,
|
|
85
97
|
...clientAliases
|
|
86
98
|
};
|
|
87
|
-
config.resolve.modules = [
|
|
88
|
-
...config.resolve.modules || [],
|
|
89
|
-
path.resolve(pkgRoot, "node_modules"),
|
|
90
|
-
path.resolve(pkgRoot, "../../node_modules")
|
|
91
|
-
];
|
|
92
99
|
config.plugins.push(
|
|
93
100
|
new webpack.NormalModuleReplacementPlugin(/^node:/, (resource) => {
|
|
94
101
|
resource.request = resource.request.replace(/^node:/, "");
|
package/dist/next-plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/next-plugin.ts"],"sourcesContent":["import path from \"path\"\n\ntype WebpackConfig = any\ntype WebpackInstance = any\n\ninterface NextConfig {\n webpack?: (config: WebpackConfig, context: { isServer: boolean; webpack: WebpackInstance }) => WebpackConfig\n [key: string]: any\n}\n\n/**\n * Next.js plugin that configures webpack for Gridland.\n * Equivalent to `gridlandWebPlugin()` for Vite — handles module aliases,\n * FFI shims, tree-sitter stubs, Node.js built-in stubs, and circular\n * dependency fixes.\n *\n *
|
|
1
|
+
{"version":3,"sources":["../src/next-plugin.ts"],"sourcesContent":["import path from \"path\"\nimport { existsSync } from \"fs\"\n\ntype WebpackConfig = any\ntype WebpackInstance = any\n\ninterface NextConfig {\n webpack?: (config: WebpackConfig, context: { isServer: boolean; webpack: WebpackInstance }) => WebpackConfig\n [key: string]: any\n}\n\n/**\n * Next.js plugin that configures webpack for Gridland.\n * Equivalent to `gridlandWebPlugin()` for Vite — handles module aliases,\n * FFI shims, tree-sitter stubs, Node.js built-in stubs, and circular\n * dependency fixes.\n *\n * In **npm mode**, @gridland/core resolves via package.json conditional exports\n * (\"import\" → dist/browser.js). No aliasing needed.\n *\n * In **source mode**, the plugin handles @opentui/* resolution and file-level\n * browser shims for native-backed classes.\n */\nexport function withGridland(nextConfig: NextConfig = {}): NextConfig {\n // __dirname works natively in CJS; tsup shims it for ESM via import.meta.url\n const pkgRoot = path.resolve(__dirname, \"..\")\n\n // Resolve opentui package roots from the git submodule\n const opentuiRoot = path.resolve(pkgRoot, \"../../opentui\")\n const coreRoot = path.resolve(opentuiRoot, \"packages/core\")\n const reactRoot = path.resolve(opentuiRoot, \"packages/react\")\n const uiRoot = path.resolve(opentuiRoot, \"packages/ui\")\n\n // Detect whether opentui source is available (monorepo/submodule)\n const hasSource = existsSync(path.resolve(reactRoot, \"src/index.ts\"))\n\n function shimPath(p: string) {\n return path.resolve(pkgRoot, p)\n }\n\n // File-level shims — browser replacements for native-backed classes.\n // NOT needed for: zig (zig-registry.ts is browser-safe), renderer, console,\n // NativeSpanFeed (no longer in browser barrel).\n const coreFileShims: Record<string, string> = {\n buffer: \"src/browser-buffer.ts\",\n \"text-buffer\": \"src/shims/text-buffer-shim.ts\",\n \"text-buffer-view\": \"src/shims/text-buffer-view-shim.ts\",\n \"syntax-style\": \"src/shims/syntax-style-shim.ts\",\n \"edit-buffer\": \"src/shims/edit-buffer-stub.ts\",\n \"editor-view\": \"src/shims/editor-view-stub.ts\",\n \"post/filters\": \"src/shims/filters-stub.ts\",\n \"animation/Timeline\": \"src/shims/timeline-stub.ts\",\n }\n\n const userWebpack = nextConfig.webpack\n\n return {\n ...nextConfig,\n webpack: (config: WebpackConfig, context: { isServer: boolean; webpack: WebpackInstance }) => {\n const { isServer, webpack } = context\n\n // Chain user's webpack config first if provided\n if (userWebpack) {\n config = userWebpack(config, context)\n }\n\n const sharedAliases: Record<string, string> = {\n // npm mode: @gridland/core resolves via package.json conditional exports.\n // No alias needed.\n\n // @opentui packages — source mode only (monorepo dev)\n ...(hasSource ? {\n \"@opentui/core\": path.resolve(coreRoot, \"src/index.ts\"),\n \"@opentui/react\": path.resolve(reactRoot, \"src/index.ts\"),\n \"@opentui/ui\": path.resolve(uiRoot, \"src/index.ts\"),\n } : {}),\n\n // FFI shims (no Zig/Bun on server or client in browser context)\n \"bun:ffi\": shimPath(\"src/shims/bun-ffi.ts\"),\n \"bun-ffi-structs\": shimPath(\"src/shims/bun-ffi-structs.ts\"),\n bun: shimPath(\"src/shims/bun-ffi.ts\"),\n\n // Tree-sitter stubs\n \"tree-sitter-styled-text\": shimPath(\"src/shims/tree-sitter-styled-text-stub.ts\"),\n \"web-tree-sitter\": shimPath(\"src/shims/tree-sitter-stub.ts\"),\n \"hast-styled-text\": shimPath(\"src/shims/hast-stub.ts\"),\n\n // Source-mode-only aliases\n ...(hasSource ? {\n [path.resolve(coreRoot, \"src/lib/tree-sitter-styled-text\")]:\n shimPath(\"src/shims/tree-sitter-styled-text-stub.ts\"),\n [path.resolve(coreRoot, \"src/lib/tree-sitter\")]:\n shimPath(\"src/shims/tree-sitter-stub.ts\"),\n [path.resolve(coreRoot, \"src/lib/hast-styled-text\")]:\n shimPath(\"src/shims/hast-stub.ts\"),\n [path.resolve(reactRoot, \"src/reconciler/devtools-polyfill\")]:\n shimPath(\"src/shims/devtools-polyfill-stub.ts\"),\n } : {}),\n }\n\n // Core file shims (opentui source → browser shim) — source mode only\n if (hasSource) {\n for (const [key, shimFile] of Object.entries(coreFileShims)) {\n sharedAliases[path.resolve(coreRoot, \"src\", key)] = shimPath(shimFile)\n }\n }\n\n config.resolve = config.resolve || {}\n config.resolve.alias = {\n ...config.resolve.alias,\n ...sharedAliases,\n }\n\n // Allow webpack to resolve workspace packages\n config.resolve.modules = [\n ...(config.resolve.modules || []),\n path.resolve(process.cwd(), \"node_modules\"),\n path.resolve(pkgRoot, \"node_modules\"),\n path.resolve(pkgRoot, \"../../node_modules\"),\n ]\n\n // Slider circular dependency fix — source mode only\n if (hasSource) {\n const renderablesDir = path.resolve(coreRoot, \"src/renderables\")\n config.plugins.push(\n new webpack.NormalModuleReplacementPlugin(/^\\.\\.\\/index$/, (resource: any) => {\n if (resource.context === renderablesDir) {\n resource.request = shimPath(\"src/shims/slider-deps.ts\")\n }\n }),\n )\n }\n\n if (!isServer) {\n // Client-only: Node.js built-in stubs, events shim, console shim.\n const clientAliases: Record<string, string> = {\n \"node:console\": shimPath(\"src/shims/console.ts\"),\n \"events$\": shimPath(\"src/shims/events-shim.ts\"),\n \"fs/promises\": shimPath(\"src/shims/node-fs.ts\"),\n \"fs$\": shimPath(\"src/shims/node-fs.ts\"),\n \"path$\": shimPath(\"src/shims/node-path.ts\"),\n \"util$\": shimPath(\"src/shims/node-util.ts\"),\n \"os$\": shimPath(\"src/shims/node-os.ts\"),\n \"stream$\": shimPath(\"src/shims/node-stream.ts\"),\n \"url$\": shimPath(\"src/shims/node-url.ts\"),\n }\n\n config.resolve.alias = {\n ...config.resolve.alias,\n ...clientAliases,\n }\n\n // Strip `node:` and `bun:` prefixes from imports\n config.plugins.push(\n new webpack.NormalModuleReplacementPlugin(/^node:/, (resource: any) => {\n resource.request = resource.request.replace(/^node:/, \"\")\n }),\n new webpack.NormalModuleReplacementPlugin(/^bun:/, (resource: any) => {\n resource.request = resource.request.replace(/^bun:/, \"\")\n }),\n )\n }\n\n // Enable top-level await (used by opentui source code)\n config.experiments = {\n ...config.experiments,\n topLevelAwait: true,\n }\n\n return config\n },\n }\n}\n"],"mappings":";AAAA,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAsBpB,SAAS,aAAa,aAAyB,CAAC,GAAe;AAEpE,QAAM,UAAU,KAAK,QAAQ,WAAW,IAAI;AAG5C,QAAM,cAAc,KAAK,QAAQ,SAAS,eAAe;AACzD,QAAM,WAAW,KAAK,QAAQ,aAAa,eAAe;AAC1D,QAAM,YAAY,KAAK,QAAQ,aAAa,gBAAgB;AAC5D,QAAM,SAAS,KAAK,QAAQ,aAAa,aAAa;AAGtD,QAAM,YAAY,WAAW,KAAK,QAAQ,WAAW,cAAc,CAAC;AAEpE,WAAS,SAAS,GAAW;AAC3B,WAAO,KAAK,QAAQ,SAAS,CAAC;AAAA,EA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AAkB;AACrE,qBAAS,UAAU,SAAS,QAAQ,QAAQ,UAAU,EAAE;AAAA,UAC1D,CAAC;AAAA,UACD,IAAI,QAAQ,8BAA8B,SAAS,CAAC,aAAkB;AACpE,qBAAS,UAAU,SAAS,QAAQ,QAAQ,SAAS,EAAE;AAAA,UACzD,CAAC;AAAA,QACH;AAAA,MACF;AAGA,aAAO,cAAc;AAAA,QACnB,GAAG,OAAO;AAAA,QACV,eAAe;AAAA,MACjB;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":[]}
|
package/dist/next.js
CHANGED
|
@@ -5803,6 +5803,15 @@ var jt = x.lex;
|
|
|
5803
5803
|
var defaultThumbBackgroundColor = RGBA.fromHex("#9a9ea3");
|
|
5804
5804
|
var defaultTrackBackgroundColor = RGBA.fromHex("#252527");
|
|
5805
5805
|
|
|
5806
|
+
// ../../opentui/packages/core/src/zig-registry.ts
|
|
5807
|
+
if (typeof globalThis.Bun !== "undefined") {
|
|
5808
|
+
const zigPath = "./zig";
|
|
5809
|
+
try {
|
|
5810
|
+
await import(zigPath);
|
|
5811
|
+
} catch {
|
|
5812
|
+
}
|
|
5813
|
+
}
|
|
5814
|
+
|
|
5806
5815
|
// ../../opentui/packages/core/src/lib/selection.ts
|
|
5807
5816
|
function convertGlobalToLocalSelection(globalSelection, localX, localY) {
|
|
5808
5817
|
if (!globalSelection?.isActive) {
|
|
@@ -9037,9 +9046,7 @@ import { createContext, useContext } from "react";
|
|
|
9037
9046
|
var BrowserContext = createContext(null);
|
|
9038
9047
|
|
|
9039
9048
|
// src/create-browser-root.tsx
|
|
9040
|
-
import { _render } from "@gridland/core";
|
|
9041
|
-
import { AppContext } from "@gridland/core";
|
|
9042
|
-
import { ErrorBoundary as _ErrorBoundary } from "@gridland/core";
|
|
9049
|
+
import { _render, AppContext, ErrorBoundary as _ErrorBoundary } from "@gridland/core";
|
|
9043
9050
|
import { jsx } from "react/jsx-runtime";
|
|
9044
9051
|
var ErrorBoundary = _ErrorBoundary;
|
|
9045
9052
|
function createBrowserRoot(renderer) {
|
|
@@ -9114,9 +9121,7 @@ var HeadlessRenderer = class {
|
|
|
9114
9121
|
};
|
|
9115
9122
|
|
|
9116
9123
|
// src/create-headless-root.tsx
|
|
9117
|
-
import { _render as _render2, reconciler } from "@gridland/core";
|
|
9118
|
-
import { AppContext as AppContext2 } from "@gridland/core";
|
|
9119
|
-
import { ErrorBoundary as _ErrorBoundary2 } from "@gridland/core";
|
|
9124
|
+
import { _render as _render2, reconciler, AppContext as AppContext2, ErrorBoundary as _ErrorBoundary2 } from "@gridland/core";
|
|
9120
9125
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
9121
9126
|
var ErrorBoundary2 = _ErrorBoundary2;
|
|
9122
9127
|
var _r = reconciler;
|