@embedpdf/react 3.0.0-next.0

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.
Files changed (141) hide show
  1. package/LICENSE +192 -0
  2. package/dist/AnnotationListSnapshot-W0RCsyDE-dWna4TTJ.d.cts +2593 -0
  3. package/dist/AnnotationListSnapshot-W0RCsyDE-dWna4TTJ.d.ts +2593 -0
  4. package/dist/annotation-B6jwfTCh.d.cts +173 -0
  5. package/dist/annotation-Ct6dFtzJ.cjs +913 -0
  6. package/dist/annotation-Ct6dFtzJ.cjs.map +1 -0
  7. package/dist/annotation-DjGWJljY.js +829 -0
  8. package/dist/annotation-DjGWJljY.js.map +1 -0
  9. package/dist/annotation-menu.cjs +115 -0
  10. package/dist/annotation-menu.cjs.map +1 -0
  11. package/dist/annotation-menu.d.cts +7 -0
  12. package/dist/annotation-menu.d.ts +7 -0
  13. package/dist/annotation-menu.js +99 -0
  14. package/dist/annotation-menu.js.map +1 -0
  15. package/dist/annotation-nUMefyjw.d.ts +173 -0
  16. package/dist/annotation.cjs +25 -0
  17. package/dist/annotation.d.cts +3 -0
  18. package/dist/annotation.d.ts +3 -0
  19. package/dist/annotation.js +4 -0
  20. package/dist/commands.cjs +59 -0
  21. package/dist/commands.cjs.map +1 -0
  22. package/dist/commands.d.cts +20 -0
  23. package/dist/commands.d.ts +20 -0
  24. package/dist/commands.js +47 -0
  25. package/dist/commands.js.map +1 -0
  26. package/dist/form.cjs +560 -0
  27. package/dist/form.cjs.map +1 -0
  28. package/dist/form.d.cts +52 -0
  29. package/dist/form.d.ts +52 -0
  30. package/dist/form.js +545 -0
  31. package/dist/form.js.map +1 -0
  32. package/dist/i18n.cjs +52 -0
  33. package/dist/i18n.cjs.map +1 -0
  34. package/dist/i18n.d.cts +30 -0
  35. package/dist/i18n.d.ts +30 -0
  36. package/dist/i18n.js +42 -0
  37. package/dist/i18n.js.map +1 -0
  38. package/dist/index.cjs +240 -0
  39. package/dist/index.d.cts +37 -0
  40. package/dist/index.d.ts +37 -0
  41. package/dist/index.js +37 -0
  42. package/dist/interaction.cjs +152 -0
  43. package/dist/interaction.cjs.map +1 -0
  44. package/dist/interaction.d.cts +46 -0
  45. package/dist/interaction.d.ts +46 -0
  46. package/dist/interaction.js +139 -0
  47. package/dist/interaction.js.map +1 -0
  48. package/dist/link.cjs +108 -0
  49. package/dist/link.cjs.map +1 -0
  50. package/dist/link.d.cts +16 -0
  51. package/dist/link.d.ts +16 -0
  52. package/dist/link.js +98 -0
  53. package/dist/link.js.map +1 -0
  54. package/dist/metadata.cjs +25 -0
  55. package/dist/metadata.cjs.map +1 -0
  56. package/dist/metadata.d.cts +11 -0
  57. package/dist/metadata.d.ts +11 -0
  58. package/dist/metadata.js +16 -0
  59. package/dist/metadata.js.map +1 -0
  60. package/dist/page-edit.cjs +20 -0
  61. package/dist/page-edit.cjs.map +1 -0
  62. package/dist/page-edit.d.cts +7 -0
  63. package/dist/page-edit.d.ts +7 -0
  64. package/dist/page-edit.js +11 -0
  65. package/dist/page-edit.js.map +1 -0
  66. package/dist/page-view.cjs +107 -0
  67. package/dist/page-view.cjs.map +1 -0
  68. package/dist/page-view.d.cts +23 -0
  69. package/dist/page-view.d.ts +23 -0
  70. package/dist/page-view.js +95 -0
  71. package/dist/page-view.js.map +1 -0
  72. package/dist/redaction.cjs +35 -0
  73. package/dist/redaction.cjs.map +1 -0
  74. package/dist/redaction.d.cts +14 -0
  75. package/dist/redaction.d.ts +14 -0
  76. package/dist/redaction.js +25 -0
  77. package/dist/redaction.js.map +1 -0
  78. package/dist/render.cjs +142 -0
  79. package/dist/render.cjs.map +1 -0
  80. package/dist/render.d.cts +32 -0
  81. package/dist/render.d.ts +32 -0
  82. package/dist/render.js +131 -0
  83. package/dist/render.js.map +1 -0
  84. package/dist/rolldown-runtime-DDXJien1.cjs +50 -0
  85. package/dist/runtime-CMxIuF2O.d.cts +195 -0
  86. package/dist/runtime-DV98q7I0.d.ts +195 -0
  87. package/dist/runtime.cjs +314 -0
  88. package/dist/runtime.cjs.map +1 -0
  89. package/dist/runtime.d.cts +3 -0
  90. package/dist/runtime.d.ts +3 -0
  91. package/dist/runtime.js +287 -0
  92. package/dist/runtime.js.map +1 -0
  93. package/dist/scrollbar.cjs +241 -0
  94. package/dist/scrollbar.cjs.map +1 -0
  95. package/dist/scrollbar.d.cts +42 -0
  96. package/dist/scrollbar.d.ts +42 -0
  97. package/dist/scrollbar.js +213 -0
  98. package/dist/scrollbar.js.map +1 -0
  99. package/dist/search.cjs +70 -0
  100. package/dist/search.cjs.map +1 -0
  101. package/dist/search.d.cts +35 -0
  102. package/dist/search.d.ts +35 -0
  103. package/dist/search.js +58 -0
  104. package/dist/search.js.map +1 -0
  105. package/dist/selection.cjs +60 -0
  106. package/dist/selection.cjs.map +1 -0
  107. package/dist/selection.d.cts +12 -0
  108. package/dist/selection.d.ts +12 -0
  109. package/dist/selection.js +49 -0
  110. package/dist/selection.js.map +1 -0
  111. package/dist/shell.cjs +57 -0
  112. package/dist/shell.cjs.map +1 -0
  113. package/dist/shell.d.cts +27 -0
  114. package/dist/shell.d.ts +27 -0
  115. package/dist/shell.js +46 -0
  116. package/dist/shell.js.map +1 -0
  117. package/dist/stage.cjs +343 -0
  118. package/dist/stage.cjs.map +1 -0
  119. package/dist/stage.d.cts +104 -0
  120. package/dist/stage.d.ts +104 -0
  121. package/dist/stage.js +327 -0
  122. package/dist/stage.js.map +1 -0
  123. package/dist/stamp.cjs +76 -0
  124. package/dist/stamp.cjs.map +1 -0
  125. package/dist/stamp.d.cts +28 -0
  126. package/dist/stamp.d.ts +28 -0
  127. package/dist/stamp.js +63 -0
  128. package/dist/stamp.js.map +1 -0
  129. package/dist/toolbar.cjs +515 -0
  130. package/dist/toolbar.cjs.map +1 -0
  131. package/dist/toolbar.d.cts +100 -0
  132. package/dist/toolbar.d.ts +100 -0
  133. package/dist/toolbar.js +505 -0
  134. package/dist/toolbar.js.map +1 -0
  135. package/dist/views.cjs +35 -0
  136. package/dist/views.cjs.map +1 -0
  137. package/dist/views.d.cts +21 -0
  138. package/dist/views.d.ts +21 -0
  139. package/dist/views.js +26 -0
  140. package/dist/views.js.map +1 -0
  141. package/package.json +158 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.js","names":[],"sources":["../src/form.tsx"],"sourcesContent":["/**\n * The React view of @embedpdf/plugin-form.\n *\n * TWO fill surfaces, one plugin:\n *\n * 1. `formWidgetRenderer` — the full-viewer path. Widgets are annotations,\n * so the fill controls plug into the annotation stack:\n * `<AnnotationLayer renderers={[formWidgetRenderer]} />` routes every\n * ENGAGED widget here with its live box and its baked /AP raster. The\n * picture IS the resting control (the engine's own rendering of value,\n * check state, borders, fonts); these components add exactly the\n * interaction skin on top:\n *\n * text → picture at rest; click swaps in an <input>/<textarea> (the\n * focused element IS the draft store — the plugin model only\n * learns a value on commit); blur/Enter commits, the engine\n * re-bakes the /AP, the refreshed picture replaces the editor.\n * toggle → the picture is the whole control; click writes the toggled\n * value; the re-baked appearance shows the new check state.\n * choice → an invisible native <select> over the picture (v2's trick):\n * the browser owns the dropdown, the engine owns the pixels.\n * button → native keyboard/click target over the picture; activation is\n * delegated to the form plugin's isolated scripting pipeline.\n *\n * 2. `<FormLayer />` — the annotation-less path (fill-only viewers with no\n * annotation plugin): synthetic HTML controls positioned from the form\n * model's own widget geometry. Do NOT mount it next to an AnnotationLayer\n * wired with `formWidgetRenderer` — the controls would double up.\n *\n * Every control isolates its pointerdown from the interaction hub with a\n * NATIVE listener (the FreeText precedent): the Stage listens natively on an\n * ancestor, so React's synthetic events would run too late.\n */\n\n// One-line-per-feature (ADAPTERS.md): registration travels with the UI.\nexport * from '@embedpdf/plugin-form';\nimport * as React from 'react';\nimport { useEffect, useRef, useState } from 'react';\nimport { FormToken } from '@embedpdf/plugin-form';\nimport type {\n FillItem,\n FormFieldDTO,\n FormUiEffect,\n FormUiEffectProvider,\n} from '@embedpdf/plugin-form';\nimport { InteractionToken } from '@embedpdf/plugin-interaction';\nimport { StageToken } from '@embedpdf/plugin-stage';\nimport type { Rect } from '@embedpdf/core-annotation';\n\nimport { useAnnotationSelected } from './annotation';\nimport type { AnnotationRenderer, AnnotationRendererProps } from './annotation';\nimport {\n shallowArray,\n useCapability,\n useOptionalCapability,\n usePage,\n useSelector,\n} from './runtime';\nimport type { PageContextValue } from './runtime';\n\n/** Content rect → a view-px box (the page wrapper's own coordinate space). */\nfunction viewBox(r: Rect, page: PageContextValue) {\n const tl = page.transform.pageToContent({ x: r.x, y: r.y });\n const br = page.transform.pageToContent({ x: r.x + r.width, y: r.y + r.height });\n return { left: tl.x, top: tl.y, width: br.x - tl.x, height: br.y - tl.y };\n}\n\n/**\n * Keep the interaction hub out of gestures that begin inside a fill control.\n * Native listener (not React's) so it runs during real DOM bubbling, before\n * the Stage's own native listener on an ancestor — same trick as FreeText.\n */\nfunction useIsolated<T extends HTMLElement>() {\n const ref = useRef<T>(null);\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n const stop = (e: Event) => e.stopPropagation();\n el.addEventListener('pointerdown', stop);\n return () => el.removeEventListener('pointerdown', stop);\n }, []);\n return ref;\n}\n\nexport interface FormScriptingUiHandlers {\n alert?: (message: string, effect: Extract<FormUiEffect, { kind: 'alert' }>) => void;\n print?: (effect: Extract<FormUiEffect, { kind: 'print' }>) => void;\n gotoPage?: (page: number, effect: Extract<FormUiEffect, { kind: 'gotoPage' }>) => void;\n}\n\n/**\n * Fulfil form-script UI requests for the active document. By default alerts use\n * the browser dialog, page navigation uses the main Stage, and print delegates\n * to the browser. Pass handlers (or one raw provider) to replace that policy.\n */\nexport function useFormScriptingProvider(\n adapter?: FormScriptingUiHandlers | FormUiEffectProvider,\n): void {\n const form = useOptionalCapability(FormToken);\n const stage = useOptionalCapability(StageToken);\n const adapterRef = useRef(adapter);\n adapterRef.current = adapter;\n\n useEffect(() => {\n if (!form) return;\n const provider: FormUiEffectProvider = (effect) => {\n const current = adapterRef.current;\n if (typeof current === 'function') {\n current(effect);\n return;\n }\n switch (effect.kind) {\n case 'alert':\n if (current?.alert) current.alert(effect.message, effect);\n else if (typeof globalThis.alert === 'function') globalThis.alert(effect.message);\n break;\n case 'gotoPage':\n if (current?.gotoPage) current.gotoPage(effect.page, effect);\n else stage?.goToPage(effect.page);\n break;\n case 'print':\n if (current?.print) current.print(effect);\n else if (typeof globalThis.print === 'function') globalThis.print();\n break;\n }\n };\n form.setUiEffectProvider(provider);\n return () => form.setUiEffectProvider(null);\n }, [form, stage]);\n}\n\n/* ══════════════════════════ behavior widgets ══════════════════════════ */\n\n/** The baked /AP raster, blitted by its OWN box (exactly like BakedImage). */\nfunction Picture({\n page,\n appearance,\n apBox,\n frame,\n hidden,\n}: {\n page: PageContextValue;\n appearance: { url: string; box: Rect } | null;\n /** The item's live AP box — wins over the fetched box when present. */\n apBox?: Rect;\n /** The positioned wrapper this renders INSIDE (its view box) — the blit is\n * page-frame, so subtract the wrapper's origin. Omit when rendering\n * directly in the layer container. */\n frame?: { left: number; top: number };\n hidden?: boolean;\n}) {\n if (!appearance) return null;\n const b = viewBox(apBox ?? appearance.box, page);\n return (\n <img\n src={appearance.url}\n alt=\"\"\n draggable={false}\n style={{\n position: 'absolute',\n left: b.left - (frame?.left ?? 0),\n top: b.top - (frame?.top ?? 0),\n width: b.width,\n height: b.height,\n // Content-unit sizing; a global `img { max-width: 100% }` reset would\n // otherwise clamp it to the containing block and distort the blit.\n maxWidth: 'none',\n pointerEvents: 'none',\n visibility: hidden ? 'hidden' : 'visible',\n }}\n />\n );\n}\n\ninterface WidgetProps<C extends FillItem['control']> {\n fill: Extract<FillItem, { control: C }>;\n item: AnnotationRendererProps['item'];\n page: PageContextValue;\n appearance: AnnotationRendererProps['appearance'];\n}\n\n/**\n * Dispatch one engaged widget to its fill control. The FIELD plane (value,\n * behavior, disabled) comes from the form plugin's single-widget projection;\n * the WIDGET plane (live box, /DA font, baked raster) rides in on the\n * renderer props — no geometry is read from the form model here.\n */\nfunction FormWidget({ item, page, appearance }: AnnotationRendererProps) {\n const annot = item.ref?.kind === 'objectNumber' ? item.ref.annotObjectNumber : 0;\n // Reference-stable per model change, so the default Object.is equality holds.\n const fill = useSelector(FormToken, (c) => (annot > 0 ? c.fillItem(annot) : null));\n // Field plane not loaded (or no fill control for this family) → picture only.\n if (!fill) return <Picture page={page} appearance={appearance} apBox={item.apBox} />;\n switch (fill.control) {\n case 'text':\n return <TextWidget fill={fill} item={item} page={page} appearance={appearance} />;\n case 'toggle':\n return <ToggleWidget fill={fill} item={item} page={page} appearance={appearance} />;\n case 'choice':\n return <ChoiceWidget fill={fill} item={item} page={page} appearance={appearance} />;\n case 'button':\n return <ButtonWidget fill={fill} item={item} page={page} appearance={appearance} />;\n }\n}\n\nfunction ButtonWidget({ fill, item, page, appearance }: WidgetProps<'button'>) {\n const form = useCapability(FormToken);\n const wrap = useIsolated<HTMLButtonElement>();\n const b = viewBox(item.box, page);\n return (\n <button\n ref={wrap}\n type=\"button\"\n aria-label={fill.label}\n disabled={fill.disabled}\n onClick={() => {\n if (item.ref) void form.activateWidget(fill.key, item.ref);\n }}\n style={{\n position: 'absolute',\n left: b.left,\n top: b.top,\n width: b.width,\n height: b.height,\n boxSizing: 'border-box',\n padding: 0,\n border: 0,\n background: 'transparent',\n cursor: fill.disabled ? 'default' : 'pointer',\n pointerEvents: fill.disabled ? 'none' : 'auto',\n }}\n >\n <Picture page={page} appearance={appearance} apBox={item.apBox} frame={b} />\n </button>\n );\n}\n\nfunction TextWidget({ fill, item, page, appearance }: WidgetProps<'text'>) {\n const form = useCapability(FormToken);\n const wrap = useIsolated<HTMLDivElement>();\n // The editor is ALWAYS MOUNTED (v2's pattern): transparent over the picture\n // at rest, visible while focused. That makes the DOM the focus manager —\n // native Tab order reaches every field, focus enters edit, blur commits —\n // with zero focus machinery of our own. The focused element holds the\n // draft; the plugin model only learns a value on commit (see model.ts).\n const [focused, setFocused] = useState(false);\n const [draft, setDraft] = useState(fill.value);\n const cancelled = useRef(false);\n // Adopt engine truth whenever it changes under us — but never mid-edit.\n useEffect(() => {\n if (!focused) setDraft(fill.value);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fill.value, focused]);\n\n const b = viewBox(item.box, page);\n const scale = item.box.width > 0 ? b.width / item.box.width : 1;\n\n // /DA font, scaled to view px. Size 0 means \"auto\" in PDF: approximate with\n // the box height for a single line, Acrobat's 12pt default for multiline.\n const fontSize =\n item.text && item.text.fontSize > 0\n ? item.text.fontSize * scale\n : fill.multiline\n ? 12 * scale\n : Math.max(6, b.height * 0.72);\n const editorStyle: React.CSSProperties = {\n position: 'absolute',\n inset: 0,\n width: '100%',\n height: '100%',\n boxSizing: 'border-box',\n border: 'none',\n outline: focused ? '2px solid rgba(66, 133, 244, 0.8)' : 'none',\n outlineOffset: -2,\n padding: '0 2px',\n margin: 0,\n background: item.style.interiorColor ?? '#fff',\n color: item.text?.fontColor ?? '#000',\n fontFamily: item.text?.fontFamily ?? 'Helvetica, Arial, sans-serif',\n fontSize,\n textAlign: item.text?.textAlign ?? 'left',\n resize: 'none',\n cursor: 'text',\n opacity: focused ? 1 : 0, // rest: the engine's picture IS the field\n };\n const editorProps = {\n value: draft,\n maxLength: fill.maxLength ?? undefined,\n 'aria-label': fill.label,\n disabled: fill.disabled,\n onFocus: () => setFocused(true),\n onChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) =>\n setDraft(e.target.value),\n onBlur: () => {\n setFocused(false);\n if (cancelled.current) {\n cancelled.current = false;\n setDraft(fill.value);\n return;\n }\n if (draft !== fill.value) void form.setText(fill.key, draft);\n },\n style: editorStyle,\n };\n const onKeys = (e: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (e.key === 'Escape') {\n cancelled.current = true;\n e.currentTarget.blur();\n }\n if (e.key === 'Enter' && !fill.multiline) e.currentTarget.blur(); // blur commits\n };\n\n return (\n <div\n ref={wrap}\n style={{\n position: 'absolute',\n left: b.left,\n top: b.top,\n width: b.width,\n height: b.height,\n pointerEvents: fill.disabled ? 'none' : 'auto',\n }}\n >\n <Picture page={page} appearance={appearance} apBox={item.apBox} frame={b} hidden={focused} />\n {fill.multiline ? (\n <textarea {...editorProps} onKeyDown={onKeys} />\n ) : (\n <input {...editorProps} type={fill.password ? 'password' : 'text'} onKeyDown={onKeys} />\n )}\n </div>\n );\n}\n\nfunction ToggleWidget({ fill, item, page, appearance }: WidgetProps<'toggle'>) {\n const form = useCapability(FormToken);\n const wrap = useIsolated<HTMLDivElement>();\n const [focused, setFocused] = useState(false);\n const b = viewBox(item.box, page);\n const toggle = () => {\n if (fill.disabled) return;\n // Checkbox: click toggles on/off (null clears). Radio: click always\n // selects its own on-state — no untoggle, per PDF/Acrobat convention.\n void form.toggle(fill.key, fill.kind === 'checkbox' && fill.checked ? null : fill.onState);\n };\n return (\n <div\n ref={wrap}\n role={fill.kind === 'checkbox' ? 'checkbox' : 'radio'}\n aria-checked={fill.checked}\n aria-label={fill.label}\n tabIndex={fill.disabled ? -1 : 0}\n onClick={toggle}\n onFocus={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n onKeyDown={(e) => {\n if (e.key === ' ' || e.key === 'Enter') {\n e.preventDefault();\n toggle();\n }\n }}\n style={{\n position: 'absolute',\n left: b.left,\n top: b.top,\n width: b.width,\n height: b.height,\n cursor: fill.disabled ? 'default' : 'pointer',\n pointerEvents: fill.disabled ? 'none' : 'auto',\n outline: focused ? '2px solid rgba(66, 133, 244, 0.8)' : 'none',\n outlineOffset: -2,\n }}\n >\n <Picture page={page} appearance={appearance} apBox={item.apBox} frame={b} />\n </div>\n );\n}\n\nfunction ChoiceWidget({ fill, item, page, appearance }: WidgetProps<'choice'>) {\n const form = useCapability(FormToken);\n const wrap = useIsolated<HTMLDivElement>();\n const [focused, setFocused] = useState(false);\n const b = viewBox(item.box, page);\n const multiple = fill.kind === 'list' && fill.multi;\n return (\n <div\n ref={wrap}\n style={{\n position: 'absolute',\n left: b.left,\n top: b.top,\n width: b.width,\n height: b.height,\n pointerEvents: fill.disabled ? 'none' : 'auto',\n outline: focused ? '2px solid rgba(66, 133, 244, 0.8)' : 'none',\n outlineOffset: -2,\n }}\n >\n <Picture page={page} appearance={appearance} apBox={item.apBox} frame={b} />\n {/* v2's trick: an invisible NATIVE select owns the dropdown/keyboard;\n the engine's baked appearance stays the visible value. Keyed +\n uncontrolled so an in-flight write never snaps the selection back. */}\n <select\n key={fill.selected.join('\u0000')}\n multiple={multiple}\n size={fill.kind === 'list' ? Math.max(2, fill.options.length) : undefined}\n defaultValue={multiple ? fill.selected : (fill.selected[0] ?? '')}\n aria-label={fill.label}\n disabled={fill.disabled}\n onFocus={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n onChange={(e) => {\n const values = Array.from(e.currentTarget.selectedOptions).map((o) => o.value);\n void form.choose(fill.key, values);\n }}\n style={{\n position: 'absolute',\n inset: 0,\n width: '100%',\n height: '100%',\n opacity: 0,\n cursor: fill.disabled ? 'default' : 'pointer',\n }}\n >\n {fill.options.map((o, i) => (\n <option key={i} value={o.value}>\n {o.label}\n </option>\n ))}\n </select>\n </div>\n );\n}\n\n/**\n * The form plugin's renderer entry, ready for\n * `<AnnotationLayer renderers={[formWidgetRenderer]} />`. It answers for the\n * PLUGIN-registered 'form-widgets' Behavior — the form plugin decides when\n * widgets are fill controls vs. editable annotations, never the app.\n */\nexport const formWidgetRenderer: AnnotationRenderer = {\n behavior: 'form-widgets',\n component: FormWidget,\n};\n\n/* ══════════════════════ standalone layer (no annotations) ══════════════════ */\n\nconst controlBase: React.CSSProperties = {\n position: 'absolute',\n boxSizing: 'border-box',\n border: '1px solid rgba(56, 88, 233, 0.55)',\n background: 'rgba(255, 255, 255, 0.92)',\n borderRadius: 2,\n font: 'inherit',\n};\n\nconst fillBox = (item: FillItem, page: PageContextValue) => viewBox(item.box, page);\n\n/** Text control: keystrokes stay LOCAL (the input is the draft store);\n * the engine write happens on blur or Enter. */\nfunction FillText({\n item,\n page,\n}: {\n item: Extract<FillItem, { control: 'text' }>;\n page: PageContextValue;\n}) {\n const form = useCapability(FormToken);\n const [draft, setDraft] = useState(item.value);\n // Adopt engine truth whenever it changes under us (remote edit, reset).\n useEffect(() => setDraft(item.value), [item.value]);\n\n const css = fillBox(item, page);\n const fontSize = Math.max(9, Math.min(css.height * 0.62, 24));\n const commit = () => {\n if (draft !== item.value) void form.setText(item.key, draft).catch(() => setDraft(item.value));\n };\n const shared: React.CSSProperties = {\n ...controlBase,\n ...css,\n fontSize,\n padding: '0 3px',\n ...(item.comb ? { letterSpacing: css.width / Math.max(1, item.maxLength ?? 1) / 2 } : {}),\n };\n return item.multiline ? (\n <textarea\n aria-label={item.label}\n value={draft}\n disabled={item.disabled}\n onChange={(e) => setDraft(e.target.value)}\n onBlur={commit}\n style={{ ...shared, resize: 'none' }}\n />\n ) : (\n <input\n aria-label={item.label}\n type={item.password ? 'password' : 'text'}\n value={draft}\n maxLength={item.maxLength ?? undefined}\n disabled={item.disabled}\n onChange={(e) => setDraft(e.target.value)}\n onBlur={commit}\n onKeyDown={(e) => {\n if (e.key === 'Enter') (e.target as HTMLInputElement).blur();\n }}\n style={shared}\n />\n );\n}\n\nfunction FillToggle({\n item,\n page,\n}: {\n item: Extract<FillItem, { control: 'toggle' }>;\n page: PageContextValue;\n}) {\n const form = useCapability(FormToken);\n const css = fillBox(item, page);\n const glyphSize = Math.min(css.width, css.height) * 0.72;\n return (\n <button\n role={item.kind}\n aria-checked={item.checked}\n aria-label={item.label}\n disabled={item.disabled}\n onClick={() =>\n // Checkbox re-click clears; radio click always selects its state.\n void form.toggle(item.key, item.kind === 'checkbox' && item.checked ? null : item.onState)\n }\n style={{\n ...controlBase,\n ...css,\n cursor: item.disabled ? 'default' : 'pointer',\n display: 'grid',\n placeItems: 'center',\n padding: 0,\n borderRadius: item.kind === 'radio' ? '50%' : 2,\n fontSize: glyphSize,\n lineHeight: 1,\n color: '#1f2a44',\n }}\n >\n {item.checked ? (item.kind === 'radio' ? '●' : '✓') : ''}\n </button>\n );\n}\n\nfunction FillChoice({\n item,\n page,\n}: {\n item: Extract<FillItem, { control: 'choice' }>;\n page: PageContextValue;\n}) {\n const form = useCapability(FormToken);\n const css = fillBox(item, page);\n return (\n <select\n aria-label={item.label}\n multiple={item.multi}\n disabled={item.disabled}\n value={item.multi ? item.selected : (item.selected[0] ?? '')}\n onChange={(e) => {\n const values = item.multi\n ? Array.from(e.target.selectedOptions).map((o) => o.value)\n : [e.target.value];\n void form.choose(item.key, values);\n }}\n style={{ ...controlBase, ...css, fontSize: Math.max(9, Math.min(css.height * 0.55, 18)) }}\n >\n {!item.multi && item.selected.length === 0 && <option value=\"\" />}\n {item.options.map((o) => (\n <option key={o.value} value={o.value}>\n {o.label}\n </option>\n ))}\n </select>\n );\n}\n\nfunction FillButton({\n item,\n page,\n}: {\n item: Extract<FillItem, { control: 'button' }>;\n page: PageContextValue;\n}) {\n const form = useCapability(FormToken);\n const css = fillBox(item, page);\n return (\n <button\n type=\"button\"\n aria-label={item.label}\n disabled={item.disabled}\n onClick={() =>\n void form.activateWidget(item.key, {\n kind: 'objectNumber',\n pageObjectNumber: page.pon,\n annotObjectNumber: item.annotObjectNumber,\n })\n }\n style={{\n ...controlBase,\n ...css,\n padding: 0,\n border: 0,\n background: 'transparent',\n cursor: item.disabled ? 'default' : 'pointer',\n }}\n />\n );\n}\n\n/**\n * Fill-mode form controls for one page, positioned from the form model's own\n * widget geometry — the ANNOTATION-LESS path (a fill-only viewer whose page\n * pixels come from an annotated RenderLayer raster). Active whenever the\n * active tool carries the 'form-fill' tag (the built-in pointer/pan tools\n * do); any other tool stands the controls down. Do not mount next to an\n * AnnotationLayer wired with `formWidgetBehaviors`.\n */\nexport function FormLayer() {\n const page = usePage();\n const form = useCapability(FormToken);\n const active = useSelector(InteractionToken, (c) => c.activeTool().enables.has('form-fill'));\n\n useEffect(() => {\n if (active) form.ensureGeom(page.pon);\n }, [active, form, page.pon]);\n\n const items = useSelector(FormToken, (c) => c.fillItems(page.pon), shallowArray);\n if (!active) return null;\n\n return (\n <div style={{ position: 'absolute', inset: 0 }}>\n {items.map((item) =>\n item.control === 'text' ? (\n <FillText key={`${item.key}:${item.annotObjectNumber}`} item={item} page={page} />\n ) : item.control === 'toggle' ? (\n <FillToggle key={`${item.key}:${item.annotObjectNumber}`} item={item} page={page} />\n ) : item.control === 'choice' ? (\n <FillChoice key={`${item.key}:${item.annotObjectNumber}`} item={item} page={page} />\n ) : item.control === 'button' ? (\n <FillButton key={`${item.key}:${item.annotObjectNumber}`} item={item} page={page} />\n ) : null,\n )}\n </div>\n );\n}\n\n/* ═══════════════════════════════ hooks ═══════════════════════════════ */\n\n/** The form capability — values, interchange, design-mode verbs. */\nexport function useForm() {\n return useCapability(FormToken);\n}\n\n/** The reconciled form snapshot (null until the first load lands),\n * re-rendering on every form model change. */\nexport function useFormSnapshot() {\n return useSelector(FormToken, (c) => c.snapshot());\n}\n\n/**\n * The FIELD behind the currently selected widget annotation (single\n * selection), or null. The design-mode join: widget selection lives in the\n * annotation plane, field properties live here.\n */\nexport function useFormField(): FormFieldDTO | null {\n const selected = useAnnotationSelected();\n const widget = selected.length === 1 && selected[0]!.subtype === 'widget' ? selected[0]! : null;\n const objnum = widget && widget.ref.kind === 'objectNumber' ? widget.ref.annotObjectNumber : 0;\n return useSelector(FormToken, (c) => (objnum > 0 ? c.fieldForWidget(objnum) : null));\n}\n"],"mappings":";;;;;;;;;;AA6DA,SAAS,QAAQ,GAAS,MAAwB;CAChD,MAAM,KAAK,KAAK,UAAU,cAAc;EAAE,GAAG,EAAE;EAAG,GAAG,EAAE;CAAE,CAAC;CAC1D,MAAM,KAAK,KAAK,UAAU,cAAc;EAAE,GAAG,EAAE,IAAI,EAAE;EAAO,GAAG,EAAE,IAAI,EAAE;CAAO,CAAC;CAC/E,OAAO;EAAE,MAAM,GAAG;EAAG,KAAK,GAAG;EAAG,OAAO,GAAG,IAAI,GAAG;EAAG,QAAQ,GAAG,IAAI,GAAG;CAAE;AAC1E;;;;;;AAOA,SAAS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let react = require("react");
