@40rty/ams-ui 0.5.6 → 0.5.7

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 (56) hide show
  1. package/dist/agent.js +3 -2
  2. package/dist/{chunk-H6MSAD5M.js → chunk-434KIH5P.js} +17 -10
  3. package/dist/{chunk-2HM6EVDV.js → chunk-4ZX4IRC6.js} +241 -389
  4. package/dist/chunk-FSY7MEP5.js +843 -0
  5. package/dist/{chunk-WVD2Y2N2.js → chunk-G3IXNKXL.js} +15 -8
  6. package/dist/{chunk-CKNELL6G.js → chunk-URUKPL57.js} +109 -79
  7. package/dist/{chunk-432XYPDT.js → chunk-ZP27BQQE.js} +1 -1
  8. package/dist/conversation.js +24 -21
  9. package/dist/css/preset/motion.css +4 -1
  10. package/dist/css/shell/spacefront-island.css +8 -6
  11. package/dist/css/shell/spacefront-presence.css +9 -4
  12. package/dist/css/shell/spacefront-thread-panel.css +12 -5
  13. package/dist/index.js +473 -403
  14. package/dist/island.js +18 -11
  15. package/dist/motion.js +1 -1
  16. package/dist/presence.js +20 -11
  17. package/dist/shell.js +6 -5
  18. package/dist/thread-panel.js +19 -9
  19. package/dist/types/catalog-data/ecommerce.d.ts +42 -0
  20. package/dist/types/catalog-data/social.d.ts +14 -0
  21. package/dist/types/components/content/article/BlogPosts.d.ts +1 -1
  22. package/dist/types/components/ecommerce/cart/cart-format.d.ts +3 -2
  23. package/dist/types/components/ecommerce/collection/CollectionList.d.ts +1 -1
  24. package/dist/types/components/ecommerce/product/AddToRegistry.d.ts +1 -1
  25. package/dist/types/components/ecommerce/product/ProductPrice.d.ts +1 -0
  26. package/dist/types/components/feedback/HydrationNotice.d.ts +9 -0
  27. package/dist/types/components/layout/Drawer.d.ts +2 -0
  28. package/dist/types/conversation/blocks/schemas.d.ts +40 -0
  29. package/dist/types/index.d.ts +3 -2
  30. package/dist/types/labels/en/agent.d.ts +2 -0
  31. package/dist/types/labels/en/commerce.d.ts +2 -0
  32. package/dist/types/labels/en/content.d.ts +2 -0
  33. package/dist/types/labels/en/notices.d.ts +2 -0
  34. package/dist/types/labels/en/shell.d.ts +2 -0
  35. package/dist/types/labels/he/agent.d.ts +2 -0
  36. package/dist/types/labels/he/commerce.d.ts +2 -0
  37. package/dist/types/labels/he/content.d.ts +2 -0
  38. package/dist/types/labels/he/count.d.ts +17 -0
  39. package/dist/types/labels/he/notices.d.ts +2 -0
  40. package/dist/types/labels/he/shell.d.ts +2 -0
  41. package/dist/types/labels/index.d.ts +34 -0
  42. package/dist/types/{labels.d.ts → labels/types-agent.d.ts} +4 -120
  43. package/dist/types/labels/types-commerce.d.ts +252 -0
  44. package/dist/types/labels/types-content.d.ts +28 -0
  45. package/dist/types/labels/types-notices.d.ts +9 -0
  46. package/dist/types/labels/types-shell.d.ts +137 -0
  47. package/dist/types/labels-context.d.ts +19 -5
  48. package/dist/types/primitives/Money/index.d.ts +1 -1
  49. package/dist/types/shell/Composer.d.ts +1 -1
  50. package/dist/types/shell/SideDock.d.ts +1 -1
  51. package/dist/types/shell/SpacefrontIsland.d.ts +1 -1
  52. package/dist/types/shell/SpacefrontPresence.d.ts +1 -1
  53. package/dist/types/shell/VoiceIsland.d.ts +1 -1
  54. package/dist/types/utils/format-money.d.ts +3 -1
  55. package/dist/types/utils/mirror-x.d.ts +8 -0
  56. package/package.json +2 -2
