@feugene/granularity 0.45.0 → 0.46.0

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.
Files changed (32) hide show
  1. package/README.md +2 -2
  2. package/dist/chunks/{config-ChnYtO4o.js → config-bjDf8nBf.js} +16 -1
  3. package/dist/chunks/config-bjDf8nBf.js.map +1 -0
  4. package/dist/chunks/{generated-DAKeOOqm.js → generated-CQ4h6Ieq.js} +28 -0
  5. package/dist/chunks/{generated-DAKeOOqm.js.map → generated-CQ4h6Ieq.js.map} +1 -1
  6. package/dist/chunks/{granular-provider-D_8_l-gM.js → granular-provider-CsN_R9dB.js} +1 -1
  7. package/dist/chunks/{granular-provider-D_8_l-gM.js.map → granular-provider-CsN_R9dB.js.map} +1 -1
  8. package/dist/components/GrJsonViewer/chunks/{GrJsonViewer-CdlWMGnF.js → GrJsonViewer-C6q8dEEZ.js} +1 -1
  9. package/dist/components/GrJsonViewer/chunks/{GrJsonViewer-CdlWMGnF.js.map → GrJsonViewer-C6q8dEEZ.js.map} +1 -1
  10. package/dist/components/GrJsonViewer/index.js +1 -1
  11. package/dist/components/GrTree/chunks/{GrTree-DnDGW0xO.js → GrTree-6yZrncJE.js} +52 -18
  12. package/dist/components/GrTree/chunks/GrTree-6yZrncJE.js.map +1 -0
  13. package/dist/components/GrTree/index.js +1 -1
  14. package/dist/components/GrTree/styles.css +1 -1
  15. package/dist/components/GrTreeSections/chunks/{GrTreeSections-D2PQ87mw.js → GrTreeSections-DcmDcLwj.js} +5 -3
  16. package/dist/components/GrTreeSections/chunks/GrTreeSections-DcmDcLwj.js.map +1 -0
  17. package/dist/components/GrTreeSections/index.js +2 -2
  18. package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-DzheDCuZ.js → GrTreeSelect-DBu5nMGA.js} +1 -1
  19. package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-DzheDCuZ.js.map → GrTreeSelect-DBu5nMGA.js.map} +1 -1
  20. package/dist/components/GrTreeSelect/index.js +1 -1
  21. package/dist/granular-provider-node.js +1 -1
  22. package/dist/granular-provider.js +1 -1
  23. package/dist/index.js +5 -5
  24. package/dist/theme.js +1 -1
  25. package/dist/tokens.js +1 -1
  26. package/dist/types/components/GrTree/grTreeStyles.d.ts +1 -1
  27. package/dist/types/components/GrTreeSections/grTreeSectionsStyles.d.ts +15 -0
  28. package/dist/web-types.json +1 -1
  29. package/package.json +1 -1
  30. package/dist/chunks/config-ChnYtO4o.js.map +0 -1
  31. package/dist/components/GrTree/chunks/GrTree-DnDGW0xO.js.map +0 -1
  32. package/dist/components/GrTreeSections/chunks/GrTreeSections-D2PQ87mw.js.map +0 -1
package/README.md CHANGED
@@ -91,10 +91,10 @@ from its own chunk, so a granular import already brings everything it needs.
91
91
  <!-- entry-sizes:generated:start lang=en -->
92
92
  | What you import | gzip | of the barrel |
93
93
  | --- | ---: | ---: |
94
- | the whole package from the root | 595.8 kB | 100 % |
94
+ | the whole package from the root | 596.7 kB | 100 % |
95
95
  | the lightest component — `GrButtonGroup` | 1.8 kB | < 1 % |
96
96
  | the median component — `GrNavbar` | 15.4 kB | 3 % |
97
- | the 5 heaviest together | 173.8 kB | 29 % |
97
+ | the 5 heaviest together | 174.3 kB | 29 % |
98
98
 
99
99
  These numbers **do not add up**: shared code is counted again in every row but paid for once, which is why
100
100
  the set is shown as a union rather than a sum. They are an upper bound — the gzip of everything a subpath
