@cratis/scene 0.107.0 → 0.108.1

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.
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { IComponent } from '../../IComponent';
3
+ import type { UIElement } from '../../UIElement';
4
+ import { PrototypeLayout } from '../../Layout/PrototypeLayout';
5
+ export interface PrototypePreviewProps {
6
+ elements: readonly (UIElement | IComponent)[];
7
+ windowSize?: {
8
+ width: number;
9
+ height: number;
10
+ };
11
+ layout?: PrototypeLayout;
12
+ sourceRect?: DOMRect;
13
+ onClose: () => void;
14
+ }
15
+ export declare const PrototypePreview: ({ elements, windowSize, layout, sourceRect, onClose }: PrototypePreviewProps) => React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ export interface PrototypePreviewFit {
2
+ width: number;
3
+ titleBarHeight: number;
4
+ canvasHeight: number;
5
+ }
@@ -17,5 +17,8 @@ export interface PrototypeThumbnailProps {
17
17
  /** The layout the surface arranges its elements with, so the preview flows them the same way the editor does. */
18
18
  layout?: PrototypeLayout;
19
19
  onClick?: (event: React.MouseEvent<HTMLElement>) => void;
20
+ width?: number;
21
+ titleBarHeight?: number;
22
+ openTitle?: string;
20
23
  }
21
24
  export declare const PrototypeThumbnail: React.FC<PrototypeThumbnailProps>;
@@ -2,5 +2,10 @@ export interface SceneMessages {
2
2
  prototypeThumbnail: {
3
3
  openEditor: string;
4
4
  windowTitle: string;
5
+ openPreview?: string;
6
+ };
7
+ prototypePreview?: {
8
+ title: string;
9
+ close: string;
5
10
  };
6
11
  }
@@ -0,0 +1,8 @@
1
+ import type { PrototypePreviewFit } from './PrototypePreviewFit';
2
+ export declare const fitPrototypePreview: (windowSize: {
3
+ width: number;
4
+ height: number;
5
+ } | undefined, viewport: {
6
+ width: number;
7
+ height: number;
8
+ }) => PrototypePreviewFit;
@@ -4,3 +4,6 @@ export * from './SceneMessagesContext';
4
4
  export * from './SceneMessagesProvider';
5
5
  export * from './TrafficLights';
6
6
  export * from './PrototypeThumbnail';
