@opengeni/react 1.0.2-canary.37202341988001 → 1.0.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/index.js CHANGED
@@ -107,7 +107,7 @@ import {
107
107
  useWorkspaceSessions,
108
108
  userMessageLikelyNeedsDisclosure,
109
109
  v4aToGitFileDiff
110
- } from "./chunk-IT4BJUGF.js";
110
+ } from "./chunk-VV5E43LD.js";
111
111
  import {
112
112
  useThemeType
113
113
  } from "./chunk-UK4TINKT.js";
@@ -38,6 +38,13 @@ export declare function hostBackground(element: Element): Rgba | null;
38
38
  * reads; never consults `prefers-color-scheme` on its own.
39
39
  */
40
40
  export declare function resolveHostTheme(element: Element): ResolvedHostTheme;
41
+ /**
42
+ * Canonical text for comparing a token value with the stock one. The
43
+ * published `compiled.css` is minified (`#333`, `oklch(.52 .16 22)`), so the
44
+ * same color must compare equal in short and long form; otherwise every stock
45
+ * token reads as a host customization and dark values leak into light themes.
46
+ */
47
+ export declare function normalizeToken(value: string): string;
41
48
  /**
42
49
  * Tokens the host customized on an ancestor, by value. Setting our own
43
50
  * `data-og-theme` would otherwise reset them to the theme's stock values.
@@ -24,7 +24,7 @@ import {
24
24
  setStartupDetails,
25
25
  useStartupDetails,
26
26
  userMessageLikelyNeedsDisclosure
27
- } from "./chunk-IT4BJUGF.js";
27
+ } from "./chunk-VV5E43LD.js";
28
28
  import "./chunk-UK4TINKT.js";
29
29
  import "./chunk-J2QWVSQY.js";
30
30
  import "./chunk-C5X5AJXK.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/react",
3
- "version": "1.0.2-canary.37202341988001",
3
+ "version": "1.0.2",
4
4
  "description": "React hooks and styled components for OpenGeni: live session streaming, chat composer, message timeline, session status, and fleet views — token-themed (CSS variables), dark-first, built on Tailwind v4 + Radix + Motion.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -153,8 +153,8 @@
153
153
  "@dnd-kit/utilities": "3.2.2",
154
154
  "@fontsource-variable/noto-sans-arabic": "5.2.10",
155
155
  "@fontsource-variable/noto-sans-jp": "5.2.10",
156
- "@opengeni/connect": "1.0.2-canary.37202341988001",
157
- "@opengeni/sdk": "1.0.2-canary.37202341988001",
156
+ "@opengeni/connect": "1.0.2",
157
+ "@opengeni/sdk": "1.0.2",
158
158
  "clsx": "^2.1.1",
159
159
  "dequal": "2.0.3",
160
160
  "lucide-react": "^1.8.0",
@@ -310,8 +310,21 @@ export function resolveHostTheme(element: Element): ResolvedHostTheme {
310
310
  return "light";
311
311
  }
312
312
 
313
- function normalizeToken(value: string): string {
314
- return value.trim().toLowerCase().replace(/\s+/g, " ");
313
+ /**
314
+ * Canonical text for comparing a token value with the stock one. The
315
+ * published `compiled.css` is minified (`#333`, `oklch(.52 .16 22)`), so the
316
+ * same color must compare equal in short and long form; otherwise every stock
317
+ * token reads as a host customization and dark values leak into light themes.
318
+ */
319
+ export function normalizeToken(value: string): string {
320
+ return value
321
+ .trim()
322
+ .toLowerCase()
323
+ .replace(/\s+/g, " ")
324
+ .replace(/#([\da-f])([\da-f])([\da-f])(?![\da-f])/g, "#$1$1$2$2$3$3")
325
+ .replace(/(^|[\s(,/])0+(\.\d)/g, "$1$2")
326
+ .replace(/(\.\d*?)0+(?=[\s),/%]|$)/g, "$1")
327
+ .replace(/\.(?=[\s),/%]|$)/g, "");
315
328
  }
316
329
 
317
330
  /**