framer-dalton 0.0.20 → 0.0.21
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 +503 -380
- package/dist/start-relay-server.js +17 -3
- package/docs/skills/framer.md +15 -1
- package/package.json +7 -4
package/dist/cli.js
CHANGED
|
@@ -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.21 */
|
|
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;
|
|
@@ -128,17 +142,18 @@ function readProjectsConfig() {
|
|
|
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");
|
|
@@ -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.21"
|
|
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,12 @@ var types = {
|
|
|
7056
7133
|
description: "@alpha",
|
|
7057
7134
|
optional: false
|
|
7058
7135
|
},
|
|
7136
|
+
{
|
|
7137
|
+
name: "reviewChangesForAgent",
|
|
7138
|
+
type: "(options?: {\n pagePath?: string;\n }) => Promise<unknown>",
|
|
7139
|
+
description: "@alpha",
|
|
7140
|
+
optional: false
|
|
7141
|
+
},
|
|
7059
7142
|
{
|
|
7060
7143
|
name: "startAgentConversation",
|
|
7061
7144
|
type: "(prompt: string, options?: StartAgentConversationOptions) => Promise<StartAgentConversationResult>",
|
|
@@ -9203,7 +9286,7 @@ var types = {
|
|
|
9203
9286
|
{
|
|
9204
9287
|
name: "aspectRatio",
|
|
9205
9288
|
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.",
|
|
9289
|
+
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
9290
|
optional: false
|
|
9208
9291
|
}
|
|
9209
9292
|
]
|
|
@@ -9257,7 +9340,7 @@ var types = {
|
|
|
9257
9340
|
{
|
|
9258
9341
|
name: "backgroundColor",
|
|
9259
9342
|
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.",
|
|
9343
|
+
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
9344
|
optional: false
|
|
9262
9345
|
}
|
|
9263
9346
|
]
|
|
@@ -9341,7 +9424,7 @@ var types = {
|
|
|
9341
9424
|
{
|
|
9342
9425
|
name: "borderRadius",
|
|
9343
9426
|
type: "BorderRadius",
|
|
9344
|
-
description: 'Border radius for rounded corners
|
|
9427
|
+
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
9428
|
optional: false
|
|
9346
9429
|
}
|
|
9347
9430
|
]
|
|
@@ -9355,7 +9438,7 @@ var types = {
|
|
|
9355
9438
|
{
|
|
9356
9439
|
name: "border",
|
|
9357
9440
|
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.',
|
|
9441
|
+
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
9442
|
optional: false
|
|
9360
9443
|
}
|
|
9361
9444
|
]
|
|
@@ -9717,37 +9800,37 @@ var types = {
|
|
|
9717
9800
|
{
|
|
9718
9801
|
name: "gridItemFillCellWidth",
|
|
9719
9802
|
type: "boolean | null",
|
|
9720
|
-
description: "Whether to fill the grid cell width
|
|
9803
|
+
description: "Whether to fill the grid cell width.\n\nFor nodes inside a grid container. Defaults to `true`. Supported by FrameNode, TextNode.",
|
|
9721
9804
|
optional: false
|
|
9722
9805
|
},
|
|
9723
9806
|
{
|
|
9724
9807
|
name: "gridItemFillCellHeight",
|
|
9725
9808
|
type: "boolean | null",
|
|
9726
|
-
description: "Whether to fill the grid cell height
|
|
9809
|
+
description: "Whether to fill the grid cell height.\n\nFor nodes inside a grid container. Defaults to `true`. Supported by FrameNode, TextNode.",
|
|
9727
9810
|
optional: false
|
|
9728
9811
|
},
|
|
9729
9812
|
{
|
|
9730
9813
|
name: "gridItemHorizontalAlignment",
|
|
9731
9814
|
type: "GridItemAlignment | null",
|
|
9732
|
-
description: 'Horizontal alignment within grid cell
|
|
9815
|
+
description: 'Horizontal alignment within grid cell.\n\nFor nodes inside a grid container. Defaults to `"center"`. Supported by FrameNode, TextNode.',
|
|
9733
9816
|
optional: false
|
|
9734
9817
|
},
|
|
9735
9818
|
{
|
|
9736
9819
|
name: "gridItemVerticalAlignment",
|
|
9737
9820
|
type: "GridItemAlignment | null",
|
|
9738
|
-
description: 'Vertical alignment within grid cell
|
|
9821
|
+
description: 'Vertical alignment within grid cell.\n\nFor nodes inside a grid container. Defaults to `"center"`. Supported by FrameNode, TextNode.',
|
|
9739
9822
|
optional: false
|
|
9740
9823
|
},
|
|
9741
9824
|
{
|
|
9742
9825
|
name: "gridItemColumnSpan",
|
|
9743
9826
|
type: "GridItemColumnSpan | null",
|
|
9744
|
-
description: 'Number of columns to span, or `"all"` for all columns
|
|
9827
|
+
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
9828
|
optional: false
|
|
9746
9829
|
},
|
|
9747
9830
|
{
|
|
9748
9831
|
name: "gridItemRowSpan",
|
|
9749
9832
|
type: "number | null",
|
|
9750
|
-
description: "Number of rows to span
|
|
9833
|
+
description: "Number of rows to span.\n\nFor nodes inside a grid container. Defaults to `1`. Supported by FrameNode, TextNode.",
|
|
9751
9834
|
optional: false
|
|
9752
9835
|
}
|
|
9753
9836
|
]
|
|
@@ -9782,7 +9865,7 @@ var types = {
|
|
|
9782
9865
|
{
|
|
9783
9866
|
name: "imageRendering",
|
|
9784
9867
|
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.',
|
|
9868
|
+
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
9869
|
optional: false
|
|
9787
9870
|
}
|
|
9788
9871
|
]
|
|
@@ -9824,7 +9907,7 @@ var types = {
|
|
|
9824
9907
|
{
|
|
9825
9908
|
name: "inlineTextStyle",
|
|
9826
9909
|
type: "(T extends TraitVariantData ? TextStyleData : TextStyle) | null",
|
|
9827
|
-
description: "Apply a text style preset
|
|
9910
|
+
description: "Apply a text style preset.\n\nSetting to `null` removes the text style. Supported by TextNode.",
|
|
9828
9911
|
optional: false
|
|
9829
9912
|
}
|
|
9830
9913
|
]
|
|
@@ -9858,19 +9941,19 @@ var types = {
|
|
|
9858
9941
|
{
|
|
9859
9942
|
name: "layout",
|
|
9860
9943
|
type: "LayoutType | null",
|
|
9861
|
-
description: "Enables stack or grid layout
|
|
9944
|
+
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
9945
|
optional: false
|
|
9863
9946
|
},
|
|
9864
9947
|
{
|
|
9865
9948
|
name: "gap",
|
|
9866
9949
|
type: "CSSDimension<CSSUnit.Pixel> | `${CSSDimension<CSSUnit.Pixel>} ${CSSDimension<CSSUnit.Pixel>}` | null",
|
|
9867
|
-
description: 'Spacing between items in a layout
|
|
9950
|
+
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
9951
|
optional: false
|
|
9869
9952
|
},
|
|
9870
9953
|
{
|
|
9871
9954
|
name: "padding",
|
|
9872
9955
|
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
|
|
9956
|
+
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
9957
|
optional: false
|
|
9875
9958
|
}
|
|
9876
9959
|
],
|
|
@@ -9885,13 +9968,13 @@ var types = {
|
|
|
9885
9968
|
{
|
|
9886
9969
|
name: "link",
|
|
9887
9970
|
type: "string | null",
|
|
9888
|
-
description: 'URL or internal page link
|
|
9971
|
+
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
9972
|
optional: false
|
|
9890
9973
|
},
|
|
9891
9974
|
{
|
|
9892
9975
|
name: "linkOpenInNewTab",
|
|
9893
9976
|
type: "boolean | null",
|
|
9894
|
-
description: "Whether to open the link in a new tab
|
|
9977
|
+
description: "Whether to open the link in a new tab.\n\nDefault is automatically determined based on link type.\nSupported by FrameNode, TextNode.",
|
|
9895
9978
|
optional: false
|
|
9896
9979
|
},
|
|
9897
9980
|
{
|
|
@@ -9957,7 +10040,7 @@ var types = {
|
|
|
9957
10040
|
{
|
|
9958
10041
|
name: "locked",
|
|
9959
10042
|
type: "boolean",
|
|
9960
|
-
description: "Whether the node is locked for editing
|
|
10043
|
+
description: "Whether the node is locked for editing.\n\nDefaults to `false`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
9961
10044
|
optional: false
|
|
9962
10045
|
}
|
|
9963
10046
|
]
|
|
@@ -9999,7 +10082,7 @@ var types = {
|
|
|
9999
10082
|
{
|
|
10000
10083
|
name: "name",
|
|
10001
10084
|
type: "string | null",
|
|
10002
|
-
description: "The name of the node displayed in the layers panel.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
10085
|
+
description: "The name of the node displayed in the layers panel.\n\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
10003
10086
|
optional: false
|
|
10004
10087
|
}
|
|
10005
10088
|
]
|
|
@@ -10083,7 +10166,7 @@ var types = {
|
|
|
10083
10166
|
{
|
|
10084
10167
|
name: "opacity",
|
|
10085
10168
|
type: "number",
|
|
10086
|
-
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque)
|
|
10169
|
+
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque).\n\nDefaults to `1`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
10087
10170
|
optional: false
|
|
10088
10171
|
}
|
|
10089
10172
|
]
|
|
@@ -10118,19 +10201,19 @@ var types = {
|
|
|
10118
10201
|
{
|
|
10119
10202
|
name: "overflow",
|
|
10120
10203
|
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.",
|
|
10204
|
+
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
10205
|
optional: false
|
|
10123
10206
|
},
|
|
10124
10207
|
{
|
|
10125
10208
|
name: "overflowX",
|
|
10126
10209
|
type: "AxisOverflow | null",
|
|
10127
|
-
description: "Controls horizontal overflow behavior.\nSetting to `null` removes the overflow X property. Supported by FrameNode, TextNode.",
|
|
10210
|
+
description: "Controls horizontal overflow behavior.\n\nSetting to `null` removes the overflow X property. Supported by FrameNode, TextNode.",
|
|
10128
10211
|
optional: false
|
|
10129
10212
|
},
|
|
10130
10213
|
{
|
|
10131
10214
|
name: "overflowY",
|
|
10132
10215
|
type: "AxisOverflow | null",
|
|
10133
|
-
description: "Controls vertical overflow behavior.\nSetting to `null` removes the overflow Y property. Supported by FrameNode, TextNode.",
|
|
10216
|
+
description: "Controls vertical overflow behavior.\n\nSetting to `null` removes the overflow Y property. Supported by FrameNode, TextNode.",
|
|
10134
10217
|
optional: false
|
|
10135
10218
|
}
|
|
10136
10219
|
]
|
|
@@ -10144,37 +10227,37 @@ var types = {
|
|
|
10144
10227
|
{
|
|
10145
10228
|
name: "top",
|
|
10146
10229
|
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.',
|
|
10230
|
+
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
10231
|
optional: false
|
|
10149
10232
|
},
|
|
10150
10233
|
{
|
|
10151
10234
|
name: "right",
|
|
10152
10235
|
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.',
|
|
10236
|
+
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
10237
|
optional: false
|
|
10155
10238
|
},
|
|
10156
10239
|
{
|
|
10157
10240
|
name: "bottom",
|
|
10158
10241
|
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.',
|
|
10242
|
+
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
10243
|
optional: false
|
|
10161
10244
|
},
|
|
10162
10245
|
{
|
|
10163
10246
|
name: "left",
|
|
10164
10247
|
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.',
|
|
10248
|
+
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
10249
|
optional: false
|
|
10167
10250
|
},
|
|
10168
10251
|
{
|
|
10169
10252
|
name: "centerX",
|
|
10170
10253
|
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.',
|
|
10254
|
+
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
10255
|
optional: false
|
|
10173
10256
|
},
|
|
10174
10257
|
{
|
|
10175
10258
|
name: "centerY",
|
|
10176
10259
|
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.',
|
|
10260
|
+
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
10261
|
optional: false
|
|
10179
10262
|
}
|
|
10180
10263
|
]
|
|
@@ -10202,7 +10285,7 @@ var types = {
|
|
|
10202
10285
|
{
|
|
10203
10286
|
name: "rotation",
|
|
10204
10287
|
type: "number",
|
|
10205
|
-
description: "Rotation angle in degrees
|
|
10288
|
+
description: "Rotation angle in degrees.\n\nDefaults to `0`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
10206
10289
|
optional: false
|
|
10207
10290
|
}
|
|
10208
10291
|
]
|
|
@@ -10248,13 +10331,13 @@ var types = {
|
|
|
10248
10331
|
{
|
|
10249
10332
|
name: "width",
|
|
10250
10333
|
type: "WidthLength | null",
|
|
10251
|
-
description: 'Width of the node
|
|
10334
|
+
description: 'Width of the node.\n\nAccepts pixel, percentage, fraction values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10252
10335
|
optional: false
|
|
10253
10336
|
},
|
|
10254
10337
|
{
|
|
10255
10338
|
name: "height",
|
|
10256
10339
|
type: "HeightLength | null",
|
|
10257
|
-
description: 'Height of the node
|
|
10340
|
+
description: 'Height of the node.\n\nAccepts pixel, percentage, fraction, viewport-height values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
10258
10341
|
optional: false
|
|
10259
10342
|
}
|
|
10260
10343
|
]
|
|
@@ -10324,7 +10407,7 @@ var types = {
|
|
|
10324
10407
|
{
|
|
10325
10408
|
name: "textTruncation",
|
|
10326
10409
|
type: "number | null",
|
|
10327
|
-
description: "Maximum number of lines
|
|
10410
|
+
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
10411
|
optional: false
|
|
10329
10412
|
}
|
|
10330
10413
|
]
|
|
@@ -10408,7 +10491,7 @@ var types = {
|
|
|
10408
10491
|
{
|
|
10409
10492
|
name: "visible",
|
|
10410
10493
|
type: "boolean",
|
|
10411
|
-
description: "Whether the node is visible on the canvas
|
|
10494
|
+
description: "Whether the node is visible on the canvas.\n\nDefaults to `true`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
10412
10495
|
optional: false
|
|
10413
10496
|
}
|
|
10414
10497
|
]
|
|
@@ -10422,7 +10505,7 @@ var types = {
|
|
|
10422
10505
|
{
|
|
10423
10506
|
name: "zIndex",
|
|
10424
10507
|
type: "number | null",
|
|
10425
|
-
description: "Stacking order of positioned elements
|
|
10508
|
+
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
10509
|
optional: false
|
|
10427
10510
|
}
|
|
10428
10511
|
]
|
|
@@ -10451,55 +10534,55 @@ var types = {
|
|
|
10451
10534
|
var classes = {
|
|
10452
10535
|
arrayfield: {
|
|
10453
10536
|
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
|
|
10537
|
+
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
10538
|
},
|
|
10456
10539
|
booleanfield: {
|
|
10457
10540
|
name: "BooleanField",
|
|
10458
|
-
description: "A CMS Collection field that stores a boolean (true or false) value
|
|
10541
|
+
description: "A CMS Collection field that stores a boolean (true or false) value.\n@category cms"
|
|
10459
10542
|
},
|
|
10460
10543
|
booleanvariable: {
|
|
10461
10544
|
name: "BooleanVariable",
|
|
10462
|
-
description: ""
|
|
10545
|
+
description: "A boolean variable.\n@category canvas"
|
|
10463
10546
|
},
|
|
10464
10547
|
bordervariable: {
|
|
10465
10548
|
name: "BorderVariable",
|
|
10466
|
-
description: ""
|
|
10549
|
+
description: "A border variable.\n@category canvas"
|
|
10467
10550
|
},
|
|
10468
10551
|
codefile: {
|
|
10469
10552
|
name: "CodeFile",
|
|
10470
|
-
description: "Represents a code file in the Framer project, such as a code component\nor code override
|
|
10553
|
+
description: "Represents a code file in the Framer project, such as a code component\nor code override.\n@category code-files"
|
|
10471
10554
|
},
|
|
10472
10555
|
codefileversion: {
|
|
10473
10556
|
name: "CodeFileVersion",
|
|
10474
|
-
description: "A saved version (snapshot) of a code file
|
|
10557
|
+
description: "A saved version (snapshot) of a code file.\n@category code-files"
|
|
10475
10558
|
},
|
|
10476
10559
|
collection: {
|
|
10477
10560
|
name: "Collection",
|
|
10478
|
-
description: "A CMS Collection in the project
|
|
10561
|
+
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
10562
|
},
|
|
10480
10563
|
collectionitem: {
|
|
10481
10564
|
name: "CollectionItem",
|
|
10482
|
-
description: "An item (row) in a CMS Collection
|
|
10565
|
+
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
10566
|
},
|
|
10484
10567
|
collectionreferencefield: {
|
|
10485
10568
|
name: "CollectionReferenceField",
|
|
10486
|
-
description: "A field that references an item in another collection
|
|
10569
|
+
description: "A field that references an item in another collection.\n@category cms"
|
|
10487
10570
|
},
|
|
10488
10571
|
colorfield: {
|
|
10489
10572
|
name: "ColorField",
|
|
10490
|
-
description: "A CMS Collection field that stores a color value (RGBA/HSL/HEX format)
|
|
10573
|
+
description: "A CMS Collection field that stores a color value (RGBA/HSL/HEX format).\n@category cms"
|
|
10491
10574
|
},
|
|
10492
10575
|
colorstyle: {
|
|
10493
10576
|
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
|
|
10577
|
+
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
10578
|
},
|
|
10496
10579
|
colorvariable: {
|
|
10497
10580
|
name: "ColorVariable",
|
|
10498
|
-
description: ""
|
|
10581
|
+
description: "A color variable.\n@category canvas"
|
|
10499
10582
|
},
|
|
10500
10583
|
componentinstancenode: {
|
|
10501
10584
|
name: "ComponentInstanceNode",
|
|
10502
|
-
description: "An instance of a code or design component on the canvas
|
|
10585
|
+
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
10586
|
},
|
|
10504
10587
|
componentinstanceplaceholder: {
|
|
10505
10588
|
name: "ComponentInstancePlaceholder",
|
|
@@ -10507,35 +10590,35 @@ var classes = {
|
|
|
10507
10590
|
},
|
|
10508
10591
|
componentnode: {
|
|
10509
10592
|
name: "ComponentNode",
|
|
10510
|
-
description: "A reusable design component definition
|
|
10593
|
+
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
10594
|
},
|
|
10512
10595
|
conicgradient: {
|
|
10513
10596
|
name: "ConicGradient",
|
|
10514
|
-
description: ""
|
|
10597
|
+
description: "A conic (angular) gradient with two or more color stops.\n@category canvas"
|
|
10515
10598
|
},
|
|
10516
10599
|
datefield: {
|
|
10517
10600
|
name: "DateField",
|
|
10518
|
-
description: "A CMS Collection field that stores a date in UTC format. Optionally displays time
|
|
10601
|
+
description: "A CMS Collection field that stores a date in UTC format. Optionally displays time.\n@category cms"
|
|
10519
10602
|
},
|
|
10520
10603
|
datevariable: {
|
|
10521
10604
|
name: "DateVariable",
|
|
10522
|
-
description: ""
|
|
10605
|
+
description: "A date variable.\n@category canvas"
|
|
10523
10606
|
},
|
|
10524
10607
|
designpagenode: {
|
|
10525
10608
|
name: "DesignPageNode",
|
|
10526
|
-
description: "A design page (non-web canvas) in the project
|
|
10609
|
+
description: "A design page (non-web canvas) in the project.\n@category canvas"
|
|
10527
10610
|
},
|
|
10528
10611
|
enumcase: {
|
|
10529
10612
|
name: "EnumCase",
|
|
10530
|
-
description: "An individual case (option) within an Enum Field or Enum Variable
|
|
10613
|
+
description: "An individual case (option) within an Enum Field or Enum Variable.\n@category cms"
|
|
10531
10614
|
},
|
|
10532
10615
|
enumfield: {
|
|
10533
10616
|
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
|
|
10617
|
+
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
10618
|
},
|
|
10536
10619
|
enumvariable: {
|
|
10537
10620
|
name: "EnumVariable",
|
|
10538
|
-
description: ""
|
|
10621
|
+
description: "An enum variable with a fixed set of cases.\n@category canvas"
|
|
10539
10622
|
},
|
|
10540
10623
|
fieldbasewithrequired: {
|
|
10541
10624
|
name: "FieldBaseWithRequired",
|
|
@@ -10543,35 +10626,35 @@ var classes = {
|
|
|
10543
10626
|
},
|
|
10544
10627
|
fielddivider: {
|
|
10545
10628
|
name: "FieldDivider",
|
|
10546
|
-
description: "A visual divider between fields in the CMS UI. Not a data field
|
|
10629
|
+
description: "A visual divider between fields in the CMS UI. Not a data field.\n@category cms"
|
|
10547
10630
|
},
|
|
10548
10631
|
fileasset: {
|
|
10549
10632
|
name: "FileAsset",
|
|
10550
|
-
description: "A file asset uploaded to the Framer project
|
|
10633
|
+
description: "A file asset uploaded to the Framer project.\n@category canvas"
|
|
10551
10634
|
},
|
|
10552
10635
|
filefield: {
|
|
10553
10636
|
name: "FileField",
|
|
10554
|
-
description: "A CMS Collection field that stores a file asset (`FileAsset`)
|
|
10637
|
+
description: "A CMS Collection field that stores a file asset (`FileAsset`).\n@category cms"
|
|
10555
10638
|
},
|
|
10556
10639
|
filevariable: {
|
|
10557
10640
|
name: "FileVariable",
|
|
10558
|
-
description: ""
|
|
10641
|
+
description: "A file variable.\n@category canvas"
|
|
10559
10642
|
},
|
|
10560
10643
|
font: {
|
|
10561
10644
|
name: "Font",
|
|
10562
|
-
description: "A font available in the project, including custom uploaded fonts
|
|
10645
|
+
description: "A font available in the project, including custom uploaded fonts.\n@category canvas"
|
|
10563
10646
|
},
|
|
10564
10647
|
formattedtextfield: {
|
|
10565
10648
|
name: "FormattedTextField",
|
|
10566
|
-
description: "A CMS Collection field that stores HTML-formatted text content (H1-H6, P, and other standard content elements)
|
|
10649
|
+
description: "A CMS Collection field that stores HTML-formatted text content (H1-H6, P, and other standard content elements).\n@category cms"
|
|
10567
10650
|
},
|
|
10568
10651
|
formattedtextvariable: {
|
|
10569
10652
|
name: "FormattedTextVariable",
|
|
10570
|
-
description: ""
|
|
10653
|
+
description: "A formatted text (rich text) variable.\n@category canvas"
|
|
10571
10654
|
},
|
|
10572
10655
|
framenode: {
|
|
10573
10656
|
name: "FrameNode",
|
|
10574
|
-
description: "A frame layer on the canvas, the most common container node
|
|
10657
|
+
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
10658
|
},
|
|
10576
10659
|
framer: {
|
|
10577
10660
|
name: "framer",
|
|
@@ -10591,43 +10674,43 @@ var classes = {
|
|
|
10591
10674
|
},
|
|
10592
10675
|
imageasset: {
|
|
10593
10676
|
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
|
|
10677
|
+
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
10678
|
},
|
|
10596
10679
|
imagefield: {
|
|
10597
10680
|
name: "ImageField",
|
|
10598
|
-
description: "A CMS Collection field that stores an image asset (`ImageAsset`)
|
|
10681
|
+
description: "A CMS Collection field that stores an image asset (`ImageAsset`).\n@category cms"
|
|
10599
10682
|
},
|
|
10600
10683
|
imagevariable: {
|
|
10601
10684
|
name: "ImageVariable",
|
|
10602
|
-
description: ""
|
|
10685
|
+
description: "An image variable.\n@category canvas"
|
|
10603
10686
|
},
|
|
10604
10687
|
lineargradient: {
|
|
10605
10688
|
name: "LinearGradient",
|
|
10606
|
-
description: ""
|
|
10689
|
+
description: "A linear gradient with two or more color stops.\n@category canvas"
|
|
10607
10690
|
},
|
|
10608
10691
|
linkfield: {
|
|
10609
10692
|
name: "LinkField",
|
|
10610
|
-
description: "A CMS Collection field that stores a URL in string format
|
|
10693
|
+
description: "A CMS Collection field that stores a URL in string format.\n@category cms"
|
|
10611
10694
|
},
|
|
10612
10695
|
linkvariable: {
|
|
10613
10696
|
name: "LinkVariable",
|
|
10614
|
-
description: ""
|
|
10697
|
+
description: "A link variable.\n@category canvas"
|
|
10615
10698
|
},
|
|
10616
10699
|
managedcollection: {
|
|
10617
10700
|
name: "ManagedCollection",
|
|
10618
|
-
description: "A CMS Collection that is fully controlled by a plugin
|
|
10701
|
+
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
10702
|
},
|
|
10620
10703
|
multicollectionreferencefield: {
|
|
10621
10704
|
name: "MultiCollectionReferenceField",
|
|
10622
|
-
description: "A field that references multiple items in another collection
|
|
10705
|
+
description: "A field that references multiple items in another collection.\n@category cms"
|
|
10623
10706
|
},
|
|
10624
10707
|
numberfield: {
|
|
10625
10708
|
name: "NumberField",
|
|
10626
|
-
description: "A CMS Collection field that stores a numeric value
|
|
10709
|
+
description: "A CMS Collection field that stores a numeric value.\n@category cms"
|
|
10627
10710
|
},
|
|
10628
10711
|
numbervariable: {
|
|
10629
10712
|
name: "NumberVariable",
|
|
10630
|
-
description: ""
|
|
10713
|
+
description: "A number variable.\n@category canvas"
|
|
10631
10714
|
},
|
|
10632
10715
|
pluginengine: {
|
|
10633
10716
|
name: "PluginEngine",
|
|
@@ -10635,31 +10718,31 @@ var classes = {
|
|
|
10635
10718
|
},
|
|
10636
10719
|
radialgradient: {
|
|
10637
10720
|
name: "RadialGradient",
|
|
10638
|
-
description: ""
|
|
10721
|
+
description: "A radial gradient with two or more color stops.\n@category canvas"
|
|
10639
10722
|
},
|
|
10640
10723
|
redirect: {
|
|
10641
10724
|
name: "Redirect",
|
|
10642
|
-
description: "A URL redirect configured in the project. Redirects are applied when\nthe site is published
|
|
10725
|
+
description: "A URL redirect configured in the project. Redirects are applied when\nthe site is published.\n@category settings"
|
|
10643
10726
|
},
|
|
10644
10727
|
stringfield: {
|
|
10645
10728
|
name: "StringField",
|
|
10646
|
-
description: "A CMS Collection field that stores a text string value
|
|
10729
|
+
description: "A CMS Collection field that stores a text string value.\n@category cms"
|
|
10647
10730
|
},
|
|
10648
10731
|
stringvariable: {
|
|
10649
10732
|
name: "StringVariable",
|
|
10650
|
-
description: ""
|
|
10733
|
+
description: "A string variable.\n@category canvas"
|
|
10651
10734
|
},
|
|
10652
10735
|
svgnode: {
|
|
10653
10736
|
name: "SVGNode",
|
|
10654
|
-
description: "An SVG graphic layer on the canvas
|
|
10737
|
+
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
10738
|
},
|
|
10656
10739
|
textnode: {
|
|
10657
10740
|
name: "TextNode",
|
|
10658
|
-
description: 'A text layer on the canvas
|
|
10741
|
+
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
10742
|
},
|
|
10660
10743
|
textstyle: {
|
|
10661
10744
|
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
|
|
10745
|
+
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
10746
|
},
|
|
10664
10747
|
unknownnode: {
|
|
10665
10748
|
name: "UnknownNode",
|
|
@@ -10667,15 +10750,15 @@ var classes = {
|
|
|
10667
10750
|
},
|
|
10668
10751
|
unsupportedcomputedvalue: {
|
|
10669
10752
|
name: "UnsupportedComputedValue",
|
|
10670
|
-
description: ""
|
|
10753
|
+
description: "A computed value type not yet supported by the plugin API.\n@category canvas"
|
|
10671
10754
|
},
|
|
10672
10755
|
unsupportedfield: {
|
|
10673
10756
|
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
|
|
10757
|
+
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
10758
|
},
|
|
10676
10759
|
unsupportedvariable: {
|
|
10677
10760
|
name: "UnsupportedVariable",
|
|
10678
|
-
description: ""
|
|
10761
|
+
description: "A variable type not yet supported by the plugin API.\n@category canvas"
|
|
10679
10762
|
},
|
|
10680
10763
|
vectorset: {
|
|
10681
10764
|
name: "VectorSet",
|
|
@@ -10687,15 +10770,15 @@ var classes = {
|
|
|
10687
10770
|
},
|
|
10688
10771
|
vectorsetitemnode: {
|
|
10689
10772
|
name: "VectorSetItemNode",
|
|
10690
|
-
description: "An individual item within a VectorSet node
|
|
10773
|
+
description: "An individual item within a VectorSet node.\n@category canvas"
|
|
10691
10774
|
},
|
|
10692
10775
|
vectorsetnode: {
|
|
10693
10776
|
name: "VectorSetNode",
|
|
10694
|
-
description: "A container node for a set of vector icons
|
|
10777
|
+
description: "A container node for a set of vector icons.\n@category canvas"
|
|
10695
10778
|
},
|
|
10696
10779
|
webpagenode: {
|
|
10697
10780
|
name: "WebPageNode",
|
|
10698
|
-
description: "A web page in the project's site map
|
|
10781
|
+
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
10782
|
}
|
|
10700
10783
|
};
|
|
10701
10784
|
var methodsByCategory = {
|
|
@@ -10940,7 +11023,7 @@ var methodsByCategory = {
|
|
|
10940
11023
|
name: "addFields",
|
|
10941
11024
|
category: "Collection",
|
|
10942
11025
|
signature: "addFields(fields: CreateField[]): Promise<Field[]>",
|
|
10943
|
-
description: 'Create new unmanaged Collection fields
|
|
11026
|
+
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
11027
|
references: ["CreateField", "Field"]
|
|
10945
11028
|
},
|
|
10946
11029
|
{
|
|
@@ -10961,7 +11044,7 @@ var methodsByCategory = {
|
|
|
10961
11044
|
name: "getItems",
|
|
10962
11045
|
category: "Collection",
|
|
10963
11046
|
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```",
|
|
11047
|
+
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
11048
|
references: ["CollectionItem"]
|
|
10966
11049
|
},
|
|
10967
11050
|
{
|
|
@@ -10989,7 +11072,7 @@ var methodsByCategory = {
|
|
|
10989
11072
|
name: "navigateTo",
|
|
10990
11073
|
category: "Collection",
|
|
10991
11074
|
signature: "navigateTo(opts?: NavigableOptions): Promise<void>",
|
|
10992
|
-
description: "Navigate to this collection
|
|
11075
|
+
description: "Navigate to this collection.\n\nMay switch modes to reveal the relevant view.",
|
|
10993
11076
|
references: ["NavigableOptions"]
|
|
10994
11077
|
},
|
|
10995
11078
|
{
|
|
@@ -11017,14 +11100,14 @@ var methodsByCategory = {
|
|
|
11017
11100
|
name: "setFieldOrder",
|
|
11018
11101
|
category: "Collection",
|
|
11019
11102
|
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```',
|
|
11103
|
+
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
11104
|
references: []
|
|
11022
11105
|
},
|
|
11023
11106
|
{
|
|
11024
11107
|
name: "setItemOrder",
|
|
11025
11108
|
category: "Collection",
|
|
11026
11109
|
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```',
|
|
11110
|
+
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
11111
|
references: []
|
|
11029
11112
|
},
|
|
11030
11113
|
{
|
|
@@ -11061,7 +11144,7 @@ var methodsByCategory = {
|
|
|
11061
11144
|
name: "fieldData",
|
|
11062
11145
|
category: "CollectionItem",
|
|
11063
11146
|
signature: "fieldData: Readonly<FieldData>",
|
|
11064
|
-
description: 'The fields and corresponding values of this Collection item
|
|
11147
|
+
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
11148
|
references: ["FieldData"]
|
|
11066
11149
|
},
|
|
11067
11150
|
{
|
|
@@ -11288,28 +11371,28 @@ var methodsByCategory = {
|
|
|
11288
11371
|
name: "aspectRatio",
|
|
11289
11372
|
category: "ComponentInstanceNode",
|
|
11290
11373
|
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.",
|
|
11374
|
+
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
11375
|
references: []
|
|
11293
11376
|
},
|
|
11294
11377
|
{
|
|
11295
11378
|
name: "bottom",
|
|
11296
11379
|
category: "ComponentInstanceNode",
|
|
11297
11380
|
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.',
|
|
11381
|
+
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
11382
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
11300
11383
|
},
|
|
11301
11384
|
{
|
|
11302
11385
|
name: "centerX",
|
|
11303
11386
|
category: "ComponentInstanceNode",
|
|
11304
11387
|
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.',
|
|
11388
|
+
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
11389
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
11307
11390
|
},
|
|
11308
11391
|
{
|
|
11309
11392
|
name: "centerY",
|
|
11310
11393
|
category: "ComponentInstanceNode",
|
|
11311
11394
|
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.',
|
|
11395
|
+
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
11396
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
11314
11397
|
},
|
|
11315
11398
|
{
|
|
@@ -11351,7 +11434,7 @@ var methodsByCategory = {
|
|
|
11351
11434
|
name: "getNodesWithAttribute",
|
|
11352
11435
|
category: "ComponentInstanceNode",
|
|
11353
11436
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
11354
|
-
description: 'Get the descendants of this node that support `attribute
|
|
11437
|
+
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
11438
|
references: ["T", "Node"]
|
|
11356
11439
|
},
|
|
11357
11440
|
{
|
|
@@ -11365,7 +11448,7 @@ var methodsByCategory = {
|
|
|
11365
11448
|
name: "getNodesWithType",
|
|
11366
11449
|
category: "ComponentInstanceNode",
|
|
11367
11450
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
11368
|
-
description: 'Get descendants of this node that match the given type
|
|
11451
|
+
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
11452
|
references: ["FrameNode"]
|
|
11370
11453
|
},
|
|
11371
11454
|
{
|
|
@@ -11379,7 +11462,7 @@ var methodsByCategory = {
|
|
|
11379
11462
|
name: "getPluginData",
|
|
11380
11463
|
category: "ComponentInstanceNode",
|
|
11381
11464
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
11382
|
-
description: "Get plugin data by key
|
|
11465
|
+
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
11466
|
references: []
|
|
11384
11467
|
},
|
|
11385
11468
|
{
|
|
@@ -11407,21 +11490,21 @@ var methodsByCategory = {
|
|
|
11407
11490
|
name: "height",
|
|
11408
11491
|
category: "ComponentInstanceNode",
|
|
11409
11492
|
signature: "height: HeightLength | null",
|
|
11410
|
-
description: 'Height of the node
|
|
11493
|
+
description: 'Height of the node.\n\nAccepts pixel, percentage, fraction, viewport-height values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11411
11494
|
references: ["HeightLength"]
|
|
11412
11495
|
},
|
|
11413
11496
|
{
|
|
11414
11497
|
name: "left",
|
|
11415
11498
|
category: "ComponentInstanceNode",
|
|
11416
11499
|
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.',
|
|
11500
|
+
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
11501
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
11419
11502
|
},
|
|
11420
11503
|
{
|
|
11421
11504
|
name: "locked",
|
|
11422
11505
|
category: "ComponentInstanceNode",
|
|
11423
11506
|
signature: "locked: boolean",
|
|
11424
|
-
description: "Whether the node is locked for editing
|
|
11507
|
+
description: "Whether the node is locked for editing.\n\nDefaults to `false`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
11425
11508
|
references: []
|
|
11426
11509
|
},
|
|
11427
11510
|
{
|
|
@@ -11456,21 +11539,21 @@ var methodsByCategory = {
|
|
|
11456
11539
|
name: "name",
|
|
11457
11540
|
category: "ComponentInstanceNode",
|
|
11458
11541
|
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.",
|
|
11542
|
+
description: "The name of the node displayed in the layers panel.\n\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
11460
11543
|
references: []
|
|
11461
11544
|
},
|
|
11462
11545
|
{
|
|
11463
11546
|
name: "navigateTo",
|
|
11464
11547
|
category: "ComponentInstanceNode",
|
|
11465
11548
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
11466
|
-
description: "Navigate to this node
|
|
11549
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
11467
11550
|
references: ["NavigableOptions"]
|
|
11468
11551
|
},
|
|
11469
11552
|
{
|
|
11470
11553
|
name: "opacity",
|
|
11471
11554
|
category: "ComponentInstanceNode",
|
|
11472
11555
|
signature: "opacity: number",
|
|
11473
|
-
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque)
|
|
11556
|
+
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque).\n\nDefaults to `1`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
11474
11557
|
references: []
|
|
11475
11558
|
},
|
|
11476
11559
|
{
|
|
@@ -11491,14 +11574,14 @@ var methodsByCategory = {
|
|
|
11491
11574
|
name: "right",
|
|
11492
11575
|
category: "ComponentInstanceNode",
|
|
11493
11576
|
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.',
|
|
11577
|
+
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
11578
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
11496
11579
|
},
|
|
11497
11580
|
{
|
|
11498
11581
|
name: "rotation",
|
|
11499
11582
|
category: "ComponentInstanceNode",
|
|
11500
11583
|
signature: "rotation: number",
|
|
11501
|
-
description: "Rotation angle in degrees
|
|
11584
|
+
description: "Rotation angle in degrees.\n\nDefaults to `0`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
11502
11585
|
references: []
|
|
11503
11586
|
},
|
|
11504
11587
|
{
|
|
@@ -11512,21 +11595,21 @@ var methodsByCategory = {
|
|
|
11512
11595
|
name: "setAttributes",
|
|
11513
11596
|
category: "ComponentInstanceNode",
|
|
11514
11597
|
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
|
|
11598
|
+
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
11599
|
references: []
|
|
11517
11600
|
},
|
|
11518
11601
|
{
|
|
11519
11602
|
name: "setPluginData",
|
|
11520
11603
|
category: "ComponentInstanceNode",
|
|
11521
11604
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
11522
|
-
description: 'Set plugin data by key
|
|
11605
|
+
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
11606
|
references: []
|
|
11524
11607
|
},
|
|
11525
11608
|
{
|
|
11526
11609
|
name: "top",
|
|
11527
11610
|
category: "ComponentInstanceNode",
|
|
11528
11611
|
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.',
|
|
11612
|
+
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
11613
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
11531
11614
|
},
|
|
11532
11615
|
{
|
|
@@ -11540,21 +11623,21 @@ var methodsByCategory = {
|
|
|
11540
11623
|
name: "visible",
|
|
11541
11624
|
category: "ComponentInstanceNode",
|
|
11542
11625
|
signature: "visible: boolean",
|
|
11543
|
-
description: "Whether the node is visible on the canvas
|
|
11626
|
+
description: "Whether the node is visible on the canvas.\n\nDefaults to `true`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
11544
11627
|
references: []
|
|
11545
11628
|
},
|
|
11546
11629
|
{
|
|
11547
11630
|
name: "walk",
|
|
11548
11631
|
category: "ComponentInstanceNode",
|
|
11549
11632
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
11550
|
-
description: "Walk this node and its descendants recursively
|
|
11633
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
11551
11634
|
references: ["AnyNode"]
|
|
11552
11635
|
},
|
|
11553
11636
|
{
|
|
11554
11637
|
name: "width",
|
|
11555
11638
|
category: "ComponentInstanceNode",
|
|
11556
11639
|
signature: "width: WidthLength | null",
|
|
11557
|
-
description: 'Width of the node
|
|
11640
|
+
description: 'Width of the node.\n\nAccepts pixel, percentage, fraction values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
11558
11641
|
references: ["WidthLength"]
|
|
11559
11642
|
},
|
|
11560
11643
|
{
|
|
@@ -11623,7 +11706,7 @@ var methodsByCategory = {
|
|
|
11623
11706
|
name: "getNodesWithAttribute",
|
|
11624
11707
|
category: "ComponentNode",
|
|
11625
11708
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
11626
|
-
description: 'Get the descendants of this node that support `attribute
|
|
11709
|
+
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
11710
|
references: ["T", "Node"]
|
|
11628
11711
|
},
|
|
11629
11712
|
{
|
|
@@ -11637,7 +11720,7 @@ var methodsByCategory = {
|
|
|
11637
11720
|
name: "getNodesWithType",
|
|
11638
11721
|
category: "ComponentNode",
|
|
11639
11722
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
11640
|
-
description: 'Get descendants of this node that match the given type
|
|
11723
|
+
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
11724
|
references: ["FrameNode"]
|
|
11642
11725
|
},
|
|
11643
11726
|
{
|
|
@@ -11651,7 +11734,7 @@ var methodsByCategory = {
|
|
|
11651
11734
|
name: "getPluginData",
|
|
11652
11735
|
category: "ComponentNode",
|
|
11653
11736
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
11654
|
-
description: "Get plugin data by key
|
|
11737
|
+
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
11738
|
references: []
|
|
11656
11739
|
},
|
|
11657
11740
|
{
|
|
@@ -11679,7 +11762,7 @@ var methodsByCategory = {
|
|
|
11679
11762
|
name: "navigateTo",
|
|
11680
11763
|
category: "ComponentNode",
|
|
11681
11764
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
11682
|
-
description: "Navigate to this node
|
|
11765
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
11683
11766
|
references: ["NavigableOptions"]
|
|
11684
11767
|
},
|
|
11685
11768
|
{
|
|
@@ -11707,14 +11790,14 @@ var methodsByCategory = {
|
|
|
11707
11790
|
name: "setAttributes",
|
|
11708
11791
|
category: "ComponentNode",
|
|
11709
11792
|
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
|
|
11793
|
+
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
11794
|
references: []
|
|
11712
11795
|
},
|
|
11713
11796
|
{
|
|
11714
11797
|
name: "setPluginData",
|
|
11715
11798
|
category: "ComponentNode",
|
|
11716
11799
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
11717
|
-
description: 'Set plugin data by key
|
|
11800
|
+
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
11801
|
references: []
|
|
11719
11802
|
},
|
|
11720
11803
|
{
|
|
@@ -11728,7 +11811,7 @@ var methodsByCategory = {
|
|
|
11728
11811
|
name: "walk",
|
|
11729
11812
|
category: "ComponentNode",
|
|
11730
11813
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
11731
|
-
description: "Walk this node and its descendants recursively
|
|
11814
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
11732
11815
|
references: ["AnyNode"]
|
|
11733
11816
|
},
|
|
11734
11817
|
{
|
|
@@ -11848,7 +11931,7 @@ var methodsByCategory = {
|
|
|
11848
11931
|
name: "getNodesWithAttribute",
|
|
11849
11932
|
category: "DesignPageNode",
|
|
11850
11933
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
11851
|
-
description: 'Get the descendants of this node that support `attribute
|
|
11934
|
+
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
11935
|
references: ["T", "Node"]
|
|
11853
11936
|
},
|
|
11854
11937
|
{
|
|
@@ -11862,7 +11945,7 @@ var methodsByCategory = {
|
|
|
11862
11945
|
name: "getNodesWithType",
|
|
11863
11946
|
category: "DesignPageNode",
|
|
11864
11947
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
11865
|
-
description: 'Get descendants of this node that match the given type
|
|
11948
|
+
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
11949
|
references: ["FrameNode"]
|
|
11867
11950
|
},
|
|
11868
11951
|
{
|
|
@@ -11876,7 +11959,7 @@ var methodsByCategory = {
|
|
|
11876
11959
|
name: "getPluginData",
|
|
11877
11960
|
category: "DesignPageNode",
|
|
11878
11961
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
11879
|
-
description: "Get plugin data by key
|
|
11962
|
+
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
11963
|
references: []
|
|
11881
11964
|
},
|
|
11882
11965
|
{
|
|
@@ -11897,7 +11980,7 @@ var methodsByCategory = {
|
|
|
11897
11980
|
name: "navigateTo",
|
|
11898
11981
|
category: "DesignPageNode",
|
|
11899
11982
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
11900
|
-
description: "Navigate to this node
|
|
11983
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
11901
11984
|
references: ["NavigableOptions"]
|
|
11902
11985
|
},
|
|
11903
11986
|
{
|
|
@@ -11918,21 +12001,21 @@ var methodsByCategory = {
|
|
|
11918
12001
|
name: "setAttributes",
|
|
11919
12002
|
category: "DesignPageNode",
|
|
11920
12003
|
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
|
|
12004
|
+
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
12005
|
references: []
|
|
11923
12006
|
},
|
|
11924
12007
|
{
|
|
11925
12008
|
name: "setPluginData",
|
|
11926
12009
|
category: "DesignPageNode",
|
|
11927
12010
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
11928
|
-
description: 'Set plugin data by key
|
|
12011
|
+
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
12012
|
references: []
|
|
11930
12013
|
},
|
|
11931
12014
|
{
|
|
11932
12015
|
name: "walk",
|
|
11933
12016
|
category: "DesignPageNode",
|
|
11934
12017
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
11935
|
-
description: "Walk this node and its descendants recursively
|
|
12018
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
11936
12019
|
references: ["AnyNode"]
|
|
11937
12020
|
},
|
|
11938
12021
|
{
|
|
@@ -12285,14 +12368,14 @@ var methodsByCategory = {
|
|
|
12285
12368
|
name: "aspectRatio",
|
|
12286
12369
|
category: "FrameNode",
|
|
12287
12370
|
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.",
|
|
12371
|
+
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
12372
|
references: []
|
|
12290
12373
|
},
|
|
12291
12374
|
{
|
|
12292
12375
|
name: "backgroundColor",
|
|
12293
12376
|
category: "FrameNode",
|
|
12294
12377
|
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.",
|
|
12378
|
+
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
12379
|
references: ["ColorStyle"]
|
|
12297
12380
|
},
|
|
12298
12381
|
{
|
|
@@ -12313,35 +12396,35 @@ var methodsByCategory = {
|
|
|
12313
12396
|
name: "border",
|
|
12314
12397
|
category: "FrameNode",
|
|
12315
12398
|
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.',
|
|
12399
|
+
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
12400
|
references: ["Border"]
|
|
12318
12401
|
},
|
|
12319
12402
|
{
|
|
12320
12403
|
name: "borderRadius",
|
|
12321
12404
|
category: "FrameNode",
|
|
12322
12405
|
signature: "borderRadius: BorderRadius",
|
|
12323
|
-
description: 'Border radius for rounded corners
|
|
12406
|
+
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
12407
|
references: ["BorderRadius"]
|
|
12325
12408
|
},
|
|
12326
12409
|
{
|
|
12327
12410
|
name: "bottom",
|
|
12328
12411
|
category: "FrameNode",
|
|
12329
12412
|
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.',
|
|
12413
|
+
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
12414
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
12332
12415
|
},
|
|
12333
12416
|
{
|
|
12334
12417
|
name: "centerX",
|
|
12335
12418
|
category: "FrameNode",
|
|
12336
12419
|
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.',
|
|
12420
|
+
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
12421
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
12339
12422
|
},
|
|
12340
12423
|
{
|
|
12341
12424
|
name: "centerY",
|
|
12342
12425
|
category: "FrameNode",
|
|
12343
12426
|
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.',
|
|
12427
|
+
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
12428
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
12346
12429
|
},
|
|
12347
12430
|
{
|
|
@@ -12355,7 +12438,7 @@ var methodsByCategory = {
|
|
|
12355
12438
|
name: "gap",
|
|
12356
12439
|
category: "FrameNode",
|
|
12357
12440
|
signature: 'gap: WithLayoutTrait["gap"]',
|
|
12358
|
-
description: 'Spacing between items in a layout
|
|
12441
|
+
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
12442
|
references: []
|
|
12360
12443
|
},
|
|
12361
12444
|
{
|
|
@@ -12369,7 +12452,7 @@ var methodsByCategory = {
|
|
|
12369
12452
|
name: "getNodesWithAttribute",
|
|
12370
12453
|
category: "FrameNode",
|
|
12371
12454
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
12372
|
-
description: 'Get the descendants of this node that support `attribute
|
|
12455
|
+
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
12456
|
references: ["T", "Node"]
|
|
12374
12457
|
},
|
|
12375
12458
|
{
|
|
@@ -12383,7 +12466,7 @@ var methodsByCategory = {
|
|
|
12383
12466
|
name: "getNodesWithType",
|
|
12384
12467
|
category: "FrameNode",
|
|
12385
12468
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
12386
|
-
description: 'Get descendants of this node that match the given type
|
|
12469
|
+
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
12470
|
references: ["FrameNode"]
|
|
12388
12471
|
},
|
|
12389
12472
|
{
|
|
@@ -12397,7 +12480,7 @@ var methodsByCategory = {
|
|
|
12397
12480
|
name: "getPluginData",
|
|
12398
12481
|
category: "FrameNode",
|
|
12399
12482
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
12400
|
-
description: "Get plugin data by key
|
|
12483
|
+
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
12484
|
references: []
|
|
12402
12485
|
},
|
|
12403
12486
|
{
|
|
@@ -12453,42 +12536,42 @@ var methodsByCategory = {
|
|
|
12453
12536
|
name: "gridItemColumnSpan",
|
|
12454
12537
|
category: "FrameNode",
|
|
12455
12538
|
signature: 'gridItemColumnSpan: WithGridItemTrait["gridItemColumnSpan"]',
|
|
12456
|
-
description: 'Number of columns to span, or `"all"` for all columns
|
|
12539
|
+
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
12540
|
references: []
|
|
12458
12541
|
},
|
|
12459
12542
|
{
|
|
12460
12543
|
name: "gridItemFillCellHeight",
|
|
12461
12544
|
category: "FrameNode",
|
|
12462
12545
|
signature: 'gridItemFillCellHeight: WithGridItemTrait["gridItemFillCellHeight"]',
|
|
12463
|
-
description: "Whether to fill the grid cell height
|
|
12546
|
+
description: "Whether to fill the grid cell height.\n\nFor nodes inside a grid container. Defaults to `true`. Supported by FrameNode, TextNode.",
|
|
12464
12547
|
references: []
|
|
12465
12548
|
},
|
|
12466
12549
|
{
|
|
12467
12550
|
name: "gridItemFillCellWidth",
|
|
12468
12551
|
category: "FrameNode",
|
|
12469
12552
|
signature: 'gridItemFillCellWidth: WithGridItemTrait["gridItemFillCellWidth"]',
|
|
12470
|
-
description: "Whether to fill the grid cell width
|
|
12553
|
+
description: "Whether to fill the grid cell width.\n\nFor nodes inside a grid container. Defaults to `true`. Supported by FrameNode, TextNode.",
|
|
12471
12554
|
references: []
|
|
12472
12555
|
},
|
|
12473
12556
|
{
|
|
12474
12557
|
name: "gridItemHorizontalAlignment",
|
|
12475
12558
|
category: "FrameNode",
|
|
12476
12559
|
signature: 'gridItemHorizontalAlignment: WithGridItemTrait["gridItemHorizontalAlignment"]',
|
|
12477
|
-
description: 'Horizontal alignment within grid cell
|
|
12560
|
+
description: 'Horizontal alignment within grid cell.\n\nFor nodes inside a grid container. Defaults to `"center"`. Supported by FrameNode, TextNode.',
|
|
12478
12561
|
references: []
|
|
12479
12562
|
},
|
|
12480
12563
|
{
|
|
12481
12564
|
name: "gridItemRowSpan",
|
|
12482
12565
|
category: "FrameNode",
|
|
12483
12566
|
signature: 'gridItemRowSpan: WithGridItemTrait["gridItemRowSpan"]',
|
|
12484
|
-
description: "Number of rows to span
|
|
12567
|
+
description: "Number of rows to span.\n\nFor nodes inside a grid container. Defaults to `1`. Supported by FrameNode, TextNode.",
|
|
12485
12568
|
references: []
|
|
12486
12569
|
},
|
|
12487
12570
|
{
|
|
12488
12571
|
name: "gridItemVerticalAlignment",
|
|
12489
12572
|
category: "FrameNode",
|
|
12490
12573
|
signature: 'gridItemVerticalAlignment: WithGridItemTrait["gridItemVerticalAlignment"]',
|
|
12491
|
-
description: 'Vertical alignment within grid cell
|
|
12574
|
+
description: 'Vertical alignment within grid cell.\n\nFor nodes inside a grid container. Defaults to `"center"`. Supported by FrameNode, TextNode.',
|
|
12492
12575
|
references: []
|
|
12493
12576
|
},
|
|
12494
12577
|
{
|
|
@@ -12516,14 +12599,14 @@ var methodsByCategory = {
|
|
|
12516
12599
|
name: "height",
|
|
12517
12600
|
category: "FrameNode",
|
|
12518
12601
|
signature: "height: HeightLength | null",
|
|
12519
|
-
description: 'Height of the node
|
|
12602
|
+
description: 'Height of the node.\n\nAccepts pixel, percentage, fraction, viewport-height values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12520
12603
|
references: ["HeightLength"]
|
|
12521
12604
|
},
|
|
12522
12605
|
{
|
|
12523
12606
|
name: "imageRendering",
|
|
12524
12607
|
category: "FrameNode",
|
|
12525
12608
|
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.',
|
|
12609
|
+
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
12610
|
references: ["ImageRendering"]
|
|
12528
12611
|
},
|
|
12529
12612
|
{
|
|
@@ -12544,21 +12627,21 @@ var methodsByCategory = {
|
|
|
12544
12627
|
name: "layout",
|
|
12545
12628
|
category: "FrameNode",
|
|
12546
12629
|
signature: 'layout: WithLayoutTrait["layout"]',
|
|
12547
|
-
description: "Enables stack or grid layout
|
|
12630
|
+
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
12631
|
references: []
|
|
12549
12632
|
},
|
|
12550
12633
|
{
|
|
12551
12634
|
name: "left",
|
|
12552
12635
|
category: "FrameNode",
|
|
12553
12636
|
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.',
|
|
12637
|
+
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
12638
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
12556
12639
|
},
|
|
12557
12640
|
{
|
|
12558
12641
|
name: "link",
|
|
12559
12642
|
category: "FrameNode",
|
|
12560
12643
|
signature: 'link: WithLinkTrait["link"]',
|
|
12561
|
-
description: 'URL or internal page link
|
|
12644
|
+
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
12645
|
references: []
|
|
12563
12646
|
},
|
|
12564
12647
|
{
|
|
@@ -12572,7 +12655,7 @@ var methodsByCategory = {
|
|
|
12572
12655
|
name: "linkOpenInNewTab",
|
|
12573
12656
|
category: "FrameNode",
|
|
12574
12657
|
signature: 'linkOpenInNewTab: WithLinkTrait["linkOpenInNewTab"]',
|
|
12575
|
-
description: "Whether to open the link in a new tab
|
|
12658
|
+
description: "Whether to open the link in a new tab.\n\nDefault is automatically determined based on link type.\nSupported by FrameNode, TextNode.",
|
|
12576
12659
|
references: []
|
|
12577
12660
|
},
|
|
12578
12661
|
{
|
|
@@ -12600,7 +12683,7 @@ var methodsByCategory = {
|
|
|
12600
12683
|
name: "locked",
|
|
12601
12684
|
category: "FrameNode",
|
|
12602
12685
|
signature: "locked: boolean",
|
|
12603
|
-
description: "Whether the node is locked for editing
|
|
12686
|
+
description: "Whether the node is locked for editing.\n\nDefaults to `false`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
12604
12687
|
references: []
|
|
12605
12688
|
},
|
|
12606
12689
|
{
|
|
@@ -12635,49 +12718,49 @@ var methodsByCategory = {
|
|
|
12635
12718
|
name: "name",
|
|
12636
12719
|
category: "FrameNode",
|
|
12637
12720
|
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.",
|
|
12721
|
+
description: "The name of the node displayed in the layers panel.\n\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
12639
12722
|
references: []
|
|
12640
12723
|
},
|
|
12641
12724
|
{
|
|
12642
12725
|
name: "navigateTo",
|
|
12643
12726
|
category: "FrameNode",
|
|
12644
12727
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
12645
|
-
description: "Navigate to this node
|
|
12728
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
12646
12729
|
references: ["NavigableOptions"]
|
|
12647
12730
|
},
|
|
12648
12731
|
{
|
|
12649
12732
|
name: "opacity",
|
|
12650
12733
|
category: "FrameNode",
|
|
12651
12734
|
signature: "opacity: number",
|
|
12652
|
-
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque)
|
|
12735
|
+
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque).\n\nDefaults to `1`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
12653
12736
|
references: []
|
|
12654
12737
|
},
|
|
12655
12738
|
{
|
|
12656
12739
|
name: "overflow",
|
|
12657
12740
|
category: "FrameNode",
|
|
12658
12741
|
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.",
|
|
12742
|
+
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
12743
|
references: []
|
|
12661
12744
|
},
|
|
12662
12745
|
{
|
|
12663
12746
|
name: "overflowX",
|
|
12664
12747
|
category: "FrameNode",
|
|
12665
12748
|
signature: 'overflowX: WithOverflowTrait["overflowX"]',
|
|
12666
|
-
description: "Controls horizontal overflow behavior.\nSetting to `null` removes the overflow X property. Supported by FrameNode, TextNode.",
|
|
12749
|
+
description: "Controls horizontal overflow behavior.\n\nSetting to `null` removes the overflow X property. Supported by FrameNode, TextNode.",
|
|
12667
12750
|
references: []
|
|
12668
12751
|
},
|
|
12669
12752
|
{
|
|
12670
12753
|
name: "overflowY",
|
|
12671
12754
|
category: "FrameNode",
|
|
12672
12755
|
signature: 'overflowY: WithOverflowTrait["overflowY"]',
|
|
12673
|
-
description: "Controls vertical overflow behavior.\nSetting to `null` removes the overflow Y property. Supported by FrameNode, TextNode.",
|
|
12756
|
+
description: "Controls vertical overflow behavior.\n\nSetting to `null` removes the overflow Y property. Supported by FrameNode, TextNode.",
|
|
12674
12757
|
references: []
|
|
12675
12758
|
},
|
|
12676
12759
|
{
|
|
12677
12760
|
name: "padding",
|
|
12678
12761
|
category: "FrameNode",
|
|
12679
12762
|
signature: 'padding: WithLayoutTrait["padding"]',
|
|
12680
|
-
description: 'Inner spacing of a container with layout
|
|
12763
|
+
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
12764
|
references: []
|
|
12682
12765
|
},
|
|
12683
12766
|
{
|
|
@@ -12698,14 +12781,14 @@ var methodsByCategory = {
|
|
|
12698
12781
|
name: "right",
|
|
12699
12782
|
category: "FrameNode",
|
|
12700
12783
|
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.',
|
|
12784
|
+
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
12785
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
12703
12786
|
},
|
|
12704
12787
|
{
|
|
12705
12788
|
name: "rotation",
|
|
12706
12789
|
category: "FrameNode",
|
|
12707
12790
|
signature: "rotation: number",
|
|
12708
|
-
description: "Rotation angle in degrees
|
|
12791
|
+
description: "Rotation angle in degrees.\n\nDefaults to `0`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
12709
12792
|
references: []
|
|
12710
12793
|
},
|
|
12711
12794
|
{
|
|
@@ -12719,14 +12802,14 @@ var methodsByCategory = {
|
|
|
12719
12802
|
name: "setAttributes",
|
|
12720
12803
|
category: "FrameNode",
|
|
12721
12804
|
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
|
|
12805
|
+
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
12806
|
references: []
|
|
12724
12807
|
},
|
|
12725
12808
|
{
|
|
12726
12809
|
name: "setPluginData",
|
|
12727
12810
|
category: "FrameNode",
|
|
12728
12811
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
12729
|
-
description: 'Set plugin data by key
|
|
12812
|
+
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
12813
|
references: []
|
|
12731
12814
|
},
|
|
12732
12815
|
{
|
|
@@ -12761,35 +12844,35 @@ var methodsByCategory = {
|
|
|
12761
12844
|
name: "top",
|
|
12762
12845
|
category: "FrameNode",
|
|
12763
12846
|
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.',
|
|
12847
|
+
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
12848
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
12766
12849
|
},
|
|
12767
12850
|
{
|
|
12768
12851
|
name: "visible",
|
|
12769
12852
|
category: "FrameNode",
|
|
12770
12853
|
signature: "visible: boolean",
|
|
12771
|
-
description: "Whether the node is visible on the canvas
|
|
12854
|
+
description: "Whether the node is visible on the canvas.\n\nDefaults to `true`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
12772
12855
|
references: []
|
|
12773
12856
|
},
|
|
12774
12857
|
{
|
|
12775
12858
|
name: "walk",
|
|
12776
12859
|
category: "FrameNode",
|
|
12777
12860
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
12778
|
-
description: "Walk this node and its descendants recursively
|
|
12861
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
12779
12862
|
references: ["AnyNode"]
|
|
12780
12863
|
},
|
|
12781
12864
|
{
|
|
12782
12865
|
name: "width",
|
|
12783
12866
|
category: "FrameNode",
|
|
12784
12867
|
signature: "width: WidthLength | null",
|
|
12785
|
-
description: 'Width of the node
|
|
12868
|
+
description: 'Width of the node.\n\nAccepts pixel, percentage, fraction values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
12786
12869
|
references: ["WidthLength"]
|
|
12787
12870
|
},
|
|
12788
12871
|
{
|
|
12789
12872
|
name: "zIndex",
|
|
12790
12873
|
category: "FrameNode",
|
|
12791
12874
|
signature: 'zIndex: WithZIndexTrait["zIndex"]',
|
|
12792
|
-
description: "Stacking order of positioned elements
|
|
12875
|
+
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
12876
|
references: []
|
|
12794
12877
|
},
|
|
12795
12878
|
{
|
|
@@ -12829,6 +12912,13 @@ var methodsByCategory = {
|
|
|
12829
12912
|
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
12913
|
references: []
|
|
12831
12914
|
},
|
|
12915
|
+
{
|
|
12916
|
+
name: "[$framerApiOnly.reviewChangesForAgent]",
|
|
12917
|
+
category: "framer",
|
|
12918
|
+
signature: "[$framerApiOnly.reviewChangesForAgent](options?: { pagePath?: string; }): Promise<unknown>",
|
|
12919
|
+
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.",
|
|
12920
|
+
references: []
|
|
12921
|
+
},
|
|
12832
12922
|
{
|
|
12833
12923
|
name: "[$framerInternal.initialState]",
|
|
12834
12924
|
category: "framer",
|
|
@@ -12854,7 +12944,7 @@ var methodsByCategory = {
|
|
|
12854
12944
|
name: "addComponentInstance",
|
|
12855
12945
|
category: "framer",
|
|
12856
12946
|
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
|
|
12947
|
+
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
12948
|
references: ["AddComponentInstanceOptions", "ComponentInstanceNode"]
|
|
12859
12949
|
},
|
|
12860
12950
|
{
|
|
@@ -12871,42 +12961,42 @@ var methodsByCategory = {
|
|
|
12871
12961
|
name: "addDetachedComponentLayers",
|
|
12872
12962
|
category: "framer",
|
|
12873
12963
|
signature: "addDetachedComponentLayers({ url, layout, attributes }: AddDetachedComponentLayersOptions): Promise<FrameNode>",
|
|
12874
|
-
description: "Adds the layers of a component by module URL
|
|
12964
|
+
description: "Adds the layers of a component by module URL.\n@category canvas",
|
|
12875
12965
|
references: ["AddDetachedComponentLayersOptions", "FrameNode"]
|
|
12876
12966
|
},
|
|
12877
12967
|
{
|
|
12878
12968
|
name: "addImage",
|
|
12879
12969
|
category: "framer",
|
|
12880
12970
|
signature: "addImage(image: NamedImageAssetInput | File): Promise<void>",
|
|
12881
|
-
description: "Upload an image, and insert on the canvas
|
|
12971
|
+
description: "Upload an image, and insert on the canvas.\n@category canvas",
|
|
12882
12972
|
references: ["NamedImageAssetInput", "File"]
|
|
12883
12973
|
},
|
|
12884
12974
|
{
|
|
12885
12975
|
name: "addImages",
|
|
12886
12976
|
category: "framer",
|
|
12887
12977
|
signature: "addImages(images: readonly NamedImageAssetInput[]): Promise<void>",
|
|
12888
|
-
description: "Add multiple images, replacing the selected images, or insert on the canvas
|
|
12978
|
+
description: "Add multiple images, replacing the selected images, or insert on the canvas.\n@category canvas",
|
|
12889
12979
|
references: ["NamedImageAssetInput"]
|
|
12890
12980
|
},
|
|
12891
12981
|
{
|
|
12892
12982
|
name: "addRedirects",
|
|
12893
12983
|
category: "framer",
|
|
12894
12984
|
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
|
|
12985
|
+
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
12986
|
references: ["RedirectInput", "Redirect"]
|
|
12897
12987
|
},
|
|
12898
12988
|
{
|
|
12899
12989
|
name: "addSVG",
|
|
12900
12990
|
category: "framer",
|
|
12901
12991
|
signature: "addSVG(svg: SVGData): Promise<void>",
|
|
12902
|
-
description: "Add an SVG, replacing the selected SVG, or insert on the canvas
|
|
12992
|
+
description: "Add an SVG, replacing the selected SVG, or insert on the canvas.\n@category canvas",
|
|
12903
12993
|
references: ["SVGData"]
|
|
12904
12994
|
},
|
|
12905
12995
|
{
|
|
12906
12996
|
name: "addText",
|
|
12907
12997
|
category: "framer",
|
|
12908
12998
|
signature: "addText(text: string, options?: AddTextOptions): Promise<void>",
|
|
12909
|
-
description: "Add a new text node to the canvas
|
|
12999
|
+
description: "Add a new text node to the canvas.\n@category canvas",
|
|
12910
13000
|
references: ["AddTextOptions"]
|
|
12911
13001
|
},
|
|
12912
13002
|
{
|
|
@@ -12920,7 +13010,7 @@ var methodsByCategory = {
|
|
|
12920
13010
|
name: "cloneNode",
|
|
12921
13011
|
category: "framer",
|
|
12922
13012
|
signature: "cloneNode(nodeId: NodeId): Promise<AnyNode | null>",
|
|
12923
|
-
description: "Clone a node
|
|
13013
|
+
description: "Clone a node.\n@category canvas",
|
|
12924
13014
|
references: ["AnyNode"]
|
|
12925
13015
|
},
|
|
12926
13016
|
{
|
|
@@ -12937,21 +13027,21 @@ var methodsByCategory = {
|
|
|
12937
13027
|
name: "createCodeFile",
|
|
12938
13028
|
category: "framer",
|
|
12939
13029
|
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
|
|
13030
|
+
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
13031
|
references: ["CodeFile"]
|
|
12942
13032
|
},
|
|
12943
13033
|
{
|
|
12944
13034
|
name: "createCollection",
|
|
12945
13035
|
category: "framer",
|
|
12946
13036
|
signature: "createCollection(name: string): Promise<Collection>",
|
|
12947
|
-
description: "Create a new collection.\n\n@param name - The name to give the new collection
|
|
13037
|
+
description: "Create a new collection.\n\n@param name - The name to give the new collection.\n@category cms",
|
|
12948
13038
|
references: ["Collection"]
|
|
12949
13039
|
},
|
|
12950
13040
|
{
|
|
12951
13041
|
name: "createColorStyle",
|
|
12952
13042
|
category: "framer",
|
|
12953
13043
|
signature: "createColorStyle(attributes: ColorStyleAttributes): Promise<ColorStyle>",
|
|
12954
|
-
description: "Add a new color style to the project
|
|
13044
|
+
description: "Add a new color style to the project.\n@category canvas",
|
|
12955
13045
|
references: ["ColorStyleAttributes", "ColorStyle"]
|
|
12956
13046
|
},
|
|
12957
13047
|
{
|
|
@@ -12965,14 +13055,14 @@ var methodsByCategory = {
|
|
|
12965
13055
|
name: "createDesignPage",
|
|
12966
13056
|
category: "framer",
|
|
12967
13057
|
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
|
|
13058
|
+
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
13059
|
references: ["DesignPageNode"]
|
|
12970
13060
|
},
|
|
12971
13061
|
{
|
|
12972
13062
|
name: "createFrameNode",
|
|
12973
13063
|
category: "framer",
|
|
12974
13064
|
signature: "createFrameNode(attributes: Partial<EditableFrameNodeAttributes>, parentId?: string): Promise<FrameNode | null>",
|
|
12975
|
-
description: "Create a new node on the canvas
|
|
13065
|
+
description: "Create a new node on the canvas.\n@category canvas",
|
|
12976
13066
|
references: ["EditableFrameNodeAttributes", "FrameNode"]
|
|
12977
13067
|
},
|
|
12978
13068
|
{
|
|
@@ -12986,7 +13076,7 @@ var methodsByCategory = {
|
|
|
12986
13076
|
name: "createManagedCollection",
|
|
12987
13077
|
category: "framer",
|
|
12988
13078
|
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
|
|
13079
|
+
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
13080
|
references: ["ManagedCollection"]
|
|
12991
13081
|
},
|
|
12992
13082
|
{
|
|
@@ -13000,14 +13090,14 @@ var methodsByCategory = {
|
|
|
13000
13090
|
name: "createTextStyle",
|
|
13001
13091
|
category: "framer",
|
|
13002
13092
|
signature: "createTextStyle(attributes: TextStyleAttributes): Promise<TextStyle>",
|
|
13003
|
-
description: "Add a new text style to the project
|
|
13093
|
+
description: "Add a new text style to the project.\n@category canvas",
|
|
13004
13094
|
references: ["TextStyleAttributes", "TextStyle"]
|
|
13005
13095
|
},
|
|
13006
13096
|
{
|
|
13007
13097
|
name: "createWebPage",
|
|
13008
13098
|
category: "framer",
|
|
13009
13099
|
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
|
|
13100
|
+
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
13101
|
references: ["WebPageNode"]
|
|
13012
13102
|
},
|
|
13013
13103
|
{
|
|
@@ -13049,7 +13139,7 @@ var methodsByCategory = {
|
|
|
13049
13139
|
name: "getCanvasRoot",
|
|
13050
13140
|
category: "framer",
|
|
13051
13141
|
signature: "getCanvasRoot(): Promise<CanvasRootNode>",
|
|
13052
|
-
description: "Get the root of the current canvas
|
|
13142
|
+
description: "Get the root of the current canvas.\n@category canvas",
|
|
13053
13143
|
references: ["CanvasRootNode"]
|
|
13054
13144
|
},
|
|
13055
13145
|
{
|
|
@@ -13070,70 +13160,70 @@ var methodsByCategory = {
|
|
|
13070
13160
|
name: "getChildren",
|
|
13071
13161
|
category: "framer",
|
|
13072
13162
|
signature: "getChildren(nodeId: NodeId): Promise<CanvasNode[]>",
|
|
13073
|
-
description: "Get the children of a node
|
|
13163
|
+
description: "Get the children of a node.\n@category canvas",
|
|
13074
13164
|
references: ["CanvasNode"]
|
|
13075
13165
|
},
|
|
13076
13166
|
{
|
|
13077
13167
|
name: "getCodeFile",
|
|
13078
13168
|
category: "framer",
|
|
13079
13169
|
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
|
|
13170
|
+
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
13171
|
references: ["CodeFile"]
|
|
13082
13172
|
},
|
|
13083
13173
|
{
|
|
13084
13174
|
name: "getCodeFiles",
|
|
13085
13175
|
category: "framer",
|
|
13086
13176
|
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
|
|
13177
|
+
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
13178
|
references: ["CodeFile"]
|
|
13089
13179
|
},
|
|
13090
13180
|
{
|
|
13091
13181
|
name: "getCollection",
|
|
13092
13182
|
category: "framer",
|
|
13093
13183
|
signature: "getCollection(id: NodeId): Promise<Collection | null>",
|
|
13094
|
-
description: "Get a collection by its id
|
|
13184
|
+
description: "Get a collection by its id.\n@category cms",
|
|
13095
13185
|
references: ["Collection"]
|
|
13096
13186
|
},
|
|
13097
13187
|
{
|
|
13098
13188
|
name: "getCollections",
|
|
13099
13189
|
category: "framer",
|
|
13100
13190
|
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
|
|
13191
|
+
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
13192
|
references: ["Collection"]
|
|
13103
13193
|
},
|
|
13104
13194
|
{
|
|
13105
13195
|
name: "getColorStyle",
|
|
13106
13196
|
category: "framer",
|
|
13107
13197
|
signature: "getColorStyle(id: NodeId): Promise<ColorStyle | null>",
|
|
13108
|
-
description: "Get a specific color style
|
|
13198
|
+
description: "Get a specific color style.\n@category canvas",
|
|
13109
13199
|
references: ["ColorStyle"]
|
|
13110
13200
|
},
|
|
13111
13201
|
{
|
|
13112
13202
|
name: "getColorStyles",
|
|
13113
13203
|
category: "framer",
|
|
13114
13204
|
signature: "getColorStyles(): Promise<ColorStyle[]>",
|
|
13115
|
-
description: "Get all color styles in the project
|
|
13205
|
+
description: "Get all color styles in the project.\n@category canvas",
|
|
13116
13206
|
references: ["ColorStyle"]
|
|
13117
13207
|
},
|
|
13118
13208
|
{
|
|
13119
13209
|
name: "getCurrentUser",
|
|
13120
13210
|
category: "framer",
|
|
13121
13211
|
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
|
|
13212
|
+
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
13213
|
references: ["User"]
|
|
13124
13214
|
},
|
|
13125
13215
|
{
|
|
13126
13216
|
name: "getCustomCode",
|
|
13127
13217
|
category: "framer",
|
|
13128
13218
|
signature: "getCustomCode(): Promise<CustomCode>",
|
|
13129
|
-
description: "Get custom code settings set by the plugin
|
|
13219
|
+
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
13220
|
references: ["CustomCode"]
|
|
13131
13221
|
},
|
|
13132
13222
|
{
|
|
13133
13223
|
name: "getDefaultLocale",
|
|
13134
13224
|
category: "framer",
|
|
13135
13225
|
signature: "getDefaultLocale(): Promise<Locale>",
|
|
13136
|
-
description: "Get the default locale of the project.\n\n@example\n```ts\nconst defaultLocale = await framer.getDefaultLocale()\n
|
|
13226
|
+
description: "Get the default locale of the project.\n\n@example\n```ts\nconst defaultLocale = await framer.getDefaultLocale()\n```\n@category localization",
|
|
13137
13227
|
references: ["Locale"]
|
|
13138
13228
|
},
|
|
13139
13229
|
{
|
|
@@ -13147,21 +13237,21 @@ var methodsByCategory = {
|
|
|
13147
13237
|
name: "getFont",
|
|
13148
13238
|
category: "framer",
|
|
13149
13239
|
signature: "getFont(family: string, attributes?: FontAttributes): Promise<Font | null>",
|
|
13150
|
-
description: 'Get a specific font from a family by name
|
|
13240
|
+
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
13241
|
references: ["FontAttributes", "Font"]
|
|
13152
13242
|
},
|
|
13153
13243
|
{
|
|
13154
13244
|
name: "getFonts",
|
|
13155
13245
|
category: "framer",
|
|
13156
13246
|
signature: "getFonts(): Promise<Font[]>",
|
|
13157
|
-
description: "Get all available fonts
|
|
13247
|
+
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
13248
|
references: ["Font"]
|
|
13159
13249
|
},
|
|
13160
13250
|
{
|
|
13161
13251
|
name: "getImage",
|
|
13162
13252
|
category: "framer",
|
|
13163
13253
|
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
|
|
13254
|
+
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
13255
|
references: ["ImageAsset"]
|
|
13166
13256
|
},
|
|
13167
13257
|
{
|
|
@@ -13182,105 +13272,105 @@ var methodsByCategory = {
|
|
|
13182
13272
|
name: "getLocales",
|
|
13183
13273
|
category: "framer",
|
|
13184
13274
|
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
|
|
13275
|
+
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
13276
|
references: ["Locale"]
|
|
13187
13277
|
},
|
|
13188
13278
|
{
|
|
13189
13279
|
name: "getLocalizationGroups",
|
|
13190
13280
|
category: "framer",
|
|
13191
13281
|
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
|
|
13282
|
+
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
13283
|
references: ["GetLocalizationGroupsFilter", "LocalizationGroup"]
|
|
13194
13284
|
},
|
|
13195
13285
|
{
|
|
13196
13286
|
name: "getManagedCollections",
|
|
13197
13287
|
category: "framer",
|
|
13198
13288
|
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
|
|
13289
|
+
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
13290
|
references: ["ManagedCollection"]
|
|
13201
13291
|
},
|
|
13202
13292
|
{
|
|
13203
13293
|
name: "getNode",
|
|
13204
13294
|
category: "framer",
|
|
13205
13295
|
signature: "getNode(nodeId: NodeId): Promise<AnyNode | null>",
|
|
13206
|
-
description: "Get a node by its id
|
|
13296
|
+
description: "Get a node by its id.\n@category canvas",
|
|
13207
13297
|
references: ["AnyNode"]
|
|
13208
13298
|
},
|
|
13209
13299
|
{
|
|
13210
13300
|
name: "getNodesWithAttribute",
|
|
13211
13301
|
category: "framer",
|
|
13212
13302
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
13213
|
-
description: "Get all nodes with a certain attribute
|
|
13303
|
+
description: "Get all nodes with a certain attribute.\n@category canvas",
|
|
13214
13304
|
references: ["T", "Node"]
|
|
13215
13305
|
},
|
|
13216
13306
|
{
|
|
13217
13307
|
name: "getNodesWithAttributeSet",
|
|
13218
13308
|
category: "framer",
|
|
13219
13309
|
signature: "getNodesWithAttributeSet(attribute: T): Promise<Node[]>",
|
|
13220
|
-
description: "Get all nodes with a certain attribute which value is set
|
|
13310
|
+
description: "Get all nodes with a certain attribute which value is set.\n@category canvas",
|
|
13221
13311
|
references: ["T", "Node"]
|
|
13222
13312
|
},
|
|
13223
13313
|
{
|
|
13224
13314
|
name: "getNodesWithType",
|
|
13225
13315
|
category: "framer",
|
|
13226
13316
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
13227
|
-
description: "Get all nodes of a certain class
|
|
13317
|
+
description: "Get all nodes of a certain class.\n@category canvas",
|
|
13228
13318
|
references: ["FrameNode"]
|
|
13229
13319
|
},
|
|
13230
13320
|
{
|
|
13231
13321
|
name: "getParent",
|
|
13232
13322
|
category: "framer",
|
|
13233
13323
|
signature: "getParent(nodeId: NodeId): Promise<AnyNode | null>",
|
|
13234
|
-
description: "Get the parent of a node
|
|
13324
|
+
description: "Get the parent of a node.\n@category canvas",
|
|
13235
13325
|
references: ["AnyNode"]
|
|
13236
13326
|
},
|
|
13237
13327
|
{
|
|
13238
13328
|
name: "getProjectInfo",
|
|
13239
13329
|
category: "framer",
|
|
13240
13330
|
signature: "getProjectInfo(): Promise<ProjectInfo>",
|
|
13241
|
-
description: "Get the project info like name and id
|
|
13331
|
+
description: "Get the project info like name and id.\n@category settings",
|
|
13242
13332
|
references: ["ProjectInfo"]
|
|
13243
13333
|
},
|
|
13244
13334
|
{
|
|
13245
13335
|
name: "getPublishInfo",
|
|
13246
13336
|
category: "framer",
|
|
13247
13337
|
signature: "getPublishInfo(): Promise<PublishInfo>",
|
|
13248
|
-
description: "Get information about the published website
|
|
13338
|
+
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
13339
|
references: ["PublishInfo"]
|
|
13250
13340
|
},
|
|
13251
13341
|
{
|
|
13252
13342
|
name: "getRect",
|
|
13253
13343
|
category: "framer",
|
|
13254
13344
|
signature: "getRect(nodeId: NodeId): Promise<Rect$1 | null>",
|
|
13255
|
-
description: "Get the rect of a node",
|
|
13345
|
+
description: "Get the rect of a node\n@category canvas",
|
|
13256
13346
|
references: ["Rect$1"]
|
|
13257
13347
|
},
|
|
13258
13348
|
{
|
|
13259
13349
|
name: "getRedirects",
|
|
13260
13350
|
category: "framer",
|
|
13261
13351
|
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
|
|
13352
|
+
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
13353
|
references: ["Redirect"]
|
|
13264
13354
|
},
|
|
13265
13355
|
{
|
|
13266
13356
|
name: "getText",
|
|
13267
13357
|
category: "framer",
|
|
13268
13358
|
signature: "getText(): Promise<string | null>",
|
|
13269
|
-
description: "Get plaintext of the current selection or null if there is no text
|
|
13359
|
+
description: "Get plaintext of the current selection or null if there is no text.\n@category canvas",
|
|
13270
13360
|
references: []
|
|
13271
13361
|
},
|
|
13272
13362
|
{
|
|
13273
13363
|
name: "getTextStyle",
|
|
13274
13364
|
category: "framer",
|
|
13275
13365
|
signature: "getTextStyle(id: NodeId): Promise<TextStyle | null>",
|
|
13276
|
-
description: "Get a specific text style
|
|
13366
|
+
description: "Get a specific text style.\n@category canvas",
|
|
13277
13367
|
references: ["TextStyle"]
|
|
13278
13368
|
},
|
|
13279
13369
|
{
|
|
13280
13370
|
name: "getTextStyles",
|
|
13281
13371
|
category: "framer",
|
|
13282
13372
|
signature: "getTextStyles(): Promise<TextStyle[]>",
|
|
13283
|
-
description: "Get all text styles in the project
|
|
13373
|
+
description: "Get all text styles in the project.\n@category canvas",
|
|
13284
13374
|
references: ["TextStyle"]
|
|
13285
13375
|
},
|
|
13286
13376
|
{
|
|
@@ -13294,7 +13384,7 @@ var methodsByCategory = {
|
|
|
13294
13384
|
name: "mode",
|
|
13295
13385
|
category: "framer",
|
|
13296
13386
|
signature: "mode: Mode",
|
|
13297
|
-
description: 'Get the current mode
|
|
13387
|
+
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
13388
|
references: ["Mode"]
|
|
13299
13389
|
},
|
|
13300
13390
|
{
|
|
@@ -13322,14 +13412,14 @@ var methodsByCategory = {
|
|
|
13322
13412
|
name: "removeNodes",
|
|
13323
13413
|
category: "framer",
|
|
13324
13414
|
signature: "removeNodes(nodeIds: NodeId[]): Promise<void>",
|
|
13325
|
-
description: "Remove nodes from the canvas
|
|
13415
|
+
description: "Remove nodes from the canvas.\n@category canvas",
|
|
13326
13416
|
references: []
|
|
13327
13417
|
},
|
|
13328
13418
|
{
|
|
13329
13419
|
name: "removeRedirects",
|
|
13330
13420
|
category: "framer",
|
|
13331
13421
|
signature: "removeRedirects(redirectIds: string[]): Promise<void>",
|
|
13332
|
-
description: "Remove Redirects from the project
|
|
13422
|
+
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
13423
|
references: []
|
|
13334
13424
|
},
|
|
13335
13425
|
{
|
|
@@ -13339,6 +13429,13 @@ var methodsByCategory = {
|
|
|
13339
13429
|
description: "",
|
|
13340
13430
|
references: []
|
|
13341
13431
|
},
|
|
13432
|
+
{
|
|
13433
|
+
name: "reviewChangesForAgent",
|
|
13434
|
+
category: "framer",
|
|
13435
|
+
signature: "reviewChangesForAgent(options?: { pagePath?: string; }): Promise<unknown>",
|
|
13436
|
+
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.",
|
|
13437
|
+
references: []
|
|
13438
|
+
},
|
|
13342
13439
|
{
|
|
13343
13440
|
name: "screenshot",
|
|
13344
13441
|
category: "framer",
|
|
@@ -13357,63 +13454,63 @@ var methodsByCategory = {
|
|
|
13357
13454
|
name: "setAttributes",
|
|
13358
13455
|
category: "framer",
|
|
13359
13456
|
signature: "setAttributes(nodeId: NodeId, attributes: Partial<AnyEditableAttributes>): Promise<AnyNode | null>",
|
|
13360
|
-
description: "Set the attributes of a node
|
|
13457
|
+
description: "Set the attributes of a node.\n@category canvas",
|
|
13361
13458
|
references: ["AnyEditableAttributes", "AnyNode"]
|
|
13362
13459
|
},
|
|
13363
13460
|
{
|
|
13364
13461
|
name: "setCloseWarning",
|
|
13365
13462
|
category: "framer",
|
|
13366
13463
|
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
|
|
13464
|
+
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
13465
|
references: []
|
|
13369
13466
|
},
|
|
13370
13467
|
{
|
|
13371
13468
|
name: "setCustomCode",
|
|
13372
13469
|
category: "framer",
|
|
13373
13470
|
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
|
|
13471
|
+
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
13472
|
references: ["SetCustomCodeOptions"]
|
|
13376
13473
|
},
|
|
13377
13474
|
{
|
|
13378
13475
|
name: "setImage",
|
|
13379
13476
|
category: "framer",
|
|
13380
13477
|
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
|
|
13478
|
+
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
13479
|
references: ["NamedImageAssetInput", "File"]
|
|
13383
13480
|
},
|
|
13384
13481
|
{
|
|
13385
13482
|
name: "setLocalizationData",
|
|
13386
13483
|
category: "framer",
|
|
13387
13484
|
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
|
|
13485
|
+
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
13486
|
references: ["LocalizationData", "SetLocalizationDataResult"]
|
|
13390
13487
|
},
|
|
13391
13488
|
{
|
|
13392
13489
|
name: "setParent",
|
|
13393
13490
|
category: "framer",
|
|
13394
13491
|
signature: "setParent(nodeId: NodeId, parentId: NodeId, index?: number | undefined): Promise<void>",
|
|
13395
|
-
description: "Set the parent of a node
|
|
13492
|
+
description: "Set the parent of a node.\n@category canvas",
|
|
13396
13493
|
references: []
|
|
13397
13494
|
},
|
|
13398
13495
|
{
|
|
13399
13496
|
name: "setRedirectOrder",
|
|
13400
13497
|
category: "framer",
|
|
13401
13498
|
signature: "setRedirectOrder(redirectIds: string[]): Promise<void>",
|
|
13402
|
-
description: "Set the order of Redirects in the list
|
|
13499
|
+
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
13500
|
references: []
|
|
13404
13501
|
},
|
|
13405
13502
|
{
|
|
13406
13503
|
name: "setSelection",
|
|
13407
13504
|
category: "framer",
|
|
13408
13505
|
signature: "setSelection(nodeIds: string | Iterable<string>): Promise<void>",
|
|
13409
|
-
description: "Set the current selection
|
|
13506
|
+
description: "Set the current selection.\n@category canvas",
|
|
13410
13507
|
references: []
|
|
13411
13508
|
},
|
|
13412
13509
|
{
|
|
13413
13510
|
name: "setText",
|
|
13414
13511
|
category: "framer",
|
|
13415
13512
|
signature: "setText(text: string): Promise<void>",
|
|
13416
|
-
description: "Set the text of the current selection or insert it onto the canvas
|
|
13513
|
+
description: "Set the text of the current selection or insert it onto the canvas.\n@category canvas",
|
|
13417
13514
|
references: []
|
|
13418
13515
|
},
|
|
13419
13516
|
{
|
|
@@ -13440,35 +13537,35 @@ var methodsByCategory = {
|
|
|
13440
13537
|
name: "typecheckCode",
|
|
13441
13538
|
category: "framer",
|
|
13442
13539
|
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
|
|
13540
|
+
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
13541
|
references: ["ts.server.protocol.CompilerOptions", "TypecheckDiagnostic"]
|
|
13445
13542
|
},
|
|
13446
13543
|
{
|
|
13447
13544
|
name: "uploadFile",
|
|
13448
13545
|
category: "framer",
|
|
13449
13546
|
signature: "uploadFile(file: NamedFileAssetInput | File): Promise<FileAsset>",
|
|
13450
|
-
description: "Uploads a file without assigning it to a property
|
|
13547
|
+
description: "Uploads a file without assigning it to a property.\n@category canvas",
|
|
13451
13548
|
references: ["NamedFileAssetInput", "File", "FileAsset"]
|
|
13452
13549
|
},
|
|
13453
13550
|
{
|
|
13454
13551
|
name: "uploadFiles",
|
|
13455
13552
|
category: "framer",
|
|
13456
13553
|
signature: "uploadFiles(files: readonly NamedFileAssetInput[]): Promise<FileAsset[]>",
|
|
13457
|
-
description: "Upload multiple files without assigning them to properties
|
|
13554
|
+
description: "Upload multiple files without assigning them to properties.\n@category canvas",
|
|
13458
13555
|
references: ["NamedFileAssetInput", "FileAsset"]
|
|
13459
13556
|
},
|
|
13460
13557
|
{
|
|
13461
13558
|
name: "uploadImage",
|
|
13462
13559
|
category: "framer",
|
|
13463
13560
|
signature: "uploadImage(image: NamedImageAssetInput | File): Promise<ImageAsset>",
|
|
13464
|
-
description: "Upload an image without assigning it to a property
|
|
13561
|
+
description: "Upload an image without assigning it to a property.\n@category canvas",
|
|
13465
13562
|
references: ["NamedImageAssetInput", "File", "ImageAsset"]
|
|
13466
13563
|
},
|
|
13467
13564
|
{
|
|
13468
13565
|
name: "uploadImages",
|
|
13469
13566
|
category: "framer",
|
|
13470
13567
|
signature: "uploadImages(images: readonly NamedImageAssetInput[]): Promise<ImageAsset[]>",
|
|
13471
|
-
description: "Upload multiple images without assigning them to properties
|
|
13568
|
+
description: "Upload multiple images without assigning them to properties.\n@category canvas",
|
|
13472
13569
|
references: ["NamedImageAssetInput", "ImageAsset"]
|
|
13473
13570
|
}
|
|
13474
13571
|
],
|
|
@@ -13664,7 +13761,7 @@ var methodsByCategory = {
|
|
|
13664
13761
|
name: "addItems",
|
|
13665
13762
|
category: "ManagedCollection",
|
|
13666
13763
|
signature: "addItems(items: ManagedCollectionItemInput[]): Promise<void>",
|
|
13667
|
-
description: 'Add new items or update existing ones if their IDs match
|
|
13764
|
+
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
13765
|
references: ["ManagedCollectionItemInput"]
|
|
13669
13766
|
},
|
|
13670
13767
|
{
|
|
@@ -13706,7 +13803,7 @@ var methodsByCategory = {
|
|
|
13706
13803
|
name: "navigateTo",
|
|
13707
13804
|
category: "ManagedCollection",
|
|
13708
13805
|
signature: "navigateTo(opts?: NavigableOptions): Promise<void>",
|
|
13709
|
-
description: "Navigate to this collection
|
|
13806
|
+
description: "Navigate to this collection.\n\nMay switch modes to reveal the relevant view.",
|
|
13710
13807
|
references: ["NavigableOptions"]
|
|
13711
13808
|
},
|
|
13712
13809
|
{
|
|
@@ -13727,7 +13824,7 @@ var methodsByCategory = {
|
|
|
13727
13824
|
name: "setFields",
|
|
13728
13825
|
category: "ManagedCollection",
|
|
13729
13826
|
signature: "setFields(fields: ManagedCollectionFieldInput[]): Promise<void>",
|
|
13730
|
-
description: 'Add, update, or remove Collection fields
|
|
13827
|
+
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
13828
|
references: ["ManagedCollectionFieldInput"]
|
|
13732
13829
|
},
|
|
13733
13830
|
{
|
|
@@ -13741,7 +13838,7 @@ var methodsByCategory = {
|
|
|
13741
13838
|
name: "setPluginData",
|
|
13742
13839
|
category: "ManagedCollection",
|
|
13743
13840
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
13744
|
-
description: 'Set plugin data by key
|
|
13841
|
+
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
13842
|
references: []
|
|
13746
13843
|
}
|
|
13747
13844
|
],
|
|
@@ -13981,21 +14078,21 @@ var methodsByCategory = {
|
|
|
13981
14078
|
name: "bottom",
|
|
13982
14079
|
category: "SVGNode",
|
|
13983
14080
|
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.',
|
|
14081
|
+
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
14082
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
13986
14083
|
},
|
|
13987
14084
|
{
|
|
13988
14085
|
name: "centerX",
|
|
13989
14086
|
category: "SVGNode",
|
|
13990
14087
|
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.',
|
|
14088
|
+
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
14089
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
13993
14090
|
},
|
|
13994
14091
|
{
|
|
13995
14092
|
name: "centerY",
|
|
13996
14093
|
category: "SVGNode",
|
|
13997
14094
|
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.',
|
|
14095
|
+
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
14096
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
14000
14097
|
},
|
|
14001
14098
|
{
|
|
@@ -14016,7 +14113,7 @@ var methodsByCategory = {
|
|
|
14016
14113
|
name: "getNodesWithAttribute",
|
|
14017
14114
|
category: "SVGNode",
|
|
14018
14115
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
14019
|
-
description: 'Get the descendants of this node that support `attribute
|
|
14116
|
+
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
14117
|
references: ["T", "Node"]
|
|
14021
14118
|
},
|
|
14022
14119
|
{
|
|
@@ -14030,7 +14127,7 @@ var methodsByCategory = {
|
|
|
14030
14127
|
name: "getNodesWithType",
|
|
14031
14128
|
category: "SVGNode",
|
|
14032
14129
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
14033
|
-
description: 'Get descendants of this node that match the given type
|
|
14130
|
+
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
14131
|
references: ["FrameNode"]
|
|
14035
14132
|
},
|
|
14036
14133
|
{
|
|
@@ -14044,7 +14141,7 @@ var methodsByCategory = {
|
|
|
14044
14141
|
name: "getPluginData",
|
|
14045
14142
|
category: "SVGNode",
|
|
14046
14143
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
14047
|
-
description: "Get plugin data by key
|
|
14144
|
+
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
14145
|
references: []
|
|
14049
14146
|
},
|
|
14050
14147
|
{
|
|
@@ -14065,42 +14162,42 @@ var methodsByCategory = {
|
|
|
14065
14162
|
name: "height",
|
|
14066
14163
|
category: "SVGNode",
|
|
14067
14164
|
signature: "height: HeightLength | null",
|
|
14068
|
-
description: 'Height of the node
|
|
14165
|
+
description: 'Height of the node.\n\nAccepts pixel, percentage, fraction, viewport-height values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14069
14166
|
references: ["HeightLength"]
|
|
14070
14167
|
},
|
|
14071
14168
|
{
|
|
14072
14169
|
name: "left",
|
|
14073
14170
|
category: "SVGNode",
|
|
14074
14171
|
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.',
|
|
14172
|
+
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
14173
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14077
14174
|
},
|
|
14078
14175
|
{
|
|
14079
14176
|
name: "locked",
|
|
14080
14177
|
category: "SVGNode",
|
|
14081
14178
|
signature: "locked: boolean",
|
|
14082
|
-
description: "Whether the node is locked for editing
|
|
14179
|
+
description: "Whether the node is locked for editing.\n\nDefaults to `false`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
14083
14180
|
references: []
|
|
14084
14181
|
},
|
|
14085
14182
|
{
|
|
14086
14183
|
name: "name",
|
|
14087
14184
|
category: "SVGNode",
|
|
14088
14185
|
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.",
|
|
14186
|
+
description: "The name of the node displayed in the layers panel.\n\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
14090
14187
|
references: []
|
|
14091
14188
|
},
|
|
14092
14189
|
{
|
|
14093
14190
|
name: "navigateTo",
|
|
14094
14191
|
category: "SVGNode",
|
|
14095
14192
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
14096
|
-
description: "Navigate to this node
|
|
14193
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
14097
14194
|
references: ["NavigableOptions"]
|
|
14098
14195
|
},
|
|
14099
14196
|
{
|
|
14100
14197
|
name: "opacity",
|
|
14101
14198
|
category: "SVGNode",
|
|
14102
14199
|
signature: "opacity: number",
|
|
14103
|
-
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque)
|
|
14200
|
+
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque).\n\nDefaults to `1`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
14104
14201
|
references: []
|
|
14105
14202
|
},
|
|
14106
14203
|
{
|
|
@@ -14121,14 +14218,14 @@ var methodsByCategory = {
|
|
|
14121
14218
|
name: "right",
|
|
14122
14219
|
category: "SVGNode",
|
|
14123
14220
|
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.',
|
|
14221
|
+
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
14222
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14126
14223
|
},
|
|
14127
14224
|
{
|
|
14128
14225
|
name: "rotation",
|
|
14129
14226
|
category: "SVGNode",
|
|
14130
14227
|
signature: "rotation: number",
|
|
14131
|
-
description: "Rotation angle in degrees
|
|
14228
|
+
description: "Rotation angle in degrees.\n\nDefaults to `0`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
14132
14229
|
references: []
|
|
14133
14230
|
},
|
|
14134
14231
|
{
|
|
@@ -14142,14 +14239,14 @@ var methodsByCategory = {
|
|
|
14142
14239
|
name: "setAttributes",
|
|
14143
14240
|
category: "SVGNode",
|
|
14144
14241
|
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
|
|
14242
|
+
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
14243
|
references: []
|
|
14147
14244
|
},
|
|
14148
14245
|
{
|
|
14149
14246
|
name: "setPluginData",
|
|
14150
14247
|
category: "SVGNode",
|
|
14151
14248
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
14152
|
-
description: 'Set plugin data by key
|
|
14249
|
+
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
14250
|
references: []
|
|
14154
14251
|
},
|
|
14155
14252
|
{
|
|
@@ -14163,28 +14260,28 @@ var methodsByCategory = {
|
|
|
14163
14260
|
name: "top",
|
|
14164
14261
|
category: "SVGNode",
|
|
14165
14262
|
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.',
|
|
14263
|
+
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
14264
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14168
14265
|
},
|
|
14169
14266
|
{
|
|
14170
14267
|
name: "visible",
|
|
14171
14268
|
category: "SVGNode",
|
|
14172
14269
|
signature: "visible: boolean",
|
|
14173
|
-
description: "Whether the node is visible on the canvas
|
|
14270
|
+
description: "Whether the node is visible on the canvas.\n\nDefaults to `true`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
14174
14271
|
references: []
|
|
14175
14272
|
},
|
|
14176
14273
|
{
|
|
14177
14274
|
name: "walk",
|
|
14178
14275
|
category: "SVGNode",
|
|
14179
14276
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
14180
|
-
description: "Walk this node and its descendants recursively
|
|
14277
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
14181
14278
|
references: ["AnyNode"]
|
|
14182
14279
|
},
|
|
14183
14280
|
{
|
|
14184
14281
|
name: "width",
|
|
14185
14282
|
category: "SVGNode",
|
|
14186
14283
|
signature: "width: WidthLength | null",
|
|
14187
|
-
description: 'Width of the node
|
|
14284
|
+
description: 'Width of the node.\n\nAccepts pixel, percentage, fraction values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14188
14285
|
references: ["WidthLength"]
|
|
14189
14286
|
},
|
|
14190
14287
|
{
|
|
@@ -14200,21 +14297,21 @@ var methodsByCategory = {
|
|
|
14200
14297
|
name: "bottom",
|
|
14201
14298
|
category: "TextNode",
|
|
14202
14299
|
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.',
|
|
14300
|
+
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
14301
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14205
14302
|
},
|
|
14206
14303
|
{
|
|
14207
14304
|
name: "centerX",
|
|
14208
14305
|
category: "TextNode",
|
|
14209
14306
|
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.',
|
|
14307
|
+
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
14308
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
14212
14309
|
},
|
|
14213
14310
|
{
|
|
14214
14311
|
name: "centerY",
|
|
14215
14312
|
category: "TextNode",
|
|
14216
14313
|
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.',
|
|
14314
|
+
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
14315
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
14219
14316
|
},
|
|
14220
14317
|
{
|
|
@@ -14249,7 +14346,7 @@ var methodsByCategory = {
|
|
|
14249
14346
|
name: "getNodesWithAttribute",
|
|
14250
14347
|
category: "TextNode",
|
|
14251
14348
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
14252
|
-
description: 'Get the descendants of this node that support `attribute
|
|
14349
|
+
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
14350
|
references: ["T", "Node"]
|
|
14254
14351
|
},
|
|
14255
14352
|
{
|
|
@@ -14263,7 +14360,7 @@ var methodsByCategory = {
|
|
|
14263
14360
|
name: "getNodesWithType",
|
|
14264
14361
|
category: "TextNode",
|
|
14265
14362
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
14266
|
-
description: 'Get descendants of this node that match the given type
|
|
14363
|
+
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
14364
|
references: ["FrameNode"]
|
|
14268
14365
|
},
|
|
14269
14366
|
{
|
|
@@ -14277,7 +14374,7 @@ var methodsByCategory = {
|
|
|
14277
14374
|
name: "getPluginData",
|
|
14278
14375
|
category: "TextNode",
|
|
14279
14376
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
14280
|
-
description: "Get plugin data by key
|
|
14377
|
+
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
14378
|
references: []
|
|
14282
14379
|
},
|
|
14283
14380
|
{
|
|
@@ -14298,77 +14395,77 @@ var methodsByCategory = {
|
|
|
14298
14395
|
name: "getText",
|
|
14299
14396
|
category: "TextNode",
|
|
14300
14397
|
signature: "getText(): Promise<string | null>",
|
|
14301
|
-
description: "Get the text of this node
|
|
14398
|
+
description: "Get the text of this node.\n\nPlain text content, not HTML.",
|
|
14302
14399
|
references: []
|
|
14303
14400
|
},
|
|
14304
14401
|
{
|
|
14305
14402
|
name: "gridItemColumnSpan",
|
|
14306
14403
|
category: "TextNode",
|
|
14307
14404
|
signature: 'gridItemColumnSpan: WithGridItemTrait["gridItemColumnSpan"]',
|
|
14308
|
-
description: 'Number of columns to span, or `"all"` for all columns
|
|
14405
|
+
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
14406
|
references: []
|
|
14310
14407
|
},
|
|
14311
14408
|
{
|
|
14312
14409
|
name: "gridItemFillCellHeight",
|
|
14313
14410
|
category: "TextNode",
|
|
14314
14411
|
signature: 'gridItemFillCellHeight: WithGridItemTrait["gridItemFillCellHeight"]',
|
|
14315
|
-
description: "Whether to fill the grid cell height
|
|
14412
|
+
description: "Whether to fill the grid cell height.\n\nFor nodes inside a grid container. Defaults to `true`. Supported by FrameNode, TextNode.",
|
|
14316
14413
|
references: []
|
|
14317
14414
|
},
|
|
14318
14415
|
{
|
|
14319
14416
|
name: "gridItemFillCellWidth",
|
|
14320
14417
|
category: "TextNode",
|
|
14321
14418
|
signature: 'gridItemFillCellWidth: WithGridItemTrait["gridItemFillCellWidth"]',
|
|
14322
|
-
description: "Whether to fill the grid cell width
|
|
14419
|
+
description: "Whether to fill the grid cell width.\n\nFor nodes inside a grid container. Defaults to `true`. Supported by FrameNode, TextNode.",
|
|
14323
14420
|
references: []
|
|
14324
14421
|
},
|
|
14325
14422
|
{
|
|
14326
14423
|
name: "gridItemHorizontalAlignment",
|
|
14327
14424
|
category: "TextNode",
|
|
14328
14425
|
signature: 'gridItemHorizontalAlignment: WithGridItemTrait["gridItemHorizontalAlignment"]',
|
|
14329
|
-
description: 'Horizontal alignment within grid cell
|
|
14426
|
+
description: 'Horizontal alignment within grid cell.\n\nFor nodes inside a grid container. Defaults to `"center"`. Supported by FrameNode, TextNode.',
|
|
14330
14427
|
references: []
|
|
14331
14428
|
},
|
|
14332
14429
|
{
|
|
14333
14430
|
name: "gridItemRowSpan",
|
|
14334
14431
|
category: "TextNode",
|
|
14335
14432
|
signature: 'gridItemRowSpan: WithGridItemTrait["gridItemRowSpan"]',
|
|
14336
|
-
description: "Number of rows to span
|
|
14433
|
+
description: "Number of rows to span.\n\nFor nodes inside a grid container. Defaults to `1`. Supported by FrameNode, TextNode.",
|
|
14337
14434
|
references: []
|
|
14338
14435
|
},
|
|
14339
14436
|
{
|
|
14340
14437
|
name: "gridItemVerticalAlignment",
|
|
14341
14438
|
category: "TextNode",
|
|
14342
14439
|
signature: 'gridItemVerticalAlignment: WithGridItemTrait["gridItemVerticalAlignment"]',
|
|
14343
|
-
description: 'Vertical alignment within grid cell
|
|
14440
|
+
description: 'Vertical alignment within grid cell.\n\nFor nodes inside a grid container. Defaults to `"center"`. Supported by FrameNode, TextNode.',
|
|
14344
14441
|
references: []
|
|
14345
14442
|
},
|
|
14346
14443
|
{
|
|
14347
14444
|
name: "height",
|
|
14348
14445
|
category: "TextNode",
|
|
14349
14446
|
signature: "height: HeightLength | null",
|
|
14350
|
-
description: 'Height of the node
|
|
14447
|
+
description: 'Height of the node.\n\nAccepts pixel, percentage, fraction, viewport-height values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14351
14448
|
references: ["HeightLength"]
|
|
14352
14449
|
},
|
|
14353
14450
|
{
|
|
14354
14451
|
name: "inlineTextStyle",
|
|
14355
14452
|
category: "TextNode",
|
|
14356
14453
|
signature: "inlineTextStyle: TextStyle | null",
|
|
14357
|
-
description: "Apply a text style preset
|
|
14454
|
+
description: "Apply a text style preset.\n\nSetting to `null` removes the text style. Supported by TextNode.",
|
|
14358
14455
|
references: ["TextStyle"]
|
|
14359
14456
|
},
|
|
14360
14457
|
{
|
|
14361
14458
|
name: "left",
|
|
14362
14459
|
category: "TextNode",
|
|
14363
14460
|
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.',
|
|
14461
|
+
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
14462
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14366
14463
|
},
|
|
14367
14464
|
{
|
|
14368
14465
|
name: "link",
|
|
14369
14466
|
category: "TextNode",
|
|
14370
14467
|
signature: 'link: WithLinkTrait["link"]',
|
|
14371
|
-
description: 'URL or internal page link
|
|
14468
|
+
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
14469
|
references: []
|
|
14373
14470
|
},
|
|
14374
14471
|
{
|
|
@@ -14382,7 +14479,7 @@ var methodsByCategory = {
|
|
|
14382
14479
|
name: "linkOpenInNewTab",
|
|
14383
14480
|
category: "TextNode",
|
|
14384
14481
|
signature: 'linkOpenInNewTab: WithLinkTrait["linkOpenInNewTab"]',
|
|
14385
|
-
description: "Whether to open the link in a new tab
|
|
14482
|
+
description: "Whether to open the link in a new tab.\n\nDefault is automatically determined based on link type.\nSupported by FrameNode, TextNode.",
|
|
14386
14483
|
references: []
|
|
14387
14484
|
},
|
|
14388
14485
|
{
|
|
@@ -14410,7 +14507,7 @@ var methodsByCategory = {
|
|
|
14410
14507
|
name: "locked",
|
|
14411
14508
|
category: "TextNode",
|
|
14412
14509
|
signature: "locked: boolean",
|
|
14413
|
-
description: "Whether the node is locked for editing
|
|
14510
|
+
description: "Whether the node is locked for editing.\n\nDefaults to `false`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
14414
14511
|
references: []
|
|
14415
14512
|
},
|
|
14416
14513
|
{
|
|
@@ -14445,42 +14542,42 @@ var methodsByCategory = {
|
|
|
14445
14542
|
name: "name",
|
|
14446
14543
|
category: "TextNode",
|
|
14447
14544
|
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.",
|
|
14545
|
+
description: "The name of the node displayed in the layers panel.\n\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
14449
14546
|
references: []
|
|
14450
14547
|
},
|
|
14451
14548
|
{
|
|
14452
14549
|
name: "navigateTo",
|
|
14453
14550
|
category: "TextNode",
|
|
14454
14551
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
14455
|
-
description: "Navigate to this node
|
|
14552
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
14456
14553
|
references: ["NavigableOptions"]
|
|
14457
14554
|
},
|
|
14458
14555
|
{
|
|
14459
14556
|
name: "opacity",
|
|
14460
14557
|
category: "TextNode",
|
|
14461
14558
|
signature: "opacity: number",
|
|
14462
|
-
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque)
|
|
14559
|
+
description: "Opacity of the node, from `0` (fully transparent) to `1` (fully opaque).\n\nDefaults to `1`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
14463
14560
|
references: []
|
|
14464
14561
|
},
|
|
14465
14562
|
{
|
|
14466
14563
|
name: "overflow",
|
|
14467
14564
|
category: "TextNode",
|
|
14468
14565
|
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.",
|
|
14566
|
+
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
14567
|
references: []
|
|
14471
14568
|
},
|
|
14472
14569
|
{
|
|
14473
14570
|
name: "overflowX",
|
|
14474
14571
|
category: "TextNode",
|
|
14475
14572
|
signature: 'overflowX: WithOverflowTrait["overflowX"]',
|
|
14476
|
-
description: "Controls horizontal overflow behavior.\nSetting to `null` removes the overflow X property. Supported by FrameNode, TextNode.",
|
|
14573
|
+
description: "Controls horizontal overflow behavior.\n\nSetting to `null` removes the overflow X property. Supported by FrameNode, TextNode.",
|
|
14477
14574
|
references: []
|
|
14478
14575
|
},
|
|
14479
14576
|
{
|
|
14480
14577
|
name: "overflowY",
|
|
14481
14578
|
category: "TextNode",
|
|
14482
14579
|
signature: 'overflowY: WithOverflowTrait["overflowY"]',
|
|
14483
|
-
description: "Controls vertical overflow behavior.\nSetting to `null` removes the overflow Y property. Supported by FrameNode, TextNode.",
|
|
14580
|
+
description: "Controls vertical overflow behavior.\n\nSetting to `null` removes the overflow Y property. Supported by FrameNode, TextNode.",
|
|
14484
14581
|
references: []
|
|
14485
14582
|
},
|
|
14486
14583
|
{
|
|
@@ -14501,14 +14598,14 @@ var methodsByCategory = {
|
|
|
14501
14598
|
name: "right",
|
|
14502
14599
|
category: "TextNode",
|
|
14503
14600
|
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.',
|
|
14601
|
+
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
14602
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14506
14603
|
},
|
|
14507
14604
|
{
|
|
14508
14605
|
name: "rotation",
|
|
14509
14606
|
category: "TextNode",
|
|
14510
14607
|
signature: "rotation: number",
|
|
14511
|
-
description: "Rotation angle in degrees
|
|
14608
|
+
description: "Rotation angle in degrees.\n\nDefaults to `0`. Supported by FrameNode, TextNode, SVGNode, ComponentInstanceNode.",
|
|
14512
14609
|
references: []
|
|
14513
14610
|
},
|
|
14514
14611
|
{
|
|
@@ -14522,7 +14619,7 @@ var methodsByCategory = {
|
|
|
14522
14619
|
name: "setAttributes",
|
|
14523
14620
|
category: "TextNode",
|
|
14524
14621
|
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
|
|
14622
|
+
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
14623
|
references: []
|
|
14527
14624
|
},
|
|
14528
14625
|
{
|
|
@@ -14536,56 +14633,56 @@ var methodsByCategory = {
|
|
|
14536
14633
|
name: "setPluginData",
|
|
14537
14634
|
category: "TextNode",
|
|
14538
14635
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
14539
|
-
description: 'Set plugin data by key
|
|
14636
|
+
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
14637
|
references: []
|
|
14541
14638
|
},
|
|
14542
14639
|
{
|
|
14543
14640
|
name: "setText",
|
|
14544
14641
|
category: "TextNode",
|
|
14545
14642
|
signature: "setText(text: string): Promise<void>",
|
|
14546
|
-
description: 'Set the text of this node
|
|
14643
|
+
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
14644
|
references: []
|
|
14548
14645
|
},
|
|
14549
14646
|
{
|
|
14550
14647
|
name: "textTruncation",
|
|
14551
14648
|
category: "TextNode",
|
|
14552
14649
|
signature: 'textTruncation: WithTextTruncationTrait["textTruncation"]',
|
|
14553
|
-
description: "Maximum number of lines
|
|
14650
|
+
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
14651
|
references: []
|
|
14555
14652
|
},
|
|
14556
14653
|
{
|
|
14557
14654
|
name: "top",
|
|
14558
14655
|
category: "TextNode",
|
|
14559
14656
|
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.',
|
|
14657
|
+
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
14658
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14562
14659
|
},
|
|
14563
14660
|
{
|
|
14564
14661
|
name: "visible",
|
|
14565
14662
|
category: "TextNode",
|
|
14566
14663
|
signature: "visible: boolean",
|
|
14567
|
-
description: "Whether the node is visible on the canvas
|
|
14664
|
+
description: "Whether the node is visible on the canvas.\n\nDefaults to `true`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
14568
14665
|
references: []
|
|
14569
14666
|
},
|
|
14570
14667
|
{
|
|
14571
14668
|
name: "walk",
|
|
14572
14669
|
category: "TextNode",
|
|
14573
14670
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
14574
|
-
description: "Walk this node and its descendants recursively
|
|
14671
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
14575
14672
|
references: ["AnyNode"]
|
|
14576
14673
|
},
|
|
14577
14674
|
{
|
|
14578
14675
|
name: "width",
|
|
14579
14676
|
category: "TextNode",
|
|
14580
14677
|
signature: "width: WidthLength | null",
|
|
14581
|
-
description: 'Width of the node
|
|
14678
|
+
description: 'Width of the node.\n\nAccepts pixel, percentage, fraction values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
14582
14679
|
references: ["WidthLength"]
|
|
14583
14680
|
},
|
|
14584
14681
|
{
|
|
14585
14682
|
name: "zIndex",
|
|
14586
14683
|
category: "TextNode",
|
|
14587
14684
|
signature: 'zIndex: WithZIndexTrait["zIndex"]',
|
|
14588
|
-
description: "Stacking order of positioned elements
|
|
14685
|
+
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
14686
|
references: []
|
|
14590
14687
|
},
|
|
14591
14688
|
{
|
|
@@ -14811,7 +14908,7 @@ var methodsByCategory = {
|
|
|
14811
14908
|
name: "getNodesWithAttribute",
|
|
14812
14909
|
category: "UnknownNode",
|
|
14813
14910
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
14814
|
-
description: 'Get the descendants of this node that support `attribute
|
|
14911
|
+
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
14912
|
references: ["T", "Node"]
|
|
14816
14913
|
},
|
|
14817
14914
|
{
|
|
@@ -14825,7 +14922,7 @@ var methodsByCategory = {
|
|
|
14825
14922
|
name: "getNodesWithType",
|
|
14826
14923
|
category: "UnknownNode",
|
|
14827
14924
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
14828
|
-
description: 'Get descendants of this node that match the given type
|
|
14925
|
+
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
14926
|
references: ["FrameNode"]
|
|
14830
14927
|
},
|
|
14831
14928
|
{
|
|
@@ -14839,7 +14936,7 @@ var methodsByCategory = {
|
|
|
14839
14936
|
name: "getPluginData",
|
|
14840
14937
|
category: "UnknownNode",
|
|
14841
14938
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
14842
|
-
description: "Get plugin data by key
|
|
14939
|
+
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
14940
|
references: []
|
|
14844
14941
|
},
|
|
14845
14942
|
{
|
|
@@ -14860,7 +14957,7 @@ var methodsByCategory = {
|
|
|
14860
14957
|
name: "navigateTo",
|
|
14861
14958
|
category: "UnknownNode",
|
|
14862
14959
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
14863
|
-
description: "Navigate to this node
|
|
14960
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
14864
14961
|
references: ["NavigableOptions"]
|
|
14865
14962
|
},
|
|
14866
14963
|
{
|
|
@@ -14881,21 +14978,21 @@ var methodsByCategory = {
|
|
|
14881
14978
|
name: "setAttributes",
|
|
14882
14979
|
category: "UnknownNode",
|
|
14883
14980
|
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
|
|
14981
|
+
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
14982
|
references: []
|
|
14886
14983
|
},
|
|
14887
14984
|
{
|
|
14888
14985
|
name: "setPluginData",
|
|
14889
14986
|
category: "UnknownNode",
|
|
14890
14987
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
14891
|
-
description: 'Set plugin data by key
|
|
14988
|
+
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
14989
|
references: []
|
|
14893
14990
|
},
|
|
14894
14991
|
{
|
|
14895
14992
|
name: "walk",
|
|
14896
14993
|
category: "UnknownNode",
|
|
14897
14994
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
14898
|
-
description: "Walk this node and its descendants recursively
|
|
14995
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
14899
14996
|
references: ["AnyNode"]
|
|
14900
14997
|
},
|
|
14901
14998
|
{
|
|
@@ -14975,21 +15072,21 @@ var methodsByCategory = {
|
|
|
14975
15072
|
name: "bottom",
|
|
14976
15073
|
category: "VectorSetItemNode",
|
|
14977
15074
|
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.',
|
|
15075
|
+
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
15076
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
14980
15077
|
},
|
|
14981
15078
|
{
|
|
14982
15079
|
name: "centerX",
|
|
14983
15080
|
category: "VectorSetItemNode",
|
|
14984
15081
|
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.',
|
|
15082
|
+
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
15083
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
14987
15084
|
},
|
|
14988
15085
|
{
|
|
14989
15086
|
name: "centerY",
|
|
14990
15087
|
category: "VectorSetItemNode",
|
|
14991
15088
|
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.',
|
|
15089
|
+
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
15090
|
references: ["CSSDimension", "CSSUnit.Percentage"]
|
|
14994
15091
|
},
|
|
14995
15092
|
{
|
|
@@ -15010,7 +15107,7 @@ var methodsByCategory = {
|
|
|
15010
15107
|
name: "getNodesWithAttribute",
|
|
15011
15108
|
category: "VectorSetItemNode",
|
|
15012
15109
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
15013
|
-
description: 'Get the descendants of this node that support `attribute
|
|
15110
|
+
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
15111
|
references: ["T", "Node"]
|
|
15015
15112
|
},
|
|
15016
15113
|
{
|
|
@@ -15024,7 +15121,7 @@ var methodsByCategory = {
|
|
|
15024
15121
|
name: "getNodesWithType",
|
|
15025
15122
|
category: "VectorSetItemNode",
|
|
15026
15123
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
15027
|
-
description: 'Get descendants of this node that match the given type
|
|
15124
|
+
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
15125
|
references: ["FrameNode"]
|
|
15029
15126
|
},
|
|
15030
15127
|
{
|
|
@@ -15038,7 +15135,7 @@ var methodsByCategory = {
|
|
|
15038
15135
|
name: "getPluginData",
|
|
15039
15136
|
category: "VectorSetItemNode",
|
|
15040
15137
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
15041
|
-
description: "Get plugin data by key
|
|
15138
|
+
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
15139
|
references: []
|
|
15043
15140
|
},
|
|
15044
15141
|
{
|
|
@@ -15059,35 +15156,35 @@ var methodsByCategory = {
|
|
|
15059
15156
|
name: "height",
|
|
15060
15157
|
category: "VectorSetItemNode",
|
|
15061
15158
|
signature: "height: HeightLength | null",
|
|
15062
|
-
description: 'Height of the node
|
|
15159
|
+
description: 'Height of the node.\n\nAccepts pixel, percentage, fraction, viewport-height values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
15063
15160
|
references: ["HeightLength"]
|
|
15064
15161
|
},
|
|
15065
15162
|
{
|
|
15066
15163
|
name: "left",
|
|
15067
15164
|
category: "VectorSetItemNode",
|
|
15068
15165
|
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.',
|
|
15166
|
+
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
15167
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
15071
15168
|
},
|
|
15072
15169
|
{
|
|
15073
15170
|
name: "locked",
|
|
15074
15171
|
category: "VectorSetItemNode",
|
|
15075
15172
|
signature: "locked: boolean",
|
|
15076
|
-
description: "Whether the node is locked for editing
|
|
15173
|
+
description: "Whether the node is locked for editing.\n\nDefaults to `false`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
15077
15174
|
references: []
|
|
15078
15175
|
},
|
|
15079
15176
|
{
|
|
15080
15177
|
name: "name",
|
|
15081
15178
|
category: "VectorSetItemNode",
|
|
15082
15179
|
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.",
|
|
15180
|
+
description: "The name of the node displayed in the layers panel.\n\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode,\nComponentNode, VectorSetNode, VectorSetItemNode.",
|
|
15084
15181
|
references: []
|
|
15085
15182
|
},
|
|
15086
15183
|
{
|
|
15087
15184
|
name: "navigateTo",
|
|
15088
15185
|
category: "VectorSetItemNode",
|
|
15089
15186
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
15090
|
-
description: "Navigate to this node
|
|
15187
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
15091
15188
|
references: ["NavigableOptions"]
|
|
15092
15189
|
},
|
|
15093
15190
|
{
|
|
@@ -15101,7 +15198,7 @@ var methodsByCategory = {
|
|
|
15101
15198
|
name: "right",
|
|
15102
15199
|
category: "VectorSetItemNode",
|
|
15103
15200
|
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.',
|
|
15201
|
+
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
15202
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
15106
15203
|
},
|
|
15107
15204
|
{
|
|
@@ -15115,42 +15212,42 @@ var methodsByCategory = {
|
|
|
15115
15212
|
name: "setAttributes",
|
|
15116
15213
|
category: "VectorSetItemNode",
|
|
15117
15214
|
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
|
|
15215
|
+
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
15216
|
references: []
|
|
15120
15217
|
},
|
|
15121
15218
|
{
|
|
15122
15219
|
name: "setPluginData",
|
|
15123
15220
|
category: "VectorSetItemNode",
|
|
15124
15221
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
15125
|
-
description: 'Set plugin data by key
|
|
15222
|
+
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
15223
|
references: []
|
|
15127
15224
|
},
|
|
15128
15225
|
{
|
|
15129
15226
|
name: "top",
|
|
15130
15227
|
category: "VectorSetItemNode",
|
|
15131
15228
|
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.',
|
|
15229
|
+
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
15230
|
references: ["CSSDimension", "CSSUnit.Pixel"]
|
|
15134
15231
|
},
|
|
15135
15232
|
{
|
|
15136
15233
|
name: "visible",
|
|
15137
15234
|
category: "VectorSetItemNode",
|
|
15138
15235
|
signature: "visible: boolean",
|
|
15139
|
-
description: "Whether the node is visible on the canvas
|
|
15236
|
+
description: "Whether the node is visible on the canvas.\n\nDefaults to `true`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.",
|
|
15140
15237
|
references: []
|
|
15141
15238
|
},
|
|
15142
15239
|
{
|
|
15143
15240
|
name: "walk",
|
|
15144
15241
|
category: "VectorSetItemNode",
|
|
15145
15242
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
15146
|
-
description: "Walk this node and its descendants recursively
|
|
15243
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
15147
15244
|
references: ["AnyNode"]
|
|
15148
15245
|
},
|
|
15149
15246
|
{
|
|
15150
15247
|
name: "width",
|
|
15151
15248
|
category: "VectorSetItemNode",
|
|
15152
15249
|
signature: "width: WidthLength | null",
|
|
15153
|
-
description: 'Width of the node
|
|
15250
|
+
description: 'Width of the node.\n\nAccepts pixel, percentage, fraction values, or `"fit-content"`.\nSupported by FrameNode, TextNode, SVGNode, ComponentInstanceNode, VectorSetItemNode.',
|
|
15154
15251
|
references: ["WidthLength"]
|
|
15155
15252
|
},
|
|
15156
15253
|
{
|
|
@@ -15180,7 +15277,7 @@ var methodsByCategory = {
|
|
|
15180
15277
|
name: "getNodesWithAttribute",
|
|
15181
15278
|
category: "VectorSetNode",
|
|
15182
15279
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
15183
|
-
description: 'Get the descendants of this node that support `attribute
|
|
15280
|
+
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
15281
|
references: ["T", "Node"]
|
|
15185
15282
|
},
|
|
15186
15283
|
{
|
|
@@ -15194,7 +15291,7 @@ var methodsByCategory = {
|
|
|
15194
15291
|
name: "getNodesWithType",
|
|
15195
15292
|
category: "VectorSetNode",
|
|
15196
15293
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
15197
|
-
description: 'Get descendants of this node that match the given type
|
|
15294
|
+
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
15295
|
references: ["FrameNode"]
|
|
15199
15296
|
},
|
|
15200
15297
|
{
|
|
@@ -15208,7 +15305,7 @@ var methodsByCategory = {
|
|
|
15208
15305
|
name: "getPluginData",
|
|
15209
15306
|
category: "VectorSetNode",
|
|
15210
15307
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
15211
|
-
description: "Get plugin data by key
|
|
15308
|
+
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
15309
|
references: []
|
|
15213
15310
|
},
|
|
15214
15311
|
{
|
|
@@ -15229,7 +15326,7 @@ var methodsByCategory = {
|
|
|
15229
15326
|
name: "navigateTo",
|
|
15230
15327
|
category: "VectorSetNode",
|
|
15231
15328
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
15232
|
-
description: "Navigate to this node
|
|
15329
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
15233
15330
|
references: ["NavigableOptions"]
|
|
15234
15331
|
},
|
|
15235
15332
|
{
|
|
@@ -15250,21 +15347,21 @@ var methodsByCategory = {
|
|
|
15250
15347
|
name: "setAttributes",
|
|
15251
15348
|
category: "VectorSetNode",
|
|
15252
15349
|
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
|
|
15350
|
+
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
15351
|
references: []
|
|
15255
15352
|
},
|
|
15256
15353
|
{
|
|
15257
15354
|
name: "setPluginData",
|
|
15258
15355
|
category: "VectorSetNode",
|
|
15259
15356
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
15260
|
-
description: 'Set plugin data by key
|
|
15357
|
+
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
15358
|
references: []
|
|
15262
15359
|
},
|
|
15263
15360
|
{
|
|
15264
15361
|
name: "walk",
|
|
15265
15362
|
category: "VectorSetNode",
|
|
15266
15363
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
15267
|
-
description: "Walk this node and its descendants recursively
|
|
15364
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
15268
15365
|
references: ["AnyNode"]
|
|
15269
15366
|
},
|
|
15270
15367
|
{
|
|
@@ -15301,7 +15398,7 @@ var methodsByCategory = {
|
|
|
15301
15398
|
name: "getActiveCollectionItem",
|
|
15302
15399
|
category: "WebPageNode",
|
|
15303
15400
|
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",
|
|
15401
|
+
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
15402
|
references: ["CollectionItem"]
|
|
15306
15403
|
},
|
|
15307
15404
|
{
|
|
@@ -15322,7 +15419,7 @@ var methodsByCategory = {
|
|
|
15322
15419
|
name: "getNodesWithAttribute",
|
|
15323
15420
|
category: "WebPageNode",
|
|
15324
15421
|
signature: "getNodesWithAttribute(attribute: T): Promise<Node[]>",
|
|
15325
|
-
description: 'Get the descendants of this node that support `attribute
|
|
15422
|
+
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
15423
|
references: ["T", "Node"]
|
|
15327
15424
|
},
|
|
15328
15425
|
{
|
|
@@ -15336,7 +15433,7 @@ var methodsByCategory = {
|
|
|
15336
15433
|
name: "getNodesWithType",
|
|
15337
15434
|
category: "WebPageNode",
|
|
15338
15435
|
signature: 'getNodesWithType(type: "FrameNode"): Promise<FrameNode[]>',
|
|
15339
|
-
description: 'Get descendants of this node that match the given type
|
|
15436
|
+
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
15437
|
references: ["FrameNode"]
|
|
15341
15438
|
},
|
|
15342
15439
|
{
|
|
@@ -15350,7 +15447,7 @@ var methodsByCategory = {
|
|
|
15350
15447
|
name: "getPluginData",
|
|
15351
15448
|
category: "WebPageNode",
|
|
15352
15449
|
signature: "getPluginData(key: string): Promise<string | null>",
|
|
15353
|
-
description: "Get plugin data by key
|
|
15450
|
+
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
15451
|
references: []
|
|
15355
15452
|
},
|
|
15356
15453
|
{
|
|
@@ -15371,7 +15468,7 @@ var methodsByCategory = {
|
|
|
15371
15468
|
name: "navigateTo",
|
|
15372
15469
|
category: "WebPageNode",
|
|
15373
15470
|
signature: 'navigateTo(opts?: Pick<NavigableOptions, "select" | "zoomIntoView">): Promise<void>',
|
|
15374
|
-
description: "Navigate to this node
|
|
15471
|
+
description: "Navigate to this node.\n\nMay switch modes to reveal the relevant view.",
|
|
15375
15472
|
references: ["NavigableOptions"]
|
|
15376
15473
|
},
|
|
15377
15474
|
{
|
|
@@ -15399,21 +15496,21 @@ var methodsByCategory = {
|
|
|
15399
15496
|
name: "setAttributes",
|
|
15400
15497
|
category: "WebPageNode",
|
|
15401
15498
|
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
|
|
15499
|
+
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
15500
|
references: []
|
|
15404
15501
|
},
|
|
15405
15502
|
{
|
|
15406
15503
|
name: "setPluginData",
|
|
15407
15504
|
category: "WebPageNode",
|
|
15408
15505
|
signature: "setPluginData(key: string, value: string | null): Promise<void>",
|
|
15409
|
-
description: 'Set plugin data by key
|
|
15506
|
+
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
15507
|
references: []
|
|
15411
15508
|
},
|
|
15412
15509
|
{
|
|
15413
15510
|
name: "walk",
|
|
15414
15511
|
category: "WebPageNode",
|
|
15415
15512
|
signature: "walk(this: AnyNode): AsyncGenerator<AnyNode>",
|
|
15416
|
-
description: "Walk this node and its descendants recursively
|
|
15513
|
+
description: "Walk this node and its descendants recursively.\n\nUses an async generator. Yields nodes depth-first.",
|
|
15417
15514
|
references: ["AnyNode"]
|
|
15418
15515
|
},
|
|
15419
15516
|
{
|
|
@@ -15432,15 +15529,15 @@ function getMethod(query) {
|
|
|
15432
15529
|
return methods?.find((m) => m.name === methodName);
|
|
15433
15530
|
}
|
|
15434
15531
|
__name(getMethod, "getMethod");
|
|
15435
|
-
function getClass(
|
|
15436
|
-
const info = classes[
|
|
15532
|
+
function getClass(name2) {
|
|
15533
|
+
const info = classes[name2.toLowerCase()];
|
|
15437
15534
|
if (!info) return void 0;
|
|
15438
|
-
const methods = methodsByCategory[
|
|
15535
|
+
const methods = methodsByCategory[name2.toLowerCase()] ?? [];
|
|
15439
15536
|
return { info, methods };
|
|
15440
15537
|
}
|
|
15441
15538
|
__name(getClass, "getClass");
|
|
15442
|
-
function getType(
|
|
15443
|
-
return types[
|
|
15539
|
+
function getType(name2) {
|
|
15540
|
+
return types[name2.toLowerCase()];
|
|
15444
15541
|
}
|
|
15445
15542
|
__name(getType, "getType");
|
|
15446
15543
|
|
|
@@ -15457,10 +15554,10 @@ function formatDocComment(text, indent = "") {
|
|
|
15457
15554
|
].join("\n");
|
|
15458
15555
|
}
|
|
15459
15556
|
__name(formatDocComment, "formatDocComment");
|
|
15460
|
-
function formatClass(
|
|
15557
|
+
function formatClass(name2, description, methods) {
|
|
15461
15558
|
const lines = [];
|
|
15462
15559
|
if (description) lines.push(formatDocComment(description));
|
|
15463
|
-
lines.push(`class ${
|
|
15560
|
+
lines.push(`class ${name2} {`);
|
|
15464
15561
|
let first = true;
|
|
15465
15562
|
for (const method of methods) {
|
|
15466
15563
|
if (method.signature.startsWith("[")) continue;
|
|
@@ -15758,8 +15855,8 @@ var META_SKILL_NAME = "framer";
|
|
|
15758
15855
|
var CODE_COMPONENTS_SKILL_NAME = "framer-code-components";
|
|
15759
15856
|
var __dirname2 = path6.dirname(fileURLToPath(import.meta.url));
|
|
15760
15857
|
var skillsDocsDir = path6.join(__dirname2, "..", "docs", "skills");
|
|
15761
|
-
function readSkillDoc(
|
|
15762
|
-
return fs6.readFileSync(path6.join(skillsDocsDir,
|
|
15858
|
+
function readSkillDoc(name2) {
|
|
15859
|
+
return fs6.readFileSync(path6.join(skillsDocsDir, name2), "utf-8").trimEnd();
|
|
15763
15860
|
}
|
|
15764
15861
|
__name(readSkillDoc, "readSkillDoc");
|
|
15765
15862
|
function buildMetaSkill() {
|
|
@@ -16254,9 +16351,9 @@ session.command("list").description("List all active sessions").action(async ()
|
|
|
16254
16351
|
var project = program.command("project").description("Manage projects");
|
|
16255
16352
|
project.command("list").description("List recently used projects").action(() => {
|
|
16256
16353
|
printJson(
|
|
16257
|
-
listProjects().map(({ projectId, name, lastUsedAt }) => ({
|
|
16354
|
+
listProjects().map(({ projectId, name: name2, lastUsedAt }) => ({
|
|
16258
16355
|
projectId,
|
|
16259
|
-
name,
|
|
16356
|
+
name: name2,
|
|
16260
16357
|
lastUsedAt
|
|
16261
16358
|
}))
|
|
16262
16359
|
);
|
|
@@ -16277,6 +16374,32 @@ project.command("auth <projectUrlOrId> [apiKey]").description("Authorize and sav
|
|
|
16277
16374
|
});
|
|
16278
16375
|
print(`Project ${projectId} saved`);
|
|
16279
16376
|
});
|
|
16377
|
+
async function saveAuthResult(verb, authFn) {
|
|
16378
|
+
try {
|
|
16379
|
+
const result = await authFn();
|
|
16380
|
+
const { projectId } = result;
|
|
16381
|
+
if (!projectId) throw new Error("No project ID returned from browser flow");
|
|
16382
|
+
debug(`project.${verb}`, `${projectId} \u2014 saving credentials`);
|
|
16383
|
+
saveProject({ projectId, apiKey: result.apiKey, userId: result.userId });
|
|
16384
|
+
print(`Project ${projectId} saved`);
|
|
16385
|
+
} catch (error) {
|
|
16386
|
+
printError(`Failed to ${verb} project: ${formatError(error)}`);
|
|
16387
|
+
await waitForTrackingToFinish();
|
|
16388
|
+
process.exit(1);
|
|
16389
|
+
}
|
|
16390
|
+
}
|
|
16391
|
+
__name(saveAuthResult, "saveAuthResult");
|
|
16392
|
+
project.command("new").description(
|
|
16393
|
+
"Create a new Framer project via browser approval and save its credentials"
|
|
16394
|
+
).action(() => saveAuthResult("create", acquireAuthWithNewProject));
|
|
16395
|
+
project.command("remix <sourceProjectUrlOrId>").description(
|
|
16396
|
+
"Remix (duplicate) an existing Framer project via browser approval and save its credentials"
|
|
16397
|
+
).action(
|
|
16398
|
+
(sourceProjectUrlOrId) => saveAuthResult(
|
|
16399
|
+
"remix",
|
|
16400
|
+
() => acquireAuthWithRemixProject(sourceProjectUrlOrId)
|
|
16401
|
+
)
|
|
16402
|
+
);
|
|
16280
16403
|
session.command("destroy <sessionId>").description("Destroy a session").action(async (sessionId) => {
|
|
16281
16404
|
await ensureRelayForCli();
|
|
16282
16405
|
try {
|