framer-dalton 0.0.20 → 0.0.22
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/cli.js +858 -425
- package/dist/start-relay-server.js +182 -59
- package/docs/skills/framer-canvas-editing-project.md +6 -14
- package/docs/skills/framer.md +43 -290
- package/package.json +7 -4
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import fs7 from 'fs';
|
|
3
|
+
import path7 from 'path';
|
|
4
4
|
import { Command } from 'commander';
|
|
5
5
|
import crypto, { randomUUID } from 'crypto';
|
|
6
6
|
import http from 'http';
|
|
@@ -10,9 +10,23 @@ import os from 'os';
|
|
|
10
10
|
import { fileURLToPath } from 'url';
|
|
11
11
|
import { createTRPCClient, httpLink } from '@trpc/client';
|
|
12
12
|
|
|
13
|
-
/* @framer/ai CLI v0.0.
|
|
13
|
+
/* @framer/ai CLI v0.0.22 */
|
|
14
14
|
var __defProp = Object.defineProperty;
|
|
15
15
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
16
|
+
|
|
17
|
+
// package.json
|
|
18
|
+
var name = "framer-dalton";
|
|
19
|
+
|
|
20
|
+
// src/check-node-version.ts
|
|
21
|
+
var MINIMUM_NODE_VERSION = 22;
|
|
22
|
+
var currentMajor = Number(process.versions.node.split(".")[0]);
|
|
23
|
+
if (currentMajor < MINIMUM_NODE_VERSION) {
|
|
24
|
+
console.error(
|
|
25
|
+
`${name} requires Node.js >= ${MINIMUM_NODE_VERSION}. You are running Node.js ${process.versions.node}.
|
|
26
|
+
Please upgrade: https://nodejs.org/`
|
|
27
|
+
);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
16
30
|
function openUrl(url) {
|
|
17
31
|
const platform = process.platform;
|
|
18
32
|
let cmd;
|
|
@@ -36,27 +50,27 @@ function openUrl(url) {
|
|
|
36
50
|
__name(openUrl, "openUrl");
|
|
37
51
|
function getConfigDir() {
|
|
38
52
|
if (process.env.XDG_CONFIG_HOME) {
|
|
39
|
-
return
|
|
53
|
+
return path7.join(process.env.XDG_CONFIG_HOME, "framer");
|
|
40
54
|
}
|
|
41
55
|
if (process.platform === "win32") {
|
|
42
|
-
return
|
|
56
|
+
return path7.join(process.env.APPDATA || os.homedir(), "framer");
|
|
43
57
|
}
|
|
44
|
-
return
|
|
58
|
+
return path7.join(os.homedir(), ".config", "framer");
|
|
45
59
|
}
|
|
46
60
|
__name(getConfigDir, "getConfigDir");
|
|
47
61
|
function ensureConfigDir() {
|
|
48
62
|
const configDir = getConfigDir();
|
|
49
|
-
|
|
63
|
+
fs7.mkdirSync(configDir, { recursive: true, mode: 448 });
|
|
50
64
|
}
|
|
51
65
|
__name(ensureConfigDir, "ensureConfigDir");
|
|
52
66
|
|
|
53
67
|
// src/config/projects.ts
|
|
54
68
|
function getProjectsConfigPath() {
|
|
55
|
-
return
|
|
69
|
+
return path7.join(getConfigDir(), "projects.json");
|
|
56
70
|
}
|
|
57
71
|
__name(getProjectsConfigPath, "getProjectsConfigPath");
|
|
58
72
|
function getLegacyCredentialsPath() {
|
|
59
|
-
return
|
|
73
|
+
return path7.join(getConfigDir(), "credentials.json");
|
|
60
74
|
}
|
|
61
75
|
__name(getLegacyCredentialsPath, "getLegacyCredentialsPath");
|
|
62
76
|
var ProjectsConfigSchema = z.object({
|
|
@@ -74,7 +88,7 @@ var ProjectsConfigSchema = z.object({
|
|
|
74
88
|
var LegacyCredentialsSchema = z.record(z.string(), z.string());
|
|
75
89
|
function readJsonFile(filePath) {
|
|
76
90
|
try {
|
|
77
|
-
return JSON.parse(
|
|
91
|
+
return JSON.parse(fs7.readFileSync(filePath, "utf-8"));
|
|
78
92
|
} catch (_error) {
|
|
79
93
|
return null;
|
|
80
94
|
}
|
|
@@ -82,7 +96,7 @@ function readJsonFile(filePath) {
|
|
|
82
96
|
__name(readJsonFile, "readJsonFile");
|
|
83
97
|
function writeProjectsConfig(config) {
|
|
84
98
|
ensureConfigDir();
|
|
85
|
-
|
|
99
|
+
fs7.writeFileSync(
|
|
86
100
|
getProjectsConfigPath(),
|
|
87
101
|
JSON.stringify(config, null, " "),
|
|
88
102
|
{
|
|
@@ -109,7 +123,7 @@ function migrateLegacyCredentials() {
|
|
|
109
123
|
}
|
|
110
124
|
const config = { version: 2, projects };
|
|
111
125
|
writeProjectsConfig(config);
|
|
112
|
-
|
|
126
|
+
fs7.rmSync(getLegacyCredentialsPath(), { force: true });
|
|
113
127
|
return config;
|
|
114
128
|
}
|
|
115
129
|
__name(migrateLegacyCredentials, "migrateLegacyCredentials");
|
|
@@ -122,23 +136,24 @@ function readProjectsConfig() {
|
|
|
122
136
|
return result.data;
|
|
123
137
|
}
|
|
124
138
|
}
|
|
125
|
-
if (
|
|
139
|
+
if (fs7.existsSync(getLegacyCredentialsPath())) {
|
|
126
140
|
return migrateLegacyCredentials();
|
|
127
141
|
}
|
|
128
142
|
return { version: 2, projects: {} };
|
|
129
143
|
}
|
|
130
144
|
__name(readProjectsConfig, "readProjectsConfig");
|
|
145
|
+
var REMIX_URL_PATTERN = /\/remix\/([a-zA-Z0-9]+)/;
|
|
131
146
|
function extractProjectId(input) {
|
|
132
147
|
if (/^[a-zA-Z0-9]+$/.test(input)) {
|
|
133
148
|
return input;
|
|
134
149
|
}
|
|
150
|
+
const remixMatch = input.match(REMIX_URL_PATTERN);
|
|
151
|
+
if (remixMatch) return remixMatch[1];
|
|
135
152
|
const candidate = input.match(/\/projects\/([^/?#]+)/)?.[1] ?? input;
|
|
136
153
|
const slugMatch = candidate.match(
|
|
137
154
|
/^(?:.+--)?([a-zA-Z0-9]+)(?:-[a-zA-Z0-9]+)?$/
|
|
138
155
|
);
|
|
139
|
-
if (slugMatch)
|
|
140
|
-
return slugMatch[1];
|
|
141
|
-
}
|
|
156
|
+
if (slugMatch) return slugMatch[1];
|
|
142
157
|
return input;
|
|
143
158
|
}
|
|
144
159
|
__name(extractProjectId, "extractProjectId");
|
|
@@ -204,7 +219,7 @@ var SettingsWatcher = class {
|
|
|
204
219
|
__name(this, "SettingsWatcher");
|
|
205
220
|
}
|
|
206
221
|
start(callback) {
|
|
207
|
-
|
|
222
|
+
fs7.watchFile(
|
|
208
223
|
this.settingsPath,
|
|
209
224
|
{ persistent: false, interval: fsPollIntervalMs },
|
|
210
225
|
(curr, prev) => {
|
|
@@ -221,7 +236,7 @@ var SettingsWatcher = class {
|
|
|
221
236
|
return this;
|
|
222
237
|
}
|
|
223
238
|
stop() {
|
|
224
|
-
|
|
239
|
+
fs7.unwatchFile(this.settingsPath);
|
|
225
240
|
return this;
|
|
226
241
|
}
|
|
227
242
|
};
|
|
@@ -239,7 +254,7 @@ var SettingsFileSchema = z.object({
|
|
|
239
254
|
telemetryNoticeShown: z.boolean().optional()
|
|
240
255
|
});
|
|
241
256
|
function getSettingsPath() {
|
|
242
|
-
return
|
|
257
|
+
return path7.join(getConfigDir(), "settings.json");
|
|
243
258
|
}
|
|
244
259
|
__name(getSettingsPath, "getSettingsPath");
|
|
245
260
|
var settings;
|
|
@@ -258,7 +273,7 @@ __name(getSettings, "getSettings");
|
|
|
258
273
|
function readSettingsFile() {
|
|
259
274
|
const settingsPath = getSettingsPath();
|
|
260
275
|
try {
|
|
261
|
-
const raw = JSON.parse(
|
|
276
|
+
const raw = JSON.parse(fs7.readFileSync(settingsPath, "utf-8"));
|
|
262
277
|
const result = SettingsFileSchema.parse(raw);
|
|
263
278
|
return {
|
|
264
279
|
machineId: result.machineId ?? DEFAULT_SETTINGS.machineId,
|
|
@@ -277,7 +292,7 @@ function setSettings(newSettings) {
|
|
|
277
292
|
__name(setSettings, "setSettings");
|
|
278
293
|
function writeSettingsFile(settings2) {
|
|
279
294
|
ensureConfigDir();
|
|
280
|
-
|
|
295
|
+
fs7.writeFileSync(getSettingsPath(), JSON.stringify(settings2, null, " "), {
|
|
281
296
|
mode: 384
|
|
282
297
|
});
|
|
283
298
|
}
|
|
@@ -313,7 +328,7 @@ __name(markTelemetryNoticeShown, "markTelemetryNoticeShown");
|
|
|
313
328
|
// src/version.ts
|
|
314
329
|
var VERSION = (
|
|
315
330
|
// typeof is used to ensure this can be used just via tsx or node etc. without build
|
|
316
|
-
"0.0.
|
|
331
|
+
"0.0.22"
|
|
317
332
|
);
|
|
318
333
|
var trackingEndpoint = "https://events.framer.com/track";
|
|
319
334
|
var inProgressTrackings = /* @__PURE__ */ new Set();
|
|
@@ -499,11 +514,11 @@ body{font-family:"Inter",system-ui,-apple-system,sans-serif;font-feature-setting
|
|
|
499
514
|
</html>`;
|
|
500
515
|
}
|
|
501
516
|
__name(htmlPage, "htmlPage");
|
|
502
|
-
function successHtml(theme) {
|
|
517
|
+
function successHtml(theme, message) {
|
|
503
518
|
return htmlPage({
|
|
504
519
|
title: "Framer \u2014 Agent Approved",
|
|
505
520
|
heading: "Agent Approved",
|
|
506
|
-
message: "Your local agent now has edit access to the project. You can close this tab and continue with the local agent.",
|
|
521
|
+
message: message ?? "Your local agent now has edit access to the project. You can close this tab and continue with the local agent.",
|
|
507
522
|
theme
|
|
508
523
|
});
|
|
509
524
|
}
|
|
@@ -537,19 +552,31 @@ function parseCode(value) {
|
|
|
537
552
|
return null;
|
|
538
553
|
}
|
|
539
554
|
__name(parseCode, "parseCode");
|
|
555
|
+
function isFramerHostname(hostname) {
|
|
556
|
+
return hostname === "framer.com" || hostname === "framerlocal.com" || hostname.endsWith(".framer.com") || hostname.endsWith(".framerlocal.com");
|
|
557
|
+
}
|
|
558
|
+
__name(isFramerHostname, "isFramerHostname");
|
|
540
559
|
function resolveProjectOrigin(projectUrlOrId) {
|
|
541
560
|
try {
|
|
542
|
-
|
|
561
|
+
const url = new URL(projectUrlOrId);
|
|
562
|
+
if (isFramerHostname(url.hostname.toLowerCase())) return url.origin;
|
|
543
563
|
} catch {
|
|
544
|
-
return "https://framer.com";
|
|
545
564
|
}
|
|
565
|
+
return "https://framer.com";
|
|
546
566
|
}
|
|
547
567
|
__name(resolveProjectOrigin, "resolveProjectOrigin");
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
|
|
568
|
+
function runBrowserAuthFlow(options) {
|
|
569
|
+
const {
|
|
570
|
+
deeplinkParams,
|
|
571
|
+
expectProjectId,
|
|
572
|
+
successMessage,
|
|
573
|
+
browserSuccessMessage,
|
|
574
|
+
projectOrigin = "https://framer.com",
|
|
575
|
+
authType,
|
|
576
|
+
pollProjectId
|
|
577
|
+
} = options;
|
|
551
578
|
const state = crypto.randomBytes(16).toString("hex");
|
|
552
|
-
trackAuthStart({ projectId });
|
|
579
|
+
trackAuthStart({ projectId: pollProjectId ?? "unknown", authType });
|
|
553
580
|
return new Promise((resolve, reject) => {
|
|
554
581
|
let settled = false;
|
|
555
582
|
let pendingAuth = null;
|
|
@@ -566,16 +593,17 @@ async function acquireAuthFromBrowser(projectUrlOrId) {
|
|
|
566
593
|
if (url.pathname === "/done") {
|
|
567
594
|
const theme2 = parseTheme(url.searchParams.get("theme"));
|
|
568
595
|
res.writeHead(200, { "Content-Type": "text/html" });
|
|
569
|
-
res.end(successHtml(theme2), () => {
|
|
596
|
+
res.end(successHtml(theme2, browserSuccessMessage), () => {
|
|
570
597
|
if (pendingAuth) {
|
|
571
598
|
const auth = pendingAuth;
|
|
572
599
|
pendingAuth = null;
|
|
573
600
|
settle(() => {
|
|
574
601
|
debug("auth", "received API key via /done, resolving");
|
|
575
|
-
print(
|
|
602
|
+
print(`\u2713 ${successMessage}`);
|
|
576
603
|
trackAuthSuccess({
|
|
577
|
-
projectId,
|
|
604
|
+
projectId: auth.projectId ?? pollProjectId ?? "unknown",
|
|
578
605
|
authMethod: "browser",
|
|
606
|
+
authType,
|
|
579
607
|
userId: auth.userId
|
|
580
608
|
});
|
|
581
609
|
resolve(auth);
|
|
@@ -596,16 +624,14 @@ async function acquireAuthFromBrowser(projectUrlOrId) {
|
|
|
596
624
|
return;
|
|
597
625
|
}
|
|
598
626
|
const theme = parseTheme(url.searchParams.get("theme"));
|
|
599
|
-
const
|
|
600
|
-
const legacyCode = legacyError === "denied" ? "user.denied" : legacyError === "failed" ? "project.unauthorized" : null;
|
|
601
|
-
const code = parseCode(url.searchParams.get("code")) ?? legacyCode;
|
|
627
|
+
const code = parseCode(url.searchParams.get("code"));
|
|
602
628
|
if (code !== null) {
|
|
603
629
|
res.writeHead(200, { "Content-Type": "text/html" });
|
|
604
630
|
res.end(codeHtml(code, theme), () => {
|
|
605
631
|
settle(() => {
|
|
606
632
|
trackError({
|
|
607
633
|
errorType: "auth_error",
|
|
608
|
-
projectId,
|
|
634
|
+
projectId: pollProjectId ?? "unknown",
|
|
609
635
|
errorMessage: codeMessages[code]
|
|
610
636
|
});
|
|
611
637
|
reject(new Error(codeMessages[code]));
|
|
@@ -615,57 +641,65 @@ async function acquireAuthFromBrowser(projectUrlOrId) {
|
|
|
615
641
|
}
|
|
616
642
|
const apiKey = url.searchParams.get("apiKey");
|
|
617
643
|
const userId = url.searchParams.get("userId") ?? void 0;
|
|
644
|
+
const returnedProjectId = url.searchParams.get("projectId") ?? void 0;
|
|
618
645
|
const returnedState = url.searchParams.get("state");
|
|
619
|
-
if (!apiKey || returnedState !== state) {
|
|
646
|
+
if (!apiKey || returnedState !== state || expectProjectId && !returnedProjectId) {
|
|
620
647
|
res.writeHead(302, { Location: `/error?theme=${theme}` });
|
|
621
648
|
res.end();
|
|
622
649
|
return;
|
|
623
650
|
}
|
|
624
651
|
debug("auth", "received valid callback, redirecting to /done");
|
|
625
|
-
pendingAuth = { apiKey, userId };
|
|
652
|
+
pendingAuth = { apiKey, userId, projectId: returnedProjectId };
|
|
626
653
|
res.writeHead(302, { Location: `/done?theme=${theme}` });
|
|
627
654
|
res.end();
|
|
628
655
|
});
|
|
629
656
|
const POLL_INTERVAL_MS = 1e3;
|
|
630
|
-
const pollTimer = setInterval(() => {
|
|
631
|
-
const project2 = getProject(
|
|
657
|
+
const pollTimer = pollProjectId ? setInterval(() => {
|
|
658
|
+
const project2 = getProject(pollProjectId);
|
|
632
659
|
if (project2) {
|
|
633
660
|
settle(() => {
|
|
634
661
|
debug("auth", "API key detected from config file poll");
|
|
635
662
|
print("\u2713 API key detected from config");
|
|
636
663
|
trackAuthSuccess({
|
|
637
|
-
projectId,
|
|
664
|
+
projectId: pollProjectId,
|
|
638
665
|
authMethod: "config_poll",
|
|
666
|
+
authType,
|
|
667
|
+
userId: project2.userId
|
|
668
|
+
});
|
|
669
|
+
resolve({
|
|
670
|
+
apiKey: project2.apiKey,
|
|
639
671
|
userId: project2.userId
|
|
640
672
|
});
|
|
641
|
-
resolve({ apiKey: project2.apiKey, userId: project2.userId });
|
|
642
673
|
});
|
|
643
674
|
}
|
|
644
|
-
}, POLL_INTERVAL_MS);
|
|
675
|
+
}, POLL_INTERVAL_MS) : null;
|
|
645
676
|
const HINT_MS = 55e3;
|
|
646
|
-
const hintTimer = setTimeout(() => {
|
|
647
|
-
const settingsUrl = new URL(
|
|
677
|
+
const hintTimer = pollProjectId ? setTimeout(() => {
|
|
678
|
+
const settingsUrl = new URL(
|
|
679
|
+
`/projects/${pollProjectId}`,
|
|
680
|
+
projectOrigin
|
|
681
|
+
);
|
|
648
682
|
settingsUrl.searchParams.set("view", "settings:project");
|
|
649
683
|
print("");
|
|
650
684
|
printError("Taking a while? You can generate an API key manually:");
|
|
651
685
|
printError(` 1. Open Site Settings \u2192 General: ${settingsUrl}`);
|
|
652
686
|
printError(" 2. Scroll to API Keys and create a new key");
|
|
653
687
|
printError(
|
|
654
|
-
` 3. In another terminal, run: framer project auth ${
|
|
688
|
+
` 3. In another terminal, run: framer project auth ${pollProjectId} <your-api-key>`
|
|
655
689
|
);
|
|
656
690
|
print("");
|
|
657
691
|
print("Waiting for authorization in browser...");
|
|
658
|
-
}, HINT_MS);
|
|
692
|
+
}, HINT_MS) : null;
|
|
659
693
|
const timer = setTimeout(() => {
|
|
660
694
|
settle(() => {
|
|
661
695
|
trackError({
|
|
662
696
|
errorType: "auth_timeout",
|
|
663
|
-
projectId,
|
|
697
|
+
projectId: pollProjectId ?? "unknown",
|
|
664
698
|
errorMessage: "Browser authorization timed out"
|
|
665
699
|
});
|
|
666
700
|
reject(
|
|
667
701
|
new Error(
|
|
668
|
-
"Browser authorization timed out. Use `framer project auth <projectUrlOrId> <apiKey>` instead."
|
|
702
|
+
pollProjectId ? "Browser authorization timed out. Use `framer project auth <projectUrlOrId> <apiKey>` instead." : "Browser authorization timed out."
|
|
669
703
|
)
|
|
670
704
|
);
|
|
671
705
|
});
|
|
@@ -676,8 +710,8 @@ async function acquireAuthFromBrowser(projectUrlOrId) {
|
|
|
676
710
|
cleaned = true;
|
|
677
711
|
debug("auth", "cleanup: clearing timers and closing server");
|
|
678
712
|
clearTimeout(timer);
|
|
679
|
-
clearTimeout(hintTimer);
|
|
680
|
-
clearInterval(pollTimer);
|
|
713
|
+
if (hintTimer) clearTimeout(hintTimer);
|
|
714
|
+
if (pollTimer) clearInterval(pollTimer);
|
|
681
715
|
server.close();
|
|
682
716
|
server.closeAllConnections();
|
|
683
717
|
}
|
|
@@ -696,7 +730,9 @@ async function acquireAuthFromBrowser(projectUrlOrId) {
|
|
|
696
730
|
const deeplink = new URL("/projects/server-api/auth", projectOrigin);
|
|
697
731
|
deeplink.searchParams.set("callback", callbackUrl);
|
|
698
732
|
deeplink.searchParams.set("state", state);
|
|
699
|
-
|
|
733
|
+
for (const [key, value] of Object.entries(deeplinkParams)) {
|
|
734
|
+
deeplink.searchParams.set(key, value);
|
|
735
|
+
}
|
|
700
736
|
const deeplinkStr = deeplink.toString();
|
|
701
737
|
debug("auth", "opening browser for deeplink...");
|
|
702
738
|
openUrl(deeplinkStr).then((opened) => {
|
|
@@ -711,7 +747,48 @@ async function acquireAuthFromBrowser(projectUrlOrId) {
|
|
|
711
747
|
});
|
|
712
748
|
});
|
|
713
749
|
}
|
|
750
|
+
__name(runBrowserAuthFlow, "runBrowserAuthFlow");
|
|
751
|
+
async function acquireAuthFromBrowser(projectUrlOrId) {
|
|
752
|
+
const projectId = extractProjectId(projectUrlOrId);
|
|
753
|
+
const projectOrigin = resolveProjectOrigin(projectUrlOrId);
|
|
754
|
+
return runBrowserAuthFlow({
|
|
755
|
+
deeplinkParams: { projectId },
|
|
756
|
+
expectProjectId: false,
|
|
757
|
+
successMessage: "Agent authorized",
|
|
758
|
+
authType: "existing",
|
|
759
|
+
projectOrigin,
|
|
760
|
+
pollProjectId: projectId
|
|
761
|
+
});
|
|
762
|
+
}
|
|
714
763
|
__name(acquireAuthFromBrowser, "acquireAuthFromBrowser");
|
|
764
|
+
async function acquireAuthWithNewProject() {
|
|
765
|
+
return runBrowserAuthFlow({
|
|
766
|
+
deeplinkParams: { createProject: "true" },
|
|
767
|
+
expectProjectId: true,
|
|
768
|
+
successMessage: "Project created and agent authorized",
|
|
769
|
+
authType: "new_project",
|
|
770
|
+
browserSuccessMessage: "A new project has been created and your local agent is authorized to edit it. You can close this tab."
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
__name(acquireAuthWithNewProject, "acquireAuthWithNewProject");
|
|
774
|
+
async function acquireAuthWithRemixProject(sourceProjectUrlOrId) {
|
|
775
|
+
const sourceProjectId = extractProjectId(sourceProjectUrlOrId);
|
|
776
|
+
const projectOrigin = resolveProjectOrigin(sourceProjectUrlOrId);
|
|
777
|
+
const isRemixSlug = REMIX_URL_PATTERN.test(sourceProjectUrlOrId);
|
|
778
|
+
const deeplinkParams = {
|
|
779
|
+
duplicate: sourceProjectId
|
|
780
|
+
};
|
|
781
|
+
if (isRemixSlug) deeplinkParams.isRemixSlug = "true";
|
|
782
|
+
return runBrowserAuthFlow({
|
|
783
|
+
deeplinkParams,
|
|
784
|
+
expectProjectId: true,
|
|
785
|
+
successMessage: "Project remixed and agent authorized",
|
|
786
|
+
authType: "remix",
|
|
787
|
+
browserSuccessMessage: "The project has been remixed and your local agent is authorized to edit it. You can close this tab.",
|
|
788
|
+
projectOrigin
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
__name(acquireAuthWithRemixProject, "acquireAuthWithRemixProject");
|
|
715
792
|
|
|
716
793
|
// src/connection-errors.ts
|
|
717
794
|
var AUTH_ERROR_PATTERNS = ["does not have access", "UNAUTHORIZED"];
|
|
@@ -933,7 +1010,7 @@ var types = {
|
|
|
933
1010
|
name: "AiServiceVersion",
|
|
934
1011
|
description: "Major version segment for the Framer AI chat HTTP path (`/ai/v{version}/chat/`).",
|
|
935
1012
|
kind: "alias",
|
|
936
|
-
alias: '"
|
|
1013
|
+
alias: '"3"',
|
|
937
1014
|
references: []
|
|
938
1015
|
},
|
|
939
1016
|
allmethods: {
|
|
@@ -3911,8 +3988,8 @@ var types = {
|
|
|
3911
3988
|
name: "FontStyle",
|
|
3912
3989
|
description: "",
|
|
3913
3990
|
kind: "alias",
|
|
3914
|
-
alias: 'Pick<
|
|
3915
|
-
references: ["
|
|
3991
|
+
alias: 'Pick<CSS.Properties<string | number>, "fontFamily" | "fontWeight" | "fontStyle" | "fontSize" | "lineHeight" | "textAlign" | "letterSpacing" | "fontFeatureSettings">',
|
|
3992
|
+
references: ["CSS.Properties"]
|
|
3916
3993
|
},
|
|
3917
3994
|
fontstyle$1: {
|
|
3918
3995
|
name: "FontStyle$1",
|
|
@@ -7056,6 +7133,78 @@ var types = {
|
|
|
7056
7133
|
description: "@alpha",
|
|
7057
7134
|
optional: false
|
|
7058
7135
|
},
|
|
7136
|
+
{
|
|
7137
|
+
name: "publishForAgent",
|
|
7138
|
+
type: "(input?: Record<string, unknown>) => Promise<unknown>",
|
|
7139
|
+
description: "@alpha",
|
|
7140
|
+
optional: false
|
|
7141
|
+
},
|
|
7142
|
+
{
|
|
7143
|
+
name: "queryImagesForAgent",
|
|
7144
|
+
type: "(input: Record<string, unknown>) => Promise<unknown>",
|
|
7145
|
+
description: "@alpha",
|
|
7146
|
+
optional: false
|
|
7147
|
+
},
|
|
7148
|
+
{
|
|
7149
|
+
name: "reviewChangesForAgent",
|
|
7150
|
+
type: "(options?: {\n pagePath?: string;\n }) => Promise<unknown>",
|
|
7151
|
+
description: "@alpha",
|
|
7152
|
+
optional: false
|
|
7153
|
+
},
|
|
7154
|
+
{
|
|
7155
|
+
name: "flattenComponentInstanceForAgent",
|
|
7156
|
+
type: "(input: {\n id: string;\n }, options?: {\n pagePath?: string;\n }) => Promise<unknown>",
|
|
7157
|
+
description: "@alpha",
|
|
7158
|
+
optional: false
|
|
7159
|
+
},
|
|
7160
|
+
{
|
|
7161
|
+
name: "makeExternalComponentLocalForAgent",
|
|
7162
|
+
type: "(input: {\n id: string;\n replaceAll?: boolean;\n }, options?: {\n pagePath?: string;\n }) => Promise<unknown>",
|
|
7163
|
+
description: "@alpha",
|
|
7164
|
+
optional: false
|
|
7165
|
+
},
|
|
7166
|
+
{
|
|
7167
|
+
name: "getNodeForAgent",
|
|
7168
|
+
type: "(input: {\n id: string;\n }, options?: {\n pagePath?: string;\n }) => Promise<unknown>",
|
|
7169
|
+
description: "@alpha",
|
|
7170
|
+
optional: false
|
|
7171
|
+
},
|
|
7172
|
+
{
|
|
7173
|
+
name: "getNodesForAgent",
|
|
7174
|
+
type: "(input: {\n ids: readonly string[];\n }, options?: {\n pagePath?: string;\n }) => Promise<unknown>",
|
|
7175
|
+
description: "@alpha",
|
|
7176
|
+
optional: false
|
|
7177
|
+
},
|
|
7178
|
+
{
|
|
7179
|
+
name: "getNodesOfTypesForAgent",
|
|
7180
|
+
type: "(input: {\n types: readonly string[];\n }, options?: {\n pagePath?: string;\n }) => Promise<unknown>",
|
|
7181
|
+
description: "@alpha",
|
|
7182
|
+
optional: false
|
|
7183
|
+
},
|
|
7184
|
+
{
|
|
7185
|
+
name: "getScopeNodeForAgent",
|
|
7186
|
+
type: "(input: {\n id: string;\n }, options?: {\n pagePath?: string;\n }) => Promise<unknown>",
|
|
7187
|
+
description: "@alpha",
|
|
7188
|
+
optional: false
|
|
7189
|
+
},
|
|
7190
|
+
{
|
|
7191
|
+
name: "getGroundNodeForAgent",
|
|
7192
|
+
type: "(input: {\n id: string;\n }, options?: {\n pagePath?: string;\n }) => Promise<unknown>",
|
|
7193
|
+
description: "@alpha",
|
|
7194
|
+
optional: false
|
|
7195
|
+
},
|
|
7196
|
+
{
|
|
7197
|
+
name: "getParentNodeForAgent",
|
|
7198
|
+
type: "(input: {\n id: string;\n }, options?: {\n pagePath?: string;\n }) => Promise<unknown>",
|
|
7199
|
+
description: "@alpha",
|
|
7200
|
+
optional: false
|
|
7201
|
+
},
|
|
7202
|
+
{
|
|
7203
|
+
name: "getAncestorsForAgent",
|
|
7204
|
+
type: "(input: {\n id: string;\n }, options?: {\n pagePath?: string;\n }) => Promise<unknown>",
|
|
7205
|
+
description: "@alpha",
|
|
7206
|
+
optional: false
|
|
7207
|
+
},
|
|
7059
7208
|
{
|
|
7060
7209
|
name: "startAgentConversation",
|
|
7061
7210
|
type: "(prompt: string, options?: StartAgentConversationOptions) => Promise<StartAgentConversationResult>",
|
|
@@ -7074,6 +7223,12 @@ var types = {
|
|
|
7074
7223
|
description: "@alpha",
|
|
7075
7224
|
optional: false
|
|
7076
7225
|
},
|
|
7226
|
+
{
|
|
7227
|
+
name: "runSupervisorAgentCommand",
|
|
7228
|
+
type: "(options: RunSupervisorAgentCommandOptions) => Promise<RunSupervisorAgentCommandResult>",
|
|
7229
|
+
description: "@alpha",
|
|
7230
|
+
optional: false
|
|
7231
|
+
},
|
|
7077
7232
|
{
|
|
7078
7233
|
name: "[getAiServiceInfoMessageType]",
|
|
7079
7234
|
type: "(version?: AiServiceVersion) => Promise<AiServiceInfo>",
|
|
@@ -7496,6 +7651,58 @@ var types = {
|
|
|
7496
7651
|
alias: '"auto" | "lossless" | "small" | "medium" | "large" | "full"',
|
|
7497
7652
|
references: []
|
|
7498
7653
|
},
|
|
7654
|
+
runsupervisoragentcommandoptions: {
|
|
7655
|
+
name: "RunSupervisorAgentCommandOptions",
|
|
7656
|
+
description: "",
|
|
7657
|
+
kind: "interface",
|
|
7658
|
+
references: [],
|
|
7659
|
+
members: [
|
|
7660
|
+
{
|
|
7661
|
+
name: "goal",
|
|
7662
|
+
type: "string",
|
|
7663
|
+
description: "",
|
|
7664
|
+
optional: false
|
|
7665
|
+
},
|
|
7666
|
+
{
|
|
7667
|
+
name: "model",
|
|
7668
|
+
type: "string",
|
|
7669
|
+
description: "",
|
|
7670
|
+
optional: false
|
|
7671
|
+
},
|
|
7672
|
+
{
|
|
7673
|
+
name: "pagePath",
|
|
7674
|
+
type: "string",
|
|
7675
|
+
description: "",
|
|
7676
|
+
optional: true
|
|
7677
|
+
},
|
|
7678
|
+
{
|
|
7679
|
+
name: "maxSteps",
|
|
7680
|
+
type: "number",
|
|
7681
|
+
description: "",
|
|
7682
|
+
optional: true
|
|
7683
|
+
}
|
|
7684
|
+
]
|
|
7685
|
+
},
|
|
7686
|
+
runsupervisoragentcommandresult: {
|
|
7687
|
+
name: "RunSupervisorAgentCommandResult",
|
|
7688
|
+
description: "",
|
|
7689
|
+
kind: "interface",
|
|
7690
|
+
references: [],
|
|
7691
|
+
members: [
|
|
7692
|
+
{
|
|
7693
|
+
name: "filename",
|
|
7694
|
+
type: "string",
|
|
7695
|
+
description: "",
|
|
7696
|
+
optional: false
|
|
7697
|
+
},
|
|
7698
|
+
{
|
|
7699
|
+
name: "archiveBase64",
|
|
7700
|
+
type: "string",
|
|
7701
|
+
description: "",
|
|
7702
|
+
optional: false
|
|
7703
|
+
}
|
|
7704
|
+
]
|
|
7705
|
+
},
|
|
7499
7706
|
screenshotoptions: {
|
|
7500
7707
|
name: "ScreenshotOptions",
|
|
7501
7708
|
description: "",
|
|
@@ -9203,7 +9410,7 @@ var types = {
|
|
|
9203
9410
|
{
|
|
9204
9411
|
name: "aspectRatio",
|
|
9205
9412
|
type: "number | null",
|
|
9206
|
-
description: "Width-to-height ratio (e.g. `1.5` for 3:2).\nSetting to `null` removes the aspect ratio constraint.\nSupported by FrameNode, ComponentInstanceNode.",
|
|
9413
|
+
description: "Width-to-height ratio (e.g. `1.5` for 3:2).\n\nSetting to `null` removes the aspect ratio constraint.\nSupported by FrameNode, ComponentInstanceNode.",
|
|
9207
9414
|
optional: false
|
|
9208
9415
|
}
|
|
9209
9416
|
]
|
|
@@ -9257,7 +9464,7 @@ var types = {
|
|
|
9257
9464
|
{
|
|
9258
9465
|
name: "backgroundColor",
|
|
9259
9466
|
type: "(T extends TraitVariantData ? ColorStyleData : ColorStyle) | string | null",
|
|
9260
|
-
description: "Background color in RGBA format (e.g. `rgba(242, 59, 57, 1)`) or as a {@link ColorStyle} instance.\nSetting to `null` removes the background color. Supported by FrameNode.",
|
|
9467
|
+
description: "Background color in RGBA format (e.g. `rgba(242, 59, 57, 1)`) or as a {@link ColorStyle} instance.\n\nSetting to `null` removes the background color. Supported by FrameNode.",
|
|
9261
9468
|
optional: false
|
|
9262
9469
|
}
|
|
9263
9470
|
]
|
|
@@ -9341,7 +9548,7 @@ var types = {
|
|
|
9341
9548
|
{
|
|
9342
9549
|
name: "borderRadius",
|
|
9343
9550
|
type: "BorderRadius",
|
|
9344
|
-
description: 'Border radius for rounded corners
|
|
9551
|
+
description: 'Border radius for rounded corners.\n\nSingle value (e.g. `"10px"` or `"50%"`)\nor per-corner (e.g. `"10px 20px 30px 40px"` for top-left, top-right, bottom-right, bottom-left).\nSetting to `null` removes the border radius. Supported by FrameNode.',
|
|
9345
9552
|
optional: false
|
|
9346
9553
|
}
|
|
9347
9554
|
]
|
|
@@ -9355,7 +9562,7 @@ var types = {
|
|
|
9355
9562
|
{
|
|
9356
9563
|
name: "border",
|
|
9357
9564
|
type: "(T extends TraitVariantData ? Marshaled<Border> : Border) | null",
|
|
9358
|
-
description: 'Border properties including width, color, and style.\nStyles: `"solid"`, `"dashed"`, `"dotted"`, `"double"`.\nWidth can be per-side (e.g. `"1px 2px 3px 4px"`).\nSetting to `null` removes the border. Supported by FrameNode.',
|
|
9565
|
+
description: 'Border properties including width, color, and style.\n\nStyles: `"solid"`, `"dashed"`, `"dotted"`, `"double"`.\nWidth can be per-side (e.g. `"1px 2px 3px 4px"`).\nSetting to `null` removes the border. Supported by FrameNode.',
|
|
9359
9566
|
optional: false
|
|
9360
9567
|
}
|
|
9361
9568
|
]
|
|
@@ -9717,37 +9924,37 @@ var types = {
|
|
|
9717
9924
|
{
|
|
9718
9925
|
name: "gridItemFillCellWidth",
|
|
9719
9926
|
type: "boolean | null",
|
|
9720
|
-
description: "Whether to fill the grid cell width
|
|
9927
|
+
description: "Whether to fill the grid cell width.\n\nFor nodes inside a grid container. Defaults to `true`. Supported by FrameNode, TextNode.",
|
|
9721
9928
|
optional: false
|
|
9722
9929
|
},
|
|
9723
9930
|
{
|
|
9724
9931
|
name: "gridItemFillCellHeight",
|
|
9725
9932
|
type: "boolean | null",
|
|
9726
|
-
description: "Whether to fill the grid cell height
|
|
9933
|
+
description: "Whether to fill the grid cell height.\n\nFor nodes inside a grid container. Defaults to `true`. Supported by FrameNode, TextNode.",
|
|
9727
9934
|
optional: false
|
|
9728
9935
|
},
|
|
9729
9936
|
{
|
|
9730
9937
|
name: "gridItemHorizontalAlignment",
|
|
9731
9938
|
type: "GridItemAlignment | null",
|
|
9732
|
-
description: 'Horizontal alignment within grid cell
|
|
9939
|
+
description: 'Horizontal alignment within grid cell.\n\nFor nodes inside a grid container. Defaults to `"center"`. Supported by FrameNode, TextNode.',
|
|
9733
9940
|
optional: false
|
|
9734
9941
|
},
|
|
9735
9942
|
{
|
|
9736
9943
|
name: "gridItemVerticalAlignment",
|
|
9737
9944
|
type: "GridItemAlignment | null",
|
|
9738
|
-
description: 'Vertical alignment within grid cell
|
|
9945
|
+
description: 'Vertical alignment within grid cell.\n\nFor nodes inside a grid container. Defaults to `"center"`. Supported by FrameNode, TextNode.',
|
|
9739
9946
|
optional: false
|
|
9740
9947
|
},
|
|
9741
9948
|
{
|
|
9742
9949
|
name: "gridItemColumnSpan",
|
|
9743
9950
|
type: "GridItemColumnSpan | null",
|
|
9744
|
-
description: 'Number of columns to span, or `"all"` for all columns
|
|
9951
|
+
description: 'Number of columns to span, or `"all"` for all columns.\n\nFor nodes inside a grid container. Defaults to `1`. Supported by FrameNode, TextNode.',
|
|
9745
9952
|
optional: false
|
|
9746
9953
|
},
|
|
9747
9954
|
{
|
|
9748
9955
|
name: "gridItemRowSpan",
|
|
9749
9956
|
type: "number | null",
|
|
9750
|
-
description: "Number of rows to span
|
|
9957
|
+
description: "Number of rows to span.\n\nFor nodes inside a grid container. Defaults to `1`. Supported by FrameNode, TextNode.",
|
|
9751
9958
|
optional: false
|
|
9752
9959
|
}
|
|
9753
9960
|
]
|
|
@@ -9782,7 +9989,7 @@ var types = {
|
|
|
9782
9989
|
{
|
|
9783
9990
|
name: "imageRendering",
|
|
9784
9991
|
type: "ImageRendering | null",
|
|
9785
|
-
description: 'How images should be rendered when scaled: `"auto"` or `"pixelated"`.\nOnly applies to frames with image backgrounds.\nSetting to `null` uses default rendering. Supported by FrameNode.',
|
|
9992
|
+
description: 'How images should be rendered when scaled: `"auto"` or `"pixelated"`.\n\nOnly applies to frames with image backgrounds.\nSetting to `null` uses default rendering. Supported by FrameNode.',
|
|
9786
9993
|
optional: false
|
|
9787
9994
|
}
|
|
9788
9995
|
]
|
|
@@ -9824,7 +10031,7 @@ var types = {
|
|
|
9824
10031
|
{
|
|
9825
10032
|
name: "inlineTextStyle",
|
|
9826
10033
|
type: "(T extends TraitVariantData ? TextStyleData : TextStyle) | null",
|
|
9827
|
-
description: "Apply a text style preset
|
|
10034
|
+
description: "Apply a text style preset.\n\nSetting to `null` removes the text style. Supported by TextNode.",
|
|
9828
10035
|
optional: false
|
|
9829
10036
|
}
|
|
9830
10037
|
]
|
|
@@ -9858,19 +10065,19 @@ var types = {
|
|
|
9858
10065
|
{
|
|
9859
10066
|
name: "layout",
|
|
9860
10067
|
type: "LayoutType | null",
|
|
9861
|
-
description: "Enables stack or grid layout
|
|
10068
|
+
description: "Enables stack or grid layout.\n\nSetting to `null` disables any applied layout.\nOperation is deferred and applied after the current update cycle. Supported by FrameNode.",
|
|
9862
10069
|
optional: false
|
|
9863
10070
|
},
|
|
9864
10071
|
{
|
|
9865
10072
|
name: "gap",
|
|
9866
10073
|
type: "CSSDimension<CSSUnit.Pixel> | `${CSSDimension<CSSUnit.Pixel>} ${CSSDimension<CSSUnit.Pixel>}` | null",
|
|
9867
|
-
description: 'Spacing between items in a layout
|
|
10074
|
+
description: 'Spacing between items in a layout.\n\nSingle value (e.g. `"10px"`) applies to both axes;\ntwo values (e.g. `"10px 20px"`) set horizontal and vertical separately.\nOnly works with layout enabled. Supported by FrameNode.',
|
|
9868
10075
|
optional: false
|
|
9869
10076
|
},
|
|
9870
10077
|
{
|
|
9871
10078
|
name: "padding",
|
|
9872
10079
|
type: "CSSDimension<CSSUnit.Pixel> | `${CSSDimension<CSSUnit.Pixel>} ${CSSDimension<CSSUnit.Pixel>} ${CSSDimension<CSSUnit.Pixel>} ${CSSDimension<CSSUnit.Pixel>}` | null",
|
|
9873
|
-
description: 'Inner spacing of a container with layout
|
|
10080
|
+
description: 'Inner spacing of a container with layout.\n\nSingle value (e.g. `"10px"`) applies to all sides;\nfour values (e.g. `"10px 20px 30px 40px"`) set top, right, bottom, left.\nOnly works with layout enabled. Supported by FrameNode.',
|
|
9874
10081
|
optional: false
|
|
9875
10082
|
}
|
|
9876
10083
|
],
|
|
@@ -9885,13 +10092,13 @@ var types = {
|
|
|
9885
10092
|
{
|
|
9886
10093
|
name: "link",
|
|
9887
10094
|
type: "string | null",
|
|
9888
|
-
description: 'URL or internal page link
|
|
10095
|
+
description: 'URL or internal page link.\n\nExternal: `"https://example.com"`, internal: `"/about"`,\nemail: `"mailto:user@example.com"`. Setting to `null` removes the link.\nSupported by FrameNode, TextNode.',
|
|
9889
10096
|
optional: false
|
|
9890
10097
|
},
|
|
9891
10098
|
{
|
|
9892
10099
|
name: "linkOpenInNewTab",
|
|
9893
10100
|
type: "boolean | null",
|
|
9894
|
-
description: "Whether to open the link in a new tab
|
|
10101
|
+
description: "Whether to open the link in a new tab.\n\nDefault is automatically determined based on link type.\nSupported by FrameNode, TextNode.",
|
|
9895
10102
|
optional: false
|
|
9896
10103
|
},
|
|
9897
10104
|
{
|
|
@@ -9957,7 +10164,7 @@ var types = {
|
|
|
9957
10164
|
{
|
|
9958
10165
|
name: "locked",
|
|
9959
10166
|
type: "boolean",
|
|
9960
|
-
description: "Whether the node is locked for editing
|
|
10167
|
+
description: "Whether the node is locked for editing.\n\nDefaults to `false`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
9961
10168
|
optional: false
|
|
9962
10169
|
}
|
|
9963
10170
|
]
|
|
@@ -9999,7 +10206,7 @@ var types = {
|
|
|
9999
10206
|
{
|
|
10000
10207
|
name: "name",
|
|
10001
10208
|
type: "string | null",
|
|
10002
|
-
description: "The name of the node displayed in the layers panel.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
10209
|
+
description: "The name of the node displayed in the layers panel.\n\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
10003
10210
|
optional: false
|
|
10004
10211
|
}
|
|
10005
10212
|
]
|
|
@@ -10083,7 +10290,7 @@ var types = {
|
|
|
10083
10290
|
{
|
|
10084
10291
|
name: "opacity",
|
|
10085
10292
|
type: "number",
|
|
10086
|
-
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque)
|
|
10293
|
+
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque).\n\nDefaults to `1`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
10087
10294
|
optional: false
|
|
10088
10295
|
}
|
|
10089
10296
|
]
|
|
@@ -10118,19 +10325,19 @@ var types = {
|
|
|
10118
10325
|
{
|
|
10119
10326
|
name: "overflow",
|
|
10120
10327
|
type: "Overflow | null",
|
|
10121
|
-
description: "Controls how content that exceeds the element's box is handled.\nSetting to `null` removes the overflow property. Will overwrite `overflowX` or `overflowY`.\nSupported by FrameNode, TextNode.",
|
|
10328
|
+
description: "Controls how content that exceeds the element's box is handled.\n\nSetting to `null` removes the overflow property. Will overwrite `overflowX` or `overflowY`.\nSupported by FrameNode, TextNode.",
|
|
10122
10329
|
optional: false
|
|
10123
10330
|
},
|
|
10124
10331
|
{
|
|
10125
10332
|
name: "overflowX",
|
|
10126
10333
|
type: "AxisOverflow | null",
|
|
10127
|
-
description: "Controls horizontal overflow behavior.\nSetting to `null` removes the overflow X property. Supported by FrameNode, TextNode.",
|
|
10334
|
+
description: "Controls horizontal overflow behavior.\n\nSetting to `null` removes the overflow X property. Supported by FrameNode, TextNode.",
|
|
10128
10335
|
optional: false
|
|
10129
10336
|
},
|
|
10130
10337
|
{
|
|
10131
10338
|
name: "overflowY",
|
|
10132
10339
|
type: "AxisOverflow | null",
|
|
10133
|
-
description: "Controls vertical overflow behavior.\nSetting to `null` removes the overflow Y property. Supported by FrameNode, TextNode.",
|
|
10340
|
+
description: "Controls vertical overflow behavior.\n\nSetting to `null` removes the overflow Y property. Supported by FrameNode, TextNode.",
|
|
10134
10341
|
optional: false
|
|
10135
10342
|
}
|
|
10136
10343
|
]
|
|
@@ -10144,37 +10351,37 @@ var types = {
|
|
|
10144
10351
|
{
|
|
10145
10352
|
name: "top",
|
|
10146
10353
|
type: "CSSDimension<CSSUnit.Pixel> | null",
|
|
10147
|
-
description: 'Distance from top edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10354
|
+
description: 'Distance from top edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10148
10355
|
optional: false
|
|
10149
10356
|
},
|
|
10150
10357
|
{
|
|
10151
10358
|
name: "right",
|
|
10152
10359
|
type: "CSSDimension<CSSUnit.Pixel> | null",
|
|
10153
|
-
description: 'Distance from right edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10360
|
+
description: 'Distance from right edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10154
10361
|
optional: false
|
|
10155
10362
|
},
|
|
10156
10363
|
{
|
|
10157
10364
|
name: "bottom",
|
|
10158
10365
|
type: "CSSDimension<CSSUnit.Pixel> | null",
|
|
10159
|
-
description: 'Distance from bottom edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10366
|
+
description: 'Distance from bottom edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10160
10367
|
optional: false
|
|
10161
10368
|
},
|
|
10162
10369
|
{
|
|
10163
10370
|
name: "left",
|
|
10164
10371
|
type: "CSSDimension<CSSUnit.Pixel> | null",
|
|
10165
|
-
description: 'Distance from left edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10372
|
+
description: 'Distance from left edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10166
10373
|
optional: false
|
|
10167
10374
|
},
|
|
10168
10375
|
{
|
|
10169
10376
|
name: "centerX",
|
|
10170
10377
|
type: "CSSDimension<CSSUnit.Percentage> | null",
|
|
10171
|
-
description: 'Center anchor horizontal position as percentage (e.g. `"50%"`).\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10378
|
+
description: 'Center anchor horizontal position as percentage (e.g. `"50%"`).\n\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10172
10379
|
optional: false
|
|
10173
10380
|
},
|
|
10174
10381
|
{
|
|
10175
10382
|
name: "centerY",
|
|
10176
10383
|
type: "CSSDimension<CSSUnit.Percentage> | null",
|
|
10177
|
-
description: 'Center anchor vertical position as percentage (e.g. `"50%"`).\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10384
|
+
description: 'Center anchor vertical position as percentage (e.g. `"50%"`).\n\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10178
10385
|
optional: false
|
|
10179
10386
|
}
|
|
10180
10387
|
]
|
|
@@ -10202,7 +10409,7 @@ var types = {
|
|
|
10202
10409
|
{
|
|
10203
10410
|
name: "rotation",
|
|
10204
10411
|
type: "number",
|
|
10205
|
-
description: "Rotation angle in degrees
|
|
10412
|
+
description: "Rotation angle in degrees.\n\nDefaults to `0`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
10206
10413
|
optional: false
|
|
10207
10414
|
}
|
|
10208
10415
|
]
|
|
@@ -10248,13 +10455,13 @@ var types = {
|
|
|
10248
10455
|
{
|
|
10249
10456
|
name: "width",
|
|
10250
10457
|
type: "WidthLength | null",
|
|
10251
|
-
description: 'Width of the node
|
|
10458
|
+
description: 'Width of the node.\n\nAccepts pixel, percentage, fraction values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10252
10459
|
optional: false
|
|
10253
10460
|
},
|
|
10254
10461
|
{
|
|
10255
10462
|
name: "height",
|
|
10256
10463
|
type: "HeightLength | null",
|
|
10257
|
-
description: 'Height of the node
|
|
10464
|
+
description: 'Height of the node.\n\nAccepts pixel, percentage, fraction, viewport-height values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10258
10465
|
optional: false
|
|
10259
10466
|
}
|
|
10260
10467
|
]
|
|
@@ -10324,7 +10531,7 @@ var types = {
|
|
|
10324
10531
|
{
|
|
10325
10532
|
name: "textTruncation",
|
|
10326
10533
|
type: "number | null",
|
|
10327
|
-
description: "Maximum number of lines
|
|
10534
|
+
description: "Maximum number of lines before text is truncated with an ellipsis.\n\nMust be used alongside `overflow`. Setting to `null` removes the text truncation property.\nSupported by TextNode.",
|
|
10328
10535
|
optional: false
|
|
10329
10536
|
}
|
|
10330
10537
|
]
|
|
@@ -10408,7 +10615,7 @@ var types = {
|
|
|
10408
10615
|
{
|
|
10409
10616
|
name: "visible",
|
|
10410
10617
|
type: "boolean",
|
|
10411
|
-
description: "Whether the node is visible on the canvas
|
|
10618
|
+
description: "Whether the node is visible on the canvas.\n\nDefaults to `true`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
10412
10619
|
optional: false
|
|
10413
10620
|
}
|
|
10414
10621
|
]
|
|
@@ -10422,7 +10629,7 @@ var types = {
|
|
|
10422
10629
|
{
|
|
10423
10630
|
name: "zIndex",
|
|
10424
10631
|
type: "number | null",
|
|
10425
|
-
description: "Stacking order of positioned elements
|
|
10632
|
+
description: "Stacking order of positioned elements.\n\nHigher values appear on top of lower values.\nSetting to `null` removes the z-index property. Supported by FrameNode, TextNode.",
|
|
10426
10633
|
optional: false
|
|
10427
10634
|
}
|
|
10428
10635
|
]
|
|
@@ -10451,55 +10658,55 @@ var types = {
|
|
|
10451
10658
|
var classes = {
|
|
10452
10659
|
arrayfield: {
|
|
10453
10660
|
name: "ArrayField",
|
|
10454
|
-
description: "A CMS Collection field that stores an array of nested fields. Currently only\nsupports a single image field, which creates a Gallery in the CMS
|
|
10661
|
+
description: "A CMS Collection field that stores an array of nested fields. Currently only\nsupports a single image field, which creates a Gallery in the CMS.\n@category cms"
|
|
10455
10662
|
},
|
|
10456
10663
|
booleanfield: {
|
|
10457
10664
|
name: "BooleanField",
|
|
10458
|
-
description: "A CMS Collection field that stores a boolean (true or false) value
|
|
10665
|
+
description: "A CMS Collection field that stores a boolean (true or false) value.\n@category cms"
|
|
10459
10666
|
},
|
|
10460
10667
|
booleanvariable: {
|
|
10461
10668
|
name: "BooleanVariable",
|
|
10462
|
-
description: ""
|
|
10669
|
+
description: "A boolean variable.\n@category canvas"
|
|
10463
10670
|
},
|
|
10464
10671
|
bordervariable: {
|
|
10465
10672
|
name: "BorderVariable",
|
|
10466
|
-
description: ""
|
|
10673
|
+
description: "A border variable.\n@category canvas"
|
|
10467
10674
|
},
|
|
10468
10675
|
codefile: {
|
|
10469
10676
|
name: "CodeFile",
|
|
10470
|
-
description: "Represents a code file in the Framer project, such as a code component\nor code override
|
|
10677
|
+
description: "Represents a code file in the Framer project, such as a code component\nor code override.\n@category code-files"
|
|
10471
10678
|
},
|
|
10472
10679
|
codefileversion: {
|
|
10473
10680
|
name: "CodeFileVersion",
|
|
10474
|
-
description: "A saved version (snapshot) of a code file
|
|
10681
|
+
description: "A saved version (snapshot) of a code file.\n@category code-files"
|
|
10475
10682
|
},
|
|
10476
10683
|
collection: {
|
|
10477
10684
|
name: "Collection",
|
|
10478
|
-
description: "A CMS Collection in the project
|
|
10685
|
+
description: "A CMS Collection in the project.\n\nCollections can be created by users or managed by plugins. Use `managedBy`\nto check the owner. Any kind of Collection can be read from, while those\nmanaged by other plugins are read-only.\n@category cms"
|
|
10479
10686
|
},
|
|
10480
10687
|
collectionitem: {
|
|
10481
10688
|
name: "CollectionItem",
|
|
10482
|
-
description: "An item (row) in a CMS Collection
|
|
10689
|
+
description: "An item (row) in a CMS Collection.\n\nEach item contains field data keyed by field ID, a unique slug, and a\ndraft status.\n@category cms"
|
|
10483
10690
|
},
|
|
10484
10691
|
collectionreferencefield: {
|
|
10485
10692
|
name: "CollectionReferenceField",
|
|
10486
|
-
description: "A field that references an item in another collection
|
|
10693
|
+
description: "A field that references an item in another collection.\n@category cms"
|
|
10487
10694
|
},
|
|
10488
10695
|
colorfield: {
|
|
10489
10696
|
name: "ColorField",
|
|
10490
|
-
description: "A CMS Collection field that stores a color value (RGBA/HSL/HEX format)
|
|
10697
|
+
description: "A CMS Collection field that stores a color value (RGBA/HSL/HEX format).\n@category cms"
|
|
10491
10698
|
},
|
|
10492
10699
|
colorstyle: {
|
|
10493
10700
|
name: "ColorStyle",
|
|
10494
|
-
description: 'A reusable color style defined in the project. Supports light and dark\ntheme variants. Color styles let you manage color appearances from one\nplace in a project. In the UI, you can find them in the Assets panel.\nPlugins can use these styles to do things like sync design systems or\ncheck accessibility.\n\nColors are stored in RGBA format, e.g. `rgba(242, 59, 57, 1)`. The\n`light` attribute is the default color used in light theme. The `dark`\nattribute is an optional color used in the dark theme.\n\nTo organize color styles into folders, use `/` as a separator in the\nname, e.g. `"My Plugin/My Cool Color"`.\n\n@example\n```ts\n// Create a new color style with light and dark variants.\nconst colorStyle = await framer.createColorStyle({\n name: "My Cool Color",\n light: "rgba(242, 59, 57, 1)",\n dark: "rgba(120, 22, 11, 1)"\n})\n\n// Update an existing color style.\nawait colorStyle.setAttributes({ dark: "rgba(10, 10, 10, 0.2)" })\n\n// Remove a color style from the project.\nawait colorStyle.remove()\n\n// Store plugin data on a color style.\nawait colorStyle.setPluginData("key", "value")\n
|
|
10701
|
+
description: 'A reusable color style defined in the project. Supports light and dark\ntheme variants. Color styles let you manage color appearances from one\nplace in a project. In the UI, you can find them in the Assets panel.\nPlugins can use these styles to do things like sync design systems or\ncheck accessibility.\n\nColors are stored in RGBA format, e.g. `rgba(242, 59, 57, 1)`. The\n`light` attribute is the default color used in light theme. The `dark`\nattribute is an optional color used in the dark theme.\n\nTo organize color styles into folders, use `/` as a separator in the\nname, e.g. `"My Plugin/My Cool Color"`.\n\n@example\n```ts\n// Create a new color style with light and dark variants.\nconst colorStyle = await framer.createColorStyle({\n name: "My Cool Color",\n light: "rgba(242, 59, 57, 1)",\n dark: "rgba(120, 22, 11, 1)"\n})\n\n// Update an existing color style.\nawait colorStyle.setAttributes({ dark: "rgba(10, 10, 10, 0.2)" })\n\n// Remove a color style from the project.\nawait colorStyle.remove()\n\n// Store plugin data on a color style.\nawait colorStyle.setPluginData("key", "value")\n```\n@category canvas'
|
|
10495
10702
|
},
|
|
10496
10703
|
colorvariable: {
|
|
10497
10704
|
name: "ColorVariable",
|
|
10498
|
-
description: ""
|
|
10705
|
+
description: "A color variable.\n@category canvas"
|
|
10499
10706
|
},
|
|
10500
10707
|
componentinstancenode: {
|
|
10501
10708
|
name: "ComponentInstanceNode",
|
|
10502
|
-
description: "An instance of a code or design component on the canvas
|
|
10709
|
+
description: "An instance of a code or design component on the canvas.\n\nComponent instances are identified by their\n{@link ComponentInstanceNode.componentIdentifier | componentIdentifier}\nand can have their control properties updated via\n{@link NodeMethods.setAttributes | setAttributes}.\n\n@example\n```ts\nif (isCodeComponentNode(selection)) {\n selection.setAttributes({\n controls: { radius: 10 }\n })\n}\n```\n@category canvas"
|
|
10503
10710
|
},
|
|
10504
10711
|
componentinstanceplaceholder: {
|
|
10505
10712
|
name: "ComponentInstancePlaceholder",
|
|
@@ -10507,35 +10714,35 @@ var classes = {
|
|
|
10507
10714
|
},
|
|
10508
10715
|
componentnode: {
|
|
10509
10716
|
name: "ComponentNode",
|
|
10510
|
-
description: "A reusable design component definition
|
|
10717
|
+
description: "A reusable design component definition.\n\nComponent nodes contain variants, gesture states, and variables.\nThey can be inserted as instances via their module URL.\n@category canvas"
|
|
10511
10718
|
},
|
|
10512
10719
|
conicgradient: {
|
|
10513
10720
|
name: "ConicGradient",
|
|
10514
|
-
description: ""
|
|
10721
|
+
description: "A conic (angular) gradient with two or more color stops.\n@category canvas"
|
|
10515
10722
|
},
|
|
10516
10723
|
datefield: {
|
|
10517
10724
|
name: "DateField",
|
|
10518
|
-
description: "A CMS Collection field that stores a date in UTC format. Optionally displays time
|
|
10725
|
+
description: "A CMS Collection field that stores a date in UTC format. Optionally displays time.\n@category cms"
|
|
10519
10726
|
},
|
|
10520
10727
|
datevariable: {
|
|
10521
10728
|
name: "DateVariable",
|
|
10522
|
-
description: ""
|
|
10729
|
+
description: "A date variable.\n@category canvas"
|
|
10523
10730
|
},
|
|
10524
10731
|
designpagenode: {
|
|
10525
10732
|
name: "DesignPageNode",
|
|
10526
|
-
description: "A design page (non-web canvas) in the project
|
|
10733
|
+
description: "A design page (non-web canvas) in the project.\n@category canvas"
|
|
10527
10734
|
},
|
|
10528
10735
|
enumcase: {
|
|
10529
10736
|
name: "EnumCase",
|
|
10530
|
-
description: "An individual case (option) within an Enum Field or Enum Variable
|
|
10737
|
+
description: "An individual case (option) within an Enum Field or Enum Variable.\n@category cms"
|
|
10531
10738
|
},
|
|
10532
10739
|
enumfield: {
|
|
10533
10740
|
name: "EnumField",
|
|
10534
|
-
description: "A CMS Collection field with a fixed set of enum cases (options) that the user\ncan choose from. Enum cases must be defined as options before they can be\nassigned to CMS items
|
|
10741
|
+
description: "A CMS Collection field with a fixed set of enum cases (options) that the user\ncan choose from. Enum cases must be defined as options before they can be\nassigned to CMS items.\n@category cms"
|
|
10535
10742
|
},
|
|
10536
10743
|
enumvariable: {
|
|
10537
10744
|
name: "EnumVariable",
|
|
10538
|
-
description: ""
|
|
10745
|
+
description: "An enum variable with a fixed set of cases.\n@category canvas"
|
|
10539
10746
|
},
|
|
10540
10747
|
fieldbasewithrequired: {
|
|
10541
10748
|
name: "FieldBaseWithRequired",
|
|
@@ -10543,35 +10750,35 @@ var classes = {
|
|
|
10543
10750
|
},
|
|
10544
10751
|
fielddivider: {
|
|
10545
10752
|
name: "FieldDivider",
|
|
10546
|
-
description: "A visual divider between fields in the CMS UI. Not a data field
|
|
10753
|
+
description: "A visual divider between fields in the CMS UI. Not a data field.\n@category cms"
|
|
10547
10754
|
},
|
|
10548
10755
|
fileasset: {
|
|
10549
10756
|
name: "FileAsset",
|
|
10550
|
-
description: "A file asset uploaded to the Framer project
|
|
10757
|
+
description: "A file asset uploaded to the Framer project.\n@category canvas"
|
|
10551
10758
|
},
|
|
10552
10759
|
filefield: {
|
|
10553
10760
|
name: "FileField",
|
|
10554
|
-
description: "A CMS Collection field that stores a file asset (`FileAsset`)
|
|
10761
|
+
description: "A CMS Collection field that stores a file asset (`FileAsset`).\n@category cms"
|
|
10555
10762
|
},
|
|
10556
10763
|
filevariable: {
|
|
10557
10764
|
name: "FileVariable",
|
|
10558
|
-
description: ""
|
|
10765
|
+
description: "A file variable.\n@category canvas"
|
|
10559
10766
|
},
|
|
10560
10767
|
font: {
|
|
10561
10768
|
name: "Font",
|
|
10562
|
-
description: "A font available in the project, including custom uploaded fonts
|
|
10769
|
+
description: "A font available in the project, including custom uploaded fonts.\n@category canvas"
|
|
10563
10770
|
},
|
|
10564
10771
|
formattedtextfield: {
|
|
10565
10772
|
name: "FormattedTextField",
|
|
10566
|
-
description: "A CMS Collection field that stores HTML-formatted text content (H1-H6, P, and other standard content elements)
|
|
10773
|
+
description: "A CMS Collection field that stores HTML-formatted text content (H1-H6, P, and other standard content elements).\n@category cms"
|
|
10567
10774
|
},
|
|
10568
10775
|
formattedtextvariable: {
|
|
10569
10776
|
name: "FormattedTextVariable",
|
|
10570
|
-
description: ""
|
|
10777
|
+
description: "A formatted text (rich text) variable.\n@category canvas"
|
|
10571
10778
|
},
|
|
10572
10779
|
framenode: {
|
|
10573
10780
|
name: "FrameNode",
|
|
10574
|
-
description: "A frame layer on the canvas, the most common container node
|
|
10781
|
+
description: "A frame layer on the canvas, the most common container node.\n\nFrames can contain children, have layout settings, backgrounds, borders,\nand can serve as breakpoint or component variants.\n@category canvas"
|
|
10575
10782
|
},
|
|
10576
10783
|
framer: {
|
|
10577
10784
|
name: "framer",
|
|
@@ -10591,43 +10798,43 @@ var classes = {
|
|
|
10591
10798
|
},
|
|
10592
10799
|
imageasset: {
|
|
10593
10800
|
name: "ImageAsset",
|
|
10594
|
-
description: "An image that has been uploaded to the Framer project. Provides methods\nto access image data, measure dimensions, and load as bitmap or HTML element
|
|
10801
|
+
description: "An image that has been uploaded to the Framer project. Provides methods\nto access image data, measure dimensions, and load as bitmap or HTML element.\n@category canvas"
|
|
10595
10802
|
},
|
|
10596
10803
|
imagefield: {
|
|
10597
10804
|
name: "ImageField",
|
|
10598
|
-
description: "A CMS Collection field that stores an image asset (`ImageAsset`)
|
|
10805
|
+
description: "A CMS Collection field that stores an image asset (`ImageAsset`).\n@category cms"
|
|
10599
10806
|
},
|
|
10600
10807
|
imagevariable: {
|
|
10601
10808
|
name: "ImageVariable",
|
|
10602
|
-
description: ""
|
|
10809
|
+
description: "An image variable.\n@category canvas"
|
|
10603
10810
|
},
|
|
10604
10811
|
lineargradient: {
|
|
10605
10812
|
name: "LinearGradient",
|
|
10606
|
-
description: ""
|
|
10813
|
+
description: "A linear gradient with two or more color stops.\n@category canvas"
|
|
10607
10814
|
},
|
|
10608
10815
|
linkfield: {
|
|
10609
10816
|
name: "LinkField",
|
|
10610
|
-
description: "A CMS Collection field that stores a URL in string format
|
|
10817
|
+
description: "A CMS Collection field that stores a URL in string format.\n@category cms"
|
|
10611
10818
|
},
|
|
10612
10819
|
linkvariable: {
|
|
10613
10820
|
name: "LinkVariable",
|
|
10614
|
-
description: ""
|
|
10821
|
+
description: "A link variable.\n@category canvas"
|
|
10615
10822
|
},
|
|
10616
10823
|
managedcollection: {
|
|
10617
10824
|
name: "ManagedCollection",
|
|
10618
|
-
description: "A CMS Collection that is fully controlled by a plugin
|
|
10825
|
+
description: "A CMS Collection that is fully controlled by a plugin.\n\nManaged Collections allow plugins to define fields and sync items\nprogrammatically. Fields and items can only be added, edited, and deleted\nby the owning plugin, not by the user (unless a field is marked\n`userEditable`).\n\nA Managed Collection plugin becomes available within the CMS when it supports\nboth `configureManagedCollection` and `syncManagedCollection` modes.\n\nUse `framer.getManagedCollection()` to obtain an instance when the plugin is\nlaunched in either of those modes.\n@category cms"
|
|
10619
10826
|
},
|
|
10620
10827
|
multicollectionreferencefield: {
|
|
10621
10828
|
name: "MultiCollectionReferenceField",
|
|
10622
|
-
description: "A field that references multiple items in another collection
|
|
10829
|
+
description: "A field that references multiple items in another collection.\n@category cms"
|
|
10623
10830
|
},
|
|
10624
10831
|
numberfield: {
|
|
10625
10832
|
name: "NumberField",
|
|
10626
|
-
description: "A CMS Collection field that stores a numeric value
|
|
10833
|
+
description: "A CMS Collection field that stores a numeric value.\n@category cms"
|
|
10627
10834
|
},
|
|
10628
10835
|
numbervariable: {
|
|
10629
10836
|
name: "NumberVariable",
|
|
10630
|
-
description: ""
|
|
10837
|
+
description: "A number variable.\n@category canvas"
|
|
10631
10838
|
},
|
|
10632
10839
|
pluginengine: {
|
|
10633
10840
|
name: "PluginEngine",
|
|
@@ -10635,31 +10842,31 @@ var classes = {
|
|
|
10635
10842
|
},
|
|
10636
10843
|
radialgradient: {
|
|
10637
10844
|
name: "RadialGradient",
|
|
10638
|
-
description: ""
|
|
10845
|
+
description: "A radial gradient with two or more color stops.\n@category canvas"
|
|
10639
10846
|
},
|
|
10640
10847
|
redirect: {
|
|
10641
10848
|
name: "Redirect",
|
|
10642
|
-
description: "A URL redirect configured in the project. Redirects are applied when\nthe site is published
|
|
10849
|
+
description: "A URL redirect configured in the project. Redirects are applied when\nthe site is published.\n@category settings"
|
|
10643
10850
|
},
|
|
10644
10851
|
stringfield: {
|
|
10645
10852
|
name: "StringField",
|
|
10646
|
-
description: "A CMS Collection field that stores a text string value
|
|
10853
|
+
description: "A CMS Collection field that stores a text string value.\n@category cms"
|
|
10647
10854
|
},
|
|
10648
10855
|
stringvariable: {
|
|
10649
10856
|
name: "StringVariable",
|
|
10650
|
-
description: ""
|
|
10857
|
+
description: "A string variable.\n@category canvas"
|
|
10651
10858
|
},
|
|
10652
10859
|
svgnode: {
|
|
10653
10860
|
name: "SVGNode",
|
|
10654
|
-
description: "An SVG graphic layer on the canvas
|
|
10861
|
+
description: "An SVG graphic layer on the canvas.\n\nContains the raw SVG string and supports positioning, sizing,\nrotation, and visibility.\n@category canvas"
|
|
10655
10862
|
},
|
|
10656
10863
|
textnode: {
|
|
10657
10864
|
name: "TextNode",
|
|
10658
|
-
description: 'A text layer on the canvas
|
|
10865
|
+
description: 'A text layer on the canvas.\n\nUse {@link TextNode.setText | setText} and\n{@link TextNode.getText | getText} to work with plain text, or\n{@link TextNode.setHTML | setHTML} and {@link TextNode.getHTML | getHTML}\nfor rich text content.\n\n@example\n```ts\nconst selection = await framer.getSelection()\nfor (const node of selection) {\n if (isTextNode(node)) {\n node.setText("Hello!")\n }\n}\n```\n@category canvas'
|
|
10659
10866
|
},
|
|
10660
10867
|
textstyle: {
|
|
10661
10868
|
name: "TextStyle",
|
|
10662
|
-
description: 'A reusable text style defined in the project, including font, size,\ncolor, and responsive breakpoints. Text styles let you manage text\nappearances from one place in a project. In the UI, you can find them\nin the Assets panel.\n\nText styles support responsive breakpoints that apply different values\nat different window widths. A maximum of four breakpoints can be added.\nBreakpoints are automatically ordered from largest to smallest `minWidth`.\nEach breakpoint must have a unique `minWidth` value.\n\nBy default, text styles use a built-in font. Use\n{@link Font} to customize a text style\'s typeface. All font variants\n(bold, italic, boldItalic) must share the same font family as the base\nfont.\n\nTo organize text styles into folders, use `/` as a separator in the\nname, e.g. `"My Plugin/Heading"`.\n\n@example\n```ts\n// Create a new text style.\nconst textStyle = await framer.createTextStyle({\n name: "Heading",\n tag: "h1",\n fontSize: "30px",\n lineHeight: "1.6em",\n})\n\n// Create a text style with responsive breakpoints.\nconst textStyle = await framer.createTextStyle({\n fontSize: "24px",\n minWidth: 1280,\n breakpoints: [\n { minWidth: 1024, fontSize: "18px" },\n { minWidth: 320, fontSize: "16px" }\n ]\n})\n\n// Update an existing text style.\nawait textStyle.setAttributes({\n color: "rgba(242, 59, 57, 1)"\n})\n\n// Create a text style with a custom font.\nconst font = await framer.getFont("Open Sans")\nif (font) {\n const textStyle = await framer.createTextStyle({ font })\n}\n\n// Remove a text style from the project.\nawait textStyle.remove()\n
|
|
10869
|
+
description: 'A reusable text style defined in the project, including font, size,\ncolor, and responsive breakpoints. Text styles let you manage text\nappearances from one place in a project. In the UI, you can find them\nin the Assets panel.\n\nText styles support responsive breakpoints that apply different values\nat different window widths. A maximum of four breakpoints can be added.\nBreakpoints are automatically ordered from largest to smallest `minWidth`.\nEach breakpoint must have a unique `minWidth` value.\n\nBy default, text styles use a built-in font. Use\n{@link Font} to customize a text style\'s typeface. All font variants\n(bold, italic, boldItalic) must share the same font family as the base\nfont.\n\nTo organize text styles into folders, use `/` as a separator in the\nname, e.g. `"My Plugin/Heading"`.\n\n@example\n```ts\n// Create a new text style.\nconst textStyle = await framer.createTextStyle({\n name: "Heading",\n tag: "h1",\n fontSize: "30px",\n lineHeight: "1.6em",\n})\n\n// Create a text style with responsive breakpoints.\nconst textStyle = await framer.createTextStyle({\n fontSize: "24px",\n minWidth: 1280,\n breakpoints: [\n { minWidth: 1024, fontSize: "18px" },\n { minWidth: 320, fontSize: "16px" }\n ]\n})\n\n// Update an existing text style.\nawait textStyle.setAttributes({\n color: "rgba(242, 59, 57, 1)"\n})\n\n// Create a text style with a custom font.\nconst font = await framer.getFont("Open Sans")\nif (font) {\n const textStyle = await framer.createTextStyle({ font })\n}\n\n// Remove a text style from the project.\nawait textStyle.remove()\n```\n@category canvas'
|
|
10663
10870
|
},
|
|
10664
10871
|
unknownnode: {
|
|
10665
10872
|
name: "UnknownNode",
|
|
@@ -10667,15 +10874,15 @@ var classes = {
|
|
|
10667
10874
|
},
|
|
10668
10875
|
unsupportedcomputedvalue: {
|
|
10669
10876
|
name: "UnsupportedComputedValue",
|
|
10670
|
-
description: ""
|
|
10877
|
+
description: "A computed value type not yet supported by the plugin API.\n@category canvas"
|
|
10671
10878
|
},
|
|
10672
10879
|
unsupportedfield: {
|
|
10673
10880
|
name: "UnsupportedField",
|
|
10674
|
-
description: "A field type that is not yet supported by the plugin API.\nReturned when Framer uses a field type that the plugin API does not recognize
|
|
10881
|
+
description: "A field type that is not yet supported by the plugin API.\nReturned when Framer uses a field type that the plugin API does not recognize.\n@category cms"
|
|
10675
10882
|
},
|
|
10676
10883
|
unsupportedvariable: {
|
|
10677
10884
|
name: "UnsupportedVariable",
|
|
10678
|
-
description: ""
|
|
10885
|
+
description: "A variable type not yet supported by the plugin API.\n@category canvas"
|
|
10679
10886
|
},
|
|
10680
10887
|
vectorset: {
|
|
10681
10888
|
name: "VectorSet",
|
|
@@ -10687,15 +10894,15 @@ var classes = {
|
|
|
10687
10894
|
},
|
|
10688
10895
|
vectorsetitemnode: {
|
|
10689
10896
|
name: "VectorSetItemNode",
|
|
10690
|
-
description: "An individual item within a VectorSet node
|
|
10897
|
+
description: "An individual item within a VectorSet node.\n@category canvas"
|
|
10691
10898
|
},
|
|
10692
10899
|
vectorsetnode: {
|
|
10693
10900
|
name: "VectorSetNode",
|
|
10694
|
-
description: "A container node for a set of vector icons
|
|
10901
|
+
description: "A container node for a set of vector icons.\n@category canvas"
|
|
10695
10902
|
},
|
|
10696
10903
|
webpagenode: {
|
|
10697
10904
|
name: "WebPageNode",
|
|
10698
|
-
description: "A web page in the project's site map
|
|
10905
|
+
description: "A web page in the project's site map.\n\nWeb pages have a {@link WebPageNode.path | path} and may be associated\nwith a CMS collection when used as a detail page.\n@category canvas"
|
|
10699
10906
|
}
|
|
10700
10907
|
};
|
|
10701
10908
|
var methodsByCategory = {
|
|
@@ -10940,7 +11147,7 @@ var methodsByCategory = {
|
|
|
10940
11147
|
name: "addFields",
|
|
10941
11148
|
category: "Collection",
|
|
10942
11149
|
signature: "addFields(fields: CreateField[]): Promise<Field[]>",
|
|
10943
|
-
description: 'Create new unmanaged Collection fields
|
|
11150
|
+
description: 'Create new unmanaged Collection fields.\n\nUse `Field.setAttributes` to update existing fields.\n\nUse `"Collection.addFields"` to check if this method is allowed.\n\n@param fields - The array of fields that should be added to the collection.\n@returns The newly created Field instances.\n\n@example\n```ts\nconst createdFields = await collection.addFields([\n { type: "string", name: "Name" },\n { type: "enum", name: "Status", cases: [{ name: "New" }, { name: "Done" }] },\n { type: "file", name: "Text", allowedFileTypes: ["md"] },\n { type: "collectionReference", name: "Author", collectionId: "ASh5SZOh" },\n])\n```',
|
|
10944
11151
|
references: ["CreateField", "Field"]
|
|
10945
11152
|
},
|
|
10946
11153
|
{
|
|
@@ -10961,7 +11168,7 @@ var methodsByCategory = {
|
|
|
10961
11168
|
name: "getItems",
|
|
10962
11169
|
category: "Collection",
|
|
10963
11170
|
signature: "getItems(): Promise<CollectionItem[]>",
|
|
10964
|
-
description: "Retrieve all items within this Collection, in their current order.\nItems may include drafts (unpublished items).\n\n@returns An array of CollectionItem instances.\n\n@example\n```ts\nconst items = await collection.getItems()\n```",
|
|
11171
|
+
description: "Retrieve all items within this Collection, in their current order.\n\nItems may include drafts (unpublished items).\n\n@returns An array of CollectionItem instances.\n\n@example\n```ts\nconst items = await collection.getItems()\n```",
|
|
10965
11172
|
references: ["CollectionItem"]
|
|
10966
11173
|
},
|
|
10967
11174
|
{
|
|
@@ -10989,7 +11196,7 @@ var methodsByCategory = {
|
|
|
10989
11196
|
name: "navigateTo",
|
|
10990
11197
|
category: "Collection",
|
|
10991
11198
|
signature: "navigateTo(opts?: NavigableOptions): Promise<void>",
|
|
10992
|
-
description: "Navigate to this collection
|
|
11199
|
+
description: "Navigate to this collection.\n\nMay switch modes to reveal the relevant view.",
|
|
10993
11200
|
references: ["NavigableOptions"]
|
|
10994
11201
|
},
|
|
10995
11202
|
{
|
|
@@ -11017,14 +11224,14 @@ var methodsByCategory = {
|
|
|
11017
11224
|
name: "setFieldOrder",
|
|
11018
11225
|
category: "Collection",
|
|
11019
11226
|
signature: "setFieldOrder(fieldIds: string[]): Promise<void>",
|
|
11020
|
-
description: 'Reorder the fields in this Collection based on an array of field IDs.\nUnknown field IDs are ignored.\n\nUse `"Collection.setFieldOrder"` to check if this method is allowed.\n\n@param fieldIds - An array of field IDs representing the desired order.\n\n@example\n```ts\nawait collection.setFieldOrder([nameField.id, ageField.id])\n```',
|
|
11227
|
+
description: 'Reorder the fields in this Collection based on an array of field IDs.\n\nUnknown field IDs are ignored.\n\nUse `"Collection.setFieldOrder"` to check if this method is allowed.\n\n@param fieldIds - An array of field IDs representing the desired order.\n\n@example\n```ts\nawait collection.setFieldOrder([nameField.id, ageField.id])\n```',
|
|
11021
11228
|
references: []
|
|
11022
11229
|
},
|
|
11023
11230
|
{
|
|
11024
11231
|
name: "setItemOrder",
|
|
11025
11232
|
category: "Collection",
|
|
11026
11233
|
signature: "setItemOrder(ids: NodeId[]): Promise<void>",
|
|
11027
|
-
description: 'Reorder the items in this Collection based on an array of item IDs.\nUnknown item IDs are ignored.\n\nUse `"Collection.setItemOrder"` to check if this method is allowed.\n\n@param ids - An array of item IDs representing the desired order.\n\n@example\n```ts\nawait collection.setItemOrder([item3.id, item1.id, item2.id])\n```',
|
|
11234
|
+
description: 'Reorder the items in this Collection based on an array of item IDs.\n\nUnknown item IDs are ignored.\n\nUse `"Collection.setItemOrder"` to check if this method is allowed.\n\n@param ids - An array of item IDs representing the desired order.\n\n@example\n```ts\nawait collection.setItemOrder([item3.id, item1.id, item2.id])\n```',
|
|
11028
11235
|
references: []
|
|
11029
11236
|
},
|
|
11030
11237
|
{
|
|
@@ -11061,7 +11268,7 @@ var methodsByCategory = {
|
|
|
11061
11268
|
name: "fieldData",
|
|
11062
11269
|
category: "CollectionItem",
|
|
11063
11270
|
signature: "fieldData: Readonly<FieldData>",
|
|
11064
|
-
description: 'The fields and corresponding values of this Collection item
|
|
11271
|
+
description: 'The fields and corresponding values of this Collection item.\n\nField data uses the field `id` as keys in an object.\n\n@example\n```ts\nconst titleFieldData = collectionItem.fieldData[titleField.id]\nconsole.log(titleFieldData.value) // "Getting Started"\n```',
|
|
11065
11272
|
references: ["FieldData"]
|
|
11066
11273
|
},
|
|
11067
11274
|
{
|
|
@@ -11288,28 +11495,28 @@ var methodsByCategory = {
|
|
|
11288
11495
|
name: "aspectRatio",
|
|
11289
11496
|
category: "ComponentInstanceNode",
|
|
11290
11497
|
signature: "aspectRatio: number | null",
|
|
11291
|
-
description: "Width-to-height ratio (e.g. `1.5` for 3:2).\nSetting to `null` removes the aspect ratio constraint.\nSupported by FrameNode, ComponentInstanceNode.",
|
|
11498
|
+
description: "Width-to-height ratio (e.g. `1.5` for 3:2).\n\nSetting to `null` removes the aspect ratio constraint.\nSupported by FrameNode, ComponentInstanceNode.",
|
|
11292
11499
|
references: []
|
|
11293
11500
|
},
|
|
11294
11501
|
{
|
|
11295
11502
|
name: "bottom",
|
|
11296
11503
|
category: "ComponentInstanceNode",
|
|
11297
11504
|
signature: "bottom: CSSDimension<CSSUnit.Pixel> | null",
|
|
11298
|
-
description: 'Distance from bottom edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11505
|
+
description: 'Distance from bottom edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11299
11506
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
11300
11507
|
},
|
|
11301
11508
|
{
|
|
11302
11509
|
name: "centerX",
|
|
11303
11510
|
category: "ComponentInstanceNode",
|
|
11304
11511
|
signature: "centerX: CSSDimension<CSSUnit.Percentage> | null",
|
|
11305
|
-
description: 'Center anchor horizontal position as percentage (e.g. `"50%"`).\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11512
|
+
description: 'Center anchor horizontal position as percentage (e.g. `"50%"`).\n\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11306
11513
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
11307
11514
|
},
|
|
11308
11515
|
{
|
|
11309
11516
|
name: "centerY",
|
|
11310
11517
|
category: "ComponentInstanceNode",
|
|
11311
11518
|
signature: "centerY: CSSDimension<CSSUnit.Percentage> | null",
|
|
11312
|
-
description: 'Center anchor vertical position as percentage (e.g. `"50%"`).\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11519
|
+
description: 'Center anchor vertical position as percentage (e.g. `"50%"`).\n\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11313
11520
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
11314
11521
|
},
|
|
11315
11522
|
{
|
|
@@ -11351,7 +11558,7 @@ var methodsByCategory = {
|
|
|
11351
11558
|
name: "getNodesWithAttribute",
|
|
11352
11559
|
category: "ComponentInstanceNode",
|
|
11353
11560
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
11354
|
-
description: 'Get the descendants of this node that support `attribute
|
|
11561
|
+
description: 'Get the descendants of this node that support `attribute`.\n\nThis returns nodes that have the given attribute defined in their type,\nregardless of whether it has been set.\n\n@param attribute - The attribute name to filter by.\n@returns An array of nodes that support the attribute.\n\n@example\n```ts\n// Get any kind of node that has a background color attribute.\nconst nodes = await framer.getNodesWithAttribute("backgroundColor")\n```',
|
|
11355
11562
|
references: ["T", "Node"]
|
|
11356
11563
|
},
|
|
11357
11564
|
{
|
|
@@ -11365,7 +11572,7 @@ var methodsByCategory = {
|
|
|
11365
11572
|
name: "getNodesWithType",
|
|
11366
11573
|
category: "ComponentInstanceNode",
|
|
11367
11574
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
11368
|
-
description: 'Get descendants of this node that match the given type
|
|
11575
|
+
description: 'Get descendants of this node that match the given type.\n\nThis can also be used to query within a selection subtree.\n\n@param type - The node type to search for.\n@returns An array of matching descendant nodes.\n\n@example\n```ts\n// Get all frame nodes in a project.\nconst frameNodes = await framer.getNodesWithType("FrameNode")\n\n// Query within a selection subtree.\nconst selection = await framer.getSelection()\nif (selection.length === 1) {\n const frameNodes = await selection[0].getNodesWithType("FrameNode")\n}\n```',
|
|
11369
11576
|
references: ["FrameNode"]
|
|
11370
11577
|
},
|
|
11371
11578
|
{
|
|
@@ -11379,7 +11586,7 @@ var methodsByCategory = {
|
|
|
11379
11586
|
name: "getPluginData",
|
|
11380
11587
|
category: "ComponentInstanceNode",
|
|
11381
11588
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
11382
|
-
description: "Get plugin data by key
|
|
11589
|
+
description: "Get plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@returns The stored value, or `null` if no data exists for the key.",
|
|
11383
11590
|
references: []
|
|
11384
11591
|
},
|
|
11385
11592
|
{
|
|
@@ -11407,21 +11614,21 @@ var methodsByCategory = {
|
|
|
11407
11614
|
name: "height",
|
|
11408
11615
|
category: "ComponentInstanceNode",
|
|
11409
11616
|
signature: "height: HeightLength | null",
|
|
11410
|
-
description: 'Height of the node
|
|
11617
|
+
description: 'Height of the node.\n\nAccepts pixel, percentage, fraction, viewport-height values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11411
11618
|
references: ["HeightLength"]
|
|
11412
11619
|
},
|
|
11413
11620
|
{
|
|
11414
11621
|
name: "left",
|
|
11415
11622
|
category: "ComponentInstanceNode",
|
|
11416
11623
|
signature: "left: CSSDimension<CSSUnit.Pixel> | null",
|
|
11417
|
-
description: 'Distance from left edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11624
|
+
description: 'Distance from left edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11418
11625
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
11419
11626
|
},
|
|
11420
11627
|
{
|
|
11421
11628
|
name: "locked",
|
|
11422
11629
|
category: "ComponentInstanceNode",
|
|
11423
11630
|
signature: "locked: boolean",
|
|
11424
|
-
description: "Whether the node is locked for editing
|
|
11631
|
+
description: "Whether the node is locked for editing.\n\nDefaults to `false`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
11425
11632
|
references: []
|
|
11426
11633
|
},
|
|
11427
11634
|
{
|
|
@@ -11456,21 +11663,21 @@ var methodsByCategory = {
|
|
|
11456
11663
|
name: "name",
|
|
11457
11664
|
category: "ComponentInstanceNode",
|
|
11458
11665
|
signature: "name: string | null",
|
|
11459
|
-
description: "The name of the node displayed in the layers panel.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
11666
|
+
description: "The name of the node displayed in the layers panel.\n\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
11460
11667
|
references: []
|
|
11461
11668
|
},
|
|
11462
11669
|
{
|
|
11463
11670
|
name: "navigateTo",
|
|
11464
11671
|
category: "ComponentInstanceNode",
|
|
11465
11672
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
11466
|
-
description: "Navigate to this node
|
|
11673
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
11467
11674
|
references: ["NavigableOptions"]
|
|
11468
11675
|
},
|
|
11469
11676
|
{
|
|
11470
11677
|
name: "opacity",
|
|
11471
11678
|
category: "ComponentInstanceNode",
|
|
11472
11679
|
signature: "opacity: number",
|
|
11473
|
-
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque)
|
|
11680
|
+
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque).\n\nDefaults to `1`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
11474
11681
|
references: []
|
|
11475
11682
|
},
|
|
11476
11683
|
{
|
|
@@ -11491,14 +11698,14 @@ var methodsByCategory = {
|
|
|
11491
11698
|
name: "right",
|
|
11492
11699
|
category: "ComponentInstanceNode",
|
|
11493
11700
|
signature: "right: CSSDimension<CSSUnit.Pixel> | null",
|
|
11494
|
-
description: 'Distance from right edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11701
|
+
description: 'Distance from right edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11495
11702
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
11496
11703
|
},
|
|
11497
11704
|
{
|
|
11498
11705
|
name: "rotation",
|
|
11499
11706
|
category: "ComponentInstanceNode",
|
|
11500
11707
|
signature: "rotation: number",
|
|
11501
|
-
description: "Rotation angle in degrees
|
|
11708
|
+
description: "Rotation angle in degrees.\n\nDefaults to `0`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
11502
11709
|
references: []
|
|
11503
11710
|
},
|
|
11504
11711
|
{
|
|
@@ -11512,21 +11719,21 @@ var methodsByCategory = {
|
|
|
11512
11719
|
name: "setAttributes",
|
|
11513
11720
|
category: "ComponentInstanceNode",
|
|
11514
11721
|
signature: 'setAttributes(update: Partial<NodeClassToEditableAttributes[(typeof this)[ClassKey]]>): Promise<(typeof this)[ClassKey] extends "UnknownNode" ? never : typeof this | null>',
|
|
11515
|
-
description: 'Set the attributes of this node
|
|
11722
|
+
description: 'Set the attributes of this node.\n\nAttributes are merged with existing values, so only the provided\nattributes are updated.\n\n@param update - The attributes to update.\n@returns The updated node, or `null` if the node was not found.\n@throws If the node is an `UnknownNode`.\n\nUse `"Node.setAttributes"` to check if this method is allowed.',
|
|
11516
11723
|
references: []
|
|
11517
11724
|
},
|
|
11518
11725
|
{
|
|
11519
11726
|
name: "setPluginData",
|
|
11520
11727
|
category: "ComponentInstanceNode",
|
|
11521
11728
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
11522
|
-
description: 'Set plugin data by key
|
|
11729
|
+
description: 'Set plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@param value - The value to set, or `null` to remove.\n\nUse `"Node.setPluginData"` to check if this method is allowed.',
|
|
11523
11730
|
references: []
|
|
11524
11731
|
},
|
|
11525
11732
|
{
|
|
11526
11733
|
name: "top",
|
|
11527
11734
|
category: "ComponentInstanceNode",
|
|
11528
11735
|
signature: "top: CSSDimension<CSSUnit.Pixel> | null",
|
|
11529
|
-
description: 'Distance from top edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11736
|
+
description: 'Distance from top edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11530
11737
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
11531
11738
|
},
|
|
11532
11739
|
{
|
|
@@ -11540,21 +11747,21 @@ var methodsByCategory = {
|
|
|
11540
11747
|
name: "visible",
|
|
11541
11748
|
category: "ComponentInstanceNode",
|
|
11542
11749
|
signature: "visible: boolean",
|
|
11543
|
-
description: "Whether the node is visible on the canvas
|
|
11750
|
+
description: "Whether the node is visible on the canvas.\n\nDefaults to `true`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
11544
11751
|
references: []
|
|
11545
11752
|
},
|
|
11546
11753
|
{
|
|
11547
11754
|
name: "walk",
|
|
11548
11755
|
category: "ComponentInstanceNode",
|
|
11549
11756
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
11550
|
-
description: "Walk this node and its descendants recursively
|
|
11757
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
11551
11758
|
references: ["AnyNode"]
|
|
11552
11759
|
},
|
|
11553
11760
|
{
|
|
11554
11761
|
name: "width",
|
|
11555
11762
|
category: "ComponentInstanceNode",
|
|
11556
11763
|
signature: "width: WidthLength | null",
|
|
11557
|
-
description: 'Width of the node
|
|
11764
|
+
description: 'Width of the node.\n\nAccepts pixel, percentage, fraction values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11558
11765
|
references: ["WidthLength"]
|
|
11559
11766
|
},
|
|
11560
11767
|
{
|
|
@@ -11623,7 +11830,7 @@ var methodsByCategory = {
|
|
|
11623
11830
|
name: "getNodesWithAttribute",
|
|
11624
11831
|
category: "ComponentNode",
|
|
11625
11832
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
11626
|
-
description: 'Get the descendants of this node that support `attribute
|
|
11833
|
+
description: 'Get the descendants of this node that support `attribute`.\n\nThis returns nodes that have the given attribute defined in their type,\nregardless of whether it has been set.\n\n@param attribute - The attribute name to filter by.\n@returns An array of nodes that support the attribute.\n\n@example\n```ts\n// Get any kind of node that has a background color attribute.\nconst nodes = await framer.getNodesWithAttribute("backgroundColor")\n```',
|
|
11627
11834
|
references: ["T", "Node"]
|
|
11628
11835
|
},
|
|
11629
11836
|
{
|
|
@@ -11637,7 +11844,7 @@ var methodsByCategory = {
|
|
|
11637
11844
|
name: "getNodesWithType",
|
|
11638
11845
|
category: "ComponentNode",
|
|
11639
11846
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
11640
|
-
description: 'Get descendants of this node that match the given type
|
|
11847
|
+
description: 'Get descendants of this node that match the given type.\n\nThis can also be used to query within a selection subtree.\n\n@param type - The node type to search for.\n@returns An array of matching descendant nodes.\n\n@example\n```ts\n// Get all frame nodes in a project.\nconst frameNodes = await framer.getNodesWithType("FrameNode")\n\n// Query within a selection subtree.\nconst selection = await framer.getSelection()\nif (selection.length === 1) {\n const frameNodes = await selection[0].getNodesWithType("FrameNode")\n}\n```',
|
|
11641
11848
|
references: ["FrameNode"]
|
|
11642
11849
|
},
|
|
11643
11850
|
{
|
|
@@ -11651,7 +11858,7 @@ var methodsByCategory = {
|
|
|
11651
11858
|
name: "getPluginData",
|
|
11652
11859
|
category: "ComponentNode",
|
|
11653
11860
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
11654
|
-
description: "Get plugin data by key
|
|
11861
|
+
description: "Get plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@returns The stored value, or `null` if no data exists for the key.",
|
|
11655
11862
|
references: []
|
|
11656
11863
|
},
|
|
11657
11864
|
{
|
|
@@ -11679,7 +11886,7 @@ var methodsByCategory = {
|
|
|
11679
11886
|
name: "navigateTo",
|
|
11680
11887
|
category: "ComponentNode",
|
|
11681
11888
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
11682
|
-
description: "Navigate to this node
|
|
11889
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
11683
11890
|
references: ["NavigableOptions"]
|
|
11684
11891
|
},
|
|
11685
11892
|
{
|
|
@@ -11707,14 +11914,14 @@ var methodsByCategory = {
|
|
|
11707
11914
|
name: "setAttributes",
|
|
11708
11915
|
category: "ComponentNode",
|
|
11709
11916
|
signature: 'setAttributes(update: Partial<NodeClassToEditableAttributes[(typeof this)[ClassKey]]>): Promise<(typeof this)[ClassKey] extends "UnknownNode" ? never : typeof this | null>',
|
|
11710
|
-
description: 'Set the attributes of this node
|
|
11917
|
+
description: 'Set the attributes of this node.\n\nAttributes are merged with existing values, so only the provided\nattributes are updated.\n\n@param update - The attributes to update.\n@returns The updated node, or `null` if the node was not found.\n@throws If the node is an `UnknownNode`.\n\nUse `"Node.setAttributes"` to check if this method is allowed.',
|
|
11711
11918
|
references: []
|
|
11712
11919
|
},
|
|
11713
11920
|
{
|
|
11714
11921
|
name: "setPluginData",
|
|
11715
11922
|
category: "ComponentNode",
|
|
11716
11923
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
11717
|
-
description: 'Set plugin data by key
|
|
11924
|
+
description: 'Set plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@param value - The value to set, or `null` to remove.\n\nUse `"Node.setPluginData"` to check if this method is allowed.',
|
|
11718
11925
|
references: []
|
|
11719
11926
|
},
|
|
11720
11927
|
{
|
|
@@ -11728,7 +11935,7 @@ var methodsByCategory = {
|
|
|
11728
11935
|
name: "walk",
|
|
11729
11936
|
category: "ComponentNode",
|
|
11730
11937
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
11731
|
-
description: "Walk this node and its descendants recursively
|
|
11938
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
11732
11939
|
references: ["AnyNode"]
|
|
11733
11940
|
},
|
|
11734
11941
|
{
|
|
@@ -11848,7 +12055,7 @@ var methodsByCategory = {
|
|
|
11848
12055
|
name: "getNodesWithAttribute",
|
|
11849
12056
|
category: "DesignPageNode",
|
|
11850
12057
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
11851
|
-
description: 'Get the descendants of this node that support `attribute
|
|
12058
|
+
description: 'Get the descendants of this node that support `attribute`.\n\nThis returns nodes that have the given attribute defined in their type,\nregardless of whether it has been set.\n\n@param attribute - The attribute name to filter by.\n@returns An array of nodes that support the attribute.\n\n@example\n```ts\n// Get any kind of node that has a background color attribute.\nconst nodes = await framer.getNodesWithAttribute("backgroundColor")\n```',
|
|
11852
12059
|
references: ["T", "Node"]
|
|
11853
12060
|
},
|
|
11854
12061
|
{
|
|
@@ -11862,7 +12069,7 @@ var methodsByCategory = {
|
|
|
11862
12069
|
name: "getNodesWithType",
|
|
11863
12070
|
category: "DesignPageNode",
|
|
11864
12071
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
11865
|
-
description: 'Get descendants of this node that match the given type
|
|
12072
|
+
description: 'Get descendants of this node that match the given type.\n\nThis can also be used to query within a selection subtree.\n\n@param type - The node type to search for.\n@returns An array of matching descendant nodes.\n\n@example\n```ts\n// Get all frame nodes in a project.\nconst frameNodes = await framer.getNodesWithType("FrameNode")\n\n// Query within a selection subtree.\nconst selection = await framer.getSelection()\nif (selection.length === 1) {\n const frameNodes = await selection[0].getNodesWithType("FrameNode")\n}\n```',
|
|
11866
12073
|
references: ["FrameNode"]
|
|
11867
12074
|
},
|
|
11868
12075
|
{
|
|
@@ -11876,7 +12083,7 @@ var methodsByCategory = {
|
|
|
11876
12083
|
name: "getPluginData",
|
|
11877
12084
|
category: "DesignPageNode",
|
|
11878
12085
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
11879
|
-
description: "Get plugin data by key
|
|
12086
|
+
description: "Get plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@returns The stored value, or `null` if no data exists for the key.",
|
|
11880
12087
|
references: []
|
|
11881
12088
|
},
|
|
11882
12089
|
{
|
|
@@ -11897,7 +12104,7 @@ var methodsByCategory = {
|
|
|
11897
12104
|
name: "navigateTo",
|
|
11898
12105
|
category: "DesignPageNode",
|
|
11899
12106
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
11900
|
-
description: "Navigate to this node
|
|
12107
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
11901
12108
|
references: ["NavigableOptions"]
|
|
11902
12109
|
},
|
|
11903
12110
|
{
|
|
@@ -11918,21 +12125,21 @@ var methodsByCategory = {
|
|
|
11918
12125
|
name: "setAttributes",
|
|
11919
12126
|
category: "DesignPageNode",
|
|
11920
12127
|
signature: 'setAttributes(update: Partial<NodeClassToEditableAttributes[(typeof this)[ClassKey]]>): Promise<(typeof this)[ClassKey] extends "UnknownNode" ? never : typeof this | null>',
|
|
11921
|
-
description: 'Set the attributes of this node
|
|
12128
|
+
description: 'Set the attributes of this node.\n\nAttributes are merged with existing values, so only the provided\nattributes are updated.\n\n@param update - The attributes to update.\n@returns The updated node, or `null` if the node was not found.\n@throws If the node is an `UnknownNode`.\n\nUse `"Node.setAttributes"` to check if this method is allowed.',
|
|
11922
12129
|
references: []
|
|
11923
12130
|
},
|
|
11924
12131
|
{
|
|
11925
12132
|
name: "setPluginData",
|
|
11926
12133
|
category: "DesignPageNode",
|
|
11927
12134
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
11928
|
-
description: 'Set plugin data by key
|
|
12135
|
+
description: 'Set plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@param value - The value to set, or `null` to remove.\n\nUse `"Node.setPluginData"` to check if this method is allowed.',
|
|
11929
12136
|
references: []
|
|
11930
12137
|
},
|
|
11931
12138
|
{
|
|
11932
12139
|
name: "walk",
|
|
11933
12140
|
category: "DesignPageNode",
|
|
11934
12141
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
11935
|
-
description: "Walk this node and its descendants recursively
|
|
12142
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
11936
12143
|
references: ["AnyNode"]
|
|
11937
12144
|
},
|
|
11938
12145
|
{
|
|
@@ -12285,14 +12492,14 @@ var methodsByCategory = {
|
|
|
12285
12492
|
name: "aspectRatio",
|
|
12286
12493
|
category: "FrameNode",
|
|
12287
12494
|
signature: "aspectRatio: number | null",
|
|
12288
|
-
description: "Width-to-height ratio (e.g. `1.5` for 3:2).\nSetting to `null` removes the aspect ratio constraint.\nSupported by FrameNode, ComponentInstanceNode.",
|
|
12495
|
+
description: "Width-to-height ratio (e.g. `1.5` for 3:2).\n\nSetting to `null` removes the aspect ratio constraint.\nSupported by FrameNode, ComponentInstanceNode.",
|
|
12289
12496
|
references: []
|
|
12290
12497
|
},
|
|
12291
12498
|
{
|
|
12292
12499
|
name: "backgroundColor",
|
|
12293
12500
|
category: "FrameNode",
|
|
12294
12501
|
signature: "backgroundColor: ColorStyle | string | null",
|
|
12295
|
-
description: "Background color in RGBA format (e.g. `rgba(242, 59, 57, 1)`) or as a {@link ColorStyle} instance.\nSetting to `null` removes the background color. Supported by FrameNode.",
|
|
12502
|
+
description: "Background color in RGBA format (e.g. `rgba(242, 59, 57, 1)`) or as a {@link ColorStyle} instance.\n\nSetting to `null` removes the background color. Supported by FrameNode.",
|
|
12296
12503
|
references: ["ColorStyle"]
|
|
12297
12504
|
},
|
|
12298
12505
|
{
|
|
@@ -12313,35 +12520,35 @@ var methodsByCategory = {
|
|
|
12313
12520
|
name: "border",
|
|
12314
12521
|
category: "FrameNode",
|
|
12315
12522
|
signature: "border: Border | null",
|
|
12316
|
-
description: 'Border properties including width, color, and style.\nStyles: `"solid"`, `"dashed"`, `"dotted"`, `"double"`.\nWidth can be per-side (e.g. `"1px 2px 3px 4px"`).\nSetting to `null` removes the border. Supported by FrameNode.',
|
|
12523
|
+
description: 'Border properties including width, color, and style.\n\nStyles: `"solid"`, `"dashed"`, `"dotted"`, `"double"`.\nWidth can be per-side (e.g. `"1px 2px 3px 4px"`).\nSetting to `null` removes the border. Supported by FrameNode.',
|
|
12317
12524
|
references: ["Border"]
|
|
12318
12525
|
},
|
|
12319
12526
|
{
|
|
12320
12527
|
name: "borderRadius",
|
|
12321
12528
|
category: "FrameNode",
|
|
12322
12529
|
signature: "borderRadius: BorderRadius",
|
|
12323
|
-
description: 'Border radius for rounded corners
|
|
12530
|
+
description: 'Border radius for rounded corners.\n\nSingle value (e.g. `"10px"` or `"50%"`)\nor per-corner (e.g. `"10px 20px 30px 40px"` for top-left, top-right, bottom-right, bottom-left).\nSetting to `null` removes the border radius. Supported by FrameNode.',
|
|
12324
12531
|
references: ["BorderRadius"]
|
|
12325
12532
|
},
|
|
12326
12533
|
{
|
|
12327
12534
|
name: "bottom",
|
|
12328
12535
|
category: "FrameNode",
|
|
12329
12536
|
signature: "bottom: CSSDimension<CSSUnit.Pixel> | null",
|
|
12330
|
-
description: 'Distance from bottom edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12537
|
+
description: 'Distance from bottom edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12331
12538
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
12332
12539
|
},
|
|
12333
12540
|
{
|
|
12334
12541
|
name: "centerX",
|
|
12335
12542
|
category: "FrameNode",
|
|
12336
12543
|
signature: "centerX: CSSDimension<CSSUnit.Percentage> | null",
|
|
12337
|
-
description: 'Center anchor horizontal position as percentage (e.g. `"50%"`).\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12544
|
+
description: 'Center anchor horizontal position as percentage (e.g. `"50%"`).\n\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12338
12545
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
12339
12546
|
},
|
|
12340
12547
|
{
|
|
12341
12548
|
name: "centerY",
|
|
12342
12549
|
category: "FrameNode",
|
|
12343
12550
|
signature: "centerY: CSSDimension<CSSUnit.Percentage> | null",
|
|
12344
|
-
description: 'Center anchor vertical position as percentage (e.g. `"50%"`).\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12551
|
+
description: 'Center anchor vertical position as percentage (e.g. `"50%"`).\n\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12345
12552
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
12346
12553
|
},
|
|
12347
12554
|
{
|
|
@@ -12355,7 +12562,7 @@ var methodsByCategory = {
|
|
|
12355
12562
|
name: "gap",
|
|
12356
12563
|
category: "FrameNode",
|
|
12357
12564
|
signature: 'gap: WithLayoutTrait["gap"]',
|
|
12358
|
-
description: 'Spacing between items in a layout
|
|
12565
|
+
description: 'Spacing between items in a layout.\n\nSingle value (e.g. `"10px"`) applies to both axes;\ntwo values (e.g. `"10px 20px"`) set horizontal and vertical separately.\nOnly works with layout enabled. Supported by FrameNode.',
|
|
12359
12566
|
references: []
|
|
12360
12567
|
},
|
|
12361
12568
|
{
|
|
@@ -12369,7 +12576,7 @@ var methodsByCategory = {
|
|
|
12369
12576
|
name: "getNodesWithAttribute",
|
|
12370
12577
|
category: "FrameNode",
|
|
12371
12578
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
12372
|
-
description: 'Get the descendants of this node that support `attribute
|
|
12579
|
+
description: 'Get the descendants of this node that support `attribute`.\n\nThis returns nodes that have the given attribute defined in their type,\nregardless of whether it has been set.\n\n@param attribute - The attribute name to filter by.\n@returns An array of nodes that support the attribute.\n\n@example\n```ts\n// Get any kind of node that has a background color attribute.\nconst nodes = await framer.getNodesWithAttribute("backgroundColor")\n```',
|
|
12373
12580
|
references: ["T", "Node"]
|
|
12374
12581
|
},
|
|
12375
12582
|
{
|
|
@@ -12383,7 +12590,7 @@ var methodsByCategory = {
|
|
|
12383
12590
|
name: "getNodesWithType",
|
|
12384
12591
|
category: "FrameNode",
|
|
12385
12592
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
12386
|
-
description: 'Get descendants of this node that match the given type
|
|
12593
|
+
description: 'Get descendants of this node that match the given type.\n\nThis can also be used to query within a selection subtree.\n\n@param type - The node type to search for.\n@returns An array of matching descendant nodes.\n\n@example\n```ts\n// Get all frame nodes in a project.\nconst frameNodes = await framer.getNodesWithType("FrameNode")\n\n// Query within a selection subtree.\nconst selection = await framer.getSelection()\nif (selection.length === 1) {\n const frameNodes = await selection[0].getNodesWithType("FrameNode")\n}\n```',
|
|
12387
12594
|
references: ["FrameNode"]
|
|
12388
12595
|
},
|
|
12389
12596
|
{
|
|
@@ -12397,7 +12604,7 @@ var methodsByCategory = {
|
|
|
12397
12604
|
name: "getPluginData",
|
|
12398
12605
|
category: "FrameNode",
|
|
12399
12606
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
12400
|
-
description: "Get plugin data by key
|
|
12607
|
+
description: "Get plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@returns The stored value, or `null` if no data exists for the key.",
|
|
12401
12608
|
references: []
|
|
12402
12609
|
},
|
|
12403
12610
|
{
|
|
@@ -12453,42 +12660,42 @@ var methodsByCategory = {
|
|
|
12453
12660
|
name: "gridItemColumnSpan",
|
|
12454
12661
|
category: "FrameNode",
|
|
12455
12662
|
signature: 'gridItemColumnSpan: WithGridItemTrait["gridItemColumnSpan"]',
|
|
12456
|
-
description: 'Number of columns to span, or `"all"` for all columns
|
|
12663
|
+
description: 'Number of columns to span, or `"all"` for all columns.\n\nFor nodes inside a grid container. Defaults to `1`. Supported by FrameNode, TextNode.',
|
|
12457
12664
|
references: []
|
|
12458
12665
|
},
|
|
12459
12666
|
{
|
|
12460
12667
|
name: "gridItemFillCellHeight",
|
|
12461
12668
|
category: "FrameNode",
|
|
12462
12669
|
signature: 'gridItemFillCellHeight: WithGridItemTrait["gridItemFillCellHeight"]',
|
|
12463
|
-
description: "Whether to fill the grid cell height
|
|
12670
|
+
description: "Whether to fill the grid cell height.\n\nFor nodes inside a grid container. Defaults to `true`. Supported by FrameNode, TextNode.",
|
|
12464
12671
|
references: []
|
|
12465
12672
|
},
|
|
12466
12673
|
{
|
|
12467
12674
|
name: "gridItemFillCellWidth",
|
|
12468
12675
|
category: "FrameNode",
|
|
12469
12676
|
signature: 'gridItemFillCellWidth: WithGridItemTrait["gridItemFillCellWidth"]',
|
|
12470
|
-
description: "Whether to fill the grid cell width
|
|
12677
|
+
description: "Whether to fill the grid cell width.\n\nFor nodes inside a grid container. Defaults to `true`. Supported by FrameNode, TextNode.",
|
|
12471
12678
|
references: []
|
|
12472
12679
|
},
|
|
12473
12680
|
{
|
|
12474
12681
|
name: "gridItemHorizontalAlignment",
|
|
12475
12682
|
category: "FrameNode",
|
|
12476
12683
|
signature: 'gridItemHorizontalAlignment: WithGridItemTrait["gridItemHorizontalAlignment"]',
|
|
12477
|
-
description: 'Horizontal alignment within grid cell
|
|
12684
|
+
description: 'Horizontal alignment within grid cell.\n\nFor nodes inside a grid container. Defaults to `"center"`. Supported by FrameNode, TextNode.',
|
|
12478
12685
|
references: []
|
|
12479
12686
|
},
|
|
12480
12687
|
{
|
|
12481
12688
|
name: "gridItemRowSpan",
|
|
12482
12689
|
category: "FrameNode",
|
|
12483
12690
|
signature: 'gridItemRowSpan: WithGridItemTrait["gridItemRowSpan"]',
|
|
12484
|
-
description: "Number of rows to span
|
|
12691
|
+
description: "Number of rows to span.\n\nFor nodes inside a grid container. Defaults to `1`. Supported by FrameNode, TextNode.",
|
|
12485
12692
|
references: []
|
|
12486
12693
|
},
|
|
12487
12694
|
{
|
|
12488
12695
|
name: "gridItemVerticalAlignment",
|
|
12489
12696
|
category: "FrameNode",
|
|
12490
12697
|
signature: 'gridItemVerticalAlignment: WithGridItemTrait["gridItemVerticalAlignment"]',
|
|
12491
|
-
description: 'Vertical alignment within grid cell
|
|
12698
|
+
description: 'Vertical alignment within grid cell.\n\nFor nodes inside a grid container. Defaults to `"center"`. Supported by FrameNode, TextNode.',
|
|
12492
12699
|
references: []
|
|
12493
12700
|
},
|
|
12494
12701
|
{
|
|
@@ -12516,14 +12723,14 @@ var methodsByCategory = {
|
|
|
12516
12723
|
name: "height",
|
|
12517
12724
|
category: "FrameNode",
|
|
12518
12725
|
signature: "height: HeightLength | null",
|
|
12519
|
-
description: 'Height of the node
|
|
12726
|
+
description: 'Height of the node.\n\nAccepts pixel, percentage, fraction, viewport-height values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12520
12727
|
references: ["HeightLength"]
|
|
12521
12728
|
},
|
|
12522
12729
|
{
|
|
12523
12730
|
name: "imageRendering",
|
|
12524
12731
|
category: "FrameNode",
|
|
12525
12732
|
signature: "imageRendering: ImageRendering | null",
|
|
12526
|
-
description: 'How images should be rendered when scaled: `"auto"` or `"pixelated"`.\nOnly applies to frames with image backgrounds.\nSetting to `null` uses default rendering. Supported by FrameNode.',
|
|
12733
|
+
description: 'How images should be rendered when scaled: `"auto"` or `"pixelated"`.\n\nOnly applies to frames with image backgrounds.\nSetting to `null` uses default rendering. Supported by FrameNode.',
|
|
12527
12734
|
references: ["ImageRendering"]
|
|
12528
12735
|
},
|
|
12529
12736
|
{
|
|
@@ -12544,21 +12751,21 @@ var methodsByCategory = {
|
|
|
12544
12751
|
name: "layout",
|
|
12545
12752
|
category: "FrameNode",
|
|
12546
12753
|
signature: 'layout: WithLayoutTrait["layout"]',
|
|
12547
|
-
description: "Enables stack or grid layout
|
|
12754
|
+
description: "Enables stack or grid layout.\n\nSetting to `null` disables any applied layout.\nOperation is deferred and applied after the current update cycle. Supported by FrameNode.",
|
|
12548
12755
|
references: []
|
|
12549
12756
|
},
|
|
12550
12757
|
{
|
|
12551
12758
|
name: "left",
|
|
12552
12759
|
category: "FrameNode",
|
|
12553
12760
|
signature: "left: CSSDimension<CSSUnit.Pixel> | null",
|
|
12554
|
-
description: 'Distance from left edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12761
|
+
description: 'Distance from left edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12555
12762
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
12556
12763
|
},
|
|
12557
12764
|
{
|
|
12558
12765
|
name: "link",
|
|
12559
12766
|
category: "FrameNode",
|
|
12560
12767
|
signature: 'link: WithLinkTrait["link"]',
|
|
12561
|
-
description: 'URL or internal page link
|
|
12768
|
+
description: 'URL or internal page link.\n\nExternal: `"https://example.com"`, internal: `"/about"`,\nemail: `"mailto:user@example.com"`. Setting to `null` removes the link.\nSupported by FrameNode, TextNode.',
|
|
12562
12769
|
references: []
|
|
12563
12770
|
},
|
|
12564
12771
|
{
|
|
@@ -12572,7 +12779,7 @@ var methodsByCategory = {
|
|
|
12572
12779
|
name: "linkOpenInNewTab",
|
|
12573
12780
|
category: "FrameNode",
|
|
12574
12781
|
signature: 'linkOpenInNewTab: WithLinkTrait["linkOpenInNewTab"]',
|
|
12575
|
-
description: "Whether to open the link in a new tab
|
|
12782
|
+
description: "Whether to open the link in a new tab.\n\nDefault is automatically determined based on link type.\nSupported by FrameNode, TextNode.",
|
|
12576
12783
|
references: []
|
|
12577
12784
|
},
|
|
12578
12785
|
{
|
|
@@ -12600,7 +12807,7 @@ var methodsByCategory = {
|
|
|
12600
12807
|
name: "locked",
|
|
12601
12808
|
category: "FrameNode",
|
|
12602
12809
|
signature: "locked: boolean",
|
|
12603
|
-
description: "Whether the node is locked for editing
|
|
12810
|
+
description: "Whether the node is locked for editing.\n\nDefaults to `false`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
12604
12811
|
references: []
|
|
12605
12812
|
},
|
|
12606
12813
|
{
|
|
@@ -12635,49 +12842,49 @@ var methodsByCategory = {
|
|
|
12635
12842
|
name: "name",
|
|
12636
12843
|
category: "FrameNode",
|
|
12637
12844
|
signature: "name: string | null",
|
|
12638
|
-
description: "The name of the node displayed in the layers panel.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
12845
|
+
description: "The name of the node displayed in the layers panel.\n\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
12639
12846
|
references: []
|
|
12640
12847
|
},
|
|
12641
12848
|
{
|
|
12642
12849
|
name: "navigateTo",
|
|
12643
12850
|
category: "FrameNode",
|
|
12644
12851
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
12645
|
-
description: "Navigate to this node
|
|
12852
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
12646
12853
|
references: ["NavigableOptions"]
|
|
12647
12854
|
},
|
|
12648
12855
|
{
|
|
12649
12856
|
name: "opacity",
|
|
12650
12857
|
category: "FrameNode",
|
|
12651
12858
|
signature: "opacity: number",
|
|
12652
|
-
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque)
|
|
12859
|
+
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque).\n\nDefaults to `1`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
12653
12860
|
references: []
|
|
12654
12861
|
},
|
|
12655
12862
|
{
|
|
12656
12863
|
name: "overflow",
|
|
12657
12864
|
category: "FrameNode",
|
|
12658
12865
|
signature: 'overflow: WithOverflowTrait["overflow"]',
|
|
12659
|
-
description: "Controls how content that exceeds the element's box is handled.\nSetting to `null` removes the overflow property. Will overwrite `overflowX` or `overflowY`.\nSupported by FrameNode, TextNode.",
|
|
12866
|
+
description: "Controls how content that exceeds the element's box is handled.\n\nSetting to `null` removes the overflow property. Will overwrite `overflowX` or `overflowY`.\nSupported by FrameNode, TextNode.",
|
|
12660
12867
|
references: []
|
|
12661
12868
|
},
|
|
12662
12869
|
{
|
|
12663
12870
|
name: "overflowX",
|
|
12664
12871
|
category: "FrameNode",
|
|
12665
12872
|
signature: 'overflowX: WithOverflowTrait["overflowX"]',
|
|
12666
|
-
description: "Controls horizontal overflow behavior.\nSetting to `null` removes the overflow X property. Supported by FrameNode, TextNode.",
|
|
12873
|
+
description: "Controls horizontal overflow behavior.\n\nSetting to `null` removes the overflow X property. Supported by FrameNode, TextNode.",
|
|
12667
12874
|
references: []
|
|
12668
12875
|
},
|
|
12669
12876
|
{
|
|
12670
12877
|
name: "overflowY",
|
|
12671
12878
|
category: "FrameNode",
|
|
12672
12879
|
signature: 'overflowY: WithOverflowTrait["overflowY"]',
|
|
12673
|
-
description: "Controls vertical overflow behavior.\nSetting to `null` removes the overflow Y property. Supported by FrameNode, TextNode.",
|
|
12880
|
+
description: "Controls vertical overflow behavior.\n\nSetting to `null` removes the overflow Y property. Supported by FrameNode, TextNode.",
|
|
12674
12881
|
references: []
|
|
12675
12882
|
},
|
|
12676
12883
|
{
|
|
12677
12884
|
name: "padding",
|
|
12678
12885
|
category: "FrameNode",
|
|
12679
12886
|
signature: 'padding: WithLayoutTrait["padding"]',
|
|
12680
|
-
description: 'Inner spacing of a container with layout
|
|
12887
|
+
description: 'Inner spacing of a container with layout.\n\nSingle value (e.g. `"10px"`) applies to all sides;\nfour values (e.g. `"10px 20px 30px 40px"`) set top, right, bottom, left.\nOnly works with layout enabled. Supported by FrameNode.',
|
|
12681
12888
|
references: []
|
|
12682
12889
|
},
|
|
12683
12890
|
{
|
|
@@ -12698,14 +12905,14 @@ var methodsByCategory = {
|
|
|
12698
12905
|
name: "right",
|
|
12699
12906
|
category: "FrameNode",
|
|
12700
12907
|
signature: "right: CSSDimension<CSSUnit.Pixel> | null",
|
|
12701
|
-
description: 'Distance from right edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12908
|
+
description: 'Distance from right edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12702
12909
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
12703
12910
|
},
|
|
12704
12911
|
{
|
|
12705
12912
|
name: "rotation",
|
|
12706
12913
|
category: "FrameNode",
|
|
12707
12914
|
signature: "rotation: number",
|
|
12708
|
-
description: "Rotation angle in degrees
|
|
12915
|
+
description: "Rotation angle in degrees.\n\nDefaults to `0`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
12709
12916
|
references: []
|
|
12710
12917
|
},
|
|
12711
12918
|
{
|
|
@@ -12719,14 +12926,14 @@ var methodsByCategory = {
|
|
|
12719
12926
|
name: "setAttributes",
|
|
12720
12927
|
category: "FrameNode",
|
|
12721
12928
|
signature: 'setAttributes(update: Partial<NodeClassToEditableAttributes[(typeof this)[ClassKey]]>): Promise<(typeof this)[ClassKey] extends "UnknownNode" ? never : typeof this | null>',
|
|
12722
|
-
description: 'Set the attributes of this node
|
|
12929
|
+
description: 'Set the attributes of this node.\n\nAttributes are merged with existing values, so only the provided\nattributes are updated.\n\n@param update - The attributes to update.\n@returns The updated node, or `null` if the node was not found.\n@throws If the node is an `UnknownNode`.\n\nUse `"Node.setAttributes"` to check if this method is allowed.',
|
|
12723
12930
|
references: []
|
|
12724
12931
|
},
|
|
12725
12932
|
{
|
|
12726
12933
|
name: "setPluginData",
|
|
12727
12934
|
category: "FrameNode",
|
|
12728
12935
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
12729
|
-
description: 'Set plugin data by key
|
|
12936
|
+
description: 'Set plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@param value - The value to set, or `null` to remove.\n\nUse `"Node.setPluginData"` to check if this method is allowed.',
|
|
12730
12937
|
references: []
|
|
12731
12938
|
},
|
|
12732
12939
|
{
|
|
@@ -12761,35 +12968,35 @@ var methodsByCategory = {
|
|
|
12761
12968
|
name: "top",
|
|
12762
12969
|
category: "FrameNode",
|
|
12763
12970
|
signature: "top: CSSDimension<CSSUnit.Pixel> | null",
|
|
12764
|
-
description: 'Distance from top edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12971
|
+
description: 'Distance from top edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12765
12972
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
12766
12973
|
},
|
|
12767
12974
|
{
|
|
12768
12975
|
name: "visible",
|
|
12769
12976
|
category: "FrameNode",
|
|
12770
12977
|
signature: "visible: boolean",
|
|
12771
|
-
description: "Whether the node is visible on the canvas
|
|
12978
|
+
description: "Whether the node is visible on the canvas.\n\nDefaults to `true`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
12772
12979
|
references: []
|
|
12773
12980
|
},
|
|
12774
12981
|
{
|
|
12775
12982
|
name: "walk",
|
|
12776
12983
|
category: "FrameNode",
|
|
12777
12984
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
12778
|
-
description: "Walk this node and its descendants recursively
|
|
12985
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
12779
12986
|
references: ["AnyNode"]
|
|
12780
12987
|
},
|
|
12781
12988
|
{
|
|
12782
12989
|
name: "width",
|
|
12783
12990
|
category: "FrameNode",
|
|
12784
12991
|
signature: "width: WidthLength | null",
|
|
12785
|
-
description: 'Width of the node
|
|
12992
|
+
description: 'Width of the node.\n\nAccepts pixel, percentage, fraction values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12786
12993
|
references: ["WidthLength"]
|
|
12787
12994
|
},
|
|
12788
12995
|
{
|
|
12789
12996
|
name: "zIndex",
|
|
12790
12997
|
category: "FrameNode",
|
|
12791
12998
|
signature: 'zIndex: WithZIndexTrait["zIndex"]',
|
|
12792
|
-
description: "Stacking order of positioned elements
|
|
12999
|
+
description: "Stacking order of positioned elements.\n\nHigher values appear on top of lower values.\nSetting to `null` removes the z-index property. Supported by FrameNode, TextNode.",
|
|
12793
13000
|
references: []
|
|
12794
13001
|
},
|
|
12795
13002
|
{
|
|
@@ -12808,6 +13015,13 @@ var methodsByCategory = {
|
|
|
12808
13015
|
description: 'Applies commands to the canvas to create, update, remove, move, or duplicate nodes.\n\nThe command syntax is documented in the string returned by {@link getAgentSystemPrompt}.\nEach call is scoped to a single page.\n\n@param dsl - A string of commands separated by `;`. See {@link getAgentSystemPrompt} for syntax.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.',
|
|
12809
13016
|
references: []
|
|
12810
13017
|
},
|
|
13018
|
+
{
|
|
13019
|
+
name: "[$framerApiOnly.flattenComponentInstanceForAgent]",
|
|
13020
|
+
category: "framer",
|
|
13021
|
+
signature: "[$framerApiOnly.flattenComponentInstanceForAgent](input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13022
|
+
description: 'Flattens a local component instance into raw editable layers.\n\n@param input - `{ id }`: the id of the component instance to flatten.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The flatten result \u2014 `success` with a `replacementId`, or `blocked` with a reason.',
|
|
13023
|
+
references: []
|
|
13024
|
+
},
|
|
12811
13025
|
{
|
|
12812
13026
|
name: "[$framerApiOnly.getAgentContext]",
|
|
12813
13027
|
category: "framer",
|
|
@@ -12822,6 +13036,76 @@ var methodsByCategory = {
|
|
|
12822
13036
|
description: "Returns the static agent system prompt as a string.\n\nThe prompt includes:\n- **Command reference** \u2014 syntax for adding, updating, removing, moving, and duplicating nodes.\n- **Design rules** \u2014 spacing, layout, typography, and responsive design guidance.\n- **Examples** \u2014 common UI patterns expressed as commands.\n- **`readProjectForAgent` query reference** \u2014 available query types and their parameters.\n\nThis is the sole documentation for the command syntax used by {@link applyAgentChanges}\nand the query types used by {@link readProjectForAgent}.\n\nThe prompt is static and does not depend on any specific project.\nCall {@link getAgentContext} to get the project-specific context.\n\n@returns A string containing the agent system prompt.",
|
|
12823
13037
|
references: []
|
|
12824
13038
|
},
|
|
13039
|
+
{
|
|
13040
|
+
name: "[$framerApiOnly.getAncestorsForAgent]",
|
|
13041
|
+
category: "framer",
|
|
13042
|
+
signature: "[$framerApiOnly.getAncestorsForAgent](input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13043
|
+
description: 'Get every ancestor of a node, from the direct parent up to the page root.\n\n@param input - `{ id }`: the id of the node to start from.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The ancestors ordered from closest parent to the page root.',
|
|
13044
|
+
references: []
|
|
13045
|
+
},
|
|
13046
|
+
{
|
|
13047
|
+
name: "[$framerApiOnly.getGroundNodeForAgent]",
|
|
13048
|
+
category: "framer",
|
|
13049
|
+
signature: "[$framerApiOnly.getGroundNodeForAgent](input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13050
|
+
description: 'Get the top-level node on the canvas that contains the given node.\n\n@param input - `{ id }`: the id of a descendant node.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The top-level node, or `null` if none applies.',
|
|
13051
|
+
references: []
|
|
13052
|
+
},
|
|
13053
|
+
{
|
|
13054
|
+
name: "[$framerApiOnly.getNodeForAgent]",
|
|
13055
|
+
category: "framer",
|
|
13056
|
+
signature: "[$framerApiOnly.getNodeForAgent](input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13057
|
+
description: 'Get a single node on the page, including its children.\n\n@param input - `{ id }`: the id of the node to read.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The node, or `null` if no node with that id exists on the page.',
|
|
13058
|
+
references: []
|
|
13059
|
+
},
|
|
13060
|
+
{
|
|
13061
|
+
name: "[$framerApiOnly.getNodesForAgent]",
|
|
13062
|
+
category: "framer",
|
|
13063
|
+
signature: "[$framerApiOnly.getNodesForAgent](input: { ids: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13064
|
+
description: 'Get multiple nodes on the page, including their children.\nIds that don\'t resolve to a node are skipped.\n\n@param input - `{ ids }`: the ids of the nodes to read.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The nodes that were found, in input order.',
|
|
13065
|
+
references: []
|
|
13066
|
+
},
|
|
13067
|
+
{
|
|
13068
|
+
name: "[$framerApiOnly.getNodesOfTypesForAgent]",
|
|
13069
|
+
category: "framer",
|
|
13070
|
+
signature: "[$framerApiOnly.getNodesOfTypesForAgent](input: { types: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13071
|
+
description: 'Get every node on the page of one or more kinds (e.g. `"FrameNode"`, `"RichTextNode"`, `"ComponentInstanceNode"`).\n\n@param input - `{ types }`: the node kinds to match.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The matching nodes without their children.',
|
|
13072
|
+
references: []
|
|
13073
|
+
},
|
|
13074
|
+
{
|
|
13075
|
+
name: "[$framerApiOnly.getParentNodeForAgent]",
|
|
13076
|
+
category: "framer",
|
|
13077
|
+
signature: "[$framerApiOnly.getParentNodeForAgent](input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13078
|
+
description: 'Get the direct parent of a node.\n\n@param input - `{ id }`: the id of the child node.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The parent node, or `null` if the node has no parent or doesn\'t exist.',
|
|
13079
|
+
references: []
|
|
13080
|
+
},
|
|
13081
|
+
{
|
|
13082
|
+
name: "[$framerApiOnly.getScopeNodeForAgent]",
|
|
13083
|
+
category: "framer",
|
|
13084
|
+
signature: "[$framerApiOnly.getScopeNodeForAgent](input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13085
|
+
description: 'Get the scope node (page or component) that contains the given node.\n\n@param input - `{ id }`: the id of a node inside the scope.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The enclosing scope node, or `null` if the node isn\'t in any scope.',
|
|
13086
|
+
references: []
|
|
13087
|
+
},
|
|
13088
|
+
{
|
|
13089
|
+
name: "[$framerApiOnly.makeExternalComponentLocalForAgent]",
|
|
13090
|
+
category: "framer",
|
|
13091
|
+
signature: "[$framerApiOnly.makeExternalComponentLocalForAgent](input: { id: string; replaceAll?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13092
|
+
description: 'Converts an external component into a local project component.\n\n@param input - `{ id, replaceAll? }`: the id of the external instance, and whether to replace all instances.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns `success` (with the local component name), `needs_confirmation` (retry with `replaceAll`), or `blocked` with a reason.',
|
|
13093
|
+
references: []
|
|
13094
|
+
},
|
|
13095
|
+
{
|
|
13096
|
+
name: "[$framerApiOnly.publishForAgent]",
|
|
13097
|
+
category: "framer",
|
|
13098
|
+
signature: "[$framerApiOnly.publishForAgent](input?: Record<string, unknown>): Promise<unknown>",
|
|
13099
|
+
description: "Executes the publish flow on behalf of an agent.\n\nThe input schema is documented in the string returned by {@link getAgentSystemPrompt}.\n\n@param input - Action-discriminated input object (preview / confirm_publish / deploy_to_production).\n@returns The action's result \u2014 status, publish URLs, and any errors, warnings, or changes.",
|
|
13100
|
+
references: []
|
|
13101
|
+
},
|
|
13102
|
+
{
|
|
13103
|
+
name: "[$framerApiOnly.queryImagesForAgent]",
|
|
13104
|
+
category: "framer",
|
|
13105
|
+
signature: "[$framerApiOnly.queryImagesForAgent](input: Record<string, unknown>): Promise<unknown>",
|
|
13106
|
+
description: 'Searches for stock images to use on the canvas (e.g. `"FrameNode"` `fill` values). Returns\ncandidate images with preview thumbnails and a `url` field for each. The returned URLs are\nregistered as trusted for this session so they can be applied directly via `fill="<url>"`\nin a subsequent {@link applyAgentChanges} DSL command. Without calling this method first,\nexternal image URLs are rejected at apply time.\n\nThe input schema is documented in the string returned by {@link getAgentSystemPrompt}.\n\n@param input - Search input object (source / query / count / orientation).\n@returns An object describing the candidates or an error.',
|
|
13107
|
+
references: []
|
|
13108
|
+
},
|
|
12825
13109
|
{
|
|
12826
13110
|
name: "[$framerApiOnly.readProjectForAgent]",
|
|
12827
13111
|
category: "framer",
|
|
@@ -12829,6 +13113,13 @@ var methodsByCategory = {
|
|
|
12829
13113
|
description: 'Reads project state by executing an array of queries against the project.\n\nReturns one result per query. Available query types and their parameters\nare documented in the string returned by {@link getAgentSystemPrompt}.\n\n@param queries - Array of query objects. See {@link getAgentSystemPrompt} for available types.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns An object with a `results` array, one entry per query.',
|
|
12830
13114
|
references: []
|
|
12831
13115
|
},
|
|
13116
|
+
{
|
|
13117
|
+
name: "[$framerApiOnly.reviewChangesForAgent]",
|
|
13118
|
+
category: "framer",
|
|
13119
|
+
signature: "[$framerApiOnly.reviewChangesForAgent](options?: { pagePath?: string; }): Promise<unknown>",
|
|
13120
|
+
description: "Reviews changes made by prior {@link applyAgentChanges} calls in this session.\n\nConsumes accumulated diagnostics from the session's agent context.\n\n@param options.pagePath - Target page path (e.g. `\"/about\"`). Defaults to the active page.\n@returns The session's accumulated changes, errors, warnings, and deferred trait reports.",
|
|
13121
|
+
references: []
|
|
13122
|
+
},
|
|
12832
13123
|
{
|
|
12833
13124
|
name: "[$framerInternal.initialState]",
|
|
12834
13125
|
category: "framer",
|
|
@@ -12854,7 +13145,7 @@ var methodsByCategory = {
|
|
|
12854
13145
|
name: "addComponentInstance",
|
|
12855
13146
|
category: "framer",
|
|
12856
13147
|
signature: "addComponentInstance({ url, attributes, parentId, }: AddComponentInstanceOptions): Promise<ComponentInstanceNode>",
|
|
12857
|
-
description: "Add a component instance by module URL.\n\n@param url - The component module URL. Can be copied from the components panel.\n@param attributes - Optional component attributes.\n\n@returns The newly created component instance node
|
|
13148
|
+
description: "Add a component instance by module URL.\n\n@param url - The component module URL. Can be copied from the components panel.\n@param attributes - Optional component attributes.\n\n@returns The newly created component instance node.\n@category canvas",
|
|
12858
13149
|
references: ["AddComponentInstanceOptions", "ComponentInstanceNode"]
|
|
12859
13150
|
},
|
|
12860
13151
|
{
|
|
@@ -12871,42 +13162,42 @@ var methodsByCategory = {
|
|
|
12871
13162
|
name: "addDetachedComponentLayers",
|
|
12872
13163
|
category: "framer",
|
|
12873
13164
|
signature: "addDetachedComponentLayers({ url, layout, attributes }: AddDetachedComponentLayersOptions): Promise<FrameNode>",
|
|
12874
|
-
description: "Adds the layers of a component by module URL
|
|
13165
|
+
description: "Adds the layers of a component by module URL.\n@category canvas",
|
|
12875
13166
|
references: ["AddDetachedComponentLayersOptions", "FrameNode"]
|
|
12876
13167
|
},
|
|
12877
13168
|
{
|
|
12878
13169
|
name: "addImage",
|
|
12879
13170
|
category: "framer",
|
|
12880
13171
|
signature: "addImage(image: NamedImageAssetInput | File): Promise<void>",
|
|
12881
|
-
description: "Upload an image, and insert on the canvas
|
|
13172
|
+
description: "Upload an image, and insert on the canvas.\n@category canvas",
|
|
12882
13173
|
references: ["NamedImageAssetInput", "File"]
|
|
12883
13174
|
},
|
|
12884
13175
|
{
|
|
12885
13176
|
name: "addImages",
|
|
12886
13177
|
category: "framer",
|
|
12887
13178
|
signature: "addImages(images: readonly NamedImageAssetInput[]): Promise<void>",
|
|
12888
|
-
description: "Add multiple images, replacing the selected images, or insert on the canvas
|
|
13179
|
+
description: "Add multiple images, replacing the selected images, or insert on the canvas.\n@category canvas",
|
|
12889
13180
|
references: ["NamedImageAssetInput"]
|
|
12890
13181
|
},
|
|
12891
13182
|
{
|
|
12892
13183
|
name: "addRedirects",
|
|
12893
13184
|
category: "framer",
|
|
12894
13185
|
signature: "addRedirects(redirects: RedirectInput[]): Promise<Redirect[]>",
|
|
12895
|
-
description: 'Add new redirects or update existing ones if their IDs match\n\n`from` paths can contain wildcards (`*`) which match any string, and\ncaptured groups can be referenced in the `to` path using `:1`, `:2`,\netc.\n\nThrows a `FramerPluginError` when the user lacks Site Settings permissions,\nwhen the project plan does not include Redirects, or when the maximum\nredirect count (2500) is reached.\n\n@param redirects - An array of redirect objects to add.\n@returns The added Redirects.\n\n@example\n```ts\nawait framer.addRedirects([\n { from: "/business", to: "/enterprise", expandToAllLocales: true },\n { from: "/posts/*", to: "/blog/:1", expandToAllLocales: false },\n])\n
|
|
13186
|
+
description: 'Add new redirects or update existing ones if their IDs match\n\n`from` paths can contain wildcards (`*`) which match any string, and\ncaptured groups can be referenced in the `to` path using `:1`, `:2`,\netc.\n\nThrows a `FramerPluginError` when the user lacks Site Settings permissions,\nwhen the project plan does not include Redirects, or when the maximum\nredirect count (2500) is reached.\n\n@param redirects - An array of redirect objects to add.\n@returns The added Redirects.\n\n@example\n```ts\nawait framer.addRedirects([\n { from: "/business", to: "/enterprise", expandToAllLocales: true },\n { from: "/posts/*", to: "/blog/:1", expandToAllLocales: false },\n])\n```\n@category settings',
|
|
12896
13187
|
references: ["RedirectInput", "Redirect"]
|
|
12897
13188
|
},
|
|
12898
13189
|
{
|
|
12899
13190
|
name: "addSVG",
|
|
12900
13191
|
category: "framer",
|
|
12901
13192
|
signature: "addSVG(svg: SVGData): Promise<void>",
|
|
12902
|
-
description: "Add an SVG, replacing the selected SVG, or insert on the canvas
|
|
13193
|
+
description: "Add an SVG, replacing the selected SVG, or insert on the canvas.\n@category canvas",
|
|
12903
13194
|
references: ["SVGData"]
|
|
12904
13195
|
},
|
|
12905
13196
|
{
|
|
12906
13197
|
name: "addText",
|
|
12907
13198
|
category: "framer",
|
|
12908
13199
|
signature: "addText(text: string, options?: AddTextOptions): Promise<void>",
|
|
12909
|
-
description: "Add a new text node to the canvas
|
|
13200
|
+
description: "Add a new text node to the canvas.\n@category canvas",
|
|
12910
13201
|
references: ["AddTextOptions"]
|
|
12911
13202
|
},
|
|
12912
13203
|
{
|
|
@@ -12920,7 +13211,7 @@ var methodsByCategory = {
|
|
|
12920
13211
|
name: "cloneNode",
|
|
12921
13212
|
category: "framer",
|
|
12922
13213
|
signature: "cloneNode(nodeId: NodeId): Promise<AnyNode | null>",
|
|
12923
|
-
description: "Clone a node
|
|
13214
|
+
description: "Clone a node.\n@category canvas",
|
|
12924
13215
|
references: ["AnyNode"]
|
|
12925
13216
|
},
|
|
12926
13217
|
{
|
|
@@ -12937,21 +13228,21 @@ var methodsByCategory = {
|
|
|
12937
13228
|
name: "createCodeFile",
|
|
12938
13229
|
category: "framer",
|
|
12939
13230
|
signature: "createCodeFile(name: string, code: string, options?: { editViaPlugin?: boolean; }): Promise<CodeFile>",
|
|
12940
|
-
description: 'Create a new code file in the project.\n\n@param name - The name of the code file (including extension).\n@param code - The initial content of the code file.\n@param options - Optional settings. `editViaPlugin`: when `true`, the "Edit Code" UI action will open the plugin which created the code file.\n@returns The newly created code file instance.\n\n@example\n```ts\nconst newFile = await framer.createCodeFile(\n "MyComponent",\n `export default function MyComponent() {\n return <div>Hello World</div>\n }`\n)\n
|
|
13231
|
+
description: 'Create a new code file in the project.\n\n@param name - The name of the code file (including extension).\n@param code - The initial content of the code file.\n@param options - Optional settings. `editViaPlugin`: when `true`, the "Edit Code" UI action will open the plugin which created the code file.\n@returns The newly created code file instance.\n\n@example\n```ts\nconst newFile = await framer.createCodeFile(\n "MyComponent",\n `export default function MyComponent() {\n return <div>Hello World</div>\n }`\n)\n```\n@category code-files',
|
|
12941
13232
|
references: ["CodeFile"]
|
|
12942
13233
|
},
|
|
12943
13234
|
{
|
|
12944
13235
|
name: "createCollection",
|
|
12945
13236
|
category: "framer",
|
|
12946
13237
|
signature: "createCollection(name: string): Promise<Collection>",
|
|
12947
|
-
description: "Create a new collection.\n\n@param name - The name to give the new collection
|
|
13238
|
+
description: "Create a new collection.\n\n@param name - The name to give the new collection.\n@category cms",
|
|
12948
13239
|
references: ["Collection"]
|
|
12949
13240
|
},
|
|
12950
13241
|
{
|
|
12951
13242
|
name: "createColorStyle",
|
|
12952
13243
|
category: "framer",
|
|
12953
13244
|
signature: "createColorStyle(attributes: ColorStyleAttributes): Promise<ColorStyle>",
|
|
12954
|
-
description: "Add a new color style to the project
|
|
13245
|
+
description: "Add a new color style to the project.\n@category canvas",
|
|
12955
13246
|
references: ["ColorStyleAttributes", "ColorStyle"]
|
|
12956
13247
|
},
|
|
12957
13248
|
{
|
|
@@ -12965,14 +13256,14 @@ var methodsByCategory = {
|
|
|
12965
13256
|
name: "createDesignPage",
|
|
12966
13257
|
category: "framer",
|
|
12967
13258
|
signature: "createDesignPage(pageName: string): Promise<DesignPageNode>",
|
|
12968
|
-
description: 'Create a new design page.\n\nIf you want to open the newly created design page, you can `.navigateTo()` the page after creation.\n\n@param pageName - The name for the new design page.\n\n@example\n```ts\nconst designPage = await framer.createDesignPage("About")\nawait designPage.navigateTo()\n
|
|
13259
|
+
description: 'Create a new design page.\n\nIf you want to open the newly created design page, you can `.navigateTo()` the page after creation.\n\n@param pageName - The name for the new design page.\n\n@example\n```ts\nconst designPage = await framer.createDesignPage("About")\nawait designPage.navigateTo()\n```\n@category canvas',
|
|
12969
13260
|
references: ["DesignPageNode"]
|
|
12970
13261
|
},
|
|
12971
13262
|
{
|
|
12972
13263
|
name: "createFrameNode",
|
|
12973
13264
|
category: "framer",
|
|
12974
13265
|
signature: "createFrameNode(attributes: Partial<EditableFrameNodeAttributes>, parentId?: string): Promise<FrameNode | null>",
|
|
12975
|
-
description: "Create a new node on the canvas
|
|
13266
|
+
description: "Create a new node on the canvas.\n@category canvas",
|
|
12976
13267
|
references: ["EditableFrameNodeAttributes", "FrameNode"]
|
|
12977
13268
|
},
|
|
12978
13269
|
{
|
|
@@ -12986,7 +13277,7 @@ var methodsByCategory = {
|
|
|
12986
13277
|
name: "createManagedCollection",
|
|
12987
13278
|
category: "framer",
|
|
12988
13279
|
signature: "createManagedCollection(name: string): Promise<ManagedCollection>",
|
|
12989
|
-
description: "Add a new plugin-managed CMS Collection.\n\nIf a name is provided which matches an existing Collection, the promise will reject.\n\n@param name - The name to give the new collection.\n\n@example\n```ts\nconst newCollection = await framer.createManagedCollection(name)\n
|
|
13280
|
+
description: "Add a new plugin-managed CMS Collection.\n\nIf a name is provided which matches an existing Collection, the promise will reject.\n\n@param name - The name to give the new collection.\n\n@example\n```ts\nconst newCollection = await framer.createManagedCollection(name)\n```\n@category cms",
|
|
12990
13281
|
references: ["ManagedCollection"]
|
|
12991
13282
|
},
|
|
12992
13283
|
{
|
|
@@ -13000,14 +13291,14 @@ var methodsByCategory = {
|
|
|
13000
13291
|
name: "createTextStyle",
|
|
13001
13292
|
category: "framer",
|
|
13002
13293
|
signature: "createTextStyle(attributes: TextStyleAttributes): Promise<TextStyle>",
|
|
13003
|
-
description: "Add a new text style to the project
|
|
13294
|
+
description: "Add a new text style to the project.\n@category canvas",
|
|
13004
13295
|
references: ["TextStyleAttributes", "TextStyle"]
|
|
13005
13296
|
},
|
|
13006
13297
|
{
|
|
13007
13298
|
name: "createWebPage",
|
|
13008
13299
|
category: "framer",
|
|
13009
13300
|
signature: "createWebPage(pagePath: string): Promise<WebPageNode>",
|
|
13010
|
-
description: 'Create a new web page.\n\nIf you want to open the newly created web page, you can `.navigateTo()` the page after creation.\n\n@param pagePath - The path for the new web page (e.g., "/about").\n\n@example\n```ts\nconst webPage = await framer.createWebPage("/about")\nawait webPage.navigateTo()\n
|
|
13301
|
+
description: 'Create a new web page.\n\nIf you want to open the newly created web page, you can `.navigateTo()` the page after creation.\n\n@param pagePath - The path for the new web page (e.g., "/about").\n\n@example\n```ts\nconst webPage = await framer.createWebPage("/about")\nawait webPage.navigateTo()\n```\n@category canvas',
|
|
13011
13302
|
references: ["WebPageNode"]
|
|
13012
13303
|
},
|
|
13013
13304
|
{
|
|
@@ -13031,6 +13322,13 @@ var methodsByCategory = {
|
|
|
13031
13322
|
description: "",
|
|
13032
13323
|
references: []
|
|
13033
13324
|
},
|
|
13325
|
+
{
|
|
13326
|
+
name: "flattenComponentInstanceForAgent",
|
|
13327
|
+
category: "framer",
|
|
13328
|
+
signature: "flattenComponentInstanceForAgent(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13329
|
+
description: 'Flattens a local component instance into raw editable layers.\n\n@param input - `{ id }`: the id of the component instance to flatten.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The flatten result \u2014 `success` with a `replacementId`, or `blocked` with a reason.',
|
|
13330
|
+
references: []
|
|
13331
|
+
},
|
|
13034
13332
|
{
|
|
13035
13333
|
name: "getAgentContext",
|
|
13036
13334
|
category: "framer",
|
|
@@ -13045,11 +13343,18 @@ var methodsByCategory = {
|
|
|
13045
13343
|
description: "Returns the static agent system prompt as a string.\n\nThe prompt includes:\n- **Command reference** \u2014 syntax for adding, updating, removing, moving, and duplicating nodes.\n- **Design rules** \u2014 spacing, layout, typography, and responsive design guidance.\n- **Examples** \u2014 common UI patterns expressed as commands.\n- **`readProjectForAgent` query reference** \u2014 available query types and their parameters.\n\nThis is the sole documentation for the command syntax used by {@link applyAgentChanges}\nand the query types used by {@link readProjectForAgent}.\n\nThe prompt is static and does not depend on any specific project.\nCall {@link getAgentContext} to get the project-specific context.\n\n@returns A string containing the agent system prompt.",
|
|
13046
13344
|
references: []
|
|
13047
13345
|
},
|
|
13346
|
+
{
|
|
13347
|
+
name: "getAncestorsForAgent",
|
|
13348
|
+
category: "framer",
|
|
13349
|
+
signature: "getAncestorsForAgent(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13350
|
+
description: 'Get every ancestor of a node, from the direct parent up to the page root.\n\n@param input - `{ id }`: the id of the node to start from.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The ancestors ordered from closest parent to the page root.',
|
|
13351
|
+
references: []
|
|
13352
|
+
},
|
|
13048
13353
|
{
|
|
13049
13354
|
name: "getCanvasRoot",
|
|
13050
13355
|
category: "framer",
|
|
13051
13356
|
signature: "getCanvasRoot(): Promise<CanvasRootNode>",
|
|
13052
|
-
description: "Get the root of the current canvas
|
|
13357
|
+
description: "Get the root of the current canvas.\n@category canvas",
|
|
13053
13358
|
references: ["CanvasRootNode"]
|
|
13054
13359
|
},
|
|
13055
13360
|
{
|
|
@@ -13070,70 +13375,70 @@ var methodsByCategory = {
|
|
|
13070
13375
|
name: "getChildren",
|
|
13071
13376
|
category: "framer",
|
|
13072
13377
|
signature: "getChildren(nodeId: NodeId): Promise<CanvasNode[]>",
|
|
13073
|
-
description: "Get the children of a node
|
|
13378
|
+
description: "Get the children of a node.\n@category canvas",
|
|
13074
13379
|
references: ["CanvasNode"]
|
|
13075
13380
|
},
|
|
13076
13381
|
{
|
|
13077
13382
|
name: "getCodeFile",
|
|
13078
13383
|
category: "framer",
|
|
13079
13384
|
signature: "getCodeFile(id: string): Promise<CodeFile | null>",
|
|
13080
|
-
description: 'Get a specific code file by its ID.\n\n@param id - The unique identifier of the code file.\n@returns The CodeFile instance or `null` if not found.\n\n@example\n```ts\nconst codeFile = await framer.getCodeFile("code-file-id")\n
|
|
13385
|
+
description: 'Get a specific code file by its ID.\n\n@param id - The unique identifier of the code file.\n@returns The CodeFile instance or `null` if not found.\n\n@example\n```ts\nconst codeFile = await framer.getCodeFile("code-file-id")\n```\n@category code-files',
|
|
13081
13386
|
references: ["CodeFile"]
|
|
13082
13387
|
},
|
|
13083
13388
|
{
|
|
13084
13389
|
name: "getCodeFiles",
|
|
13085
13390
|
category: "framer",
|
|
13086
13391
|
signature: "getCodeFiles(): Promise<readonly CodeFile[]>",
|
|
13087
|
-
description: "Get all code files in the project.\n\n@returns An array of all CodeFile instances.\n\n@example\n```ts\nconst allFiles = await framer.getCodeFiles()\nconsole.log(`Project has ${allFiles.length} code files`)\n
|
|
13392
|
+
description: "Get all code files in the project.\n\n@returns An array of all CodeFile instances.\n\n@example\n```ts\nconst allFiles = await framer.getCodeFiles()\nconsole.log(`Project has ${allFiles.length} code files`)\n```\n@category code-files",
|
|
13088
13393
|
references: ["CodeFile"]
|
|
13089
13394
|
},
|
|
13090
13395
|
{
|
|
13091
13396
|
name: "getCollection",
|
|
13092
13397
|
category: "framer",
|
|
13093
13398
|
signature: "getCollection(id: NodeId): Promise<Collection | null>",
|
|
13094
|
-
description: "Get a collection by its id
|
|
13399
|
+
description: "Get a collection by its id.\n@category cms",
|
|
13095
13400
|
references: ["Collection"]
|
|
13096
13401
|
},
|
|
13097
13402
|
{
|
|
13098
13403
|
name: "getCollections",
|
|
13099
13404
|
category: "framer",
|
|
13100
13405
|
signature: "getCollections(): Promise<Collection[]>",
|
|
13101
|
-
description: "Get all Collections in the project, both managed and unmanaged.\n\n@example\n```ts\nconst collections = await framer.getCollections()\n
|
|
13406
|
+
description: "Get all Collections in the project, both managed and unmanaged.\n\n@example\n```ts\nconst collections = await framer.getCollections()\n```\n@category cms",
|
|
13102
13407
|
references: ["Collection"]
|
|
13103
13408
|
},
|
|
13104
13409
|
{
|
|
13105
13410
|
name: "getColorStyle",
|
|
13106
13411
|
category: "framer",
|
|
13107
13412
|
signature: "getColorStyle(id: NodeId): Promise<ColorStyle | null>",
|
|
13108
|
-
description: "Get a specific color style
|
|
13413
|
+
description: "Get a specific color style.\n@category canvas",
|
|
13109
13414
|
references: ["ColorStyle"]
|
|
13110
13415
|
},
|
|
13111
13416
|
{
|
|
13112
13417
|
name: "getColorStyles",
|
|
13113
13418
|
category: "framer",
|
|
13114
13419
|
signature: "getColorStyles(): Promise<ColorStyle[]>",
|
|
13115
|
-
description: "Get all color styles in the project
|
|
13420
|
+
description: "Get all color styles in the project.\n@category canvas",
|
|
13116
13421
|
references: ["ColorStyle"]
|
|
13117
13422
|
},
|
|
13118
13423
|
{
|
|
13119
13424
|
name: "getCurrentUser",
|
|
13120
13425
|
category: "framer",
|
|
13121
13426
|
signature: "getCurrentUser(): Promise<User>",
|
|
13122
|
-
description: "Get information about the user that's interacting with the plugin.\n\n@example\n```ts\nconst user = await framer.getCurrentUser();\n
|
|
13427
|
+
description: "Get information about the user that's interacting with the plugin.\n\n@example\n```ts\nconst user = await framer.getCurrentUser();\n```\n@category user",
|
|
13123
13428
|
references: ["User"]
|
|
13124
13429
|
},
|
|
13125
13430
|
{
|
|
13126
13431
|
name: "getCustomCode",
|
|
13127
13432
|
category: "framer",
|
|
13128
13433
|
signature: "getCustomCode(): Promise<CustomCode>",
|
|
13129
|
-
description: "Get custom code settings set by the plugin
|
|
13434
|
+
description: "Get custom code settings set by the plugin.\n\nYour plugin can detect if custom code was set and whether the user has\ndisabled it.\n\n@example\n```ts\nconst customCode = await framer.getCustomCode()\nif (customCode.bodyStart.disabled) {\n // Custom code was disabled by the user in settings\n}\n```\n@category code-files",
|
|
13130
13435
|
references: ["CustomCode"]
|
|
13131
13436
|
},
|
|
13132
13437
|
{
|
|
13133
13438
|
name: "getDefaultLocale",
|
|
13134
13439
|
category: "framer",
|
|
13135
13440
|
signature: "getDefaultLocale(): Promise<Locale>",
|
|
13136
|
-
description: "Get the default locale of the project.\n\n@example\n```ts\nconst defaultLocale = await framer.getDefaultLocale()\n
|
|
13441
|
+
description: "Get the default locale of the project.\n\n@example\n```ts\nconst defaultLocale = await framer.getDefaultLocale()\n```\n@category localization",
|
|
13137
13442
|
references: ["Locale"]
|
|
13138
13443
|
},
|
|
13139
13444
|
{
|
|
@@ -13147,21 +13452,28 @@ var methodsByCategory = {
|
|
|
13147
13452
|
name: "getFont",
|
|
13148
13453
|
category: "framer",
|
|
13149
13454
|
signature: "getFont(family: string, attributes?: FontAttributes): Promise<Font | null>",
|
|
13150
|
-
description: 'Get a specific font from a family by name
|
|
13455
|
+
description: 'Get a specific font from a family by name.\n\nThis is not case sensitive. By default, returns a font with normal weight\nand style. Returns `null` if the font does not exist or lacks the\nrequested weight/style combination.\n\nNote: Custom fonts are not available to plugins.\n\n@param family - The font family name (e.g., `"Noto Sans"`).\n@param attributes - Optional weight and style attributes.\n@returns The matched font or `null` if not found.\n\n@example\n```ts\n// Get Noto Sans with default weight (400) and normal style\nconst font = await framer.getFont("Noto Sans")\n\n// Get Noto Sans with a specific weight and style\nconst font = await framer.getFont("Noto Sans", {\n weight: 800,\n style: "italic"\n})\n```\n@category canvas',
|
|
13151
13456
|
references: ["FontAttributes", "Font"]
|
|
13152
13457
|
},
|
|
13153
13458
|
{
|
|
13154
13459
|
name: "getFonts",
|
|
13155
13460
|
category: "framer",
|
|
13156
13461
|
signature: "getFonts(): Promise<Font[]>",
|
|
13157
|
-
description: "Get all available fonts
|
|
13462
|
+
description: "Get all available fonts.\n\nUnlike the Font Picker which groups fonts by typeface, this lists\nindividual fonts for each weight and style (each representing a separate\nfont file).\n\nNote: Custom fonts are not available to plugins.\n\n@returns An array of all available fonts.\n\n@example\n```ts\nconst fonts = await framer.getFonts()\n```\n@category canvas",
|
|
13158
13463
|
references: ["Font"]
|
|
13159
13464
|
},
|
|
13465
|
+
{
|
|
13466
|
+
name: "getGroundNodeForAgent",
|
|
13467
|
+
category: "framer",
|
|
13468
|
+
signature: "getGroundNodeForAgent(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13469
|
+
description: 'Get the top-level node on the canvas that contains the given node.\n\n@param input - `{ id }`: the id of a descendant node.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The top-level node, or `null` if none applies.',
|
|
13470
|
+
references: []
|
|
13471
|
+
},
|
|
13160
13472
|
{
|
|
13161
13473
|
name: "getImage",
|
|
13162
13474
|
category: "framer",
|
|
13163
13475
|
signature: "getImage(): Promise<ImageAsset | null>",
|
|
13164
|
-
description: "Get the image of the current selection or `null` if there is no image.\n\nIn `editImage` mode, this returns the image the user already has set,\nwhich your plugin can then modify
|
|
13476
|
+
description: "Get the image of the current selection or `null` if there is no image.\n\nIn `editImage` mode, this returns the image the user already has set,\nwhich your plugin can then modify.\n@category canvas",
|
|
13165
13477
|
references: ["ImageAsset"]
|
|
13166
13478
|
},
|
|
13167
13479
|
{
|
|
@@ -13182,105 +13494,140 @@ var methodsByCategory = {
|
|
|
13182
13494
|
name: "getLocales",
|
|
13183
13495
|
category: "framer",
|
|
13184
13496
|
signature: "getLocales(): Promise<readonly Locale[]>",
|
|
13185
|
-
description: "Get all Locales in the project.\n\nDoes not include the default Locale. See `getDefaultLocale`.\n\n@example\n```ts\nconst locales = await framer.getLocales()\n
|
|
13497
|
+
description: "Get all Locales in the project.\n\nDoes not include the default Locale. See `getDefaultLocale`.\n\n@example\n```ts\nconst locales = await framer.getLocales()\n```\n@category localization",
|
|
13186
13498
|
references: ["Locale"]
|
|
13187
13499
|
},
|
|
13188
13500
|
{
|
|
13189
13501
|
name: "getLocalizationGroups",
|
|
13190
13502
|
category: "framer",
|
|
13191
13503
|
signature: "getLocalizationGroups(filter?: GetLocalizationGroupsFilter): Promise<readonly LocalizationGroup[]>",
|
|
13192
|
-
description: 'Get Localization Groups in the project, optionally filtered.\n\n@param filter - Optional filter to narrow down the returned groups.\n\n@example\n```ts\n// Get all groups\nconst groups = await framer.getLocalizationGroups()\n\n// Get only page groups\nconst pageGroups = await framer.getLocalizationGroups({ type: "page" })\n\n// Get specific groups by ID\nconst specific = await framer.getLocalizationGroups({ groupIds: ["id1", "id2"] })\n
|
|
13504
|
+
description: 'Get Localization Groups in the project, optionally filtered.\n\n@param filter - Optional filter to narrow down the returned groups.\n\n@example\n```ts\n// Get all groups\nconst groups = await framer.getLocalizationGroups()\n\n// Get only page groups\nconst pageGroups = await framer.getLocalizationGroups({ type: "page" })\n\n// Get specific groups by ID\nconst specific = await framer.getLocalizationGroups({ groupIds: ["id1", "id2"] })\n```\n@category localization',
|
|
13193
13505
|
references: ["GetLocalizationGroupsFilter", "LocalizationGroup"]
|
|
13194
13506
|
},
|
|
13195
13507
|
{
|
|
13196
13508
|
name: "getManagedCollections",
|
|
13197
13509
|
category: "framer",
|
|
13198
13510
|
signature: "getManagedCollections(): Promise<ManagedCollection[]>",
|
|
13199
|
-
description: "Retrieve Collections that are managed by the current Plugin.\n\n- Only Collections created or controlled by your Plugin appear in this list.\n- These Collections can be modified without the restrictions placed on user-created Collections.\n\n@example\n```ts\nconst managedCollections = await framer.getManagedCollections();\n
|
|
13511
|
+
description: "Retrieve Collections that are managed by the current Plugin.\n\n- Only Collections created or controlled by your Plugin appear in this list.\n- These Collections can be modified without the restrictions placed on user-created Collections.\n\n@example\n```ts\nconst managedCollections = await framer.getManagedCollections();\n```\n@category cms",
|
|
13200
13512
|
references: ["ManagedCollection"]
|
|
13201
13513
|
},
|
|
13202
13514
|
{
|
|
13203
13515
|
name: "getNode",
|
|
13204
13516
|
category: "framer",
|
|
13205
13517
|
signature: "getNode(nodeId: NodeId): Promise<AnyNode | null>",
|
|
13206
|
-
description: "Get a node by its id
|
|
13518
|
+
description: "Get a node by its id.\n@category canvas",
|
|
13207
13519
|
references: ["AnyNode"]
|
|
13208
13520
|
},
|
|
13521
|
+
{
|
|
13522
|
+
name: "getNodeForAgent",
|
|
13523
|
+
category: "framer",
|
|
13524
|
+
signature: "getNodeForAgent(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13525
|
+
description: 'Get a single node on the page, including its children.\n\n@param input - `{ id }`: the id of the node to read.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The node, or `null` if no node with that id exists on the page.',
|
|
13526
|
+
references: []
|
|
13527
|
+
},
|
|
13528
|
+
{
|
|
13529
|
+
name: "getNodesForAgent",
|
|
13530
|
+
category: "framer",
|
|
13531
|
+
signature: "getNodesForAgent(input: { ids: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13532
|
+
description: 'Get multiple nodes on the page, including their children.\nIds that don\'t resolve to a node are skipped.\n\n@param input - `{ ids }`: the ids of the nodes to read.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The nodes that were found, in input order.',
|
|
13533
|
+
references: []
|
|
13534
|
+
},
|
|
13535
|
+
{
|
|
13536
|
+
name: "getNodesOfTypesForAgent",
|
|
13537
|
+
category: "framer",
|
|
13538
|
+
signature: "getNodesOfTypesForAgent(input: { types: readonly string[]; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13539
|
+
description: 'Get every node on the page of one or more kinds (e.g. `"FrameNode"`, `"RichTextNode"`, `"ComponentInstanceNode"`).\n\n@param input - `{ types }`: the node kinds to match.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The matching nodes without their children.',
|
|
13540
|
+
references: []
|
|
13541
|
+
},
|
|
13209
13542
|
{
|
|
13210
13543
|
name: "getNodesWithAttribute",
|
|
13211
13544
|
category: "framer",
|
|
13212
13545
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
13213
|
-
description: "Get all nodes with a certain attribute
|
|
13546
|
+
description: "Get all nodes with a certain attribute.\n@category canvas",
|
|
13214
13547
|
references: ["T", "Node"]
|
|
13215
13548
|
},
|
|
13216
13549
|
{
|
|
13217
13550
|
name: "getNodesWithAttributeSet",
|
|
13218
13551
|
category: "framer",
|
|
13219
13552
|
signature: "getNodesWithAttributeSet(attribute: T): Promise<Node[]>",
|
|
13220
|
-
description: "Get all nodes with a certain attribute which value is set
|
|
13553
|
+
description: "Get all nodes with a certain attribute which value is set.\n@category canvas",
|
|
13221
13554
|
references: ["T", "Node"]
|
|
13222
13555
|
},
|
|
13223
13556
|
{
|
|
13224
13557
|
name: "getNodesWithType",
|
|
13225
13558
|
category: "framer",
|
|
13226
13559
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
13227
|
-
description: "Get all nodes of a certain class
|
|
13560
|
+
description: "Get all nodes of a certain class.\n@category canvas",
|
|
13228
13561
|
references: ["FrameNode"]
|
|
13229
13562
|
},
|
|
13230
13563
|
{
|
|
13231
13564
|
name: "getParent",
|
|
13232
13565
|
category: "framer",
|
|
13233
13566
|
signature: "getParent(nodeId: NodeId): Promise<AnyNode | null>",
|
|
13234
|
-
description: "Get the parent of a node
|
|
13567
|
+
description: "Get the parent of a node.\n@category canvas",
|
|
13235
13568
|
references: ["AnyNode"]
|
|
13236
13569
|
},
|
|
13570
|
+
{
|
|
13571
|
+
name: "getParentNodeForAgent",
|
|
13572
|
+
category: "framer",
|
|
13573
|
+
signature: "getParentNodeForAgent(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13574
|
+
description: 'Get the direct parent of a node.\n\n@param input - `{ id }`: the id of the child node.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The parent node, or `null` if the node has no parent or doesn\'t exist.',
|
|
13575
|
+
references: []
|
|
13576
|
+
},
|
|
13237
13577
|
{
|
|
13238
13578
|
name: "getProjectInfo",
|
|
13239
13579
|
category: "framer",
|
|
13240
13580
|
signature: "getProjectInfo(): Promise<ProjectInfo>",
|
|
13241
|
-
description: "Get the project info like name and id
|
|
13581
|
+
description: "Get the project info like name and id.\n@category settings",
|
|
13242
13582
|
references: ["ProjectInfo"]
|
|
13243
13583
|
},
|
|
13244
13584
|
{
|
|
13245
13585
|
name: "getPublishInfo",
|
|
13246
13586
|
category: "framer",
|
|
13247
13587
|
signature: "getPublishInfo(): Promise<PublishInfo>",
|
|
13248
|
-
description: "Get information about the published website
|
|
13588
|
+
description: "Get information about the published website.\n\nProvides details such as the time of the most recent deploy or the URL of\nthe current page. Covers both `staging` and `production` environments\n(either may be `null` if the site has never been published).\n\n@returns The current publish info for both staging and production.\n@category settings",
|
|
13249
13589
|
references: ["PublishInfo"]
|
|
13250
13590
|
},
|
|
13251
13591
|
{
|
|
13252
13592
|
name: "getRect",
|
|
13253
13593
|
category: "framer",
|
|
13254
13594
|
signature: "getRect(nodeId: NodeId): Promise<Rect$1 | null>",
|
|
13255
|
-
description: "Get the rect of a node",
|
|
13595
|
+
description: "Get the rect of a node\n@category canvas",
|
|
13256
13596
|
references: ["Rect$1"]
|
|
13257
13597
|
},
|
|
13258
13598
|
{
|
|
13259
13599
|
name: "getRedirects",
|
|
13260
13600
|
category: "framer",
|
|
13261
13601
|
signature: "getRedirects(): Promise<readonly Redirect[]>",
|
|
13262
|
-
description: "Get all Redirects in the project.\n\n@returns All of the Redirects in the project.\n\n@example\n```ts\nconst redirects = await framer.getRedirects()\n
|
|
13602
|
+
description: "Get all Redirects in the project.\n\n@returns All of the Redirects in the project.\n\n@example\n```ts\nconst redirects = await framer.getRedirects()\n```\n@category settings",
|
|
13263
13603
|
references: ["Redirect"]
|
|
13264
13604
|
},
|
|
13605
|
+
{
|
|
13606
|
+
name: "getScopeNodeForAgent",
|
|
13607
|
+
category: "framer",
|
|
13608
|
+
signature: "getScopeNodeForAgent(input: { id: string; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13609
|
+
description: 'Get the scope node (page or component) that contains the given node.\n\n@param input - `{ id }`: the id of a node inside the scope.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns The enclosing scope node, or `null` if the node isn\'t in any scope.',
|
|
13610
|
+
references: []
|
|
13611
|
+
},
|
|
13265
13612
|
{
|
|
13266
13613
|
name: "getText",
|
|
13267
13614
|
category: "framer",
|
|
13268
13615
|
signature: "getText(): Promise<string | null>",
|
|
13269
|
-
description: "Get plaintext of the current selection or null if there is no text
|
|
13616
|
+
description: "Get plaintext of the current selection or null if there is no text.\n@category canvas",
|
|
13270
13617
|
references: []
|
|
13271
13618
|
},
|
|
13272
13619
|
{
|
|
13273
13620
|
name: "getTextStyle",
|
|
13274
13621
|
category: "framer",
|
|
13275
13622
|
signature: "getTextStyle(id: NodeId): Promise<TextStyle | null>",
|
|
13276
|
-
description: "Get a specific text style
|
|
13623
|
+
description: "Get a specific text style.\n@category canvas",
|
|
13277
13624
|
references: ["TextStyle"]
|
|
13278
13625
|
},
|
|
13279
13626
|
{
|
|
13280
13627
|
name: "getTextStyles",
|
|
13281
13628
|
category: "framer",
|
|
13282
13629
|
signature: "getTextStyles(): Promise<TextStyle[]>",
|
|
13283
|
-
description: "Get all text styles in the project
|
|
13630
|
+
description: "Get all text styles in the project.\n@category canvas",
|
|
13284
13631
|
references: ["TextStyle"]
|
|
13285
13632
|
},
|
|
13286
13633
|
{
|
|
@@ -13290,11 +13637,18 @@ var methodsByCategory = {
|
|
|
13290
13637
|
description: "Get all available vector sets.\n\n@alpha",
|
|
13291
13638
|
references: ["VectorSet"]
|
|
13292
13639
|
},
|
|
13640
|
+
{
|
|
13641
|
+
name: "makeExternalComponentLocalForAgent",
|
|
13642
|
+
category: "framer",
|
|
13643
|
+
signature: "makeExternalComponentLocalForAgent(input: { id: string; replaceAll?: boolean; }, options?: { pagePath?: string; }): Promise<unknown>",
|
|
13644
|
+
description: 'Converts an external component into a local project component.\n\n@param input - `{ id, replaceAll? }`: the id of the external instance, and whether to replace all instances.\n@param options.pagePath - Target page path (e.g. `"/about"`). Defaults to the active page.\n@returns `success` (with the local component name), `needs_confirmation` (retry with `replaceAll`), or `blocked` with a reason.',
|
|
13645
|
+
references: []
|
|
13646
|
+
},
|
|
13293
13647
|
{
|
|
13294
13648
|
name: "mode",
|
|
13295
13649
|
category: "framer",
|
|
13296
13650
|
signature: "mode: Mode",
|
|
13297
|
-
description: 'Get the current mode
|
|
13651
|
+
description: 'Get the current mode.\n\nA plugin can launch in a special mode where only a subset of the API is\nallowed. The mode is set when the plugin launches and never changes while\nthe plugin is active.\n\n@example\n```ts\nif (framer.mode === "image" || framer.mode === "editImage") {\n // Do image mode specific logic\n return\n}\n```\n@category settings',
|
|
13298
13652
|
references: ["Mode"]
|
|
13299
13653
|
},
|
|
13300
13654
|
{
|
|
@@ -13304,6 +13658,20 @@ var methodsByCategory = {
|
|
|
13304
13658
|
description: "",
|
|
13305
13659
|
references: ["PublishResult"]
|
|
13306
13660
|
},
|
|
13661
|
+
{
|
|
13662
|
+
name: "publishForAgent",
|
|
13663
|
+
category: "framer",
|
|
13664
|
+
signature: "publishForAgent(input?: Record<string, unknown>): Promise<unknown>",
|
|
13665
|
+
description: "Executes the publish flow on behalf of an agent.\n\nThe input schema is documented in the string returned by {@link getAgentSystemPrompt}.\n\n@param input - Action-discriminated input object (preview / confirm_publish / deploy_to_production).\n@returns The action's result \u2014 status, publish URLs, and any errors, warnings, or changes.",
|
|
13666
|
+
references: []
|
|
13667
|
+
},
|
|
13668
|
+
{
|
|
13669
|
+
name: "queryImagesForAgent",
|
|
13670
|
+
category: "framer",
|
|
13671
|
+
signature: "queryImagesForAgent(input: Record<string, unknown>): Promise<unknown>",
|
|
13672
|
+
description: 'Searches for stock images to use on the canvas (e.g. `"FrameNode"` `fill` values). Returns\ncandidate images with preview thumbnails and a `url` field for each. The returned URLs are\nregistered as trusted for this session so they can be applied directly via `fill="<url>"`\nin a subsequent {@link applyAgentChanges} DSL command. Without calling this method first,\nexternal image URLs are rejected at apply time.\n\nThe input schema is documented in the string returned by {@link getAgentSystemPrompt}.\n\n@param input - Search input object (source / query / count / orientation).\n@returns An object describing the candidates or an error.',
|
|
13673
|
+
references: []
|
|
13674
|
+
},
|
|
13307
13675
|
{
|
|
13308
13676
|
name: "readProjectForAgent",
|
|
13309
13677
|
category: "framer",
|
|
@@ -13322,14 +13690,14 @@ var methodsByCategory = {
|
|
|
13322
13690
|
name: "removeNodes",
|
|
13323
13691
|
category: "framer",
|
|
13324
13692
|
signature: "removeNodes(nodeIds: NodeId[]): Promise<void>",
|
|
13325
|
-
description: "Remove nodes from the canvas
|
|
13693
|
+
description: "Remove nodes from the canvas.\n@category canvas",
|
|
13326
13694
|
references: []
|
|
13327
13695
|
},
|
|
13328
13696
|
{
|
|
13329
13697
|
name: "removeRedirects",
|
|
13330
13698
|
category: "framer",
|
|
13331
13699
|
signature: "removeRedirects(redirectIds: string[]): Promise<void>",
|
|
13332
|
-
description: "Remove Redirects from the project
|
|
13700
|
+
description: "Remove Redirects from the project.\n\nUnknown Redirect IDs are ignored.\n\nThrows a `FramerPluginError` when the user lacks Site Settings permissions\nor when the project plan does not include Redirects.\n\n@param redirectIds - An array of Redirect IDs to remove.\n\n@example\n```ts\nawait framer.removeRedirects([aboutPageRedirect.id, blogPageRedirect.id])\n```\n@category settings",
|
|
13333
13701
|
references: []
|
|
13334
13702
|
},
|
|
13335
13703
|
{
|
|
@@ -13339,6 +13707,23 @@ var methodsByCategory = {
|
|
|
13339
13707
|
description: "",
|
|
13340
13708
|
references: []
|
|
13341
13709
|
},
|
|
13710
|
+
{
|
|
13711
|
+
name: "reviewChangesForAgent",
|
|
13712
|
+
category: "framer",
|
|
13713
|
+
signature: "reviewChangesForAgent(options?: { pagePath?: string; }): Promise<unknown>",
|
|
13714
|
+
description: "Reviews changes made by prior {@link applyAgentChanges} calls in this session.\n\nConsumes accumulated diagnostics from the session's agent context.\n\n@param options.pagePath - Target page path (e.g. `\"/about\"`). Defaults to the active page.\n@returns The session's accumulated changes, errors, warnings, and deferred trait reports.",
|
|
13715
|
+
references: []
|
|
13716
|
+
},
|
|
13717
|
+
{
|
|
13718
|
+
name: "runSupervisorAgentCommand",
|
|
13719
|
+
category: "framer",
|
|
13720
|
+
signature: "runSupervisorAgentCommand(options: RunSupervisorAgentCommandOptions): Promise<RunSupervisorAgentCommandResult>",
|
|
13721
|
+
description: "",
|
|
13722
|
+
references: [
|
|
13723
|
+
"RunSupervisorAgentCommandOptions",
|
|
13724
|
+
"RunSupervisorAgentCommandResult"
|
|
13725
|
+
]
|
|
13726
|
+
},
|
|
13342
13727
|
{
|
|
13343
13728
|
name: "screenshot",
|
|
13344
13729
|
category: "framer",
|
|
@@ -13357,63 +13742,63 @@ var methodsByCategory = {
|
|
|
13357
13742
|
name: "setAttributes",
|
|
13358
13743
|
category: "framer",
|
|
13359
13744
|
signature: "setAttributes(nodeId: NodeId, attributes: Partial<AnyEditableAttributes>): Promise<AnyNode | null>",
|
|
13360
|
-
description: "Set the attributes of a node
|
|
13745
|
+
description: "Set the attributes of a node.\n@category canvas",
|
|
13361
13746
|
references: ["AnyEditableAttributes", "AnyNode"]
|
|
13362
13747
|
},
|
|
13363
13748
|
{
|
|
13364
13749
|
name: "setCloseWarning",
|
|
13365
13750
|
category: "framer",
|
|
13366
13751
|
signature: "setCloseWarning(message: string | false): Promise<void>",
|
|
13367
|
-
description: 'When enabled, a modal confirmation will appear before close to confirm the action.\n\nPass `false` to disable the warning.\n\n@param message - The message to show when attempting to close the plugin. `false` disables the warning.\n\n@example\n```ts\n// Show a close warning when the user attempts to close the plugin\nawait framer.setCloseWarning("Are you sure?")\n\n// Remove the close warning\nawait framer.setCloseWarning(false)\n
|
|
13752
|
+
description: 'When enabled, a modal confirmation will appear before close to confirm the action.\n\nPass `false` to disable the warning.\n\n@param message - The message to show when attempting to close the plugin. `false` disables the warning.\n\n@example\n```ts\n// Show a close warning when the user attempts to close the plugin\nawait framer.setCloseWarning("Are you sure?")\n\n// Remove the close warning\nawait framer.setCloseWarning(false)\n```\n@category settings',
|
|
13368
13753
|
references: []
|
|
13369
13754
|
},
|
|
13370
13755
|
{
|
|
13371
13756
|
name: "setCustomCode",
|
|
13372
13757
|
category: "framer",
|
|
13373
13758
|
signature: "setCustomCode(options: SetCustomCodeOptions): Promise<void>",
|
|
13374
|
-
description: 'Install a custom code snippet in the user\'s website via `<script>` tags.\nA plugin can only set custom HTML once per location. Custom code should be\nvalid HTML. Setting `html` to `null` clears the installed code snippet.\n\n@param options - The custom code options including `html` and `location`.\n\n@example\n```ts\nframer.setCustomCode({\n html: \'<script src="https://example.com/script.js"></script>\',\n location: "bodyEnd"\n})\n
|
|
13759
|
+
description: 'Install a custom code snippet in the user\'s website via `<script>` tags.\n\nA plugin can only set custom HTML once per location. Custom code should be\nvalid HTML. Setting `html` to `null` clears the installed code snippet.\n\n@param options - The custom code options including `html` and `location`.\n\n@example\n```ts\nframer.setCustomCode({\n html: \'<script src="https://example.com/script.js"></script>\',\n location: "bodyEnd"\n})\n```\n@category code-files',
|
|
13375
13760
|
references: ["SetCustomCodeOptions"]
|
|
13376
13761
|
},
|
|
13377
13762
|
{
|
|
13378
13763
|
name: "setImage",
|
|
13379
13764
|
category: "framer",
|
|
13380
13765
|
signature: "setImage(image: NamedImageAssetInput | File): Promise<void>",
|
|
13381
|
-
description: "Upload an image and set it on the selected node.\n\nIn `image` or `editImage` mode, this is the primary method to send the\nselected or edited image back to Framer
|
|
13766
|
+
description: "Upload an image and set it on the selected node.\n\nIn `image` or `editImage` mode, this is the primary method to send the\nselected or edited image back to Framer.\n@category canvas",
|
|
13382
13767
|
references: ["NamedImageAssetInput", "File"]
|
|
13383
13768
|
},
|
|
13384
13769
|
{
|
|
13385
13770
|
name: "setLocalizationData",
|
|
13386
13771
|
category: "framer",
|
|
13387
13772
|
signature: "setLocalizationData(update: LocalizationData): Promise<SetLocalizationDataResult>",
|
|
13388
|
-
description: 'Update localization data.\n\n@param update - An object representing the localization update.\n\n@example\n```ts\nawait framer.setLocalizationData({\n valuesBySource: {\n [titleSourceId]: {\n [dutchLocaleId]: { action: "set", value: "Hallo Wereld" }\n }\n },\n statusByLocaleByGroup: {\n [blogPostGroupId]: {\n [dutchLocaleId]: "ready",\n [frenchLocaleId]: "excluded"\n }\n }\n})\n
|
|
13773
|
+
description: 'Update localization data.\n\n@param update - An object representing the localization update.\n\n@example\n```ts\nawait framer.setLocalizationData({\n valuesBySource: {\n [titleSourceId]: {\n [dutchLocaleId]: { action: "set", value: "Hallo Wereld" }\n }\n },\n statusByLocaleByGroup: {\n [blogPostGroupId]: {\n [dutchLocaleId]: "ready",\n [frenchLocaleId]: "excluded"\n }\n }\n})\n```\n@category localization',
|
|
13389
13774
|
references: ["LocalizationData", "SetLocalizationDataResult"]
|
|
13390
13775
|
},
|
|
13391
13776
|
{
|
|
13392
13777
|
name: "setParent",
|
|
13393
13778
|
category: "framer",
|
|
13394
13779
|
signature: "setParent(nodeId: NodeId, parentId: NodeId, index?: number | undefined): Promise<void>",
|
|
13395
|
-
description: "Set the parent of a node
|
|
13780
|
+
description: "Set the parent of a node.\n@category canvas",
|
|
13396
13781
|
references: []
|
|
13397
13782
|
},
|
|
13398
13783
|
{
|
|
13399
13784
|
name: "setRedirectOrder",
|
|
13400
13785
|
category: "framer",
|
|
13401
13786
|
signature: "setRedirectOrder(redirectIds: string[]): Promise<void>",
|
|
13402
|
-
description: "Set the order of Redirects in the list
|
|
13787
|
+
description: "Set the order of Redirects in the list.\n\nUnknown Redirect IDs are ignored.\n\nThrows a `FramerPluginError` when the user lacks Site Settings permissions\nor when the project plan does not include Redirects.\n\n@param redirectIds - An array of Redirect IDs representing the desired order.\n\n@example\n```ts\nawait framer.setRedirectOrder([aboutPageRedirect.id, blogPageRedirect.id])\n```\n@category settings",
|
|
13403
13788
|
references: []
|
|
13404
13789
|
},
|
|
13405
13790
|
{
|
|
13406
13791
|
name: "setSelection",
|
|
13407
13792
|
category: "framer",
|
|
13408
13793
|
signature: "setSelection(nodeIds: string | Iterable<string>): Promise<void>",
|
|
13409
|
-
description: "Set the current selection
|
|
13794
|
+
description: "Set the current selection.\n@category canvas",
|
|
13410
13795
|
references: []
|
|
13411
13796
|
},
|
|
13412
13797
|
{
|
|
13413
13798
|
name: "setText",
|
|
13414
13799
|
category: "framer",
|
|
13415
13800
|
signature: "setText(text: string): Promise<void>",
|
|
13416
|
-
description: "Set the text of the current selection or insert it onto the canvas
|
|
13801
|
+
description: "Set the text of the current selection or insert it onto the canvas.\n@category canvas",
|
|
13417
13802
|
references: []
|
|
13418
13803
|
},
|
|
13419
13804
|
{
|
|
@@ -13440,35 +13825,35 @@ var methodsByCategory = {
|
|
|
13440
13825
|
name: "typecheckCode",
|
|
13441
13826
|
category: "framer",
|
|
13442
13827
|
signature: "typecheckCode(fileName: string, content: string, compilerOptions?: ts.server.protocol.CompilerOptions, sessionId?: string): Promise<TypecheckDiagnostic[]>",
|
|
13443
|
-
description: "Type check a code file and return the diagnostics.\n\n@param fileName - The name of the code file, must include the extension. Use `*.tsx` for TSX files, otherwise the React JSX syntax will be rejected.\n@param content - The content of the code file.\n@param compilerOptions - Optional compiler options to override the default compiler options for type checking.\n@param sessionId - Optional session ID. Pass it when repeatedly type checking the same file. If not provided, a new session will be created for each type check, which is slow
|
|
13828
|
+
description: "Type check a code file and return the diagnostics.\n\n@param fileName - The name of the code file, must include the extension. Use `*.tsx` for TSX files, otherwise the React JSX syntax will be rejected.\n@param content - The content of the code file.\n@param compilerOptions - Optional compiler options to override the default compiler options for type checking.\n@param sessionId - Optional session ID. Pass it when repeatedly type checking the same file. If not provided, a new session will be created for each type check, which is slow.\n@category code-files",
|
|
13444
13829
|
references: ["ts.server.protocol.CompilerOptions", "TypecheckDiagnostic"]
|
|
13445
13830
|
},
|
|
13446
13831
|
{
|
|
13447
13832
|
name: "uploadFile",
|
|
13448
13833
|
category: "framer",
|
|
13449
13834
|
signature: "uploadFile(file: NamedFileAssetInput | File): Promise<FileAsset>",
|
|
13450
|
-
description: "Uploads a file without assigning it to a property
|
|
13835
|
+
description: "Uploads a file without assigning it to a property.\n@category canvas",
|
|
13451
13836
|
references: ["NamedFileAssetInput", "File", "FileAsset"]
|
|
13452
13837
|
},
|
|
13453
13838
|
{
|
|
13454
13839
|
name: "uploadFiles",
|
|
13455
13840
|
category: "framer",
|
|
13456
13841
|
signature: "uploadFiles(files: readonly NamedFileAssetInput[]): Promise<FileAsset[]>",
|
|
13457
|
-
description: "Upload multiple files without assigning them to properties
|
|
13842
|
+
description: "Upload multiple files without assigning them to properties.\n@category canvas",
|
|
13458
13843
|
references: ["NamedFileAssetInput", "FileAsset"]
|
|
13459
13844
|
},
|
|
13460
13845
|
{
|
|
13461
13846
|
name: "uploadImage",
|
|
13462
13847
|
category: "framer",
|
|
13463
13848
|
signature: "uploadImage(image: NamedImageAssetInput | File): Promise<ImageAsset>",
|
|
13464
|
-
description: "Upload an image without assigning it to a property
|
|
13849
|
+
description: "Upload an image without assigning it to a property.\n@category canvas",
|
|
13465
13850
|
references: ["NamedImageAssetInput", "File", "ImageAsset"]
|
|
13466
13851
|
},
|
|
13467
13852
|
{
|
|
13468
13853
|
name: "uploadImages",
|
|
13469
13854
|
category: "framer",
|
|
13470
13855
|
signature: "uploadImages(images: readonly NamedImageAssetInput[]): Promise<ImageAsset[]>",
|
|
13471
|
-
description: "Upload multiple images without assigning them to properties
|
|
13856
|
+
description: "Upload multiple images without assigning them to properties.\n@category canvas",
|
|
13472
13857
|
references: ["NamedImageAssetInput", "ImageAsset"]
|
|
13473
13858
|
}
|
|
13474
13859
|
],
|
|
@@ -13664,7 +14049,7 @@ var methodsByCategory = {
|
|
|
13664
14049
|
name: "addItems",
|
|
13665
14050
|
category: "ManagedCollection",
|
|
13666
14051
|
signature: "addItems(items: ManagedCollectionItemInput[]): Promise<void>",
|
|
13667
|
-
description: 'Add new items or update existing ones if their IDs match
|
|
14052
|
+
description: 'Add new items or update existing ones if their IDs match.\n\nThis method performs an upsert: items with matching IDs are updated,\nnew IDs are inserted.\n\nEach item requires an `id` and `slug`. Custom field data is provided via\nthe `fieldData` object, using field IDs as keys.\n\nCurrently, calling `addItems` with existing item IDs merges the provided\nfield data with the existing items\' current field data, meaning any\nomitted fields remain unchanged. In version 4.0.0, this behavior will\nchange to fully replace items, removing any fields not explicitly\nincluded. Always include all fields when updating existing items to avoid\nunexpected behavior.\n\nUse `"ManagedCollection.addItems"` to check if this method is allowed.\n\n@param items - An array of items to add or update.\n\n@example\n```ts\nawait collection.addItems([\n {\n id: "1",\n slug: "item-1",\n fieldData: {\n [nameField.id]: { type: "string", value: "Eric" },\n [ageField.id]: { type: "number", value: 47 },\n },\n },\n])\n```',
|
|
13668
14053
|
references: ["ManagedCollectionItemInput"]
|
|
13669
14054
|
},
|
|
13670
14055
|
{
|
|
@@ -13706,7 +14091,7 @@ var methodsByCategory = {
|
|
|
13706
14091
|
name: "navigateTo",
|
|
13707
14092
|
category: "ManagedCollection",
|
|
13708
14093
|
signature: "navigateTo(opts?: NavigableOptions): Promise<void>",
|
|
13709
|
-
description: "Navigate to this collection
|
|
14094
|
+
description: "Navigate to this collection.\n\nMay switch modes to reveal the relevant view.",
|
|
13710
14095
|
references: ["NavigableOptions"]
|
|
13711
14096
|
},
|
|
13712
14097
|
{
|
|
@@ -13727,7 +14112,7 @@ var methodsByCategory = {
|
|
|
13727
14112
|
name: "setFields",
|
|
13728
14113
|
category: "ManagedCollection",
|
|
13729
14114
|
signature: "setFields(fields: ManagedCollectionFieldInput[]): Promise<void>",
|
|
13730
|
-
description: 'Add, update, or remove Collection fields
|
|
14115
|
+
description: 'Add, update, or remove Collection fields.\n\nFields not included in the array will be removed. You can configure\nup to 30 custom fields.\n\nEach field requires an `id`, `name`, and `type`. For the `id`, use a\nunique identifier that stays the same across future synchronizations.\nAny change in `id` can break data assignments on the canvas. The maximum\nlength for an `id` is 64 characters.\n\nBy default, managed collection fields set by a plugin are not editable by\nusers. Set `userEditable: true` on a field to allow user editing. Note\nthat fields marked as `userEditable` can no longer have their values set\nby the plugin when using `addItems`.\n\nUse `"ManagedCollection.setFields"` to check if this method is allowed.\n\n@param fields - The array of fields that should be used for the collection.\n\n@example\n```ts\nawait collection.setFields([\n { id: "1", type: "string", name: "Name" },\n { id: "2", type: "number", name: "Age" },\n { id: "3", type: "string", name: "Description", userEditable: true },\n])\n```',
|
|
13731
14116
|
references: ["ManagedCollectionFieldInput"]
|
|
13732
14117
|
},
|
|
13733
14118
|
{
|
|
@@ -13741,7 +14126,7 @@ var methodsByCategory = {
|
|
|
13741
14126
|
name: "setPluginData",
|
|
13742
14127
|
category: "ManagedCollection",
|
|
13743
14128
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
13744
|
-
description: 'Set plugin data by key
|
|
14129
|
+
description: 'Set plugin data by key.\n\nSimilar to local storage, you can store custom data on the Managed\nCollection (e.g., the last synchronization date or a connected database\nID).\n\nUse `"ManagedCollection.setPluginData"` to check if this method is allowed.\n\n@param key - The plugin data key.\n@param value - The value to set, or `null` to remove.\n\n@example\n```ts\nconst currentDate = new Date().toISOString()\nawait collection.setPluginData("lastSynchronizedAt", currentDate)\n```',
|
|
13745
14130
|
references: []
|
|
13746
14131
|
}
|
|
13747
14132
|
],
|
|
@@ -13981,21 +14366,21 @@ var methodsByCategory = {
|
|
|
13981
14366
|
name: "bottom",
|
|
13982
14367
|
category: "SVGNode",
|
|
13983
14368
|
signature: "bottom: CSSDimension<CSSUnit.Pixel> | null",
|
|
13984
|
-
description: 'Distance from bottom edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14369
|
+
description: 'Distance from bottom edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
13985
14370
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
13986
14371
|
},
|
|
13987
14372
|
{
|
|
13988
14373
|
name: "centerX",
|
|
13989
14374
|
category: "SVGNode",
|
|
13990
14375
|
signature: "centerX: CSSDimension<CSSUnit.Percentage> | null",
|
|
13991
|
-
description: 'Center anchor horizontal position as percentage (e.g. `"50%"`).\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14376
|
+
description: 'Center anchor horizontal position as percentage (e.g. `"50%"`).\n\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
13992
14377
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
13993
14378
|
},
|
|
13994
14379
|
{
|
|
13995
14380
|
name: "centerY",
|
|
13996
14381
|
category: "SVGNode",
|
|
13997
14382
|
signature: "centerY: CSSDimension<CSSUnit.Percentage> | null",
|
|
13998
|
-
description: 'Center anchor vertical position as percentage (e.g. `"50%"`).\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14383
|
+
description: 'Center anchor vertical position as percentage (e.g. `"50%"`).\n\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
13999
14384
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
14000
14385
|
},
|
|
14001
14386
|
{
|
|
@@ -14016,7 +14401,7 @@ var methodsByCategory = {
|
|
|
14016
14401
|
name: "getNodesWithAttribute",
|
|
14017
14402
|
category: "SVGNode",
|
|
14018
14403
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
14019
|
-
description: 'Get the descendants of this node that support `attribute
|
|
14404
|
+
description: 'Get the descendants of this node that support `attribute`.\n\nThis returns nodes that have the given attribute defined in their type,\nregardless of whether it has been set.\n\n@param attribute - The attribute name to filter by.\n@returns An array of nodes that support the attribute.\n\n@example\n```ts\n// Get any kind of node that has a background color attribute.\nconst nodes = await framer.getNodesWithAttribute("backgroundColor")\n```',
|
|
14020
14405
|
references: ["T", "Node"]
|
|
14021
14406
|
},
|
|
14022
14407
|
{
|
|
@@ -14030,7 +14415,7 @@ var methodsByCategory = {
|
|
|
14030
14415
|
name: "getNodesWithType",
|
|
14031
14416
|
category: "SVGNode",
|
|
14032
14417
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
14033
|
-
description: 'Get descendants of this node that match the given type
|
|
14418
|
+
description: 'Get descendants of this node that match the given type.\n\nThis can also be used to query within a selection subtree.\n\n@param type - The node type to search for.\n@returns An array of matching descendant nodes.\n\n@example\n```ts\n// Get all frame nodes in a project.\nconst frameNodes = await framer.getNodesWithType("FrameNode")\n\n// Query within a selection subtree.\nconst selection = await framer.getSelection()\nif (selection.length === 1) {\n const frameNodes = await selection[0].getNodesWithType("FrameNode")\n}\n```',
|
|
14034
14419
|
references: ["FrameNode"]
|
|
14035
14420
|
},
|
|
14036
14421
|
{
|
|
@@ -14044,7 +14429,7 @@ var methodsByCategory = {
|
|
|
14044
14429
|
name: "getPluginData",
|
|
14045
14430
|
category: "SVGNode",
|
|
14046
14431
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
14047
|
-
description: "Get plugin data by key
|
|
14432
|
+
description: "Get plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@returns The stored value, or `null` if no data exists for the key.",
|
|
14048
14433
|
references: []
|
|
14049
14434
|
},
|
|
14050
14435
|
{
|
|
@@ -14065,42 +14450,42 @@ var methodsByCategory = {
|
|
|
14065
14450
|
name: "height",
|
|
14066
14451
|
category: "SVGNode",
|
|
14067
14452
|
signature: "height: HeightLength | null",
|
|
14068
|
-
description: 'Height of the node
|
|
14453
|
+
description: 'Height of the node.\n\nAccepts pixel, percentage, fraction, viewport-height values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14069
14454
|
references: ["HeightLength"]
|
|
14070
14455
|
},
|
|
14071
14456
|
{
|
|
14072
14457
|
name: "left",
|
|
14073
14458
|
category: "SVGNode",
|
|
14074
14459
|
signature: "left: CSSDimension<CSSUnit.Pixel> | null",
|
|
14075
|
-
description: 'Distance from left edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14460
|
+
description: 'Distance from left edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14076
14461
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14077
14462
|
},
|
|
14078
14463
|
{
|
|
14079
14464
|
name: "locked",
|
|
14080
14465
|
category: "SVGNode",
|
|
14081
14466
|
signature: "locked: boolean",
|
|
14082
|
-
description: "Whether the node is locked for editing
|
|
14467
|
+
description: "Whether the node is locked for editing.\n\nDefaults to `false`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
14083
14468
|
references: []
|
|
14084
14469
|
},
|
|
14085
14470
|
{
|
|
14086
14471
|
name: "name",
|
|
14087
14472
|
category: "SVGNode",
|
|
14088
14473
|
signature: "name: string | null",
|
|
14089
|
-
description: "The name of the node displayed in the layers panel.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
14474
|
+
description: "The name of the node displayed in the layers panel.\n\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
14090
14475
|
references: []
|
|
14091
14476
|
},
|
|
14092
14477
|
{
|
|
14093
14478
|
name: "navigateTo",
|
|
14094
14479
|
category: "SVGNode",
|
|
14095
14480
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
14096
|
-
description: "Navigate to this node
|
|
14481
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
14097
14482
|
references: ["NavigableOptions"]
|
|
14098
14483
|
},
|
|
14099
14484
|
{
|
|
14100
14485
|
name: "opacity",
|
|
14101
14486
|
category: "SVGNode",
|
|
14102
14487
|
signature: "opacity: number",
|
|
14103
|
-
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque)
|
|
14488
|
+
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque).\n\nDefaults to `1`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
14104
14489
|
references: []
|
|
14105
14490
|
},
|
|
14106
14491
|
{
|
|
@@ -14121,14 +14506,14 @@ var methodsByCategory = {
|
|
|
14121
14506
|
name: "right",
|
|
14122
14507
|
category: "SVGNode",
|
|
14123
14508
|
signature: "right: CSSDimension<CSSUnit.Pixel> | null",
|
|
14124
|
-
description: 'Distance from right edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14509
|
+
description: 'Distance from right edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14125
14510
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14126
14511
|
},
|
|
14127
14512
|
{
|
|
14128
14513
|
name: "rotation",
|
|
14129
14514
|
category: "SVGNode",
|
|
14130
14515
|
signature: "rotation: number",
|
|
14131
|
-
description: "Rotation angle in degrees
|
|
14516
|
+
description: "Rotation angle in degrees.\n\nDefaults to `0`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
14132
14517
|
references: []
|
|
14133
14518
|
},
|
|
14134
14519
|
{
|
|
@@ -14142,14 +14527,14 @@ var methodsByCategory = {
|
|
|
14142
14527
|
name: "setAttributes",
|
|
14143
14528
|
category: "SVGNode",
|
|
14144
14529
|
signature: 'setAttributes(update: Partial<NodeClassToEditableAttributes[(typeof this)[ClassKey]]>): Promise<(typeof this)[ClassKey] extends "UnknownNode" ? never : typeof this | null>',
|
|
14145
|
-
description: 'Set the attributes of this node
|
|
14530
|
+
description: 'Set the attributes of this node.\n\nAttributes are merged with existing values, so only the provided\nattributes are updated.\n\n@param update - The attributes to update.\n@returns The updated node, or `null` if the node was not found.\n@throws If the node is an `UnknownNode`.\n\nUse `"Node.setAttributes"` to check if this method is allowed.',
|
|
14146
14531
|
references: []
|
|
14147
14532
|
},
|
|
14148
14533
|
{
|
|
14149
14534
|
name: "setPluginData",
|
|
14150
14535
|
category: "SVGNode",
|
|
14151
14536
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
14152
|
-
description: 'Set plugin data by key
|
|
14537
|
+
description: 'Set plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@param value - The value to set, or `null` to remove.\n\nUse `"Node.setPluginData"` to check if this method is allowed.',
|
|
14153
14538
|
references: []
|
|
14154
14539
|
},
|
|
14155
14540
|
{
|
|
@@ -14163,28 +14548,28 @@ var methodsByCategory = {
|
|
|
14163
14548
|
name: "top",
|
|
14164
14549
|
category: "SVGNode",
|
|
14165
14550
|
signature: "top: CSSDimension<CSSUnit.Pixel> | null",
|
|
14166
|
-
description: 'Distance from top edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14551
|
+
description: 'Distance from top edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14167
14552
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14168
14553
|
},
|
|
14169
14554
|
{
|
|
14170
14555
|
name: "visible",
|
|
14171
14556
|
category: "SVGNode",
|
|
14172
14557
|
signature: "visible: boolean",
|
|
14173
|
-
description: "Whether the node is visible on the canvas
|
|
14558
|
+
description: "Whether the node is visible on the canvas.\n\nDefaults to `true`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
14174
14559
|
references: []
|
|
14175
14560
|
},
|
|
14176
14561
|
{
|
|
14177
14562
|
name: "walk",
|
|
14178
14563
|
category: "SVGNode",
|
|
14179
14564
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
14180
|
-
description: "Walk this node and its descendants recursively
|
|
14565
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
14181
14566
|
references: ["AnyNode"]
|
|
14182
14567
|
},
|
|
14183
14568
|
{
|
|
14184
14569
|
name: "width",
|
|
14185
14570
|
category: "SVGNode",
|
|
14186
14571
|
signature: "width: WidthLength | null",
|
|
14187
|
-
description: 'Width of the node
|
|
14572
|
+
description: 'Width of the node.\n\nAccepts pixel, percentage, fraction values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14188
14573
|
references: ["WidthLength"]
|
|
14189
14574
|
},
|
|
14190
14575
|
{
|
|
@@ -14200,21 +14585,21 @@ var methodsByCategory = {
|
|
|
14200
14585
|
name: "bottom",
|
|
14201
14586
|
category: "TextNode",
|
|
14202
14587
|
signature: "bottom: CSSDimension<CSSUnit.Pixel> | null",
|
|
14203
|
-
description: 'Distance from bottom edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14588
|
+
description: 'Distance from bottom edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14204
14589
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14205
14590
|
},
|
|
14206
14591
|
{
|
|
14207
14592
|
name: "centerX",
|
|
14208
14593
|
category: "TextNode",
|
|
14209
14594
|
signature: "centerX: CSSDimension<CSSUnit.Percentage> | null",
|
|
14210
|
-
description: 'Center anchor horizontal position as percentage (e.g. `"50%"`).\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14595
|
+
description: 'Center anchor horizontal position as percentage (e.g. `"50%"`).\n\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14211
14596
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
14212
14597
|
},
|
|
14213
14598
|
{
|
|
14214
14599
|
name: "centerY",
|
|
14215
14600
|
category: "TextNode",
|
|
14216
14601
|
signature: "centerY: CSSDimension<CSSUnit.Percentage> | null",
|
|
14217
|
-
description: 'Center anchor vertical position as percentage (e.g. `"50%"`).\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14602
|
+
description: 'Center anchor vertical position as percentage (e.g. `"50%"`).\n\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14218
14603
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
14219
14604
|
},
|
|
14220
14605
|
{
|
|
@@ -14249,7 +14634,7 @@ var methodsByCategory = {
|
|
|
14249
14634
|
name: "getNodesWithAttribute",
|
|
14250
14635
|
category: "TextNode",
|
|
14251
14636
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
14252
|
-
description: 'Get the descendants of this node that support `attribute
|
|
14637
|
+
description: 'Get the descendants of this node that support `attribute`.\n\nThis returns nodes that have the given attribute defined in their type,\nregardless of whether it has been set.\n\n@param attribute - The attribute name to filter by.\n@returns An array of nodes that support the attribute.\n\n@example\n```ts\n// Get any kind of node that has a background color attribute.\nconst nodes = await framer.getNodesWithAttribute("backgroundColor")\n```',
|
|
14253
14638
|
references: ["T", "Node"]
|
|
14254
14639
|
},
|
|
14255
14640
|
{
|
|
@@ -14263,7 +14648,7 @@ var methodsByCategory = {
|
|
|
14263
14648
|
name: "getNodesWithType",
|
|
14264
14649
|
category: "TextNode",
|
|
14265
14650
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
14266
|
-
description: 'Get descendants of this node that match the given type
|
|
14651
|
+
description: 'Get descendants of this node that match the given type.\n\nThis can also be used to query within a selection subtree.\n\n@param type - The node type to search for.\n@returns An array of matching descendant nodes.\n\n@example\n```ts\n// Get all frame nodes in a project.\nconst frameNodes = await framer.getNodesWithType("FrameNode")\n\n// Query within a selection subtree.\nconst selection = await framer.getSelection()\nif (selection.length === 1) {\n const frameNodes = await selection[0].getNodesWithType("FrameNode")\n}\n```',
|
|
14267
14652
|
references: ["FrameNode"]
|
|
14268
14653
|
},
|
|
14269
14654
|
{
|
|
@@ -14277,7 +14662,7 @@ var methodsByCategory = {
|
|
|
14277
14662
|
name: "getPluginData",
|
|
14278
14663
|
category: "TextNode",
|
|
14279
14664
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
14280
|
-
description: "Get plugin data by key
|
|
14665
|
+
description: "Get plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@returns The stored value, or `null` if no data exists for the key.",
|
|
14281
14666
|
references: []
|
|
14282
14667
|
},
|
|
14283
14668
|
{
|
|
@@ -14298,77 +14683,77 @@ var methodsByCategory = {
|
|
|
14298
14683
|
name: "getText",
|
|
14299
14684
|
category: "TextNode",
|
|
14300
14685
|
signature: "getText(): Promise<string | null>",
|
|
14301
|
-
description: "Get the text of this node
|
|
14686
|
+
description: "Get the text of this node.\n\nPlain text content, not HTML.",
|
|
14302
14687
|
references: []
|
|
14303
14688
|
},
|
|
14304
14689
|
{
|
|
14305
14690
|
name: "gridItemColumnSpan",
|
|
14306
14691
|
category: "TextNode",
|
|
14307
14692
|
signature: 'gridItemColumnSpan: WithGridItemTrait["gridItemColumnSpan"]',
|
|
14308
|
-
description: 'Number of columns to span, or `"all"` for all columns
|
|
14693
|
+
description: 'Number of columns to span, or `"all"` for all columns.\n\nFor nodes inside a grid container. Defaults to `1`. Supported by FrameNode, TextNode.',
|
|
14309
14694
|
references: []
|
|
14310
14695
|
},
|
|
14311
14696
|
{
|
|
14312
14697
|
name: "gridItemFillCellHeight",
|
|
14313
14698
|
category: "TextNode",
|
|
14314
14699
|
signature: 'gridItemFillCellHeight: WithGridItemTrait["gridItemFillCellHeight"]',
|
|
14315
|
-
description: "Whether to fill the grid cell height
|
|
14700
|
+
description: "Whether to fill the grid cell height.\n\nFor nodes inside a grid container. Defaults to `true`. Supported by FrameNode, TextNode.",
|
|
14316
14701
|
references: []
|
|
14317
14702
|
},
|
|
14318
14703
|
{
|
|
14319
14704
|
name: "gridItemFillCellWidth",
|
|
14320
14705
|
category: "TextNode",
|
|
14321
14706
|
signature: 'gridItemFillCellWidth: WithGridItemTrait["gridItemFillCellWidth"]',
|
|
14322
|
-
description: "Whether to fill the grid cell width
|
|
14707
|
+
description: "Whether to fill the grid cell width.\n\nFor nodes inside a grid container. Defaults to `true`. Supported by FrameNode, TextNode.",
|
|
14323
14708
|
references: []
|
|
14324
14709
|
},
|
|
14325
14710
|
{
|
|
14326
14711
|
name: "gridItemHorizontalAlignment",
|
|
14327
14712
|
category: "TextNode",
|
|
14328
14713
|
signature: 'gridItemHorizontalAlignment: WithGridItemTrait["gridItemHorizontalAlignment"]',
|
|
14329
|
-
description: 'Horizontal alignment within grid cell
|
|
14714
|
+
description: 'Horizontal alignment within grid cell.\n\nFor nodes inside a grid container. Defaults to `"center"`. Supported by FrameNode, TextNode.',
|
|
14330
14715
|
references: []
|
|
14331
14716
|
},
|
|
14332
14717
|
{
|
|
14333
14718
|
name: "gridItemRowSpan",
|
|
14334
14719
|
category: "TextNode",
|
|
14335
14720
|
signature: 'gridItemRowSpan: WithGridItemTrait["gridItemRowSpan"]',
|
|
14336
|
-
description: "Number of rows to span
|
|
14721
|
+
description: "Number of rows to span.\n\nFor nodes inside a grid container. Defaults to `1`. Supported by FrameNode, TextNode.",
|
|
14337
14722
|
references: []
|
|
14338
14723
|
},
|
|
14339
14724
|
{
|
|
14340
14725
|
name: "gridItemVerticalAlignment",
|
|
14341
14726
|
category: "TextNode",
|
|
14342
14727
|
signature: 'gridItemVerticalAlignment: WithGridItemTrait["gridItemVerticalAlignment"]',
|
|
14343
|
-
description: 'Vertical alignment within grid cell
|
|
14728
|
+
description: 'Vertical alignment within grid cell.\n\nFor nodes inside a grid container. Defaults to `"center"`. Supported by FrameNode, TextNode.',
|
|
14344
14729
|
references: []
|
|
14345
14730
|
},
|
|
14346
14731
|
{
|
|
14347
14732
|
name: "height",
|
|
14348
14733
|
category: "TextNode",
|
|
14349
14734
|
signature: "height: HeightLength | null",
|
|
14350
|
-
description: 'Height of the node
|
|
14735
|
+
description: 'Height of the node.\n\nAccepts pixel, percentage, fraction, viewport-height values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14351
14736
|
references: ["HeightLength"]
|
|
14352
14737
|
},
|
|
14353
14738
|
{
|
|
14354
14739
|
name: "inlineTextStyle",
|
|
14355
14740
|
category: "TextNode",
|
|
14356
14741
|
signature: "inlineTextStyle: TextStyle | null",
|
|
14357
|
-
description: "Apply a text style preset
|
|
14742
|
+
description: "Apply a text style preset.\n\nSetting to `null` removes the text style. Supported by TextNode.",
|
|
14358
14743
|
references: ["TextStyle"]
|
|
14359
14744
|
},
|
|
14360
14745
|
{
|
|
14361
14746
|
name: "left",
|
|
14362
14747
|
category: "TextNode",
|
|
14363
14748
|
signature: "left: CSSDimension<CSSUnit.Pixel> | null",
|
|
14364
|
-
description: 'Distance from left edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14749
|
+
description: 'Distance from left edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14365
14750
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14366
14751
|
},
|
|
14367
14752
|
{
|
|
14368
14753
|
name: "link",
|
|
14369
14754
|
category: "TextNode",
|
|
14370
14755
|
signature: 'link: WithLinkTrait["link"]',
|
|
14371
|
-
description: 'URL or internal page link
|
|
14756
|
+
description: 'URL or internal page link.\n\nExternal: `"https://example.com"`, internal: `"/about"`,\nemail: `"mailto:user@example.com"`. Setting to `null` removes the link.\nSupported by FrameNode, TextNode.',
|
|
14372
14757
|
references: []
|
|
14373
14758
|
},
|
|
14374
14759
|
{
|
|
@@ -14382,7 +14767,7 @@ var methodsByCategory = {
|
|
|
14382
14767
|
name: "linkOpenInNewTab",
|
|
14383
14768
|
category: "TextNode",
|
|
14384
14769
|
signature: 'linkOpenInNewTab: WithLinkTrait["linkOpenInNewTab"]',
|
|
14385
|
-
description: "Whether to open the link in a new tab
|
|
14770
|
+
description: "Whether to open the link in a new tab.\n\nDefault is automatically determined based on link type.\nSupported by FrameNode, TextNode.",
|
|
14386
14771
|
references: []
|
|
14387
14772
|
},
|
|
14388
14773
|
{
|
|
@@ -14410,7 +14795,7 @@ var methodsByCategory = {
|
|
|
14410
14795
|
name: "locked",
|
|
14411
14796
|
category: "TextNode",
|
|
14412
14797
|
signature: "locked: boolean",
|
|
14413
|
-
description: "Whether the node is locked for editing
|
|
14798
|
+
description: "Whether the node is locked for editing.\n\nDefaults to `false`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
14414
14799
|
references: []
|
|
14415
14800
|
},
|
|
14416
14801
|
{
|
|
@@ -14445,42 +14830,42 @@ var methodsByCategory = {
|
|
|
14445
14830
|
name: "name",
|
|
14446
14831
|
category: "TextNode",
|
|
14447
14832
|
signature: "name: string | null",
|
|
14448
|
-
description: "The name of the node displayed in the layers panel.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
14833
|
+
description: "The name of the node displayed in the layers panel.\n\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
14449
14834
|
references: []
|
|
14450
14835
|
},
|
|
14451
14836
|
{
|
|
14452
14837
|
name: "navigateTo",
|
|
14453
14838
|
category: "TextNode",
|
|
14454
14839
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
14455
|
-
description: "Navigate to this node
|
|
14840
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
14456
14841
|
references: ["NavigableOptions"]
|
|
14457
14842
|
},
|
|
14458
14843
|
{
|
|
14459
14844
|
name: "opacity",
|
|
14460
14845
|
category: "TextNode",
|
|
14461
14846
|
signature: "opacity: number",
|
|
14462
|
-
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque)
|
|
14847
|
+
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque).\n\nDefaults to `1`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
14463
14848
|
references: []
|
|
14464
14849
|
},
|
|
14465
14850
|
{
|
|
14466
14851
|
name: "overflow",
|
|
14467
14852
|
category: "TextNode",
|
|
14468
14853
|
signature: 'overflow: WithOverflowTrait["overflow"]',
|
|
14469
|
-
description: "Controls how content that exceeds the element's box is handled.\nSetting to `null` removes the overflow property. Will overwrite `overflowX` or `overflowY`.\nSupported by FrameNode, TextNode.",
|
|
14854
|
+
description: "Controls how content that exceeds the element's box is handled.\n\nSetting to `null` removes the overflow property. Will overwrite `overflowX` or `overflowY`.\nSupported by FrameNode, TextNode.",
|
|
14470
14855
|
references: []
|
|
14471
14856
|
},
|
|
14472
14857
|
{
|
|
14473
14858
|
name: "overflowX",
|
|
14474
14859
|
category: "TextNode",
|
|
14475
14860
|
signature: 'overflowX: WithOverflowTrait["overflowX"]',
|
|
14476
|
-
description: "Controls horizontal overflow behavior.\nSetting to `null` removes the overflow X property. Supported by FrameNode, TextNode.",
|
|
14861
|
+
description: "Controls horizontal overflow behavior.\n\nSetting to `null` removes the overflow X property. Supported by FrameNode, TextNode.",
|
|
14477
14862
|
references: []
|
|
14478
14863
|
},
|
|
14479
14864
|
{
|
|
14480
14865
|
name: "overflowY",
|
|
14481
14866
|
category: "TextNode",
|
|
14482
14867
|
signature: 'overflowY: WithOverflowTrait["overflowY"]',
|
|
14483
|
-
description: "Controls vertical overflow behavior.\nSetting to `null` removes the overflow Y property. Supported by FrameNode, TextNode.",
|
|
14868
|
+
description: "Controls vertical overflow behavior.\n\nSetting to `null` removes the overflow Y property. Supported by FrameNode, TextNode.",
|
|
14484
14869
|
references: []
|
|
14485
14870
|
},
|
|
14486
14871
|
{
|
|
@@ -14501,14 +14886,14 @@ var methodsByCategory = {
|
|
|
14501
14886
|
name: "right",
|
|
14502
14887
|
category: "TextNode",
|
|
14503
14888
|
signature: "right: CSSDimension<CSSUnit.Pixel> | null",
|
|
14504
|
-
description: 'Distance from right edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14889
|
+
description: 'Distance from right edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14505
14890
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14506
14891
|
},
|
|
14507
14892
|
{
|
|
14508
14893
|
name: "rotation",
|
|
14509
14894
|
category: "TextNode",
|
|
14510
14895
|
signature: "rotation: number",
|
|
14511
|
-
description: "Rotation angle in degrees
|
|
14896
|
+
description: "Rotation angle in degrees.\n\nDefaults to `0`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
14512
14897
|
references: []
|
|
14513
14898
|
},
|
|
14514
14899
|
{
|
|
@@ -14522,7 +14907,7 @@ var methodsByCategory = {
|
|
|
14522
14907
|
name: "setAttributes",
|
|
14523
14908
|
category: "TextNode",
|
|
14524
14909
|
signature: 'setAttributes(update: Partial<NodeClassToEditableAttributes[(typeof this)[ClassKey]]>): Promise<(typeof this)[ClassKey] extends "UnknownNode" ? never : typeof this | null>',
|
|
14525
|
-
description: 'Set the attributes of this node
|
|
14910
|
+
description: 'Set the attributes of this node.\n\nAttributes are merged with existing values, so only the provided\nattributes are updated.\n\n@param update - The attributes to update.\n@returns The updated node, or `null` if the node was not found.\n@throws If the node is an `UnknownNode`.\n\nUse `"Node.setAttributes"` to check if this method is allowed.',
|
|
14526
14911
|
references: []
|
|
14527
14912
|
},
|
|
14528
14913
|
{
|
|
@@ -14536,56 +14921,56 @@ var methodsByCategory = {
|
|
|
14536
14921
|
name: "setPluginData",
|
|
14537
14922
|
category: "TextNode",
|
|
14538
14923
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
14539
|
-
description: 'Set plugin data by key
|
|
14924
|
+
description: 'Set plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@param value - The value to set, or `null` to remove.\n\nUse `"Node.setPluginData"` to check if this method is allowed.',
|
|
14540
14925
|
references: []
|
|
14541
14926
|
},
|
|
14542
14927
|
{
|
|
14543
14928
|
name: "setText",
|
|
14544
14929
|
category: "TextNode",
|
|
14545
14930
|
signature: "setText(text: string): Promise<void>",
|
|
14546
|
-
description: 'Set the text of this node
|
|
14931
|
+
description: 'Set the text of this node.\n\nPlain text content, not HTML.\n\nUse `"TextNode.setText"` to check if this method is allowed.',
|
|
14547
14932
|
references: []
|
|
14548
14933
|
},
|
|
14549
14934
|
{
|
|
14550
14935
|
name: "textTruncation",
|
|
14551
14936
|
category: "TextNode",
|
|
14552
14937
|
signature: 'textTruncation: WithTextTruncationTrait["textTruncation"]',
|
|
14553
|
-
description: "Maximum number of lines
|
|
14938
|
+
description: "Maximum number of lines before text is truncated with an ellipsis.\n\nMust be used alongside `overflow`. Setting to `null` removes the text truncation property.\nSupported by TextNode.",
|
|
14554
14939
|
references: []
|
|
14555
14940
|
},
|
|
14556
14941
|
{
|
|
14557
14942
|
name: "top",
|
|
14558
14943
|
category: "TextNode",
|
|
14559
14944
|
signature: "top: CSSDimension<CSSUnit.Pixel> | null",
|
|
14560
|
-
description: 'Distance from top edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14945
|
+
description: 'Distance from top edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14561
14946
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14562
14947
|
},
|
|
14563
14948
|
{
|
|
14564
14949
|
name: "visible",
|
|
14565
14950
|
category: "TextNode",
|
|
14566
14951
|
signature: "visible: boolean",
|
|
14567
|
-
description: "Whether the node is visible on the canvas
|
|
14952
|
+
description: "Whether the node is visible on the canvas.\n\nDefaults to `true`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
14568
14953
|
references: []
|
|
14569
14954
|
},
|
|
14570
14955
|
{
|
|
14571
14956
|
name: "walk",
|
|
14572
14957
|
category: "TextNode",
|
|
14573
14958
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
14574
|
-
description: "Walk this node and its descendants recursively
|
|
14959
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
14575
14960
|
references: ["AnyNode"]
|
|
14576
14961
|
},
|
|
14577
14962
|
{
|
|
14578
14963
|
name: "width",
|
|
14579
14964
|
category: "TextNode",
|
|
14580
14965
|
signature: "width: WidthLength | null",
|
|
14581
|
-
description: 'Width of the node
|
|
14966
|
+
description: 'Width of the node.\n\nAccepts pixel, percentage, fraction values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14582
14967
|
references: ["WidthLength"]
|
|
14583
14968
|
},
|
|
14584
14969
|
{
|
|
14585
14970
|
name: "zIndex",
|
|
14586
14971
|
category: "TextNode",
|
|
14587
14972
|
signature: 'zIndex: WithZIndexTrait["zIndex"]',
|
|
14588
|
-
description: "Stacking order of positioned elements
|
|
14973
|
+
description: "Stacking order of positioned elements.\n\nHigher values appear on top of lower values.\nSetting to `null` removes the z-index property. Supported by FrameNode, TextNode.",
|
|
14589
14974
|
references: []
|
|
14590
14975
|
},
|
|
14591
14976
|
{
|
|
@@ -14811,7 +15196,7 @@ var methodsByCategory = {
|
|
|
14811
15196
|
name: "getNodesWithAttribute",
|
|
14812
15197
|
category: "UnknownNode",
|
|
14813
15198
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
14814
|
-
description: 'Get the descendants of this node that support `attribute
|
|
15199
|
+
description: 'Get the descendants of this node that support `attribute`.\n\nThis returns nodes that have the given attribute defined in their type,\nregardless of whether it has been set.\n\n@param attribute - The attribute name to filter by.\n@returns An array of nodes that support the attribute.\n\n@example\n```ts\n// Get any kind of node that has a background color attribute.\nconst nodes = await framer.getNodesWithAttribute("backgroundColor")\n```',
|
|
14815
15200
|
references: ["T", "Node"]
|
|
14816
15201
|
},
|
|
14817
15202
|
{
|
|
@@ -14825,7 +15210,7 @@ var methodsByCategory = {
|
|
|
14825
15210
|
name: "getNodesWithType",
|
|
14826
15211
|
category: "UnknownNode",
|
|
14827
15212
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
14828
|
-
description: 'Get descendants of this node that match the given type
|
|
15213
|
+
description: 'Get descendants of this node that match the given type.\n\nThis can also be used to query within a selection subtree.\n\n@param type - The node type to search for.\n@returns An array of matching descendant nodes.\n\n@example\n```ts\n// Get all frame nodes in a project.\nconst frameNodes = await framer.getNodesWithType("FrameNode")\n\n// Query within a selection subtree.\nconst selection = await framer.getSelection()\nif (selection.length === 1) {\n const frameNodes = await selection[0].getNodesWithType("FrameNode")\n}\n```',
|
|
14829
15214
|
references: ["FrameNode"]
|
|
14830
15215
|
},
|
|
14831
15216
|
{
|
|
@@ -14839,7 +15224,7 @@ var methodsByCategory = {
|
|
|
14839
15224
|
name: "getPluginData",
|
|
14840
15225
|
category: "UnknownNode",
|
|
14841
15226
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
14842
|
-
description: "Get plugin data by key
|
|
15227
|
+
description: "Get plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@returns The stored value, or `null` if no data exists for the key.",
|
|
14843
15228
|
references: []
|
|
14844
15229
|
},
|
|
14845
15230
|
{
|
|
@@ -14860,7 +15245,7 @@ var methodsByCategory = {
|
|
|
14860
15245
|
name: "navigateTo",
|
|
14861
15246
|
category: "UnknownNode",
|
|
14862
15247
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
14863
|
-
description: "Navigate to this node
|
|
15248
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
14864
15249
|
references: ["NavigableOptions"]
|
|
14865
15250
|
},
|
|
14866
15251
|
{
|
|
@@ -14881,21 +15266,21 @@ var methodsByCategory = {
|
|
|
14881
15266
|
name: "setAttributes",
|
|
14882
15267
|
category: "UnknownNode",
|
|
14883
15268
|
signature: 'setAttributes(update: Partial<NodeClassToEditableAttributes[(typeof this)[ClassKey]]>): Promise<(typeof this)[ClassKey] extends "UnknownNode" ? never : typeof this | null>',
|
|
14884
|
-
description: 'Set the attributes of this node
|
|
15269
|
+
description: 'Set the attributes of this node.\n\nAttributes are merged with existing values, so only the provided\nattributes are updated.\n\n@param update - The attributes to update.\n@returns The updated node, or `null` if the node was not found.\n@throws If the node is an `UnknownNode`.\n\nUse `"Node.setAttributes"` to check if this method is allowed.',
|
|
14885
15270
|
references: []
|
|
14886
15271
|
},
|
|
14887
15272
|
{
|
|
14888
15273
|
name: "setPluginData",
|
|
14889
15274
|
category: "UnknownNode",
|
|
14890
15275
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
14891
|
-
description: 'Set plugin data by key
|
|
15276
|
+
description: 'Set plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@param value - The value to set, or `null` to remove.\n\nUse `"Node.setPluginData"` to check if this method is allowed.',
|
|
14892
15277
|
references: []
|
|
14893
15278
|
},
|
|
14894
15279
|
{
|
|
14895
15280
|
name: "walk",
|
|
14896
15281
|
category: "UnknownNode",
|
|
14897
15282
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
14898
|
-
description: "Walk this node and its descendants recursively
|
|
15283
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
14899
15284
|
references: ["AnyNode"]
|
|
14900
15285
|
},
|
|
14901
15286
|
{
|
|
@@ -14975,21 +15360,21 @@ var methodsByCategory = {
|
|
|
14975
15360
|
name: "bottom",
|
|
14976
15361
|
category: "VectorSetItemNode",
|
|
14977
15362
|
signature: "bottom: CSSDimension<CSSUnit.Pixel> | null",
|
|
14978
|
-
description: 'Distance from bottom edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
15363
|
+
description: 'Distance from bottom edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14979
15364
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14980
15365
|
},
|
|
14981
15366
|
{
|
|
14982
15367
|
name: "centerX",
|
|
14983
15368
|
category: "VectorSetItemNode",
|
|
14984
15369
|
signature: "centerX: CSSDimension<CSSUnit.Percentage> | null",
|
|
14985
|
-
description: 'Center anchor horizontal position as percentage (e.g. `"50%"`).\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
15370
|
+
description: 'Center anchor horizontal position as percentage (e.g. `"50%"`).\n\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14986
15371
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
14987
15372
|
},
|
|
14988
15373
|
{
|
|
14989
15374
|
name: "centerY",
|
|
14990
15375
|
category: "VectorSetItemNode",
|
|
14991
15376
|
signature: "centerY: CSSDimension<CSSUnit.Percentage> | null",
|
|
14992
|
-
description: 'Center anchor vertical position as percentage (e.g. `"50%"`).\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
15377
|
+
description: 'Center anchor vertical position as percentage (e.g. `"50%"`).\n\nUsed when pins are not set.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14993
15378
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
14994
15379
|
},
|
|
14995
15380
|
{
|
|
@@ -15010,7 +15395,7 @@ var methodsByCategory = {
|
|
|
15010
15395
|
name: "getNodesWithAttribute",
|
|
15011
15396
|
category: "VectorSetItemNode",
|
|
15012
15397
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
15013
|
-
description: 'Get the descendants of this node that support `attribute
|
|
15398
|
+
description: 'Get the descendants of this node that support `attribute`.\n\nThis returns nodes that have the given attribute defined in their type,\nregardless of whether it has been set.\n\n@param attribute - The attribute name to filter by.\n@returns An array of nodes that support the attribute.\n\n@example\n```ts\n// Get any kind of node that has a background color attribute.\nconst nodes = await framer.getNodesWithAttribute("backgroundColor")\n```',
|
|
15014
15399
|
references: ["T", "Node"]
|
|
15015
15400
|
},
|
|
15016
15401
|
{
|
|
@@ -15024,7 +15409,7 @@ var methodsByCategory = {
|
|
|
15024
15409
|
name: "getNodesWithType",
|
|
15025
15410
|
category: "VectorSetItemNode",
|
|
15026
15411
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
15027
|
-
description: 'Get descendants of this node that match the given type
|
|
15412
|
+
description: 'Get descendants of this node that match the given type.\n\nThis can also be used to query within a selection subtree.\n\n@param type - The node type to search for.\n@returns An array of matching descendant nodes.\n\n@example\n```ts\n// Get all frame nodes in a project.\nconst frameNodes = await framer.getNodesWithType("FrameNode")\n\n// Query within a selection subtree.\nconst selection = await framer.getSelection()\nif (selection.length === 1) {\n const frameNodes = await selection[0].getNodesWithType("FrameNode")\n}\n```',
|
|
15028
15413
|
references: ["FrameNode"]
|
|
15029
15414
|
},
|
|
15030
15415
|
{
|
|
@@ -15038,7 +15423,7 @@ var methodsByCategory = {
|
|
|
15038
15423
|
name: "getPluginData",
|
|
15039
15424
|
category: "VectorSetItemNode",
|
|
15040
15425
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
15041
|
-
description: "Get plugin data by key
|
|
15426
|
+
description: "Get plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@returns The stored value, or `null` if no data exists for the key.",
|
|
15042
15427
|
references: []
|
|
15043
15428
|
},
|
|
15044
15429
|
{
|
|
@@ -15059,35 +15444,35 @@ var methodsByCategory = {
|
|
|
15059
15444
|
name: "height",
|
|
15060
15445
|
category: "VectorSetItemNode",
|
|
15061
15446
|
signature: "height: HeightLength | null",
|
|
15062
|
-
description: 'Height of the node
|
|
15447
|
+
description: 'Height of the node.\n\nAccepts pixel, percentage, fraction, viewport-height values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
15063
15448
|
references: ["HeightLength"]
|
|
15064
15449
|
},
|
|
15065
15450
|
{
|
|
15066
15451
|
name: "left",
|
|
15067
15452
|
category: "VectorSetItemNode",
|
|
15068
15453
|
signature: "left: CSSDimension<CSSUnit.Pixel> | null",
|
|
15069
|
-
description: 'Distance from left edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
15454
|
+
description: 'Distance from left edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
15070
15455
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
15071
15456
|
},
|
|
15072
15457
|
{
|
|
15073
15458
|
name: "locked",
|
|
15074
15459
|
category: "VectorSetItemNode",
|
|
15075
15460
|
signature: "locked: boolean",
|
|
15076
|
-
description: "Whether the node is locked for editing
|
|
15461
|
+
description: "Whether the node is locked for editing.\n\nDefaults to `false`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
15077
15462
|
references: []
|
|
15078
15463
|
},
|
|
15079
15464
|
{
|
|
15080
15465
|
name: "name",
|
|
15081
15466
|
category: "VectorSetItemNode",
|
|
15082
15467
|
signature: "name: string | null",
|
|
15083
|
-
description: "The name of the node displayed in the layers panel.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
15468
|
+
description: "The name of the node displayed in the layers panel.\n\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
15084
15469
|
references: []
|
|
15085
15470
|
},
|
|
15086
15471
|
{
|
|
15087
15472
|
name: "navigateTo",
|
|
15088
15473
|
category: "VectorSetItemNode",
|
|
15089
15474
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
15090
|
-
description: "Navigate to this node
|
|
15475
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
15091
15476
|
references: ["NavigableOptions"]
|
|
15092
15477
|
},
|
|
15093
15478
|
{
|
|
@@ -15101,7 +15486,7 @@ var methodsByCategory = {
|
|
|
15101
15486
|
name: "right",
|
|
15102
15487
|
category: "VectorSetItemNode",
|
|
15103
15488
|
signature: "right: CSSDimension<CSSUnit.Pixel> | null",
|
|
15104
|
-
description: 'Distance from right edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
15489
|
+
description: 'Distance from right edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
15105
15490
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
15106
15491
|
},
|
|
15107
15492
|
{
|
|
@@ -15115,42 +15500,42 @@ var methodsByCategory = {
|
|
|
15115
15500
|
name: "setAttributes",
|
|
15116
15501
|
category: "VectorSetItemNode",
|
|
15117
15502
|
signature: 'setAttributes(update: Partial<NodeClassToEditableAttributes[(typeof this)[ClassKey]]>): Promise<(typeof this)[ClassKey] extends "UnknownNode" ? never : typeof this | null>',
|
|
15118
|
-
description: 'Set the attributes of this node
|
|
15503
|
+
description: 'Set the attributes of this node.\n\nAttributes are merged with existing values, so only the provided\nattributes are updated.\n\n@param update - The attributes to update.\n@returns The updated node, or `null` if the node was not found.\n@throws If the node is an `UnknownNode`.\n\nUse `"Node.setAttributes"` to check if this method is allowed.',
|
|
15119
15504
|
references: []
|
|
15120
15505
|
},
|
|
15121
15506
|
{
|
|
15122
15507
|
name: "setPluginData",
|
|
15123
15508
|
category: "VectorSetItemNode",
|
|
15124
15509
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
15125
|
-
description: 'Set plugin data by key
|
|
15510
|
+
description: 'Set plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@param value - The value to set, or `null` to remove.\n\nUse `"Node.setPluginData"` to check if this method is allowed.',
|
|
15126
15511
|
references: []
|
|
15127
15512
|
},
|
|
15128
15513
|
{
|
|
15129
15514
|
name: "top",
|
|
15130
15515
|
category: "VectorSetItemNode",
|
|
15131
15516
|
signature: "top: CSSDimension<CSSUnit.Pixel> | null",
|
|
15132
|
-
description: 'Distance from top edge when using absolute/fixed positioning.\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
15517
|
+
description: 'Distance from top edge when using absolute/fixed positioning.\n\nOnly applies when position is not `"relative"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
15133
15518
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
15134
15519
|
},
|
|
15135
15520
|
{
|
|
15136
15521
|
name: "visible",
|
|
15137
15522
|
category: "VectorSetItemNode",
|
|
15138
15523
|
signature: "visible: boolean",
|
|
15139
|
-
description: "Whether the node is visible on the canvas
|
|
15524
|
+
description: "Whether the node is visible on the canvas.\n\nDefaults to `true`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
15140
15525
|
references: []
|
|
15141
15526
|
},
|
|
15142
15527
|
{
|
|
15143
15528
|
name: "walk",
|
|
15144
15529
|
category: "VectorSetItemNode",
|
|
15145
15530
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
15146
|
-
description: "Walk this node and its descendants recursively
|
|
15531
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
15147
15532
|
references: ["AnyNode"]
|
|
15148
15533
|
},
|
|
15149
15534
|
{
|
|
15150
15535
|
name: "width",
|
|
15151
15536
|
category: "VectorSetItemNode",
|
|
15152
15537
|
signature: "width: WidthLength | null",
|
|
15153
|
-
description: 'Width of the node
|
|
15538
|
+
description: 'Width of the node.\n\nAccepts pixel, percentage, fraction values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
15154
15539
|
references: ["WidthLength"]
|
|
15155
15540
|
},
|
|
15156
15541
|
{
|
|
@@ -15180,7 +15565,7 @@ var methodsByCategory = {
|
|
|
15180
15565
|
name: "getNodesWithAttribute",
|
|
15181
15566
|
category: "VectorSetNode",
|
|
15182
15567
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
15183
|
-
description: 'Get the descendants of this node that support `attribute
|
|
15568
|
+
description: 'Get the descendants of this node that support `attribute`.\n\nThis returns nodes that have the given attribute defined in their type,\nregardless of whether it has been set.\n\n@param attribute - The attribute name to filter by.\n@returns An array of nodes that support the attribute.\n\n@example\n```ts\n// Get any kind of node that has a background color attribute.\nconst nodes = await framer.getNodesWithAttribute("backgroundColor")\n```',
|
|
15184
15569
|
references: ["T", "Node"]
|
|
15185
15570
|
},
|
|
15186
15571
|
{
|
|
@@ -15194,7 +15579,7 @@ var methodsByCategory = {
|
|
|
15194
15579
|
name: "getNodesWithType",
|
|
15195
15580
|
category: "VectorSetNode",
|
|
15196
15581
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
15197
|
-
description: 'Get descendants of this node that match the given type
|
|
15582
|
+
description: 'Get descendants of this node that match the given type.\n\nThis can also be used to query within a selection subtree.\n\n@param type - The node type to search for.\n@returns An array of matching descendant nodes.\n\n@example\n```ts\n// Get all frame nodes in a project.\nconst frameNodes = await framer.getNodesWithType("FrameNode")\n\n// Query within a selection subtree.\nconst selection = await framer.getSelection()\nif (selection.length === 1) {\n const frameNodes = await selection[0].getNodesWithType("FrameNode")\n}\n```',
|
|
15198
15583
|
references: ["FrameNode"]
|
|
15199
15584
|
},
|
|
15200
15585
|
{
|
|
@@ -15208,7 +15593,7 @@ var methodsByCategory = {
|
|
|
15208
15593
|
name: "getPluginData",
|
|
15209
15594
|
category: "VectorSetNode",
|
|
15210
15595
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
15211
|
-
description: "Get plugin data by key
|
|
15596
|
+
description: "Get plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@returns The stored value, or `null` if no data exists for the key.",
|
|
15212
15597
|
references: []
|
|
15213
15598
|
},
|
|
15214
15599
|
{
|
|
@@ -15229,7 +15614,7 @@ var methodsByCategory = {
|
|
|
15229
15614
|
name: "navigateTo",
|
|
15230
15615
|
category: "VectorSetNode",
|
|
15231
15616
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
15232
|
-
description: "Navigate to this node
|
|
15617
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
15233
15618
|
references: ["NavigableOptions"]
|
|
15234
15619
|
},
|
|
15235
15620
|
{
|
|
@@ -15250,21 +15635,21 @@ var methodsByCategory = {
|
|
|
15250
15635
|
name: "setAttributes",
|
|
15251
15636
|
category: "VectorSetNode",
|
|
15252
15637
|
signature: 'setAttributes(update: Partial<NodeClassToEditableAttributes[(typeof this)[ClassKey]]>): Promise<(typeof this)[ClassKey] extends "UnknownNode" ? never : typeof this | null>',
|
|
15253
|
-
description: 'Set the attributes of this node
|
|
15638
|
+
description: 'Set the attributes of this node.\n\nAttributes are merged with existing values, so only the provided\nattributes are updated.\n\n@param update - The attributes to update.\n@returns The updated node, or `null` if the node was not found.\n@throws If the node is an `UnknownNode`.\n\nUse `"Node.setAttributes"` to check if this method is allowed.',
|
|
15254
15639
|
references: []
|
|
15255
15640
|
},
|
|
15256
15641
|
{
|
|
15257
15642
|
name: "setPluginData",
|
|
15258
15643
|
category: "VectorSetNode",
|
|
15259
15644
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
15260
|
-
description: 'Set plugin data by key
|
|
15645
|
+
description: 'Set plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@param value - The value to set, or `null` to remove.\n\nUse `"Node.setPluginData"` to check if this method is allowed.',
|
|
15261
15646
|
references: []
|
|
15262
15647
|
},
|
|
15263
15648
|
{
|
|
15264
15649
|
name: "walk",
|
|
15265
15650
|
category: "VectorSetNode",
|
|
15266
15651
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
15267
|
-
description: "Walk this node and its descendants recursively
|
|
15652
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
15268
15653
|
references: ["AnyNode"]
|
|
15269
15654
|
},
|
|
15270
15655
|
{
|
|
@@ -15301,7 +15686,7 @@ var methodsByCategory = {
|
|
|
15301
15686
|
name: "getActiveCollectionItem",
|
|
15302
15687
|
category: "WebPageNode",
|
|
15303
15688
|
signature: "getActiveCollectionItem(): Promise<CollectionItem | null>",
|
|
15304
|
-
description: "Get the active collection item for this CMS detail page.\nReturns null if this is not a detail page or the collection is empty.\n\n@alpha",
|
|
15689
|
+
description: "Get the active collection item for this CMS detail page.\n\nReturns null if this is not a detail page or the collection is empty.\n\n@alpha",
|
|
15305
15690
|
references: ["CollectionItem"]
|
|
15306
15691
|
},
|
|
15307
15692
|
{
|
|
@@ -15322,7 +15707,7 @@ var methodsByCategory = {
|
|
|
15322
15707
|
name: "getNodesWithAttribute",
|
|
15323
15708
|
category: "WebPageNode",
|
|
15324
15709
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
15325
|
-
description: 'Get the descendants of this node that support `attribute
|
|
15710
|
+
description: 'Get the descendants of this node that support `attribute`.\n\nThis returns nodes that have the given attribute defined in their type,\nregardless of whether it has been set.\n\n@param attribute - The attribute name to filter by.\n@returns An array of nodes that support the attribute.\n\n@example\n```ts\n// Get any kind of node that has a background color attribute.\nconst nodes = await framer.getNodesWithAttribute("backgroundColor")\n```',
|
|
15326
15711
|
references: ["T", "Node"]
|
|
15327
15712
|
},
|
|
15328
15713
|
{
|
|
@@ -15336,7 +15721,7 @@ var methodsByCategory = {
|
|
|
15336
15721
|
name: "getNodesWithType",
|
|
15337
15722
|
category: "WebPageNode",
|
|
15338
15723
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
15339
|
-
description: 'Get descendants of this node that match the given type
|
|
15724
|
+
description: 'Get descendants of this node that match the given type.\n\nThis can also be used to query within a selection subtree.\n\n@param type - The node type to search for.\n@returns An array of matching descendant nodes.\n\n@example\n```ts\n// Get all frame nodes in a project.\nconst frameNodes = await framer.getNodesWithType("FrameNode")\n\n// Query within a selection subtree.\nconst selection = await framer.getSelection()\nif (selection.length === 1) {\n const frameNodes = await selection[0].getNodesWithType("FrameNode")\n}\n```',
|
|
15340
15725
|
references: ["FrameNode"]
|
|
15341
15726
|
},
|
|
15342
15727
|
{
|
|
@@ -15350,7 +15735,7 @@ var methodsByCategory = {
|
|
|
15350
15735
|
name: "getPluginData",
|
|
15351
15736
|
category: "WebPageNode",
|
|
15352
15737
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
15353
|
-
description: "Get plugin data by key
|
|
15738
|
+
description: "Get plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@returns The stored value, or `null` if no data exists for the key.",
|
|
15354
15739
|
references: []
|
|
15355
15740
|
},
|
|
15356
15741
|
{
|
|
@@ -15371,7 +15756,7 @@ var methodsByCategory = {
|
|
|
15371
15756
|
name: "navigateTo",
|
|
15372
15757
|
category: "WebPageNode",
|
|
15373
15758
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
15374
|
-
description: "Navigate to this node
|
|
15759
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
15375
15760
|
references: ["NavigableOptions"]
|
|
15376
15761
|
},
|
|
15377
15762
|
{
|
|
@@ -15399,21 +15784,21 @@ var methodsByCategory = {
|
|
|
15399
15784
|
name: "setAttributes",
|
|
15400
15785
|
category: "WebPageNode",
|
|
15401
15786
|
signature: 'setAttributes(update: Partial<NodeClassToEditableAttributes[(typeof this)[ClassKey]]>): Promise<(typeof this)[ClassKey] extends "UnknownNode" ? never : typeof this | null>',
|
|
15402
|
-
description: 'Set the attributes of this node
|
|
15787
|
+
description: 'Set the attributes of this node.\n\nAttributes are merged with existing values, so only the provided\nattributes are updated.\n\n@param update - The attributes to update.\n@returns The updated node, or `null` if the node was not found.\n@throws If the node is an `UnknownNode`.\n\nUse `"Node.setAttributes"` to check if this method is allowed.',
|
|
15403
15788
|
references: []
|
|
15404
15789
|
},
|
|
15405
15790
|
{
|
|
15406
15791
|
name: "setPluginData",
|
|
15407
15792
|
category: "WebPageNode",
|
|
15408
15793
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
15409
|
-
description: 'Set plugin data by key
|
|
15794
|
+
description: 'Set plugin data by key.\n\nPlugin data lets you store arbitrary string values on individual\nnodes, scoped to your plugin.\n\n@param key - The plugin data key.\n@param value - The value to set, or `null` to remove.\n\nUse `"Node.setPluginData"` to check if this method is allowed.',
|
|
15410
15795
|
references: []
|
|
15411
15796
|
},
|
|
15412
15797
|
{
|
|
15413
15798
|
name: "walk",
|
|
15414
15799
|
category: "WebPageNode",
|
|
15415
15800
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
15416
|
-
description: "Walk this node and its descendants recursively
|
|
15801
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
15417
15802
|
references: ["AnyNode"]
|
|
15418
15803
|
},
|
|
15419
15804
|
{
|
|
@@ -15432,15 +15817,15 @@ function getMethod(query) {
|
|
|
15432
15817
|
return methods?.find((m) => m.name === methodName);
|
|
15433
15818
|
}
|
|
15434
15819
|
__name(getMethod, "getMethod");
|
|
15435
|
-
function getClass(
|
|
15436
|
-
const info = classes[
|
|
15820
|
+
function getClass(name2) {
|
|
15821
|
+
const info = classes[name2.toLowerCase()];
|
|
15437
15822
|
if (!info) return void 0;
|
|
15438
|
-
const methods = methodsByCategory[
|
|
15823
|
+
const methods = methodsByCategory[name2.toLowerCase()] ?? [];
|
|
15439
15824
|
return { info, methods };
|
|
15440
15825
|
}
|
|
15441
15826
|
__name(getClass, "getClass");
|
|
15442
|
-
function getType(
|
|
15443
|
-
return types[
|
|
15827
|
+
function getType(name2) {
|
|
15828
|
+
return types[name2.toLowerCase()];
|
|
15444
15829
|
}
|
|
15445
15830
|
__name(getType, "getType");
|
|
15446
15831
|
|
|
@@ -15457,10 +15842,10 @@ function formatDocComment(text, indent = "") {
|
|
|
15457
15842
|
].join("\n");
|
|
15458
15843
|
}
|
|
15459
15844
|
__name(formatDocComment, "formatDocComment");
|
|
15460
|
-
function formatClass(
|
|
15845
|
+
function formatClass(name2, description, methods) {
|
|
15461
15846
|
const lines = [];
|
|
15462
15847
|
if (description) lines.push(formatDocComment(description));
|
|
15463
|
-
lines.push(`class ${
|
|
15848
|
+
lines.push(`class ${name2} {`);
|
|
15464
15849
|
let first = true;
|
|
15465
15850
|
for (const method of methods) {
|
|
15466
15851
|
if (method.signature.startsWith("[")) continue;
|
|
@@ -15640,13 +16025,35 @@ function inferHeadlessServerUrl(projectUrlOrId) {
|
|
|
15640
16025
|
}
|
|
15641
16026
|
}
|
|
15642
16027
|
__name(inferHeadlessServerUrl, "inferHeadlessServerUrl");
|
|
16028
|
+
function getRelayTokenPath() {
|
|
16029
|
+
return path7.join(getConfigDir(), "relay-token");
|
|
16030
|
+
}
|
|
16031
|
+
__name(getRelayTokenPath, "getRelayTokenPath");
|
|
16032
|
+
function readRelayToken() {
|
|
16033
|
+
try {
|
|
16034
|
+
const token = fs7.readFileSync(getRelayTokenPath(), "utf-8").trim();
|
|
16035
|
+
return token.length > 0 ? token : null;
|
|
16036
|
+
} catch {
|
|
16037
|
+
return null;
|
|
16038
|
+
}
|
|
16039
|
+
}
|
|
16040
|
+
__name(readRelayToken, "readRelayToken");
|
|
16041
|
+
|
|
16042
|
+
// src/relay-client.ts
|
|
15643
16043
|
var __filename$1 = fileURLToPath(import.meta.url);
|
|
15644
|
-
var __dirname$1 =
|
|
16044
|
+
var __dirname$1 = path7.dirname(__filename$1);
|
|
15645
16045
|
var RELAY_PORT = Number(process.env.FRAMER_CLI_PORT) || 19988;
|
|
15646
16046
|
var client = createTRPCClient({
|
|
15647
16047
|
links: [
|
|
15648
16048
|
httpLink({
|
|
15649
|
-
url: `http://127.0.0.1:${RELAY_PORT}
|
|
16049
|
+
url: `http://127.0.0.1:${RELAY_PORT}`,
|
|
16050
|
+
headers() {
|
|
16051
|
+
const token = readRelayToken();
|
|
16052
|
+
if (!token) {
|
|
16053
|
+
return {};
|
|
16054
|
+
}
|
|
16055
|
+
return { Authorization: `Bearer ${token}` };
|
|
16056
|
+
}
|
|
15650
16057
|
})
|
|
15651
16058
|
]
|
|
15652
16059
|
});
|
|
@@ -15709,7 +16116,7 @@ async function ensureRelayServerRunning(options = {}) {
|
|
|
15709
16116
|
logger?.log("Relay server not running, starting it...");
|
|
15710
16117
|
}
|
|
15711
16118
|
const isRunningFromSource = __filename$1.endsWith(".ts");
|
|
15712
|
-
const scriptPath = isRunningFromSource ?
|
|
16119
|
+
const scriptPath = isRunningFromSource ? path7.resolve(__dirname$1, "./start-relay-server.ts") : path7.resolve(__dirname$1, "./start-relay-server.js");
|
|
15713
16120
|
debug("relay", `spawning server process: ${scriptPath}`);
|
|
15714
16121
|
const serverProcess = spawn(
|
|
15715
16122
|
isRunningFromSource ? "tsx" : process.execPath,
|
|
@@ -15736,19 +16143,19 @@ async function ensureRelayServerRunning(options = {}) {
|
|
|
15736
16143
|
throw new Error("Failed to start relay server after 5 seconds");
|
|
15737
16144
|
}
|
|
15738
16145
|
__name(ensureRelayServerRunning, "ensureRelayServerRunning");
|
|
15739
|
-
var FRAMER_TEMPORARY_DIR =
|
|
16146
|
+
var FRAMER_TEMPORARY_DIR = path7.join(os.tmpdir(), "framer");
|
|
15740
16147
|
function ensureTemporaryDir() {
|
|
15741
|
-
|
|
16148
|
+
fs7.mkdirSync(FRAMER_TEMPORARY_DIR, { recursive: true });
|
|
15742
16149
|
}
|
|
15743
16150
|
__name(ensureTemporaryDir, "ensureTemporaryDir");
|
|
15744
16151
|
function cleanupStaleSessionCodeFiles(activeSessionIds) {
|
|
15745
|
-
if (!
|
|
16152
|
+
if (!fs7.existsSync(FRAMER_TEMPORARY_DIR)) return;
|
|
15746
16153
|
const activeSessionIdsSet = new Set(activeSessionIds);
|
|
15747
|
-
for (const entry of
|
|
16154
|
+
for (const entry of fs7.readdirSync(FRAMER_TEMPORARY_DIR)) {
|
|
15748
16155
|
const [sessionId] = entry.split("-");
|
|
15749
16156
|
if (activeSessionIdsSet.has(sessionId)) continue;
|
|
15750
|
-
const filePath =
|
|
15751
|
-
|
|
16157
|
+
const filePath = path7.join(FRAMER_TEMPORARY_DIR, entry);
|
|
16158
|
+
fs7.rmSync(filePath, { recursive: true, force: true, maxRetries: 2 });
|
|
15752
16159
|
}
|
|
15753
16160
|
}
|
|
15754
16161
|
__name(cleanupStaleSessionCodeFiles, "cleanupStaleSessionCodeFiles");
|
|
@@ -15756,10 +16163,10 @@ __name(cleanupStaleSessionCodeFiles, "cleanupStaleSessionCodeFiles");
|
|
|
15756
16163
|
// src/skills.ts
|
|
15757
16164
|
var META_SKILL_NAME = "framer";
|
|
15758
16165
|
var CODE_COMPONENTS_SKILL_NAME = "framer-code-components";
|
|
15759
|
-
var __dirname2 =
|
|
15760
|
-
var skillsDocsDir =
|
|
15761
|
-
function readSkillDoc(
|
|
15762
|
-
return
|
|
16166
|
+
var __dirname2 = path7.dirname(fileURLToPath(import.meta.url));
|
|
16167
|
+
var skillsDocsDir = path7.join(__dirname2, "..", "docs", "skills");
|
|
16168
|
+
function readSkillDoc(name2) {
|
|
16169
|
+
return fs7.readFileSync(path7.join(skillsDocsDir, name2), "utf-8").trimEnd();
|
|
15763
16170
|
}
|
|
15764
16171
|
__name(readSkillDoc, "readSkillDoc");
|
|
15765
16172
|
function buildMetaSkill() {
|
|
@@ -15802,27 +16209,27 @@ function buildProjectCanvasSkill(projectId, agentContext, canvasPrompt) {
|
|
|
15802
16209
|
}
|
|
15803
16210
|
__name(buildProjectCanvasSkill, "buildProjectCanvasSkill");
|
|
15804
16211
|
function writeSkill(root, skillName, content) {
|
|
15805
|
-
|
|
15806
|
-
const rootStat =
|
|
16212
|
+
fs7.mkdirSync(root, { recursive: true });
|
|
16213
|
+
const rootStat = fs7.statSync(root);
|
|
15807
16214
|
if (!rootStat.isDirectory()) {
|
|
15808
16215
|
throw new Error(`Skill root is not a directory: ${root}`);
|
|
15809
16216
|
}
|
|
15810
|
-
const skillDir =
|
|
15811
|
-
const filePath =
|
|
15812
|
-
const current =
|
|
16217
|
+
const skillDir = path7.join(root, skillName);
|
|
16218
|
+
const filePath = path7.join(skillDir, "SKILL.md");
|
|
16219
|
+
const current = fs7.lstatSync(skillDir, { throwIfNoEntry: false });
|
|
15813
16220
|
if (current && (current.isSymbolicLink() || !current.isDirectory())) {
|
|
15814
|
-
|
|
16221
|
+
fs7.rmSync(skillDir, { recursive: true, force: true });
|
|
15815
16222
|
}
|
|
15816
|
-
|
|
15817
|
-
|
|
16223
|
+
fs7.mkdirSync(skillDir, { recursive: true });
|
|
16224
|
+
fs7.writeFileSync(filePath, content, "utf-8");
|
|
15818
16225
|
return filePath;
|
|
15819
16226
|
}
|
|
15820
16227
|
__name(writeSkill, "writeSkill");
|
|
15821
16228
|
function getDefaultSkillRoots() {
|
|
15822
16229
|
const home = os.homedir();
|
|
15823
16230
|
return [
|
|
15824
|
-
|
|
15825
|
-
|
|
16231
|
+
path7.join(home, ".agents", "skills"),
|
|
16232
|
+
path7.join(home, ".claude", "skills")
|
|
15826
16233
|
];
|
|
15827
16234
|
}
|
|
15828
16235
|
__name(getDefaultSkillRoots, "getDefaultSkillRoots");
|
|
@@ -15832,14 +16239,14 @@ function cleanupStaleSkills(activeProjectIds, skillRoots) {
|
|
|
15832
16239
|
[...activeProjectIds].map(toSafeProjectId)
|
|
15833
16240
|
);
|
|
15834
16241
|
for (const root of roots) {
|
|
15835
|
-
if (!
|
|
15836
|
-
for (const entry of
|
|
16242
|
+
if (!fs7.existsSync(root)) continue;
|
|
16243
|
+
for (const entry of fs7.readdirSync(root)) {
|
|
15837
16244
|
if (!entry.startsWith(CANVAS_SKILL_PREFIX)) continue;
|
|
15838
16245
|
const sanitizedProjectId = entry.slice(CANVAS_SKILL_PREFIX.length);
|
|
15839
16246
|
const isActive = sanitizedActiveProjectIds.has(sanitizedProjectId);
|
|
15840
16247
|
if (isActive) continue;
|
|
15841
|
-
const skillDir =
|
|
15842
|
-
|
|
16248
|
+
const skillDir = path7.join(root, entry);
|
|
16249
|
+
fs7.rmSync(skillDir, { recursive: true, force: true, maxRetries: 2 });
|
|
15843
16250
|
}
|
|
15844
16251
|
}
|
|
15845
16252
|
}
|
|
@@ -15900,8 +16307,8 @@ function printSetupSummary(results) {
|
|
|
15900
16307
|
const installLocations = /* @__PURE__ */ new Set();
|
|
15901
16308
|
for (const result of results) {
|
|
15902
16309
|
for (const filePath of result.paths) {
|
|
15903
|
-
const skillDir =
|
|
15904
|
-
const root =
|
|
16310
|
+
const skillDir = path7.dirname(filePath);
|
|
16311
|
+
const root = path7.dirname(skillDir);
|
|
15905
16312
|
installLocations.add(root);
|
|
15906
16313
|
}
|
|
15907
16314
|
}
|
|
@@ -16076,7 +16483,7 @@ program.command("exec").description("Execute code in a session").requiredOption(
|
|
|
16076
16483
|
let code = evalCode;
|
|
16077
16484
|
if (!code && filePath) {
|
|
16078
16485
|
try {
|
|
16079
|
-
code =
|
|
16486
|
+
code = fs7.readFileSync(filePath, "utf-8");
|
|
16080
16487
|
} catch (err) {
|
|
16081
16488
|
printError(`Failed to read file: ${formatError(err)}`);
|
|
16082
16489
|
await waitForTrackingToFinish();
|
|
@@ -16254,9 +16661,9 @@ session.command("list").description("List all active sessions").action(async ()
|
|
|
16254
16661
|
var project = program.command("project").description("Manage projects");
|
|
16255
16662
|
project.command("list").description("List recently used projects").action(() => {
|
|
16256
16663
|
printJson(
|
|
16257
|
-
listProjects().map(({ projectId, name, lastUsedAt }) => ({
|
|
16664
|
+
listProjects().map(({ projectId, name: name2, lastUsedAt }) => ({
|
|
16258
16665
|
projectId,
|
|
16259
|
-
name,
|
|
16666
|
+
name: name2,
|
|
16260
16667
|
lastUsedAt
|
|
16261
16668
|
}))
|
|
16262
16669
|
);
|
|
@@ -16277,6 +16684,32 @@ project.command("auth <projectUrlOrId> [apiKey]").description("Authorize and sav
|
|
|
16277
16684
|
});
|
|
16278
16685
|
print(`Project ${projectId} saved`);
|
|
16279
16686
|
});
|
|
16687
|
+
async function saveAuthResult(verb, authFn) {
|
|
16688
|
+
try {
|
|
16689
|
+
const result = await authFn();
|
|
16690
|
+
const { projectId } = result;
|
|
16691
|
+
if (!projectId) throw new Error("No project ID returned from browser flow");
|
|
16692
|
+
debug(`project.${verb}`, `${projectId} \u2014 saving credentials`);
|
|
16693
|
+
saveProject({ projectId, apiKey: result.apiKey, userId: result.userId });
|
|
16694
|
+
print(`Project ${projectId} saved`);
|
|
16695
|
+
} catch (error) {
|
|
16696
|
+
printError(`Failed to ${verb} project: ${formatError(error)}`);
|
|
16697
|
+
await waitForTrackingToFinish();
|
|
16698
|
+
process.exit(1);
|
|
16699
|
+
}
|
|
16700
|
+
}
|
|
16701
|
+
__name(saveAuthResult, "saveAuthResult");
|
|
16702
|
+
project.command("new").description(
|
|
16703
|
+
"Create a new Framer project via browser approval and save its credentials"
|
|
16704
|
+
).action(() => saveAuthResult("create", acquireAuthWithNewProject));
|
|
16705
|
+
project.command("remix <sourceProjectUrlOrId>").description(
|
|
16706
|
+
"Remix (duplicate) an existing Framer project via browser approval and save its credentials"
|
|
16707
|
+
).action(
|
|
16708
|
+
(sourceProjectUrlOrId) => saveAuthResult(
|
|
16709
|
+
"remix",
|
|
16710
|
+
() => acquireAuthWithRemixProject(sourceProjectUrlOrId)
|
|
16711
|
+
)
|
|
16712
|
+
);
|
|
16280
16713
|
session.command("destroy <sessionId>").description("Destroy a session").action(async (sessionId) => {
|
|
16281
16714
|
await ensureRelayForCli();
|
|
16282
16715
|
try {
|