package/dist/agent.js CHANGED
@@ -67,7 +67,7 @@ import {
67
67
  useForgetFact,
68
68
  useMeasuredHeight,
69
69
  useVisibleFactList
70
- } from "./chunk-2HM6EVDV.js";
70
+ } from "./chunk-4ZX4IRC6.js";
71
71
  import {
72
72
  PRESENCE_DURABLE_SLOTS,
73
73
  PRESENCE_FACT_LIMIT,
@@ -75,7 +75,8 @@ import {
75
75
  readLabel,
76
76
  useVisibleFacts
77
77
  } from "./chunk-RMJDSHLA.js";
78
- import "./chunk-432XYPDT.js";
78
+ import "./chunk-FSY7MEP5.js";
79
+ import "./chunk-ZP27BQQE.js";
79
80
  export {
80
81
  AgentPresenceWidget,
81
82
  AgentStreamingState,
@@ -1,4 +1,8 @@
1
1
  'use client';
2
+ import {
3
+ useLabels,
4
+ useTextDirection
5
+ } from "./chunk-FSY7MEP5.js";
2
6
 
3
7
  // src/shell/SideDock.tsx
4
8
  import * as React from "react";
@@ -20,6 +24,8 @@ function SideDock({
20
24
  children
21
25
  }) {
22
26
  const reduceMotion = useReducedMotion();
27
+ const resizeLabel = useLabels().composer.resizePanel;
28
+ const rtl = useTextDirection() === "rtl";
23
29
  const dragStart = React.useRef(null);
24
30
  const onHandleDown = (e) => {
25
31
  if (onWidthChange === void 0 || typeof width !== "number") return;
@@ -30,7 +36,8 @@ function SideDock({
30
36
  };
31
37
  const onHandleMove = (e) => {
32
38
  if (dragStart.current === null || onWidthChange === void 0) return;
33
- const delta = dragStart.current.x - e.clientX;
39
+ const moved = dragStart.current.x - e.clientX;
40
+ const delta = rtl ? -moved : moved;
34
41
  const next = Math.min(maxWidth, Math.max(minWidth, dragStart.current.w + delta));
35
42
  onWidthChange(next);
36
43
  };
@@ -53,7 +60,7 @@ function SideDock({
53
60
  style: {
54
61
  position: "absolute",
55
62
  top,
56
- right: 0,
63
+ insetInlineEnd: 0,
57
64
  bottom: 0,
58
65
  width,
59
66
  zIndex,
@@ -68,19 +75,19 @@ function SideDock({
68
75
  style: {
69
76
  position: "absolute",
70
77
  inset: 0,
71
- transform: open ? "translateX(0)" : `translateX(calc(100% + ${OFFSCREEN_OVERSHOOT_PX}px))`,
78
+ transform: open ? "translateX(0)" : `translateX(calc(${rtl ? "-100% - " : "100% + "}${OFFSCREEN_OVERSHOOT_PX}px))`,
72
79
  visibility: open ? "visible" : "hidden",
73
80
  transition
74
81
  },
75
82
  children: [
76
- onWidthChange !== void 0 && // Drag handle — a slim hit-strip pinned to the panel's inner-left
77
- // edge. `touchAction: none` keeps a touch drag from scrolling.
83
+ onWidthChange !== void 0 && // Drag handle — a slim hit-strip pinned to the panel's inner
84
+ // (inline-start) edge, centred on it. `touchAction: none` keeps a touch drag from scrolling.
78
85
  /* @__PURE__ */ jsx(
79
86
  "div",
80
87
  {
81
88
  role: "separator",
82
89
  "aria-orientation": "vertical",
83
- "aria-label": "Resize panel",
90
+ "aria-label": resizeLabel,
84
91
  onPointerDown: onHandleDown,
85
92
  onPointerMove: onHandleMove,
86
93
  onPointerUp: onHandleUp,
@@ -89,9 +96,9 @@ function SideDock({
89
96
  position: "absolute",
90
97
  top: 0,
91
98
  bottom: 0,
92
- left: 0,
99
+ insetInlineStart: 0,
93
100
  width: 10,
94
- transform: "translateX(-50%)",
101
+ transform: rtl ? "translateX(50%)" : "translateX(-50%)",
95
102
  cursor: "col-resize",
96
103
  touchAction: "none",
97
104
  zIndex: 2
@@ -109,10 +116,10 @@ function SideDock({
109
116
  function useSideDockSpacing(open, width, animate = true) {
110
117
  const reduceMotion = useReducedMotion();
111
118
  return {
112
- paddingRight: open ? width : 0,
119
+ paddingInlineEnd: open ? width : 0,
113
120
  // During an active resize drag the host passes `animate: false` so the
114
121
  // canvas edge tracks the panel 1:1 instead of easing behind the pointer.
115
- transition: reduceMotion === true || !animate ? void 0 : `padding-right ${SIDE_DOCK_REVEAL_MS}ms ${SIDE_DOCK_EASE}`
122
+ transition: reduceMotion === true || !animate ? void 0 : `padding-inline-end ${SIDE_DOCK_REVEAL_MS}ms ${SIDE_DOCK_EASE}`
116
123
  };
117
124
  }
118
125