@reframejs/unframer 4.2.0-reframe.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.
Files changed (111) hide show
  1. package/README.md +389 -0
  2. package/bin.js +5 -0
  3. package/dist/babel-jsx.d.ts +24 -0
  4. package/dist/babel-jsx.js +299 -0
  5. package/dist/babel-plugin-imports.d.ts +15 -0
  6. package/dist/babel-plugin-imports.js +211 -0
  7. package/dist/babel-typedoc.d.ts +39 -0
  8. package/dist/babel-typedoc.js +76 -0
  9. package/dist/bin.d.ts +2 -0
  10. package/dist/bin.js +3 -0
  11. package/dist/cli.d.ts +59 -0
  12. package/dist/cli.js +821 -0
  13. package/dist/compat.d.ts +2 -0
  14. package/dist/compat.js +23 -0
  15. package/dist/config.d.ts +18 -0
  16. package/dist/config.js +27 -0
  17. package/dist/css-core.d.ts +50 -0
  18. package/dist/css-core.js +231 -0
  19. package/dist/css.d.ts +15 -0
  20. package/dist/css.js +36 -0
  21. package/dist/esbuild.d.ts +31 -0
  22. package/dist/esbuild.js +317 -0
  23. package/dist/exporter.d.ts +96 -0
  24. package/dist/exporter.js +1151 -0
  25. package/dist/flat-cache-interceptor.d.ts +24 -0
  26. package/dist/flat-cache-interceptor.js +87 -0
  27. package/dist/framer-chunks/chunk-IKQSD2QC.js +10 -0
  28. package/dist/framer-chunks/fontshare-PZLWRK4B-MHMZIGTX.js +7 -0
  29. package/dist/framer-chunks/fontshare-SXU5BGFE-OWTMMPGS.js +7 -0
  30. package/dist/framer-chunks/fontshare-TIA7QUPT-PUDLUTQ7.js +7 -0
  31. package/dist/framer-chunks/framer-font-RD2SUPQH-Q4MS7WS6.js +7 -0
  32. package/dist/framer-chunks/google-EGNT223R-P4DUHBW2.js +7 -0
  33. package/dist/framer-chunks/google-H6SFY4F5-5JSJCGDR.js +7 -0
  34. package/dist/framer-chunks/google-YSYBFRE6-L7YAHH7V.js +7 -0
  35. package/dist/framer-client.server.d.ts +4 -0
  36. package/dist/framer-client.server.js +45 -0
  37. package/dist/framer-package-versions.d.ts +781 -0
  38. package/dist/framer-package-versions.js +782 -0
  39. package/dist/framer-types.d.ts +30 -0
  40. package/dist/framer-types.js +35 -0
  41. package/dist/framer.d.ts +4990 -0
  42. package/dist/framer.js +64296 -0
  43. package/dist/index.d.ts +10 -0
  44. package/dist/index.js +13 -0
  45. package/dist/package-manager.d.ts +10 -0
  46. package/dist/package-manager.js +138 -0
  47. package/dist/plugin-mcp-dist/lib/client-websocket.d.ts +5 -0
  48. package/dist/plugin-mcp-dist/lib/client-websocket.js +103 -0
  49. package/dist/plugin-mcp-dist/lib/cms.d.ts +10 -0
  50. package/dist/plugin-mcp-dist/lib/cms.js +58 -0
  51. package/dist/plugin-mcp-dist/lib/errors.d.ts +5 -0
  52. package/dist/plugin-mcp-dist/lib/errors.js +48 -0
  53. package/dist/plugin-mcp-dist/lib/framer-client.d.ts +2 -0
  54. package/dist/plugin-mcp-dist/lib/framer-client.js +4 -0
  55. package/dist/plugin-mcp-dist/lib/framer-client.server.d.ts +3 -0
  56. package/dist/plugin-mcp-dist/lib/framer-client.server.js +46 -0
  57. package/dist/plugin-mcp-dist/lib/framer.d.ts +30 -0
  58. package/dist/plugin-mcp-dist/lib/framer.js +1084 -0
  59. package/dist/plugin-mcp-dist/lib/hooks.d.ts +6 -0
  60. package/dist/plugin-mcp-dist/lib/hooks.js +46 -0
  61. package/dist/plugin-mcp-dist/lib/mcp-client.d.ts +142 -0
  62. package/dist/plugin-mcp-dist/lib/mcp-client.js +40 -0
  63. package/dist/plugin-mcp-dist/lib/mcp-handlers.d.ts +385 -0
  64. package/dist/plugin-mcp-dist/lib/mcp-handlers.js +1924 -0
  65. package/dist/plugin-mcp-dist/lib/mcp-tools.d.ts +5 -0
  66. package/dist/plugin-mcp-dist/lib/mcp-tools.js +5 -0
  67. package/dist/plugin-mcp-dist/lib/mcp-websocket.d.ts +10 -0
  68. package/dist/plugin-mcp-dist/lib/mcp-websocket.js +88 -0
  69. package/dist/plugin-mcp-dist/lib/plugin-websocket.d.ts +5 -0
  70. package/dist/plugin-mcp-dist/lib/plugin-websocket.js +170 -0
  71. package/dist/plugin-mcp-dist/lib/react-export.d.ts +51 -0
  72. package/dist/plugin-mcp-dist/lib/react-export.js +358 -0
  73. package/dist/plugin-mcp-dist/lib/schema.d.ts +276 -0
  74. package/dist/plugin-mcp-dist/lib/schema.js +907 -0
  75. package/dist/plugin-mcp-dist/lib/store.d.ts +2 -0
  76. package/dist/plugin-mcp-dist/lib/store.js +10 -0
  77. package/dist/plugin-mcp-dist/lib/tree-utils.d.ts +6 -0
  78. package/dist/plugin-mcp-dist/lib/tree-utils.js +141 -0
  79. package/dist/plugin-mcp-dist/lib/tunnel.d.ts +46 -0
  80. package/dist/plugin-mcp-dist/lib/tunnel.js +117 -0
  81. package/dist/plugin-mcp-dist/lib/types.d.ts +110 -0
  82. package/dist/plugin-mcp-dist/lib/types.js +188 -0
  83. package/dist/plugin-mcp-dist/lib/upstream-socket.d.ts +13 -0
  84. package/dist/plugin-mcp-dist/lib/upstream-socket.js +56 -0
  85. package/dist/plugin-mcp-dist/lib/utils.d.ts +13 -0
  86. package/dist/plugin-mcp-dist/lib/utils.js +57 -0
  87. package/dist/plugin-mcp-dist/lib/websocket-server.d.ts +10 -0
  88. package/dist/plugin-mcp-dist/lib/websocket-server.js +88 -0
  89. package/dist/plugin-mcp-dist/lib/xml.d.ts +10 -0
  90. package/dist/plugin-mcp-dist/lib/xml.js +395 -0
  91. package/dist/react.d.ts +76 -0
  92. package/dist/react.js +280 -0
  93. package/dist/renamer.d.ts +11 -0
  94. package/dist/renamer.js +139 -0
  95. package/dist/sentry.d.ts +2 -0
  96. package/dist/sentry.js +5 -0
  97. package/dist/stackblitz.d.ts +9 -0
  98. package/dist/stackblitz.js +179 -0
  99. package/dist/styles/framer.css +920 -0
  100. package/dist/styles/reset.css +37 -0
  101. package/dist/typescript.d.ts +24 -0
  102. package/dist/typescript.js +197 -0
  103. package/dist/undici-dispatcher.d.ts +2 -0
  104. package/dist/undici-dispatcher.js +10 -0
  105. package/dist/unframer-loader.d.ts +2 -0
  106. package/dist/unframer-loader.js +12 -0
  107. package/dist/utils.d.ts +20 -0
  108. package/dist/utils.js +81 -0
  109. package/dist/version.d.ts +2 -0
  110. package/dist/version.js +2 -0
  111. package/package.json +131 -0
