@paprize/react 0.0.3 → 0.0.4
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/paprize-react.d.ts +5 -4
- package/dist/paprize-react.js +672 -1447
- package/dist/paprize-react.js.map +1 -0
- package/dist/paprize-react.umd.cjs +12 -5
- package/dist/paprize-react.umd.cjs.map +1 -0
- package/package.json +1 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paprize-react.umd.cjs","sources":["../src/components/useStyle.tsx","../src/components/ReportPreview.tsx","../../../node_modules/jotai/esm/vanilla/internals.mjs","../../../node_modules/jotai/esm/vanilla.mjs","../../../node_modules/jotai/esm/react.mjs","../src/components/store.ts","../src/components/ReportStatus.tsx","../src/components/ReportRoot.tsx","../src/components/PageContent.tsx","../src/components/PageFooter.tsx","../src/components/PageHeader.tsx","../src/components/SectionFooter.tsx","../src/components/SectionHeader.tsx","../src/components/PageOverlay.tsx","../../../node_modules/loglevel/lib/loglevel.js","../src/components/parseSectionChildren.ts","../src/components/Section.utilities.ts","../src/components/PageContext.ts","../src/components/Page.utilities.ts","../src/components/SectionContext.ts","../src/components/Page.tsx","../src/components/usePagination.utilities.ts","../../../node_modules/jotai/esm/react/utils.mjs","../src/components/useSectionInfo.ts","../src/components/useIsSectionSuspendedCallback.ts","../src/components/useSetSectionInfo.ts","../src/components/usePagination.ts","../src/components/SectionLayout.tsx","../src/components/Section.tsx","../src/components/PageBreak.tsx","../src/components/Layout.tsx","../src/components/usePageInfo.ts","../src/components/useReportInfo.ts","../src/components/useSectionSuspension.ts","../src/components/useSuspenseForPromise.ts","../src/components/useJsonData.ts","../src/pageConst.ts"],"sourcesContent":["import { useInsertionEffect } from 'react';\n\nexport function useStyle(css: string) {\n useInsertionEffect(() => {\n const style = document.createElement('style');\n style.textContent = css;\n document.head.appendChild(style);\n return () => style.remove();\n }, [css]);\n}\n","import type { ReactNode } from 'react';\nimport { useStyle } from './useStyle';\n\nconst className = 'paprize-preview';\nconst globalStyles = `\n :root {\n --paprize-page-background-color: #ffffff;\n --paprize-page-margin-bottom: 10px;\n --paprize-page-box-shadow: rgb(142 138 138) -1px 3px 5px 2px;\n --paprize-section-margin-bottom: 10px;\n --paprize-preview-background-color: rgb(218 220 224);\n --paprize-preview-padding: 30px 10px;\n }\n\n body {\n margin: 0;\n }\n\n @media screen {\n .${className} {\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n background-color: var(--paprize-preview-background-color);\n padding: var(--paprize-preview-padding);\n }\n\n .paprize-page {\n box-shadow: var(--paprize-page-box-shadow);\n margin-bottom: var(--paprize-page-margin-bottom);\n background-color: var(--paprize-page-background-color);\n }\n\n .paprize-section {\n margin-bottom: var(--paprize-section-margin-bottom);\n }\n }\n\n @media print {\n html *:not(.${className}):not(.${className} *):not(:has(.${className})) {\n display: none !important;\n }\n } \n`;\n\n/**\n * ReportPreview is a wrapper component that applies styles to its children, mimicking the appearance of the Chrome Print Preview screen.\n * Use this component to render reports or documents with a print-friendly layout and consistent visual formatting in client side application.\n */\nexport function ReportPreview({ children }: { children: ReactNode }) {\n useStyle(globalStyles);\n return <div className={className}>{children}</div>;\n}\n","function isSelfAtom(atom, a) {\n return atom.unstable_is ? atom.unstable_is(a) : a === atom;\n}\nfunction hasInitialValue(atom) {\n return \"init\" in atom;\n}\nfunction isActuallyWritableAtom(atom) {\n return !!atom.write;\n}\nfunction isAtomStateInitialized(atomState) {\n return \"v\" in atomState || \"e\" in atomState;\n}\nfunction returnAtomValue(atomState) {\n if (\"e\" in atomState) {\n throw atomState.e;\n }\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"v\" in atomState)) {\n throw new Error(\"[Bug] atom state is not initialized\");\n }\n return atomState.v;\n}\nconst promiseStateMap = /* @__PURE__ */ new WeakMap();\nfunction isPendingPromise(value) {\n var _a;\n return isPromiseLike(value) && !!((_a = promiseStateMap.get(value)) == null ? void 0 : _a[0]);\n}\nfunction abortPromise(promise) {\n const promiseState = promiseStateMap.get(promise);\n if (promiseState == null ? void 0 : promiseState[0]) {\n promiseState[0] = false;\n promiseState[1].forEach((fn) => fn());\n }\n}\nfunction registerAbortHandler(promise, abortHandler) {\n let promiseState = promiseStateMap.get(promise);\n if (!promiseState) {\n promiseState = [true, /* @__PURE__ */ new Set()];\n promiseStateMap.set(promise, promiseState);\n const settle = () => {\n promiseState[0] = false;\n };\n promise.then(settle, settle);\n }\n promiseState[1].add(abortHandler);\n}\nfunction isPromiseLike(p) {\n return typeof (p == null ? void 0 : p.then) === \"function\";\n}\nfunction addPendingPromiseToDependency(atom, promise, dependencyAtomState) {\n if (!dependencyAtomState.p.has(atom)) {\n dependencyAtomState.p.add(atom);\n const cleanup = () => dependencyAtomState.p.delete(atom);\n promise.then(cleanup, cleanup);\n }\n}\nfunction getMountedOrPendingDependents(atom, atomState, mountedMap) {\n var _a;\n const dependents = /* @__PURE__ */ new Set();\n for (const a of ((_a = mountedMap.get(atom)) == null ? void 0 : _a.t) || []) {\n if (mountedMap.has(a)) {\n dependents.add(a);\n }\n }\n for (const atomWithPendingPromise of atomState.p) {\n dependents.add(atomWithPendingPromise);\n }\n return dependents;\n}\nconst createStoreHook = () => {\n const callbacks = /* @__PURE__ */ new Set();\n const notify = () => callbacks.forEach((fn) => fn());\n notify.add = (fn) => {\n callbacks.add(fn);\n return () => callbacks.delete(fn);\n };\n return notify;\n};\nconst createStoreHookForAtoms = () => {\n const all = {};\n const callbacks = /* @__PURE__ */ new WeakMap();\n const notify = (atom) => {\n var _a, _b;\n (_a = callbacks.get(all)) == null ? void 0 : _a.forEach((fn) => fn(atom));\n (_b = callbacks.get(atom)) == null ? void 0 : _b.forEach((fn) => fn());\n };\n notify.add = (atom, fn) => {\n const key = atom || all;\n const fns = (callbacks.has(key) ? callbacks : callbacks.set(key, /* @__PURE__ */ new Set())).get(key);\n fns.add(fn);\n return () => {\n fns == null ? void 0 : fns.delete(fn);\n if (!fns.size) {\n callbacks.delete(key);\n }\n };\n };\n return notify;\n};\nfunction initializeStoreHooks(storeHooks) {\n storeHooks.c || (storeHooks.c = createStoreHookForAtoms());\n storeHooks.m || (storeHooks.m = createStoreHookForAtoms());\n storeHooks.u || (storeHooks.u = createStoreHookForAtoms());\n storeHooks.f || (storeHooks.f = createStoreHook());\n return storeHooks;\n}\nconst atomRead = (_store, atom, ...params) => atom.read(...params);\nconst atomWrite = (_store, atom, ...params) => atom.write(...params);\nconst atomOnInit = (store, atom) => {\n var _a;\n return (_a = atom.unstable_onInit) == null ? void 0 : _a.call(atom, store);\n};\nconst atomOnMount = (_store, atom, setAtom) => {\n var _a;\n return (_a = atom.onMount) == null ? void 0 : _a.call(atom, setAtom);\n};\nconst ensureAtomState = (store, atom) => {\n const buildingBlocks = getBuildingBlocks(store);\n const atomStateMap = buildingBlocks[0];\n const atomOnInit2 = buildingBlocks[9];\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !atom) {\n throw new Error(\"Atom is undefined or null\");\n }\n let atomState = atomStateMap.get(atom);\n if (!atomState) {\n atomState = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 };\n atomStateMap.set(atom, atomState);\n atomOnInit2 == null ? void 0 : atomOnInit2(store, atom);\n }\n return atomState;\n};\nconst flushCallbacks = (store) => {\n const buildingBlocks = getBuildingBlocks(store);\n const mountedMap = buildingBlocks[1];\n const changedAtoms = buildingBlocks[3];\n const mountCallbacks = buildingBlocks[4];\n const unmountCallbacks = buildingBlocks[5];\n const storeHooks = buildingBlocks[6];\n const recomputeInvalidatedAtoms2 = buildingBlocks[13];\n const errors = [];\n const call = (fn) => {\n try {\n fn();\n } catch (e) {\n errors.push(e);\n }\n };\n do {\n if (storeHooks.f) {\n call(storeHooks.f);\n }\n const callbacks = /* @__PURE__ */ new Set();\n const add = callbacks.add.bind(callbacks);\n changedAtoms.forEach((atom) => {\n var _a;\n return (_a = mountedMap.get(atom)) == null ? void 0 : _a.l.forEach(add);\n });\n changedAtoms.clear();\n unmountCallbacks.forEach(add);\n unmountCallbacks.clear();\n mountCallbacks.forEach(add);\n mountCallbacks.clear();\n callbacks.forEach(call);\n if (changedAtoms.size) {\n recomputeInvalidatedAtoms2(store);\n }\n } while (changedAtoms.size || unmountCallbacks.size || mountCallbacks.size);\n if (errors.length) {\n throw new AggregateError(errors);\n }\n};\nconst recomputeInvalidatedAtoms = (store) => {\n const buildingBlocks = getBuildingBlocks(store);\n const mountedMap = buildingBlocks[1];\n const invalidatedAtoms = buildingBlocks[2];\n const changedAtoms = buildingBlocks[3];\n const ensureAtomState2 = buildingBlocks[11];\n const readAtomState2 = buildingBlocks[14];\n const mountDependencies2 = buildingBlocks[17];\n const topSortedReversed = [];\n const visiting = /* @__PURE__ */ new WeakSet();\n const visited = /* @__PURE__ */ new WeakSet();\n const stack = Array.from(changedAtoms);\n while (stack.length) {\n const a = stack[stack.length - 1];\n const aState = ensureAtomState2(store, a);\n if (visited.has(a)) {\n stack.pop();\n continue;\n }\n if (visiting.has(a)) {\n if (invalidatedAtoms.get(a) === aState.n) {\n topSortedReversed.push([a, aState]);\n } else if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && invalidatedAtoms.has(a)) {\n throw new Error(\"[Bug] invalidated atom exists\");\n }\n visited.add(a);\n stack.pop();\n continue;\n }\n visiting.add(a);\n for (const d of getMountedOrPendingDependents(a, aState, mountedMap)) {\n if (!visiting.has(d)) {\n stack.push(d);\n }\n }\n }\n for (let i = topSortedReversed.length - 1; i >= 0; --i) {\n const [a, aState] = topSortedReversed[i];\n let hasChangedDeps = false;\n for (const dep of aState.d.keys()) {\n if (dep !== a && changedAtoms.has(dep)) {\n hasChangedDeps = true;\n break;\n }\n }\n if (hasChangedDeps) {\n readAtomState2(store, a);\n mountDependencies2(store, a);\n }\n invalidatedAtoms.delete(a);\n }\n};\nconst readAtomState = (store, atom) => {\n var _a;\n const buildingBlocks = getBuildingBlocks(store);\n const mountedMap = buildingBlocks[1];\n const invalidatedAtoms = buildingBlocks[2];\n const changedAtoms = buildingBlocks[3];\n const storeHooks = buildingBlocks[6];\n const atomRead2 = buildingBlocks[7];\n const ensureAtomState2 = buildingBlocks[11];\n const flushCallbacks2 = buildingBlocks[12];\n const recomputeInvalidatedAtoms2 = buildingBlocks[13];\n const readAtomState2 = buildingBlocks[14];\n const writeAtomState2 = buildingBlocks[16];\n const mountDependencies2 = buildingBlocks[17];\n const atomState = ensureAtomState2(store, atom);\n if (isAtomStateInitialized(atomState)) {\n if (mountedMap.has(atom) && invalidatedAtoms.get(atom) !== atomState.n) {\n return atomState;\n }\n if (Array.from(atomState.d).every(\n ([a, n]) => (\n // Recursively, read the atom state of the dependency, and\n // check if the atom epoch number is unchanged\n readAtomState2(store, a).n === n\n )\n )) {\n return atomState;\n }\n }\n atomState.d.clear();\n let isSync = true;\n function mountDependenciesIfAsync() {\n if (mountedMap.has(atom)) {\n mountDependencies2(store, atom);\n recomputeInvalidatedAtoms2(store);\n flushCallbacks2(store);\n }\n }\n function getter(a) {\n var _a2;\n if (isSelfAtom(atom, a)) {\n const aState2 = ensureAtomState2(store, a);\n if (!isAtomStateInitialized(aState2)) {\n if (hasInitialValue(a)) {\n setAtomStateValueOrPromise(store, a, a.init);\n } else {\n throw new Error(\"no atom init\");\n }\n }\n return returnAtomValue(aState2);\n }\n const aState = readAtomState2(store, a);\n try {\n return returnAtomValue(aState);\n } finally {\n atomState.d.set(a, aState.n);\n if (isPendingPromise(atomState.v)) {\n addPendingPromiseToDependency(atom, atomState.v, aState);\n }\n (_a2 = mountedMap.get(a)) == null ? void 0 : _a2.t.add(atom);\n if (!isSync) {\n mountDependenciesIfAsync();\n }\n }\n }\n let controller;\n let setSelf;\n const options = {\n get signal() {\n if (!controller) {\n controller = new AbortController();\n }\n return controller.signal;\n },\n get setSelf() {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !isActuallyWritableAtom(atom)) {\n console.warn(\"setSelf function cannot be used with read-only atom\");\n }\n if (!setSelf && isActuallyWritableAtom(atom)) {\n setSelf = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && isSync) {\n console.warn(\"setSelf function cannot be called in sync\");\n }\n if (!isSync) {\n try {\n return writeAtomState2(store, atom, ...args);\n } finally {\n recomputeInvalidatedAtoms2(store);\n flushCallbacks2(store);\n }\n }\n };\n }\n return setSelf;\n }\n };\n const prevEpochNumber = atomState.n;\n try {\n const valueOrPromise = atomRead2(store, atom, getter, options);\n setAtomStateValueOrPromise(store, atom, valueOrPromise);\n if (isPromiseLike(valueOrPromise)) {\n registerAbortHandler(valueOrPromise, () => controller == null ? void 0 : controller.abort());\n valueOrPromise.then(mountDependenciesIfAsync, mountDependenciesIfAsync);\n }\n return atomState;\n } catch (error) {\n delete atomState.v;\n atomState.e = error;\n ++atomState.n;\n return atomState;\n } finally {\n isSync = false;\n if (prevEpochNumber !== atomState.n && invalidatedAtoms.get(atom) === prevEpochNumber) {\n invalidatedAtoms.set(atom, atomState.n);\n changedAtoms.add(atom);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, atom);\n }\n }\n};\nconst invalidateDependents = (store, atom) => {\n const buildingBlocks = getBuildingBlocks(store);\n const mountedMap = buildingBlocks[1];\n const invalidatedAtoms = buildingBlocks[2];\n const ensureAtomState2 = buildingBlocks[11];\n const stack = [atom];\n while (stack.length) {\n const a = stack.pop();\n const aState = ensureAtomState2(store, a);\n for (const d of getMountedOrPendingDependents(a, aState, mountedMap)) {\n const dState = ensureAtomState2(store, d);\n invalidatedAtoms.set(d, dState.n);\n stack.push(d);\n }\n }\n};\nconst writeAtomState = (store, atom, ...args) => {\n const buildingBlocks = getBuildingBlocks(store);\n const changedAtoms = buildingBlocks[3];\n const storeHooks = buildingBlocks[6];\n const atomWrite2 = buildingBlocks[8];\n const ensureAtomState2 = buildingBlocks[11];\n const flushCallbacks2 = buildingBlocks[12];\n const recomputeInvalidatedAtoms2 = buildingBlocks[13];\n const readAtomState2 = buildingBlocks[14];\n const invalidateDependents2 = buildingBlocks[15];\n const mountDependencies2 = buildingBlocks[17];\n let isSync = true;\n const getter = (a) => returnAtomValue(readAtomState2(store, a));\n const setter = (a, ...args2) => {\n var _a;\n const aState = ensureAtomState2(store, a);\n try {\n if (isSelfAtom(atom, a)) {\n if (!hasInitialValue(a)) {\n throw new Error(\"atom not writable\");\n }\n const prevEpochNumber = aState.n;\n const v = args2[0];\n setAtomStateValueOrPromise(store, a, v);\n mountDependencies2(store, a);\n if (prevEpochNumber !== aState.n) {\n changedAtoms.add(a);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, a);\n invalidateDependents2(store, a);\n }\n return void 0;\n } else {\n return writeAtomState(store, a, ...args2);\n }\n } finally {\n if (!isSync) {\n recomputeInvalidatedAtoms2(store);\n flushCallbacks2(store);\n }\n }\n };\n try {\n return atomWrite2(store, atom, getter, setter, ...args);\n } finally {\n isSync = false;\n }\n};\nconst mountDependencies = (store, atom) => {\n var _a;\n const buildingBlocks = getBuildingBlocks(store);\n const mountedMap = buildingBlocks[1];\n const changedAtoms = buildingBlocks[3];\n const storeHooks = buildingBlocks[6];\n const ensureAtomState2 = buildingBlocks[11];\n const invalidateDependents2 = buildingBlocks[15];\n const mountAtom2 = buildingBlocks[18];\n const unmountAtom2 = buildingBlocks[19];\n const atomState = ensureAtomState2(store, atom);\n const mounted = mountedMap.get(atom);\n if (mounted && !isPendingPromise(atomState.v)) {\n for (const [a, n] of atomState.d) {\n if (!mounted.d.has(a)) {\n const aState = ensureAtomState2(store, a);\n const aMounted = mountAtom2(store, a);\n aMounted.t.add(atom);\n mounted.d.add(a);\n if (n !== aState.n) {\n changedAtoms.add(a);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, a);\n invalidateDependents2(store, a);\n }\n }\n }\n for (const a of mounted.d || []) {\n if (!atomState.d.has(a)) {\n mounted.d.delete(a);\n const aMounted = unmountAtom2(store, a);\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n }\n }\n};\nconst mountAtom = (store, atom) => {\n var _a;\n const buildingBlocks = getBuildingBlocks(store);\n const mountedMap = buildingBlocks[1];\n const mountCallbacks = buildingBlocks[4];\n const storeHooks = buildingBlocks[6];\n const atomOnMount2 = buildingBlocks[10];\n const ensureAtomState2 = buildingBlocks[11];\n const flushCallbacks2 = buildingBlocks[12];\n const recomputeInvalidatedAtoms2 = buildingBlocks[13];\n const readAtomState2 = buildingBlocks[14];\n const writeAtomState2 = buildingBlocks[16];\n const atomState = ensureAtomState2(store, atom);\n let mounted = mountedMap.get(atom);\n if (!mounted) {\n readAtomState2(store, atom);\n for (const a of atomState.d.keys()) {\n const aMounted = mountAtom(store, a);\n aMounted.t.add(atom);\n }\n mounted = {\n l: /* @__PURE__ */ new Set(),\n d: new Set(atomState.d.keys()),\n t: /* @__PURE__ */ new Set()\n };\n mountedMap.set(atom, mounted);\n (_a = storeHooks.m) == null ? void 0 : _a.call(storeHooks, atom);\n if (isActuallyWritableAtom(atom)) {\n const processOnMount = () => {\n let isSync = true;\n const setAtom = (...args) => {\n try {\n return writeAtomState2(store, atom, ...args);\n } finally {\n if (!isSync) {\n recomputeInvalidatedAtoms2(store);\n flushCallbacks2(store);\n }\n }\n };\n try {\n const onUnmount = atomOnMount2(store, atom, setAtom);\n if (onUnmount) {\n mounted.u = () => {\n isSync = true;\n try {\n onUnmount();\n } finally {\n isSync = false;\n }\n };\n }\n } finally {\n isSync = false;\n }\n };\n mountCallbacks.add(processOnMount);\n }\n }\n return mounted;\n};\nconst unmountAtom = (store, atom) => {\n var _a;\n const buildingBlocks = getBuildingBlocks(store);\n const mountedMap = buildingBlocks[1];\n const unmountCallbacks = buildingBlocks[5];\n const storeHooks = buildingBlocks[6];\n const ensureAtomState2 = buildingBlocks[11];\n const unmountAtom2 = buildingBlocks[19];\n const atomState = ensureAtomState2(store, atom);\n let mounted = mountedMap.get(atom);\n if (mounted && !mounted.l.size && !Array.from(mounted.t).some((a) => {\n var _a2;\n return (_a2 = mountedMap.get(a)) == null ? void 0 : _a2.d.has(atom);\n })) {\n if (mounted.u) {\n unmountCallbacks.add(mounted.u);\n }\n mounted = void 0;\n mountedMap.delete(atom);\n (_a = storeHooks.u) == null ? void 0 : _a.call(storeHooks, atom);\n for (const a of atomState.d.keys()) {\n const aMounted = unmountAtom2(store, a);\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n return void 0;\n }\n return mounted;\n};\nconst setAtomStateValueOrPromise = (store, atom, valueOrPromise) => {\n const ensureAtomState2 = getBuildingBlocks(store)[11];\n const atomState = ensureAtomState2(store, atom);\n const hasPrevValue = \"v\" in atomState;\n const prevValue = atomState.v;\n if (isPromiseLike(valueOrPromise)) {\n for (const a of atomState.d.keys()) {\n addPendingPromiseToDependency(\n atom,\n valueOrPromise,\n ensureAtomState2(store, a)\n );\n }\n }\n atomState.v = valueOrPromise;\n delete atomState.e;\n if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {\n ++atomState.n;\n if (isPromiseLike(prevValue)) {\n abortPromise(prevValue);\n }\n }\n};\nconst storeGet = (store, atom) => {\n const readAtomState2 = getBuildingBlocks(store)[14];\n return returnAtomValue(readAtomState2(store, atom));\n};\nconst storeSet = (store, atom, ...args) => {\n const buildingBlocks = getBuildingBlocks(store);\n const flushCallbacks2 = buildingBlocks[12];\n const recomputeInvalidatedAtoms2 = buildingBlocks[13];\n const writeAtomState2 = buildingBlocks[16];\n try {\n return writeAtomState2(store, atom, ...args);\n } finally {\n recomputeInvalidatedAtoms2(store);\n flushCallbacks2(store);\n }\n};\nconst storeSub = (store, atom, listener) => {\n const buildingBlocks = getBuildingBlocks(store);\n const flushCallbacks2 = buildingBlocks[12];\n const mountAtom2 = buildingBlocks[18];\n const unmountAtom2 = buildingBlocks[19];\n const mounted = mountAtom2(store, atom);\n const listeners = mounted.l;\n listeners.add(listener);\n flushCallbacks2(store);\n return () => {\n listeners.delete(listener);\n unmountAtom2(store, atom);\n flushCallbacks2(store);\n };\n};\nconst buildingBlockMap = /* @__PURE__ */ new WeakMap();\nfunction getBuildingBlocks(store) {\n const buildingBlocks = buildingBlockMap.get(store);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !buildingBlocks) {\n throw new Error(\n \"Store must be created by buildStore to read its building blocks\"\n );\n }\n return buildingBlocks;\n}\nfunction buildStore(...buildArgs) {\n const store = {\n get(atom) {\n const storeGet2 = getBuildingBlocks(store)[21];\n return storeGet2(store, atom);\n },\n set(atom, ...args) {\n const storeSet2 = getBuildingBlocks(store)[22];\n return storeSet2(store, atom, ...args);\n },\n sub(atom, listener) {\n const storeSub2 = getBuildingBlocks(store)[23];\n return storeSub2(store, atom, listener);\n }\n };\n const buildingBlocks = [\n // store state\n /* @__PURE__ */ new WeakMap(),\n // atomStateMap\n /* @__PURE__ */ new WeakMap(),\n // mountedMap\n /* @__PURE__ */ new WeakMap(),\n // invalidatedAtoms\n /* @__PURE__ */ new Set(),\n // changedAtoms\n /* @__PURE__ */ new Set(),\n // mountCallbacks\n /* @__PURE__ */ new Set(),\n // unmountCallbacks\n {},\n // storeHooks\n // atom interceptors\n atomRead,\n atomWrite,\n atomOnInit,\n atomOnMount,\n // building-block functions\n ensureAtomState,\n flushCallbacks,\n recomputeInvalidatedAtoms,\n readAtomState,\n invalidateDependents,\n writeAtomState,\n mountDependencies,\n mountAtom,\n unmountAtom,\n setAtomStateValueOrPromise,\n storeGet,\n storeSet,\n storeSub\n ].map((fn, i) => buildArgs[i] || fn);\n buildingBlockMap.set(store, Object.freeze(buildingBlocks));\n return store;\n}\n\nexport { abortPromise as INTERNAL_abortPromise, addPendingPromiseToDependency as INTERNAL_addPendingPromiseToDependency, buildStore as INTERNAL_buildStoreRev2, getBuildingBlocks as INTERNAL_getBuildingBlocksRev2, getMountedOrPendingDependents as INTERNAL_getMountedOrPendingDependents, hasInitialValue as INTERNAL_hasInitialValue, initializeStoreHooks as INTERNAL_initializeStoreHooksRev2, isActuallyWritableAtom as INTERNAL_isActuallyWritableAtom, isAtomStateInitialized as INTERNAL_isAtomStateInitialized, isPendingPromise as INTERNAL_isPendingPromise, isPromiseLike as INTERNAL_isPromiseLike, isSelfAtom as INTERNAL_isSelfAtom, promiseStateMap as INTERNAL_promiseStateMap, registerAbortHandler as INTERNAL_registerAbortHandler, returnAtomValue as INTERNAL_returnAtomValue };\n","import { INTERNAL_buildStoreRev2 } from 'jotai/vanilla/internals';\n\nlet keyCount = 0;\nfunction atom(read, write) {\n const key = `atom${++keyCount}`;\n const config = {\n toString() {\n return (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && this.debugLabel ? key + \":\" + this.debugLabel : key;\n }\n };\n if (typeof read === \"function\") {\n config.read = read;\n } else {\n config.init = read;\n config.read = defaultRead;\n config.write = defaultWrite;\n }\n if (write) {\n config.write = write;\n }\n return config;\n}\nfunction defaultRead(get) {\n return get(this);\n}\nfunction defaultWrite(get, set, arg) {\n return set(\n this,\n typeof arg === \"function\" ? arg(get(this)) : arg\n );\n}\n\nlet overiddenCreateStore;\nfunction INTERNAL_overrideCreateStore(fn) {\n overiddenCreateStore = fn(overiddenCreateStore);\n}\nfunction createStore() {\n if (overiddenCreateStore) {\n return overiddenCreateStore();\n }\n return INTERNAL_buildStoreRev2();\n}\nlet defaultStore;\nfunction getDefaultStore() {\n if (!defaultStore) {\n defaultStore = createStore();\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = defaultStore);\n if (globalThis.__JOTAI_DEFAULT_STORE__ !== defaultStore) {\n console.warn(\n \"Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044\"\n );\n }\n }\n }\n return defaultStore;\n}\n\nexport { INTERNAL_overrideCreateStore, atom, createStore, getDefaultStore };\n","'use client';\nimport React, { createContext, useContext, useRef, createElement, useReducer, useEffect, useDebugValue, useCallback } from 'react';\nimport { getDefaultStore, createStore } from 'jotai/vanilla';\nimport { INTERNAL_registerAbortHandler } from 'jotai/vanilla/internals';\n\nconst StoreContext = createContext(\n void 0\n);\nfunction useStore(options) {\n const store = useContext(StoreContext);\n return (options == null ? void 0 : options.store) || store || getDefaultStore();\n}\nfunction Provider({\n children,\n store\n}) {\n const storeRef = useRef(void 0);\n if (!store && !storeRef.current) {\n storeRef.current = createStore();\n }\n return createElement(\n StoreContext.Provider,\n {\n value: store || storeRef.current\n },\n children\n );\n}\n\nconst isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === \"function\";\nconst attachPromiseStatus = (promise) => {\n if (!promise.status) {\n promise.status = \"pending\";\n promise.then(\n (v) => {\n promise.status = \"fulfilled\";\n promise.value = v;\n },\n (e) => {\n promise.status = \"rejected\";\n promise.reason = e;\n }\n );\n }\n};\nconst use = React.use || // A shim for older React versions\n((promise) => {\n if (promise.status === \"pending\") {\n throw promise;\n } else if (promise.status === \"fulfilled\") {\n return promise.value;\n } else if (promise.status === \"rejected\") {\n throw promise.reason;\n } else {\n attachPromiseStatus(promise);\n throw promise;\n }\n});\nconst continuablePromiseMap = /* @__PURE__ */ new WeakMap();\nconst createContinuablePromise = (promise, getValue) => {\n let continuablePromise = continuablePromiseMap.get(promise);\n if (!continuablePromise) {\n continuablePromise = new Promise((resolve, reject) => {\n let curr = promise;\n const onFulfilled = (me) => (v) => {\n if (curr === me) {\n resolve(v);\n }\n };\n const onRejected = (me) => (e) => {\n if (curr === me) {\n reject(e);\n }\n };\n const onAbort = () => {\n try {\n const nextValue = getValue();\n if (isPromiseLike(nextValue)) {\n continuablePromiseMap.set(nextValue, continuablePromise);\n curr = nextValue;\n nextValue.then(onFulfilled(nextValue), onRejected(nextValue));\n INTERNAL_registerAbortHandler(nextValue, onAbort);\n } else {\n resolve(nextValue);\n }\n } catch (e) {\n reject(e);\n }\n };\n promise.then(onFulfilled(promise), onRejected(promise));\n INTERNAL_registerAbortHandler(promise, onAbort);\n });\n continuablePromiseMap.set(promise, continuablePromise);\n }\n return continuablePromise;\n};\nfunction useAtomValue(atom, options) {\n const { delay, unstable_promiseStatus: promiseStatus = !React.use } = options || {};\n const store = useStore(options);\n const [[valueFromReducer, storeFromReducer, atomFromReducer], rerender] = useReducer(\n (prev) => {\n const nextValue = store.get(atom);\n if (Object.is(prev[0], nextValue) && prev[1] === store && prev[2] === atom) {\n return prev;\n }\n return [nextValue, store, atom];\n },\n void 0,\n () => [store.get(atom), store, atom]\n );\n let value = valueFromReducer;\n if (storeFromReducer !== store || atomFromReducer !== atom) {\n rerender();\n value = store.get(atom);\n }\n useEffect(() => {\n const unsub = store.sub(atom, () => {\n if (promiseStatus) {\n try {\n const value2 = store.get(atom);\n if (isPromiseLike(value2)) {\n attachPromiseStatus(\n createContinuablePromise(value2, () => store.get(atom))\n );\n }\n } catch (e) {\n }\n }\n if (typeof delay === \"number\") {\n setTimeout(rerender, delay);\n return;\n }\n rerender();\n });\n rerender();\n return unsub;\n }, [store, atom, delay, promiseStatus]);\n useDebugValue(value);\n if (isPromiseLike(value)) {\n const promise = createContinuablePromise(value, () => store.get(atom));\n if (promiseStatus) {\n attachPromiseStatus(promise);\n }\n return use(promise);\n }\n return value;\n}\n\nfunction useSetAtom(atom, options) {\n const store = useStore(options);\n const setAtom = useCallback(\n (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"write\" in atom)) {\n throw new Error(\"not writable atom\");\n }\n return store.set(atom, ...args);\n },\n [store, atom]\n );\n return setAtom;\n}\n\nfunction useAtom(atom, options) {\n return [\n useAtomValue(atom, options),\n // We do wrong type assertion here, which results in throwing an error.\n useSetAtom(atom, options)\n ];\n}\n\nexport { Provider, useAtom, useAtomValue, useSetAtom, useStore };\n","import { atom, createStore } from 'jotai';\n\nexport const store = createStore();\n\nexport interface SectionState {\n totalPages: number;\n isPaginated: boolean;\n pendingSuspensions: ReadonlySet<string>;\n}\n\nexport interface ReportState {\n totalSections: number;\n isPaginated: boolean;\n}\n\nexport const defaultSectionState: SectionState = {\n totalPages: 0,\n isPaginated: false,\n pendingSuspensions: new Set(),\n};\n\nexport const sectionsAtom = atom<ReadonlyMap<string, SectionState>>(new Map());\nsectionsAtom.debugLabel = 'sectionsAtom';\n\nexport const reportAtom = atom<ReportState>({\n totalSections: 0,\n isPaginated: false,\n});\nreportAtom.debugLabel = 'reportAtom';\n","import { useAtomValue, useSetAtom } from 'jotai';\nimport { useEffect } from 'react';\nimport { paprize_isReady } from '@paprize/core/src';\nimport { reportAtom, sectionsAtom } from './store';\n\nexport function ReportStatus() {\n const setReport = useSetAtom(reportAtom);\n const sections = useAtomValue(sectionsAtom);\n\n useEffect(() => {\n const sectionsLen = sections.size;\n const allSectionsReady = Array.from(sections.values()).every(\n (info) => info.isPaginated\n );\n\n window[paprize_isReady] = allSectionsReady;\n setReport({\n isPaginated: allSectionsReady && sectionsLen > 0,\n totalSections: sectionsLen,\n });\n }, [sections, setReport]);\n\n return null;\n}\n","import { type ReactNode } from 'react';\nimport { Provider } from 'jotai';\nimport { ReportStatus } from './ReportStatus';\nimport { store } from './store';\nimport { useStyle } from './useStyle';\n\nexport interface ReportRootProps {\n children: ReactNode;\n}\n\nconst globalStyles = `\n html {\n box-sizing: border-box;\n }\n\n *,\n *:before,\n *:after {\n box-sizing: inherit;\n }\n\n .paprize-page-component {\n display: flex;\n flex-direction: column;\n }\n`;\n\nexport function ReportRoot({ children }: ReportRootProps) {\n useStyle(globalStyles);\n return (\n <Provider store={store}>\n {children}\n <ReportStatus />\n </Provider>\n );\n}\n","import type { ReactNode } from 'react';\n\nexport function PageContent({ children }: { children: ReactNode }) {\n return <>{children}</>;\n}\n","export function PageFooter({ children }: { children: React.ReactNode }) {\n return <>{children}</>;\n}\n","import type { ReactNode } from 'react';\n\nexport function PageHeader({ children }: { children: ReactNode }) {\n return <>{children}</>;\n}\n","export function SectionFooter({ children }: { children: React.ReactNode }) {\n return <>{children}</>;\n}\n","export function SectionHeader({ children }: { children: React.ReactNode }) {\n return <>{children}</>;\n}\n","import type { ReactNode } from 'react';\n\nexport function PageOverlay({ children }: { children: ReactNode }) {\n return <>{children}</>;\n}\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n var _loggersByName = {};\n var defaultLogger = null;\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods() {\n /*jshint validthis:true */\n var level = this.getLevel();\n\n // Replace the actual methods.\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, this.name);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n\n // Return any important warnings.\n if (typeof console === undefinedType && level < this.levels.SILENT) {\n return \"No console available for logging\";\n }\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, _level, _loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, factory) {\n // Private instance variables.\n var self = this;\n /**\n * The level inherited from a parent logger (or a global default). We\n * cache this here rather than delegating to the parent so that it stays\n * in sync with the actual logging methods that we have installed (the\n * parent could change levels but we might not have rebuilt the loggers\n * in this child yet).\n * @type {number}\n */\n var inheritedLevel;\n /**\n * The default level for this logger, if any. If set, this overrides\n * `inheritedLevel`.\n * @type {number|null}\n */\n var defaultLevel;\n /**\n * A user-specific level for this logger. If set, this overrides\n * `defaultLevel`.\n * @type {number|null}\n */\n var userLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var cookieName = encodeURIComponent(storageKey);\n var location = cookie.indexOf(cookieName + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(\n cookie.slice(location + cookieName.length + 1)\n )[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n function normalizeLevel(input) {\n var level = input;\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n return level;\n } else {\n throw new TypeError(\"log.setLevel() called with invalid level: \" + input);\n }\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n if (userLevel != null) {\n return userLevel;\n } else if (defaultLevel != null) {\n return defaultLevel;\n } else {\n return inheritedLevel;\n }\n };\n\n self.setLevel = function (level, persist) {\n userLevel = normalizeLevel(level);\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(userLevel);\n }\n\n // NOTE: in v2, this should call rebuild(), which updates children.\n return replaceLoggingMethods.call(self);\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = normalizeLevel(level);\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n userLevel = null;\n clearPersistedLevel();\n replaceLoggingMethods.call(self);\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n self.rebuild = function () {\n if (defaultLogger !== self) {\n inheritedLevel = normalizeLevel(defaultLogger.getLevel());\n }\n replaceLoggingMethods.call(self);\n\n if (defaultLogger === self) {\n for (var childName in _loggersByName) {\n _loggersByName[childName].rebuild();\n }\n }\n };\n\n // Initialize all the internal levels.\n inheritedLevel = normalizeLevel(\n defaultLogger ? defaultLogger.getLevel() : \"WARN\"\n );\n var initialLevel = getPersistedLevel();\n if (initialLevel != null) {\n userLevel = normalizeLevel(initialLevel);\n }\n replaceLoggingMethods.call(self);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n defaultLogger = new Logger();\n\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name,\n defaultLogger.methodFactory\n );\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","import {\n Children,\n isValidElement,\n type FC,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { PageContent } from './PageContent';\nimport { PageFooter } from './PageFooter';\nimport { PageHeader } from './PageHeader';\nimport { SectionFooter } from './SectionFooter';\nimport { SectionHeader } from './SectionHeader';\nimport { PageOverlay } from './PageOverlay';\nimport logger from 'loglevel';\n\nconst validChildren: FC<{ children: ReactNode }>[] = [\n PageContent,\n PageHeader,\n PageFooter,\n PageOverlay,\n SectionHeader,\n SectionFooter,\n];\n\nexport interface PageElements {\n content: ReactElement;\n header?: ReactElement;\n footer?: ReactElement;\n overlay?: ReactElement;\n sectionHeader?: ReactElement;\n sectionFooter?: ReactElement;\n}\n\nfunction parseSectionChildren(children: ReactNode): PageElements {\n let content: ReactElement | null = null;\n const pageElements: Partial<PageElements> = {};\n\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) {\n logger.error('Invalid React element found in children', { child });\n throw new Error('Invalid React element found in children');\n }\n\n const component = validChildren.find((x) => x === child.type);\n if (!component) {\n throw Error(\n `Component \"${child.type}\" is not valid as a child for Section, Expected one of: ${validChildren\n .map((x) => x.name)\n .join(',')}`\n );\n }\n\n switch (component) {\n case SectionHeader:\n pageElements.sectionHeader = child;\n break;\n\n case SectionFooter:\n pageElements.sectionFooter = child;\n break;\n\n case PageContent:\n content = child;\n break;\n\n case PageHeader:\n pageElements.header = child;\n break;\n\n case PageFooter:\n pageElements.footer = child;\n break;\n\n case PageOverlay:\n pageElements.overlay = child;\n break;\n }\n });\n\n if (!content) {\n throw Error('PageContent component is a required child for Section');\n }\n\n return { ...pageElements, content: content };\n}\n\nexport default parseSectionChildren;\n","import type { PageDimension, PageOrientation } from './pageTypes';\n\nexport function adjustDimension(\n dimension: PageDimension,\n orientation: PageOrientation\n): PageDimension {\n if (orientation === 'landscape') {\n return { height: dimension.width, width: dimension.height };\n }\n\n return dimension;\n}\n\nexport function buildSectionStyle(\n sectionId: string,\n dimension: PageDimension\n): string {\n return `@page section-${sectionId} {\n margin: none; \n size:${dimension.width} ${dimension.height}; \n width:${dimension.width};\n height:${dimension.height};\n }`;\n}\n","import { createContext } from 'react';\n\nexport const PageContext = createContext<{\n pageNumber: number;\n totalPages: number;\n}>({\n pageNumber: 0,\n totalPages: 0,\n});\n","import { getVisibleHeight } from '@paprize/core/src';\nimport type { PageMargin } from './pageTypes';\n\nexport function shorthand(margin?: PageMargin) {\n return margin\n ? `${margin.top} ${margin.right} ${margin.bottom} ${margin.left}`\n : '0';\n}\n\nexport function getVisibleSize(element: Element) {\n const rect = element.getBoundingClientRect();\n const computedStyle = getComputedStyle(element);\n\n const marginLeft = parseFloat(computedStyle.marginLeft) || 0;\n const marginRight = parseFloat(computedStyle.marginRight) || 0;\n\n return {\n height: getVisibleHeight(element),\n width: rect.width + marginLeft + marginRight,\n };\n}\n","import { createContext } from 'react';\n\nexport const SectionContext = createContext<string>('');\n","import { useContext, useMemo, type Ref } from 'react';\nimport { type PageElements } from './parseSectionChildren';\nimport type { PageDimension, PageMargin } from './pageTypes';\nimport { PageContext } from './PageContext';\nimport { shorthand } from './Page.utilities';\nimport { SectionContext } from './SectionContext';\n\nexport interface PageProps {\n elements: PageElements;\n dimensions: PageDimension;\n margin?: PageMargin;\n pageNumber: number;\n totalPages: number;\n ref?: Ref<HTMLDivElement>;\n sectionHeaderRef?: Ref<HTMLDivElement>;\n sectionFooterRef?: Ref<HTMLDivElement>;\n contentRef?: Ref<HTMLDivElement>;\n}\n\nexport function Page({\n elements,\n dimensions,\n margin,\n pageNumber,\n totalPages,\n ref,\n sectionHeaderRef,\n sectionFooterRef,\n contentRef,\n}: PageProps) {\n const sectionId = useContext(SectionContext);\n const contextValue = useMemo(\n () => ({ pageNumber, totalPages }),\n [pageNumber, totalPages]\n );\n\n return (\n <PageContext value={contextValue}>\n <div\n id={`${sectionId}-${pageNumber}`}\n className=\"paprize-page paprize-page-component\"\n ref={ref}\n style={{\n width: dimensions.width,\n height: dimensions.height,\n maxHeight: dimensions.height,\n position: 'relative',\n padding: shorthand(margin),\n zIndex: 1,\n }}\n >\n {elements.sectionHeader && pageNumber == 1 && (\n <div\n className=\"paprize-page-component\"\n ref={sectionHeaderRef}\n >\n {elements.sectionHeader}\n </div>\n )}\n {elements.header && (\n <div className=\"paprize-page-component\">\n {elements.header}\n </div>\n )}\n\n <div\n style={{\n overflow: 'hidden',\n width: '100%',\n height: `100%`,\n }}\n ref={contentRef}\n >\n {elements.content}\n </div>\n\n {elements.overlay && (\n <div\n style={{\n position: 'absolute',\n width: '100%',\n height: '100%',\n left: 0,\n top: 0,\n }}\n >\n {elements.overlay}\n </div>\n )}\n\n {(elements.footer || elements.sectionFooter) && (\n <div\n className=\"paprize-page-component\"\n style={{ marginTop: 'auto' }}\n >\n {elements.footer && (\n <div className=\"paprize-page-component\">\n {elements.footer}\n </div>\n )}\n {elements.sectionFooter && pageNumber == totalPages && (\n <div\n className=\"paprize-page-component\"\n ref={sectionFooterRef}\n >\n {elements.sectionFooter}\n </div>\n )}\n </div>\n )}\n </div>\n </PageContext>\n );\n}\n","import { getVisibleHeight, type PaginationPlugin } from '@paprize/core/src';\nimport { getVisibleSize } from './Page.utilities';\n\nexport function calculatePageDimensions(\n current: HTMLDivElement,\n sectionHeader: HTMLDivElement | null,\n sectionFooter: HTMLDivElement | null\n): {\n height: number;\n width: number;\n sectionHeaderHeight: number;\n sectionFooterHeight: number;\n} {\n const { height, width } = getVisibleSize(current);\n const sectionHeaderHeight = sectionHeader\n ? getVisibleHeight(sectionHeader)\n : 0;\n const sectionFooterHeight = sectionFooter\n ? getVisibleHeight(sectionFooter)\n : 0;\n\n return { height, width, sectionHeaderHeight, sectionFooterHeight };\n}\n\nexport function createSectionPageHeightPlugin(\n height: number,\n sectionHeaderHeight: number,\n sectionFooterHeight: number\n): PaginationPlugin {\n return {\n name: 'sectionPageHeight',\n order: 1,\n afterVisitNode: (_, domState, pageManager) => {\n const lastPage = domState.completed;\n if (!lastPage || sectionFooterHeight <= 0) return;\n\n // if there is no empty space for the section footer, create a new page for it\n if (!pageManager.hasEmptySpace(sectionFooterHeight)) {\n pageManager.nextPage();\n }\n },\n onNewPage: (_, pageManager) => {\n const pageState = pageManager.getPageState();\n if (pageState.pageIndex === 0) {\n pageState.pageHeight = height + sectionFooterHeight; // reserve sectionHeaderHeight\n } else {\n pageState.pageHeight =\n height + sectionHeaderHeight + sectionFooterHeight;\n }\n },\n };\n}\n","'use client';\nimport { useCallback, useMemo } from 'react';\nimport { useSetAtom, useAtom, useStore } from 'jotai/react';\nimport { RESET } from 'jotai/vanilla/utils';\nimport { atom } from 'jotai/vanilla';\n\nfunction useResetAtom(anAtom, options) {\n const setAtom = useSetAtom(anAtom, options);\n const resetAtom = useCallback(() => setAtom(RESET), [setAtom]);\n return resetAtom;\n}\n\nfunction useReducerAtom(anAtom, reducer, options) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] useReducerAtom is deprecated and will be removed in the future. Please create your own version using the recipe. https://github.com/pmndrs/jotai/pull/2467\"\n );\n }\n const [state, setState] = useAtom(anAtom, options);\n const dispatch = useCallback(\n (action) => {\n setState((prev) => reducer(prev, action));\n },\n [setState, reducer]\n );\n return [state, dispatch];\n}\n\nfunction useAtomCallback(callback, options) {\n const anAtom = useMemo(\n () => atom(null, (get, set, ...args) => callback(get, set, ...args)),\n [callback]\n );\n return useSetAtom(anAtom, options);\n}\n\nconst hydratedMap = /* @__PURE__ */ new WeakMap();\nfunction useHydrateAtoms(values, options) {\n const store = useStore(options);\n const hydratedSet = getHydratedSet(store);\n for (const [atom, ...args] of values) {\n if (!hydratedSet.has(atom) || (options == null ? void 0 : options.dangerouslyForceHydrate)) {\n hydratedSet.add(atom);\n store.set(atom, ...args);\n }\n }\n}\nconst getHydratedSet = (store) => {\n let hydratedSet = hydratedMap.get(store);\n if (!hydratedSet) {\n hydratedSet = /* @__PURE__ */ new WeakSet();\n hydratedMap.set(store, hydratedSet);\n }\n return hydratedSet;\n};\n\nexport { useAtomCallback, useHydrateAtoms, useReducerAtom, useResetAtom };\n","import { atom, useAtomValue } from 'jotai';\nimport { useContext, useMemo } from 'react';\nimport { sectionsAtom } from './store';\nimport { SectionContext } from './SectionContext';\n\n/**\n * Represents information about a section, including pagination details and pending suspensions.\n */\nexport interface SectionInfo {\n /**\n * The total number of pages in the section.\n * When isPaginated is false, this value is 0.\n */\n totalPages: number;\n\n /**\n * Indicates whether the section is paginated.\n */\n isPaginated: boolean;\n\n /**\n * The number of pending suspensions in the section.\n */\n pendingSuspensions: number;\n}\n\nconst defaultSectionInfo: SectionInfo = {\n totalPages: 0,\n isPaginated: false,\n pendingSuspensions: 0,\n};\n\nexport const useSectionInfo = () => {\n const sectionId = useContext(SectionContext);\n const sectionAtom = useMemo(\n () =>\n atom((get): SectionInfo => {\n const state = get(sectionsAtom).get(sectionId);\n if (state) {\n return {\n totalPages: state.totalPages,\n isPaginated: state.isPaginated,\n pendingSuspensions: state.pendingSuspensions.size,\n };\n }\n return defaultSectionInfo;\n }),\n [sectionId]\n );\n const value = useAtomValue(sectionAtom);\n\n return {\n sectionId: sectionId,\n totalPages: value.totalPages,\n };\n};\n","import { useAtomCallback } from 'jotai/utils';\nimport { sectionsAtom } from './store';\nimport { useSectionInfo } from './useSectionInfo';\n\nexport function useIsSectionSuspendedCallback(sectionName: string) {\n // subscribe to reportInfoAtom[sectionName] changes\n useSectionInfo();\n\n // but read the live value\n const readCallback = useAtomCallback((get) => {\n const reportInfo = get(sectionsAtom);\n return (reportInfo.get(sectionName)?.pendingSuspensions?.size ?? 0) > 0;\n });\n\n return readCallback;\n}\n","import { atom, useSetAtom } from 'jotai';\nimport { useMemo } from 'react';\nimport { defaultSectionState, sectionsAtom, type SectionState } from './store';\n\nexport const useSetSectionState = (sectionName: string) => {\n const sectionAtom = useMemo(\n () =>\n atom(\n () => 0,\n (_, set, update: (pre: SectionState) => SectionState) => {\n set(sectionsAtom, (prev) =>\n new Map(prev).set(\n sectionName,\n update(prev.get(sectionName) ?? defaultSectionState)\n )\n );\n }\n ),\n [sectionName]\n );\n\n return useSetAtom(sectionAtom);\n};\n","import {\n defaultPlugins,\n isDebugMode,\n logger,\n Paginator,\n type PaginateResult,\n} from '@paprize/core/src';\nimport {\n calculatePageDimensions,\n createSectionPageHeightPlugin,\n} from './usePagination.utilities';\nimport { useContext, useEffect, useRef, useState } from 'react';\nimport type { PageElements } from './parseSectionChildren';\nimport type { PageDimension, PageMargin } from './pageTypes';\nimport type { SectionLayoutProps } from './SectionLayout';\nimport { SectionContext } from './SectionContext';\nimport type { PaginationConfig } from '@paprize/core/src';\nimport { useIsSectionSuspendedCallback } from './useIsSectionSuspendedCallback';\nimport { useSetSectionState } from './useSetSectionInfo';\n\nconst logPrefix = '\\x1b[41mREACT\\x1b[0m';\n\ninterface PaginationState {\n results: PaginateResult | null;\n isLoading: boolean;\n}\n\nconst isCacheValid = (\n cache: SectionLayoutProps | null,\n elements: PageElements,\n dimensions: PageDimension,\n margin: PageMargin | undefined,\n config: Partial<PaginationConfig>\n) => {\n return (\n cache?.dimensions === dimensions &&\n cache?.margin === margin &&\n cache?.elements === elements &&\n cache?.config === config &&\n cache?.elements === elements\n );\n};\n\nexport function usePagination(\n elements: PageElements,\n dimensions: PageDimension,\n margin: PageMargin | undefined,\n config: Partial<PaginationConfig>\n) {\n const sectionId = useContext(SectionContext);\n const readIsSectionSuspended = useIsSectionSuspendedCallback(sectionId);\n const setSectionInfo = useSetSectionState(sectionId);\n const cacheRef = useRef<SectionLayoutProps | null>(null);\n const [state, setState] = useState<PaginationState>({\n results: null,\n isLoading: true,\n });\n\n const pageRef = useRef<HTMLDivElement>(null);\n const sectionHeaderRef = useRef<HTMLDivElement>(null);\n const sectionFooterRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n\n // reset state when dependencies change\n useEffect(() => {\n if (\n !isCacheValid(\n cacheRef.current,\n elements,\n dimensions,\n margin,\n config\n )\n ) {\n setState({\n results: null,\n isLoading: true,\n });\n }\n }, [dimensions, elements, margin, config]);\n\n // main pagination logic\n // the following condition will avoid infinite loops\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n // early return if page ref isn't ready or cache is valid\n if (\n !pageRef.current ||\n !contentRef.current ||\n isCacheValid(cacheRef.current, elements, dimensions, margin, config)\n ) {\n return;\n }\n\n if (readIsSectionSuspended()) {\n logger.info(logPrefix, `Section \"${sectionId}\" is suspended`);\n return;\n }\n\n const { height, width, sectionFooterHeight, sectionHeaderHeight } =\n calculatePageDimensions(\n contentRef.current,\n sectionHeaderRef.current,\n sectionFooterRef.current\n );\n\n const plugins = [\n ...(config.plugins ?? defaultPlugins),\n createSectionPageHeightPlugin(\n height,\n sectionHeaderHeight,\n sectionFooterHeight\n ),\n ];\n\n if (isDebugMode()) {\n pageRef.current.style.maxHeight = 'none';\n pageRef.current.style.height = 'auto';\n }\n\n logger.debug(logPrefix, 'Calling Paginator', {\n sectionName: sectionId,\n height,\n width,\n sectionFooterHeight,\n sectionHeaderHeight,\n plugins,\n });\n\n const paginatorResult = Paginator.paginate(\n contentRef.current,\n { height, width },\n { ...config, plugins }\n );\n\n logger.debug(logPrefix, 'Paginator Result', {\n sectionName: sectionId,\n paginatorResult,\n });\n\n setState({\n results: paginatorResult,\n isLoading: false,\n });\n\n setSectionInfo((pre) => ({\n ...pre,\n totalPages: paginatorResult.length,\n isPaginated: true,\n }));\n\n cacheRef.current = { elements, dimensions, margin, config };\n });\n\n return {\n ...state,\n pageRef,\n sectionHeaderRef,\n sectionFooterRef,\n contentRef,\n };\n}\n","import { createPortal } from 'react-dom';\nimport {\n tempContainerClassName,\n type PaginationConfig,\n} from '@paprize/core/src';\nimport type { PageElements } from './parseSectionChildren';\nimport type { PageDimension, PageMargin } from './pageTypes';\nimport { Page } from './Page';\nimport { isDebugMode } from '@paprize/core/src';\nimport { usePagination } from './usePagination';\n\nexport interface SectionLayoutProps {\n elements: PageElements;\n dimensions: PageDimension;\n margin: PageMargin | undefined;\n config: Partial<PaginationConfig>;\n}\n\nexport function SectionLayout({\n elements,\n dimensions,\n margin,\n config,\n}: SectionLayoutProps) {\n const { results, pageRef, sectionHeaderRef, sectionFooterRef, contentRef } =\n usePagination(elements, dimensions, margin, config);\n\n if (results !== null) {\n return (\n <>\n {results.map((page, index) => (\n <Page\n key={index}\n elements={{\n ...elements,\n content: (\n <div\n style={{ display: 'contents' }}\n dangerouslySetInnerHTML={{\n __html: page,\n }}\n />\n ),\n }}\n dimensions={dimensions}\n margin={margin}\n pageNumber={index + 1}\n totalPages={results.length}\n />\n ))}\n </>\n );\n }\n\n const style: React.CSSProperties | undefined = isDebugMode()\n ? undefined\n : {\n visibility: 'hidden',\n position: 'absolute',\n left: '-9999px',\n top: '-9999px',\n };\n\n return createPortal(\n <div className={tempContainerClassName} style={style}>\n <Page\n elements={elements}\n dimensions={dimensions}\n margin={margin}\n pageNumber={1}\n totalPages={1}\n ref={pageRef}\n sectionHeaderRef={sectionHeaderRef}\n sectionFooterRef={sectionFooterRef}\n contentRef={contentRef}\n />\n </div>,\n document.body\n );\n}\n","import { useId, useMemo, type ReactNode } from 'react';\nimport type { PageDimension, PageMargin, PageOrientation } from './pageTypes';\nimport parseSectionChildren from './parseSectionChildren';\nimport { adjustDimension, buildSectionStyle } from './Section.utilities';\nimport { SectionLayout } from './SectionLayout';\nimport { SectionContext } from './SectionContext';\nimport type { PaginationConfig } from '@paprize/core/src';\nimport { useSetSectionState } from './useSetSectionInfo';\nimport { useStyle } from './useStyle';\n\nexport interface SectionProps {\n children: ReactNode;\n dimension: PageDimension;\n orientation?: PageOrientation;\n margin?: PageMargin;\n config?: Partial<PaginationConfig>;\n}\n\nexport function Section({\n children,\n dimension,\n orientation = 'portrait',\n margin,\n config,\n}: SectionProps) {\n const id = useId();\n const configWithId = useMemo(\n () => ({ ...config, id: config?.id ?? id }),\n [config, id]\n );\n const sectionId = configWithId.id;\n const setSectionInfo = useSetSectionState(sectionId);\n\n useMemo(() => {\n setSectionInfo((pre) => ({ ...pre, isPaginated: false }));\n }, [setSectionInfo]);\n\n const props = useMemo(\n () => ({\n dimensions: adjustDimension(dimension, orientation),\n elements: parseSectionChildren(children),\n margin: margin,\n config: configWithId,\n }),\n [children, dimension, margin, configWithId, orientation]\n );\n\n useStyle(buildSectionStyle(sectionId, props.dimensions));\n\n return (\n <section\n className=\"paprize-section\"\n id={`section-${sectionId}`}\n style={{ page: `section-${sectionId}` }}\n >\n <SectionContext value={sectionId}>\n <SectionLayout\n elements={props.elements}\n dimensions={props.dimensions}\n margin={props.margin}\n config={props.config}\n />\n </SectionContext>\n </section>\n );\n}\n","import { pageBreakAttributeName } from '@paprize/core/src';\n\nexport function PageBreak() {\n return <span {...{ [pageBreakAttributeName]: 'true' }} />;\n}\n","import { configToAttributeMap, type ConfigAttribute } from '@paprize/core/src';\n\nexport interface LayoutProps extends ConfigAttribute {\n children: React.ReactNode;\n}\n\nexport function Layout({ children, ...attributes }: LayoutProps) {\n return (\n <div\n style={{ display: 'contents' }}\n {...configToAttributeMap(attributes)}\n >\n {children}\n </div>\n );\n}\n","import { useContext } from 'react';\nimport { PageContext } from './PageContext';\n\nexport const usePageInfo = () => {\n const pageContext = useContext(PageContext);\n\n return {\n pageNumber: pageContext.pageNumber,\n totalPages: pageContext.totalPages,\n };\n};\n","import { useAtomValue } from 'jotai';\nimport { reportAtom, sectionsAtom } from './store';\nimport { useMemo } from 'react';\n\n/**\n * Represents information about a report, including its sections and pagination details.\n */\nexport interface ReportInfo {\n /**\n * The total number of sections in the report.\n * When isFirstPaginationCompleted is false, this value is 0.\n * When isPaginated is false, this value is not guaranteed to be accurate.\n */\n totalSections: number;\n\n /**\n * Indicates whether the report is ready and all sections are paginated.\n */\n isPaginated: boolean;\n\n /**\n * Indicates whether the first pagination process has been completed.\n * This becomes true once at least one section has been paginated.\n */\n isFirstPaginationCompleted: boolean;\n\n /**\n * An array of sections in the report, each containing details about the section.\n */\n sections: {\n /**\n * The id of the section.\n */\n sectionId: string;\n\n /**\n * The total number of pages in the section.\n */\n totalPages: number;\n\n /**\n * Indicates whether the section is paginated.\n */\n isPaginated: boolean;\n }[];\n}\n\nexport function useReportInfo() {\n const sections = useAtomValue(sectionsAtom);\n const report = useAtomValue(reportAtom);\n\n return useMemo(\n (): ReportInfo => ({\n totalSections: report.totalSections,\n isPaginated: report.isPaginated,\n isFirstPaginationCompleted: report.totalSections > 0,\n sections: Array.from(sections.entries()).map(\n ([key, { totalPages, isPaginated }]) => ({\n sectionId: key,\n totalPages,\n isPaginated,\n })\n ),\n }),\n [report.isPaginated, report.totalSections, sections]\n );\n}\n","import { useId, useMemo } from 'react';\nimport { useSetSectionState } from './useSetSectionInfo';\n\nexport function useSectionSuspension(\n sectionId: string,\n suspend: boolean = true\n) {\n const id = useId();\n const setSectionInfo = useSetSectionState(sectionId);\n\n useMemo(() => {\n if (!suspend) return;\n\n setSectionInfo((prev) => ({\n ...prev,\n pendingSuspensions: new Set(prev.pendingSuspensions).add(id),\n }));\n }, [id, setSectionInfo, suspend]);\n\n return useMemo(() => {\n return {\n release: () => {\n setSectionInfo((prev) => {\n const pendingSuspensions = new Set(prev.pendingSuspensions);\n pendingSuspensions.delete(id);\n\n return {\n ...prev,\n pendingSuspensions,\n };\n });\n },\n };\n }, [id, setSectionInfo]);\n}\n","import { logger } from '@paprize/core';\nimport { useState, useMemo, useEffect } from 'react';\nimport { useSectionInfo } from './useSectionInfo';\nimport { useSectionSuspension } from './useSectionSuspension';\n\nexport interface State<T> {\n state: 'loading' | 'hasData' | 'hasError';\n value?: T;\n}\n\nexport function useSuspenseForPromise<T>(\n promise: Promise<T>,\n defaultValue?: T\n): T | undefined {\n const { sectionId } = useSectionInfo();\n const { release } = useSectionSuspension(sectionId);\n const [value, setValue] = useState<State<T>>({\n state: 'loading',\n value: defaultValue,\n });\n\n useMemo(() => {\n promise\n .then((v) => setValue({ state: 'hasData', value: v }))\n .catch((e) => {\n setValue({ state: 'hasError', value: e });\n logger.error('Error in useSuspenseForPromise', e);\n });\n }, [promise]);\n\n useEffect(() => {\n if (value.state !== 'loading') {\n release();\n }\n }, [value, release]);\n\n return value.value as T | undefined;\n}\n","import { useSuspenseForPromise } from './useSuspenseForPromise';\nimport { paprize_readJsonDataFile } from '@paprize/core/src';\n\nfunction lazy<T>(factory: () => Promise<T>): () => Promise<T> {\n let promise: Promise<T> | null = null;\n\n return () => {\n if (!promise) {\n promise = factory();\n }\n return promise;\n };\n}\n\n// the function is not available in browser, and in puppeteer it is injected before anything else but we\n// still need to delay the call\nexport const jsonData = lazy(async () => {\n const strData = await window[paprize_readJsonDataFile]?.();\n return strData ? (JSON.parse(strData) as unknown) : null;\n});\n\nexport function useJsonData<DataModel>(\n defaultValue?: DataModel\n): DataModel | undefined {\n return useSuspenseForPromise(jsonData(), defaultValue) as\n | DataModel\n | undefined;\n}\n","import type { PageDimension, PageMargin } from './components/pageTypes';\n\nconst _pageSize = {\n A1: { height: '841mm', width: '594mm' },\n A2: { height: '594mm', width: '420mm' },\n A3: { height: '420mm', width: '297mm' },\n A4: { height: '297mm', width: '210mm' },\n A5: { height: '210mm', width: '148mm' },\n A6: { height: '148mm', width: '105mm' },\n B3: { height: '500mm', width: '353mm' },\n B4: { height: '353mm', width: '250mm' },\n B5: { height: '250mm', width: '176mm' },\n Letter: { height: '8.5in', width: '11in' },\n Legal: { height: '11in', width: '8.5in' },\n Tabloid: { height: '11in', width: '17in' },\n};\n\nconst _pageMargin = {\n Normal: { top: '1in', right: '1in', bottom: '1in', left: '1in' },\n Narrow: { top: '0.4in', right: '0.6in', bottom: '0.6in', left: '0.6in' },\n Wide: { top: '0.5in', right: '2in', bottom: '0.5in', left: '2in' },\n None: { top: '0in', right: '0in', bottom: '0in', left: '0in' },\n};\n\nexport const pageSize = _pageSize as Record<\n keyof typeof _pageSize,\n PageDimension\n>;\n\nexport const pageMargin = _pageMargin as Record<\n keyof typeof _pageMargin,\n PageMargin\n>;\n"],"names":["useStyle","css","useInsertionEffect","style","className","globalStyles","ReportPreview","children","jsx","isSelfAtom","atom","a","hasInitialValue","isActuallyWritableAtom","isAtomStateInitialized","atomState","returnAtomValue","__vite_import_meta_env__","promiseStateMap","isPendingPromise","value","_a","isPromiseLike","abortPromise","promise","promiseState","fn","registerAbortHandler","abortHandler","settle","p","addPendingPromiseToDependency","dependencyAtomState","cleanup","getMountedOrPendingDependents","mountedMap","dependents","atomWithPendingPromise","atomRead","_store","params","atomWrite","atomOnInit","store","atomOnMount","setAtom","ensureAtomState","buildingBlocks","getBuildingBlocks","atomStateMap","atomOnInit2","flushCallbacks","changedAtoms","mountCallbacks","unmountCallbacks","storeHooks","recomputeInvalidatedAtoms2","errors","call","e","callbacks","add","recomputeInvalidatedAtoms","invalidatedAtoms","ensureAtomState2","readAtomState2","mountDependencies2","topSortedReversed","visiting","visited","stack","aState","d","i","hasChangedDeps","dep","readAtomState","atomRead2","flushCallbacks2","writeAtomState2","n","isSync","mountDependenciesIfAsync","getter","_a2","aState2","setAtomStateValueOrPromise","controller","setSelf","options","args","prevEpochNumber","valueOrPromise","error","invalidateDependents","dState","writeAtomState","atomWrite2","invalidateDependents2","setter","args2","v","mountDependencies","mountAtom2","unmountAtom2","mounted","aMounted","mountAtom","atomOnMount2","processOnMount","onUnmount","unmountAtom","hasPrevValue","prevValue","storeGet","storeSet","storeSub","listener","listeners","buildingBlockMap","buildStore","buildArgs","storeGet2","storeSet2","storeSub2","keyCount","read","write","key","config","defaultRead","defaultWrite","get","set","arg","createStore","INTERNAL_buildStoreRev2","defaultStore","getDefaultStore","StoreContext","createContext","useStore","useContext","Provider","storeRef","useRef","createElement","x","attachPromiseStatus","use","React","continuablePromiseMap","createContinuablePromise","getValue","continuablePromise","resolve","reject","curr","onFulfilled","me","onRejected","onAbort","nextValue","INTERNAL_registerAbortHandler","useAtomValue","delay","promiseStatus","valueFromReducer","storeFromReducer","atomFromReducer","rerender","useReducer","prev","useEffect","unsub","value2","useDebugValue","useSetAtom","useCallback","defaultSectionState","sectionsAtom","reportAtom","ReportStatus","setReport","sections","sectionsLen","allSectionsReady","info","paprize_isReady","ReportRoot","jsxs","PageContent","PageFooter","PageHeader","SectionFooter","SectionHeader","PageOverlay","root","definition","module","this","noop","undefinedType","isIE","logMethods","_loggersByName","defaultLogger","bindMethod","obj","methodName","method","traceForIE","realMethod","replaceLoggingMethods","level","enableLoggingWhenConsoleArrives","defaultMethodFactory","_level","_loggerName","Logger","name","factory","self","inheritedLevel","defaultLevel","userLevel","storageKey","persistLevelIfPossible","levelNum","levelName","getPersistedLevel","storedLevel","cookie","cookieName","location","clearPersistedLevel","normalizeLevel","input","persist","childName","initialLevel","logger","_log","validChildren","parseSectionChildren","content","pageElements","Children","child","isValidElement","component","adjustDimension","dimension","orientation","buildSectionStyle","sectionId","PageContext","shorthand","margin","getVisibleSize","element","rect","computedStyle","marginLeft","marginRight","getVisibleHeight","SectionContext","Page","elements","dimensions","pageNumber","totalPages","ref","sectionHeaderRef","sectionFooterRef","contentRef","contextValue","useMemo","calculatePageDimensions","current","sectionHeader","sectionFooter","height","width","sectionHeaderHeight","sectionFooterHeight","createSectionPageHeightPlugin","_","domState","pageManager","pageState","useAtomCallback","callback","anAtom","defaultSectionInfo","useSectionInfo","sectionAtom","state","useIsSectionSuspendedCallback","sectionName","useSetSectionState","update","logPrefix","isCacheValid","cache","usePagination","readIsSectionSuspended","setSectionInfo","cacheRef","setState","useState","pageRef","plugins","defaultPlugins","isDebugMode","paginatorResult","Paginator","pre","SectionLayout","results","Fragment","page","index","createPortal","tempContainerClassName","Section","id","useId","configWithId","props","PageBreak","pageBreakAttributeName","Layout","attributes","configToAttributeMap","usePageInfo","pageContext","useReportInfo","report","isPaginated","useSectionSuspension","suspend","pendingSuspensions","useSuspenseForPromise","defaultValue","release","setValue","lazy","jsonData","strData","paprize_readJsonDataFile","useJsonData","_pageSize","_pageMargin","pageSize","pageMargin"],"mappings":"obAEO,SAASA,EAASC,EAAa,CAClCC,EAAAA,mBAAmB,IAAM,CACrB,MAAMC,EAAQ,SAAS,cAAc,OAAO,EA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|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "React library for creating professional, print-ready reports",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@paprize/core": "*",
|
|
45
|
-
"@paprize/puppeteer": "*",
|
|
46
45
|
"jotai": "^2.13.1",
|
|
47
46
|
"loglevel": "^1.9.2"
|
|
48
47
|
},
|