7
+ export * from './PrototypePreview';
8
+ export * from './PrototypePreviewFit';
9
+ export * from './fitPrototypePreview';
@@ -1,28 +1,36 @@
1
- import { c as N, f as n, k as q } from "../Scene-DaQtzf1e.js";
2
- import { createContext as M, useContext as P } from "react";
3
- import { Fragment as x, jsx as i, jsxs as f } from "react/jsx-runtime";
4
- var W = { prototypeThumbnail: {
5
- openEditor: "Open prototype editor",
6
- windowTitle: "Prototype"
7
- } }, b = M(W), R = () => P(b), Q = ({ messages: e, children: t }) => /* @__PURE__ */ i(b.Provider, {
8
- value: e,
9
- children: t
1
+ import { c as R, f as h, k as st } from "../Scene-DaQtzf1e.js";
2
+ import { createContext as k, useContext as O, useEffect as $ } from "react";
3
+ import { Fragment as M, jsx as r, jsxs as f } from "react/jsx-runtime";
4
+ import { createPortal as B } from "react-dom";
5
+ var P = {
6
+ prototypeThumbnail: {
7
+ openEditor: "Open prototype editor",
8
+ windowTitle: "Prototype",
9
+ openPreview: "Show prototype"
10
+ },
11
+ prototypePreview: {
12
+ title: "Prototype preview",
13
+ close: "Close preview"
14
+ }
15
+ }, W = k(P), A = () => O(W), dt = ({ messages: t, children: e }) => /* @__PURE__ */ r(W.Provider, {
16
+ value: t,
17
+ children: e
10
18
  }), C = [
11
19
  "#f66",
12
20
  "#fa0",
13
21
  "#3c3"
14
- ], D = ({ size: e }) => /* @__PURE__ */ i(x, { children: C.map((t, r) => /* @__PURE__ */ i("div", {
22
+ ], G = ({ size: t }) => /* @__PURE__ */ r(M, { children: C.map((e, o) => /* @__PURE__ */ r("div", {
15
23
  className: "prototype-window-traffic-light",
16
24
  style: {
17
- border: `${e ? Math.max(1, e / 8) : 1.5}px solid ${t}`,
18
- ...e ? {
19
- width: e,
20
- height: e
25
+ border: `${t ? Math.max(1, t / 8) : 1.5}px solid ${e}`,
26
+ ...t ? {
27
+ width: t,
28
+ height: t
21
29
  } : {}
22
30
  }
23
- }, r)) }), F = (e) => {
24
- switch (e) {
25
- case n.flexRow:
31
+ }, o)) }), U = (t) => {
32
+ switch (t) {
33
+ case h.flexRow:
26
34
  return {
27
35
  display: "flex",
28
36
  flexDirection: "row",
@@ -31,14 +39,14 @@ var W = { prototypeThumbnail: {
31
39
  padding: 12,
32
40
  alignContent: "flex-start"
33
41
  };
34
- case n.flexColumn:
42
+ case h.flexColumn:
35
43
  return {
36
44
  display: "flex",
37
45
  flexDirection: "column",
38
46
  gap: 12,
39
47
  padding: 12
40
48
  };
41
- case n.grid:
49
+ case h.grid:
42
50
  return {
43
51
  display: "grid",
44
52
  gridTemplateColumns: "repeat(auto-fill, minmax(180px, 1fr))",
@@ -49,103 +57,161 @@ var W = { prototypeThumbnail: {
49
57
  default:
50
58
  return {};
51
59
  }
52
- }, O = 900, S = 640, B = 40, G = 150, v = 16, $ = (e) => {
53
- const t = e;
54
- if (t.position && typeof t.position.x == "number") return {
55
- x: t.position.x,
56
- y: t.position.y ?? 0
60
+ }, S = 900, j = 640, V = 40, q = 150, J = 16, K = (t) => {
61
+ const e = t;
62
+ if (e.position && typeof e.position.x == "number") return {
63
+ x: e.position.x,
64
+ y: e.position.y ?? 0
57
65
  };
58
- const r = t.properties?.canvas ?? {};
66
+ const o = e.properties?.canvas ?? {};
59
67
  return {
60
- x: r.x ?? 0,
61
- y: r.y ?? 0
68
+ x: o.x ?? 0,
69
+ y: o.y ?? 0
62
70
  };
63
- }, U = (e) => {
64
- const t = e;
65
- return t.size && typeof t.size.width == "number" ? {
66
- width: t.size.width,
67
- height: t.size.height ?? 0
71
+ }, Q = (t) => {
72
+ const e = t;
73
+ return e.size && typeof e.size.width == "number" ? {
74
+ width: e.size.width,
75
+ height: e.size.height ?? 0
68
76
  } : {
69
- width: t.width ?? 0,
70
- height: t.height ?? 0
77
+ width: e.width ?? 0,
78
+ height: e.height ?? 0
71
79
  };
72
- }, V = ({ elements: e, windowSize: t, layout: r = n.absolute, onClick: p }) => {
73
- const s = R().prototypeThumbnail, w = t && t.width > 0 ? t.width : O, T = t && t.height > 0 ? t.height : S, E = r !== n.absolute, H = r === n.grid, l = w, d = Math.max(1, T - B), h = G / l, I = Math.round(l * h), _ = Math.round(d * h), c = /* @__PURE__ */ f(x, { children: [/* @__PURE__ */ f("div", {
80
+ }, X = ({ elements: t, windowSize: e, layout: o = h.absolute, onClick: s, width: n = q, titleBarHeight: i = J, openTitle: c }) => {
81
+ const l = A().prototypeThumbnail, u = e && e.width > 0 ? e.width : S, m = e && e.height > 0 ? e.height : j, v = o !== h.absolute, p = o === h.grid, d = u, T = Math.max(1, m - V), w = n / d, L = Math.round(d * w), N = Math.round(T * w), b = /* @__PURE__ */ f(M, { children: [/* @__PURE__ */ f("div", {
74
82
  className: "prototype-thumbnail-title-bar",
75
- style: { height: v },
76
- children: [/* @__PURE__ */ i(D, { size: 6 }), /* @__PURE__ */ i("span", {
83
+ style: { height: i },
84
+ children: [/* @__PURE__ */ r(G, { size: Math.round(i * 0.375) }), /* @__PURE__ */ r("span", {
77
85
  className: "prototype-thumbnail-title",
78
- children: s.windowTitle
86
+ children: l.windowTitle
79
87
  })]
80
- }), /* @__PURE__ */ i("div", {
88
+ }), /* @__PURE__ */ r("div", {
81
89
  className: "prototype-thumbnail-body",
82
90
  inert: !0,
83
- children: /* @__PURE__ */ i("div", {
91
+ children: /* @__PURE__ */ r("div", {
84
92
  className: "prototype-thumbnail-canvas-scaler",
85
93
  style: {
86
- width: l,
87
- height: d,
88
- transform: `scale(${h})`,
94
+ width: d,
95
+ height: T,
96
+ transform: `scale(${w})`,
89
97
  transformOrigin: "top left",
90
- ...F(r)
98
+ ...U(o)
91
99
  },
92
- children: e.filter(Boolean).map((A) => {
93
- const o = N(A), y = String(o.id), g = $(o), a = U(o), u = E ? {
100
+ children: t.filter(Boolean).map((D) => {
101
+ const a = R(D), E = String(a.id), H = K(a), y = Q(a), I = v ? {
94
102
  position: "relative",
95
- width: H ? "100%" : a.width,
96
- height: a.height,
103
+ width: p ? "100%" : y.width,
104
+ height: y.height,
97
105
  flexShrink: 0
98
106
  } : {
99
107
  position: "absolute",
100
- left: g.x,
101
- top: g.y,
102
- width: a.width,
103
- height: a.height
108
+ left: H.x,
109
+ top: H.y,
110
+ width: y.width,
111
+ height: y.height
104
112
  };
105
- if ("RenderPrototype" in o && typeof o.RenderPrototype == "function") return /* @__PURE__ */ i("div", {
113
+ if ("RenderPrototype" in a && typeof a.RenderPrototype == "function") return /* @__PURE__ */ r("div", {
106
114
  style: {
107
- ...u,
115
+ ...I,
108
116
  pointerEvents: "none",
109
117
  overflow: "hidden"
110
118
  },
111
- children: o.RenderPrototype({
112
- component: o,
113
- label: o.label
119
+ children: a.RenderPrototype({
120
+ component: a,
121
+ label: a.label
114
122
  })
115
- }, y);
116
- const L = "type" in o && typeof o.type == "string" ? ` prototype-thumbnail-element--${o.type}` : "";
117
- return /* @__PURE__ */ i("div", {
118
- className: `prototype-thumbnail-element${L}`,
119
- style: u
120
- }, y);
123
+ }, E);
124
+ const F = "type" in a && typeof a.type == "string" ? ` prototype-thumbnail-element--${a.type}` : "";
125
+ return /* @__PURE__ */ r("div", {
126
+ className: `prototype-thumbnail-element${F}`,
127
+ style: I
128
+ }, E);
121
129
  })
122
130
  })
123
- })] }), m = {
124
- width: I,
125
- height: v + _
131
+ })] }), x = {
132
+ width: L,
133
+ height: i + N
126
134
  };
127
- return p ? /* @__PURE__ */ i("button", {
135
+ return s ? /* @__PURE__ */ r("button", {
128
136
  className: "prototype-thumbnail",
129
- onClick: p,
130
- title: s.openEditor,
131
- style: m,
132
- children: c
133
- }) : /* @__PURE__ */ i("div", {
137
+ onClick: s,
138
+ title: c ?? l.openEditor,
139
+ style: x,
140
+ children: b
141
+ }) : /* @__PURE__ */ r("div", {
134
142
  className: "prototype-thumbnail",
135
143
  role: "img",
136
- "aria-label": s.windowTitle,
137
- style: m,
138
- children: c
144
+ "aria-label": l.windowTitle,
145
+ style: x,
146
+ children: b
147
+ });
148
+ }, Y = 900, Z = 640, _ = 40, z = 24, tt = 0.9, et = 0.85, ot = (t, e) => {
149
+ const o = t && t.width > 0 ? t.width : Y, s = t && t.height > 0 ? t.height : Z, n = Math.max(0.1, Math.min(1, e.width * tt / o, e.height * et / s)), i = Math.round(o * n);
150
+ return {
151
+ width: i,
152
+ canvasHeight: Math.round(Math.max(1, s - _) * (i / o)),
153
+ titleBarHeight: Math.max(z, Math.round(_ * n))
154
+ };
155
+ }, rt = () => typeof window > "u" ? {
156
+ width: 1280,
157
+ height: 800
158
+ } : {
159
+ width: window.innerWidth,
160
+ height: window.innerHeight
161
+ }, it = (t, e, o, s) => {
162
+ if (!t || t.width <= 0) return;
163
+ const n = (s.width - e) / 2, i = (s.height - o) / 2;
164
+ return `translate(${Math.round(t.left - n)}px, ${Math.round(t.top - i)}px) scale(${(t.width / e).toFixed(4)})`;
165
+ }, g = (t) => t.stopPropagation(), ct = ({ elements: t, windowSize: e, layout: o = h.absolute, sourceRect: s, onClose: n }) => {
166
+ const i = A().prototypePreview ?? P.prototypePreview;
167
+ $(() => {
168
+ const p = (d) => {
169
+ d.key === "Escape" && n();
170
+ };
171
+ return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
172
+ }, [n]);
173
+ const c = rt(), l = ot(e, c), u = l.titleBarHeight + l.canvasHeight, m = it(s, l.width, u, c), v = /* @__PURE__ */ r("div", {
174
+ className: "prototype-preview-backdrop",
175
+ role: "dialog",
176
+ "aria-modal": "true",
177
+ "aria-label": i.title,
178
+ onClick: n,
179
+ onPointerDown: g,
180
+ onMouseDown: g,
181
+ onWheel: g,
182
+ onDoubleClick: g,
183
+ children: /* @__PURE__ */ f("div", {
184
+ className: "prototype-preview-window",
185
+ style: m ? { "--prototype-preview-from": m } : void 0,
186
+ onClick: (p) => p.stopPropagation(),
187
+ children: [/* @__PURE__ */ r(X, {
188
+ elements: t,
189
+ windowSize: e,
190
+ layout: o,
191
+ width: l.width,
192
+ titleBarHeight: l.titleBarHeight
193
+ }), /* @__PURE__ */ r("button", {
194
+ type: "button",
195
+ className: "prototype-preview-close",
196
+ "aria-label": i.close,
197
+ title: i.close,
198
+ onClick: n,
199
+ children: "×"
200
+ })]
201
+ })
139
202
  });
140
- }, X = 15;
203
+ return typeof document > "u" ? v : B(v, document.body);
204
+ }, mt = 15;
141
205
  export {
142
- q as AnchorEdges,
143
- n as PrototypeLayout,
144
- V as PrototypeThumbnail,
145
- b as SceneMessagesContext,
146
- Q as SceneMessagesProvider,
147
- D as TrafficLights,
148
- X as allAnchorEdgesForEditor,
149
- W as defaultSceneMessages,
150
- R as useSceneMessages
206
+ st as AnchorEdges,
207
+ h as PrototypeLayout,
208
+ ct as PrototypePreview,
209
+ X as PrototypeThumbnail,
210
+ W as SceneMessagesContext,
211
+ dt as SceneMessagesProvider,
212
+ G as TrafficLights,
213
+ mt as allAnchorEdgesForEditor,
214
+ P as defaultSceneMessages,
215
+ ot as fitPrototypePreview,
216
+ A as useSceneMessages
151
217
  };
package/dist/scene.css CHANGED
@@ -1,2 +1,2 @@
1
- .prototype-window-traffic-light{box-sizing:border-box;background:0 0;border-radius:50%;width:12px;height:12px}.prototype-thumbnail{cursor:default;box-sizing:border-box;background:var(--surface-card);border:none;flex-direction:column;flex-shrink:0;padding:0;display:flex;position:relative;overflow:hidden}.prototype-thumbnail:is(button){cursor:pointer}.prototype-thumbnail-title-bar{border-bottom:1px solid var(--surface-200);background:var(--surface-50);flex-shrink:0;align-items:center;gap:3px;padding:0 5px;display:flex;position:relative}.prototype-thumbnail-title{text-align:center;color:var(--text-color-secondary);pointer-events:none;font-family:system-ui,sans-serif;font-size:8px;position:absolute;left:0;right:0}.prototype-thumbnail-body{background:var(--surface-ground);flex:1;position:relative;overflow:hidden}.prototype-thumbnail-canvas-scaler{position:absolute;top:0;left:0}.prototype-thumbnail-element{box-sizing:border-box;background:var(--surface-200);border:1px solid var(--surface-300);border-radius:2px;position:absolute}.prototype-thumbnail-element--button,.prototype-thumbnail-element--button-hot{background:var(--surface-200);border:1px solid var(--surface-300)}.prototype-thumbnail-element--button-hot{background:var(--primary-color);border-color:var(--primary-color);opacity:.7}.prototype-thumbnail-element--text-input{background:var(--surface-0);border:1px solid var(--surface-300)}.prototype-thumbnail-element--label{border-bottom:1px solid var(--surface-300);background:0 0}.prototype-thumbnail-element--checkbox,.prototype-thumbnail-element--radio,.prototype-thumbnail-element--dropdown{background:var(--surface-0);border:1px solid var(--surface-300)}.prototype-thumbnail-element--image{background:var(--surface-100);border:1px dashed var(--surface-300)}.prototype-thumbnail-element--panel{background:var(--surface-50);border:1px solid var(--surface-200)}.prototype-thumbnail-element--data-table{background:var(--surface-0);border:1px solid var(--surface-300)}.prototype-thumbnail-element--toolbar{background:var(--surface-100);border:1px solid var(--surface-200)}.prototype-thumbnail-element--kpi-card{background:var(--surface-100);border:1px solid var(--primary-300,var(--surface-300));border-radius:3px}.prototype-thumbnail-element--bar-chart{background:var(--surface-0);border:1px solid var(--surface-300);background-image:repeating-linear-gradient(to top, var(--primary-400,#7c6fe0) 0px, var(--primary-400,#7c6fe0) 60%, transparent 60%, transparent 100%);background-position:10% 0,35% 0,60% 0,85% 0;background-repeat:no-repeat;background-size:20% 100%}.prototype-thumbnail-element--line-chart{background:var(--surface-0);border:1px solid var(--surface-300)}.prototype-thumbnail-element--pie-chart{background:var(--surface-0);border:1px solid var(--surface-300);border-radius:50%}.prototype-thumbnail-element--progress-bar{background:var(--surface-100);border:1px solid var(--surface-300);background-image:linear-gradient(to right, var(--primary-400,#7c6fe0) 0%, var(--primary-400,#7c6fe0) 55%, transparent 55%)}.prototype-thumbnail-element--activity-feed{background:var(--surface-0);border:1px solid var(--surface-300);background-image:repeating-linear-gradient(to bottom, transparent 0px, transparent 3px, var(--surface-200) 3px, var(--surface-200) 4px);background-size:100% 8px}.prototype-thumbnail-element--nav-topbar{background:var(--surface-100);border:1px solid var(--surface-200);border-radius:2px 2px 0 0}.prototype-thumbnail-element--nav-footer{background:var(--surface-100);border:1px solid var(--surface-200);border-radius:0 0 2px 2px}.prototype-thumbnail-element--nav-sidebar{background:var(--surface-50);border:1px solid var(--surface-200);border-radius:2px 0 0 2px}.prototype-thumbnail-element--content-area{background:var(--surface-ground);border:1.5px dashed var(--surface-300)}.prototype-thumbnail-element--command-form{background:var(--surface-0);border:1px solid var(--surface-300);background-image:repeating-linear-gradient(to bottom, transparent 0px, transparent 5px, var(--surface-100) 5px, var(--surface-100) 8px);background-position:0 4px;background-size:100% 12px}
1
+ .prototype-window-traffic-light{box-sizing:border-box;background:0 0;border-radius:50%;width:12px;height:12px}.prototype-thumbnail{cursor:default;box-sizing:border-box;background:var(--surface-card);border:none;flex-direction:column;flex-shrink:0;padding:0;display:flex;position:relative;overflow:hidden}.prototype-thumbnail:is(button){cursor:pointer}.prototype-thumbnail-title-bar{border-bottom:1px solid var(--surface-200);background:var(--surface-50);flex-shrink:0;align-items:center;gap:3px;padding:0 5px;display:flex;position:relative}.prototype-thumbnail-title{text-align:center;color:var(--text-color-secondary);pointer-events:none;font-family:system-ui,sans-serif;font-size:8px;position:absolute;left:0;right:0}.prototype-thumbnail-body{background:var(--surface-ground);flex:1;position:relative;overflow:hidden}.prototype-thumbnail-canvas-scaler{position:absolute;top:0;left:0}.prototype-thumbnail-element{box-sizing:border-box;background:var(--surface-200);border:1px solid var(--surface-300);border-radius:2px;position:absolute}.prototype-thumbnail-element--button,.prototype-thumbnail-element--button-hot{background:var(--surface-200);border:1px solid var(--surface-300)}.prototype-thumbnail-element--button-hot{background:var(--primary-color);border-color:var(--primary-color);opacity:.7}.prototype-thumbnail-element--text-input{background:var(--surface-0);border:1px solid var(--surface-300)}.prototype-thumbnail-element--label{border-bottom:1px solid var(--surface-300);background:0 0}.prototype-thumbnail-element--checkbox,.prototype-thumbnail-element--radio,.prototype-thumbnail-element--dropdown{background:var(--surface-0);border:1px solid var(--surface-300)}.prototype-thumbnail-element--image{background:var(--surface-100);border:1px dashed var(--surface-300)}.prototype-thumbnail-element--panel{background:var(--surface-50);border:1px solid var(--surface-200)}.prototype-thumbnail-element--data-table{background:var(--surface-0);border:1px solid var(--surface-300)}.prototype-thumbnail-element--toolbar{background:var(--surface-100);border:1px solid var(--surface-200)}.prototype-thumbnail-element--kpi-card{background:var(--surface-100);border:1px solid var(--primary-300,var(--surface-300));border-radius:3px}.prototype-thumbnail-element--bar-chart{background:var(--surface-0);border:1px solid var(--surface-300);background-image:repeating-linear-gradient(to top, var(--primary-400,#7c6fe0) 0px, var(--primary-400,#7c6fe0) 60%, transparent 60%, transparent 100%);background-position:10% 0,35% 0,60% 0,85% 0;background-repeat:no-repeat;background-size:20% 100%}.prototype-thumbnail-element--line-chart{background:var(--surface-0);border:1px solid var(--surface-300)}.prototype-thumbnail-element--pie-chart{background:var(--surface-0);border:1px solid var(--surface-300);border-radius:50%}.prototype-thumbnail-element--progress-bar{background:var(--surface-100);border:1px solid var(--surface-300);background-image:linear-gradient(to right, var(--primary-400,#7c6fe0) 0%, var(--primary-400,#7c6fe0) 55%, transparent 55%)}.prototype-thumbnail-element--activity-feed{background:var(--surface-0);border:1px solid var(--surface-300);background-image:repeating-linear-gradient(to bottom, transparent 0px, transparent 3px, var(--surface-200) 3px, var(--surface-200) 4px);background-size:100% 8px}.prototype-thumbnail-element--nav-topbar{background:var(--surface-100);border:1px solid var(--surface-200);border-radius:2px 2px 0 0}.prototype-thumbnail-element--nav-footer{background:var(--surface-100);border:1px solid var(--surface-200);border-radius:0 0 2px 2px}.prototype-thumbnail-element--nav-sidebar{background:var(--surface-50);border:1px solid var(--surface-200);border-radius:2px 0 0 2px}.prototype-thumbnail-element--content-area{background:var(--surface-ground);border:1.5px dashed var(--surface-300)}.prototype-thumbnail-element--command-form{background:var(--surface-0);border:1px solid var(--surface-300);background-image:repeating-linear-gradient(to bottom, transparent 0px, transparent 5px, var(--surface-100) 5px, var(--surface-100) 8px);background-position:0 4px;background-size:100% 12px}.prototype-preview-backdrop{z-index:1000;cursor:default;background:#00000073;justify-content:center;align-items:center;animation:.16s ease-out prototype-preview-fade;display:flex;position:fixed;inset:0}.prototype-preview-window{border:1px solid var(--surface-300);transform-origin:0 0;border-radius:8px;animation:.22s cubic-bezier(.2,.8,.2,1) prototype-preview-zoom;position:relative;overflow:hidden;box-shadow:0 24px 64px #00000073}.prototype-preview-window .prototype-thumbnail-title{font-size:13px}.prototype-preview-window .prototype-thumbnail-title-bar{gap:8px;padding:0 12px}.prototype-preview-close{z-index:1;width:28px;height:28px;color:var(--text-color-secondary);cursor:pointer;background:0 0;border:none;border-radius:50%;font-size:18px;line-height:1;position:absolute;top:6px;right:8px}.prototype-preview-close:hover{background:var(--surface-200);color:var(--text-color)}@keyframes prototype-preview-zoom{0%{transform:var(--prototype-preview-from,scale(.9));opacity:.4}to{opacity:1;transform:none}}@keyframes prototype-preview-fade{0%{background:0 0}to{background:#00000073}}@media (prefers-reduced-motion:reduce){.prototype-preview-backdrop,.prototype-preview-window{animation:none}}
2
2
  /*$vite$:1*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/scene",
3
- "version": "0.107.0",
3
+ "version": "0.108.1",
4
4
  "description": "Cratis Scene: renders Studio prototypes as thumbnails and previews.",
5
5
  "license": "MIT",
6
6
  "author": "Cratis",