@@ -9,6 +9,21 @@ var treeSectionsRootClass = "flex flex-col gap-4";
9
9
  var treeSectionsHeadClass = "flex items-baseline gap-2 pb-1 text-[length:var(--gr-text-xs)] leading-[var(--gr-leading-xs)] uppercase tracking-wider text-[var(--gr-muted-fg)] border-b border-[var(--gr-brd)]";
10
10
  var treeSectionsCountClass = "ml-auto text-[var(--gr-muted-fg)] [font-variant-numeric:tabular-nums]";
11
11
  var treeSectionsGroupClass = "flex flex-col gap-1";
12
+ /**
13
+ * Собственный вид строк секций. Задаётся на самом дереве, а не на обёртке:
14
+ * `GrTree` объявляет значения по умолчанию на своём корне, и переменная,
15
+ * выставленная предком, до строки не доходит вовсе — её перекрывает
16
+ * собственное объявление дерева.
17
+ *
18
+ * Полоса у выбранной строки несёт то же, что заголовок группы, —
19
+ * принадлежность: подложка выбора отступает на отступ уровня, и на вложенных
20
+ * строках выбор переставал попадать в один вертикальный ряд с остальными.
21
+ */
22
+ var treeSectionsRowVars = {
23
+ "--gr-tree-row-min-height": "32px",
24
+ "--gr-tree-row-radius": "7px",
25
+ "--gr-tree-row-current-bar-width": "2px"
26
+ };
12
27
  //#endregion
13
28
  //#region src/components/GrTreeSections/safelist.ts
