@embedpdf/core-annotation 3.0.0-next.10 → 3.0.0-next.12

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.d.cts CHANGED
@@ -676,7 +676,12 @@ type Msg = {
676
676
  {
677
677
  t: 'hover';
678
678
  id: Id | null;
679
- } | {
679
+ } |
680
+ /** Force/clear session visibility for specific annotations (the actions
681
+ * plane's Hide sink). Hiding also clears transient engagement (selection,
682
+ * editing, hover) for the hidden ids. Unknown ids no-op. Zero effects. */
683
+ /** Drop overrides for truly DELETED annotations (never for reloads). */
684
+ {
680
685
  t: 'select';
681
686
  ids: Id[];
682
687
  add?: boolean;
package/dist/index.d.ts CHANGED
@@ -676,7 +676,12 @@ type Msg = {
676
676
  {
677
677
  t: 'hover';
678
678
  id: Id | null;
679
- } | {
679
+ } |
680
+ /** Force/clear session visibility for specific annotations (the actions
681
+ * plane's Hide sink). Hiding also clears transient engagement (selection,
682
+ * editing, hover) for the hidden ids. Unknown ids no-op. Zero effects. */
683
+ /** Drop overrides for truly DELETED annotations (never for reloads). */
684
+ {
680
685
  t: 'select';
681
686
  ids: Id[];
682
687
  add?: boolean;
package/dist/index.js CHANGED
@@ -3020,7 +3020,7 @@ const canMove = (m, id) => {
3020
3020
  * `locked` (and inert `/F` states) suppress them at runtime — a
3021
3021
  * screen-anchored body keeps its handles: `noZoom`/`noRotate` exempt it from
3022
3022
  * the display transform, they don't freeze its size or vertices. */
3023
- const hasHandles = (a) => {
3023
+ const hasHandles = (m, a) => {
3024
3024
  if (!annotTransformable(a) || textBound(a)) return false;
3025
3025
  const c = capsFor(a.subtype);
3026
3026
  return c.resizable || c.vertexEditable;
@@ -3087,7 +3087,7 @@ function hitTest(m, pon, p, geom, strokeMargin, pageBox, inert, view) {
3087
3087
  };
3088
3088
  }
3089
3089
  }
3090
- if (hasHandles(a)) {
3090
+ if (hasHandles(m, a)) {
3091
3091
  for (const h of geomHandles(hitGeomOf(a, view))) if (Math.abs(h.at.x - p.x) <= geom.handleTol && Math.abs(h.at.y - p.y) <= geom.handleTol) return {
3092
3092
  t: "handle",
3093
3093
  id: a.id,
@@ -4852,6 +4852,14 @@ function setProps(m, patch) {
4852
4852
  * COMMITTED member; uncommitted drafts just merge (their create draft carries
4853
4853
  * the flags when it commits).
4854
4854
  */
4855
+ /**
4856
+ * The actions plane's session-visibility write (Hide actions, script
4857
+ * `annot.hidden`): merge per-id hidden overrides into the session overlay.
4858
+ * Pure session state — ZERO effects, no engine write, no authority. Hiding
4859
+ * clears transient engagement so no orphaned selection chrome or text editor
4860
+ * survives on an invisible annotation. Identity-preserving no-op when nothing
4861
+ * changes (plugin memo caches key on model identity).
4862
+ */
4855
4863
  function setFlags(m, patch, ids) {
4856
4864
  const targets = ids ?? m.selected;
4857
4865
  if (!targets.length) return [m, []];