Skip to content

Commit 6dac7a6

Browse files
committed
Remove vector set support
1 parent 4cc949c commit 6dac7a6

File tree

5 files changed

+7
-32
lines changed

5 files changed

+7
-32
lines changed

plugins/renamer/src/App.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,6 @@
303303
color: #999;
304304
}
305305

306-
.after .vector-set-item-icon {
307-
color: #09f;
308-
}
309-
310306
/* Overflow gradients */
311307

312308
.overflow-gradient-top {

plugins/renamer/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function App() {
5959
() =>
6060
new Indexer({
6161
scope: "page",
62-
includedNodeTypes: ["FrameNode", "SVGNode", "ComponentInstanceNode", "TextNode", "VectorSetItemNode"],
62+
includedNodeTypes: ["FrameNode", "SVGNode", "ComponentInstanceNode", "TextNode"],
6363
includedAttributes: [],
6464

6565
onRestarted: () => {

plugins/renamer/src/components/LayerIcon.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,6 @@ export default function LayerIcon({ type }: Props) {
5353
)
5454
break
5555

56-
case "VectorSetItemNode":
57-
icon = (
58-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 11" className="vector-set-item-icon">
59-
<path
60-
d="M 4.851 1.121 C 5.14 0.622 5.86 0.622 6.149 1.121 L 10.348 8.374 C 10.638 8.874 10.277 9.5 9.699 9.5 L 1.301 9.5 C 0.723 9.5 0.362 8.874 0.652 8.374 Z"
61-
fill="currentColor"
62-
></path>
63-
</svg>
64-
)
65-
break
66-
6756
default:
6857
icon = null
6958
}

plugins/renamer/src/search/indexer.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
import {
2-
type CanvasRootNode,
3-
framer,
4-
isComponentNode,
5-
isFrameNode,
6-
isTextNode,
7-
isVectorSetNode,
8-
isWebPageNode,
9-
} from "framer-plugin"
1+
import { type CanvasRootNode, framer, isComponentNode, isFrameNode, isTextNode, isWebPageNode } from "framer-plugin"
102
import { isCanvasNode } from "./traits"
113
import type { CanvasNode, IndexEntry } from "./types"
124

@@ -106,19 +98,17 @@ export class Indexer {
10698

10799
private async getPages(): Promise<CanvasRootNode[]> {
108100
const root = await framer.getCanvasRoot()
109-
if (!isWebPageNode(root) && !isVectorSetNode(root) && !isComponentNode(root)) return []
101+
if (!isWebPageNode(root) && !isComponentNode(root)) return []
110102

111103
if (this.scope === "page") {
112104
return [root]
113105
}
114106

115-
const [webPages, componentNodes, vectorSetNodes] = await Promise.all([
107+
const [webPages, componentNodes] = await Promise.all([
116108
framer.getNodesWithType("WebPageNode"),
117109
framer.getNodesWithType("ComponentNode"),
118-
// @ts-expect-error - See https://github.com/framer/plugins/issues/356
119-
framer.getNodesWithType("VectorSetNode"),
120110
])
121-
return [...webPages, ...componentNodes, ...vectorSetNodes]
111+
return [...webPages, ...componentNodes]
122112
}
123113

124114
async start() {

plugins/renamer/src/search/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ComponentInstanceNode, FrameNode, SVGNode, TextNode, VectorSetItemNode } from "framer-plugin"
1+
import type { ComponentInstanceNode, FrameNode, SVGNode, TextNode } from "framer-plugin"
22
import type { Range } from "../utils/text"
33

44
export type IndexNodeType = Exclude<CanvasNode["__class"], "UnknownNode">
@@ -20,4 +20,4 @@ export interface Result {
2020
entry: IndexEntry
2121
}
2222

23-
export type CanvasNode = FrameNode | TextNode | ComponentInstanceNode | SVGNode | VectorSetItemNode
23+
export type CanvasNode = FrameNode | TextNode | ComponentInstanceNode | SVGNode

0 commit comments

Comments
 (0)