@seedgrid/fe-components 2026.3.2-2 → 2026.3.2-4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SgPlayground.d.ts","sourceRoot":"","sources":["../../src/others/SgPlayground.tsx"],"names":[],"mappings":"AAiBA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;IAChD,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"SgPlayground.d.ts","sourceRoot":"","sources":["../../src/others/SgPlayground.tsx"],"names":[],"mappings":"AAiBA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;IAChD,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA6jBF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAAC,2CAyPtE"}
|
|
@@ -12,7 +12,9 @@ const DEFAULT_SEEDGRID_PEER_DEPENDENCIES = {
|
|
|
12
12
|
"@codesandbox/sandpack-react": "^2.20.0",
|
|
13
13
|
"react-hook-form": "^7.0.0",
|
|
14
14
|
"lucide-react": "^0.468.0",
|
|
15
|
+
"@tiptap/core": "^2.9.1",
|
|
15
16
|
"@tiptap/react": "^2.9.1",
|
|
17
|
+
"@tiptap/pm": "^2.9.1",
|
|
16
18
|
"@tiptap/starter-kit": "^2.9.1",
|
|
17
19
|
"@tiptap/extension-underline": "^2.9.1",
|
|
18
20
|
"@tiptap/extension-link": "^2.9.1",
|
|
@@ -25,6 +27,11 @@ const DEFAULT_SEEDGRID_PEER_DEPENDENCIES = {
|
|
|
25
27
|
"@tiptap/extension-superscript": "^2.9.1",
|
|
26
28
|
"@tiptap/extension-font-family": "^2.9.1"
|
|
27
29
|
};
|
|
30
|
+
const DEFAULT_SANDPACK_POLYFILLS = {
|
|
31
|
+
assert: "^2.1.0",
|
|
32
|
+
process: "^0.11.10",
|
|
33
|
+
util: "^0.12.5"
|
|
34
|
+
};
|
|
28
35
|
const SANDPACK_EXTERNAL_RESOURCES = [
|
|
29
36
|
// Prebuilt utility CSS so classes from @seedgrid/fe-components can render inside Sandpack
|
|
30
37
|
"https://unpkg.com/tailwindcss@2.2.19/dist/tailwind.min.css"
|
|
@@ -53,6 +60,186 @@ const qrcodeShim = {
|
|
|
53
60
|
export const toDataURL = (...args) => qrcodeShim.toDataURL(...args);
|
|
54
61
|
export default qrcodeShim;
|
|
55
62
|
`;
|
|
63
|
+
const SANDPACK_MARKDOWN_IT_BIN_SHIM = `import markdownit from "../index.mjs";
|
|
64
|
+
|
|
65
|
+
// Browser-safe shim: Sandpack must not execute markdown-it CLI entrypoint.
|
|
66
|
+
// Re-export parser factory so accidental imports of the bin path remain harmless.
|
|
67
|
+
export default markdownit;
|
|
68
|
+
export { markdownit };
|
|
69
|
+
`;
|
|
70
|
+
const SANDPACK_ASSERT_SHIM_PACKAGE_JSON = `{
|
|
71
|
+
"name": "assert",
|
|
72
|
+
"version": "0.0.0-sandpack-shim",
|
|
73
|
+
"main": "./index.js"
|
|
74
|
+
}`;
|
|
75
|
+
const SANDPACK_ASSERT_SHIM_INDEX_JS = `function fail(message) {
|
|
76
|
+
throw new Error(message || "Assertion failed");
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function assert(value, message) {
|
|
80
|
+
if (!value) fail(message);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
assert.ok = assert;
|
|
84
|
+
assert.equal = function equal(actual, expected, message) {
|
|
85
|
+
if (actual != expected) fail(message || "Expected values to be loosely equal");
|
|
86
|
+
};
|
|
87
|
+
assert.strictEqual = function strictEqual(actual, expected, message) {
|
|
88
|
+
if (actual !== expected) fail(message || "Expected values to be strictly equal");
|
|
89
|
+
};
|
|
90
|
+
assert.notEqual = function notEqual(actual, expected, message) {
|
|
91
|
+
if (actual == expected) fail(message || "Expected values to be different");
|
|
92
|
+
};
|
|
93
|
+
assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
|
|
94
|
+
if (actual === expected) fail(message || "Expected values to be different");
|
|
95
|
+
};
|
|
96
|
+
assert.deepEqual = function deepEqual(actual, expected, message) {
|
|
97
|
+
try {
|
|
98
|
+
if (JSON.stringify(actual) !== JSON.stringify(expected)) {
|
|
99
|
+
fail(message || "Expected values to be deeply equal");
|
|
100
|
+
}
|
|
101
|
+
} catch (_) {
|
|
102
|
+
if (actual !== expected) fail(message || "Expected values to be deeply equal");
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
assert.throws = function throwsAssertion(fn, message) {
|
|
106
|
+
var didThrow = false;
|
|
107
|
+
try { fn(); } catch (_) { didThrow = true; }
|
|
108
|
+
if (!didThrow) fail(message || "Expected function to throw");
|
|
109
|
+
};
|
|
110
|
+
assert.fail = fail;
|
|
111
|
+
|
|
112
|
+
module.exports = assert;
|
|
113
|
+
module.exports.default = assert;
|
|
114
|
+
`;
|
|
115
|
+
const SANDPACK_UTIL_SHIM_PACKAGE_JSON = `{
|
|
116
|
+
"name": "util",
|
|
117
|
+
"version": "0.0.0-sandpack-shim",
|
|
118
|
+
"main": "./index.js"
|
|
119
|
+
}`;
|
|
120
|
+
const SANDPACK_UTIL_SHIM_INDEX_JS = `const inspect = function inspect(value) {
|
|
121
|
+
try {
|
|
122
|
+
return JSON.stringify(value);
|
|
123
|
+
} catch (_) {
|
|
124
|
+
return String(value);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
inspect.custom = typeof Symbol !== "undefined" && Symbol.for
|
|
129
|
+
? Symbol.for("nodejs.util.inspect.custom")
|
|
130
|
+
: "@@nodejs.util.inspect.custom";
|
|
131
|
+
|
|
132
|
+
function deprecate(fn, message) {
|
|
133
|
+
var warned = false;
|
|
134
|
+
return function deprecatedWrapper() {
|
|
135
|
+
if (!warned && typeof console !== "undefined" && typeof console.warn === "function") {
|
|
136
|
+
console.warn(message);
|
|
137
|
+
warned = true;
|
|
138
|
+
}
|
|
139
|
+
return fn.apply(this, arguments);
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function format() {
|
|
144
|
+
return Array.prototype.map.call(arguments, function (item) {
|
|
145
|
+
return String(item);
|
|
146
|
+
}).join(" ");
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const utilShim = { inspect, deprecate, format };
|
|
150
|
+
module.exports = utilShim;
|
|
151
|
+
module.exports.default = utilShim;
|
|
152
|
+
`;
|
|
153
|
+
const SANDPACK_PATH_SHIM_PACKAGE_JSON = `{
|
|
154
|
+
"name": "path",
|
|
155
|
+
"version": "0.0.0-sandpack-shim",
|
|
156
|
+
"main": "./index.js"
|
|
157
|
+
}`;
|
|
158
|
+
const SANDPACK_PATH_SHIM_INDEX_JS = `function normalize(input) {
|
|
159
|
+
return String(input || "").replace(/\\\\/g, "/");
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function basename(input) {
|
|
163
|
+
var text = normalize(input);
|
|
164
|
+
var pieces = text.split("/").filter(Boolean);
|
|
165
|
+
return pieces.length ? pieces[pieces.length - 1] : "";
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function dirname(input) {
|
|
169
|
+
var text = normalize(input);
|
|
170
|
+
var index = text.lastIndexOf("/");
|
|
171
|
+
if (index <= 0) return ".";
|
|
172
|
+
return text.slice(0, index);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function join() {
|
|
176
|
+
return Array.prototype
|
|
177
|
+
.map.call(arguments, normalize)
|
|
178
|
+
.filter(Boolean)
|
|
179
|
+
.join("/")
|
|
180
|
+
.replace(/\\/{2,}/g, "/");
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function resolve() {
|
|
184
|
+
return join.apply(null, arguments);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const pathShim = {
|
|
188
|
+
sep: "/",
|
|
189
|
+
delimiter: ":",
|
|
190
|
+
basename,
|
|
191
|
+
dirname,
|
|
192
|
+
join,
|
|
193
|
+
resolve,
|
|
194
|
+
normalize
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
module.exports = pathShim;
|
|
198
|
+
module.exports.default = pathShim;
|
|
199
|
+
`;
|
|
200
|
+
const SANDPACK_FS_SHIM_PACKAGE_JSON = `{
|
|
201
|
+
"name": "fs",
|
|
202
|
+
"version": "0.0.0-sandpack-shim",
|
|
203
|
+
"main": "./index.js"
|
|
204
|
+
}`;
|
|
205
|
+
const SANDPACK_FS_SHIM_INDEX_JS = `function notSupported(name) {
|
|
206
|
+
throw new Error("fs." + name + " is not supported in Sandpack browser runtime.");
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const fsShim = {
|
|
210
|
+
openSync: function openSync() { return notSupported("openSync"); },
|
|
211
|
+
createReadStream: function createReadStream() { return notSupported("createReadStream"); },
|
|
212
|
+
createWriteStream: function createWriteStream() { return notSupported("createWriteStream"); },
|
|
213
|
+
readFileSync: function readFileSync() { return notSupported("readFileSync"); }
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
module.exports = fsShim;
|
|
217
|
+
module.exports.default = fsShim;
|
|
218
|
+
`;
|
|
219
|
+
const SANDPACK_PROCESS_SHIM_PACKAGE_JSON = `{
|
|
220
|
+
"name": "process",
|
|
221
|
+
"version": "0.0.0-sandpack-shim",
|
|
222
|
+
"main": "./index.js"
|
|
223
|
+
}`;
|
|
224
|
+
const SANDPACK_PROCESS_SHIM_INDEX_JS = `const processShim = {
|
|
225
|
+
env: {},
|
|
226
|
+
argv: ["browser"],
|
|
227
|
+
stdout: { columns: 80 },
|
|
228
|
+
stderr: { columns: 80 },
|
|
229
|
+
cwd: function cwd() { return "/"; },
|
|
230
|
+
nextTick: function nextTick(fn) {
|
|
231
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
232
|
+
return Promise.resolve().then(function () { return fn.apply(null, args); });
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
if (typeof globalThis !== "undefined" && !globalThis.process) {
|
|
237
|
+
globalThis.process = processShim;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
module.exports = processShim;
|
|
241
|
+
module.exports.default = processShim;
|
|
242
|
+
`;
|
|
56
243
|
const SANDPACK_FALLBACK_THEME_VARS = {
|
|
57
244
|
"--background": "0 0% 100%",
|
|
58
245
|
"--foreground": "222.2 84% 4.9%",
|
|
@@ -388,11 +575,28 @@ export default function SgPlayground(props) {
|
|
|
388
575
|
"/styles.css": { code: sandpackStylesCss || buildSandpackStylesCss({}, effectivePreviewPadding) },
|
|
389
576
|
// Compatibility shim for legacy @seedgrid/fe-components builds that still import "qrcode" (node-only path).
|
|
390
577
|
"/node_modules/qrcode/package.json": { code: SANDPACK_QRCODE_SHIM_PACKAGE_JSON, hidden: true },
|
|
391
|
-
"/node_modules/qrcode/index.js": { code: SANDPACK_QRCODE_SHIM_INDEX_JS, hidden: true }
|
|
578
|
+
"/node_modules/qrcode/index.js": { code: SANDPACK_QRCODE_SHIM_INDEX_JS, hidden: true },
|
|
579
|
+
// markdown-it CLI entry uses node:fs and breaks in browser runtime.
|
|
580
|
+
"/node_modules/markdown-it/bin/markdown-it.mjs": {
|
|
581
|
+
code: SANDPACK_MARKDOWN_IT_BIN_SHIM,
|
|
582
|
+
hidden: true
|
|
583
|
+
},
|
|
584
|
+
// Node builtin compatibility shims used by transitive dependencies (e.g. argparse from markdown-it/tiptap).
|
|
585
|
+
"/node_modules/assert/package.json": { code: SANDPACK_ASSERT_SHIM_PACKAGE_JSON, hidden: true },
|
|
586
|
+
"/node_modules/assert/index.js": { code: SANDPACK_ASSERT_SHIM_INDEX_JS, hidden: true },
|
|
587
|
+
"/node_modules/util/package.json": { code: SANDPACK_UTIL_SHIM_PACKAGE_JSON, hidden: true },
|
|
588
|
+
"/node_modules/util/index.js": { code: SANDPACK_UTIL_SHIM_INDEX_JS, hidden: true },
|
|
589
|
+
"/node_modules/path/package.json": { code: SANDPACK_PATH_SHIM_PACKAGE_JSON, hidden: true },
|
|
590
|
+
"/node_modules/path/index.js": { code: SANDPACK_PATH_SHIM_INDEX_JS, hidden: true },
|
|
591
|
+
"/node_modules/fs/package.json": { code: SANDPACK_FS_SHIM_PACKAGE_JSON, hidden: true },
|
|
592
|
+
"/node_modules/fs/index.js": { code: SANDPACK_FS_SHIM_INDEX_JS, hidden: true },
|
|
593
|
+
"/node_modules/process/package.json": { code: SANDPACK_PROCESS_SHIM_PACKAGE_JSON, hidden: true },
|
|
594
|
+
"/node_modules/process/index.js": { code: SANDPACK_PROCESS_SHIM_INDEX_JS, hidden: true }
|
|
392
595
|
};
|
|
393
596
|
const deps = {
|
|
394
597
|
react: "^19.0.0",
|
|
395
598
|
"react-dom": "^19.0.0",
|
|
599
|
+
...DEFAULT_SANDPACK_POLYFILLS,
|
|
396
600
|
...DEFAULT_SEEDGRID_PEER_DEPENDENCIES,
|
|
397
601
|
"@seedgrid/fe-components": resolvedSeedgridDependency,
|
|
398
602
|
...(dependencies ?? {})
|
|
@@ -409,7 +613,9 @@ export default function SgPlayground(props) {
|
|
|
409
613
|
autorun: false,
|
|
410
614
|
initMode: "lazy",
|
|
411
615
|
bundlerURL: "https://sandpack.seedgrid.com.br",
|
|
616
|
+
// Keep both keys while sandpack typings/runtime differ across versions.
|
|
412
617
|
bundlerTimeOut: 60000,
|
|
618
|
+
bundlerTimeout: 60000,
|
|
413
619
|
activeFile: "/App.tsx",
|
|
414
620
|
visibleFiles: ["/App.tsx"],
|
|
415
621
|
externalResources: SANDPACK_EXTERNAL_RESOURCES
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seedgrid/fe-components",
|
|
3
|
-
"version": "2026.3.2-
|
|
3
|
+
"version": "2026.3.2-4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,11 +29,13 @@
|
|
|
29
29
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
+
"@tiptap/core": "^2.9.1",
|
|
32
33
|
"@tiptap/extension-color": "^2.9.1",
|
|
33
34
|
"@tiptap/extension-font-family": "^2.9.1",
|
|
34
35
|
"@tiptap/extension-highlight": "^2.9.1",
|
|
35
36
|
"@tiptap/extension-image": "^2.9.1",
|
|
36
37
|
"@tiptap/extension-link": "^2.9.1",
|
|
38
|
+
"@tiptap/pm": "^2.9.1",
|
|
37
39
|
"@tiptap/extension-subscript": "^2.9.1",
|
|
38
40
|
"@tiptap/extension-superscript": "^2.9.1",
|
|
39
41
|
"@tiptap/extension-text-align": "^2.9.1",
|
|
@@ -46,11 +48,13 @@
|
|
|
46
48
|
"react-hook-form": "^7.0.0"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
51
|
+
"@tiptap/core": "^2.9.1",
|
|
49
52
|
"@tiptap/extension-color": "^2.9.1",
|
|
50
53
|
"@tiptap/extension-font-family": "^2.9.1",
|
|
51
54
|
"@tiptap/extension-highlight": "^2.9.1",
|
|
52
55
|
"@tiptap/extension-image": "^2.9.1",
|
|
53
56
|
"@tiptap/extension-link": "^2.9.1",
|
|
57
|
+
"@tiptap/pm": "^2.9.1",
|
|
54
58
|
"@tiptap/extension-subscript": "^2.9.1",
|
|
55
59
|
"@tiptap/extension-superscript": "^2.9.1",
|
|
56
60
|
"@tiptap/extension-text-align": "^2.9.1",
|