@dxtmisha/figma-code 0.1.1 → 0.1.2
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/library.js +8 -8
- package/package.json +9 -11
- package/ai-doc.ru.txt +0 -12
- /package/{ai-description.txt → ai-description.md} +0 -0
- /package/{ai-doc.txt → ai-doc.md} +0 -0
- /package/{ai-types.txt → ai-types.md} +0 -0
- /package/dist/{src/classes → classes}/FigmaAiText.d.ts +0 -0
- /package/dist/{src/classes → classes}/FigmaClientStorage.d.ts +0 -0
- /package/dist/{src/classes → classes}/FigmaFrame.d.ts +0 -0
- /package/dist/{src/classes → classes}/FigmaFramesSelected.d.ts +0 -0
- /package/dist/{src/classes → classes}/FigmaItem.d.ts +0 -0
- /package/dist/{src/classes → classes}/FigmaPluginMessenger.d.ts +0 -0
- /package/dist/{src/classes → classes}/FigmaStorage.d.ts +0 -0
- /package/dist/{src/classes → classes}/FigmaStorageData.d.ts +0 -0
- /package/dist/{src/classes → classes}/FigmaTopLevelFrames.d.ts +0 -0
- /package/dist/{src/config.d.ts → config.d.ts} +0 -0
- /package/dist/{src/functions → functions}/getFigmaFrameById.d.ts +0 -0
- /package/dist/{src/functions → functions}/getFigmaItemById.d.ts +0 -0
- /package/dist/{src/functions → functions}/getFigmaItemByIdOrRoot.d.ts +0 -0
- /package/dist/{src/functions → functions}/makeFigmaFrameSelection.d.ts +0 -0
- /package/dist/{src/functions → functions}/makeFigmaTexts.d.ts +0 -0
- /package/dist/{src/functions → functions}/setupClientStorage.d.ts +0 -0
- /package/dist/{src/functions → functions}/setupFrameSelection.d.ts +0 -0
- /package/dist/{src/functions → functions}/setupFrameStyles.d.ts +0 -0
- /package/dist/{src/functions → functions}/setupStorage.d.ts +0 -0
- /package/dist/{src/functions → functions}/toFrameSelection.d.ts +0 -0
- /package/dist/{src/library.d.ts → library.d.ts} +0 -0
- /package/dist/{src/media → media}/prompt/text.ru.d.ts +0 -0
- /package/dist/{src/types → types}/figmaTypes.d.ts +0 -0
package/dist/library.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { executeFunction as e, forEach as t, getCurrentTime as n, isNull as r, toArray as i } from "@dxtmisha/functional-basic";
|
|
2
2
|
import { FIGMA_FRAME_STYLES_MESSENGER_NAME as a, FigmaPostAbstract as o, FigmaPostCode as s, UI_FIGMA_CLIENT_STORAGE_GET as c, UI_FIGMA_CLIENT_STORAGE_SET as l, UI_FIGMA_FRAMES_POST_NAME as u, UI_FIGMA_FRAMES_SELECTED_ADD_NAME as d, UI_FIGMA_FRAMES_SELECTED_POST_NAME as f, UI_FIGMA_FRAME_GET_SELECTION as p, UI_FIGMA_FRAME_SET_SELECTION as m, UI_FIGMA_STORAGE_GET as h, UI_FIGMA_STORAGE_SET as g } from "@dxtmisha/figma";
|
|
3
|
-
//#region \0@oxc-project+runtime@0.
|
|
3
|
+
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/typeof.js
|
|
4
4
|
function _(e) {
|
|
5
5
|
"@babel/helpers - typeof";
|
|
6
6
|
return _ = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
@@ -10,7 +10,7 @@ function _(e) {
|
|
|
10
10
|
}, _(e);
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region \0@oxc-project+runtime@0.
|
|
13
|
+
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/toPrimitive.js
|
|
14
14
|
function v(e, t) {
|
|
15
15
|
if (_(e) != "object" || !e) return e;
|
|
16
16
|
var n = e[Symbol.toPrimitive];
|
|
@@ -22,13 +22,13 @@ function v(e, t) {
|
|
|
22
22
|
return (t === "string" ? String : Number)(e);
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
|
-
//#region \0@oxc-project+runtime@0.
|
|
25
|
+
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/toPropertyKey.js
|
|
26
26
|
function y(e) {
|
|
27
27
|
var t = v(e, "string");
|
|
28
28
|
return _(t) == "symbol" ? t : t + "";
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
|
-
//#region \0@oxc-project+runtime@0.
|
|
31
|
+
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/defineProperty.js
|
|
32
32
|
function b(e, t, n) {
|
|
33
33
|
return (t = y(t)) in e ? Object.defineProperty(e, t, {
|
|
34
34
|
value: n,
|
|
@@ -535,11 +535,11 @@ function U() {
|
|
|
535
535
|
id: r
|
|
536
536
|
});
|
|
537
537
|
e.add(h, async (e) => {
|
|
538
|
-
let { name: n, value: r, id: i } = e == null ? {} : e;
|
|
539
|
-
t(n,
|
|
538
|
+
let { name: n, value: r, id: i } = e == null ? {} : e, a = (await A.getInstanceById(n, i)).get(r);
|
|
539
|
+
t(n, a, i);
|
|
540
540
|
}), e.add(g, async (e) => {
|
|
541
|
-
let { name: n, value: r, id: i } = e == null ? {} : e;
|
|
542
|
-
t(n,
|
|
541
|
+
let { name: n, value: r, id: i } = e == null ? {} : e, a = (await A.getInstanceById(n, i)).set(r);
|
|
542
|
+
t(n, a, i);
|
|
543
543
|
});
|
|
544
544
|
}
|
|
545
545
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/figma-code",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Structured TypeScript abstraction layer for Figma Plugin development, focused on node manipulation, state management, and messaging.",
|
|
7
7
|
"keywords": [
|
|
@@ -35,10 +35,9 @@
|
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"dist",
|
|
38
|
-
"ai-description.
|
|
39
|
-
"ai-doc.
|
|
40
|
-
"ai-
|
|
41
|
-
"ai-types.txt",
|
|
38
|
+
"ai-description.md",
|
|
39
|
+
"ai-doc.md",
|
|
40
|
+
"ai-types.md",
|
|
42
41
|
"CHANGELOG.md",
|
|
43
42
|
"LICENSE",
|
|
44
43
|
"package.json",
|
|
@@ -46,19 +45,18 @@
|
|
|
46
45
|
],
|
|
47
46
|
"main": "dist/library.js",
|
|
48
47
|
"module": "dist/library.js",
|
|
49
|
-
"types": "dist/
|
|
48
|
+
"types": "dist/library.d.ts",
|
|
50
49
|
"exports": {
|
|
51
50
|
".": {
|
|
52
51
|
"import": "./dist/library.js",
|
|
53
|
-
"types": "./dist/
|
|
54
|
-
}
|
|
55
|
-
"./style.css": "./dist/style.css"
|
|
52
|
+
"types": "./dist/library.d.ts"
|
|
53
|
+
}
|
|
56
54
|
},
|
|
57
|
-
"
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@dxtmisha/figma": "*",
|
|
58
57
|
"@dxtmisha/functional-basic": "*",
|
|
59
58
|
"@figma/plugin-typings": "*"
|
|
60
59
|
},
|
|
61
|
-
"dependencies": {},
|
|
62
60
|
"devDependencies": {},
|
|
63
61
|
"sideEffects": false
|
|
64
62
|
}
|
package/ai-doc.ru.txt
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
ПАКЕТ ЛОГИКИ ПЛАГИНА FIGMA (BACKEND):
|
|
2
|
-
Данная библиотека предназначена для работы на стороне основного процесса плагина (Code side). Она обеспечивает прямой доступ к Figma API и реализует логику обработки запросов от UI.
|
|
3
|
-
|
|
4
|
-
1. ПРЕДНАЗНАЧЕНИЕ: Реализация фоновой логики плагина. Отвечает за манипуляцию объектами Figma (фреймы, текст, стили), управление хранилищем (`FigmaStorage`) и отправку данных обратно в UI через `FigmaPluginMessenger`.
|
|
5
|
-
2. ВЗАИМОДЕЙСТВИЕ: Работает в связке с пакетом `@dxtmisha/figma`. Получает сообщения от UI, выполняет операции через Figma API и отправляет результат обратно.
|
|
6
|
-
3. КЛЮЧЕВЫЕ КЛАССЫ:
|
|
7
|
-
- `FigmaPluginMessenger`: Синглтон для управления сообщениями на стороне Backend.
|
|
8
|
-
- `FigmaFrame`, `FigmaItem`: Обертки для удобной работы с узлами (nodes) Figma.
|
|
9
|
-
- `setup...` функции: Слушатели, которые автоматически обрабатывают стандартные запросы от UI (например, `setupFrameSelection`).
|
|
10
|
-
|
|
11
|
-
Используй этот пакет только в коде, который выполняется в основном процессе плагина Figma (main thread).
|
|
12
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|