@almadar/ui 6.53.1 → 6.55.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 (120) hide show
  1. package/dist/{AwaitingSkeletonContext-Bh399p1x.d.ts → AwaitingSkeletonContext-DPgW__WV.d.ts} +3 -1
  2. package/dist/{Canvas3DHost-B-y2TNij.d.ts → Canvas3DHost-DfAhg6EH.d.ts} +2 -0
  3. package/dist/Typography-7PDT62PG.js +5 -0
  4. package/dist/{UISlotRenderer-P7A4SZSK.js → UISlotRenderer-QTHFT6Z4.js} +8 -8
  5. package/dist/avl/index.cjs +3031 -1790
  6. package/dist/avl/index.js +57 -745
  7. package/dist/{avl-3d-context-MAt_NuU9.d.ts → avl-3d-context-BpBKZIbc.d.ts} +1 -0
  8. package/dist/{chunk-ERXIHZW3.js → chunk-D2E44ODB.js} +29 -15
  9. package/dist/{chunk-UOTYAPV5.js → chunk-F4ZTPKZL.js} +3 -3
  10. package/dist/{chunk-53VTY5CC.js → chunk-FQM37C56.js} +352 -162
  11. package/dist/{chunk-HB4C27KU.js → chunk-HCSJHRC4.js} +1 -1
  12. package/dist/{chunk-7KSLPY56.js → chunk-HRCR53OW.js} +11 -1
  13. package/dist/{chunk-O7OLVVBR.js → chunk-Q47ZN2DW.js} +24 -22
  14. package/dist/{chunk-DQTV6QVS.js → chunk-QGH4NAQO.js} +53 -2
  15. package/dist/{chunk-QVXLKFUQ.js → chunk-RNY5LJXJ.js} +1 -1
  16. package/dist/{chunk-FUQASYEW.js → chunk-SGJHVPHC.js} +2 -2
  17. package/dist/{chunk-6O37FCX4.js → chunk-V3FGTQUE.js} +37 -2
  18. package/dist/{chunk-HUG25TT3.js → chunk-XZKGRSIO.js} +2745 -1644
  19. package/dist/{chunk-7LM6I3NA.js → chunk-Y53Q55H5.js} +522 -24
  20. package/dist/components/index.cjs +4614 -2858
  21. package/dist/components/index.d.ts +122 -53
  22. package/dist/components/index.js +16 -17
  23. package/dist/context/index.cjs +38 -1
  24. package/dist/context/index.d.ts +1 -1
  25. package/dist/context/index.js +3 -1
  26. package/dist/design-classes/index.cjs +29 -15
  27. package/dist/design-classes/index.d.cts +1 -0
  28. package/dist/design-classes/index.d.ts +1 -0
  29. package/dist/design-classes/index.js +29 -15
  30. package/dist/hooks/index.cjs +16 -1
  31. package/dist/hooks/index.d.ts +10 -1
  32. package/dist/hooks/index.js +3 -4
  33. package/dist/lib/drawable/three/index.cjs +444 -82
  34. package/dist/lib/drawable/three/index.d.ts +4 -4
  35. package/dist/lib/drawable/three/index.js +28 -24
  36. package/dist/lib/index.cjs +53 -3
  37. package/dist/lib/index.d.ts +1 -1
  38. package/dist/lib/index.js +4 -4
  39. package/dist/locales/index.cjs +33 -3
  40. package/dist/locales/index.js +23 -3
  41. package/dist/providers/index.cjs +4987 -3183
  42. package/dist/providers/index.d.ts +2 -2
  43. package/dist/providers/index.js +14 -11
  44. package/dist/runtime/index.cjs +8973 -7000
  45. package/dist/runtime/index.d.ts +28 -6
  46. package/dist/runtime/index.js +16 -13
  47. package/dist/ssr/index.cjs +26 -9
  48. package/dist/ssr/index.js +26 -9
  49. package/dist/{themeTokens-Ccu7EmGY.d.ts → themeTokens-D6MFwKrC.d.ts} +6 -2
  50. package/locales/ar.json +11 -1
  51. package/locales/en.json +11 -1
  52. package/locales/sl.json +11 -1
  53. package/package.json +8 -7
  54. package/scripts/audit-tailwind-safelist.ts +21 -1
  55. package/scripts/theme-contrast-audit.mjs +20 -1
  56. package/tailwind-preset.cjs +5 -6
  57. package/themes/_base.css +61 -0
  58. package/themes/_contract.md +37 -0
  59. package/themes/_fonts.css +6 -4
  60. package/themes/_presets.css +2 -0
  61. package/themes/almadar-heritage.css +455 -0
  62. package/themes/almadar-website.css +82 -0
  63. package/themes/almadar.css +82 -0
  64. package/themes/aqua.css +82 -0
  65. package/themes/arabesque.css +82 -0
  66. package/themes/art-deco.css +82 -0
  67. package/themes/art-nouveau.css +82 -0
  68. package/themes/atelier.css +82 -0
  69. package/themes/bauhaus.css +82 -0
  70. package/themes/bloomberg-dense.css +83 -1
  71. package/themes/blueprint.css +84 -0
  72. package/themes/clay.css +82 -0
  73. package/themes/comic.css +82 -0
  74. package/themes/constructivist.css +82 -0
  75. package/themes/corporate.css +82 -0
  76. package/themes/cyberpunk.css +82 -0
  77. package/themes/frutiger-aero.css +83 -0
  78. package/themes/game-adventure.css +15 -0
  79. package/themes/game-rpg.css +16 -0
  80. package/themes/game-sci-fi.css +15 -0
  81. package/themes/game-ui-pack.css +15 -0
  82. package/themes/gazette.css +82 -0
  83. package/themes/glass.css +82 -0
  84. package/themes/gothic.css +82 -0
  85. package/themes/ink-wash.css +82 -0
  86. package/themes/kawaii.css +82 -0
  87. package/themes/kiosk.css +82 -0
  88. package/themes/linear-clean.css +82 -0
  89. package/themes/luxury.css +82 -0
  90. package/themes/mac-classic.css +90 -8
  91. package/themes/material.css +82 -0
  92. package/themes/memphis.css +82 -0
  93. package/themes/mid-century.css +82 -0
  94. package/themes/minimalist.css +82 -0
  95. package/themes/mudcloth.css +82 -0
  96. package/themes/neon.css +83 -0
  97. package/themes/neumorphic.css +82 -0
  98. package/themes/newsprint.css +82 -0
  99. package/themes/notion-editorial.css +82 -0
  100. package/themes/orb.css +455 -0
  101. package/themes/pixel.css +82 -0
  102. package/themes/prism.css +82 -0
  103. package/themes/retro.css +83 -0
  104. package/themes/risograph.css +82 -0
  105. package/themes/scandi.css +82 -0
  106. package/themes/sketch.css +82 -0
  107. package/themes/solarpunk.css +82 -0
  108. package/themes/steampunk.css +82 -0
  109. package/themes/swiss.css +82 -0
  110. package/themes/terminal.css +84 -1
  111. package/themes/trait-wars.css +82 -0
  112. package/themes/ukiyo-e.css +82 -0
  113. package/themes/vaporwave.css +82 -0
  114. package/themes/victorian.css +82 -0
  115. package/themes/wabi-sabi.css +82 -0
  116. package/themes/win95.css +84 -0
  117. package/themes/wireframe.css +82 -0
  118. package/themes/zine.css +82 -0
  119. package/dist/Typography-7QEWUTW3.js +0 -5
  120. package/dist/chunk-E37BYSXY.js +0 -51
