@floegence/floe-webapp-core 0.101.46 → 0.101.47

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.
@@ -1,3 +1,4 @@
1
+ import { type JSX } from 'solid-js';
1
2
  import { type ImageAnnotation, type ImageDimensions } from './imageAnnotation';
2
3
  export type ImageAnnotationSurfaceProps = ImageDimensions & {
3
4
  src: string;
@@ -14,10 +15,12 @@ export type ImageAnnotationSurfaceProps = ImageDimensions & {
14
15
  zoom?: number;
15
16
  /** Drag the zoomed viewport without changing its annotation. */
16
17
  panning?: boolean;
18
+ /** Use one cursor for selection, numbered pins, resizing and panning. */
19
+ cursor?: JSX.CSSProperties['cursor'];
17
20
  showAnnotation?: boolean;
18
21
  class?: string;
19
22
  };
20
23
  /** A contained immutable image. Click selects a point; drag selects a rectangle.
21
24
  * Scroll pans at host-controlled zoom. No iframe access or capture is performed.
22
25
  */
23
- export declare function ImageAnnotationSurface(props: ImageAnnotationSurfaceProps): import("solid-js").JSX.Element;
26
+ export declare function ImageAnnotationSurface(props: ImageAnnotationSurfaceProps): JSX.Element;
@@ -167,7 +167,7 @@ function ct(e) {
167
167
  get children() {
168
168
  var r = rt();
169
169
  return X((n) => {
170
- var g = l(), x = Q(e, t, l() + 1), y = e.onSelect ? "pointer" : void 0;
170
+ var g = l(), x = Q(e, t, l() + 1), y = e.cursor ?? (e.onSelect ? "pointer" : void 0);
171
171
  return g !== n.e && h(r, "data-annotation-index", n.e = g), x !== n.t && (r.innerHTML = n.t = x), y !== n.a && M(r, "cursor", n.a = y), n;
172
172
  }, {
173
173
  e: void 0,
@@ -188,7 +188,7 @@ function ct(e) {
188
188
  children: (t, l) => (() => {
189
189
  var r = ot();
190
190
  return X((n) => {
191
- var g = l(), x = t.x - 5 / w(), y = t.y - 5 / w(), C = 10 / w(), A = 10 / w(), S = 1 / w(), P = l() === 0 || l() === 3 ? "nwse-resize" : "nesw-resize";
191
+ var g = l(), x = t.x - 5 / w(), y = t.y - 5 / w(), C = 10 / w(), A = 10 / w(), S = 1 / w(), P = e.cursor ?? (l() === 0 || l() === 3 ? "nwse-resize" : "nesw-resize");
192
192
  return g !== n.e && h(r, "data-corner", n.e = g), x !== n.t && h(r, "x", n.t = x), y !== n.a && h(r, "y", n.a = y), C !== n.o && h(r, "width", n.o = C), A !== n.i && h(r, "height", n.i = A), S !== n.n && h(r, "stroke-width", n.n = S), P !== n.s && M(r, "cursor", n.s = P), n;
193
193
  }, {
194
194
  e: void 0,
@@ -203,7 +203,7 @@ function ct(e) {
203
203
  });
204
204
  }
205
205
  }), null), X((t) => {
206
- var l = e.class, r = `${Math.max(L().width, e.width * w())}px`, n = `${Math.max(L().height, e.height * w())}px`, g = e.width * w(), x = e.height * w(), y = `0 0 ${e.width} ${e.height}`, C = e.label, A = m() ? 0 : void 0, S = m() || e.panning ? "none" : "auto", P = e.panning ? "grab" : m() ? "crosshair" : "default", H = e.src, R = e.width, q = e.height, K = Z();
206
+ var l = e.class, r = `${Math.max(L().width, e.width * w())}px`, n = `${Math.max(L().height, e.height * w())}px`, g = e.width * w(), x = e.height * w(), y = `0 0 ${e.width} ${e.height}`, C = e.label, A = m() ? 0 : void 0, S = m() || e.panning ? "none" : "auto", P = e.cursor ?? (e.panning ? "grab" : m() ? "crosshair" : "default"), H = e.src, R = e.width, q = e.height, K = Z();
207
207
  return l !== t.e && _(i, t.e = l), r !== t.t && M(d, "width", t.t = r), n !== t.a && M(d, "height", t.a = n), g !== t.o && h(a, "width", t.o = g), x !== t.i && h(a, "height", t.i = x), y !== t.n && h(a, "viewBox", t.n = y), C !== t.s && h(a, "aria-label", t.s = C), A !== t.h && h(a, "tabindex", t.h = A), S !== t.r && M(a, "touch-action", t.r = S), P !== t.d && M(a, "cursor", t.d = P), H !== t.l && h(o, "href", t.l = H), R !== t.u && h(o, "width", t.u = R), q !== t.c && h(o, "height", t.c = q), K !== t.w && (c.innerHTML = t.w = K), t;
208
208
  }, {
209
209
  e: void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floegence/floe-webapp-core",
3
- "version": "0.101.46",
3
+ "version": "0.101.47",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",