14
29
  var grTreeSectionsSafelist = [.../* @__PURE__ */ new Set([
@@ -25,4 +40,4 @@ var grTreeSectionsConfig = defineGranularComponent(import.meta.url, {
25
40
  safelist: grTreeSectionsSafelist
26
41
  });
27
42
  //#endregion
28
- export { treeSectionsHeadClass as a, treeSectionsGroupClass as i, grTreeSectionsSafelist as n, treeSectionsRootClass as o, treeSectionsCountClass as r, grTreeSectionsConfig as t };
43
+ export { treeSectionsHeadClass as a, treeSectionsGroupClass as i, grTreeSectionsSafelist as n, treeSectionsRootClass as o, treeSectionsCountClass as r, treeSectionsRowVars as s, grTreeSectionsConfig as t };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-bjDf8nBf.js","names":[],"sources":["../../src/components/GrTreeSections/grTreeSectionsStyles.ts","../../src/components/GrTreeSections/safelist.ts","../../src/components/GrTreeSections/config.ts"],"sourcesContent":["export const treeSectionsRootClass = 'flex flex-col gap-4'\n\n/**\n * Заголовок группы набирается капителью и отделяется линией: он объявляет\n * рубрику, а не узел, и должен читаться иначе, чем строки под ним.\n */\nexport const treeSectionsHeadClass = 'flex items-baseline gap-2 pb-1 text-[length:var(--gr-text-xs)] leading-[var(--gr-leading-xs)] uppercase tracking-wider text-[var(--gr-muted-fg)] border-b border-[var(--gr-brd)]'\n\nexport const treeSectionsCountClass = 'ml-auto text-[var(--gr-muted-fg)] [font-variant-numeric:tabular-nums]'\n\nexport const treeSectionsGroupClass = 'flex flex-col gap-1'\n\n/**\n * Собственный вид строк секций. Задаётся на самом дереве, а не на обёртке:\n * `GrTree` объявляет значения по умолчанию на своём корне, и переменная,\n * выставленная предком, до строки не доходит вовсе — её перекрывает\n * собственное объявление дерева.\n *\n * Полоса у выбранной строки несёт то же, что заголовок группы, —\n * принадлежность: подложка выбора отступает на отступ уровня, и на вложенных\n * строках выбор переставал попадать в один вертикальный ряд с остальными.\n */\nexport const treeSectionsRowVars = {\n '--gr-tree-row-min-height': '32px',\n '--gr-tree-row-radius': '7px',\n '--gr-tree-row-current-bar-width': '2px',\n} as const\n","import { splitClassTokens } from '../shared/classTokens'\n\nimport {\n treeSectionsCountClass,\n treeSectionsGroupClass,\n treeSectionsHeadClass,\n treeSectionsRootClass,\n} from './grTreeSectionsStyles'\n\nexport const grTreeSectionsSafelist = [...new Set([\n ...splitClassTokens(treeSectionsRootClass),\n ...splitClassTokens(treeSectionsHeadClass),\n ...splitClassTokens(treeSectionsCountClass),\n ...splitClassTokens(treeSectionsGroupClass),\n])]\n","import { defineGranularComponent } from '@feugene/unocss-preset-granular/contract'\n\nimport { grTreeSectionsSafelist } from './safelist'\n\nexport const grTreeSectionsConfig = defineGranularComponent(import.meta.url, {\n name: 'GrTreeSections',\n dependencies: ['GrTree'],\n safelist: grTreeSectionsSafelist,\n})\n"],"mappings":";;;AAAA,IAAa,wBAAwB;;;;;AAMrC,IAAa,wBAAwB;AAErC,IAAa,yBAAyB;AAEtC,IAAa,yBAAyB;;;;;;;;;;;AAYtC,IAAa,sBAAsB;CACjC,4BAA4B;CAC5B,wBAAwB;CACxB,mCAAmC;AACrC;;;ACjBA,IAAa,yBAAyB,CAAC,mBAAG,IAAI,IAAI;CAChD,GAAG,iBAAiB,qBAAqB;CACzC,GAAG,iBAAiB,qBAAqB;CACzC,GAAG,iBAAiB,sBAAsB;CAC1C,GAAG,iBAAiB,sBAAsB;AAC5C,CAAC,CAAC;;;ACVF,IAAa,uBAAuB,wBAAwB,YAAY,KAAK;CAC3E,MAAM;CACN,cAAc,CAAC,QAAQ;CACvB,UAAU;AACZ,CAAC"}
@@ -3550,6 +3550,34 @@ var grComponentTokens = [
3550
3550
  "default": "var(--gr-tree-row-color)",
3551
3551
  "description": "Цвет текста выбранной строки. Отдельно от --gr-tree-row-color, потому что насыщенная подложка выбора требует своего текста: без этого сплошную плашку выбора нельзя сделать читаемой."
3552
3552
  },
3553
+ {
3554
+ "owner": "GrTree",
3555
+ "name": "--gr-tree-row-current-bar-width",
3556
+ "kind": "css",
3557
+ "default": "0px",
3558
+ "description": "Ширина полосы у левого края выбранной строки. По умолчанию полосы нет; вид, отмечающий выбор без подложки, включает её одной строкой. Рисуется на самой строке, поэтому стоит у края списка, а не уезжает вправо с отступом уровня."
3559
+ },
3560
+ {
3561
+ "owner": "GrTree",
3562
+ "name": "--gr-tree-row-current-bar-color",
3563
+ "kind": "css",
3564
+ "default": "var(--gr-primary)",
3565
+ "description": "Цвет полосы у выбранной строки."
3566
+ },
3567
+ {
3568
+ "owner": "GrTree",
3569
+ "name": "--gr-tree-checkbox-brd-width",
3570
+ "kind": "css",
3571
+ "default": "1px",
3572
+ "description": "Толщина рамки квадрата отметки. Вынесена отдельно от размера: на увеличенном квадрате волосяная рамка перестаёт читаться как рамка."
3573
+ },
3574
+ {
3575
+ "owner": "GrTree",
3576
+ "name": "--gr-tree-branch-font-weight",
3577
+ "kind": "css",
3578
+ "default": "600",
3579
+ "description": "Начертание подписи ветки. Плотнее листа, чтобы ветка и лист не выглядели одинаково. Гасится там, где вес несёт уровень, а не ветвистость."
3580
+ },
3553
3581
  {
3554
3582
  "owner": "GrTree",
3555
3583
  "name": "--gr-tree-font-size",