4
+ let _embedpdf_plugin_i18n = require("@embedpdf/plugin-i18n");
5
+ //#region src/i18n.ts
6
+ /** The raw i18n capability (t / setLocale / locales / dir / …). */
7
+ const useI18n = () => require_runtime.useCapability(_embedpdf_plugin_i18n.I18nToken);
8
+ /**
9
+ * A reactive translate function. New identity whenever i18n state changes
10
+ * (locale switch, pack registered), so memoized children re-render too.
11
+ *
12
+ * const t = useT();
13
+ * <button title={t('commands.zoom.in')}>+</button>
14
+ * <span>{t('pages', { params: { count } })}</span>
15
+ */
16
+ function useT() {
17
+ const i18n = require_runtime.useCapability(_embedpdf_plugin_i18n.I18nToken);
18
+ return (0, react.useMemo)(() => (key, options) => i18n.t(key, options), [i18n, require_runtime.useKernelValue((k) => k.getState().plugins["i18n"])]);
19
+ }
20
+ const localeListEqual = (a, b) => a.length === b.length && a.every((x, i) => x.code === b[i].code && x.name === b[i].name && x.loaded === b[i].loaded);
21
+ /**
22
+ * Everything a locale switcher needs, reactive.
23
+ *
24
+ * const { locale, locales, loading, setLocale } = useLocale();
25
+ */
26
+ function useLocale() {
27
+ const i18n = require_runtime.useCapability(_embedpdf_plugin_i18n.I18nToken);
28
+ const locale = require_runtime.useSelector(_embedpdf_plugin_i18n.I18nToken, (c) => c.locale());
29
+ const dir = require_runtime.useSelector(_embedpdf_plugin_i18n.I18nToken, (c) => c.dir());
30
+ const loading = require_runtime.useSelector(_embedpdf_plugin_i18n.I18nToken, (c) => c.loading());
31
+ return {
32
+ locale,
33
+ dir,
34
+ locales: require_runtime.useSelector(_embedpdf_plugin_i18n.I18nToken, (c) => c.locales(), localeListEqual),
35
+ loading,
36
+ setLocale: i18n.setLocale
37
+ };
38
+ }
39
+ //#endregion
40
+ exports.useI18n = useI18n;
41
+ exports.useLocale = useLocale;
42
+ exports.useT = useT;
43
+ Object.keys(_embedpdf_plugin_i18n).forEach(function(k) {
44
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
45
+ enumerable: true,
46
+ get: function() {
47
+ return _embedpdf_plugin_i18n[k];
48
+ }
49
+ });
50
+ });
51
+
52
+ //# sourceMappingURL=i18n.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.cjs","names":["useCapability","I18nToken","useKernelValue","useSelector"],"sources":["../src/i18n.ts"],"sourcesContent":["/**\n * The React surface for @embedpdf/plugin-i18n — sugar over the generic\n * binding, nothing more. The plugin keeps locale packs in the store, so\n * reactivity is the kernel's one change stream; there are no emitters to\n * subscribe and no per-plugin plumbing.\n *\n * Because the capability is workspace-scoped and engine-free, these hooks\n * work from the FIRST frame — including inside `<Viewer fallback>` — while\n * the engine is still booting.\n */\n\n// One-line-per-feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-i18n';\nimport { useMemo } from 'react';\nimport { I18nToken } from '@embedpdf/plugin-i18n';\nimport type { LocaleInfo, TranslateOptions } from '@embedpdf/plugin-i18n';\nimport { useCapability, useKernelValue, useSelector } from './runtime';\n\n/** The raw i18n capability (t / setLocale / locales / dir / …). */\nexport const useI18n = () => useCapability(I18nToken);\n\n/**\n * A reactive translate function. New identity whenever i18n state changes\n * (locale switch, pack registered), so memoized children re-render too.\n *\n * const t = useT();\n * <button title={t('commands.zoom.in')}>+</button>\n * <span>{t('pages', { params: { count } })}</span>\n */\nexport function useT(): (key: string, options?: TranslateOptions) => string {\n const i18n = useCapability(I18nToken);\n const slice = useKernelValue((k) => k.getState().plugins['i18n']);\n return useMemo(() => (key, options) => i18n.t(key, options), [i18n, slice]);\n}\n\nconst localeListEqual = (a: LocaleInfo[], b: LocaleInfo[]): boolean =>\n a.length === b.length &&\n a.every((x, i) => x.code === b[i].code && x.name === b[i].name && x.loaded === b[i].loaded);\n\n/**\n * Everything a locale switcher needs, reactive.\n *\n * const { locale, locales, loading, setLocale } = useLocale();\n */\nexport function useLocale(): {\n locale: string;\n dir: 'ltr' | 'rtl';\n locales: LocaleInfo[];\n /** Code of a lazy pack being fetched, if any — show a spinner on it. */\n loading: string | null;\n setLocale: (code: string) => void;\n} {\n const i18n = useCapability(I18nToken);\n const locale = useSelector(I18nToken, (c) => c.locale());\n const dir = useSelector(I18nToken, (c) => c.dir());\n const loading = useSelector(I18nToken, (c) => c.loading());\n const locales = useSelector(I18nToken, (c) => c.locales(), localeListEqual);\n return { locale, dir, locales, loading, setLocale: i18n.setLocale };\n}\n"],"mappings":";;;;;;AAmBA,MAAa,gBAAgBA,gBAAAA,cAAcC,sBAAAA,SAAS;;;;;;;;;AAUpD,SAAgB,OAA4D;CAC1E,MAAM,OAAOD,gBAAAA,cAAcC,sBAAAA,SAAS;CAEpC,QAAA,GAAA,MAAA,QAAA,QAAsB,KAAK,YAAY,KAAK,EAAE,KAAK,OAAO,GAAG,CAAC,MADhDC,gBAAAA,gBAAgB,MAAM,EAAE,SAAS,CAAC,CAAC,QAAQ,OACe,CAAC,CAAC;AAC5E;AAEA,MAAM,mBAAmB,GAAiB,MACxC,EAAE,WAAW,EAAE,UACf,EAAE,OAAO,GAAG,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,CAAC,MAAM;;;;;;AAO5F,SAAgB,YAOd;CACA,MAAM,OAAOF,gBAAAA,cAAcC,sBAAAA,SAAS;CACpC,MAAM,SAASE,gBAAAA,YAAYF,sBAAAA,YAAY,MAAM,EAAE,OAAO,CAAC;CACvD,MAAM,MAAME,gBAAAA,YAAYF,sBAAAA,YAAY,MAAM,EAAE,IAAI,CAAC;CACjD,MAAM,UAAUE,gBAAAA,YAAYF,sBAAAA,YAAY,MAAM,EAAE,QAAQ,CAAC;CAEzD,OAAO;EAAE;EAAQ;EAAK,SADNE,gBAAAA,YAAYF,sBAAAA,YAAY,MAAM,EAAE,QAAQ,GAAG,eAC/B;EAAG;EAAS,WAAW,KAAK;CAAU;AACpE"}
@@ -0,0 +1,30 @@
1
+ import { LocaleInfo, TranslateOptions } from "@embedpdf/plugin-i18n";
2
+ export * from "@embedpdf/plugin-i18n";
3
+ //#region src/i18n.d.ts
4
+ /** The raw i18n capability (t / setLocale / locales / dir / …). */
5
+ declare const useI18n: () => import("@embedpdf/plugin-i18n").I18nCapability;
6
+ /**
7
+ * A reactive translate function. New identity whenever i18n state changes
8
+ * (locale switch, pack registered), so memoized children re-render too.
9
+ *
10
+ * const t = useT();
11
+ * <button title={t('commands.zoom.in')}>+</button>
12
+ * <span>{t('pages', { params: { count } })}</span>
13
+ */
14
+ declare function useT(): (key: string, options?: TranslateOptions) => string;
15
+ /**
16
+ * Everything a locale switcher needs, reactive.
17
+ *
18
+ * const { locale, locales, loading, setLocale } = useLocale();
19
+ */
20
+ declare function useLocale(): {
21
+ locale: string;
22
+ dir: 'ltr' | 'rtl';
23
+ locales: LocaleInfo[];
24
+ /** Code of a lazy pack being fetched, if any — show a spinner on it. */
25
+ loading: string | null;
26
+ setLocale: (code: string) => void;
27
+ };
28
+ //#endregion
29
+ export { useI18n, useLocale, useT };
30
+ //# sourceMappingURL=i18n.d.cts.map
package/dist/i18n.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ import { LocaleInfo, TranslateOptions } from "@embedpdf/plugin-i18n";
2
+ export * from "@embedpdf/plugin-i18n";
3
+ //#region src/i18n.d.ts
4
+ /** The raw i18n capability (t / setLocale / locales / dir / …). */
5
+ declare const useI18n: () => import("@embedpdf/plugin-i18n").I18nCapability;
6
+ /**
7
+ * A reactive translate function. New identity whenever i18n state changes
8
+ * (locale switch, pack registered), so memoized children re-render too.
9
+ *
10
+ * const t = useT();
11
+ * <button title={t('commands.zoom.in')}>+</button>
12
+ * <span>{t('pages', { params: { count } })}</span>
13
+ */
14
+ declare function useT(): (key: string, options?: TranslateOptions) => string;
15
+ /**
16
+ * Everything a locale switcher needs, reactive.
17
+ *
18
+ * const { locale, locales, loading, setLocale } = useLocale();
19
+ */
20
+ declare function useLocale(): {
21
+ locale: string;
22
+ dir: 'ltr' | 'rtl';
23
+ locales: LocaleInfo[];
24
+ /** Code of a lazy pack being fetched, if any — show a spinner on it. */
25
+ loading: string | null;
26
+ setLocale: (code: string) => void;
27
+ };
28
+ //#endregion
29
+ export { useI18n, useLocale, useT };
30
+ //# sourceMappingURL=i18n.d.ts.map
package/dist/i18n.js ADDED
@@ -0,0 +1,42 @@
1
+ import { useCapability, useKernelValue, useSelector } from "./runtime.js";
2
+ import { useMemo } from "react";
3
+ import { I18nToken } from "@embedpdf/plugin-i18n";
4
+ export * from "@embedpdf/plugin-i18n";
5
+ //#region src/i18n.ts
6
+ /** The raw i18n capability (t / setLocale / locales / dir / …). */
7
+ const useI18n = () => useCapability(I18nToken);
8
+ /**
9
+ * A reactive translate function. New identity whenever i18n state changes
10
+ * (locale switch, pack registered), so memoized children re-render too.
11
+ *
12
+ * const t = useT();
13
+ * <button title={t('commands.zoom.in')}>+</button>
14
+ * <span>{t('pages', { params: { count } })}</span>
15
+ */
16
+ function useT() {
17
+ const i18n = useCapability(I18nToken);
18
+ return useMemo(() => (key, options) => i18n.t(key, options), [i18n, useKernelValue((k) => k.getState().plugins["i18n"])]);
19
+ }
20
+ const localeListEqual = (a, b) => a.length === b.length && a.every((x, i) => x.code === b[i].code && x.name === b[i].name && x.loaded === b[i].loaded);
21
+ /**
22
+ * Everything a locale switcher needs, reactive.
23
+ *
24
+ * const { locale, locales, loading, setLocale } = useLocale();
25
+ */
26
+ function useLocale() {
27
+ const i18n = useCapability(I18nToken);
28
+ const locale = useSelector(I18nToken, (c) => c.locale());
29
+ const dir = useSelector(I18nToken, (c) => c.dir());
30
+ const loading = useSelector(I18nToken, (c) => c.loading());
31
+ return {
32
+ locale,
33
+ dir,
34
+ locales: useSelector(I18nToken, (c) => c.locales(), localeListEqual),
35
+ loading,
36
+ setLocale: i18n.setLocale
37
+ };
38
+ }
39
+ //#endregion
40
+ export { useI18n, useLocale, useT };
41
+
42
+ //# sourceMappingURL=i18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.js","names":[],"sources":["../src/i18n.ts"],"sourcesContent":["/**\n * The React surface for @embedpdf/plugin-i18n — sugar over the generic\n * binding, nothing more. The plugin keeps locale packs in the store, so\n * reactivity is the kernel's one change stream; there are no emitters to\n * subscribe and no per-plugin plumbing.\n *\n * Because the capability is workspace-scoped and engine-free, these hooks\n * work from the FIRST frame — including inside `<Viewer fallback>` — while\n * the engine is still booting.\n */\n\n// One-line-per-feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-i18n';\nimport { useMemo } from 'react';\nimport { I18nToken } from '@embedpdf/plugin-i18n';\nimport type { LocaleInfo, TranslateOptions } from '@embedpdf/plugin-i18n';\nimport { useCapability, useKernelValue, useSelector } from './runtime';\n\n/** The raw i18n capability (t / setLocale / locales / dir / …). */\nexport const useI18n = () => useCapability(I18nToken);\n\n/**\n * A reactive translate function. New identity whenever i18n state changes\n * (locale switch, pack registered), so memoized children re-render too.\n *\n * const t = useT();\n * <button title={t('commands.zoom.in')}>+</button>\n * <span>{t('pages', { params: { count } })}</span>\n */\nexport function useT(): (key: string, options?: TranslateOptions) => string {\n const i18n = useCapability(I18nToken);\n const slice = useKernelValue((k) => k.getState().plugins['i18n']);\n return useMemo(() => (key, options) => i18n.t(key, options), [i18n, slice]);\n}\n\nconst localeListEqual = (a: LocaleInfo[], b: LocaleInfo[]): boolean =>\n a.length === b.length &&\n a.every((x, i) => x.code === b[i].code && x.name === b[i].name && x.loaded === b[i].loaded);\n\n/**\n * Everything a locale switcher needs, reactive.\n *\n * const { locale, locales, loading, setLocale } = useLocale();\n */\nexport function useLocale(): {\n locale: string;\n dir: 'ltr' | 'rtl';\n locales: LocaleInfo[];\n /** Code of a lazy pack being fetched, if any — show a spinner on it. */\n loading: string | null;\n setLocale: (code: string) => void;\n} {\n const i18n = useCapability(I18nToken);\n const locale = useSelector(I18nToken, (c) => c.locale());\n const dir = useSelector(I18nToken, (c) => c.dir());\n const loading = useSelector(I18nToken, (c) => c.loading());\n const locales = useSelector(I18nToken, (c) => c.locales(), localeListEqual);\n return { locale, dir, locales, loading, setLocale: i18n.setLocale };\n}\n"],"mappings":";;;;;;AAmBA,MAAa,gBAAgB,cAAc,SAAS;;;;;;;;;AAUpD,SAAgB,OAA4D;CAC1E,MAAM,OAAO,cAAc,SAAS;CAEpC,OAAO,eAAe,KAAK,YAAY,KAAK,EAAE,KAAK,OAAO,GAAG,CAAC,MADhD,gBAAgB,MAAM,EAAE,SAAS,CAAC,CAAC,QAAQ,OACe,CAAC,CAAC;AAC5E;AAEA,MAAM,mBAAmB,GAAiB,MACxC,EAAE,WAAW,EAAE,UACf,EAAE,OAAO,GAAG,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,CAAC,MAAM;;;;;;AAO5F,SAAgB,YAOd;CACA,MAAM,OAAO,cAAc,SAAS;CACpC,MAAM,SAAS,YAAY,YAAY,MAAM,EAAE,OAAO,CAAC;CACvD,MAAM,MAAM,YAAY,YAAY,MAAM,EAAE,IAAI,CAAC;CACjD,MAAM,UAAU,YAAY,YAAY,MAAM,EAAE,QAAQ,CAAC;CAEzD,OAAO;EAAE;EAAQ;EAAK,SADN,YAAY,YAAY,MAAM,EAAE,QAAQ,GAAG,eAC/B;EAAG;EAAS,WAAW,KAAK;CAAU;AACpE"}
package/dist/index.cjs ADDED
@@ -0,0 +1,240 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("./rolldown-runtime-DDXJien1.cjs");
3
+ const require_runtime = require("./runtime.cjs");
4
+ const require_interaction = require("./interaction.cjs");
5
+ const require_stage = require("./stage.cjs");
6
+ const require_scrollbar = require("./scrollbar.cjs");
7
+ const require_page_view = require("./page-view.cjs");
8
+ const require_render = require("./render.cjs");
9
+ const require_selection = require("./selection.cjs");
10
+ const require_annotation = require("./annotation-Ct6dFtzJ.cjs");
11
+ const require_annotation_menu = require("./annotation-menu.cjs");
12
+ const require_link = require("./link.cjs");
13
+ const require_views = require("./views.cjs");
14
+ const require_page_edit = require("./page-edit.cjs");
15
+ const require_metadata = require("./metadata.cjs");
16
+ const require_redaction = require("./redaction.cjs");
17
+ const require_form = require("./form.cjs");
18
+ const require_search = require("./search.cjs");
19
+ const require_stamp = require("./stamp.cjs");
20
+ const require_i18n = require("./i18n.cjs");
21
+ const require_commands = require("./commands.cjs");
22
+ const require_shell = require("./shell.cjs");
23
+ const require_toolbar = require("./toolbar.cjs");
24
+ exports.AnnotationDraftMenu = require_annotation_menu.AnnotationDraftMenu;
25
+ exports.AnnotationLayer = require_annotation.AnnotationLayer;
26
+ exports.AnnotationMenu = require_annotation_menu.AnnotationMenu;
27
+ exports.DocumentGate = require_runtime.DocumentGate;
28
+ exports.DocumentScope = require_runtime.DocumentScope;
29
+ exports.EmbedPDF = require_runtime.EmbedPDF;
30
+ exports.FormLayer = require_form.FormLayer;
31
+ exports.LinkLayer = require_link.LinkLayer;
32
+ exports.PageAnnotationDraftMenu = require_annotation.PageAnnotationDraftMenu;
33
+ exports.PageAnnotationMenu = require_annotation.PageAnnotationMenu;
34
+ exports.PagePointerSource = require_interaction.PagePointerSource;
35
+ exports.PageProvider = require_runtime.PageProvider;
36
+ exports.PageView = require_page_view.PageView;
37
+ exports.RenderLayer = require_render.RenderLayer;
38
+ exports.Scrollbar = require_scrollbar.Scrollbar;
39
+ exports.SearchLayer = require_search.SearchLayer;
40
+ exports.SelectionLayer = require_selection.SelectionLayer;
41
+ exports.Stage = require_stage.Stage;
42
+ exports.TileLayer = require_render.TileLayer;
43
+ exports.Toolbar = require_toolbar.Toolbar;
44
+ exports.Viewer = require_runtime.Viewer;
45
+ exports.createClickCounter = require_interaction.createClickCounter;
46
+ exports.filePickerProvider = require_annotation.filePickerProvider;
47
+ exports.isMacPlatform = require_commands.isMacPlatform;
48
+ exports.makePageContext = require_runtime.makePageContext;
49
+ exports.sameAnchor = require_annotation.sameAnchor;
50
+ exports.sameCreationDraftAnchor = require_annotation.sameCreationDraftAnchor;
51
+ exports.shallowArray = require_runtime.shallowArray;
52
+ exports.useActiveDocumentId = require_runtime.useActiveDocumentId;
53
+ exports.useAnnotation = require_annotation.useAnnotation;
54
+ exports.useAnnotationDefaults = require_annotation.useAnnotationDefaults;
55
+ exports.useAnnotationSelected = require_annotation.useAnnotationSelected;
56
+ exports.useAnnotationSelection = require_annotation.useAnnotationSelection;
57
+ exports.useArmStampAsset = require_stamp.useArmStampAsset;
58
+ exports.useCapability = require_runtime.useCapability;
59
+ exports.useCommand = require_commands.useCommand;
60
+ exports.useCommandShortcuts = require_commands.useCommandShortcuts;
61
+ exports.useCommands = require_commands.useCommands;
62
+ exports.useDocumentId = require_runtime.useDocumentId;
63
+ exports.useDocumentStatus = require_runtime.useDocumentStatus;
64
+ exports.useDocuments = require_runtime.useDocuments;
65
+ exports.useFilePickerProvider = require_annotation.useFilePickerProvider;
66
+ exports.useForm = require_form.useForm;
67
+ exports.useFormField = require_form.useFormField;
68
+ exports.useFormScriptingProvider = require_form.useFormScriptingProvider;
69
+ exports.useI18n = require_i18n.useI18n;
70
+ exports.useKernel = require_runtime.useKernel;
71
+ exports.useKernelValue = require_runtime.useKernelValue;
72
+ exports.useLayout = require_stage.useLayout;
73
+ exports.useLink = require_link.useLink;
74
+ exports.useLocale = require_i18n.useLocale;
75
+ exports.useMenus = require_shell.useMenus;
76
+ exports.useMetadata = require_metadata.useMetadata;
77
+ exports.useOptionalCapability = require_runtime.useOptionalCapability;
78
+ exports.useOptionalSelector = require_runtime.useOptionalSelector;
79
+ exports.usePage = require_runtime.usePage;
80
+ exports.usePageEditor = require_page_edit.usePageEditor;
81
+ exports.usePageList = require_stage.usePageList;
82
+ exports.usePages = require_stage.usePages;
83
+ exports.usePendingRedactions = require_redaction.usePendingRedactions;
84
+ exports.useRedaction = require_redaction.useRedaction;
85
+ exports.useScrollMetrics = require_scrollbar.useScrollMetrics;
86
+ exports.useSearch = require_search.useSearch;
87
+ exports.useSearchState = require_search.useSearchState;
88
+ exports.useSelection = require_selection.useSelection;
89
+ exports.useSelectionFlags = require_annotation.useSelectionFlags;
90
+ exports.useSelectionProps = require_annotation.useSelectionProps;
91
+ exports.useSelector = require_runtime.useSelector;
92
+ exports.useShell = require_shell.useShell;
93
+ exports.useStage = require_stage.useStage;
94
+ exports.useStageSettings = require_stage.useStageSettings;
95
+ exports.useStamp = require_stamp.useStamp;
96
+ exports.useStampAssetPreviewUrl = require_stamp.useStampAssetPreviewUrl;
97
+ exports.useStampAssets = require_stamp.useStampAssets;
98
+ exports.useStampLibraries = require_stamp.useStampLibraries;
99
+ exports.useStripView = require_toolbar.useStripView;
100
+ exports.useSurface = require_shell.useSurface;
101
+ exports.useT = require_i18n.useT;
102
+ exports.useTool = require_interaction.useTool;
103
+ exports.useToolCursor = require_interaction.useToolCursor;
104
+ exports.useViews = require_views.useViews;
105
+ exports.useZoom = require_stage.useZoom;
106
+ var _embedpdf_core = require("@embedpdf/core");
107
+ Object.keys(_embedpdf_core).forEach(function(k) {
108
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
109
+ enumerable: true,
110
+ get: function() {
111
+ return _embedpdf_core[k];
112
+ }
113
+ });
114
+ });
115
+ var _embedpdf_plugin_stage = require("@embedpdf/plugin-stage");
116
+ Object.keys(_embedpdf_plugin_stage).forEach(function(k) {
117
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
118
+ enumerable: true,
119
+ get: function() {
120
+ return _embedpdf_plugin_stage[k];
121
+ }
122
+ });
123
+ });
124
+ var _embedpdf_plugin_interaction = require("@embedpdf/plugin-interaction");
125
+ Object.keys(_embedpdf_plugin_interaction).forEach(function(k) {
126
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
127
+ enumerable: true,
128
+ get: function() {
129
+ return _embedpdf_plugin_interaction[k];
130
+ }
131
+ });
132
+ });
133
+ var _embedpdf_plugin_render = require("@embedpdf/plugin-render");
134
+ Object.keys(_embedpdf_plugin_render).forEach(function(k) {
135
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
136
+ enumerable: true,
137
+ get: function() {
138
+ return _embedpdf_plugin_render[k];
139
+ }
140
+ });
141
+ });
142
+ var _embedpdf_plugin_selection = require("@embedpdf/plugin-selection");
143
+ Object.keys(_embedpdf_plugin_selection).forEach(function(k) {
144
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
145
+ enumerable: true,
146
+ get: function() {
147
+ return _embedpdf_plugin_selection[k];
148
+ }
149
+ });
150
+ });
151
+ var _embedpdf_plugin_annotation = require("@embedpdf/plugin-annotation");
152
+ Object.keys(_embedpdf_plugin_annotation).forEach(function(k) {
153
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
154
+ enumerable: true,
155
+ get: function() {
156
+ return _embedpdf_plugin_annotation[k];
157
+ }
158
+ });
159
+ });
160
+ var _embedpdf_plugin_link = require("@embedpdf/plugin-link");
161
+ Object.keys(_embedpdf_plugin_link).forEach(function(k) {
162
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
163
+ enumerable: true,
164
+ get: function() {
165
+ return _embedpdf_plugin_link[k];
166
+ }
167
+ });
168
+ });
169
+ var _embedpdf_plugin_view_manager = require("@embedpdf/plugin-view-manager");
170
+ Object.keys(_embedpdf_plugin_view_manager).forEach(function(k) {
171
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
172
+ enumerable: true,
173
+ get: function() {
174
+ return _embedpdf_plugin_view_manager[k];
175
+ }
176
+ });
177
+ });
178
+ var _embedpdf_plugin_page_edit = require("@embedpdf/plugin-page-edit");
179
+ Object.keys(_embedpdf_plugin_page_edit).forEach(function(k) {
180
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
181
+ enumerable: true,
182
+ get: function() {
183
+ return _embedpdf_plugin_page_edit[k];
184
+ }
185
+ });
186
+ });
187
+ var _embedpdf_plugin_metadata = require("@embedpdf/plugin-metadata");
188
+ Object.keys(_embedpdf_plugin_metadata).forEach(function(k) {
189
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
190
+ enumerable: true,
191
+ get: function() {
192
+ return _embedpdf_plugin_metadata[k];
193
+ }
194
+ });
195
+ });
196
+ var _embedpdf_plugin_redaction = require("@embedpdf/plugin-redaction");
197
+ Object.keys(_embedpdf_plugin_redaction).forEach(function(k) {
198
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
199
+ enumerable: true,
200
+ get: function() {
201
+ return _embedpdf_plugin_redaction[k];
202
+ }
203
+ });
204
+ });
205
+ var _embedpdf_plugin_stamp = require("@embedpdf/plugin-stamp");
206
+ Object.keys(_embedpdf_plugin_stamp).forEach(function(k) {
207
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
208
+ enumerable: true,
209
+ get: function() {
210
+ return _embedpdf_plugin_stamp[k];
211
+ }
212
+ });
213
+ });
214
+ var _embedpdf_plugin_commands = require("@embedpdf/plugin-commands");
215
+ Object.keys(_embedpdf_plugin_commands).forEach(function(k) {
216
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
217
+ enumerable: true,
218
+ get: function() {
219
+ return _embedpdf_plugin_commands[k];
220
+ }
221
+ });
222
+ });
223
+ var _embedpdf_plugin_shell = require("@embedpdf/plugin-shell");
224
+ Object.keys(_embedpdf_plugin_shell).forEach(function(k) {
225
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
226
+ enumerable: true,
227
+ get: function() {
228
+ return _embedpdf_plugin_shell[k];
229
+ }
230
+ });
231
+ });
232
+ var _embedpdf_core_ui = require("@embedpdf/core-ui");
233
+ Object.keys(_embedpdf_core_ui).forEach(function(k) {
234
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
235
+ enumerable: true,
236
+ get: function() {
237
+ return _embedpdf_core_ui[k];
238
+ }
239
+ });
240
+ });
@@ -0,0 +1,37 @@
1
+ import { S as useSelector, _ as useKernel, a as EmbedPDF, b as useOptionalSelector, c as Viewer, d as shallowArray, f as useActiveDocumentId, g as useDocuments, h as useDocumentStatus, i as DocumentScopeProps, l as ViewerProps, m as useDocumentId, n as DocumentGateProps, o as PageContextValue, p as useCapability, r as DocumentScope, s as PageProvider, t as DocumentGate, u as makePageContext, v as useKernelValue, x as usePage, y as useOptionalCapability } from "./runtime-CMxIuF2O.cjs";
2
+ import { A as useAnnotation, C as SelectionProps, D as filePickerProvider, E as TextStyle, F as useSelectionFlags, I as useSelectionProps, L as AnnotationMenuPlacement, M as useAnnotationSelected, N as useAnnotationSelection, O as sameAnchor, P as useFilePickerProvider, S as SelectionFlags, T as TextAlign, _ as PageAnnotationMenu, a as AnnotationLayerProps, b as RenderItem, c as AnnotationProps, d as AnnotationRendererProps, f as Border, g as PageAnnotationDraftMenu, h as LineEndings, i as AnnotationLayer, j as useAnnotationDefaults, k as sameCreationDraftAnchor, l as AnnotationPropsPatch, m as LineEnding, n as AnnotationDraftMenuRenderArgs, o as AnnotationMenuProps, p as Geom, r as AnnotationFlags, s as AnnotationMenuRenderArgs, t as AnnotationDraftMenuProps, u as AnnotationRenderer, v as PropKey, w as Style, x as SelectionAnchor, y as PropSpec } from "./annotation-B6jwfTCh.cjs";
3
+ import { AnnotationDraftMenu, AnnotationMenu } from "./annotation-menu.cjs";
4
+ import { isMacPlatform, useCommand, useCommandShortcuts, useCommands } from "./commands.cjs";
5
+ import { FormLayer, FormScriptingUiHandlers, useForm, useFormField, useFormScriptingProvider } from "./form.cjs";
6
+ import { useI18n, useLocale, useT } from "./i18n.cjs";
7
+ import { Stage, StageProps, StageTokenProp, useLayout, usePageList, usePages, useStage, useStageSettings, useZoom } from "./stage.cjs";
8
+ import { Scrollbar, ScrollbarAxis, ScrollbarProps, useScrollMetrics } from "./scrollbar.cjs";
9
+ import { PageView, PageViewProps } from "./page-view.cjs";
10
+ import { RenderLayer, RenderLayerProps, TileLayer, TileLayerProps } from "./render.cjs";
11
+ import { PagePointerSource, ToolCursorImage, ToolCursorSpec, createClickCounter, useTool, useToolCursor } from "./interaction.cjs";
12
+ import { SelectionLayer, SelectionLayerProps, useSelection } from "./selection.cjs";
13
+ import { LinkLayer, LinkLayerProps, useLink } from "./link.cjs";
14
+ import { UseViews, useViews } from "./views.cjs";
15
+ import { usePageEditor } from "./page-edit.cjs";
16
+ import { useMetadata } from "./metadata.cjs";
17
+ import { usePendingRedactions, useRedaction } from "./redaction.cjs";
18
+ import { SearchLayer, useSearch, useSearchState } from "./search.cjs";
19
+ import { useArmStampAsset, useStamp, useStampAssetPreviewUrl, useStampAssets, useStampLibraries } from "./stamp.cjs";
20
+ import { MenusHandle, SurfaceHandle, useMenus, useShell, useSurface } from "./shell.cjs";
21
+ import { CollapsedGroupView, CustomSlotCtx, GroupDisclosureView, OverflowMenuView, StripView, StripViewGroup, Toolbar, ToolbarProps, useStripView } from "./toolbar.cjs";
22
+ export * from "@embedpdf/plugin-annotation";
23
+ export * from "@embedpdf/core";
24
+ export * from "@embedpdf/plugin-render";
25
+ export * from "@embedpdf/plugin-commands";
26
+ export * from "@embedpdf/plugin-stage";
27
+ export * from "@embedpdf/plugin-interaction";
28
+ export * from "@embedpdf/plugin-selection";
29
+ export * from "@embedpdf/plugin-link";
30
+ export * from "@embedpdf/plugin-view-manager";
31
+ export * from "@embedpdf/plugin-page-edit";
32
+ export * from "@embedpdf/plugin-metadata";
33
+ export * from "@embedpdf/plugin-redaction";
34
+ export * from "@embedpdf/plugin-stamp";
35
+ export * from "@embedpdf/plugin-shell";
36
+ export * from "@embedpdf/core-ui";
37
+ export { AnnotationDraftMenu, AnnotationDraftMenuProps, AnnotationDraftMenuRenderArgs, type AnnotationFlags, AnnotationLayer, AnnotationLayerProps, AnnotationMenu, type AnnotationMenuPlacement, AnnotationMenuProps, AnnotationMenuRenderArgs, type AnnotationProps, type AnnotationPropsPatch, AnnotationRenderer, AnnotationRendererProps, type Border, CollapsedGroupView, CustomSlotCtx, DocumentGate, DocumentGateProps, DocumentScope, DocumentScopeProps, EmbedPDF, FormLayer, type FormScriptingUiHandlers, type Geom, GroupDisclosureView, type LineEnding, type LineEndings, LinkLayer, LinkLayerProps, MenusHandle, OverflowMenuView, PageAnnotationDraftMenu, PageAnnotationMenu, PageContextValue, PagePointerSource, PageProvider, PageView, PageViewProps, type PropKey, type PropSpec, type RenderItem, RenderLayer, RenderLayerProps, Scrollbar, ScrollbarAxis, ScrollbarProps, SearchLayer, SelectionAnchor, type SelectionFlags, SelectionLayer, SelectionLayerProps, type SelectionProps, Stage, StageProps, StageTokenProp, StripView, StripViewGroup, type Style, SurfaceHandle, type TextAlign, type TextStyle, TileLayer, TileLayerProps, ToolCursorImage, ToolCursorSpec, Toolbar, ToolbarProps, UseViews, Viewer, ViewerProps, createClickCounter, filePickerProvider, isMacPlatform, makePageContext, sameAnchor, sameCreationDraftAnchor, shallowArray, useActiveDocumentId, useAnnotation, useAnnotationDefaults, useAnnotationSelected, useAnnotationSelection, useArmStampAsset, useCapability, useCommand, useCommandShortcuts, useCommands, useDocumentId, useDocumentStatus, useDocuments, useFilePickerProvider, useForm, useFormField, useFormScriptingProvider, useI18n, useKernel, useKernelValue, useLayout, useLink, useLocale, useMenus, useMetadata, useOptionalCapability, useOptionalSelector, usePage, usePageEditor, usePageList, usePages, usePendingRedactions, useRedaction, useScrollMetrics, useSearch, useSearchState, useSelection, useSelectionFlags, useSelectionProps, useSelector, useShell, useStage, useStageSettings, useStamp, useStampAssetPreviewUrl, useStampAssets, useStampLibraries, useStripView, useSurface, useT, useTool, useToolCursor, useViews, useZoom };
@@ -0,0 +1,37 @@
1
+ import { S as useSelector, _ as useKernel, a as EmbedPDF, b as useOptionalSelector, c as Viewer, d as shallowArray, f as useActiveDocumentId, g as useDocuments, h as useDocumentStatus, i as DocumentScopeProps, l as ViewerProps, m as useDocumentId, n as DocumentGateProps, o as PageContextValue, p as useCapability, r as DocumentScope, s as PageProvider, t as DocumentGate, u as makePageContext, v as useKernelValue, x as usePage, y as useOptionalCapability } from "./runtime-DV98q7I0.js";
2
+ import { A as useAnnotation, C as SelectionProps, D as filePickerProvider, E as TextStyle, F as useSelectionFlags, I as useSelectionProps, L as AnnotationMenuPlacement, M as useAnnotationSelected, N as useAnnotationSelection, O as sameAnchor, P as useFilePickerProvider, S as SelectionFlags, T as TextAlign, _ as PageAnnotationMenu, a as AnnotationLayerProps, b as RenderItem, c as AnnotationProps, d as AnnotationRendererProps, f as Border, g as PageAnnotationDraftMenu, h as LineEndings, i as AnnotationLayer, j as useAnnotationDefaults, k as sameCreationDraftAnchor, l as AnnotationPropsPatch, m as LineEnding, n as AnnotationDraftMenuRenderArgs, o as AnnotationMenuProps, p as Geom, r as AnnotationFlags, s as AnnotationMenuRenderArgs, t as AnnotationDraftMenuProps, u as AnnotationRenderer, v as PropKey, w as Style, x as SelectionAnchor, y as PropSpec } from "./annotation-nUMefyjw.js";
3
+ import { AnnotationDraftMenu, AnnotationMenu } from "./annotation-menu.js";
4
+ import { isMacPlatform, useCommand, useCommandShortcuts, useCommands } from "./commands.js";
5
+ import { FormLayer, FormScriptingUiHandlers, useForm, useFormField, useFormScriptingProvider } from "./form.js";
6
+ import { useI18n, useLocale, useT } from "./i18n.js";
7
+ import { Stage, StageProps, StageTokenProp, useLayout, usePageList, usePages, useStage, useStageSettings, useZoom } from "./stage.js";
8
+ import { Scrollbar, ScrollbarAxis, ScrollbarProps, useScrollMetrics } from "./scrollbar.js";
9
+ import { PageView, PageViewProps } from "./page-view.js";
10
+ import { RenderLayer, RenderLayerProps, TileLayer, TileLayerProps } from "./render.js";
11
+ import { PagePointerSource, ToolCursorImage, ToolCursorSpec, createClickCounter, useTool, useToolCursor } from "./interaction.js";
12
+ import { SelectionLayer, SelectionLayerProps, useSelection } from "./selection.js";
13
+ import { LinkLayer, LinkLayerProps, useLink } from "./link.js";
14
+ import { UseViews, useViews } from "./views.js";
15
+ import { usePageEditor } from "./page-edit.js";
16
+ import { useMetadata } from "./metadata.js";
17
+ import { usePendingRedactions, useRedaction } from "./redaction.js";
18
+ import { SearchLayer, useSearch, useSearchState } from "./search.js";
19
+ import { useArmStampAsset, useStamp, useStampAssetPreviewUrl, useStampAssets, useStampLibraries } from "./stamp.js";
20
+ import { MenusHandle, SurfaceHandle, useMenus, useShell, useSurface } from "./shell.js";
21
+ import { CollapsedGroupView, CustomSlotCtx, GroupDisclosureView, OverflowMenuView, StripView, StripViewGroup, Toolbar, ToolbarProps, useStripView } from "./toolbar.js";
22
+ export * from "@embedpdf/core";
23
+ export * from "@embedpdf/plugin-stage";
24
+ export * from "@embedpdf/plugin-interaction";
25
+ export * from "@embedpdf/plugin-render";
26
+ export * from "@embedpdf/plugin-selection";
27
+ export * from "@embedpdf/plugin-annotation";
28
+ export * from "@embedpdf/plugin-link";
29
+ export * from "@embedpdf/plugin-view-manager";
30
+ export * from "@embedpdf/plugin-page-edit";
31
+ export * from "@embedpdf/plugin-metadata";
32
+ export * from "@embedpdf/plugin-redaction";
33
+ export * from "@embedpdf/plugin-stamp";
34
+ export * from "@embedpdf/plugin-commands";
35
+ export * from "@embedpdf/plugin-shell";
36
+ export * from "@embedpdf/core-ui";
37
+ export { AnnotationDraftMenu, AnnotationDraftMenuProps, AnnotationDraftMenuRenderArgs, type AnnotationFlags, AnnotationLayer, AnnotationLayerProps, AnnotationMenu, type AnnotationMenuPlacement, AnnotationMenuProps, AnnotationMenuRenderArgs, type AnnotationProps, type AnnotationPropsPatch, AnnotationRenderer, AnnotationRendererProps, type Border, CollapsedGroupView, CustomSlotCtx, DocumentGate, DocumentGateProps, DocumentScope, DocumentScopeProps, EmbedPDF, FormLayer, type FormScriptingUiHandlers, type Geom, GroupDisclosureView, type LineEnding, type LineEndings, LinkLayer, LinkLayerProps, MenusHandle, OverflowMenuView, PageAnnotationDraftMenu, PageAnnotationMenu, PageContextValue, PagePointerSource, PageProvider, PageView, PageViewProps, type PropKey, type PropSpec, type RenderItem, RenderLayer, RenderLayerProps, Scrollbar, ScrollbarAxis, ScrollbarProps, SearchLayer, SelectionAnchor, type SelectionFlags, SelectionLayer, SelectionLayerProps, type SelectionProps, Stage, StageProps, StageTokenProp, StripView, StripViewGroup, type Style, SurfaceHandle, type TextAlign, type TextStyle, TileLayer, TileLayerProps, ToolCursorImage, ToolCursorSpec, Toolbar, ToolbarProps, UseViews, Viewer, ViewerProps, createClickCounter, filePickerProvider, isMacPlatform, makePageContext, sameAnchor, sameCreationDraftAnchor, shallowArray, useActiveDocumentId, useAnnotation, useAnnotationDefaults, useAnnotationSelected, useAnnotationSelection, useArmStampAsset, useCapability, useCommand, useCommandShortcuts, useCommands, useDocumentId, useDocumentStatus, useDocuments, useFilePickerProvider, useForm, useFormField, useFormScriptingProvider, useI18n, useKernel, useKernelValue, useLayout, useLink, useLocale, useMenus, useMetadata, useOptionalCapability, useOptionalSelector, usePage, usePageEditor, usePageList, usePages, usePendingRedactions, useRedaction, useScrollMetrics, useSearch, useSearchState, useSelection, useSelectionFlags, useSelectionProps, useSelector, useShell, useStage, useStageSettings, useStamp, useStampAssetPreviewUrl, useStampAssets, useStampLibraries, useStripView, useSurface, useT, useTool, useToolCursor, useViews, useZoom };
package/dist/index.js ADDED
@@ -0,0 +1,37 @@
1
+ import { DocumentGate, DocumentScope, EmbedPDF, PageProvider, Viewer, makePageContext, shallowArray, useActiveDocumentId, useCapability, useDocumentId, useDocumentStatus, useDocuments, useKernel, useKernelValue, useOptionalCapability, useOptionalSelector, usePage, useSelector } from "./runtime.js";
2
+ import { PagePointerSource, createClickCounter, useTool, useToolCursor } from "./interaction.js";
3
+ import { Stage, useLayout, usePageList, usePages, useStage, useStageSettings, useZoom } from "./stage.js";
4
+ import { Scrollbar, useScrollMetrics } from "./scrollbar.js";
5
+ import { PageView } from "./page-view.js";
6
+ import { RenderLayer, TileLayer } from "./render.js";
7
+ import { SelectionLayer, useSelection } from "./selection.js";
8
+ import { a as sameAnchor, c as useAnnotationDefaults, d as useFilePickerProvider, f as useSelectionFlags, i as filePickerProvider, l as useAnnotationSelected, n as PageAnnotationDraftMenu, o as sameCreationDraftAnchor, p as useSelectionProps, r as PageAnnotationMenu, s as useAnnotation, t as AnnotationLayer, u as useAnnotationSelection } from "./annotation-DjGWJljY.js";
9
+ import { AnnotationDraftMenu, AnnotationMenu } from "./annotation-menu.js";
10
+ import { LinkLayer, useLink } from "./link.js";
11
+ import { useViews } from "./views.js";
12
+ import { usePageEditor } from "./page-edit.js";
13
+ import { useMetadata } from "./metadata.js";
14
+ import { usePendingRedactions, useRedaction } from "./redaction.js";
15
+ import { FormLayer, useForm, useFormField, useFormScriptingProvider } from "./form.js";
16
+ import { SearchLayer, useSearch, useSearchState } from "./search.js";
17
+ import { useArmStampAsset, useStamp, useStampAssetPreviewUrl, useStampAssets, useStampLibraries } from "./stamp.js";
18
+ import { useI18n, useLocale, useT } from "./i18n.js";
19
+ import { isMacPlatform, useCommand, useCommandShortcuts, useCommands } from "./commands.js";
20
+ import { useMenus, useShell, useSurface } from "./shell.js";
21
+ import { Toolbar, useStripView } from "./toolbar.js";
22
+ export * from "@embedpdf/core";
23
+ export * from "@embedpdf/plugin-stage";
24
+ export * from "@embedpdf/plugin-interaction";
25
+ export * from "@embedpdf/plugin-render";
26
+ export * from "@embedpdf/plugin-selection";
27
+ export * from "@embedpdf/plugin-annotation";
28
+ export * from "@embedpdf/plugin-link";
29
+ export * from "@embedpdf/plugin-view-manager";
30
+ export * from "@embedpdf/plugin-page-edit";
31
+ export * from "@embedpdf/plugin-metadata";
32
+ export * from "@embedpdf/plugin-redaction";
33
+ export * from "@embedpdf/plugin-stamp";
34
+ export * from "@embedpdf/plugin-commands";
35
+ export * from "@embedpdf/plugin-shell";
36
+ export * from "@embedpdf/core-ui";
37
+ export { AnnotationDraftMenu, AnnotationLayer, AnnotationMenu, DocumentGate, DocumentScope, EmbedPDF, FormLayer, LinkLayer, PageAnnotationDraftMenu, PageAnnotationMenu, PagePointerSource, PageProvider, PageView, RenderLayer, Scrollbar, SearchLayer, SelectionLayer, Stage, TileLayer, Toolbar, Viewer, createClickCounter, filePickerProvider, isMacPlatform, makePageContext, sameAnchor, sameCreationDraftAnchor, shallowArray, useActiveDocumentId, useAnnotation, useAnnotationDefaults, useAnnotationSelected, useAnnotationSelection, useArmStampAsset, useCapability, useCommand, useCommandShortcuts, useCommands, useDocumentId, useDocumentStatus, useDocuments, useFilePickerProvider, useForm, useFormField, useFormScriptingProvider, useI18n, useKernel, useKernelValue, useLayout, useLink, useLocale, useMenus, useMetadata, useOptionalCapability, useOptionalSelector, usePage, usePageEditor, usePageList, usePages, usePendingRedactions, useRedaction, useScrollMetrics, useSearch, useSearchState, useSelection, useSelectionFlags, useSelectionProps, useSelector, useShell, useStage, useStageSettings, useStamp, useStampAssetPreviewUrl, useStampAssets, useStampLibraries, useStripView, useSurface, useT, useTool, useToolCursor, useViews, useZoom };