@molecule/app-annotation-pin-angular 0.0.0-stage → 0.0.1-stage
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/LICENSE +202 -0
- package/README.md +643 -2
- package/dist/annotation-layer.component.d.ts +120 -0
- package/dist/annotation-layer.component.d.ts.map +1 -0
- package/dist/annotation-layer.component.js +222 -0
- package/dist/annotation-layer.component.js.map +1 -0
- package/dist/annotation-pin.component.d.ts +183 -0
- package/dist/annotation-pin.component.d.ts.map +1 -0
- package/dist/annotation-pin.component.js +422 -0
- package/dist/annotation-pin.component.js.map +1 -0
- package/dist/css.d.ts +31 -0
- package/dist/css.d.ts.map +1 -0
- package/dist/css.js +90 -0
- package/dist/css.js.map +1 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -0
- package/dist/slot-dom.d.ts +51 -0
- package/dist/slot-dom.d.ts.map +1 -0
- package/dist/slot-dom.js +89 -0
- package/dist/slot-dom.js.map +1 -0
- package/dist/types.d.ts +105 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/package.json +72 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular annotation pin / hotspot overlay primitives — the Angular
|
|
3
|
+
* counterpart of `@molecule/app-annotation-pin-react`: same props (React
|
|
4
|
+
* names) and the same DOM for the same input, so an app switches framework by
|
|
5
|
+
* changing only the package name in its imports.
|
|
6
|
+
*
|
|
7
|
+
* Exports `<AnnotationPin>` (single click-to-toggle marker) and
|
|
8
|
+
* `<AnnotationLayer>` (parent wrapper that manages many pins on a surface).
|
|
9
|
+
* Reusable for 3d-model viewers, image annotations, map pins, and hotspot
|
|
10
|
+
* tours.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { Component, signal } from '@angular/core'
|
|
15
|
+
* import { AnnotationLayer, type Pin } from '@molecule/app-annotation-pin-angular'
|
|
16
|
+
*
|
|
17
|
+
* @Component({
|
|
18
|
+
* selector: 'app-image-annotator',
|
|
19
|
+
* standalone: true,
|
|
20
|
+
* imports: [AnnotationLayer],
|
|
21
|
+
* template: `
|
|
22
|
+
* <div mol-annotation-layer
|
|
23
|
+
* [pins]="pins()"
|
|
24
|
+
* [activePinId]="activeId()"
|
|
25
|
+
* (onPinClick)="select($event)"
|
|
26
|
+
* (onSurfaceClick)="addPin($event)">
|
|
27
|
+
* <img src="/floorplan.png" alt="" style="width: 100%; display: block" />
|
|
28
|
+
* </div>
|
|
29
|
+
* `,
|
|
30
|
+
* })
|
|
31
|
+
* export class ImageAnnotator {
|
|
32
|
+
* readonly pins = signal<Pin[]>([])
|
|
33
|
+
* readonly activeId = signal<string | null>(null)
|
|
34
|
+
*
|
|
35
|
+
* select(id: string): void {
|
|
36
|
+
* this.activeId.set(id === this.activeId() ? null : id)
|
|
37
|
+
* }
|
|
38
|
+
*
|
|
39
|
+
* addPin({ x, y }: { x: number; y: number }): void {
|
|
40
|
+
* const id = crypto.randomUUID()
|
|
41
|
+
* this.pins.update((pins) => [...pins, { id, position: { x, y }, label: pins.length + 1 }])
|
|
42
|
+
* this.activeId.set(id)
|
|
43
|
+
* }
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* Selection is fully controlled — the layer never stores the active pin;
|
|
49
|
+
* manage `activePinId` yourself and toggle it in `onPinClick`. `position` is
|
|
50
|
+
* normalised 0..1 by default (fractions of the layer box, so pins re-anchor on
|
|
51
|
+
* resize); pass `[normalised]="false"` for raw pixel offsets — on BOTH
|
|
52
|
+
* `<AnnotationLayer>` and any directly-rendered `<AnnotationPin>`, or clicks
|
|
53
|
+
* and markers will disagree. Node props are projected content in Angular
|
|
54
|
+
* (`[slot=label]`, `[slot=note]`, and the layer's default content for the
|
|
55
|
+
* surface) or an input carrying text / a `TemplateRef`. A bare
|
|
56
|
+
* `<AnnotationPin>` needs its own positioned ancestor. Translations come from
|
|
57
|
+
* the companion `@molecule/app-locales-annotation-pin` locale bond.
|
|
58
|
+
*
|
|
59
|
+
* @module
|
|
60
|
+
*/
|
|
61
|
+
export * from './annotation-layer.component.js';
|
|
62
|
+
export * from './annotation-pin.component.js';
|
|
63
|
+
export * from './types.js';
|
|
64
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,cAAc,iCAAiC,CAAA;AAC/C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOM helpers for the projected capture points of the annotation-pin
|
|
3
|
+
* components.
|
|
4
|
+
*
|
|
5
|
+
* React renders an optional node prop directly and drops it otherwise, and
|
|
6
|
+
* renders the popup only while the pin is selected. Angular projection needs
|
|
7
|
+
* an always-mounted `<ng-content>` capture point, and an `ng-content` created
|
|
8
|
+
* later never receives the projection — so each capture point (and the popup)
|
|
9
|
+
* lives in the template unconditionally and these helpers reconcile it
|
|
10
|
+
* against React's DOM.
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
import type { Renderer2 } from '@angular/core';
|
|
15
|
+
/**
|
|
16
|
+
* Whether an ng-content wrapper captured any element or text node.
|
|
17
|
+
*
|
|
18
|
+
* @param el - The wrapper element.
|
|
19
|
+
* @returns True when at least one projected node exists.
|
|
20
|
+
*/
|
|
21
|
+
export declare const hasNodes: (el: Element | undefined | null) => boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Attaches or detaches one template element, remembering whether it is in the
|
|
24
|
+
* DOM so repeated change-detection passes never move it again.
|
|
25
|
+
*
|
|
26
|
+
* A detached element leaves a comment where it sat, so re-attaching puts it
|
|
27
|
+
* back in React's position; the conformance normalizer strips comments.
|
|
28
|
+
*/
|
|
29
|
+
export declare class ElementToggle {
|
|
30
|
+
private readonly renderer;
|
|
31
|
+
/** Whether the element is currently in the DOM. */
|
|
32
|
+
private attached;
|
|
33
|
+
/** The comment standing in for the element while it is detached. */
|
|
34
|
+
private anchor;
|
|
35
|
+
/** The parent the detached element goes back into. */
|
|
36
|
+
private parent;
|
|
37
|
+
/**
|
|
38
|
+
* Creates the toggle.
|
|
39
|
+
*
|
|
40
|
+
* @param renderer - The DOM renderer.
|
|
41
|
+
*/
|
|
42
|
+
constructor(renderer: Renderer2);
|
|
43
|
+
/**
|
|
44
|
+
* Attaches or detaches the element.
|
|
45
|
+
*
|
|
46
|
+
* @param el - The element.
|
|
47
|
+
* @param shouldAttach - Whether it should be in the DOM.
|
|
48
|
+
*/
|
|
49
|
+
toggle(el: Element | undefined | null, shouldAttach: boolean): void;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=slot-dom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-dom.d.ts","sourceRoot":"","sources":["../src/slot-dom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,IAAI,OAAO,GAAG,SAAS,GAAG,IAAI,KAAG,OAOzD,CAAA;AAED;;;;;;GAMG;AACH,qBAAa,aAAa;IAaZ,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAZrC,mDAAmD;IACnD,OAAO,CAAC,QAAQ,CAAO;IACvB,oEAAoE;IACpE,OAAO,CAAC,MAAM,CAAuB;IACrC,sDAAsD;IACtD,OAAO,CAAC,MAAM,CAAoB;IAElC;;;;OAIG;gBAC0B,QAAQ,EAAE,SAAS;IAEhD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,EAAE,YAAY,EAAE,OAAO,GAAG,IAAI;CAwBpE"}
|
package/dist/slot-dom.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOM helpers for the projected capture points of the annotation-pin
|
|
3
|
+
* components.
|
|
4
|
+
*
|
|
5
|
+
* React renders an optional node prop directly and drops it otherwise, and
|
|
6
|
+
* renders the popup only while the pin is selected. Angular projection needs
|
|
7
|
+
* an always-mounted `<ng-content>` capture point, and an `ng-content` created
|
|
8
|
+
* later never receives the projection — so each capture point (and the popup)
|
|
9
|
+
* lives in the template unconditionally and these helpers reconcile it
|
|
10
|
+
* against React's DOM.
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Whether an ng-content wrapper captured any element or text node.
|
|
16
|
+
*
|
|
17
|
+
* @param el - The wrapper element.
|
|
18
|
+
* @returns True when at least one projected node exists.
|
|
19
|
+
*/
|
|
20
|
+
export const hasNodes = (el) => {
|
|
21
|
+
if (!el)
|
|
22
|
+
return false;
|
|
23
|
+
for (const node of Array.from(el.childNodes)) {
|
|
24
|
+
if (node.nodeType === 1)
|
|
25
|
+
return true;
|
|
26
|
+
if (node.nodeType === 3 && (node.textContent ?? '').trim())
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Attaches or detaches one template element, remembering whether it is in the
|
|
33
|
+
* DOM so repeated change-detection passes never move it again.
|
|
34
|
+
*
|
|
35
|
+
* A detached element leaves a comment where it sat, so re-attaching puts it
|
|
36
|
+
* back in React's position; the conformance normalizer strips comments.
|
|
37
|
+
*/
|
|
38
|
+
export class ElementToggle {
|
|
39
|
+
renderer;
|
|
40
|
+
/** Whether the element is currently in the DOM. */
|
|
41
|
+
attached = true;
|
|
42
|
+
/** The comment standing in for the element while it is detached. */
|
|
43
|
+
anchor = null;
|
|
44
|
+
/** The parent the detached element goes back into. */
|
|
45
|
+
parent = null;
|
|
46
|
+
/**
|
|
47
|
+
* Creates the toggle.
|
|
48
|
+
*
|
|
49
|
+
* @param renderer - The DOM renderer.
|
|
50
|
+
*/
|
|
51
|
+
constructor(renderer) {
|
|
52
|
+
this.renderer = renderer;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Attaches or detaches the element.
|
|
56
|
+
*
|
|
57
|
+
* @param el - The element.
|
|
58
|
+
* @param shouldAttach - Whether it should be in the DOM.
|
|
59
|
+
*/
|
|
60
|
+
toggle(el, shouldAttach) {
|
|
61
|
+
if (!el)
|
|
62
|
+
return;
|
|
63
|
+
if (shouldAttach === this.attached)
|
|
64
|
+
return;
|
|
65
|
+
const parent = el.parentNode ?? this.parent;
|
|
66
|
+
if (!parent)
|
|
67
|
+
return;
|
|
68
|
+
if (shouldAttach) {
|
|
69
|
+
if (this.anchor?.isConnected) {
|
|
70
|
+
parent.insertBefore(el, this.anchor);
|
|
71
|
+
this.renderer.removeChild(parent, this.anchor);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
parent.appendChild(el);
|
|
75
|
+
}
|
|
76
|
+
this.anchor = null;
|
|
77
|
+
this.parent = null;
|
|
78
|
+
this.attached = true;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const anchor = this.renderer.createComment('slot');
|
|
82
|
+
parent.insertBefore(anchor, el);
|
|
83
|
+
this.renderer.removeChild(parent, el);
|
|
84
|
+
this.anchor = anchor;
|
|
85
|
+
this.parent = parent;
|
|
86
|
+
this.attached = false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=slot-dom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-dom.js","sourceRoot":"","sources":["../src/slot-dom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAA8B,EAAW,EAAE;IAClE,IAAI,CAAC,EAAE;QAAE,OAAO,KAAK,CAAA;IACrB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;QAC7C,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC;YAAE,OAAO,IAAI,CAAA;QACpC,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE;YAAE,OAAO,IAAI,CAAA;IACzE,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,OAAO,aAAa;IAaK;IAZ7B,mDAAmD;IAC3C,QAAQ,GAAG,IAAI,CAAA;IACvB,oEAAoE;IAC5D,MAAM,GAAmB,IAAI,CAAA;IACrC,sDAAsD;IAC9C,MAAM,GAAgB,IAAI,CAAA;IAElC;;;;OAIG;IACH,YAA6B,QAAmB;QAAnB,aAAQ,GAAR,QAAQ,CAAW;IAAG,CAAC;IAEpD;;;;;OAKG;IACH,MAAM,CAAC,EAA8B,EAAE,YAAqB;QAC1D,IAAI,CAAC,EAAE;YAAE,OAAM;QACf,IAAI,YAAY,KAAK,IAAI,CAAC,QAAQ;YAAE,OAAM;QAC1C,MAAM,MAAM,GAAG,EAAE,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,CAAA;QAC3C,IAAI,CAAC,MAAM;YAAE,OAAM;QACnB,IAAI,YAAY,EAAE,CAAC;YACjB,IAAI,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC;gBAC7B,MAAM,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;gBACpC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;YAChD,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;YACxB,CAAC;YACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;YAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;YAClB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;YACpB,OAAM;QACR,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;QAClD,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;QAC/B,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAA;IACvB,CAAC;CACF"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types of `@molecule/app-annotation-pin-angular` — the Angular counterpart of
|
|
3
|
+
* `@molecule/app-annotation-pin-react`, same props and DOM.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import type { TemplateRef } from '@angular/core';
|
|
8
|
+
/**
|
|
9
|
+
* A single pin to display on a parent surface. `position` is in the
|
|
10
|
+
* parent's coordinate space — for image / 2D-canvas overlays this is
|
|
11
|
+
* normalised 0..1 (so the pin re-anchors as the surface resizes); for
|
|
12
|
+
* pixel-positioned overlays callers can pass raw px values.
|
|
13
|
+
*
|
|
14
|
+
* The label/note are pure data — components handle render only.
|
|
15
|
+
*/
|
|
16
|
+
export interface Pin {
|
|
17
|
+
/** Stable identifier (used to track the marker in a change detection pass). */
|
|
18
|
+
id: string;
|
|
19
|
+
/** Position in the parent surface's coordinate space (typically normalised 0..1). */
|
|
20
|
+
position: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
/** Short label (e.g. an index or single-word tag) shown inside the pin marker — text or a template. */
|
|
25
|
+
label?: TemplateRef<unknown> | string | number | null;
|
|
26
|
+
/** Longer note body shown inside the popup when the pin is selected — text or a template. */
|
|
27
|
+
note?: TemplateRef<unknown> | string | number | null;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Props accepted by `AnnotationPin` — the same props
|
|
31
|
+
* `@molecule/app-annotation-pin-react` accepts. Node props (`label`, `note`)
|
|
32
|
+
* are an input (text or a `TemplateRef`, since an input cannot carry a DOM
|
|
33
|
+
* node directly) or projected content (`[slot=label]`, `[slot=note]`).
|
|
34
|
+
*/
|
|
35
|
+
export interface AnnotationPinProps {
|
|
36
|
+
/** Position in the parent surface's coordinate space (typically normalised 0..1). */
|
|
37
|
+
position: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
};
|
|
41
|
+
/** Short label inside the marker — text, a template, or `[slot=label]` content. */
|
|
42
|
+
label?: TemplateRef<unknown> | string | number | null;
|
|
43
|
+
/** Popup body when selected — text, a template, or `[slot=note]` content. */
|
|
44
|
+
note?: TemplateRef<unknown> | string | number | null;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the pin is currently selected. When `true` the popup is
|
|
47
|
+
* rendered. Selection is controlled — callers manage state in
|
|
48
|
+
* `AnnotationLayer` (or themselves) and update via `onClick`.
|
|
49
|
+
*/
|
|
50
|
+
selected?: boolean;
|
|
51
|
+
/** Click handler — fires when the pin marker is clicked. */
|
|
52
|
+
onClick?: () => void;
|
|
53
|
+
/**
|
|
54
|
+
* Side the popup renders on, relative to the marker. Defaults to `'right'`.
|
|
55
|
+
*/
|
|
56
|
+
popupSide?: 'top' | 'bottom' | 'left' | 'right';
|
|
57
|
+
/** Extra classes merged onto the root wrapper. */
|
|
58
|
+
className?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Whether `position` is normalised (0..1) — when `true` the wrapper
|
|
61
|
+
* positions itself with `%` units so pins re-anchor on resize. When
|
|
62
|
+
* `false` the wrapper uses raw `px` values. Defaults to `true`.
|
|
63
|
+
*/
|
|
64
|
+
normalised?: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Props accepted by `AnnotationLayer` — the same props
|
|
68
|
+
* `@molecule/app-annotation-pin-react` accepts. The surface content is
|
|
69
|
+
* projected (`<ng-content>`); there is no node prop for it.
|
|
70
|
+
*/
|
|
71
|
+
export interface AnnotationLayerProps {
|
|
72
|
+
/** Pins to render on the layer. */
|
|
73
|
+
pins: Pin[];
|
|
74
|
+
/**
|
|
75
|
+
* The currently active (popup-open) pin id, or `null` for none. The
|
|
76
|
+
* layer is fully controlled — callers manage selection state.
|
|
77
|
+
*/
|
|
78
|
+
activePinId?: string | null;
|
|
79
|
+
/** Called with the clicked pin id when a pin marker is clicked. */
|
|
80
|
+
onPinClick?: (pinId: string) => void;
|
|
81
|
+
/**
|
|
82
|
+
* Called when the user clicks an empty area of the layer (i.e. not on
|
|
83
|
+
* a pin marker or a popup). Coordinates are in the same space as
|
|
84
|
+
* `Pin.position` — normalised 0..1 by default.
|
|
85
|
+
*/
|
|
86
|
+
onSurfaceClick?: (position: {
|
|
87
|
+
x: number;
|
|
88
|
+
y: number;
|
|
89
|
+
}) => void;
|
|
90
|
+
/**
|
|
91
|
+
* Whether positions are normalised (0..1) — when `true` the layer
|
|
92
|
+
* computes click coordinates as fractions of its bounding box; when
|
|
93
|
+
* `false` it returns raw pixel offsets. Defaults to `true`.
|
|
94
|
+
*/
|
|
95
|
+
normalised?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Side the popup renders on, relative to its marker. Defaults to `'right'`.
|
|
98
|
+
*/
|
|
99
|
+
popupSide?: 'top' | 'bottom' | 'left' | 'right';
|
|
100
|
+
/** Extra classes merged onto the layer root. */
|
|
101
|
+
className?: string;
|
|
102
|
+
/** Inline style for the layer root, merged over the layer's own. */
|
|
103
|
+
style?: Record<string, string | number>;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAEhD;;;;;;;GAOG;AACH,MAAM,WAAW,GAAG;IAClB,+EAA+E;IAC/E,EAAE,EAAE,MAAM,CAAA;IACV,qFAAqF;IACrF,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAClC,uGAAuG;IACvG,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IACrD,6FAA6F;IAC7F,IAAI,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;CACrD;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,qFAAqF;IACrF,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAClC,mFAAmF;IACnF,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IACrD,6EAA6E;IAC7E,IAAI,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IACpD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;IAC/C,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,mCAAmC;IACnC,IAAI,EAAE,GAAG,EAAE,CAAA;IACX;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,mEAAmE;IACnE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAC7D;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;IAC/C,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;CACxC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,74 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-annotation-pin-angular",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.0.1-stage",
|
|
4
|
+
"description": "Pin/annotation marker overlay with click-to-place pins and label/note popups for 3d-model-viewer, image annotations, map pins, hotspot tours",
|
|
5
|
+
"homepage": "https://www.molecule.dev/packages/app-annotation-pin-angular",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "ngc",
|
|
21
|
+
"dev": "ngc --watch",
|
|
22
|
+
"test": "vitest run",
|
|
23
|
+
"test:watch": "vitest"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"molecule",
|
|
27
|
+
"annotation",
|
|
28
|
+
"pin",
|
|
29
|
+
"marker",
|
|
30
|
+
"hotspot",
|
|
31
|
+
"angular"
|
|
32
|
+
],
|
|
33
|
+
"author": "Molecule Dev, Inc. (https://molecule.dev)",
|
|
34
|
+
"license": "Apache-2.0",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/molecule-dev/molecule.git",
|
|
38
|
+
"directory": "packages/app/features/annotation-pin-angular"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=20"
|
|
42
|
+
},
|
|
43
|
+
"bugs": "https://github.com/molecule-dev/molecule/issues",
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@angular/common": "^22.0.0",
|
|
49
|
+
"@angular/core": "^22.0.0",
|
|
50
|
+
"@angular/platform-browser": "^22.0.0",
|
|
51
|
+
"@molecule/app-angular": "^3.5.0",
|
|
52
|
+
"@molecule/app-ui": "^1.0.1",
|
|
53
|
+
"@molecule/app-ui-angular": "^1.1.0"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@angular/common": "22.2.3",
|
|
57
|
+
"@angular/compiler": "22.2.3",
|
|
58
|
+
"@angular/compiler-cli": "22.2.3",
|
|
59
|
+
"@angular/core": "22.2.3",
|
|
60
|
+
"@angular/platform-browser": "22.2.3",
|
|
61
|
+
"@molecule/app-angular": "3.7.1",
|
|
62
|
+
"@molecule/app-framework-conformance": "0.0.0",
|
|
63
|
+
"@molecule/app-i18n": "1.2.2",
|
|
64
|
+
"@molecule/app-icons": "1.0.4",
|
|
65
|
+
"@molecule/app-ui": "1.4.0",
|
|
66
|
+
"@molecule/app-ui-angular": "1.2.0",
|
|
67
|
+
"@types/node": "26.6.5",
|
|
68
|
+
"jsdom": "30.1.3",
|
|
69
|
+
"rxjs": "7.8.2",
|
|
70
|
+
"typescript": "6.0.3",
|
|
71
|
+
"vitest": "4.1.12",
|
|
72
|
+
"zone.js": "0.16.3"
|
|
73
|
+
}
|
|
74
|
+
}
|