comark-file-tree 0.8.0 → 0.8.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.
@@ -74,6 +74,29 @@ const groups = {
74
74
  "#60a5fa"
75
75
  ]
76
76
  }),
77
+ primary: [
78
+ [
79
+ "primary",
80
+ "ui-primary",
81
+ "primary",
82
+ "var(--_comark-foreground)",
83
+ "var(--_comark-foreground)"
84
+ ],
85
+ [
86
+ "primary-foreground",
87
+ "ui-text-inverted",
88
+ "primary-foreground",
89
+ "var(--_comark-background)",
90
+ "var(--_comark-background)"
91
+ ],
92
+ [
93
+ "secondary",
94
+ "ui-secondary",
95
+ "",
96
+ "var(--_comark-muted)",
97
+ "var(--_comark-muted)"
98
+ ]
99
+ ],
77
100
  shadow: [[
78
101
  "shadow",
79
102
  "",
@@ -94,14 +117,16 @@ const resolve = (list, scheme) => list.map((token) => `--_comark-${token[0]}:${c
94
117
  * They resolve on the component rather than `:root`, so a `.dark` class anywhere above it switches the theme, and a
95
118
  * `--comark-*` set on any ancestor still inherits down. `:where()` keeps them at zero specificity.
96
119
  *
97
- * Every block gets the core tokens. Name `"status"` for `--comark-success`, `-danger`, `-warning`, and `-info`, and
98
- * `"shadow"` for `--comark-shadow`, so a block that never draws them doesn't carry them.
120
+ * Every block gets the core tokens. Name `"status"` for `--comark-success`, `-danger`, `-warning`, and `-info`,
121
+ * `"primary"` for `--comark-primary`, `-primary-foreground`, and `-secondary`, and `"shadow"` for `--comark-shadow`, so
122
+ * a block that never draws them doesn't carry them.
99
123
  */
100
124
  function theme(selector, ...extras) {
101
125
  const where = `:where(${selector})`;
102
126
  const added = extras.flatMap((name) => groups[name]);
103
127
  const list = [...tokens, ...added];
104
- const classes = added.length ? `:where(.light,.light *)${where}{${resolve(added, 3)}}:where(.dark,.dark *)${where}{${resolve(added, 4)}}` : "";
128
+ const schemed = added.filter((token) => token[3] !== token[4]);
129
+ const classes = schemed.length ? `:where(.light,.light *)${where}{${resolve(schemed, 3)}}:where(.dark,.dark *)${where}{${resolve(schemed, 4)}}` : "";
105
130
  return `${where}{${resolve(list, 3)};--_comark-radius:var(--comark-radius,calc(var(--ui-radius,calc(var(--radius,.625rem)/2))*2));--_comark-font:var(--comark-font,var(--font-sans,ui-sans-serif,system-ui,sans-serif))}@media (prefers-color-scheme:dark){${where}{${resolve(list, 4)}}}` + classes;
106
131
  }
107
132
  //#endregion
package/dist/client.mjs CHANGED
@@ -1 +1 @@
1
- export { t as addStyles, i as css, n as glyphs, r as marks } from "./client-DcAHu-LK.mjs";
1
+ export { t as addStyles, i as css, n as glyphs, r as marks } from "./client-CmwF7cCV.mjs";
package/dist/html.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as src_default } from "./src-PLku93wQ.mjs";
2
- import { i as css, n as glyphs, r as marks } from "./client-DcAHu-LK.mjs";
2
+ import { i as css, n as glyphs, r as marks } from "./client-CmwF7cCV.mjs";
3
3
  import { escapeHtml } from "comark/utils";
4
4
  import { iconHtml, iconStyles } from "comark-icon/html";
5
5
  //#region ../../shared/text.ts
package/dist/react.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as src_default } from "./src-PLku93wQ.mjs";
2
- import { n as glyphs, r as marks, t as addStyles } from "./client-DcAHu-LK.mjs";
2
+ import { n as glyphs, r as marks, t as addStyles } from "./client-CmwF7cCV.mjs";
3
3
  import { Icon } from "comark-icon/react";
4
4
  import { createElement, useEffect } from "react";
5
5
  //#region src/react.ts
package/dist/vue.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as src_default } from "./src-PLku93wQ.mjs";
2
- import { n as glyphs, r as marks, t as addStyles } from "./client-DcAHu-LK.mjs";
2
+ import { n as glyphs, r as marks, t as addStyles } from "./client-CmwF7cCV.mjs";
3
3
  import { defineComponent, h, onMounted } from "vue";
4
4
  import { Icon } from "comark-icon/vue";
5
5
  //#region src/vue.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comark-file-tree",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "A project's folders and files from an indented list or pasted tree output, with added, removed, and changed entries marked. A Comark plugin.",
5
5
  "keywords": [
6
6
  "comark",
@@ -45,7 +45,7 @@
45
45
  "provenance": true
46
46
  },
47
47
  "dependencies": {
48
- "comark-icon": "^0.8.0"
48
+ "comark-icon": "^0.8.2"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@comark/html": "^0.8.1",
@@ -58,7 +58,7 @@
58
58
  "react-dom": "^19.3.1",
59
59
  "svelte": "^5.57.2",
60
60
  "vue": "^3.5.44",
61
- "comark-zoom": "0.8.0"
61
+ "comark-zoom": "0.8.2"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@comark/html": "^0.8.0",