unframer 2.18.4 → 2.19.0
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/exporter.d.ts.map +1 -1
- package/dist/exporter.js +12 -6
- package/dist/exporter.js.map +1 -1
- package/dist/framer.d.ts.map +1 -1
- package/dist/framer.js +9 -0
- package/dist/framer.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/exporter.d.ts.map +1 -1
- package/esm/exporter.js +12 -6
- package/esm/exporter.js.map +1 -1
- package/esm/framer.d.ts.map +1 -1
- package/esm/framer.js +9 -0
- package/esm/framer.js.map +1 -1
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +4 -4
- package/src/exporter.ts +16 -8
- package/src/framer.js +10 -0
- package/src/version.ts +1 -1
package/esm/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "2.
|
|
1
|
+
export declare const version = "2.19.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '2.
|
|
1
|
+
export const version = '2.19.0';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unframer",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"description": "Import Framer components directly in your React app, type safe and customizable",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"repository": "https://github.com/remorses/unframer",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"@babel/types": "^7.26.7",
|
|
68
68
|
"@types/babel__core": "^7.20.5",
|
|
69
69
|
"@types/babel__traverse": "^7.20.6",
|
|
70
|
-
"@types/bun": "^1.
|
|
71
|
-
"@types/node": "^22.
|
|
72
|
-
"@types/react": "^
|
|
70
|
+
"@types/bun": "^1.1.6",
|
|
71
|
+
"@types/node": "^22.13.0",
|
|
72
|
+
"@types/react": "^18.3.12",
|
|
73
73
|
"@xmorse/deployment-utils": "^0.2.19",
|
|
74
74
|
"concurrently": "^9.1.2",
|
|
75
75
|
"openai": "^4.80.1",
|
package/src/exporter.ts
CHANGED
|
@@ -656,12 +656,12 @@ export async function checkUnframerVersion({ cwd }: { cwd: string }) {
|
|
|
656
656
|
const installedVersion = await resolvePackage({ cwd, pkg: 'unframer' })
|
|
657
657
|
if (installedVersion !== currentVersion) {
|
|
658
658
|
spinner.error(
|
|
659
|
-
`Unframer version mismatch. Please run: npm update unframer@latest`,
|
|
659
|
+
`IMPORTANT: Unframer version mismatch. Please run: npm update unframer@latest`,
|
|
660
660
|
)
|
|
661
661
|
}
|
|
662
662
|
} catch (e) {
|
|
663
663
|
spinner.error(
|
|
664
|
-
'Unframer is not installed in your project. Please run: npm install unframer',
|
|
664
|
+
'IMPORTANT: Unframer is not installed in your project. Please run: npm install unframer',
|
|
665
665
|
)
|
|
666
666
|
}
|
|
667
667
|
}
|
|
@@ -904,27 +904,35 @@ export async function extractPropControlsUnsafe(
|
|
|
904
904
|
const code = `import("${fileUrl}").then(x => { console.log("${delimiter}"); console.log(${propCode}) })`
|
|
905
905
|
|
|
906
906
|
const TIMEOUT = 5 * 1000
|
|
907
|
-
const UNFRAMER_MAP_PACKAGES =
|
|
907
|
+
const UNFRAMER_MAP_PACKAGES = {
|
|
908
908
|
unframer: url.pathToFileURL(require.resolve('../esm/index.js')).href,
|
|
909
909
|
react: url.pathToFileURL(require.resolve('react')).href,
|
|
910
910
|
'react-dom': url.pathToFileURL(require.resolve('react-dom')).href,
|
|
911
911
|
'react/jsx-runtime': url.pathToFileURL(
|
|
912
912
|
require.resolve('react/jsx-runtime'),
|
|
913
913
|
).href,
|
|
914
|
-
}
|
|
914
|
+
}
|
|
915
|
+
let loaderOption = `--loader ${url.pathToFileURL(
|
|
916
|
+
require.resolve('../dist/unframer-loader.js'),
|
|
917
|
+
)}`
|
|
918
|
+
try {
|
|
919
|
+
require.resolve('unframer/package.json')
|
|
920
|
+
|
|
921
|
+
UNFRAMER_MAP_PACKAGES.unframer = ''
|
|
922
|
+
} catch {}
|
|
915
923
|
let stdout = await new Promise<string>((res, rej) => {
|
|
916
924
|
const cmd = `"${
|
|
917
925
|
nodePath
|
|
918
|
-
}" --no-warnings --input-type=module
|
|
919
|
-
require.resolve('../dist/unframer-loader.js'),
|
|
920
|
-
)} -e ${JSON.stringify(code)}`
|
|
926
|
+
}" --no-warnings --input-type=module ${loaderOption} -e ${JSON.stringify(code)}`
|
|
921
927
|
|
|
922
928
|
let childProcess = exec(
|
|
923
929
|
cmd,
|
|
924
930
|
{
|
|
925
931
|
env: {
|
|
926
932
|
// ...process.env,
|
|
927
|
-
UNFRAMER_MAP_PACKAGES
|
|
933
|
+
UNFRAMER_MAP_PACKAGES: JSON.stringify(
|
|
934
|
+
UNFRAMER_MAP_PACKAGES,
|
|
935
|
+
),
|
|
928
936
|
},
|
|
929
937
|
},
|
|
930
938
|
(err, stdout, stderr) => {
|
package/src/framer.js
CHANGED
|
@@ -554462,5 +554462,15 @@ if (typeof document !== 'undefined') {
|
|
|
554462
554462
|
document.head.appendChild(fragment);
|
|
554463
554463
|
}
|
|
554464
554464
|
|
|
554465
|
+
if (typeof document !== 'undefined'){
|
|
554466
|
+
const clearCaches = () => {
|
|
554467
|
+
defaultSheet = undefined
|
|
554468
|
+
componentsWithServerRenderedStyles.clear()
|
|
554469
|
+
defaultCache.clear()
|
|
554470
|
+
};
|
|
554471
|
+
document.addEventListener('astro:before-preparation', clearCaches);
|
|
554472
|
+
document.addEventListener('astro:before-swap', clearCaches);
|
|
554473
|
+
}
|
|
554474
|
+
|
|
554465
554475
|
export { Link as FramerLink }
|
|
554466
554476
|
export { Router, FetchClientProvider, FormContext, LocaleInfoContext }
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.
|
|
1
|
+
export const version = '2.19.0'
|