@embedpdf/plugin-annotation 2.3.0 → 2.4.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.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +40 -13
- package/dist/index.js.map +1 -1
- package/dist/lib/actions.d.ts +2 -1
- package/dist/lib/annotation-plugin.d.ts +1 -0
- package/dist/lib/helpers.d.ts +2 -1
- package/dist/lib/tools/types.d.ts +22 -10
- package/dist/lib/types.d.ts +13 -0
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +326 -50
- package/dist/preact/index.js.map +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +325 -49
- package/dist/react/index.js.map +1 -1
- package/dist/shared/components/annotation-container.d.ts +6 -2
- package/dist/shared/components/annotation-layer.d.ts +4 -2
- package/dist/shared/components/annotations.d.ts +3 -1
- package/dist/shared/components/types.d.ts +43 -1
- package/dist/shared/context/index.d.ts +1 -0
- package/dist/shared/context/renderer-registry.d.ts +21 -0
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared-preact/components/annotation-container.d.ts +6 -2
- package/dist/shared-preact/components/annotation-layer.d.ts +4 -2
- package/dist/shared-preact/components/annotations.d.ts +3 -1
- package/dist/shared-preact/components/types.d.ts +43 -1
- package/dist/shared-preact/context/index.d.ts +1 -0
- package/dist/shared-preact/context/renderer-registry.d.ts +21 -0
- package/dist/shared-preact/index.d.ts +2 -0
- package/dist/shared-react/components/annotation-container.d.ts +6 -2
- package/dist/shared-react/components/annotation-layer.d.ts +4 -2
- package/dist/shared-react/components/annotations.d.ts +3 -1
- package/dist/shared-react/components/types.d.ts +43 -1
- package/dist/shared-react/context/index.d.ts +1 -0
- package/dist/shared-react/context/renderer-registry.d.ts +21 -0
- package/dist/shared-react/index.d.ts +2 -0
- package/dist/svelte/components/AnnotationLayer.svelte.d.ts +3 -0
- package/dist/svelte/components/Annotations.svelte.d.ts +3 -0
- package/dist/svelte/components/RendererRegistryProvider.svelte.d.ts +7 -0
- package/dist/svelte/components/index.d.ts +1 -0
- package/dist/svelte/context/index.d.ts +2 -0
- package/dist/svelte/context/renderer-registry.svelte.d.ts +20 -0
- package/dist/svelte/context/types.d.ts +33 -0
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.cjs.map +1 -1
- package/dist/svelte/index.d.ts +2 -0
- package/dist/svelte/index.js +412 -241
- package/dist/svelte/index.js.map +1 -1
- package/dist/vue/components/annotation-container.vue.d.ts +1 -1
- package/dist/vue/components/annotation-layer.vue.d.ts +3 -0
- package/dist/vue/components/annotations/free-text.vue.d.ts +1 -1
- package/dist/vue/components/annotations/stamp.vue.d.ts +1 -1
- package/dist/vue/components/annotations.vue.d.ts +94 -60
- package/dist/vue/components/group-selection-box.vue.d.ts +1 -1
- package/dist/vue/components/index.d.ts +1 -0
- package/dist/vue/components/preview-renderer.vue.d.ts +1 -1
- package/dist/vue/components/renderer-registry-provider.vue.d.ts +13 -0
- package/dist/vue/context/index.d.ts +2 -0
- package/dist/vue/context/renderer-registry.d.ts +26 -0
- package/dist/vue/context/types.d.ts +33 -0
- package/dist/vue/hooks/use-annotation.d.ts +5 -5
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.d.ts +3 -1
- package/dist/vue/index.js +245 -120
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/types.d.ts +1 -1
- package/package.json +10 -10
package/dist/svelte/index.js
CHANGED
|
@@ -1,13 +1,61 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AnnotationPlugin, initialDocumentState, patching, getAnnotationsByPageIndex, getSelectedAnnotationIds, isInk, isSquare, isCircle, isUnderline, isStrikeout, isSquiggly, isHighlight, isLine, isPolyline, isPolygon, isFreeText, isStamp, isLink } from "@embedpdf/plugin-annotation";
|
|
1
|
+
import { createPluginPackage } from "@embedpdf/core";
|
|
2
|
+
import { AnnotationPlugin, initialDocumentState, patching, getAnnotationsByPageIndex, getSelectedAnnotationIds, resolveInteractionProp, isInk, isSquare, isCircle, isUnderline, isStrikeout, isSquiggly, isHighlight, isLine, isPolyline, isPolygon, isFreeText, isStamp, isLink, AnnotationPluginPackage as AnnotationPluginPackage$1 } from "@embedpdf/plugin-annotation";
|
|
3
3
|
export * from "@embedpdf/plugin-annotation";
|
|
4
|
-
import { useCapability, usePlugin, useDocumentPermissions, useDocumentState } from "@embedpdf/core/svelte";
|
|
5
4
|
import "svelte/internal/disclose-version";
|
|
5
|
+
import * as $ from "svelte/internal/client";
|
|
6
|
+
import { setContext, getContext, untrack } from "svelte";
|
|
7
|
+
import { useCapability, usePlugin, useDocumentPermissions, useDocumentState } from "@embedpdf/core/svelte";
|
|
6
8
|
import { useInteractionHandles, deepToRaw, doublePress, CounterRotate } from "@embedpdf/utils/svelte";
|
|
7
|
-
import { untrack } from "svelte";
|
|
8
9
|
import { PdfAnnotationBorderStyle, PdfVerticalAlignment, textAlignmentToCss, standardFontCss, ignore, PdfErrorCode, boundingRectOrEmpty, blendModeToCss, PdfBlendMode, PdfAnnotationSubtype, Rotation } from "@embedpdf/models";
|
|
9
10
|
import { usePointerHandlers } from "@embedpdf/plugin-interaction-manager/svelte";
|
|
10
11
|
import { useSelectionCapability } from "@embedpdf/plugin-selection/svelte";
|
|
12
|
+
const REGISTRY_KEY = Symbol("AnnotationRendererRegistry");
|
|
13
|
+
function createRendererRegistry() {
|
|
14
|
+
let renderers = $.state($.proxy([]));
|
|
15
|
+
return {
|
|
16
|
+
register(entries) {
|
|
17
|
+
const ids = new Set(entries.map((e) => e.id));
|
|
18
|
+
$.set(
|
|
19
|
+
renderers,
|
|
20
|
+
[
|
|
21
|
+
...$.get(renderers).filter((r) => !ids.has(r.id)),
|
|
22
|
+
...entries
|
|
23
|
+
],
|
|
24
|
+
true
|
|
25
|
+
);
|
|
26
|
+
return () => {
|
|
27
|
+
$.set(renderers, $.get(renderers).filter((r) => !entries.some((e) => e.id === r.id)), true);
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
getAll() {
|
|
31
|
+
return $.get(renderers);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function provideRendererRegistry() {
|
|
36
|
+
const registry = createRendererRegistry();
|
|
37
|
+
setContext(REGISTRY_KEY, registry);
|
|
38
|
+
return registry;
|
|
39
|
+
}
|
|
40
|
+
function getRendererRegistry() {
|
|
41
|
+
return getContext(REGISTRY_KEY) ?? null;
|
|
42
|
+
}
|
|
43
|
+
function createRenderer(entry) {
|
|
44
|
+
return {
|
|
45
|
+
id: entry.id,
|
|
46
|
+
matches: entry.matches,
|
|
47
|
+
component: entry.component
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function RendererRegistryProvider($$anchor, $$props) {
|
|
51
|
+
$.push($$props, true);
|
|
52
|
+
provideRendererRegistry();
|
|
53
|
+
var fragment = $.comment();
|
|
54
|
+
var node = $.first_child(fragment);
|
|
55
|
+
$.snippet(node, () => $$props.children);
|
|
56
|
+
$.append($$anchor, fragment);
|
|
57
|
+
$.pop();
|
|
58
|
+
}
|
|
11
59
|
const useAnnotationCapability = () => useCapability(AnnotationPlugin.id);
|
|
12
60
|
const useAnnotationPlugin = () => usePlugin(AnnotationPlugin.id);
|
|
13
61
|
const useAnnotation = (getDocumentId) => {
|
|
@@ -42,7 +90,7 @@ var root_10 = $.from_html(`<div></div>`);
|
|
|
42
90
|
var root$c = $.from_html(`<div data-no-interaction=""><div><!> <!> <!></div> <!></div>`);
|
|
43
91
|
function AnnotationContainer($$anchor, $$props) {
|
|
44
92
|
$.push($$props, true);
|
|
45
|
-
let isMultiSelected = $.prop($$props, "isMultiSelected", 3, false), lockAspectRatio = $.prop($$props, "lockAspectRatio", 3, false), propsClass = $.prop($$props, "class", 3, ""), outlineOffset = $.prop($$props, "outlineOffset", 3, 1), zIndex = $.prop($$props, "zIndex", 3,
|
|
93
|
+
let isMultiSelected = $.prop($$props, "isMultiSelected", 3, false), lockAspectRatio = $.prop($$props, "lockAspectRatio", 3, false), propsClass = $.prop($$props, "class", 3, ""), outlineOffset = $.prop($$props, "outlineOffset", 3, 1), zIndex = $.prop($$props, "zIndex", 3, 1), selectionOutlineColor = $.prop($$props, "selectionOutlineColor", 3, "#007ACC"), restProps = $.rest_props($$props, [
|
|
46
94
|
"$$slots",
|
|
47
95
|
"$$events",
|
|
48
96
|
"$$legacy",
|
|
@@ -1532,9 +1580,12 @@ function GroupSelectionBox($$anchor, $$props) {
|
|
|
1532
1580
|
$.push($$props, true);
|
|
1533
1581
|
let selectionOutlineColor = $.prop($$props, "selectionOutlineColor", 3, "#007ACC"), outlineOffset = $.prop($$props, "outlineOffset", 3, 2), zIndex = $.prop($$props, "zIndex", 3, 100);
|
|
1534
1582
|
const annotationPlugin = useAnnotationPlugin();
|
|
1583
|
+
const permissions = useDocumentPermissions(() => $$props.documentId);
|
|
1535
1584
|
let gestureBase = $.state(null);
|
|
1536
1585
|
let isDraggingRef = $.state(false);
|
|
1537
1586
|
let isResizingRef = $.state(false);
|
|
1587
|
+
const effectiveIsDraggable = $.derived(() => permissions.canModifyAnnotations && $$props.isDraggable);
|
|
1588
|
+
const effectiveIsResizable = $.derived(() => permissions.canModifyAnnotations && $$props.isResizable);
|
|
1538
1589
|
function getGroupBox() {
|
|
1539
1590
|
const rects = $$props.selectedAnnotations.map((ta) => ta.object.rect);
|
|
1540
1591
|
return boundingRectOrEmpty(rects);
|
|
@@ -1577,7 +1628,7 @@ function GroupSelectionBox($$anchor, $$props) {
|
|
|
1577
1628
|
const transformType = event.transformData.type;
|
|
1578
1629
|
const isMove = transformType === "move";
|
|
1579
1630
|
const isResize = transformType === "resize";
|
|
1580
|
-
if (isMove &&
|
|
1631
|
+
if (isMove && !$.get(effectiveIsDraggable)) return;
|
|
1581
1632
|
if (event.state === "start") {
|
|
1582
1633
|
$.set(gestureBase, getGroupBox(), true);
|
|
1583
1634
|
if (isMove) {
|
|
@@ -1666,7 +1717,7 @@ function GroupSelectionBox($$anchor, $$props) {
|
|
|
1666
1717
|
var div = root_1$1();
|
|
1667
1718
|
var div_1 = $.child(div);
|
|
1668
1719
|
$.attribute_effect(div_1, () => ({
|
|
1669
|
-
|
|
1720
|
+
...$.get(effectiveIsDraggable) ? interactionHandles.dragProps : { onpointerdown: (e) => e.stopPropagation() },
|
|
1670
1721
|
[$.STYLE]: {
|
|
1671
1722
|
position: "absolute",
|
|
1672
1723
|
left: `${$.get(previewGroupBox).origin.x * $$props.scale}px`,
|
|
@@ -1675,7 +1726,7 @@ function GroupSelectionBox($$anchor, $$props) {
|
|
|
1675
1726
|
height: `${$.get(previewGroupBox).size.height * $$props.scale}px`,
|
|
1676
1727
|
outline: `2px dashed ${selectionOutlineColor() ?? ""}`,
|
|
1677
1728
|
"outline-offset": `${outlineOffset() - 1}px`,
|
|
1678
|
-
cursor:
|
|
1729
|
+
cursor: $.get(effectiveIsDraggable) ? "move" : "default",
|
|
1679
1730
|
"touch-action": "none",
|
|
1680
1731
|
"z-index": zIndex()
|
|
1681
1732
|
}
|
|
@@ -1719,7 +1770,7 @@ function GroupSelectionBox($$anchor, $$props) {
|
|
|
1719
1770
|
$.append($$anchor3, fragment_1);
|
|
1720
1771
|
};
|
|
1721
1772
|
$.if(node_1, ($$render) => {
|
|
1722
|
-
if (
|
|
1773
|
+
if ($.get(effectiveIsResizable)) $$render(consequent_1);
|
|
1723
1774
|
});
|
|
1724
1775
|
}
|
|
1725
1776
|
$.reset(div_1);
|
|
@@ -1820,6 +1871,10 @@ var root$2 = $.from_html(`<!> <!>`, 1);
|
|
|
1820
1871
|
function Annotations($$anchor, $$props) {
|
|
1821
1872
|
$.push($$props, true);
|
|
1822
1873
|
let annotationsProps = $.rest_props($$props, ["$$slots", "$$events", "$$legacy"]);
|
|
1874
|
+
function findCustomRenderer(annotation) {
|
|
1875
|
+
var _a;
|
|
1876
|
+
return (_a = $$props.annotationRenderers) == null ? void 0 : _a.find((r) => r.matches(annotation.object));
|
|
1877
|
+
}
|
|
1823
1878
|
const annotationCapability = useAnnotationCapability();
|
|
1824
1879
|
const selectionCapability = useSelectionCapability();
|
|
1825
1880
|
const pointerHandlers = usePointerHandlers({ documentId: $$props.documentId, pageIndex: $$props.pageIndex });
|
|
@@ -1885,7 +1940,9 @@ function Annotations($$anchor, $$props) {
|
|
|
1885
1940
|
return $.get(selectedAnnotationsOnPage).every((ta) => {
|
|
1886
1941
|
var _a;
|
|
1887
1942
|
const tool = (_a = $.get(annotationProvides)) == null ? void 0 : _a.findToolForAnnotation(ta.object);
|
|
1888
|
-
|
|
1943
|
+
const groupDraggable = resolveInteractionProp(tool == null ? void 0 : tool.interaction.isGroupDraggable, ta.object, true);
|
|
1944
|
+
const singleDraggable = resolveInteractionProp(tool == null ? void 0 : tool.interaction.isDraggable, ta.object, true);
|
|
1945
|
+
return (tool == null ? void 0 : tool.interaction.isGroupDraggable) !== void 0 ? groupDraggable : singleDraggable;
|
|
1889
1946
|
});
|
|
1890
1947
|
});
|
|
1891
1948
|
const areAllSelectedResizable = $.derived(() => {
|
|
@@ -1893,7 +1950,9 @@ function Annotations($$anchor, $$props) {
|
|
|
1893
1950
|
return $.get(selectedAnnotationsOnPage).every((ta) => {
|
|
1894
1951
|
var _a;
|
|
1895
1952
|
const tool = (_a = $.get(annotationProvides)) == null ? void 0 : _a.findToolForAnnotation(ta.object);
|
|
1896
|
-
|
|
1953
|
+
const groupResizable = resolveInteractionProp(tool == null ? void 0 : tool.interaction.isGroupResizable, ta.object, true);
|
|
1954
|
+
const singleResizable = resolveInteractionProp(tool == null ? void 0 : tool.interaction.isResizable, ta.object, true);
|
|
1955
|
+
return (tool == null ? void 0 : tool.interaction.isGroupResizable) !== void 0 ? groupResizable : singleResizable;
|
|
1897
1956
|
});
|
|
1898
1957
|
});
|
|
1899
1958
|
const allSelectedOnSamePage = $.derived(() => {
|
|
@@ -1912,34 +1971,47 @@ function Annotations($$anchor, $$props) {
|
|
|
1912
1971
|
return (_a = $.get(annotationProvides)) == null ? void 0 : _a.findToolForAnnotation($.get(annotation).object);
|
|
1913
1972
|
});
|
|
1914
1973
|
const mixBlendMode = $.derived(() => blendModeToCss($.get(annotation).object.blendMode ?? PdfBlendMode.Normal));
|
|
1974
|
+
const customRenderer = $.derived(() => findCustomRenderer($.get(annotation)));
|
|
1915
1975
|
var fragment_1 = $.comment();
|
|
1916
1976
|
var node_1 = $.first_child(fragment_1);
|
|
1917
1977
|
{
|
|
1918
1978
|
var consequent = ($$anchor3) => {
|
|
1919
1979
|
{
|
|
1920
|
-
const children = ($$anchor4,
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1980
|
+
const children = ($$anchor4, _obj = $.noop) => {
|
|
1981
|
+
const CustomComponent = $.derived(() => $.get(customRenderer).component);
|
|
1982
|
+
var fragment_3 = $.comment();
|
|
1983
|
+
var node_2 = $.first_child(fragment_3);
|
|
1984
|
+
$.component(node_2, () => $.get(CustomComponent), ($$anchor5, CustomComponent_1) => {
|
|
1985
|
+
CustomComponent_1($$anchor5, {
|
|
1986
|
+
get annotation() {
|
|
1987
|
+
return $.get(annotation);
|
|
1988
|
+
},
|
|
1989
|
+
get isSelected() {
|
|
1990
|
+
return $.get(isSelected);
|
|
1991
|
+
},
|
|
1992
|
+
get scale() {
|
|
1993
|
+
return $$props.scale;
|
|
1994
|
+
},
|
|
1995
|
+
get pageIndex() {
|
|
1996
|
+
return $$props.pageIndex;
|
|
1997
|
+
},
|
|
1998
|
+
onClick: (e) => handleClick(e, $.get(annotation))
|
|
1999
|
+
});
|
|
2000
|
+
});
|
|
2001
|
+
$.append($$anchor4, fragment_3);
|
|
1930
2002
|
};
|
|
1931
2003
|
let $0 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
1932
2004
|
let $1 = $.derived(() => {
|
|
1933
2005
|
var _a;
|
|
1934
|
-
return ((
|
|
2006
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
1935
2007
|
});
|
|
1936
2008
|
let $2 = $.derived(() => {
|
|
1937
2009
|
var _a;
|
|
1938
|
-
return ((
|
|
2010
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isResizable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
1939
2011
|
});
|
|
1940
2012
|
let $3 = $.derived(() => {
|
|
1941
2013
|
var _a;
|
|
1942
|
-
return ((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio)
|
|
2014
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio, $.get(annotation).object, false);
|
|
1943
2015
|
});
|
|
1944
2016
|
let $4 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
1945
2017
|
let $5 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
@@ -1976,14 +2048,14 @@ function Annotations($$anchor, $$props) {
|
|
|
1976
2048
|
));
|
|
1977
2049
|
}
|
|
1978
2050
|
};
|
|
1979
|
-
var
|
|
2051
|
+
var alternate_12 = ($$anchor3) => {
|
|
1980
2052
|
var fragment_4 = $.comment();
|
|
1981
|
-
var
|
|
2053
|
+
var node_3 = $.first_child(fragment_4);
|
|
1982
2054
|
{
|
|
1983
2055
|
var consequent_1 = ($$anchor4) => {
|
|
1984
2056
|
{
|
|
1985
2057
|
const children = ($$anchor5, obj = $.noop) => {
|
|
1986
|
-
|
|
2058
|
+
Ink($$anchor5, $.spread_props(obj, {
|
|
1987
2059
|
get isSelected() {
|
|
1988
2060
|
return $.get(isSelected);
|
|
1989
2061
|
},
|
|
@@ -1996,15 +2068,15 @@ function Annotations($$anchor, $$props) {
|
|
|
1996
2068
|
let $0 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
1997
2069
|
let $1 = $.derived(() => {
|
|
1998
2070
|
var _a;
|
|
1999
|
-
return ((
|
|
2071
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
2000
2072
|
});
|
|
2001
2073
|
let $2 = $.derived(() => {
|
|
2002
2074
|
var _a;
|
|
2003
|
-
return ((
|
|
2075
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isResizable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
2004
2076
|
});
|
|
2005
2077
|
let $3 = $.derived(() => {
|
|
2006
2078
|
var _a;
|
|
2007
|
-
return ((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio)
|
|
2079
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio, $.get(annotation).object, false);
|
|
2008
2080
|
});
|
|
2009
2081
|
let $4 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
2010
2082
|
let $5 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
@@ -2041,14 +2113,14 @@ function Annotations($$anchor, $$props) {
|
|
|
2041
2113
|
));
|
|
2042
2114
|
}
|
|
2043
2115
|
};
|
|
2044
|
-
var
|
|
2116
|
+
var alternate_11 = ($$anchor4) => {
|
|
2045
2117
|
var fragment_7 = $.comment();
|
|
2046
|
-
var
|
|
2118
|
+
var node_4 = $.first_child(fragment_7);
|
|
2047
2119
|
{
|
|
2048
2120
|
var consequent_2 = ($$anchor5) => {
|
|
2049
2121
|
{
|
|
2050
2122
|
const children = ($$anchor6, obj = $.noop) => {
|
|
2051
|
-
|
|
2123
|
+
Square($$anchor6, $.spread_props(obj, {
|
|
2052
2124
|
get isSelected() {
|
|
2053
2125
|
return $.get(isSelected);
|
|
2054
2126
|
},
|
|
@@ -2061,15 +2133,15 @@ function Annotations($$anchor, $$props) {
|
|
|
2061
2133
|
let $0 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
2062
2134
|
let $1 = $.derived(() => {
|
|
2063
2135
|
var _a;
|
|
2064
|
-
return ((
|
|
2136
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
2065
2137
|
});
|
|
2066
2138
|
let $2 = $.derived(() => {
|
|
2067
2139
|
var _a;
|
|
2068
|
-
return ((
|
|
2140
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isResizable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
2069
2141
|
});
|
|
2070
2142
|
let $3 = $.derived(() => {
|
|
2071
2143
|
var _a;
|
|
2072
|
-
return ((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio)
|
|
2144
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio, $.get(annotation).object, false);
|
|
2073
2145
|
});
|
|
2074
2146
|
let $4 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
2075
2147
|
let $5 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
@@ -2106,14 +2178,17 @@ function Annotations($$anchor, $$props) {
|
|
|
2106
2178
|
));
|
|
2107
2179
|
}
|
|
2108
2180
|
};
|
|
2109
|
-
var
|
|
2181
|
+
var alternate_10 = ($$anchor5) => {
|
|
2110
2182
|
var fragment_10 = $.comment();
|
|
2111
|
-
var
|
|
2183
|
+
var node_5 = $.first_child(fragment_10);
|
|
2112
2184
|
{
|
|
2113
2185
|
var consequent_3 = ($$anchor6) => {
|
|
2114
2186
|
{
|
|
2115
2187
|
const children = ($$anchor7, obj = $.noop) => {
|
|
2116
|
-
|
|
2188
|
+
Circle($$anchor7, $.spread_props(obj, {
|
|
2189
|
+
get isSelected() {
|
|
2190
|
+
return $.get(isSelected);
|
|
2191
|
+
},
|
|
2117
2192
|
get scale() {
|
|
2118
2193
|
return $$props.scale;
|
|
2119
2194
|
},
|
|
@@ -2123,15 +2198,15 @@ function Annotations($$anchor, $$props) {
|
|
|
2123
2198
|
let $0 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
2124
2199
|
let $1 = $.derived(() => {
|
|
2125
2200
|
var _a;
|
|
2126
|
-
return ((
|
|
2201
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
2127
2202
|
});
|
|
2128
2203
|
let $2 = $.derived(() => {
|
|
2129
2204
|
var _a;
|
|
2130
|
-
return ((
|
|
2205
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isResizable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
2131
2206
|
});
|
|
2132
2207
|
let $3 = $.derived(() => {
|
|
2133
2208
|
var _a;
|
|
2134
|
-
return ((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio)
|
|
2209
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio, $.get(annotation).object, false);
|
|
2135
2210
|
});
|
|
2136
2211
|
let $4 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
2137
2212
|
let $5 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
@@ -2159,7 +2234,6 @@ function Annotations($$anchor, $$props) {
|
|
|
2159
2234
|
return $.get($5);
|
|
2160
2235
|
},
|
|
2161
2236
|
onSelect: (e) => handleClick(e, $.get(annotation)),
|
|
2162
|
-
zIndex: 0,
|
|
2163
2237
|
get style() {
|
|
2164
2238
|
return `mix-blend-mode: ${$.get(mixBlendMode) ?? ""}`;
|
|
2165
2239
|
}
|
|
@@ -2169,14 +2243,14 @@ function Annotations($$anchor, $$props) {
|
|
|
2169
2243
|
));
|
|
2170
2244
|
}
|
|
2171
2245
|
};
|
|
2172
|
-
var
|
|
2246
|
+
var alternate_9 = ($$anchor6) => {
|
|
2173
2247
|
var fragment_13 = $.comment();
|
|
2174
|
-
var
|
|
2248
|
+
var node_6 = $.first_child(fragment_13);
|
|
2175
2249
|
{
|
|
2176
2250
|
var consequent_4 = ($$anchor7) => {
|
|
2177
2251
|
{
|
|
2178
2252
|
const children = ($$anchor8, obj = $.noop) => {
|
|
2179
|
-
|
|
2253
|
+
Underline($$anchor8, $.spread_props(obj, {
|
|
2180
2254
|
get scale() {
|
|
2181
2255
|
return $$props.scale;
|
|
2182
2256
|
},
|
|
@@ -2186,15 +2260,15 @@ function Annotations($$anchor, $$props) {
|
|
|
2186
2260
|
let $0 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
2187
2261
|
let $1 = $.derived(() => {
|
|
2188
2262
|
var _a;
|
|
2189
|
-
return ((
|
|
2263
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable, $.get(annotation).object, false) && !$.get(isMultiSelected);
|
|
2190
2264
|
});
|
|
2191
2265
|
let $2 = $.derived(() => {
|
|
2192
2266
|
var _a;
|
|
2193
|
-
return ((
|
|
2267
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isResizable, $.get(annotation).object, false) && !$.get(isMultiSelected);
|
|
2194
2268
|
});
|
|
2195
2269
|
let $3 = $.derived(() => {
|
|
2196
2270
|
var _a;
|
|
2197
|
-
return ((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio)
|
|
2271
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio, $.get(annotation).object, false);
|
|
2198
2272
|
});
|
|
2199
2273
|
let $4 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
2200
2274
|
let $5 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
@@ -2232,14 +2306,14 @@ function Annotations($$anchor, $$props) {
|
|
|
2232
2306
|
));
|
|
2233
2307
|
}
|
|
2234
2308
|
};
|
|
2235
|
-
var
|
|
2309
|
+
var alternate_8 = ($$anchor7) => {
|
|
2236
2310
|
var fragment_16 = $.comment();
|
|
2237
|
-
var
|
|
2311
|
+
var node_7 = $.first_child(fragment_16);
|
|
2238
2312
|
{
|
|
2239
2313
|
var consequent_5 = ($$anchor8) => {
|
|
2240
2314
|
{
|
|
2241
2315
|
const children = ($$anchor9, obj = $.noop) => {
|
|
2242
|
-
|
|
2316
|
+
Strikeout($$anchor9, $.spread_props(obj, {
|
|
2243
2317
|
get scale() {
|
|
2244
2318
|
return $$props.scale;
|
|
2245
2319
|
},
|
|
@@ -2249,15 +2323,15 @@ function Annotations($$anchor, $$props) {
|
|
|
2249
2323
|
let $0 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
2250
2324
|
let $1 = $.derived(() => {
|
|
2251
2325
|
var _a;
|
|
2252
|
-
return ((
|
|
2326
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable, $.get(annotation).object, false) && !$.get(isMultiSelected);
|
|
2253
2327
|
});
|
|
2254
2328
|
let $2 = $.derived(() => {
|
|
2255
2329
|
var _a;
|
|
2256
|
-
return ((
|
|
2330
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isResizable, $.get(annotation).object, false) && !$.get(isMultiSelected);
|
|
2257
2331
|
});
|
|
2258
2332
|
let $3 = $.derived(() => {
|
|
2259
2333
|
var _a;
|
|
2260
|
-
return ((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio)
|
|
2334
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio, $.get(annotation).object, false);
|
|
2261
2335
|
});
|
|
2262
2336
|
let $4 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
2263
2337
|
let $5 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
@@ -2295,14 +2369,14 @@ function Annotations($$anchor, $$props) {
|
|
|
2295
2369
|
));
|
|
2296
2370
|
}
|
|
2297
2371
|
};
|
|
2298
|
-
var
|
|
2372
|
+
var alternate_7 = ($$anchor8) => {
|
|
2299
2373
|
var fragment_19 = $.comment();
|
|
2300
|
-
var
|
|
2374
|
+
var node_8 = $.first_child(fragment_19);
|
|
2301
2375
|
{
|
|
2302
2376
|
var consequent_6 = ($$anchor9) => {
|
|
2303
2377
|
{
|
|
2304
2378
|
const children = ($$anchor10, obj = $.noop) => {
|
|
2305
|
-
|
|
2379
|
+
Squiggly($$anchor10, $.spread_props(obj, {
|
|
2306
2380
|
get scale() {
|
|
2307
2381
|
return $$props.scale;
|
|
2308
2382
|
},
|
|
@@ -2312,19 +2386,18 @@ function Annotations($$anchor, $$props) {
|
|
|
2312
2386
|
let $0 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
2313
2387
|
let $1 = $.derived(() => {
|
|
2314
2388
|
var _a;
|
|
2315
|
-
return ((
|
|
2389
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable, $.get(annotation).object, false) && !$.get(isMultiSelected);
|
|
2316
2390
|
});
|
|
2317
2391
|
let $2 = $.derived(() => {
|
|
2318
2392
|
var _a;
|
|
2319
|
-
return ((
|
|
2393
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isResizable, $.get(annotation).object, false) && !$.get(isMultiSelected);
|
|
2320
2394
|
});
|
|
2321
2395
|
let $3 = $.derived(() => {
|
|
2322
2396
|
var _a;
|
|
2323
|
-
return ((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio)
|
|
2397
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio, $.get(annotation).object, false);
|
|
2324
2398
|
});
|
|
2325
2399
|
let $4 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
2326
2400
|
let $5 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
2327
|
-
let $6 = $.derived(() => blendModeToCss($.get(annotation).object.blendMode ?? PdfBlendMode.Multiply));
|
|
2328
2401
|
AnnotationContainer($$anchor9, $.spread_props(
|
|
2329
2402
|
{
|
|
2330
2403
|
get trackedAnnotation() {
|
|
@@ -2342,16 +2415,16 @@ function Annotations($$anchor, $$props) {
|
|
|
2342
2415
|
get lockAspectRatio() {
|
|
2343
2416
|
return $.get($3);
|
|
2344
2417
|
},
|
|
2345
|
-
onSelect: (e) => handleClick(e, $.get(annotation)),
|
|
2346
|
-
zIndex: 0,
|
|
2347
2418
|
get selectionMenu() {
|
|
2348
2419
|
return $.get($4);
|
|
2349
2420
|
},
|
|
2350
2421
|
get selectionMenuSnippet() {
|
|
2351
2422
|
return $.get($5);
|
|
2352
2423
|
},
|
|
2424
|
+
onSelect: (e) => handleClick(e, $.get(annotation)),
|
|
2425
|
+
zIndex: 0,
|
|
2353
2426
|
get style() {
|
|
2354
|
-
return `mix-blend-mode: ${$.get(
|
|
2427
|
+
return `mix-blend-mode: ${$.get(mixBlendMode) ?? ""}`;
|
|
2355
2428
|
}
|
|
2356
2429
|
},
|
|
2357
2430
|
() => annotationsProps,
|
|
@@ -2359,17 +2432,14 @@ function Annotations($$anchor, $$props) {
|
|
|
2359
2432
|
));
|
|
2360
2433
|
}
|
|
2361
2434
|
};
|
|
2362
|
-
var
|
|
2435
|
+
var alternate_6 = ($$anchor9) => {
|
|
2363
2436
|
var fragment_22 = $.comment();
|
|
2364
|
-
var
|
|
2437
|
+
var node_9 = $.first_child(fragment_22);
|
|
2365
2438
|
{
|
|
2366
2439
|
var consequent_7 = ($$anchor10) => {
|
|
2367
2440
|
{
|
|
2368
2441
|
const children = ($$anchor11, obj = $.noop) => {
|
|
2369
|
-
|
|
2370
|
-
get isSelected() {
|
|
2371
|
-
return $.get(isSelected);
|
|
2372
|
-
},
|
|
2442
|
+
Highlight($$anchor11, $.spread_props(obj, {
|
|
2373
2443
|
get scale() {
|
|
2374
2444
|
return $$props.scale;
|
|
2375
2445
|
},
|
|
@@ -2379,18 +2449,19 @@ function Annotations($$anchor, $$props) {
|
|
|
2379
2449
|
let $0 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
2380
2450
|
let $1 = $.derived(() => {
|
|
2381
2451
|
var _a;
|
|
2382
|
-
return ((
|
|
2452
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable, $.get(annotation).object, false) && !$.get(isMultiSelected);
|
|
2383
2453
|
});
|
|
2384
2454
|
let $2 = $.derived(() => {
|
|
2385
2455
|
var _a;
|
|
2386
|
-
return ((
|
|
2456
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isResizable, $.get(annotation).object, false) && !$.get(isMultiSelected);
|
|
2387
2457
|
});
|
|
2388
2458
|
let $3 = $.derived(() => {
|
|
2389
2459
|
var _a;
|
|
2390
|
-
return ((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio)
|
|
2460
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio, $.get(annotation).object, false);
|
|
2391
2461
|
});
|
|
2392
2462
|
let $4 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
2393
2463
|
let $5 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
2464
|
+
let $6 = $.derived(() => blendModeToCss($.get(annotation).object.blendMode ?? PdfBlendMode.Multiply));
|
|
2394
2465
|
AnnotationContainer($$anchor10, $.spread_props(
|
|
2395
2466
|
{
|
|
2396
2467
|
get trackedAnnotation() {
|
|
@@ -2408,19 +2479,16 @@ function Annotations($$anchor, $$props) {
|
|
|
2408
2479
|
get lockAspectRatio() {
|
|
2409
2480
|
return $.get($3);
|
|
2410
2481
|
},
|
|
2482
|
+
onSelect: (e) => handleClick(e, $.get(annotation)),
|
|
2483
|
+
zIndex: 0,
|
|
2411
2484
|
get selectionMenu() {
|
|
2412
2485
|
return $.get($4);
|
|
2413
2486
|
},
|
|
2414
2487
|
get selectionMenuSnippet() {
|
|
2415
2488
|
return $.get($5);
|
|
2416
2489
|
},
|
|
2417
|
-
onSelect: (e) => handleClick(e, $.get(annotation)),
|
|
2418
|
-
vertexConfig: {
|
|
2419
|
-
extractVertices: (a) => [a.linePoints.start, a.linePoints.end],
|
|
2420
|
-
transformAnnotation: (a, vertices) => ({ ...a, linePoints: { start: vertices[0], end: vertices[1] } })
|
|
2421
|
-
},
|
|
2422
2490
|
get style() {
|
|
2423
|
-
return `mix-blend-mode: ${$.get(
|
|
2491
|
+
return `mix-blend-mode: ${$.get($6) ?? ""}`;
|
|
2424
2492
|
}
|
|
2425
2493
|
},
|
|
2426
2494
|
() => annotationsProps,
|
|
@@ -2428,14 +2496,14 @@ function Annotations($$anchor, $$props) {
|
|
|
2428
2496
|
));
|
|
2429
2497
|
}
|
|
2430
2498
|
};
|
|
2431
|
-
var
|
|
2499
|
+
var alternate_5 = ($$anchor10) => {
|
|
2432
2500
|
var fragment_25 = $.comment();
|
|
2433
|
-
var
|
|
2501
|
+
var node_10 = $.first_child(fragment_25);
|
|
2434
2502
|
{
|
|
2435
2503
|
var consequent_8 = ($$anchor11) => {
|
|
2436
2504
|
{
|
|
2437
2505
|
const children = ($$anchor12, obj = $.noop) => {
|
|
2438
|
-
|
|
2506
|
+
Line($$anchor12, $.spread_props(obj, {
|
|
2439
2507
|
get isSelected() {
|
|
2440
2508
|
return $.get(isSelected);
|
|
2441
2509
|
},
|
|
@@ -2445,48 +2513,48 @@ function Annotations($$anchor, $$props) {
|
|
|
2445
2513
|
onClick: (e) => handleClick(e, $.get(annotation))
|
|
2446
2514
|
}));
|
|
2447
2515
|
};
|
|
2448
|
-
let $0 = $.derived(() => $.get(
|
|
2449
|
-
let $1 = $.derived(() =>
|
|
2450
|
-
let $2 = $.derived(() => {
|
|
2516
|
+
let $0 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
2517
|
+
let $1 = $.derived(() => {
|
|
2451
2518
|
var _a;
|
|
2452
|
-
return ((
|
|
2519
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
2453
2520
|
});
|
|
2454
|
-
let $
|
|
2521
|
+
let $2 = $.derived(() => {
|
|
2455
2522
|
var _a;
|
|
2456
|
-
return ((
|
|
2523
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isResizable, $.get(annotation).object, false) && !$.get(isMultiSelected);
|
|
2457
2524
|
});
|
|
2458
|
-
let $
|
|
2525
|
+
let $3 = $.derived(() => {
|
|
2459
2526
|
var _a;
|
|
2460
|
-
return ((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio)
|
|
2527
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio, $.get(annotation).object, false);
|
|
2461
2528
|
});
|
|
2462
|
-
let $
|
|
2529
|
+
let $4 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
2530
|
+
let $5 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
2463
2531
|
AnnotationContainer($$anchor11, $.spread_props(
|
|
2464
2532
|
{
|
|
2465
2533
|
get trackedAnnotation() {
|
|
2466
2534
|
return $.get(annotation);
|
|
2467
2535
|
},
|
|
2468
|
-
get
|
|
2536
|
+
get isSelected() {
|
|
2469
2537
|
return $.get($0);
|
|
2470
2538
|
},
|
|
2471
|
-
get
|
|
2539
|
+
get isDraggable() {
|
|
2472
2540
|
return $.get($1);
|
|
2473
2541
|
},
|
|
2474
|
-
get
|
|
2542
|
+
get isResizable() {
|
|
2475
2543
|
return $.get($2);
|
|
2476
2544
|
},
|
|
2477
|
-
get
|
|
2545
|
+
get lockAspectRatio() {
|
|
2478
2546
|
return $.get($3);
|
|
2479
2547
|
},
|
|
2480
|
-
get
|
|
2548
|
+
get selectionMenu() {
|
|
2481
2549
|
return $.get($4);
|
|
2482
2550
|
},
|
|
2483
|
-
get
|
|
2551
|
+
get selectionMenuSnippet() {
|
|
2484
2552
|
return $.get($5);
|
|
2485
2553
|
},
|
|
2486
2554
|
onSelect: (e) => handleClick(e, $.get(annotation)),
|
|
2487
2555
|
vertexConfig: {
|
|
2488
|
-
extractVertices: (a) => a.
|
|
2489
|
-
transformAnnotation: (a, vertices) => ({ ...a, vertices })
|
|
2556
|
+
extractVertices: (a) => [a.linePoints.start, a.linePoints.end],
|
|
2557
|
+
transformAnnotation: (a, vertices) => ({ ...a, linePoints: { start: vertices[0], end: vertices[1] } })
|
|
2490
2558
|
},
|
|
2491
2559
|
get style() {
|
|
2492
2560
|
return `mix-blend-mode: ${$.get(mixBlendMode) ?? ""}`;
|
|
@@ -2497,14 +2565,14 @@ function Annotations($$anchor, $$props) {
|
|
|
2497
2565
|
));
|
|
2498
2566
|
}
|
|
2499
2567
|
};
|
|
2500
|
-
var
|
|
2568
|
+
var alternate_4 = ($$anchor11) => {
|
|
2501
2569
|
var fragment_28 = $.comment();
|
|
2502
|
-
var
|
|
2570
|
+
var node_11 = $.first_child(fragment_28);
|
|
2503
2571
|
{
|
|
2504
2572
|
var consequent_9 = ($$anchor12) => {
|
|
2505
2573
|
{
|
|
2506
2574
|
const children = ($$anchor13, obj = $.noop) => {
|
|
2507
|
-
|
|
2575
|
+
Polyline($$anchor13, $.spread_props(obj, {
|
|
2508
2576
|
get isSelected() {
|
|
2509
2577
|
return $.get(isSelected);
|
|
2510
2578
|
},
|
|
@@ -2514,42 +2582,42 @@ function Annotations($$anchor, $$props) {
|
|
|
2514
2582
|
onClick: (e) => handleClick(e, $.get(annotation))
|
|
2515
2583
|
}));
|
|
2516
2584
|
};
|
|
2517
|
-
let $0 = $.derived(() => $.get(
|
|
2518
|
-
let $1 = $.derived(() =>
|
|
2519
|
-
var _a;
|
|
2520
|
-
return (((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable) ?? true) && !$.get(isMultiSelected);
|
|
2521
|
-
});
|
|
2585
|
+
let $0 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
2586
|
+
let $1 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
2522
2587
|
let $2 = $.derived(() => {
|
|
2523
2588
|
var _a;
|
|
2524
|
-
return ((
|
|
2589
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
2525
2590
|
});
|
|
2526
2591
|
let $3 = $.derived(() => {
|
|
2527
2592
|
var _a;
|
|
2528
|
-
return ((_a = $.get(tool)) == null ? void 0 : _a.interaction.
|
|
2593
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isResizable, $.get(annotation).object, false) && !$.get(isMultiSelected);
|
|
2594
|
+
});
|
|
2595
|
+
let $4 = $.derived(() => {
|
|
2596
|
+
var _a;
|
|
2597
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio, $.get(annotation).object, false);
|
|
2529
2598
|
});
|
|
2530
|
-
let $
|
|
2531
|
-
let $5 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
2599
|
+
let $5 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
2532
2600
|
AnnotationContainer($$anchor12, $.spread_props(
|
|
2533
2601
|
{
|
|
2534
2602
|
get trackedAnnotation() {
|
|
2535
2603
|
return $.get(annotation);
|
|
2536
2604
|
},
|
|
2537
|
-
get
|
|
2605
|
+
get selectionMenu() {
|
|
2538
2606
|
return $.get($0);
|
|
2539
2607
|
},
|
|
2540
|
-
get
|
|
2608
|
+
get selectionMenuSnippet() {
|
|
2541
2609
|
return $.get($1);
|
|
2542
2610
|
},
|
|
2543
|
-
get
|
|
2611
|
+
get isDraggable() {
|
|
2544
2612
|
return $.get($2);
|
|
2545
2613
|
},
|
|
2546
|
-
get
|
|
2614
|
+
get isResizable() {
|
|
2547
2615
|
return $.get($3);
|
|
2548
2616
|
},
|
|
2549
|
-
get
|
|
2617
|
+
get lockAspectRatio() {
|
|
2550
2618
|
return $.get($4);
|
|
2551
2619
|
},
|
|
2552
|
-
get
|
|
2620
|
+
get isSelected() {
|
|
2553
2621
|
return $.get($5);
|
|
2554
2622
|
},
|
|
2555
2623
|
onSelect: (e) => handleClick(e, $.get(annotation)),
|
|
@@ -2566,54 +2634,38 @@ function Annotations($$anchor, $$props) {
|
|
|
2566
2634
|
));
|
|
2567
2635
|
}
|
|
2568
2636
|
};
|
|
2569
|
-
var
|
|
2637
|
+
var alternate_3 = ($$anchor12) => {
|
|
2570
2638
|
var fragment_31 = $.comment();
|
|
2571
|
-
var
|
|
2639
|
+
var node_12 = $.first_child(fragment_31);
|
|
2572
2640
|
{
|
|
2573
2641
|
var consequent_10 = ($$anchor13) => {
|
|
2574
2642
|
{
|
|
2575
|
-
const children = ($$anchor14,
|
|
2576
|
-
{
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
get isEditing() {
|
|
2586
|
-
return $.get(isEditing);
|
|
2587
|
-
},
|
|
2588
|
-
get annotation() {
|
|
2589
|
-
return $.get($02);
|
|
2590
|
-
},
|
|
2591
|
-
get pageIndex() {
|
|
2592
|
-
return $$props.pageIndex;
|
|
2593
|
-
},
|
|
2594
|
-
get scale() {
|
|
2595
|
-
return $$props.scale;
|
|
2596
|
-
},
|
|
2597
|
-
onClick: (e) => handleClick(e, $.get(annotation))
|
|
2598
|
-
});
|
|
2599
|
-
}
|
|
2643
|
+
const children = ($$anchor14, obj = $.noop) => {
|
|
2644
|
+
Polygon($$anchor14, $.spread_props(obj, {
|
|
2645
|
+
get isSelected() {
|
|
2646
|
+
return $.get(isSelected);
|
|
2647
|
+
},
|
|
2648
|
+
get scale() {
|
|
2649
|
+
return $$props.scale;
|
|
2650
|
+
},
|
|
2651
|
+
onClick: (e) => handleClick(e, $.get(annotation))
|
|
2652
|
+
}));
|
|
2600
2653
|
};
|
|
2601
2654
|
let $0 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
2602
2655
|
let $1 = $.derived(() => {
|
|
2603
2656
|
var _a;
|
|
2604
|
-
return ((
|
|
2657
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
2605
2658
|
});
|
|
2606
2659
|
let $2 = $.derived(() => {
|
|
2607
2660
|
var _a;
|
|
2608
|
-
return ((
|
|
2661
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isResizable, $.get(annotation).object, false) && !$.get(isMultiSelected);
|
|
2609
2662
|
});
|
|
2610
2663
|
let $3 = $.derived(() => {
|
|
2611
2664
|
var _a;
|
|
2612
|
-
return ((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio)
|
|
2665
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio, $.get(annotation).object, false);
|
|
2613
2666
|
});
|
|
2614
2667
|
let $4 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
2615
2668
|
let $5 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
2616
|
-
let $6 = $.derived(() => blendModeToCss($.get(annotation).object.blendMode ?? PdfBlendMode.Normal));
|
|
2617
2669
|
AnnotationContainer($$anchor13, $.spread_props(
|
|
2618
2670
|
{
|
|
2619
2671
|
get trackedAnnotation() {
|
|
@@ -2638,12 +2690,12 @@ function Annotations($$anchor, $$props) {
|
|
|
2638
2690
|
return $.get($5);
|
|
2639
2691
|
},
|
|
2640
2692
|
onSelect: (e) => handleClick(e, $.get(annotation)),
|
|
2641
|
-
|
|
2642
|
-
|
|
2693
|
+
vertexConfig: {
|
|
2694
|
+
extractVertices: (a) => a.vertices,
|
|
2695
|
+
transformAnnotation: (a, vertices) => ({ ...a, vertices })
|
|
2643
2696
|
},
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
$.set(editingId, $.get(annotation).object.id, true);
|
|
2697
|
+
get style() {
|
|
2698
|
+
return `mix-blend-mode: ${$.get(mixBlendMode) ?? ""}`;
|
|
2647
2699
|
}
|
|
2648
2700
|
},
|
|
2649
2701
|
() => annotationsProps,
|
|
@@ -2651,47 +2703,54 @@ function Annotations($$anchor, $$props) {
|
|
|
2651
2703
|
));
|
|
2652
2704
|
}
|
|
2653
2705
|
};
|
|
2654
|
-
var
|
|
2706
|
+
var alternate_2 = ($$anchor13) => {
|
|
2655
2707
|
var fragment_34 = $.comment();
|
|
2656
|
-
var
|
|
2708
|
+
var node_13 = $.first_child(fragment_34);
|
|
2657
2709
|
{
|
|
2658
2710
|
var consequent_11 = ($$anchor14) => {
|
|
2659
2711
|
{
|
|
2660
|
-
const children = ($$anchor15,
|
|
2661
|
-
|
|
2662
|
-
get
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2712
|
+
const children = ($$anchor15, object = $.noop) => {
|
|
2713
|
+
{
|
|
2714
|
+
let $02 = $.derived(() => ({ ...$.get(annotation), object: object() }));
|
|
2715
|
+
FreeText($$anchor15, {
|
|
2716
|
+
get documentId() {
|
|
2717
|
+
return $$props.documentId;
|
|
2718
|
+
},
|
|
2719
|
+
get isSelected() {
|
|
2720
|
+
return $.get(isSelected);
|
|
2721
|
+
},
|
|
2722
|
+
get isEditing() {
|
|
2723
|
+
return $.get(isEditing);
|
|
2724
|
+
},
|
|
2725
|
+
get annotation() {
|
|
2726
|
+
return $.get($02);
|
|
2727
|
+
},
|
|
2728
|
+
get pageIndex() {
|
|
2729
|
+
return $$props.pageIndex;
|
|
2730
|
+
},
|
|
2731
|
+
get scale() {
|
|
2732
|
+
return $$props.scale;
|
|
2733
|
+
},
|
|
2734
|
+
onClick: (e) => handleClick(e, $.get(annotation))
|
|
2735
|
+
});
|
|
2736
|
+
}
|
|
2679
2737
|
};
|
|
2680
2738
|
let $0 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
2681
2739
|
let $1 = $.derived(() => {
|
|
2682
2740
|
var _a;
|
|
2683
|
-
return ((
|
|
2741
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable, $.get(annotation).object, true) && !$.get(isEditing) && !$.get(isMultiSelected);
|
|
2684
2742
|
});
|
|
2685
2743
|
let $2 = $.derived(() => {
|
|
2686
2744
|
var _a;
|
|
2687
|
-
return ((
|
|
2745
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isResizable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
2688
2746
|
});
|
|
2689
2747
|
let $3 = $.derived(() => {
|
|
2690
2748
|
var _a;
|
|
2691
|
-
return ((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio)
|
|
2749
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio, $.get(annotation).object, false);
|
|
2692
2750
|
});
|
|
2693
2751
|
let $4 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
2694
2752
|
let $5 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
2753
|
+
let $6 = $.derived(() => blendModeToCss($.get(annotation).object.blendMode ?? PdfBlendMode.Normal));
|
|
2695
2754
|
AnnotationContainer($$anchor14, $.spread_props(
|
|
2696
2755
|
{
|
|
2697
2756
|
get trackedAnnotation() {
|
|
@@ -2717,7 +2776,11 @@ function Annotations($$anchor, $$props) {
|
|
|
2717
2776
|
},
|
|
2718
2777
|
onSelect: (e) => handleClick(e, $.get(annotation)),
|
|
2719
2778
|
get style() {
|
|
2720
|
-
return `mix-blend-mode: ${$.get(
|
|
2779
|
+
return `mix-blend-mode: ${$.get($6) ?? ""}`;
|
|
2780
|
+
},
|
|
2781
|
+
onDoubleClick: (e) => {
|
|
2782
|
+
e.stopPropagation();
|
|
2783
|
+
$.set(editingId, $.get(annotation).object.id, true);
|
|
2721
2784
|
}
|
|
2722
2785
|
},
|
|
2723
2786
|
() => annotationsProps,
|
|
@@ -2725,30 +2788,47 @@ function Annotations($$anchor, $$props) {
|
|
|
2725
2788
|
));
|
|
2726
2789
|
}
|
|
2727
2790
|
};
|
|
2728
|
-
var
|
|
2791
|
+
var alternate_1 = ($$anchor14) => {
|
|
2729
2792
|
var fragment_37 = $.comment();
|
|
2730
|
-
var
|
|
2793
|
+
var node_14 = $.first_child(fragment_37);
|
|
2731
2794
|
{
|
|
2732
2795
|
var consequent_12 = ($$anchor15) => {
|
|
2733
|
-
const hasIRT = $.derived(() => !!$.get(annotation).object.inReplyToId);
|
|
2734
2796
|
{
|
|
2735
|
-
const children = ($$anchor16,
|
|
2736
|
-
|
|
2797
|
+
const children = ($$anchor16, _object = $.noop) => {
|
|
2798
|
+
Stamp($$anchor16, {
|
|
2799
|
+
get documentId() {
|
|
2800
|
+
return $$props.documentId;
|
|
2801
|
+
},
|
|
2737
2802
|
get isSelected() {
|
|
2738
2803
|
return $.get(isSelected);
|
|
2739
2804
|
},
|
|
2805
|
+
get annotation() {
|
|
2806
|
+
return $.get(annotation);
|
|
2807
|
+
},
|
|
2808
|
+
get pageIndex() {
|
|
2809
|
+
return $$props.pageIndex;
|
|
2810
|
+
},
|
|
2740
2811
|
get scale() {
|
|
2741
2812
|
return $$props.scale;
|
|
2742
2813
|
},
|
|
2743
|
-
onClick: (e) =>
|
|
2744
|
-
|
|
2745
|
-
return $.get(hasIRT);
|
|
2746
|
-
}
|
|
2747
|
-
}));
|
|
2814
|
+
onClick: (e) => handleClick(e, $.get(annotation))
|
|
2815
|
+
});
|
|
2748
2816
|
};
|
|
2749
2817
|
let $0 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
2750
|
-
let $1 = $.derived(() =>
|
|
2751
|
-
|
|
2818
|
+
let $1 = $.derived(() => {
|
|
2819
|
+
var _a;
|
|
2820
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isDraggable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
2821
|
+
});
|
|
2822
|
+
let $2 = $.derived(() => {
|
|
2823
|
+
var _a;
|
|
2824
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.isResizable, $.get(annotation).object, true) && !$.get(isMultiSelected);
|
|
2825
|
+
});
|
|
2826
|
+
let $3 = $.derived(() => {
|
|
2827
|
+
var _a;
|
|
2828
|
+
return resolveInteractionProp((_a = $.get(tool)) == null ? void 0 : _a.interaction.lockAspectRatio, $.get(annotation).object, false);
|
|
2829
|
+
});
|
|
2830
|
+
let $4 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
2831
|
+
let $5 = $.derived(() => $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
2752
2832
|
AnnotationContainer($$anchor15, $.spread_props(
|
|
2753
2833
|
{
|
|
2754
2834
|
get trackedAnnotation() {
|
|
@@ -2757,19 +2837,22 @@ function Annotations($$anchor, $$props) {
|
|
|
2757
2837
|
get isSelected() {
|
|
2758
2838
|
return $.get($0);
|
|
2759
2839
|
},
|
|
2760
|
-
get
|
|
2761
|
-
return $.get(
|
|
2840
|
+
get isDraggable() {
|
|
2841
|
+
return $.get($1);
|
|
2842
|
+
},
|
|
2843
|
+
get isResizable() {
|
|
2844
|
+
return $.get($2);
|
|
2845
|
+
},
|
|
2846
|
+
get lockAspectRatio() {
|
|
2847
|
+
return $.get($3);
|
|
2762
2848
|
},
|
|
2763
|
-
isDraggable: false,
|
|
2764
|
-
isResizable: false,
|
|
2765
|
-
lockAspectRatio: false,
|
|
2766
2849
|
get selectionMenu() {
|
|
2767
|
-
return $.get($
|
|
2850
|
+
return $.get($4);
|
|
2768
2851
|
},
|
|
2769
2852
|
get selectionMenuSnippet() {
|
|
2770
|
-
return $.get($
|
|
2853
|
+
return $.get($5);
|
|
2771
2854
|
},
|
|
2772
|
-
onSelect: (e) =>
|
|
2855
|
+
onSelect: (e) => handleClick(e, $.get(annotation)),
|
|
2773
2856
|
get style() {
|
|
2774
2857
|
return `mix-blend-mode: ${$.get(mixBlendMode) ?? ""}`;
|
|
2775
2858
|
}
|
|
@@ -2779,10 +2862,75 @@ function Annotations($$anchor, $$props) {
|
|
|
2779
2862
|
));
|
|
2780
2863
|
}
|
|
2781
2864
|
};
|
|
2865
|
+
var alternate = ($$anchor15) => {
|
|
2866
|
+
var fragment_40 = $.comment();
|
|
2867
|
+
var node_15 = $.first_child(fragment_40);
|
|
2868
|
+
{
|
|
2869
|
+
var consequent_13 = ($$anchor16) => {
|
|
2870
|
+
const hasIRT = $.derived(() => !!$.get(annotation).object.inReplyToId);
|
|
2871
|
+
{
|
|
2872
|
+
const children = ($$anchor17, obj = $.noop) => {
|
|
2873
|
+
Link($$anchor17, $.spread_props(obj, {
|
|
2874
|
+
get isSelected() {
|
|
2875
|
+
return $.get(isSelected);
|
|
2876
|
+
},
|
|
2877
|
+
get scale() {
|
|
2878
|
+
return $$props.scale;
|
|
2879
|
+
},
|
|
2880
|
+
onClick: (e) => handleLinkClick(e, $.get(annotation)),
|
|
2881
|
+
get hasIRT() {
|
|
2882
|
+
return $.get(hasIRT);
|
|
2883
|
+
}
|
|
2884
|
+
}));
|
|
2885
|
+
};
|
|
2886
|
+
let $0 = $.derived(() => $.get(isSelected) && !$.get(isMultiSelected));
|
|
2887
|
+
let $1 = $.derived(() => $.get(hasIRT) ? void 0 : $.get(isMultiSelected) ? void 0 : $$props.selectionMenu);
|
|
2888
|
+
let $2 = $.derived(() => $.get(hasIRT) ? void 0 : $.get(isMultiSelected) ? void 0 : $$props.selectionMenuSnippet);
|
|
2889
|
+
AnnotationContainer($$anchor16, $.spread_props(
|
|
2890
|
+
{
|
|
2891
|
+
get trackedAnnotation() {
|
|
2892
|
+
return $.get(annotation);
|
|
2893
|
+
},
|
|
2894
|
+
get isSelected() {
|
|
2895
|
+
return $.get($0);
|
|
2896
|
+
},
|
|
2897
|
+
get isMultiSelected() {
|
|
2898
|
+
return $.get(isMultiSelected);
|
|
2899
|
+
},
|
|
2900
|
+
isDraggable: false,
|
|
2901
|
+
isResizable: false,
|
|
2902
|
+
lockAspectRatio: false,
|
|
2903
|
+
get selectionMenu() {
|
|
2904
|
+
return $.get($1);
|
|
2905
|
+
},
|
|
2906
|
+
get selectionMenuSnippet() {
|
|
2907
|
+
return $.get($2);
|
|
2908
|
+
},
|
|
2909
|
+
onSelect: (e) => handleLinkClick(e, $.get(annotation)),
|
|
2910
|
+
get style() {
|
|
2911
|
+
return `mix-blend-mode: ${$.get(mixBlendMode) ?? ""}`;
|
|
2912
|
+
}
|
|
2913
|
+
},
|
|
2914
|
+
() => annotationsProps,
|
|
2915
|
+
{ children, $$slots: { default: true } }
|
|
2916
|
+
));
|
|
2917
|
+
}
|
|
2918
|
+
};
|
|
2919
|
+
$.if(
|
|
2920
|
+
node_15,
|
|
2921
|
+
($$render) => {
|
|
2922
|
+
if (isLink($.get(annotation))) $$render(consequent_13);
|
|
2923
|
+
},
|
|
2924
|
+
true
|
|
2925
|
+
);
|
|
2926
|
+
}
|
|
2927
|
+
$.append($$anchor15, fragment_40);
|
|
2928
|
+
};
|
|
2782
2929
|
$.if(
|
|
2783
|
-
|
|
2930
|
+
node_14,
|
|
2784
2931
|
($$render) => {
|
|
2785
|
-
if (
|
|
2932
|
+
if (isStamp($.get(annotation))) $$render(consequent_12);
|
|
2933
|
+
else $$render(alternate, false);
|
|
2786
2934
|
},
|
|
2787
2935
|
true
|
|
2788
2936
|
);
|
|
@@ -2790,10 +2938,10 @@ function Annotations($$anchor, $$props) {
|
|
|
2790
2938
|
$.append($$anchor14, fragment_37);
|
|
2791
2939
|
};
|
|
2792
2940
|
$.if(
|
|
2793
|
-
|
|
2941
|
+
node_13,
|
|
2794
2942
|
($$render) => {
|
|
2795
|
-
if (
|
|
2796
|
-
else $$render(
|
|
2943
|
+
if (isFreeText($.get(annotation))) $$render(consequent_11);
|
|
2944
|
+
else $$render(alternate_1, false);
|
|
2797
2945
|
},
|
|
2798
2946
|
true
|
|
2799
2947
|
);
|
|
@@ -2801,10 +2949,10 @@ function Annotations($$anchor, $$props) {
|
|
|
2801
2949
|
$.append($$anchor13, fragment_34);
|
|
2802
2950
|
};
|
|
2803
2951
|
$.if(
|
|
2804
|
-
|
|
2952
|
+
node_12,
|
|
2805
2953
|
($$render) => {
|
|
2806
|
-
if (
|
|
2807
|
-
else $$render(
|
|
2954
|
+
if (isPolygon($.get(annotation))) $$render(consequent_10);
|
|
2955
|
+
else $$render(alternate_2, false);
|
|
2808
2956
|
},
|
|
2809
2957
|
true
|
|
2810
2958
|
);
|
|
@@ -2812,10 +2960,10 @@ function Annotations($$anchor, $$props) {
|
|
|
2812
2960
|
$.append($$anchor12, fragment_31);
|
|
2813
2961
|
};
|
|
2814
2962
|
$.if(
|
|
2815
|
-
|
|
2963
|
+
node_11,
|
|
2816
2964
|
($$render) => {
|
|
2817
|
-
if (
|
|
2818
|
-
else $$render(
|
|
2965
|
+
if (isPolyline($.get(annotation))) $$render(consequent_9);
|
|
2966
|
+
else $$render(alternate_3, false);
|
|
2819
2967
|
},
|
|
2820
2968
|
true
|
|
2821
2969
|
);
|
|
@@ -2823,10 +2971,10 @@ function Annotations($$anchor, $$props) {
|
|
|
2823
2971
|
$.append($$anchor11, fragment_28);
|
|
2824
2972
|
};
|
|
2825
2973
|
$.if(
|
|
2826
|
-
|
|
2974
|
+
node_10,
|
|
2827
2975
|
($$render) => {
|
|
2828
|
-
if (
|
|
2829
|
-
else $$render(
|
|
2976
|
+
if (isLine($.get(annotation))) $$render(consequent_8);
|
|
2977
|
+
else $$render(alternate_4, false);
|
|
2830
2978
|
},
|
|
2831
2979
|
true
|
|
2832
2980
|
);
|
|
@@ -2834,10 +2982,10 @@ function Annotations($$anchor, $$props) {
|
|
|
2834
2982
|
$.append($$anchor10, fragment_25);
|
|
2835
2983
|
};
|
|
2836
2984
|
$.if(
|
|
2837
|
-
|
|
2985
|
+
node_9,
|
|
2838
2986
|
($$render) => {
|
|
2839
|
-
if (
|
|
2840
|
-
else $$render(
|
|
2987
|
+
if (isHighlight($.get(annotation))) $$render(consequent_7);
|
|
2988
|
+
else $$render(alternate_5, false);
|
|
2841
2989
|
},
|
|
2842
2990
|
true
|
|
2843
2991
|
);
|
|
@@ -2845,10 +2993,10 @@ function Annotations($$anchor, $$props) {
|
|
|
2845
2993
|
$.append($$anchor9, fragment_22);
|
|
2846
2994
|
};
|
|
2847
2995
|
$.if(
|
|
2848
|
-
|
|
2996
|
+
node_8,
|
|
2849
2997
|
($$render) => {
|
|
2850
|
-
if (
|
|
2851
|
-
else $$render(
|
|
2998
|
+
if (isSquiggly($.get(annotation))) $$render(consequent_6);
|
|
2999
|
+
else $$render(alternate_6, false);
|
|
2852
3000
|
},
|
|
2853
3001
|
true
|
|
2854
3002
|
);
|
|
@@ -2856,10 +3004,10 @@ function Annotations($$anchor, $$props) {
|
|
|
2856
3004
|
$.append($$anchor8, fragment_19);
|
|
2857
3005
|
};
|
|
2858
3006
|
$.if(
|
|
2859
|
-
|
|
3007
|
+
node_7,
|
|
2860
3008
|
($$render) => {
|
|
2861
|
-
if (
|
|
2862
|
-
else $$render(
|
|
3009
|
+
if (isStrikeout($.get(annotation))) $$render(consequent_5);
|
|
3010
|
+
else $$render(alternate_7, false);
|
|
2863
3011
|
},
|
|
2864
3012
|
true
|
|
2865
3013
|
);
|
|
@@ -2867,10 +3015,10 @@ function Annotations($$anchor, $$props) {
|
|
|
2867
3015
|
$.append($$anchor7, fragment_16);
|
|
2868
3016
|
};
|
|
2869
3017
|
$.if(
|
|
2870
|
-
|
|
3018
|
+
node_6,
|
|
2871
3019
|
($$render) => {
|
|
2872
|
-
if (
|
|
2873
|
-
else $$render(
|
|
3020
|
+
if (isUnderline($.get(annotation))) $$render(consequent_4);
|
|
3021
|
+
else $$render(alternate_8, false);
|
|
2874
3022
|
},
|
|
2875
3023
|
true
|
|
2876
3024
|
);
|
|
@@ -2878,10 +3026,10 @@ function Annotations($$anchor, $$props) {
|
|
|
2878
3026
|
$.append($$anchor6, fragment_13);
|
|
2879
3027
|
};
|
|
2880
3028
|
$.if(
|
|
2881
|
-
|
|
3029
|
+
node_5,
|
|
2882
3030
|
($$render) => {
|
|
2883
|
-
if (
|
|
2884
|
-
else $$render(
|
|
3031
|
+
if (isCircle($.get(annotation))) $$render(consequent_3);
|
|
3032
|
+
else $$render(alternate_9, false);
|
|
2885
3033
|
},
|
|
2886
3034
|
true
|
|
2887
3035
|
);
|
|
@@ -2889,10 +3037,10 @@ function Annotations($$anchor, $$props) {
|
|
|
2889
3037
|
$.append($$anchor5, fragment_10);
|
|
2890
3038
|
};
|
|
2891
3039
|
$.if(
|
|
2892
|
-
|
|
3040
|
+
node_4,
|
|
2893
3041
|
($$render) => {
|
|
2894
|
-
if (
|
|
2895
|
-
else $$render(
|
|
3042
|
+
if (isSquare($.get(annotation))) $$render(consequent_2);
|
|
3043
|
+
else $$render(alternate_10, false);
|
|
2896
3044
|
},
|
|
2897
3045
|
true
|
|
2898
3046
|
);
|
|
@@ -2900,10 +3048,10 @@ function Annotations($$anchor, $$props) {
|
|
|
2900
3048
|
$.append($$anchor4, fragment_7);
|
|
2901
3049
|
};
|
|
2902
3050
|
$.if(
|
|
2903
|
-
|
|
3051
|
+
node_3,
|
|
2904
3052
|
($$render) => {
|
|
2905
|
-
if (
|
|
2906
|
-
else $$render(
|
|
3053
|
+
if (isInk($.get(annotation))) $$render(consequent_1);
|
|
3054
|
+
else $$render(alternate_11, false);
|
|
2907
3055
|
},
|
|
2908
3056
|
true
|
|
2909
3057
|
);
|
|
@@ -2911,15 +3059,15 @@ function Annotations($$anchor, $$props) {
|
|
|
2911
3059
|
$.append($$anchor3, fragment_4);
|
|
2912
3060
|
};
|
|
2913
3061
|
$.if(node_1, ($$render) => {
|
|
2914
|
-
if (
|
|
2915
|
-
else $$render(
|
|
3062
|
+
if ($.get(customRenderer)) $$render(consequent);
|
|
3063
|
+
else $$render(alternate_12, false);
|
|
2916
3064
|
});
|
|
2917
3065
|
}
|
|
2918
3066
|
$.append($$anchor2, fragment_1);
|
|
2919
3067
|
});
|
|
2920
|
-
var
|
|
3068
|
+
var node_16 = $.sibling(node, 2);
|
|
2921
3069
|
{
|
|
2922
|
-
var
|
|
3070
|
+
var consequent_14 = ($$anchor2) => {
|
|
2923
3071
|
GroupSelectionBox($$anchor2, {
|
|
2924
3072
|
get documentId() {
|
|
2925
3073
|
return $$props.documentId;
|
|
@@ -2962,8 +3110,8 @@ function Annotations($$anchor, $$props) {
|
|
|
2962
3110
|
}
|
|
2963
3111
|
});
|
|
2964
3112
|
};
|
|
2965
|
-
$.if(
|
|
2966
|
-
if ($.get(allSelectedOnSamePage) && $.get(selectedAnnotationsOnPage).length >= 2) $$render(
|
|
3113
|
+
$.if(node_16, ($$render) => {
|
|
3114
|
+
if ($.get(allSelectedOnSamePage) && $.get(selectedAnnotationsOnPage).length >= 2) $$render(consequent_14);
|
|
2967
3115
|
});
|
|
2968
3116
|
}
|
|
2969
3117
|
$.append($$anchor, fragment);
|
|
@@ -3608,8 +3756,21 @@ function AnnotationLayer($$anchor, $$props) {
|
|
|
3608
3756
|
"resizeUI",
|
|
3609
3757
|
"vertexUI",
|
|
3610
3758
|
"selectionOutlineColor",
|
|
3611
|
-
"customAnnotationRenderer"
|
|
3759
|
+
"customAnnotationRenderer",
|
|
3760
|
+
"annotationRenderers"
|
|
3612
3761
|
]);
|
|
3762
|
+
const registry = getRendererRegistry();
|
|
3763
|
+
const allRenderers = $.derived(() => {
|
|
3764
|
+
const fromRegistry = (registry == null ? void 0 : registry.getAll()) ?? [];
|
|
3765
|
+
const fromProps = $$props.annotationRenderers ?? [];
|
|
3766
|
+
const merged = [...fromRegistry];
|
|
3767
|
+
for (const r of fromProps) {
|
|
3768
|
+
const idx = merged.findIndex((m) => m.id === r.id);
|
|
3769
|
+
if (idx >= 0) merged[idx] = r;
|
|
3770
|
+
else merged.push(r);
|
|
3771
|
+
}
|
|
3772
|
+
return merged;
|
|
3773
|
+
});
|
|
3613
3774
|
const documentState = useDocumentState(() => $$props.documentId);
|
|
3614
3775
|
const page = $.derived(() => {
|
|
3615
3776
|
var _a, _b, _c;
|
|
@@ -3678,6 +3839,9 @@ function AnnotationLayer($$anchor, $$props) {
|
|
|
3678
3839
|
},
|
|
3679
3840
|
get customAnnotationRenderer() {
|
|
3680
3841
|
return $$props.customAnnotationRenderer;
|
|
3842
|
+
},
|
|
3843
|
+
get annotationRenderers() {
|
|
3844
|
+
return $.get(allRenderers);
|
|
3681
3845
|
}
|
|
3682
3846
|
});
|
|
3683
3847
|
var node_1 = $.sibling(node, 2);
|
|
@@ -3708,10 +3872,12 @@ function AnnotationLayer($$anchor, $$props) {
|
|
|
3708
3872
|
$.append($$anchor, div);
|
|
3709
3873
|
$.pop();
|
|
3710
3874
|
}
|
|
3875
|
+
const AnnotationPluginPackage = createPluginPackage(AnnotationPluginPackage$1).addWrapper(RendererRegistryProvider).build();
|
|
3711
3876
|
export {
|
|
3712
3877
|
AnnotationContainer,
|
|
3713
3878
|
AnnotationLayer,
|
|
3714
3879
|
AnnotationPaintLayer,
|
|
3880
|
+
AnnotationPluginPackage,
|
|
3715
3881
|
Annotations,
|
|
3716
3882
|
Circle,
|
|
3717
3883
|
FreeText,
|
|
@@ -3724,12 +3890,17 @@ export {
|
|
|
3724
3890
|
Polyline,
|
|
3725
3891
|
PreviewRenderer,
|
|
3726
3892
|
RenderAnnotation,
|
|
3893
|
+
RendererRegistryProvider,
|
|
3727
3894
|
Square,
|
|
3728
3895
|
Squiggly,
|
|
3729
3896
|
Stamp,
|
|
3730
3897
|
Strikeout,
|
|
3731
3898
|
TextMarkup,
|
|
3732
3899
|
Underline,
|
|
3900
|
+
createRenderer,
|
|
3901
|
+
createRendererRegistry,
|
|
3902
|
+
getRendererRegistry,
|
|
3903
|
+
provideRendererRegistry,
|
|
3733
3904
|
useAnnotation,
|
|
3734
3905
|
useAnnotationCapability,
|
|
3735
3906
|
useAnnotationPlugin
|