@ggui-ai/ui-visual-tester 0.21.0 → 0.23.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.
@@ -20061,11 +20061,20 @@
20061
20061
 
20062
20062
  // ../design/dist/interact/trait.js
20063
20063
  var import_react = __toESM(require_react(), 1);
20064
+ function frameAttributes(frame) {
20065
+ if (frame === void 0)
20066
+ return {};
20067
+ return {
20068
+ ...frame.surface !== void 0 ? { "data-ggui-surface": frame.surface } : {},
20069
+ ...frame.bleed === true ? { "data-ggui-bleed": "" } : {}
20070
+ };
20071
+ }
20064
20072
  function renderWithTrait(trait, traitProps, root, children) {
20073
+ const marks = frameAttributes(root.frame);
20065
20074
  if (trait === void 0) {
20066
- return (0, import_react.createElement)("div", { className: root.className, style: root.style }, children);
20075
+ return (0, import_react.createElement)("div", { className: root.className, style: root.style, ...marks }, children);
20067
20076
  }
20068
- return (0, import_react.createElement)(trait, { ...traitProps, className: root.className, style: root.style }, children);
20077
+ return (0, import_react.createElement)(trait, { ...traitProps, className: root.className, style: root.style, ...marks }, children);
20069
20078
  }
20070
20079
 
20071
20080
  // ../design/dist/primitives/color-slots.js
@@ -20195,9 +20204,14 @@
20195
20204
  surface,
20196
20205
  style,
20197
20206
  className,
20207
+ bleed,
20198
20208
  as: Trait,
20199
20209
  ...traitProps
20200
20210
  } = props;
20211
+ const frame = {
20212
+ ...surface !== "transparent" ? { surface: surface ?? "default" } : {},
20213
+ ...bleed === true ? { bleed: true } : {}
20214
+ };
20201
20215
  const resolvedPadding = resolveSpacing(padding);
20202
20216
  const resolvedSurface = resolveSurfaceCss(surface ?? "default");
20203
20217
  const resolvedOnColor = resolveSurfaceOnColorCss(surface ?? "default");
@@ -20215,10 +20229,11 @@
20215
20229
  if (scope !== void 0) {
20216
20230
  return renderWithTrait(Trait, traitProps, {
20217
20231
  className: className ? `${className} ${scope.className}` : scope.className,
20218
- style: composedStyle
20232
+ style: composedStyle,
20233
+ frame
20219
20234
  }, (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [(0, import_jsx_runtime2.jsx)("style", { children: scope.css }), children] }));
20220
20235
  }
20221
- return renderWithTrait(Trait, traitProps, { className, style: composedStyle }, children);
20236
+ return renderWithTrait(Trait, traitProps, { className, style: composedStyle, frame }, children);
20222
20237
  }
20223
20238
 
20224
20239
  // ../design/dist/primitives/Stack.js
@@ -20315,7 +20330,9 @@
20315
20330
  // ../design/dist/primitives/Box.js
20316
20331
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
20317
20332
  function Box(props) {
20318
- const { children, padding, paddingX, paddingY, margin, surface, assetColor, assetSemantic, radius: radius2, style, className, as: Trait, ...traitProps } = props;
20333
+ const { children, padding, paddingX, paddingY, margin, surface, assetColor, assetSemantic, radius: radius2, style, className, bleed, as: Trait, ...traitProps } = props;
20334
+ const markedSurface = surface !== void 0 && surface !== "transparent" ? surface : void 0;
20335
+ const frame = markedSurface === void 0 && bleed !== true ? void 0 : { ...markedSurface !== void 0 ? { surface: markedSurface } : {}, ...bleed === true ? { bleed: true } : {} };
20319
20336
  let computedPadding;
20320
20337
  if (paddingX !== void 0 || paddingY !== void 0) {
20321
20338
  const px = resolveSpacing(paddingX) || "0";
@@ -20340,10 +20357,11 @@
20340
20357
  if (scope !== void 0) {
20341
20358
  return renderWithTrait(Trait, traitProps, {
20342
20359
  className: className ? `${className} ${scope.className}` : scope.className,
20343
- style: composedStyle
20360
+ style: composedStyle,
20361
+ ...frame !== void 0 ? { frame } : {}
20344
20362
  }, (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [(0, import_jsx_runtime4.jsx)("style", { children: scope.css }), children] }));
20345
20363
  }
20346
- return renderWithTrait(Trait, traitProps, { className, style: composedStyle }, children);
20364
+ return renderWithTrait(Trait, traitProps, { className, style: composedStyle, ...frame !== void 0 ? { frame } : {} }, children);
20347
20365
  }
20348
20366
 
20349
20367
  // ../design/dist/primitives/Divider.js
@@ -29396,8 +29414,11 @@
29396
29414
  ...opts.onDispatchSuppressed !== void 0 ? { onDispatchSuppressed: opts.onDispatchSuppressed } : {},
29397
29415
  dispatch: (actionName, data) => {
29398
29416
  const actionSpec = opts.getActiveActionSpec();
29417
+ if (actionSpec === void 0)
29418
+ opts.onActionSpecAbsent?.(actionName);
29399
29419
  const isOneShot = actionSpec?.[actionName]?.oneShot === true;
29400
- if (isOneShot && spentOneShots.has(actionName)) {
29420
+ const spent = spentOneShots.has(actionName) || opts.getSpentOneShots?.()?.includes(actionName) === true;
29421
+ if (isOneShot && spent) {
29401
29422
  console.warn(`[ggui] dispatch('${actionName}') suppressed: this action is declared oneShot and already fired for this render. A second gesture is NOT sent to the agent \u2014 the submitted control is spent for the render's lifetime. If the action is meant to repeat, remove \`oneShot\` from its contract entry.`);
29402
29423
  opts.onDispatchSuppressed?.({
29403
29424
  reason: "one-shot-spent",
@@ -32421,6 +32442,10 @@
32421
32442
  var import_react38 = __toESM(require_react(), 1);
32422
32443
  var ThemeContext = (0, import_react38.createContext)(null);
32423
32444
 
32445
+ // ../design/dist/rendering/css-tokens.js
32446
+ var EXPANDED_FRAME = { outerRadiusVar: "--ggui-shape-radius-xl", insetPx: 16 };
32447
+ var EXPANDED_FRAME_INNER_RADIUS = `max(0px, calc(var(${EXPANDED_FRAME.outerRadiusVar}) - ${EXPANDED_FRAME.insetPx}px))`;
32448
+
32424
32449
  // ../design/dist/rendering/rewrite-imports.js
32425
32450
  var WIRE_EXPORTS = [
32426
32451
  // Hooks
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/ui-visual-tester",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "description": "Behavioral validator for ggui-generated component code. Renders a component in real Chromium via Playwright, clicks each action declared in its contract, and verifies the action actually does something — mutating bound state or dispatching to the agent. Catches buttons wired to no-op handlers that structural validators miss. Playwright is an optional peer dependency, injected by the caller.",
5
5
  "keywords": [
6
6
  "ggui",
@@ -53,9 +53,9 @@
53
53
  "dependencies": {
54
54
  "react": "^19.0.0",
55
55
  "react-dom": "^19.0.0",
56
- "@ggui-ai/protocol": "0.21.0",
57
- "@ggui-ai/design": "0.21.0",
58
- "@ggui-ai/wire": "0.21.0"
56
+ "@ggui-ai/design": "0.23.0",
57
+ "@ggui-ai/wire": "0.23.0",
58
+ "@ggui-ai/protocol": "0.23.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@playwright/test": "^1.60.0",