@seedgrid/fe-components 2026.3.2-7 → 2026.3.2-9
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":"
|
|
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,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,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,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC1C,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;AAEF,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;AACnF,MAAM,MAAM,uBAAuB,GAAG;IACpC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AA0vBF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAAC,2CA8YtE"}
|
|
@@ -4,11 +4,6 @@ import * as React from "react";
|
|
|
4
4
|
import { SandpackCodeEditor, SandpackPreview, SandpackProvider, useSandpack } from "@codesandbox/sandpack-react";
|
|
5
5
|
import { SgButton } from "../buttons/SgButton";
|
|
6
6
|
import { SgCard } from "../layout/SgCard";
|
|
7
|
-
import blockedEmailDomainsConfig from "../blocked-email-domains.json";
|
|
8
|
-
import componentsMessagesEnUsJson from "../i18n/en-US.json";
|
|
9
|
-
import componentsMessagesEsJson from "../i18n/es.json";
|
|
10
|
-
import componentsMessagesPtBrJson from "../i18n/pt-BR.json";
|
|
11
|
-
import componentsMessagesPtPtJson from "../i18n/pt-PT.json";
|
|
12
7
|
function cn(...parts) {
|
|
13
8
|
return parts.filter(Boolean).join(" ");
|
|
14
9
|
}
|
|
@@ -119,6 +114,27 @@ const SANDPACK_TIPTAP_EXTENSION_SHIM_INDEX_JS = `const extension = {
|
|
|
119
114
|
};
|
|
120
115
|
export default extension;
|
|
121
116
|
`;
|
|
117
|
+
const SANDPACK_SEEDGRID_TEXT_EDITOR_SHIM_INDEX_JS = `import * as React from "react";
|
|
118
|
+
|
|
119
|
+
export function SgTextEditor() {
|
|
120
|
+
return React.createElement(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
style: {
|
|
124
|
+
padding: "0.75rem",
|
|
125
|
+
border: "1px solid #e4e4e7",
|
|
126
|
+
borderRadius: "0.5rem",
|
|
127
|
+
fontSize: "0.875rem",
|
|
128
|
+
color: "#6b7280",
|
|
129
|
+
background: "#f9fafb"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"SgTextEditor is disabled in this sandbox preset."
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export default SgTextEditor;
|
|
137
|
+
`;
|
|
122
138
|
const SANDPACK_ASSERT_SHIM_INDEX_JS = `function fail(message) {
|
|
123
139
|
throw new Error(message || "Assertion failed");
|
|
124
140
|
}
|
|
@@ -401,18 +417,40 @@ function resolveDefaultNpmRegistriesFromEnv() {
|
|
|
401
417
|
}
|
|
402
418
|
];
|
|
403
419
|
}
|
|
404
|
-
function
|
|
420
|
+
function buildCjsModule(value) {
|
|
405
421
|
const serialized = JSON.stringify(value);
|
|
406
422
|
return `const data = ${serialized};
|
|
407
423
|
module.exports = data;
|
|
408
424
|
module.exports.default = data;
|
|
409
425
|
`;
|
|
410
426
|
}
|
|
411
|
-
const
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
427
|
+
const SANDPACK_MIN_COMPONENT_MESSAGES = {
|
|
428
|
+
"components.actions.clear": "Clear",
|
|
429
|
+
"components.actions.cancel": "Cancel",
|
|
430
|
+
"components.actions.confirm": "Confirm",
|
|
431
|
+
"components.inputs.required": "Required field.",
|
|
432
|
+
"components.inputs.maxLength": "Maximum {max} characters.",
|
|
433
|
+
"components.inputs.minLength": "Minimum {min} characters.",
|
|
434
|
+
"components.inputs.minWords": "Minimum {min} words.",
|
|
435
|
+
"components.inputs.email.invalid": "Invalid email.",
|
|
436
|
+
"components.inputs.phone.invalid": "Invalid phone.",
|
|
437
|
+
"components.inputs.date.invalid": "Invalid date.",
|
|
438
|
+
"components.inputs.number.min": "Value must be at least {min}.",
|
|
439
|
+
"components.inputs.number.max": "Value must be at most {max}.",
|
|
440
|
+
"components.password.show": "Show password",
|
|
441
|
+
"components.password.hide": "Hide password",
|
|
442
|
+
"components.autocomplete.empty": "No records found.",
|
|
443
|
+
"components.autocomplete.loading": "Loading...",
|
|
444
|
+
"components.rating.cancel": "Cancel rating",
|
|
445
|
+
"components.radiogroup.cancel": "No option"
|
|
446
|
+
};
|
|
447
|
+
const SANDPACK_SEEDGRID_PT_BR_JSON_SHIM = buildCjsModule(SANDPACK_MIN_COMPONENT_MESSAGES);
|
|
448
|
+
const SANDPACK_SEEDGRID_PT_PT_JSON_SHIM = buildCjsModule(SANDPACK_MIN_COMPONENT_MESSAGES);
|
|
449
|
+
const SANDPACK_SEEDGRID_EN_US_JSON_SHIM = buildCjsModule(SANDPACK_MIN_COMPONENT_MESSAGES);
|
|
450
|
+
const SANDPACK_SEEDGRID_ES_JSON_SHIM = buildCjsModule(SANDPACK_MIN_COMPONENT_MESSAGES);
|
|
451
|
+
const SANDPACK_SEEDGRID_BLOCKED_EMAIL_DOMAINS_JSON_SHIM = buildCjsModule({
|
|
452
|
+
blockedEmailDomains: []
|
|
453
|
+
});
|
|
416
454
|
function parseRgbParts(raw) {
|
|
417
455
|
const value = raw.trim();
|
|
418
456
|
if (!value)
|
|
@@ -797,15 +835,35 @@ export default function SgPlayground(props) {
|
|
|
797
835
|
};
|
|
798
836
|
}
|
|
799
837
|
if (shouldShimTiptap) {
|
|
838
|
+
files["/node_modules/@seedgrid/fe-components/dist/inputs/SgTextEditor.js"] = {
|
|
839
|
+
code: SANDPACK_SEEDGRID_TEXT_EDITOR_SHIM_INDEX_JS,
|
|
840
|
+
hidden: true
|
|
841
|
+
};
|
|
842
|
+
files["/node_modules/@seedgrid/fe-components/dist/inputs/SgTextEditor"] = {
|
|
843
|
+
code: SANDPACK_SEEDGRID_TEXT_EDITOR_SHIM_INDEX_JS,
|
|
844
|
+
hidden: true
|
|
845
|
+
};
|
|
846
|
+
files["/node_modules/@seedgrid/fe-components/dist/inputs/SgTextEditor.mjs"] = {
|
|
847
|
+
code: SANDPACK_SEEDGRID_TEXT_EDITOR_SHIM_INDEX_JS,
|
|
848
|
+
hidden: true
|
|
849
|
+
};
|
|
800
850
|
files["/node_modules/@tiptap/react/index.js"] = {
|
|
801
851
|
code: SANDPACK_TIPTAP_REACT_SHIM_INDEX_JS,
|
|
802
852
|
hidden: true
|
|
803
853
|
};
|
|
854
|
+
files["/node_modules/@tiptap/react/index.mjs"] = {
|
|
855
|
+
code: SANDPACK_TIPTAP_REACT_SHIM_INDEX_JS,
|
|
856
|
+
hidden: true
|
|
857
|
+
};
|
|
804
858
|
for (const packageName of TIPTAP_SHIM_PACKAGES) {
|
|
805
859
|
files[`/node_modules/${packageName}/index.js`] = {
|
|
806
860
|
code: SANDPACK_TIPTAP_EXTENSION_SHIM_INDEX_JS,
|
|
807
861
|
hidden: true
|
|
808
862
|
};
|
|
863
|
+
files[`/node_modules/${packageName}/index.mjs`] = {
|
|
864
|
+
code: SANDPACK_TIPTAP_EXTENSION_SHIM_INDEX_JS,
|
|
865
|
+
hidden: true
|
|
866
|
+
};
|
|
809
867
|
}
|
|
810
868
|
}
|
|
811
869
|
const deps = {
|