@@ -0,0 +1,10 @@
1
+ export * from './framer.js';
2
+ import { AdaptedLink as Link, ResolveLinksAdapted as ResolveLinks } from './react.js';
3
+ export { FramerStyles, type UnframerBreakpoint, WithFramerBreakpoints, ContextProviders, AdaptedLink, UnframerProvider, } from './react.js';
4
+ export { Link, ResolveLinks };
5
+ export { propCamelCaseJustLikeFramer } from './compat.js';
6
+ export { propControlsToTypedocComments, componentCamelCase, } from './typescript.js';
7
+ import { withCSS as withCSSOriginal } from './framer.js';
8
+ import { withCSS } from './css.js';
9
+ export { withCSSOriginal, withCSS };
10
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ export * from './framer.js';
2
+ import { AdaptedLink as Link, ResolveLinksAdapted as ResolveLinks, } from './react.js';
3
+ export { FramerStyles, WithFramerBreakpoints, ContextProviders, AdaptedLink, UnframerProvider,
4
+ // withCSS,
5
+ } from './react.js';
6
+ export { Link, ResolveLinks };
7
+ export { propCamelCaseJustLikeFramer } from './compat.js';
8
+ export { propControlsToTypedocComments, componentCamelCase, } from './typescript.js';
9
+ // Override withCSS with our custom implementation that restores style tags
10
+ import { withCSS as withCSSOriginal } from './framer.js';
11
+ import { withCSS } from './css.js';
12
+ export { withCSSOriginal, withCSS };
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,10 @@
1
+ export declare function getPackageManager(targetDir?: string): Promise<"bun" | "deno" | "npm" | "pnpm" | "yarn">;
2
+ export declare function installPackagesBatch({ packageNames, cwd, isDev }: {
3
+ packageNames: string[];
4
+ cwd: string;
5
+ isDev?: boolean;
6
+ }): Promise<{
7
+ success: boolean;
8
+ error?: string;
9
+ }>;
10
+ //# sourceMappingURL=package-manager.d.ts.map
@@ -0,0 +1,138 @@
1
+ import { exec, spawn } from 'child_process';
2
+ import { promisify } from 'util';
3
+ import { spinner } from './utils.js';
4
+ const execAsync = promisify(exec);
5
+ export async function getPackageManager(targetDir) {
6
+ const { detect } = await import('@antfu/ni');
7
+ const packageManager = await detect({ programmatic: true, cwd: targetDir });
8
+ if (packageManager === 'yarn@berry') {
9
+ return 'yarn';
10
+ }
11
+ else if (packageManager === 'pnpm@6' || packageManager === 'pnpm') {
12
+ return 'pnpm';
13
+ }
14
+ else if (packageManager === 'bun') {
15
+ return 'bun';
16
+ }
17
+ else if (packageManager === 'deno') {
18
+ return 'deno';
19
+ }
20
+ else if (packageManager === 'npm' || packageManager === 'yarn') {
21
+ return packageManager;
22
+ }
23
+ const userAgent = process.env.npm_config_user_agent || '';
24
+ if (userAgent.startsWith('yarn')) {
25
+ return 'yarn';
26
+ }
27
+ if (userAgent.startsWith('pnpm')) {
28
+ return 'pnpm';
29
+ }
30
+ if (userAgent.startsWith('bun')) {
31
+ return 'bun';
32
+ }
33
+ return 'npm';
34
+ }
35
+ export async function installPackagesBatch({ packageNames, cwd, isDev = false, }) {
36
+ // Framer sometimes has links that point to !missing for some reason. bug in Framer
37
+ packageNames = packageNames.filter((x) => x !== '!missing');
38
+ if (packageNames.length === 0) {
39
+ return { success: true };
40
+ }
41
+ try {
42
+ const packageManager = await getPackageManager(cwd);
43
+ const devFlag = isDev
44
+ ? packageManager === 'npm'
45
+ ? '--save-dev'
46
+ : '-D'
47
+ : '';
48
+ const packagesStr = packageNames.join(' ');
49
+ spinner.info(`Installing packages with ${packageManager}: ${packagesStr}`);
50
+ spinner.start(`Installing packages: ${packagesStr}`);
51
+ return new Promise((resolve) => {
52
+ let command;
53
+ let args;
54
+ switch (packageManager) {
55
+ case 'npm':
56
+ command = 'npm';
57
+ args = ['install', ...packageNames];
58
+ if (devFlag)
59
+ args.push(devFlag);
60
+ break;
61
+ case 'yarn':
62
+ command = 'yarn';
63
+ args = ['add', ...packageNames];
64
+ if (devFlag)
65
+ args.push(devFlag);
66
+ break;
67
+ case 'pnpm':
68
+ command = 'pnpm';
69
+ args = ['add', ...packageNames];
70
+ if (devFlag)
71
+ args.push(devFlag);
72
+ break;
73
+ case 'bun':
74
+ command = 'bun';
75
+ args = ['add', ...packageNames];
76
+ if (devFlag)
77
+ args.push(devFlag);
78
+ break;
79
+ default:
80
+ command = 'npm';
81
+ args = ['install', ...packageNames];
82
+ if (devFlag)
83
+ args.push(devFlag);
84
+ }
85
+ const child = spawn(command, args, {
86
+ cwd,
87
+ stdio: ['ignore', 'pipe', 'pipe'],
88
+ });
89
+ let hasOutput = false;
90
+ child.stdout?.on('data', (data) => {
91
+ hasOutput = true;
92
+ const lines = data
93
+ .toString()
94
+ .split('\n')
95
+ .filter((line) => line.trim());
96
+ lines.forEach((line) => {
97
+ if (line.trim()) {
98
+ spinner.update(`Installing: ${line.trim()}`);
99
+ }
100
+ });
101
+ });
102
+ child.stderr?.on('data', (data) => {
103
+ hasOutput = true;
104
+ const lines = data
105
+ .toString()
106
+ .split('\n')
107
+ .filter((line) => line.trim());
108
+ lines.forEach((line) => {
109
+ if (line.trim()) {
110
+ spinner.update(`Installing: ${line.trim()}`);
111
+ }
112
+ });
113
+ });
114
+ child.on('close', (code) => {
115
+ if (code === 0) {
116
+ spinner.info(`Successfully installed packages`);
117
+ resolve({ success: true });
118
+ }
119
+ else {
120
+ const errorMessage = `Installation failed with exit code ${code}`;
121
+ spinner.error(`Failed to install packages: ${errorMessage}`);
122
+ resolve({ success: false, error: errorMessage });
123
+ }
124
+ });
125
+ child.on('error', (error) => {
126
+ const errorMessage = error.message || 'Unknown error';
127
+ spinner.error(`Failed to install packages: ${errorMessage}`);
128
+ resolve({ success: false, error: errorMessage });
129
+ });
130
+ });
131
+ }
132
+ catch (error) {
133
+ const errorMessage = error.message || 'Unknown error';
134
+ spinner.error(`Failed to install packages: ${errorMessage}`);
135
+ return { success: false, error: errorMessage };
136
+ }
137
+ }
138
+ //# sourceMappingURL=package-manager.js.map
@@ -0,0 +1,5 @@
1
+ export declare function websocketClientHandling({ handle, websocketId }: {
2
+ handle: any;
3
+ websocketId: any;
4
+ }): Promise<(() => void) | undefined>;
5
+ //# sourceMappingURL=client-websocket.d.ts.map
@@ -0,0 +1,103 @@
1
+ import { useStore } from "./store.js";
2
+ // Function for handling websocket connection based on session cookie
3
+ export async function websocketClientHandling({ handle, websocketId, }) {
4
+ if (typeof window === 'undefined')
5
+ return;
6
+ const websocketUrl = `wss://unframer.co/_tunnel/upstream?id=${websocketId}`;
7
+ let ws;
8
+ let pingInterval = null;
9
+ let reconnectInterval = 1000;
10
+ let shouldReconnect = true;
11
+ function connect() {
12
+ console.log('connecting over mcp websocketId', websocketId);
13
+ ws = new WebSocket(websocketUrl);
14
+ ws.onopen = () => {
15
+ console.log('websocket client connected', websocketId);
16
+ reconnectInterval = 1000; // reset backoff
17
+ ws.send(JSON.stringify({ type: 'ready' }));
18
+ // Setup ping interval
19
+ if (pingInterval)
20
+ clearInterval(pingInterval);
21
+ pingInterval = setInterval(() => {
22
+ if (ws.readyState === WebSocket.OPEN) {
23
+ ws.send(JSON.stringify({ type: 'ping' }));
24
+ }
25
+ }, 1000);
26
+ };
27
+ ws.onmessage = async (event) => {
28
+ let data;
29
+ try {
30
+ data = JSON.parse(event.data);
31
+ }
32
+ catch {
33
+ console.error(`websocket sent invalid json`, event.data);
34
+ return;
35
+ }
36
+ const { id, payload } = data || {};
37
+ if (!payload?.type) {
38
+ console.error(`websocket sent invalid data`, event.data);
39
+ return;
40
+ }
41
+ if (payload.type === 'ready') {
42
+ ws.send(JSON.stringify({ type: 'ready' }));
43
+ useStore.setState({ isConnected: true });
44
+ return;
45
+ }
46
+ if (payload.type === 'close') {
47
+ useStore.setState({ isConnected: false });
48
+ return;
49
+ }
50
+ console.log(`websocket message received`, payload);
51
+ try {
52
+ const output = await handle(payload);
53
+ console.log(`websocket message handled`, payload.type, output);
54
+ if (ws.readyState === WebSocket.OPEN) {
55
+ ws.send(JSON.stringify({
56
+ id,
57
+ payload: {
58
+ input: payload.input,
59
+ type: payload.type,
60
+ output,
61
+ },
62
+ }));
63
+ }
64
+ }
65
+ catch (e) {
66
+ console.error(`websocket error`, e);
67
+ if (ws.readyState === WebSocket.OPEN) {
68
+ ws.send(JSON.stringify({
69
+ id,
70
+ error: e instanceof Error ? e.message : String(e),
71
+ }));
72
+ }
73
+ }
74
+ };
75
+ ws.onerror = (error) => {
76
+ console.error('websocket error', error);
77
+ };
78
+ ws.onclose = (event) => {
79
+ console.log(`websocket client disconnected (${event.code}), reconnecting in ${reconnectInterval}ms`);
80
+ useStore.setState({ isConnected: false });
81
+ if (pingInterval) {
82
+ clearInterval(pingInterval);
83
+ pingInterval = null;
84
+ }
85
+ if (shouldReconnect) {
86
+ setTimeout(connect, reconnectInterval);
87
+ // exponential backoff (max 30s)
88
+ reconnectInterval = Math.min(30000, reconnectInterval * 1.5);
89
+ }
90
+ };
91
+ }
92
+ // Start the connection
93
+ connect();
94
+ // Return a cleanup function to close connection
95
+ return () => {
96
+ shouldReconnect = false;
97
+ if (pingInterval)
98
+ clearInterval(pingInterval);
99
+ ws.close();
100
+ };
101
+ }
102
+ //# sourceMappingURL=client-websocket.js.map
103
+ //# sourceMappingURL=client-websocket.js.map
@@ -0,0 +1,10 @@
1
+ export declare function mapValueToFieldValue(value: any, field: any): {
2
+ type: any;
3
+ value: any;
4
+ contentType?: undefined;
5
+ } | {
6
+ type: string;
7
+ value: string;
8
+ contentType: string;
9
+ } | null;
10
+ //# sourceMappingURL=cms.d.ts.map
@@ -0,0 +1,58 @@
1
+ export function mapValueToFieldValue(value, field) {
2
+ if (!field?.type) {
3
+ return null;
4
+ }
5
+ if (value == null) {
6
+ return {
7
+ type: field.type,
8
+ value,
9
+ };
10
+ }
11
+ if (field.type === 'string') {
12
+ return { type: 'string', value: String(value) || '' };
13
+ }
14
+ if (field.type === 'number') {
15
+ return { type: 'number', value: Number(value) ?? null };
16
+ }
17
+ if (field.type === 'boolean') {
18
+ return { type: 'boolean', value: Boolean(value) };
19
+ }
20
+ if (field.type === 'date') {
21
+ try {
22
+ if (!value)
23
+ return null;
24
+ const date = new Date(value);
25
+ return { type: 'date', value: date.toISOString() };
26
+ }
27
+ catch (e) {
28
+ return null;
29
+ }
30
+ }
31
+ if (field.type === 'enum') {
32
+ return { type: 'enum', value: String(value) || '' };
33
+ }
34
+ if (field.type === 'formattedText') {
35
+ const valueString = String(value) || '';
36
+ const looksLikeHtml = valueString.trim().startsWith('<');
37
+ return {
38
+ type: 'formattedText',
39
+ value: valueString,
40
+ contentType: looksLikeHtml ? 'html' : 'markdown',
41
+ };
42
+ }
43
+ if (field.type === 'color') {
44
+ return { type: 'color', value: String(value) || '' };
45
+ }
46
+ if (field.type === 'link') {
47
+ return { type: 'link', value: String(value) || '' };
48
+ }
49
+ if (field.type === 'image') {
50
+ return { type: 'image', value: String(value) || '' };
51
+ }
52
+ return {
53
+ type: field.type,
54
+ value,
55
+ };
56
+ }
57
+ //# sourceMappingURL=cms.js.map
58
+ //# sourceMappingURL=cms.js.map
@@ -0,0 +1,5 @@
1
+ export declare function notifyError(error: any, msg: any): void;
2
+ export declare class KnownError extends Error {
3
+ constructor(message: any);
4
+ }
5
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1,48 @@
1
+ import { framer } from '#framer-client';
2
+ import { init, captureException } from 'sentries';
3
+ init({
4
+ dsn: 'https://d6ad60582fec2961afffe60e5a189844@o4508014272446464.ingest.de.sentry.io/4508014275985488',
5
+ integrations: [],
6
+ // Performance Monitoring
7
+ tracesSampleRate: 0.01, // Capture 100% of the transactions
8
+ // Set sampling rate for profiling - this is relative to tracesSampleRate
9
+ profilesSampleRate: 0.01,
10
+ beforeSend(event, hint) {
11
+ // do not send in development
12
+ if (process.env.NODE_ENV === 'development') {
13
+ return null;
14
+ }
15
+ if (event?.['name'] === 'AbortError') {
16
+ return null;
17
+ }
18
+ if (hint?.originalException instanceof KnownError) {
19
+ return null;
20
+ }
21
+ return event;
22
+ },
23
+ });
24
+ export function notifyError(error, msg) {
25
+ if (error instanceof Error && error.name === 'AbortError') {
26
+ return;
27
+ }
28
+ if (error instanceof Error &&
29
+ error.message === 'BodyStreamBuffer was aborted') {
30
+ return;
31
+ }
32
+ console.error(error?.error || error);
33
+ captureException(error?.error || error, { extra: { msg } });
34
+ // Only call framer.notify in plugin context (browser), not in server runtime (Cloudflare Worker)
35
+ // Check if we're in a browser environment where framer.notify is available
36
+ if (typeof window !== 'undefined') {
37
+ framer.notify(String(error.message || error), { variant: 'error' });
38
+ }
39
+ }
40
+ export class KnownError extends Error {
41
+ constructor(message) {
42
+ super(message);
43
+ this.name = 'KnownError';
44
+ Object.setPrototypeOf(this, KnownError.prototype);
45
+ }
46
+ }
47
+ //# sourceMappingURL=errors.js.map
48
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1,2 @@
1
+ export * from 'framer-plugin';
2
+ //# sourceMappingURL=framer-client.d.ts.map
@@ -0,0 +1,4 @@
1
+ // Browser shim: re-exports from framer-plugin (used when running inside Framer)
2
+ export * from 'framer-plugin';
3
+ //# sourceMappingURL=framer-client.js.map
4
+ //# sourceMappingURL=framer-client.js.map
@@ -0,0 +1,3 @@
1
+ export * from 'framer-api';
2
+ export declare const framer: {};
3
+ //# sourceMappingURL=framer-client.server.d.ts.map
@@ -0,0 +1,46 @@
1
+ export * from 'framer-api';
2
+ const allowAllPermissions = () => {
3
+ return true;
4
+ };
5
+ const noOpNotify = async (message, options) => {
6
+ console.warn('[framer-api server shim notify]', message, options);
7
+ };
8
+ const emptySelection = async () => {
9
+ return [];
10
+ };
11
+ const noOpZoomIntoView = async () => {
12
+ return;
13
+ };
14
+ function getRuntimeFramer() {
15
+ const globalWithFramer = globalThis;
16
+ if (!globalWithFramer.framer) {
17
+ throw new Error('Server runtime framer client is not initialized. Connect first and assign globalThis.framer.');
18
+ }
19
+ return globalWithFramer.framer;
20
+ }
21
+ export const framer = new Proxy({}, {
22
+ get(_target, property, receiver) {
23
+ const runtimeFramer = getRuntimeFramer();
24
+ const value = Reflect.get(runtimeFramer, property, receiver);
25
+ if (value === undefined) {
26
+ if (property === 'isAllowedTo') {
27
+ return allowAllPermissions;
28
+ }
29
+ if (property === 'notify') {
30
+ return noOpNotify;
31
+ }
32
+ if (property === 'getSelection') {
33
+ return emptySelection;
34
+ }
35
+ if (property === 'zoomIntoView') {
36
+ return noOpZoomIntoView;
37
+ }
38
+ }
39
+ if (typeof value === 'function') {
40
+ return value.bind(runtimeFramer);
41
+ }
42
+ return value;
43
+ },
44
+ });
45
+ //# sourceMappingURL=framer-client.server.js.map
46
+ //# sourceMappingURL=framer-client.server.js.map
@@ -0,0 +1,30 @@
1
+ export declare function clearUploadedImagesCache(): void;
2
+ export declare function replaceEnumIdsForControls(controls: any, propControls: any): any;
3
+ export declare function getComponentPropertyControls(url: any): Promise<any>;
4
+ export declare var ControlType: any;
5
+ export declare function getAttributeComments(controls: any, availablePagePaths?: string[]): {};
6
+ export declare function getInstanceComponentId(componentInstance: any): string | undefined;
7
+ export declare function isNodeZoomable(node: any): Promise<boolean>;
8
+ export declare function getFramerTree({ rootNodes, recursive }: {
9
+ recursive?: boolean | undefined;
10
+ rootNodes: any;
11
+ }): Promise<any[]>;
12
+ export declare function discardFramerChanges({ previousTree: previousTree }: {
13
+ previousTree: any;
14
+ }): Promise<void[]>;
15
+ export declare const ATTRIBUTE_DEFAULTS: {
16
+ opacity: number;
17
+ visible: boolean;
18
+ locked: boolean;
19
+ rotation: number;
20
+ position: string;
21
+ gap: string;
22
+ padding: string;
23
+ stackWrap: boolean;
24
+ gridFillWidth: boolean;
25
+ gridFillHeight: boolean;
26
+ };
27
+ export declare function serializeAttributesForXml(attributes: any): {};
28
+ export declare function applyAttributes(node: any, _attributes: any): Promise<void>;
29
+ export declare function getParentNodesArray(node: any): Promise<any[]>;
30
+ //# sourceMappingURL=framer.d.ts.map