@cavuno/board 1.31.0-preview.0 → 1.31.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.
package/dist/index.d.mts CHANGED
@@ -204,7 +204,7 @@ declare function paginate<Q extends Record<string, unknown>, P extends PageShape
204
204
  * constant because the package is platform-neutral and cannot read
205
205
  * package.json at runtime.
206
206
  */
207
- declare const SDK_VERSION = "1.31.0-preview.0";
207
+ declare const SDK_VERSION = "1.31.0";
208
208
 
209
209
  type SavedJob = Schemas['SavedJob'];
210
210
  type SavedJobsListQuery = {
package/dist/index.d.ts CHANGED
@@ -204,7 +204,7 @@ declare function paginate<Q extends Record<string, unknown>, P extends PageShape
204
204
  * constant because the package is platform-neutral and cannot read
205
205
  * package.json at runtime.
206
206
  */
207
- declare const SDK_VERSION = "1.31.0-preview.0";
207
+ declare const SDK_VERSION = "1.31.0";
208
208
 
209
209
  type SavedJob = Schemas['SavedJob'];
210
210
  type SavedJobsListQuery = {
package/dist/index.js CHANGED
@@ -312,7 +312,7 @@ async function clearSession(storage) {
312
312
  }
313
313
 
314
314
  // src/version.ts
315
- var SDK_VERSION = "1.31.0-preview.0";
315
+ var SDK_VERSION = "1.31.0";
316
316
 
317
317
  // src/client.ts
318
318
  function isRawBody(body) {
package/dist/index.mjs CHANGED
@@ -265,7 +265,7 @@ async function clearSession(storage) {
265
265
  }
266
266
 
267
267
  // src/version.ts
268
- var SDK_VERSION = "1.31.0-preview.0";
268
+ var SDK_VERSION = "1.31.0";
269
269
 
270
270
  // src/client.ts
271
271
  function isRawBody(body) {
package/dist/theme.d.mts CHANGED
@@ -33,6 +33,13 @@ interface ThemeInput {
33
33
  dark?: Record<string, unknown>;
34
34
  };
35
35
  }
36
+ /**
37
+ * True when `value` is safe to emit inside a `<style>` CSS declaration — i.e.
38
+ * carries none of the breakout characters above. Shared by the SDK render sink
39
+ * (`boardThemeToCss`) and the hosted public-API serializer, so the denylist
40
+ * lives in exactly one place.
41
+ */
42
+ declare function isSafeThemeColorValue(value: string): boolean;
36
43
  /**
37
44
  * Render the board theme as `:root` (+ `.dark`) CSS-variable overrides.
38
45
  * Inject once at the app shell, after the static theme stylesheet.
@@ -60,4 +67,4 @@ declare function themeFontFamily(fontKey: string): string;
60
67
  /** One Google Fonts request covering the sans + heading families. */
61
68
  declare function googleFontsUrl(theme: ThemeInput | null): string | null;
62
69
 
63
- export { BOARD_COLOR_KEYS, type BoardColorKey, THEME_FONT_GOOGLE_FAMILIES, type ThemeInput, boardThemeToCss, googleFontsUrl, themeFontFamily, themeMode };
70
+ export { BOARD_COLOR_KEYS, type BoardColorKey, THEME_FONT_GOOGLE_FAMILIES, type ThemeInput, boardThemeToCss, googleFontsUrl, isSafeThemeColorValue, themeFontFamily, themeMode };
package/dist/theme.d.ts CHANGED
@@ -33,6 +33,13 @@ interface ThemeInput {
33
33
  dark?: Record<string, unknown>;
34
34
  };
35
35
  }
36
+ /**
37
+ * True when `value` is safe to emit inside a `<style>` CSS declaration — i.e.
38
+ * carries none of the breakout characters above. Shared by the SDK render sink
39
+ * (`boardThemeToCss`) and the hosted public-API serializer, so the denylist
40
+ * lives in exactly one place.
41
+ */
42
+ declare function isSafeThemeColorValue(value: string): boolean;
36
43
  /**
37
44
  * Render the board theme as `:root` (+ `.dark`) CSS-variable overrides.
38
45
  * Inject once at the app shell, after the static theme stylesheet.
@@ -60,4 +67,4 @@ declare function themeFontFamily(fontKey: string): string;
60
67
  /** One Google Fonts request covering the sans + heading families. */
61
68
  declare function googleFontsUrl(theme: ThemeInput | null): string | null;
62
69
 
63
- export { BOARD_COLOR_KEYS, type BoardColorKey, THEME_FONT_GOOGLE_FAMILIES, type ThemeInput, boardThemeToCss, googleFontsUrl, themeFontFamily, themeMode };
70
+ export { BOARD_COLOR_KEYS, type BoardColorKey, THEME_FONT_GOOGLE_FAMILIES, type ThemeInput, boardThemeToCss, googleFontsUrl, isSafeThemeColorValue, themeFontFamily, themeMode };
package/dist/theme.js CHANGED
@@ -24,6 +24,7 @@ __export(theme_exports, {
24
24
  THEME_FONT_GOOGLE_FAMILIES: () => THEME_FONT_GOOGLE_FAMILIES,
25
25
  boardThemeToCss: () => boardThemeToCss,
26
26
  googleFontsUrl: () => googleFontsUrl,
27
+ isSafeThemeColorValue: () => isSafeThemeColorValue,
27
28
  themeFontFamily: () => themeFontFamily,
28
29
  themeMode: () => themeMode
29
30
  });
@@ -46,9 +47,14 @@ var BOARD_COLOR_KEYS = [
46
47
  "contrastBackground",
47
48
  "contrastText"
48
49
  ];
50
+ var CSS_INJECTION_CHARS = /[<>{};]|[\u0000-\u001f\u007f-\u009f\u2028\u2029]/;
51
+ function isSafeThemeColorValue(value) {
52
+ return !CSS_INJECTION_CHARS.test(value);
53
+ }
49
54
  function color(colors, key) {
50
55
  const value = colors[key];
51
- return typeof value === "string" && value ? value : void 0;
56
+ if (typeof value !== "string" || !value) return void 0;
57
+ return isSafeThemeColorValue(value) ? value : void 0;
52
58
  }
53
59
  function tokenLines(colors) {
54
60
  const lines = [];
package/dist/theme.mjs CHANGED
@@ -17,9 +17,14 @@ var BOARD_COLOR_KEYS = [
17
17
  "contrastBackground",
18
18
  "contrastText"
19
19
  ];
20
+ var CSS_INJECTION_CHARS = /[<>{};]|[\u0000-\u001f\u007f-\u009f\u2028\u2029]/;
21
+ function isSafeThemeColorValue(value) {
22
+ return !CSS_INJECTION_CHARS.test(value);
23
+ }
20
24
  function color(colors, key) {
21
25
  const value = colors[key];
22
- return typeof value === "string" && value ? value : void 0;
26
+ if (typeof value !== "string" || !value) return void 0;
27
+ return isSafeThemeColorValue(value) ? value : void 0;
23
28
  }
24
29
  function tokenLines(colors) {
25
30
  const lines = [];
@@ -123,6 +128,7 @@ export {
123
128
  THEME_FONT_GOOGLE_FAMILIES,
124
129
  boardThemeToCss,
125
130
  googleFontsUrl,
131
+ isSafeThemeColorValue,
126
132
  themeFontFamily,
127
133
  themeMode
128
134
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cavuno/board",
3
- "version": "1.31.0-preview.0",
3
+ "version": "1.31.0",
4
4
  "description": "Typed isomorphic client for the Cavuno Board API",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.31.0-preview.0",
2
+ "version": "1.31.0",
3
3
  "skills": [
4
4
  {
5
5
  "name": "cavuno-board-account",