@dxtmisha/figma-code 0.1.0 → 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/README.md CHANGED
@@ -65,7 +65,7 @@ messenger.post('UPDATE_STATUS', { status: 'ready' })
65
65
 
66
66
  Full API reference and guides:
67
67
 
68
- **[📖 https://dxtmisha.github.io/dxt-ui/?path=/docs/dxtmisha-en-figma-code-about-library--docs](https://dxtmisha.github.io/dxt-ui/?path=/docs/dxtmisha-en-figma-code-about-library--docs)**
68
+ **[📖 https://dxtmisha.github.io/dxt-ui/?path=/docs/dxtmisha-en-ui-figma-about-the-library--docs](https://dxtmisha.github.io/dxt-ui/?path=/docs/dxtmisha-en-ui-figma-about-the-library--docs)**
69
69
 
70
70
  ## License
71
71
 
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.128.0/helpers/typeof.js
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.128.0/helpers/toPrimitive.js
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.128.0/helpers/toPropertyKey.js
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.128.0/helpers/defineProperty.js
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,
@@ -41,7 +41,7 @@ function b(e, t, n) {
41
41
  //#region src/classes/FigmaStorageData.ts
42
42
  var x = class {
43
43
  constructor(e, t) {
44
- b(this, "value", void 0), b(this, "age", void 0), this.name = e, this.cache = t;
44
+ b(this, "name", void 0), b(this, "cache", void 0), b(this, "value", void 0), b(this, "age", void 0), this.name = e, this.cache = t;
45
45
  }
46
46
  isNull() {
47
47
  return r(this.value);
@@ -95,7 +95,7 @@ var x = class {
95
95
  return C[e] = n, n;
96
96
  }
97
97
  constructor(e, t) {
98
- b(this, "data", void 0), this.name = e, this.cache = t, this.data = new x(e, t);
98
+ b(this, "name", void 0), b(this, "cache", void 0), b(this, "data", void 0), this.name = e, this.cache = t, this.data = new x(e, t);
99
99
  }
100
100
  async get(e) {
101
101
  if (await this.make(), this.data.isValue()) return this.data.get();
@@ -115,7 +115,7 @@ var x = class {
115
115
  }
116
116
  }, C = {}, w = class e {
117
117
  constructor(e) {
118
- this.item = e;
118
+ b(this, "item", void 0), this.item = e;
119
119
  }
120
120
  isDocument() {
121
121
  return this.getType() === "DOCUMENT";
@@ -244,7 +244,7 @@ var x = class {
244
244
  }
245
245
  }, T = class e {
246
246
  constructor(e, t = !1) {
247
- b(this, "mainItem", []), b(this, "items", []), this.page = e, this.selection = t, this.mainItem = this.initMain(), this.items = this.initBySelection();
247
+ b(this, "page", void 0), b(this, "selection", void 0), b(this, "mainItem", []), b(this, "items", []), this.page = e, this.selection = t, this.mainItem = this.initMain(), this.items = this.initBySelection();
248
248
  }
249
249
  isSelection() {
250
250
  return this.selection && "selection" in this.page;
@@ -371,7 +371,7 @@ var A = class t {
371
371
  return t.getInstance(e, r);
372
372
  }
373
373
  constructor(e, t = figma.root, n) {
374
- b(this, "data", void 0), this.name = e, this.item = t, this.cache = n, this.data = new x(e, n);
374
+ b(this, "name", void 0), b(this, "item", void 0), b(this, "cache", void 0), b(this, "data", void 0), this.name = e, this.item = t, this.cache = n, this.data = new x(e, n);
375
375
  }
376
376
  get(e) {
377
377
  if (this.make(), this.data.isValue()) return this.data.get();
@@ -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, (await A.getInstanceById(n, i)).get(r), i);
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, (await A.getInstanceById(n, i)).set(r), i);
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.0",
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.txt",
39
- "ai-doc.ru.txt",
40
- "ai-doc.txt",
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",
@@ -51,12 +50,13 @@
51
50
  ".": {
52
51
  "import": "./dist/library.js",
53
52
  "types": "./dist/library.d.ts"
54
- },
55
- "./style.css": "./dist/style.css",
56
- "./types/*": "./dist/*",
57
- "./types/**/*.d.ts": "./dist/**/*.d.ts"
53
+ }
54
+ },
55
+ "dependencies": {
56
+ "@dxtmisha/figma": "*",
57
+ "@dxtmisha/functional-basic": "*",
58
+ "@figma/plugin-typings": "*"
58
59
  },
59
- "dependencies": {},
60
60
  "devDependencies": {},
61
61
  "sideEffects": false
62
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