@@ -1,5 +1,5 @@
1
1
  import { cn, domPassthrough } from './chunk-64WACXM7.js';
2
- import { formatValue } from './chunk-QVXLKFUQ.js';
2
+ import { formatValue } from './chunk-RNY5LJXJ.js';
3
3
  import React from 'react';
4
4
  import { useFormatContext } from '@almadar/ui/hooks';
5
5
 
@@ -59,6 +59,7 @@ var en_default = {
59
59
  "status.draft": "Draft",
60
60
  "status.archived": "Archived",
61
61
  "error.generic": "Something went wrong",
62
+ "error.traitMountFailed": "{{trait}} failed to start",
62
63
  "error.retry": "Try again",
63
64
  "error.notFound": "Not found",
64
65
  "error.loadFailed": "Failed to load: {{message}}",
@@ -187,6 +188,7 @@ var en_default = {
187
188
  "template.ourTeam": "Our Team",
188
189
  "template.caseStudies": "Case Studies",
189
190
  "versionDiff.compare": "Compare",
191
+ "versionDiff.changes": "Changes",
190
192
  "versionDiff.to": "to",
191
193
  "versionDiff.beforeRevision": "Before revision",
192
194
  "versionDiff.afterRevision": "After revision",
@@ -913,6 +915,7 @@ var en_default = {
913
915
  "gridPicker.moreRefine": "+{{count}} more \u2014 refine your search",
914
916
  "graphCanvas.noNodes": "No nodes to display.",
915
917
  "codeBlock.noCode": "No code to display.",
918
+ "codeBlock.region": "Code",
916
919
  "fab.action": "Action",
917
920
  "fab.closeActions": "Close actions",
918
921
  "fab.openActions": "Open actions",
@@ -1229,7 +1232,14 @@ var en_default = {
1229
1232
  "agentActivity.earlierConversations": "Earlier conversations ({{count}})",
1230
1233
  "agentActivity.earlierActivity": "Earlier activity",
1231
1234
  "tabs.scrollStart": "Scroll tabs back",
1232
- "tabs.scrollEnd": "Scroll tabs forward"
1235
+ "tabs.scrollEnd": "Scroll tabs forward",
1236
+ "agentChat.workedThrough": "Worked through {{count}} steps",
1237
+ "agentChat.newMessages": "New messages",
1238
+ "agentChat.copy": "Copy reply",
1239
+ "agentChat.copied": "Copied",
1240
+ "agentChat.today": "Today",
1241
+ "agentChat.yesterday": "Yesterday",
1242
+ "agentChat.emptyDescription": "Ask in your own words \u2014 the assistant can look things up and make changes for you."
1233
1243
  };
1234
1244
 
1235
1245
  export { en_default };
@@ -1,5 +1,25 @@
1
1
  import { createLogger } from '@almadar/logger';
2
2
 
3
+ // lib/keyMapEvent.ts
4
+ function isEditableTarget(target) {
5
+ if (!(target instanceof HTMLElement)) return false;
6
+ const tag = target.tagName;
7
+ if (tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT") return true;
8
+ if (target.isContentEditable || target.contentEditable === "true") return true;
9
+ const attr = target.getAttribute("contenteditable");
10
+ return attr === "" || attr === "true" || attr === "plaintext-only";
11
+ }
12
+ function keyMapCode(e) {
13
+ let code = e.code;
14
+ if (e.altKey) code = `Alt+${code}`;
15
+ if (e.shiftKey) code = `Shift+${code}`;
16
+ if (e.metaKey || e.ctrlKey) code = `Mod+${code}`;
17
+ return code;
18
+ }
19
+ function resolveKeyMapEvent(map, e) {
20
+ if (!map || isEditableTarget(e.target)) return void 0;
21
+ return map[keyMapCode(e)] ?? map[e.code];
22
+ }
3
23
  var log = createLogger("almadar:bridge");
4
24
  var MAX_TRANSITIONS = 500;
5
25
  function getState() {
@@ -174,7 +194,9 @@ function recordOrbitalResponse(orbitalName, request, response) {
174
194
  }
175
195
  function recordingTransport(transport) {
176
196
  const subscribe = transport.subscribe?.bind(transport);
197
+ const subscribeHostDispatches = transport.subscribeHostDispatches?.bind(transport);
177
198
  return {
199
+ ...transport.hostsBrowserStore !== void 0 ? { hostsBrowserStore: transport.hostsBrowserStore } : {},
178
200
  register: (schema) => transport.register(schema),
179
201
  unregister: () => transport.unregister(),
180
202
  send: async (orbitalName, request) => {
@@ -182,7 +204,8 @@ function recordingTransport(transport) {
182
204
  recordOrbitalResponse(orbitalName, request, response);
183
205
  return response;
184
206
  },
185
- ...subscribe !== void 0 ? { subscribe } : {}
207
+ ...subscribe !== void 0 ? { subscribe } : {},
208
+ ...subscribeHostDispatches !== void 0 ? { subscribeHostDispatches } : {}
186
209
  };
187
210
  }
188
211
  function updateBridgeHealth(health) {
@@ -388,25 +411,4 @@ function clearVerification() {
388
411
  }
389
412
  exposeOnWindow();
390
413
 
391
- // lib/keyMapEvent.ts
392
- function isEditableTarget(target) {
393
- if (!(target instanceof HTMLElement)) return false;
394
- const tag = target.tagName;
395
- if (tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT") return true;
396
- if (target.isContentEditable || target.contentEditable === "true") return true;
397
- const attr = target.getAttribute("contenteditable");
398
- return attr === "" || attr === "true" || attr === "plaintext-only";
399
- }
400
- function keyMapCode(e) {
401
- let code = e.code;
402
- if (e.altKey) code = `Alt+${code}`;
403
- if (e.shiftKey) code = `Shift+${code}`;
404
- if (e.metaKey || e.ctrlKey) code = `Mod+${code}`;
405
- return code;
406
- }
407
- function resolveKeyMapEvent(map, e) {
408
- if (!map || isEditableTarget(e.target)) return void 0;
409
- return map[keyMapCode(e)] ?? map[e.code];
410
- }
411
-
412
414
  export { bindCanvasCapture, bindEventBus, bindLastDrawables, bindTraitStateGetter, clearVerification, getAllChecks, getBridgeHealth, getSnapshot, getSummary, getTraitSnapshots, getTransitions, getTransitionsForTrait, isEditableTarget, keyMapCode, recordOrbitalResponse, recordServerResponse, recordTransition, recordingTransport, registerCheck, registerTraitSnapshot, resolveKeyMapEvent, serverEffectTraces, subscribeToVerification, updateAssetStatus, updateBridgeHealth, updateCheck, waitForTransition };
@@ -1,7 +1,58 @@
1
- import { createContext, useRef, useContext, useSyncExternalStore } from 'react';
1
+ import { DEFAULT_CURRENCY } from './chunk-RNY5LJXJ.js';
2
+ import { en_default } from './chunk-HRCR53OW.js';
3
+ import React, { createContext, useEffect, useContext, useMemo, useRef, useSyncExternalStore } from 'react';
2
4
  import { mergeEntityFrame } from '@almadar/core';
3
5
  import { createLogger } from '@almadar/logger';
4
6
 
7
+ var { $meta: _meta, ...coreMessages } = en_default;
8
+ var coreLocale = coreMessages;
9
+ var I18nContext = createContext({
10
+ locale: "en",
11
+ direction: "ltr",
12
+ t: (key, params) => {
13
+ let msg = coreLocale[key] ?? key;
14
+ if (params) {
15
+ for (const [k, v] of Object.entries(params)) {
16
+ msg = msg.split(`{{${k}}}`).join(String(v));
17
+ }
18
+ }
19
+ return msg;
20
+ }
21
+ });
22
+ I18nContext.displayName = "I18nContext";
23
+ function I18nProvider({ value, children, documentRoot }) {
24
+ useEffect(() => {
25
+ if (!documentRoot) return;
26
+ document.documentElement.lang = value.locale;
27
+ document.documentElement.dir = value.direction;
28
+ }, [documentRoot, value.locale, value.direction]);
29
+ return React.createElement(I18nContext.Provider, { value }, children);
30
+ }
31
+ function useTranslate() {
32
+ return useContext(I18nContext);
33
+ }
34
+ function useRenderI18n() {
35
+ const { locale, messages } = useContext(I18nContext);
36
+ return useMemo(() => messages !== void 0 ? { locale, messages } : void 0, [locale, messages]);
37
+ }
38
+ function useFormatContext() {
39
+ const { t, locale, currency } = useContext(I18nContext);
40
+ return useMemo(
41
+ () => ({ locale, currency: currency ?? DEFAULT_CURRENCY, booleanLabels: { yes: t("common.yes"), no: t("common.no") } }),
42
+ [t, locale, currency]
43
+ );
44
+ }
45
+ function createTranslate(messages) {
46
+ return (key, params) => {
47
+ let msg = messages[key] ?? coreLocale[key] ?? key;
48
+ if (params) {
49
+ for (const [k, v] of Object.entries(params)) {
50
+ msg = msg.split(`{{${k}}}`).join(String(v));
51
+ }
52
+ }
53
+ return msg;
54
+ };
55
+ }
5
56
  var log = createLogger("almadar:ui:shared-entity-store");
6
57
  var EMPTY_ENTITY_STATE = {};
7
58
  function createSharedEntityStore() {
@@ -79,4 +130,4 @@ function runTickFrame(entityId, orderedWriters, store) {
79
130
  return scratch;
80
131
  }
81
132
 
82
- export { SharedEntityStoreContext, createSharedEntityStore, runTickFrame, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext };
133
+ export { I18nProvider, SharedEntityStoreContext, createSharedEntityStore, createTranslate, runTickFrame, useFormatContext, useRenderI18n, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext, useTranslate };
@@ -1,4 +1,4 @@
1
- import { en_default } from './chunk-7KSLPY56.js';
1
+ import { en_default } from './chunk-HRCR53OW.js';
2
2
 
3
3
  // lib/format.ts
4
4
  var { $meta: _meta, ...coreMessages } = en_default;
@@ -1,5 +1,5 @@
1
- import { avlBlend, AVL_INK, EFFECT_CATEGORY_COLORS, OPERATOR_CATEGORY_COLORS, avlTint, Box, VStack, effectCategoryOf } from './chunk-7LM6I3NA.js';
2
- import { Typography } from './chunk-HB4C27KU.js';
1
+ import { avlBlend, AVL_INK, EFFECT_CATEGORY_COLORS, OPERATOR_CATEGORY_COLORS, avlTint, Box, VStack, effectCategoryOf } from './chunk-Y53Q55H5.js';
2
+ import { Typography } from './chunk-HCSJHRC4.js';
3
3
  import { Vector3, QuadraticBezierCurve3, MathUtils, Quaternion } from 'three';
4
4
  import { EntityPersistenceSchema } from '@almadar/core';
5
5
  import { getStdOperatorMeta } from '@almadar/std/registry';
@@ -133,7 +133,38 @@ var SURFACE_VARS = [
133
133
  { cssVar: "--surface-backdrop", key: "backdrop" },
134
134
  { cssVar: "--surface-card-image", key: "cardImage" },
135
135
  { cssVar: "--surface-page-image", key: "pageImage" },
136
- { cssVar: "--surface-page-image-size", key: "pageImageSize" }
136
+ { cssVar: "--surface-page-image-size", key: "pageImageSize" },
137
+ { cssVar: "--surface-diagram", key: "diagram" }
138
+ ];
139
+ var DIAGRAM_VARS = [
140
+ { cssVar: "--diagram-stroke-thin", key: "strokeThin" },
141
+ { cssVar: "--diagram-stroke-normal", key: "strokeNormal" },
142
+ { cssVar: "--diagram-stroke-bold", key: "strokeBold" },
143
+ { cssVar: "--diagram-line-cap", key: "lineCap" },
144
+ { cssVar: "--diagram-line-join", key: "lineJoin" },
145
+ { cssVar: "--diagram-dash", key: "dash" },
146
+ { cssVar: "--diagram-dot", key: "dot" },
147
+ { cssVar: "--diagram-fill-style", key: "fillStyle" },
148
+ { cssVar: "--diagram-fill-opacity", key: "fillOpacity" },
149
+ { cssVar: "--diagram-roughness", key: "roughness" },
150
+ { cssVar: "--diagram-glow", key: "glow" },
151
+ { cssVar: "--diagram-shadow", key: "shadow" },
152
+ { cssVar: "--diagram-marker", key: "marker" },
153
+ { cssVar: "--diagram-label-font", key: "labelFont" },
154
+ { cssVar: "--diagram-label-size", key: "labelSize" },
155
+ { cssVar: "--diagram-label-weight", key: "labelWeight" },
156
+ { cssVar: "--diagram-label-case", key: "labelCase" },
157
+ { cssVar: "--diagram-corner", key: "corner" }
158
+ ];
159
+ var SCENE_VARS = [
160
+ { cssVar: "--material-roughness", key: "materialRoughness" },
161
+ { cssVar: "--material-metalness", key: "materialMetalness" },
162
+ { cssVar: "--material-flat", key: "materialFlat" },
163
+ { cssVar: "--material-outline", key: "materialOutline" },
164
+ { cssVar: "--light-ambient", key: "lightAmbient" },
165
+ { cssVar: "--light-key", key: "lightKey" },
166
+ { cssVar: "--light-key-color", key: "lightKeyColor" },
167
+ { cssVar: "--scene-fog", key: "fog" }
137
168
  ];
138
169
  var LEGACY_PREFIXES = {
139
170
  colors: "--color-",
@@ -194,6 +225,10 @@ function themeTokensToCssVars(tokens, mode = "light", darkVariant) {
194
225
  emitGeometry(pickGeometry, vars);
195
226
  const pickSurface = isDark && darkVariant?.surface ? darkVariant.surface : tokens.surface;
196
227
  applyFlat(pickSurface, SURFACE_VARS, vars);
228
+ const pickDiagram = isDark && darkVariant?.diagram ? darkVariant.diagram : tokens.diagram;
229
+ applyFlat(pickDiagram, DIAGRAM_VARS, vars);
230
+ const pickScene = isDark && darkVariant?.scene ? darkVariant.scene : tokens.scene;
231
+ applyFlat(pickScene, SCENE_VARS, vars);
197
232
  return vars;
198
233
  }
199
234
  function emitDensity(density, vars) {
@@ -287,4 +322,4 @@ function resolveThemeForRuntime(theme) {
287
322
  return theme;
288
323
  }
289
324
 
290
- export { DENSITY_ELEMENT_VARS, DENSITY_SPACING_VARS, ELEVATION_VARS, GEOMETRY_VARS, ICONOGRAPHY_VARS, LEGACY_PREFIXES, MOTION_DURATION_KEYS, MOTION_EASING_KEYS, MOTION_INTENT_VARS, MOTION_SHAPE_VARS, SURFACE_VARS, TYPE_FAMILY_VARS, TYPE_HEADING_VARS, TYPE_INTENT_VARS, TYPE_SIZE_KEYS, enterKeyframe, resolveThemeForRuntime, themeTokensToCssVars };
325
+ export { DENSITY_ELEMENT_VARS, DENSITY_SPACING_VARS, DIAGRAM_VARS, ELEVATION_VARS, GEOMETRY_VARS, ICONOGRAPHY_VARS, LEGACY_PREFIXES, MOTION_DURATION_KEYS, MOTION_EASING_KEYS, MOTION_INTENT_VARS, MOTION_SHAPE_VARS, SCENE_VARS, SURFACE_VARS, TYPE_FAMILY_VARS, TYPE_HEADING_VARS, TYPE_INTENT_VARS, TYPE_SIZE_KEYS, enterKeyframe, resolveThemeForRuntime, themeTokensToCssVars };