unframer 2.5.2 → 2.6.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/esm/react.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ComponentType } from 'react';
1
2
  import { defaultBreakpointSizes } from './css.js';
2
3
  export type UnframerBreakpoint = keyof typeof defaultBreakpointSizes;
3
4
  /**
@@ -6,5 +7,14 @@ export type UnframerBreakpoint = keyof typeof defaultBreakpointSizes;
6
7
  export declare function FramerStyles({ Components }: {
7
8
  Components?: any[] | undefined;
8
9
  }): any;
9
- export declare const WithFramerBreakpoints: any;
10
+ export declare const WithFramerBreakpoints: import("react").ForwardRefExoticComponent<{
11
+ Component: ComponentType<{
12
+ variant?: any;
13
+ className?: string | undefined;
14
+ }>;
15
+ variants: Record<"2xl" | "base" | "sm" | "md" | "lg" | "xl", any>;
16
+ } & Omit<{
17
+ variant?: any;
18
+ className?: string | undefined;
19
+ }, "variant"> & import("react").RefAttributes<unknown>>;
10
20
  //# sourceMappingURL=react.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AAWA,OAAO,EAEH,sBAAsB,EAEzB,MAAM,UAAU,CAAA;AAWjB,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,sBAAsB,CAAA;AA8BpE;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,UAAwB,EAAE;;CAAA,GAAG,GAAG,CAmD9D;AAED,eAAO,MAAM,qBAAqB,KA4EhC,CAAA"}
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEH,aAAa,EAKhB,MAAM,OAAO,CAAA;AACd,OAAO,EAEH,sBAAsB,EAEzB,MAAM,UAAU,CAAA;AAWjB,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,sBAAsB,CAAA;AA8BpE;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,UAAwB,EAAE;;CAAA,GAAG,GAAG,CAmD9D;AAED,eAAO,MAAM,qBAAqB;;kBACM,GAAG;;;;;cAAH,GAAG;;uDA2EzC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unframer",
3
- "version": "2.5.2",
3
+ "version": "2.6.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",
@@ -20,6 +20,9 @@
20
20
  "module": "./esm/index.js",
21
21
  "default": "./dist/index.js"
22
22
  },
23
+ "./src/framer.js": {
24
+ "default": "./src/framer.js"
25
+ },
23
26
  "./package.json": "./package.json"
24
27
  },
25
28
  "keywords": [],
@@ -43,7 +46,7 @@
43
46
  "json5": "^2.2.3",
44
47
  "native-fetch": "^4.0.2",
45
48
  "picocolors": "^1.0.0",
46
- "real-framer-motion": "npm:framer-motion@11.1.7",
49
+ "real-framer-motion": "npm:framer-motion@11.2.10",
47
50
  "tmp": "^0.2.1"
48
51
  },
49
52
  "devDependencies": {
@@ -56,8 +59,10 @@
56
59
  "@babel/types": "^7.24.5",
57
60
  "@types/babel__core": "^7.20.5",
58
61
  "@types/babel__traverse": "^7.20.5",
62
+ "@types/bun": "^1.1.5",
59
63
  "@types/fs-extra": "^11.0.1",
60
64
  "@types/node": "^20.5.7",
65
+ "@types/react": "^18.3.3",
61
66
  "@xmorse/deployment-utils": "^0.1.0",
62
67
  "concurrently": "^8.2.2",
63
68
  "openai": "^4.40.2",
package/src/esbuild.ts CHANGED
@@ -12,6 +12,7 @@ export const externalPackages = [
12
12
  let redirectCache = new Map<string, Promise<string>>()
13
13
  export function esbuildPluginBundleDependencies({
14
14
  signal = undefined as AbortSignal | undefined,
15
+ externalizeNpm = false,
15
16
  }) {
16
17
  const codeCache = new Map()
17
18
 
@@ -72,6 +73,12 @@ export function esbuildPluginBundleDependencies({
72
73
  namespace,
73
74
  }
74
75
  }
76
+ if (externalizeNpm) {
77
+ return {
78
+ path: args.path,
79
+ external: true,
80
+ }
81
+ }
75
82
 
76
83
  const url = `https://esm.sh/${args.path}`
77
84
 
@@ -119,7 +126,14 @@ export function esbuildPluginBundleDependencies({
119
126
  loader = 'json'
120
127
  return await res.text()
121
128
  }
122
- const text = await res.text()
129
+ let text = await res.text()
130
+
131
+ // when it finds a line with /* webpackIgnore: true */
132
+ // it also adds /* @vite-ignore */
133
+ text = text.replace(
134
+ /(\/\* webpackIgnore: true \*\/)/g,
135
+ '$1 /* @vite-ignore */',
136
+ )
123
137
 
124
138
  const transformed = await transform(text, {
125
139
  define: {