@hueest/xray 0.2.0 → 0.4.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.
@@ -42,7 +42,8 @@ const LEAF_CLASS = "xr-leaf";
42
42
  * Tokens (ADR 0017 taxonomy). The `--xr-bone-*` family styles an individual
43
43
  * Bone: `--xr-bone-color` (fill), `--xr-bone-highlight-color` (sheen),
44
44
  * `--xr-bone-border-radius` (+ `--xr-bone-text-border-radius` /
45
- * `--xr-bone-media-border-radius`), `--xr-bone-animation-duration`, the pulse
45
+ * `--xr-bone-text-block-border-radius` / `--xr-bone-media-border-radius`),
46
+ * `--xr-bone-animation-duration`, the pulse
46
47
  * range `--xr-bone-pulse-opacity-min`/`--xr-bone-pulse-opacity-max`,
47
48
  * `--xr-bone-animation` (mode: `xr-pulse` | `none` | a custom keyframe), and
48
49
  * `--xr-bone-fill` (override the leaf paint, e.g. a sheen gradient built from the
@@ -83,9 +84,12 @@ const BASE_CSS = `
83
84
  Never transition opacity directly (the pulse animation owns it). */
84
85
  opacity: calc(var(--xr-o) * var(--xr-reveal));
85
86
  }
86
- /* Per-kind defaults: text reads as rounded bars, media as blocks. Re-theme any
87
- kind via [data-xr-root] .${LEAF_CLASS}-text { ... }. */
87
+ /* Per-kind defaults: a single text LINE reads as a rounded bar; a multi-line
88
+ text BLOCK as a soft rect (a tall pill misreads as a button); media carries
89
+ the author radius, defaulting to the same soft rect. Re-theme any kind via
90
+ [data-xr-root] .${LEAF_CLASS}-text { ... }. */
88
91
  .${LEAF_CLASS}-text { border-radius: var(--xr-bone-text-border-radius, 999px) }
92
+ .${LEAF_CLASS}-text-block { border-radius: var(--xr-bone-text-block-border-radius, var(--xr-bone-border-radius, 4px)) }
89
93
  .${LEAF_CLASS}-media { border-radius: var(--xr-bone-media-border-radius, var(--xr-bone-border-radius, 4px)) }
90
94
  @keyframes xr-pulse {
91
95
  from { --xr-o: var(--xr-bone-pulse-opacity-max, 1) }
@@ -142,7 +146,7 @@ const BASE_CSS = `
142
146
  /** The (unserialized) plate an import resolves to before anything has been captured. */
143
147
  function emptyPlate(name) {
144
148
  return {
145
- v: 1,
149
+ v: 2,
146
150
  name,
147
151
  tree: null,
148
152
  css: ""