@graphrefly/graphrefly 0.43.0 → 0.45.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.
- package/README.md +21 -17
- package/dist/compat/index.cjs +20 -10
- package/dist/compat/index.cjs.map +1 -0
- package/dist/compat/index.d.cts +1 -22
- package/dist/compat/index.d.ts +1 -22
- package/dist/compat/index.js +3 -1
- package/dist/compat/index.js.map +1 -0
- package/dist/compat/jotai/index.cjs +21 -1
- package/dist/compat/jotai/index.cjs.map +1 -0
- package/dist/compat/jotai/index.d.cts +1 -2
- package/dist/compat/jotai/index.d.ts +1 -2
- package/dist/compat/jotai/index.js +3 -1
- package/dist/compat/jotai/index.js.map +1 -0
- package/dist/compat/nanostores/index.cjs +21 -1
- package/dist/compat/nanostores/index.cjs.map +1 -0
- package/dist/compat/nanostores/index.d.cts +1 -2
- package/dist/compat/nanostores/index.d.ts +1 -2
- package/dist/compat/nanostores/index.js +3 -1
- package/dist/compat/nanostores/index.js.map +1 -0
- package/dist/compat/nestjs/index.cjs +20 -10
- package/dist/compat/nestjs/index.cjs.map +1 -0
- package/dist/compat/nestjs/index.d.cts +1 -13
- package/dist/compat/nestjs/index.d.ts +1 -13
- package/dist/compat/nestjs/index.js +3 -1
- package/dist/compat/nestjs/index.js.map +1 -0
- package/dist/compat/react/index.cjs +21 -1
- package/dist/compat/react/index.cjs.map +1 -0
- package/dist/compat/react/index.d.cts +1 -2
- package/dist/compat/react/index.d.ts +1 -2
- package/dist/compat/react/index.js +3 -1
- package/dist/compat/react/index.js.map +1 -0
- package/dist/compat/solid/index.cjs +21 -1
- package/dist/compat/solid/index.cjs.map +1 -0
- package/dist/compat/solid/index.d.cts +1 -2
- package/dist/compat/solid/index.d.ts +1 -2
- package/dist/compat/solid/index.js +3 -1
- package/dist/compat/solid/index.js.map +1 -0
- package/dist/compat/svelte/index.cjs +21 -1
- package/dist/compat/svelte/index.cjs.map +1 -0
- package/dist/compat/svelte/index.d.cts +1 -2
- package/dist/compat/svelte/index.d.ts +1 -2
- package/dist/compat/svelte/index.js +3 -1
- package/dist/compat/svelte/index.js.map +1 -0
- package/dist/compat/vue/index.cjs +21 -1
- package/dist/compat/vue/index.cjs.map +1 -0
- package/dist/compat/vue/index.d.cts +1 -3
- package/dist/compat/vue/index.d.ts +1 -3
- package/dist/compat/vue/index.js +3 -1
- package/dist/compat/vue/index.js.map +1 -0
- package/dist/compat/zustand/index.cjs +21 -3
- package/dist/compat/zustand/index.cjs.map +1 -0
- package/dist/compat/zustand/index.d.cts +1 -6
- package/dist/compat/zustand/index.d.ts +1 -6
- package/dist/compat/zustand/index.js +3 -1
- package/dist/compat/zustand/index.js.map +1 -0
- package/dist/core/index.cjs +21 -1
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +1 -4
- package/dist/core/index.d.ts +1 -4
- package/dist/core/index.js +3 -1
- package/dist/core/index.js.map +1 -0
- package/dist/extra/browser.cjs +21 -1
- package/dist/extra/browser.cjs.map +1 -0
- package/dist/extra/browser.d.cts +1 -4
- package/dist/extra/browser.d.ts +1 -4
- package/dist/extra/browser.js +3 -1
- package/dist/extra/browser.js.map +1 -0
- package/dist/extra/index.cjs +20 -19
- package/dist/extra/index.cjs.map +1 -0
- package/dist/extra/index.d.cts +1 -17
- package/dist/extra/index.d.ts +1 -17
- package/dist/extra/index.js +3 -1
- package/dist/extra/index.js.map +1 -0
- package/dist/extra/node.cjs +21 -2
- package/dist/extra/node.cjs.map +1 -0
- package/dist/extra/node.d.cts +1 -187
- package/dist/extra/node.d.ts +1 -187
- package/dist/extra/node.js +3 -2
- package/dist/extra/node.js.map +1 -0
- package/dist/extra/operators.cjs +21 -1
- package/dist/extra/operators.cjs.map +1 -0
- package/dist/extra/operators.d.cts +1 -950
- package/dist/extra/operators.d.ts +1 -950
- package/dist/extra/operators.js +3 -1
- package/dist/extra/operators.js.map +1 -0
- package/dist/extra/reactive.cjs +21 -1
- package/dist/extra/reactive.cjs.map +1 -0
- package/dist/extra/reactive.d.cts +1 -353
- package/dist/extra/reactive.d.ts +1 -353
- package/dist/extra/reactive.js +3 -1
- package/dist/extra/reactive.js.map +1 -0
- package/dist/extra/render/index.cjs +21 -5
- package/dist/extra/render/index.cjs.map +1 -0
- package/dist/extra/render/index.d.cts +1 -183
- package/dist/extra/render/index.d.ts +1 -183
- package/dist/extra/render/index.js +3 -1
- package/dist/extra/render/index.js.map +1 -0
- package/dist/extra/sources.cjs +21 -3
- package/dist/extra/sources.cjs.map +1 -0
- package/dist/extra/sources.d.cts +1 -584
- package/dist/extra/sources.d.ts +1 -584
- package/dist/extra/sources.js +3 -1
- package/dist/extra/sources.js.map +1 -0
- package/dist/extra/storage-browser.cjs +21 -1
- package/dist/extra/storage-browser.cjs.map +1 -0
- package/dist/extra/storage-browser.d.cts +1 -37
- package/dist/extra/storage-browser.d.ts +1 -37
- package/dist/extra/storage-browser.js +3 -1
- package/dist/extra/storage-browser.js.map +1 -0
- package/dist/extra/storage-core.cjs +21 -1
- package/dist/extra/storage-core.cjs.map +1 -0
- package/dist/extra/storage-core.d.cts +1 -28
- package/dist/extra/storage-core.d.ts +1 -28
- package/dist/extra/storage-core.js +3 -1
- package/dist/extra/storage-core.js.map +1 -0
- package/dist/extra/storage-node.cjs +20 -0
- package/dist/extra/storage-node.cjs.map +1 -0
- package/dist/extra/storage-node.d.cts +1 -2
- package/dist/extra/storage-node.d.ts +1 -2
- package/dist/extra/storage-node.js +3 -0
- package/dist/extra/storage-node.js.map +1 -0
- package/dist/extra/storage-tiers-browser.cjs +21 -1
- package/dist/extra/storage-tiers-browser.cjs.map +1 -0
- package/dist/extra/storage-tiers-browser.d.cts +1 -120
- package/dist/extra/storage-tiers-browser.d.ts +1 -120
- package/dist/extra/storage-tiers-browser.js +3 -1
- package/dist/extra/storage-tiers-browser.js.map +1 -0
- package/dist/extra/storage-tiers-node.cjs +21 -1
- package/dist/extra/storage-tiers-node.cjs.map +1 -0
- package/dist/extra/storage-tiers-node.d.cts +1 -210
- package/dist/extra/storage-tiers-node.d.ts +1 -210
- package/dist/extra/storage-tiers-node.js +3 -1
- package/dist/extra/storage-tiers-node.js.map +1 -0
- package/dist/extra/storage-tiers.cjs +21 -1
- package/dist/extra/storage-tiers.cjs.map +1 -0
- package/dist/extra/storage-tiers.d.cts +1 -412
- package/dist/extra/storage-tiers.d.ts +1 -412
- package/dist/extra/storage-tiers.js +3 -1
- package/dist/extra/storage-tiers.js.map +1 -0
- package/dist/extra/storage-wal.cjs +21 -0
- package/dist/extra/storage-wal.cjs.map +1 -0
- package/dist/extra/storage-wal.d.cts +1 -0
- package/dist/extra/storage-wal.d.ts +1 -0
- package/dist/extra/storage-wal.js +3 -0
- package/dist/extra/storage-wal.js.map +1 -0
- package/dist/graph/index.cjs +21 -7
- package/dist/graph/index.cjs.map +1 -0
- package/dist/graph/index.d.cts +1 -7
- package/dist/graph/index.d.ts +1 -7
- package/dist/graph/index.js +3 -1
- package/dist/graph/index.js.map +1 -0
- package/dist/index.cjs +20 -227
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +45 -96
- package/dist/index.d.ts +45 -96
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -0
- package/dist/patterns/ai/browser.cjs +20 -7
- package/dist/patterns/ai/browser.cjs.map +1 -0
- package/dist/patterns/ai/browser.d.cts +1 -127
- package/dist/patterns/ai/browser.d.ts +1 -127
- package/dist/patterns/ai/browser.js +3 -3
- package/dist/patterns/ai/browser.js.map +1 -0
- package/dist/patterns/ai/index.cjs +20 -73
- package/dist/patterns/ai/index.cjs.map +1 -0
- package/dist/patterns/ai/index.d.cts +1 -21
- package/dist/patterns/ai/index.d.ts +1 -21
- package/dist/patterns/ai/index.js +3 -1
- package/dist/patterns/ai/index.js.map +1 -0
- package/dist/patterns/ai/node.cjs +21 -1
- package/dist/patterns/ai/node.cjs.map +1 -0
- package/dist/patterns/ai/node.d.cts +1 -59
- package/dist/patterns/ai/node.d.ts +1 -59
- package/dist/patterns/ai/node.js +3 -1
- package/dist/patterns/ai/node.js.map +1 -0
- package/dist/patterns/cqrs/index.cjs +21 -3
- package/dist/patterns/cqrs/index.cjs.map +1 -0
- package/dist/patterns/cqrs/index.d.cts +1 -8
- package/dist/patterns/cqrs/index.d.ts +1 -8
- package/dist/patterns/cqrs/index.js +3 -1
- package/dist/patterns/cqrs/index.js.map +1 -0
- package/dist/patterns/demo-shell/index.cjs +21 -5
- package/dist/patterns/demo-shell/index.cjs.map +1 -0
- package/dist/patterns/demo-shell/index.d.cts +1 -7
- package/dist/patterns/demo-shell/index.d.ts +1 -7
- package/dist/patterns/demo-shell/index.js +3 -1
- package/dist/patterns/demo-shell/index.js.map +1 -0
- package/dist/patterns/domain-templates/index.cjs +21 -3
- package/dist/patterns/domain-templates/index.cjs.map +1 -0
- package/dist/patterns/domain-templates/index.d.cts +1 -6
- package/dist/patterns/domain-templates/index.d.ts +1 -6
- package/dist/patterns/domain-templates/index.js +3 -1
- package/dist/patterns/domain-templates/index.js.map +1 -0
- package/dist/patterns/graphspec/index.cjs +21 -86
- package/dist/patterns/graphspec/index.cjs.map +1 -0
- package/dist/patterns/graphspec/index.d.cts +1 -8
- package/dist/patterns/graphspec/index.d.ts +1 -8
- package/dist/patterns/graphspec/index.js +3 -1
- package/dist/patterns/graphspec/index.js.map +1 -0
- package/dist/patterns/harness/index.cjs +21 -48
- package/dist/patterns/harness/index.cjs.map +1 -0
- package/dist/patterns/harness/index.d.cts +1 -14
- package/dist/patterns/harness/index.d.ts +1 -14
- package/dist/patterns/harness/index.js +3 -1
- package/dist/patterns/harness/index.js.map +1 -0
- package/dist/patterns/inspect/index.cjs +21 -3
- package/dist/patterns/inspect/index.cjs.map +1 -0
- package/dist/patterns/inspect/index.d.cts +1 -9
- package/dist/patterns/inspect/index.d.ts +1 -9
- package/dist/patterns/inspect/index.js +3 -1
- package/dist/patterns/inspect/index.js.map +1 -0
- package/dist/patterns/job-queue/index.cjs +21 -3
- package/dist/patterns/job-queue/index.cjs.map +1 -0
- package/dist/patterns/job-queue/index.d.cts +1 -9
- package/dist/patterns/job-queue/index.d.ts +1 -9
- package/dist/patterns/job-queue/index.js +3 -1
- package/dist/patterns/job-queue/index.js.map +1 -0
- package/dist/patterns/memory/index.cjs +21 -3
- package/dist/patterns/memory/index.cjs.map +1 -0
- package/dist/patterns/memory/index.d.cts +1 -8
- package/dist/patterns/memory/index.d.ts +1 -8
- package/dist/patterns/memory/index.js +3 -1
- package/dist/patterns/memory/index.js.map +1 -0
- package/dist/patterns/messaging/index.cjs +21 -3
- package/dist/patterns/messaging/index.cjs.map +1 -0
- package/dist/patterns/messaging/index.d.cts +1 -7
- package/dist/patterns/messaging/index.d.ts +1 -7
- package/dist/patterns/messaging/index.js +3 -1
- package/dist/patterns/messaging/index.js.map +1 -0
- package/dist/patterns/orchestration/index.cjs +21 -3
- package/dist/patterns/orchestration/index.cjs.map +1 -0
- package/dist/patterns/orchestration/index.d.cts +1 -9
- package/dist/patterns/orchestration/index.d.ts +1 -9
- package/dist/patterns/orchestration/index.js +3 -1
- package/dist/patterns/orchestration/index.js.map +1 -0
- package/dist/patterns/process/index.cjs +21 -1
- package/dist/patterns/process/index.cjs.map +1 -0
- package/dist/patterns/process/index.d.cts +1 -10
- package/dist/patterns/process/index.d.ts +1 -10
- package/dist/patterns/process/index.js +3 -1
- package/dist/patterns/process/index.js.map +1 -0
- package/dist/patterns/reactive-layout/index.cjs +21 -4
- package/dist/patterns/reactive-layout/index.cjs.map +1 -0
- package/dist/patterns/reactive-layout/index.d.cts +1 -7
- package/dist/patterns/reactive-layout/index.d.ts +1 -7
- package/dist/patterns/reactive-layout/index.js +3 -1
- package/dist/patterns/reactive-layout/index.js.map +1 -0
- package/dist/patterns/reduction/index.cjs +21 -3
- package/dist/patterns/reduction/index.cjs.map +1 -0
- package/dist/patterns/reduction/index.d.cts +1 -6
- package/dist/patterns/reduction/index.d.ts +1 -6
- package/dist/patterns/reduction/index.js +3 -1
- package/dist/patterns/reduction/index.js.map +1 -0
- package/dist/patterns/surface/index.cjs +21 -13
- package/dist/patterns/surface/index.cjs.map +1 -0
- package/dist/patterns/surface/index.d.cts +1 -9
- package/dist/patterns/surface/index.d.ts +1 -9
- package/dist/patterns/surface/index.js +3 -1
- package/dist/patterns/surface/index.js.map +1 -0
- package/dist/patterns/topology-view/index.cjs +21 -0
- package/dist/patterns/topology-view/index.cjs.map +1 -0
- package/dist/patterns/topology-view/index.d.cts +1 -0
- package/dist/patterns/topology-view/index.d.ts +1 -0
- package/dist/patterns/topology-view/index.js +3 -0
- package/dist/patterns/topology-view/index.js.map +1 -0
- package/dist/testing/index.cjs +21 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +1 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.js +3 -0
- package/dist/testing/index.js.map +1 -0
- package/package.json +608 -584
- package/dist/backoff-HPZMEZNF.js +0 -1
- package/dist/cascading-CH-_VwG9.d.cts +0 -199
- package/dist/cascading-OgKQZjsa.d.ts +0 -199
- package/dist/chunk-35JTVPOX.js +0 -1
- package/dist/chunk-3G5U5QNE.js +0 -5
- package/dist/chunk-3XDYJRYU.js +0 -1
- package/dist/chunk-4I45FVQS.js +0 -1
- package/dist/chunk-4VVTGLXJ.js +0 -1
- package/dist/chunk-4YAN45KM.js +0 -1
- package/dist/chunk-5QDBSZBV.js +0 -1
- package/dist/chunk-626TESAC.js +0 -3
- package/dist/chunk-6HOSXQKF.js +0 -1
- package/dist/chunk-6QZNQS5B.js +0 -1
- package/dist/chunk-C72GO4IZ.js +0 -1
- package/dist/chunk-CE72X3WO.js +0 -1
- package/dist/chunk-CK2E7BTU.js +0 -1
- package/dist/chunk-CLD3F4R5.js +0 -1
- package/dist/chunk-CUNIRONA.js +0 -1
- package/dist/chunk-D27JNOLZ.js +0 -1
- package/dist/chunk-D5RFJOZ2.js +0 -1
- package/dist/chunk-EBW4V6JN.js +0 -1
- package/dist/chunk-ESMPEKEV.js +0 -1
- package/dist/chunk-F3IGTWCQ.js +0 -1
- package/dist/chunk-F672GV32.js +0 -1
- package/dist/chunk-FDQGFWLF.js +0 -1
- package/dist/chunk-FG4TKHMC.js +0 -1
- package/dist/chunk-GPW2V3RE.js +0 -1
- package/dist/chunk-I7IGYPSL.js +0 -1
- package/dist/chunk-INQD2KRQ.js +0 -1
- package/dist/chunk-JNWRYDJN.js +0 -1
- package/dist/chunk-JQFH2DV6.js +0 -1
- package/dist/chunk-K2Q24F5T.js +0 -1
- package/dist/chunk-KGKJCHEK.js +0 -1
- package/dist/chunk-KRH66M4O.js +0 -1
- package/dist/chunk-KVV66NN2.js +0 -1
- package/dist/chunk-L6NSJVJZ.js +0 -1
- package/dist/chunk-LYCLF26R.js +0 -1
- package/dist/chunk-NNKJUORL.js +0 -1
- package/dist/chunk-NON4NLIC.js +0 -45
- package/dist/chunk-O2BLLH7M.js +0 -18
- package/dist/chunk-OCKEEPRJ.js +0 -2
- package/dist/chunk-OFZG3TB3.js +0 -9
- package/dist/chunk-OYJKFY7V.js +0 -1
- package/dist/chunk-P6C4WHZO.js +0 -5
- package/dist/chunk-PT7W5FCD.js +0 -5
- package/dist/chunk-Q4U3A3L5.js +0 -1
- package/dist/chunk-QE4IGY7I.js +0 -61
- package/dist/chunk-QYADASLV.js +0 -1
- package/dist/chunk-QYVXF7GW.js +0 -1
- package/dist/chunk-S3EEIPO7.js +0 -1
- package/dist/chunk-SUWT3ZON.js +0 -1
- package/dist/chunk-TPKQW72B.js +0 -1
- package/dist/chunk-TSOYJ743.js +0 -1
- package/dist/chunk-TZQPPQEQ.js +0 -1
- package/dist/chunk-V5A7M7RJ.js +0 -1
- package/dist/chunk-VIMF6LGM.js +0 -1
- package/dist/chunk-VJLMUKOI.js +0 -1
- package/dist/chunk-VN6RDSK2.js +0 -1
- package/dist/chunk-VNC3TMVY.js +0 -1
- package/dist/chunk-VOPGGIL7.js +0 -1
- package/dist/chunk-VQ4A6T2A.js +0 -1
- package/dist/chunk-XG62INFA.js +0 -1
- package/dist/chunk-Y4NI3X7O.js +0 -84
- package/dist/content-addressed-storage-4-ST1tYk.d.cts +0 -124
- package/dist/content-addressed-storage-DuYMjV7o.d.ts +0 -124
- package/dist/decay-2ZukgQ4o.d.cts +0 -112
- package/dist/decay-CdEBmDIs.d.ts +0 -112
- package/dist/fallback-CqYVLL6X.d.ts +0 -250
- package/dist/fallback-Ctlj2tMY.d.cts +0 -250
- package/dist/graph-7VguS7a4.d.ts +0 -1668
- package/dist/graph-C4SHb3Ly.d.cts +0 -1668
- package/dist/index-0rKFCVFp.d.cts +0 -557
- package/dist/index-B-i4_g3k.d.ts +0 -651
- package/dist/index-B5iz82A3.d.cts +0 -2655
- package/dist/index-BAOD98JD.d.cts +0 -754
- package/dist/index-BG0BN3PB.d.ts +0 -44
- package/dist/index-BJX94aud.d.cts +0 -34
- package/dist/index-BP8a88zx.d.ts +0 -385
- package/dist/index-BTQtTb_H.d.cts +0 -301
- package/dist/index-BVpm6noz.d.cts +0 -36
- package/dist/index-Bc41FuHp.d.cts +0 -291
- package/dist/index-BdGtBX-X.d.cts +0 -515
- package/dist/index-Bf7eqeSF.d.ts +0 -113
- package/dist/index-BiX1Nkgx.d.cts +0 -1844
- package/dist/index-BoLv_OfD.d.cts +0 -651
- package/dist/index-BojK2fwH.d.cts +0 -299
- package/dist/index-BsT7F2et.d.ts +0 -291
- package/dist/index-BwLvVVsy.d.cts +0 -189
- package/dist/index-C59mYFKp.d.ts +0 -121
- package/dist/index-C7O6r5fV.d.ts +0 -37
- package/dist/index-C9kSENB4.d.cts +0 -127
- package/dist/index-C9pjcz3l.d.cts +0 -209
- package/dist/index-CAC_rNzm.d.ts +0 -189
- package/dist/index-CCq87F7t.d.ts +0 -127
- package/dist/index-CDXc9zKM.d.cts +0 -26
- package/dist/index-CJK1JkYy.d.ts +0 -36
- package/dist/index-CLon-IWF.d.cts +0 -374
- package/dist/index-COD1kVoS.d.cts +0 -468
- package/dist/index-CPT7C_f1.d.ts +0 -374
- package/dist/index-CQG3D1cp.d.ts +0 -468
- package/dist/index-CZQXo5tH.d.ts +0 -209
- package/dist/index-CZjOhcBy.d.cts +0 -113
- package/dist/index-ChOyVLKm.d.cts +0 -86
- package/dist/index-CvrqGfNS.d.ts +0 -34
- package/dist/index-D-AEQVLo.d.ts +0 -2655
- package/dist/index-D4Y1cMG0.d.ts +0 -26
- package/dist/index-DBHK8O6H.d.ts +0 -301
- package/dist/index-DBevwHj_.d.ts +0 -515
- package/dist/index-DIOoAZUX.d.ts +0 -45
- package/dist/index-DSZ3ZCHF.d.ts +0 -3402
- package/dist/index-Dgs8zcj7.d.ts +0 -102
- package/dist/index-Dh_HJ82K.d.ts +0 -299
- package/dist/index-Dhc7a7Xo.d.cts +0 -102
- package/dist/index-Dmqp7KjD.d.ts +0 -86
- package/dist/index-Dn-wI9g4.d.ts +0 -231
- package/dist/index-Du7u1lSf.d.cts +0 -385
- package/dist/index-DwigL4lY.d.ts +0 -1844
- package/dist/index-DyR7eU5S.d.cts +0 -779
- package/dist/index-JZUPJIJy.d.ts +0 -779
- package/dist/index-K0_0eR8g.d.ts +0 -557
- package/dist/index-O16yXPK4.d.cts +0 -3402
- package/dist/index-O7fucFrU.d.cts +0 -121
- package/dist/index-RV_yDjOX.d.cts +0 -198
- package/dist/index-cm1GNcWE.d.ts +0 -754
- package/dist/index-f5IivDUX.d.cts +0 -37
- package/dist/index-hHcaFlJX.d.cts +0 -45
- package/dist/index-tJoTcnHh.d.cts +0 -231
- package/dist/index-wAzD9yVj.d.ts +0 -198
- package/dist/index-z96luz5O.d.cts +0 -44
- package/dist/meta-BgVAsg9j.d.ts +0 -102
- package/dist/meta-vE8bxW1E.d.cts +0 -102
- package/dist/node-ClS5yC-B.d.cts +0 -1347
- package/dist/node-ClS5yC-B.d.ts +0 -1347
- package/dist/observable-BsBzUrcI.d.ts +0 -36
- package/dist/observable-DLGPPtb8.d.cts +0 -36
- package/dist/pipeline-graph-DPqKDk59.d.cts +0 -137
- package/dist/pipeline-graph-loP57TBA.d.ts +0 -137
- package/dist/reactive-layout-Dsvob4zD.d.cts +0 -183
- package/dist/reactive-layout-v7KPvxoc.d.ts +0 -183
- package/dist/reactive-log-B00laMSQ.d.cts +0 -223
- package/dist/reactive-log-BezYsbA_.d.ts +0 -223
- package/dist/reactive-map-48mnZ-nu.d.cts +0 -296
- package/dist/reactive-map-BVVPdvmi.d.ts +0 -296
- package/dist/resilience-YIWPK4YC.js +0 -1
- package/dist/sugar-DLwvMr3F.d.ts +0 -223
- package/dist/sugar-DyVGtczU.d.cts +0 -223
- package/dist/topology-tree-BNGvuG82.d.ts +0 -25
- package/dist/topology-tree-BSdfSwMi.d.cts +0 -25
- package/dist/types-B1jDWVsM.d.cts +0 -442
- package/dist/types-DkzUUs0H.d.ts +0 -442
package/dist/index-DBevwHj_.d.ts
DELETED
|
@@ -1,515 +0,0 @@
|
|
|
1
|
-
import { M as MeasurementAdapter, P as PreparedSegment, L as LineBreaksResult, C as CharPosition, a as LayoutCursor, I as Interval, b as LayoutLine, c as LayoutNextLineContext, d as LayoutNextLineResult, R as ReactiveLayoutBundle, e as ReactiveLayoutOptions, S as SegmentBreakKind, f as SegmentMeasureStats, g as analyzeAndMeasure, h as carveTextLineSlots, i as computeCharPositions, j as computeLineBreaks, l as layoutNextLine, r as reactiveLayout } from './reactive-layout-v7KPvxoc.js';
|
|
2
|
-
import { N as Node } from './node-ClS5yC-B.js';
|
|
3
|
-
import { G as Graph } from './graph-7VguS7a4.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* MeasurementAdapter implementations (roadmap §7.1 — pluggable backends).
|
|
7
|
-
*
|
|
8
|
-
* All adapters implement {@link MeasurementAdapter} from `reactive-layout.ts`.
|
|
9
|
-
* Sync constructors, sync `measureSegment()` — no async, no polling.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
type CliMeasureAdapterOptions = {
|
|
13
|
-
/** Pixel width per terminal cell (default: 8). */
|
|
14
|
-
cellPx?: number;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Monospace terminal measurement adapter.
|
|
18
|
-
*
|
|
19
|
-
* Width = cell count × `cellPx`. CJK / fullwidth characters count as 2 cells.
|
|
20
|
-
* No external dependencies. Works in any JS environment.
|
|
21
|
-
*/
|
|
22
|
-
declare class CliMeasureAdapter implements MeasurementAdapter {
|
|
23
|
-
private readonly cellPx;
|
|
24
|
-
constructor(opts?: CliMeasureAdapterOptions);
|
|
25
|
-
measureSegment(text: string, _font: string): {
|
|
26
|
-
width: number;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
type PrecomputedAdapterOptions = {
|
|
30
|
-
/**
|
|
31
|
-
* Pre-computed metrics: `{ font: { segment: widthPx } }`.
|
|
32
|
-
* Outer key is the CSS font string; inner key is the text segment.
|
|
33
|
-
*/
|
|
34
|
-
metrics: Record<string, Record<string, number>>;
|
|
35
|
-
/**
|
|
36
|
-
* Fallback when a segment is not found in the metrics map.
|
|
37
|
-
* - `"per-char"`: sum individual character widths from the same font map (default)
|
|
38
|
-
* - `"error"`: throw an error for unknown segments
|
|
39
|
-
*/
|
|
40
|
-
fallback?: "per-char" | "error";
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Pre-computed measurement adapter for SSR / snapshot replay.
|
|
44
|
-
*
|
|
45
|
-
* Reads from a static metrics object — zero measurement at runtime.
|
|
46
|
-
* Ideal for server-side rendering or replaying snapshotted layouts.
|
|
47
|
-
*/
|
|
48
|
-
declare class PrecomputedAdapter implements MeasurementAdapter {
|
|
49
|
-
private readonly metrics;
|
|
50
|
-
private readonly fallback;
|
|
51
|
-
constructor(opts: PrecomputedAdapterOptions);
|
|
52
|
-
measureSegment(text: string, font: string): {
|
|
53
|
-
width: number;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
type CanvasMeasureAdapterOptions = {
|
|
57
|
-
/** Emoji width correction factor (default: 1, no correction). */
|
|
58
|
-
emojiCorrection?: number;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Browser measurement adapter using `OffscreenCanvas.measureText()`.
|
|
62
|
-
*
|
|
63
|
-
* Lazily creates an OffscreenCanvas and 2D context on first call.
|
|
64
|
-
* Requires a browser environment with OffscreenCanvas support.
|
|
65
|
-
*/
|
|
66
|
-
declare class CanvasMeasureAdapter implements MeasurementAdapter {
|
|
67
|
-
private ctx;
|
|
68
|
-
private currentFont;
|
|
69
|
-
private readonly emojiCorrection;
|
|
70
|
-
constructor(opts?: CanvasMeasureAdapterOptions);
|
|
71
|
-
private getContext;
|
|
72
|
-
measureSegment(text: string, font: string): {
|
|
73
|
-
width: number;
|
|
74
|
-
};
|
|
75
|
-
clearCache(): void;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Canvas API subset expected from `@napi-rs/canvas` or `skia-canvas`.
|
|
79
|
-
* Passed via dependency injection — no dynamic import, no polling.
|
|
80
|
-
*/
|
|
81
|
-
type CanvasModule = {
|
|
82
|
-
createCanvas(width: number, height: number): {
|
|
83
|
-
getContext(type: "2d"): {
|
|
84
|
-
font: string;
|
|
85
|
-
measureText(text: string): {
|
|
86
|
-
width: number;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Node.js measurement adapter using an injected canvas module.
|
|
93
|
-
*
|
|
94
|
-
* ```ts
|
|
95
|
-
* import * as canvas from "@napi-rs/canvas";
|
|
96
|
-
* const adapter = new NodeCanvasMeasureAdapter(canvas);
|
|
97
|
-
* ```
|
|
98
|
-
*
|
|
99
|
-
* Works with `@napi-rs/canvas`, `skia-canvas`, or any module exposing
|
|
100
|
-
* `createCanvas(w, h).getContext("2d").measureText(text)`.
|
|
101
|
-
*/
|
|
102
|
-
declare class NodeCanvasMeasureAdapter implements MeasurementAdapter {
|
|
103
|
-
private ctx;
|
|
104
|
-
private currentFont;
|
|
105
|
-
private readonly canvasModule;
|
|
106
|
-
constructor(canvasModule: CanvasModule);
|
|
107
|
-
private getContext;
|
|
108
|
-
measureSegment(text: string, font: string): {
|
|
109
|
-
width: number;
|
|
110
|
-
};
|
|
111
|
-
clearCache(): void;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* SVG measurement adapter — extracts dimensions from `viewBox` attribute
|
|
115
|
-
* or explicit `width`/`height` attributes in the SVG string.
|
|
116
|
-
*
|
|
117
|
-
* Pure arithmetic: parses the SVG string for dimension attributes.
|
|
118
|
-
* No DOM required. Works in any JS environment.
|
|
119
|
-
*
|
|
120
|
-
* Browser users who need `getBBox()` should pre-measure and pass explicit
|
|
121
|
-
* `viewBox` on the content block instead.
|
|
122
|
-
*/
|
|
123
|
-
declare class SvgBoundsAdapter {
|
|
124
|
-
measureSvg(content: string): {
|
|
125
|
-
width: number;
|
|
126
|
-
height: number;
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Image measurement adapter — returns pre-registered dimensions by src key.
|
|
131
|
-
*
|
|
132
|
-
* Sync-only: dimensions must be provided upfront via the `sizes` map.
|
|
133
|
-
* No I/O, no polling, no async. For browser use, pre-measure via
|
|
134
|
-
* `Image.onload` and pass natural dimensions on the content block directly,
|
|
135
|
-
* or register them here.
|
|
136
|
-
*
|
|
137
|
-
* ```ts
|
|
138
|
-
* const adapter = new ImageSizeAdapter({
|
|
139
|
-
* "hero.png": { width: 1200, height: 630 },
|
|
140
|
-
* "logo.svg": { width: 120, height: 40 },
|
|
141
|
-
* });
|
|
142
|
-
* ```
|
|
143
|
-
*/
|
|
144
|
-
declare class ImageSizeAdapter {
|
|
145
|
-
private readonly sizes;
|
|
146
|
-
constructor(sizes: Record<string, {
|
|
147
|
-
width: number;
|
|
148
|
-
height: number;
|
|
149
|
-
}>);
|
|
150
|
-
measureImage(src: string): {
|
|
151
|
-
width: number;
|
|
152
|
-
height: number;
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/** Pluggable measurement backend for SVG content. */
|
|
157
|
-
interface SvgMeasurer {
|
|
158
|
-
measureSvg(content: string): {
|
|
159
|
-
width: number;
|
|
160
|
-
height: number;
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
/** Pluggable measurement backend for image content. */
|
|
164
|
-
interface ImageMeasurer {
|
|
165
|
-
measureImage(src: string): {
|
|
166
|
-
width: number;
|
|
167
|
-
height: number;
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
/** Adapters map for `reactiveBlockLayout`. */
|
|
171
|
-
type BlockAdapters = {
|
|
172
|
-
/** Text measurement adapter (required — delegates to `reactiveLayout` internals). */
|
|
173
|
-
text: MeasurementAdapter;
|
|
174
|
-
/** SVG measurement (optional — required only if SVG blocks are present). */
|
|
175
|
-
svg?: SvgMeasurer;
|
|
176
|
-
/** Image measurement (optional — required only if image blocks without explicit dimensions are present). */
|
|
177
|
-
image?: ImageMeasurer;
|
|
178
|
-
};
|
|
179
|
-
/** A content block — text, image, or SVG. */
|
|
180
|
-
type ContentBlock = {
|
|
181
|
-
type: "text";
|
|
182
|
-
text: string;
|
|
183
|
-
font?: string;
|
|
184
|
-
lineHeight?: number;
|
|
185
|
-
} | {
|
|
186
|
-
type: "image";
|
|
187
|
-
src: string;
|
|
188
|
-
/** Natural width in px. Required if no ImageMeasurer adapter is provided. */
|
|
189
|
-
naturalWidth?: number;
|
|
190
|
-
/** Natural height in px. Required if no ImageMeasurer adapter is provided. */
|
|
191
|
-
naturalHeight?: number;
|
|
192
|
-
} | {
|
|
193
|
-
type: "svg";
|
|
194
|
-
content: string;
|
|
195
|
-
/** Explicit viewBox dimensions. Required if no SvgMeasurer adapter is provided. */
|
|
196
|
-
viewBox?: {
|
|
197
|
-
width: number;
|
|
198
|
-
height: number;
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
/**
|
|
202
|
-
* A block after measurement — knows its natural dimensions.
|
|
203
|
-
*
|
|
204
|
-
* **Equality note:** The reactive `measured-blocks` node uses dimension-only equality
|
|
205
|
-
* (`type`, `width`, `height`, `index`). Inner text layout data (`textSegments`,
|
|
206
|
-
* `textLineBreaks`, `textCharPositions`) is NOT compared for change detection.
|
|
207
|
-
* If you need text-level reactivity, use `reactiveLayout()` directly per text block.
|
|
208
|
-
*/
|
|
209
|
-
type MeasuredBlock = {
|
|
210
|
-
index: number;
|
|
211
|
-
type: "text" | "image" | "svg";
|
|
212
|
-
width: number;
|
|
213
|
-
height: number;
|
|
214
|
-
/** For text blocks: the inner layout results. */
|
|
215
|
-
textSegments?: PreparedSegment[];
|
|
216
|
-
textLineBreaks?: LineBreaksResult;
|
|
217
|
-
textCharPositions?: CharPosition[];
|
|
218
|
-
};
|
|
219
|
-
/** A block after flow — positioned in the container. */
|
|
220
|
-
type PositionedBlock = MeasuredBlock & {
|
|
221
|
-
x: number;
|
|
222
|
-
y: number;
|
|
223
|
-
};
|
|
224
|
-
/** Options for `reactiveBlockLayout`. */
|
|
225
|
-
type ReactiveBlockLayoutOptions = {
|
|
226
|
-
adapters: BlockAdapters;
|
|
227
|
-
name?: string;
|
|
228
|
-
blocks?: ContentBlock[];
|
|
229
|
-
/** Container max width in px (clamped to ≥ 0 on init and `setMaxWidth`). */
|
|
230
|
-
maxWidth?: number;
|
|
231
|
-
/** Vertical gap between blocks in px (default 0). */
|
|
232
|
-
gap?: number;
|
|
233
|
-
/** Default font for text blocks that don't specify one. */
|
|
234
|
-
defaultFont?: string;
|
|
235
|
-
/** Default line height for text blocks that don't specify one. */
|
|
236
|
-
defaultLineHeight?: number;
|
|
237
|
-
};
|
|
238
|
-
/** Result bundle from `reactiveBlockLayout`. */
|
|
239
|
-
type ReactiveBlockLayoutBundle = {
|
|
240
|
-
graph: Graph;
|
|
241
|
-
setBlocks: (blocks: ContentBlock[]) => void;
|
|
242
|
-
setMaxWidth: (maxWidth: number) => void;
|
|
243
|
-
setGap: (gap: number) => void;
|
|
244
|
-
measuredBlocks: Node<MeasuredBlock[]>;
|
|
245
|
-
blockFlow: Node<PositionedBlock[]>;
|
|
246
|
-
totalHeight: Node<number>;
|
|
247
|
-
};
|
|
248
|
-
/**
|
|
249
|
-
* Measure a single content block, returning natural (unconstrained) dimensions.
|
|
250
|
-
* Text blocks use the text layout pipeline; image/SVG use adapters or explicit dims.
|
|
251
|
-
*/
|
|
252
|
-
declare function measureBlock(block: ContentBlock, maxWidth: number, adapters: BlockAdapters, measureCache: Map<string, Map<string, number>>, defaultFont: string, defaultLineHeight: number, index: number): MeasuredBlock;
|
|
253
|
-
/**
|
|
254
|
-
* Measure all blocks in a content array.
|
|
255
|
-
*/
|
|
256
|
-
declare function measureBlocks(blocks: ContentBlock[], maxWidth: number, adapters: BlockAdapters, measureCache: Map<string, Map<string, number>>, defaultFont: string, defaultLineHeight: number): MeasuredBlock[];
|
|
257
|
-
/**
|
|
258
|
-
* Vertical stacking flow: blocks are placed top-to-bottom, left-aligned,
|
|
259
|
-
* separated by `gap` pixels. Pure arithmetic over measured sizes.
|
|
260
|
-
*/
|
|
261
|
-
declare function computeBlockFlow(measured: MeasuredBlock[], gap: number): PositionedBlock[];
|
|
262
|
-
/**
|
|
263
|
-
* Compute total height from positioned blocks.
|
|
264
|
-
*/
|
|
265
|
-
declare function computeTotalHeight(flow: PositionedBlock[]): number;
|
|
266
|
-
/**
|
|
267
|
-
* Create a reactive block layout graph for mixed content (text + image + SVG).
|
|
268
|
-
*
|
|
269
|
-
* ```
|
|
270
|
-
* Graph("reactive-block-layout")
|
|
271
|
-
* ├── state("blocks") — ContentBlock[] input
|
|
272
|
-
* ├── state("max-width") — container constraint
|
|
273
|
-
* ├── state("gap") — vertical gap (px)
|
|
274
|
-
* ├── derived("measured-blocks") — blocks + max-width → MeasuredBlock[]
|
|
275
|
-
* ├── derived("block-flow") — measured-blocks + gap → PositionedBlock[]
|
|
276
|
-
* ├── derived("total-height") — block-flow → number
|
|
277
|
-
* └── meta: { block-count, layout-time-ns }
|
|
278
|
-
* ```
|
|
279
|
-
*/
|
|
280
|
-
declare function reactiveBlockLayout(opts: ReactiveBlockLayoutOptions): ReactiveBlockLayoutBundle;
|
|
281
|
-
|
|
282
|
-
/** A circle obstacle. Center `(cx, cy)`, radius `r`; text keeps `padding` distance. */
|
|
283
|
-
type CircleObstacle = {
|
|
284
|
-
kind: "circle";
|
|
285
|
-
cx: number;
|
|
286
|
-
cy: number;
|
|
287
|
-
r: number;
|
|
288
|
-
/** Horizontal padding between obstacle and wrapped text (default 0). */
|
|
289
|
-
hPad?: number;
|
|
290
|
-
/** Vertical padding — band overlap tolerance (default 0). */
|
|
291
|
-
vPad?: number;
|
|
292
|
-
};
|
|
293
|
-
/** A rectangle obstacle. Top-left `(x, y)`, size `(w, h)`. */
|
|
294
|
-
type RectObstacle = {
|
|
295
|
-
kind: "rect";
|
|
296
|
-
x: number;
|
|
297
|
-
y: number;
|
|
298
|
-
w: number;
|
|
299
|
-
h: number;
|
|
300
|
-
hPad?: number;
|
|
301
|
-
vPad?: number;
|
|
302
|
-
};
|
|
303
|
-
/** Union of built-in obstacle shapes. */
|
|
304
|
-
type Obstacle = CircleObstacle | RectObstacle;
|
|
305
|
-
/**
|
|
306
|
-
* Compute the horizontal interval occluded by a circle at vertical band
|
|
307
|
-
* `[bandTop, bandBottom]`, or `null` if no occlusion.
|
|
308
|
-
*
|
|
309
|
-
* Exported so consumers that render obstacle outlines in sync with the flow
|
|
310
|
-
* can reuse the same geometry the flow engine uses — no divergence.
|
|
311
|
-
*/
|
|
312
|
-
declare function circleIntervalForBand(o: CircleObstacle, bandTop: number, bandBottom: number): Interval | null;
|
|
313
|
-
/** Same as `circleIntervalForBand` for rectangles. */
|
|
314
|
-
declare function rectIntervalForBand(o: RectObstacle, bandTop: number, bandBottom: number): Interval | null;
|
|
315
|
-
type FlowContainer = {
|
|
316
|
-
width: number;
|
|
317
|
-
height: number;
|
|
318
|
-
paddingX?: number;
|
|
319
|
-
paddingY?: number;
|
|
320
|
-
};
|
|
321
|
-
type FlowColumns = {
|
|
322
|
-
count: number;
|
|
323
|
-
gap: number;
|
|
324
|
-
};
|
|
325
|
-
/** A single positioned line after flow layout. */
|
|
326
|
-
type PositionedLine = {
|
|
327
|
-
x: number;
|
|
328
|
-
y: number;
|
|
329
|
-
/** Natural measured width of the text content. */
|
|
330
|
-
width: number;
|
|
331
|
-
/** Width of the slot this line was placed in — use this as the DOM element's
|
|
332
|
-
* `width` when applying `text-align: justify` so the line stretches to the
|
|
333
|
-
* obstacle edge on both sides. */
|
|
334
|
-
slotWidth: number;
|
|
335
|
-
text: string;
|
|
336
|
-
/** Which column index this line belongs to (0-based). */
|
|
337
|
-
columnIndex: number;
|
|
338
|
-
/** `true` iff the slot's right edge was carved short by an obstacle (the
|
|
339
|
-
* slot sits to the LEFT of an obstacle). Renderers can right-align text
|
|
340
|
-
* in these slots so single-word lines still hug the obstacle — CSS
|
|
341
|
-
* `text-align: justify` can't stretch single-word lines, which otherwise
|
|
342
|
-
* produces a visible asymmetry vs. the slot on the other side of the
|
|
343
|
-
* obstacle (which is flush by default). */
|
|
344
|
-
flushToRight: boolean;
|
|
345
|
-
};
|
|
346
|
-
/** Options for `reactiveFlowLayout`. */
|
|
347
|
-
type ReactiveFlowLayoutOptions = {
|
|
348
|
-
adapter: MeasurementAdapter;
|
|
349
|
-
name?: string;
|
|
350
|
-
text?: string;
|
|
351
|
-
font?: string;
|
|
352
|
-
lineHeight?: number;
|
|
353
|
-
container?: FlowContainer;
|
|
354
|
-
columns?: FlowColumns;
|
|
355
|
-
obstacles?: Obstacle[];
|
|
356
|
-
/** Minimum slot width (px) below which a slot is discarded rather than squeezed. Default `20`. */
|
|
357
|
-
minSlotWidth?: number;
|
|
358
|
-
/**
|
|
359
|
-
* Vertical gap (px) inserted after a hard-break segment (the spacing
|
|
360
|
-
* between paragraphs). When unset (or explicitly set to `null`), tracks
|
|
361
|
-
* the current `lineHeight` reactively — one line-height of visible
|
|
362
|
-
* paragraph gap, matching dense editorial layouts. Set to `0` for
|
|
363
|
-
* paragraph-preserving layout that reclaims the break line; set larger
|
|
364
|
-
* (e.g. `2 * lineHeight`) for looser manuscript settings. Reactive —
|
|
365
|
-
* update via `setParagraphSpacing(n)` or restore to track-lineHeight
|
|
366
|
-
* mode via `setParagraphSpacing(null)`.
|
|
367
|
-
*/
|
|
368
|
-
paragraphSpacing?: number | null;
|
|
369
|
-
};
|
|
370
|
-
/** Result bundle from `reactiveFlowLayout`. */
|
|
371
|
-
type ReactiveFlowLayoutBundle = {
|
|
372
|
-
graph: Graph;
|
|
373
|
-
setText: (text: string) => void;
|
|
374
|
-
setFont: (font: string) => void;
|
|
375
|
-
setLineHeight: (lh: number) => void;
|
|
376
|
-
setContainer: (c: FlowContainer) => void;
|
|
377
|
-
setColumns: (c: FlowColumns) => void;
|
|
378
|
-
setObstacles: (o: Obstacle[]) => void;
|
|
379
|
-
setParagraphSpacing: (ps: number | null) => void;
|
|
380
|
-
segments: Node<PreparedSegment[]>;
|
|
381
|
-
flowLines: Node<PositionedLine[]>;
|
|
382
|
-
};
|
|
383
|
-
/** Result of `computeFlowLines`. */
|
|
384
|
-
type FlowLinesResult = {
|
|
385
|
-
/** Positioned lines in render order (columns inner-ordered top-to-bottom). */
|
|
386
|
-
lines: PositionedLine[];
|
|
387
|
-
/** Cursor position after the last line was placed. If
|
|
388
|
-
* `cursor.segmentIndex < segments.length`, the layout **truncated** — the
|
|
389
|
-
* container couldn't fit all text. */
|
|
390
|
-
cursor: LayoutCursor;
|
|
391
|
-
};
|
|
392
|
-
/** Optional tuning knobs for {@link computeFlowLines}. */
|
|
393
|
-
type ComputeFlowLinesOptions = {
|
|
394
|
-
/**
|
|
395
|
-
* Vertical gap (px) inserted after a hard-break segment (the spacing
|
|
396
|
-
* between paragraphs). Defaults to `lineHeight` — one line-height of
|
|
397
|
-
* visible paragraph gap, which matches dense editorial layouts. Set to
|
|
398
|
-
* `0` for paragraph-preserving layout that reclaims the break line;
|
|
399
|
-
* set larger (e.g. `2 * lineHeight`) for looser manuscript settings.
|
|
400
|
-
*/
|
|
401
|
-
paragraphSpacing?: number;
|
|
402
|
-
};
|
|
403
|
-
/**
|
|
404
|
-
* Lay out `segments` across N columns, wrapping each line around `obstacles`.
|
|
405
|
-
* Pure function — no reactive wiring. Exported for testing and for consumers
|
|
406
|
-
* who want to run flow layout outside a Graph.
|
|
407
|
-
*
|
|
408
|
-
* `carveTextLineSlots` guarantees left-to-right-ordered, non-overlapping slots,
|
|
409
|
-
* so this function does not sort them.
|
|
410
|
-
*/
|
|
411
|
-
declare function computeFlowLines(segments: PreparedSegment[], container: FlowContainer, columns: FlowColumns, obstacles: Obstacle[], lineHeight: number, minSlotWidth: number, opts?: ComputeFlowLinesOptions): FlowLinesResult;
|
|
412
|
-
/**
|
|
413
|
-
* Create a reactive flow-layout graph: N columns of text wrapping around
|
|
414
|
-
* shape obstacles. Re-runs only the dependent derived nodes on any input
|
|
415
|
-
* change. Obstacle movement (e.g. rAF-driven) invalidates `flow-lines` only;
|
|
416
|
-
* `segments` stays cached as long as `text`/`font` don't change.
|
|
417
|
-
*
|
|
418
|
-
* @example
|
|
419
|
-
* ```ts
|
|
420
|
-
* import { fromRaf, reactiveFlowLayout } from "@graphrefly/graphrefly-ts";
|
|
421
|
-
*
|
|
422
|
-
* const flow = reactiveFlowLayout({
|
|
423
|
-
* adapter: new CanvasMeasureAdapter(),
|
|
424
|
-
* text: longEssay,
|
|
425
|
-
* font: "18px serif",
|
|
426
|
-
* lineHeight: 26,
|
|
427
|
-
* container: { width: 900, height: 600, paddingX: 40, paddingY: 40 },
|
|
428
|
-
* columns: { count: 2, gap: 32 },
|
|
429
|
-
* obstacles: [{ kind: "circle", cx: 450, cy: 300, r: 80 }],
|
|
430
|
-
* });
|
|
431
|
-
*
|
|
432
|
-
* // Animate the obstacle via rAF:
|
|
433
|
-
* fromRaf().subscribe(([[, t]]) => {
|
|
434
|
-
* const x = 450 + 120 * Math.sin((t as number) * 0.001);
|
|
435
|
-
* flow.setObstacles([{ kind: "circle", cx: x, cy: 300, r: 80 }]);
|
|
436
|
-
* });
|
|
437
|
-
* ```
|
|
438
|
-
*/
|
|
439
|
-
declare function reactiveFlowLayout(opts: ReactiveFlowLayoutOptions): ReactiveFlowLayoutBundle;
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* Reactive layout pattern — standalone subpath export.
|
|
443
|
-
*
|
|
444
|
-
* ```ts
|
|
445
|
-
* import { reactiveLayout, CliMeasureAdapter } from "@graphrefly/graphrefly-ts/reactive-layout";
|
|
446
|
-
* ```
|
|
447
|
-
*/
|
|
448
|
-
|
|
449
|
-
type index_BlockAdapters = BlockAdapters;
|
|
450
|
-
type index_CanvasMeasureAdapter = CanvasMeasureAdapter;
|
|
451
|
-
declare const index_CanvasMeasureAdapter: typeof CanvasMeasureAdapter;
|
|
452
|
-
type index_CanvasMeasureAdapterOptions = CanvasMeasureAdapterOptions;
|
|
453
|
-
type index_CanvasModule = CanvasModule;
|
|
454
|
-
declare const index_CharPosition: typeof CharPosition;
|
|
455
|
-
type index_CircleObstacle = CircleObstacle;
|
|
456
|
-
type index_CliMeasureAdapter = CliMeasureAdapter;
|
|
457
|
-
declare const index_CliMeasureAdapter: typeof CliMeasureAdapter;
|
|
458
|
-
type index_CliMeasureAdapterOptions = CliMeasureAdapterOptions;
|
|
459
|
-
type index_ComputeFlowLinesOptions = ComputeFlowLinesOptions;
|
|
460
|
-
type index_ContentBlock = ContentBlock;
|
|
461
|
-
type index_FlowColumns = FlowColumns;
|
|
462
|
-
type index_FlowContainer = FlowContainer;
|
|
463
|
-
type index_FlowLinesResult = FlowLinesResult;
|
|
464
|
-
type index_ImageMeasurer = ImageMeasurer;
|
|
465
|
-
type index_ImageSizeAdapter = ImageSizeAdapter;
|
|
466
|
-
declare const index_ImageSizeAdapter: typeof ImageSizeAdapter;
|
|
467
|
-
declare const index_Interval: typeof Interval;
|
|
468
|
-
declare const index_LayoutCursor: typeof LayoutCursor;
|
|
469
|
-
declare const index_LayoutLine: typeof LayoutLine;
|
|
470
|
-
declare const index_LayoutNextLineContext: typeof LayoutNextLineContext;
|
|
471
|
-
declare const index_LayoutNextLineResult: typeof LayoutNextLineResult;
|
|
472
|
-
declare const index_LineBreaksResult: typeof LineBreaksResult;
|
|
473
|
-
type index_MeasuredBlock = MeasuredBlock;
|
|
474
|
-
declare const index_MeasurementAdapter: typeof MeasurementAdapter;
|
|
475
|
-
type index_NodeCanvasMeasureAdapter = NodeCanvasMeasureAdapter;
|
|
476
|
-
declare const index_NodeCanvasMeasureAdapter: typeof NodeCanvasMeasureAdapter;
|
|
477
|
-
type index_Obstacle = Obstacle;
|
|
478
|
-
type index_PositionedBlock = PositionedBlock;
|
|
479
|
-
type index_PositionedLine = PositionedLine;
|
|
480
|
-
type index_PrecomputedAdapter = PrecomputedAdapter;
|
|
481
|
-
declare const index_PrecomputedAdapter: typeof PrecomputedAdapter;
|
|
482
|
-
type index_PrecomputedAdapterOptions = PrecomputedAdapterOptions;
|
|
483
|
-
declare const index_PreparedSegment: typeof PreparedSegment;
|
|
484
|
-
type index_ReactiveBlockLayoutBundle = ReactiveBlockLayoutBundle;
|
|
485
|
-
type index_ReactiveBlockLayoutOptions = ReactiveBlockLayoutOptions;
|
|
486
|
-
type index_ReactiveFlowLayoutBundle = ReactiveFlowLayoutBundle;
|
|
487
|
-
type index_ReactiveFlowLayoutOptions = ReactiveFlowLayoutOptions;
|
|
488
|
-
declare const index_ReactiveLayoutBundle: typeof ReactiveLayoutBundle;
|
|
489
|
-
declare const index_ReactiveLayoutOptions: typeof ReactiveLayoutOptions;
|
|
490
|
-
type index_RectObstacle = RectObstacle;
|
|
491
|
-
declare const index_SegmentBreakKind: typeof SegmentBreakKind;
|
|
492
|
-
declare const index_SegmentMeasureStats: typeof SegmentMeasureStats;
|
|
493
|
-
type index_SvgBoundsAdapter = SvgBoundsAdapter;
|
|
494
|
-
declare const index_SvgBoundsAdapter: typeof SvgBoundsAdapter;
|
|
495
|
-
type index_SvgMeasurer = SvgMeasurer;
|
|
496
|
-
declare const index_analyzeAndMeasure: typeof analyzeAndMeasure;
|
|
497
|
-
declare const index_carveTextLineSlots: typeof carveTextLineSlots;
|
|
498
|
-
declare const index_circleIntervalForBand: typeof circleIntervalForBand;
|
|
499
|
-
declare const index_computeBlockFlow: typeof computeBlockFlow;
|
|
500
|
-
declare const index_computeCharPositions: typeof computeCharPositions;
|
|
501
|
-
declare const index_computeFlowLines: typeof computeFlowLines;
|
|
502
|
-
declare const index_computeLineBreaks: typeof computeLineBreaks;
|
|
503
|
-
declare const index_computeTotalHeight: typeof computeTotalHeight;
|
|
504
|
-
declare const index_layoutNextLine: typeof layoutNextLine;
|
|
505
|
-
declare const index_measureBlock: typeof measureBlock;
|
|
506
|
-
declare const index_measureBlocks: typeof measureBlocks;
|
|
507
|
-
declare const index_reactiveBlockLayout: typeof reactiveBlockLayout;
|
|
508
|
-
declare const index_reactiveFlowLayout: typeof reactiveFlowLayout;
|
|
509
|
-
declare const index_reactiveLayout: typeof reactiveLayout;
|
|
510
|
-
declare const index_rectIntervalForBand: typeof rectIntervalForBand;
|
|
511
|
-
declare namespace index {
|
|
512
|
-
export { type index_BlockAdapters as BlockAdapters, index_CanvasMeasureAdapter as CanvasMeasureAdapter, type index_CanvasMeasureAdapterOptions as CanvasMeasureAdapterOptions, type index_CanvasModule as CanvasModule, index_CharPosition as CharPosition, type index_CircleObstacle as CircleObstacle, index_CliMeasureAdapter as CliMeasureAdapter, type index_CliMeasureAdapterOptions as CliMeasureAdapterOptions, type index_ComputeFlowLinesOptions as ComputeFlowLinesOptions, type index_ContentBlock as ContentBlock, type index_FlowColumns as FlowColumns, type index_FlowContainer as FlowContainer, type index_FlowLinesResult as FlowLinesResult, type index_ImageMeasurer as ImageMeasurer, index_ImageSizeAdapter as ImageSizeAdapter, index_Interval as Interval, index_LayoutCursor as LayoutCursor, index_LayoutLine as LayoutLine, index_LayoutNextLineContext as LayoutNextLineContext, index_LayoutNextLineResult as LayoutNextLineResult, index_LineBreaksResult as LineBreaksResult, type index_MeasuredBlock as MeasuredBlock, index_MeasurementAdapter as MeasurementAdapter, index_NodeCanvasMeasureAdapter as NodeCanvasMeasureAdapter, type index_Obstacle as Obstacle, type index_PositionedBlock as PositionedBlock, type index_PositionedLine as PositionedLine, index_PrecomputedAdapter as PrecomputedAdapter, type index_PrecomputedAdapterOptions as PrecomputedAdapterOptions, index_PreparedSegment as PreparedSegment, type index_ReactiveBlockLayoutBundle as ReactiveBlockLayoutBundle, type index_ReactiveBlockLayoutOptions as ReactiveBlockLayoutOptions, type index_ReactiveFlowLayoutBundle as ReactiveFlowLayoutBundle, type index_ReactiveFlowLayoutOptions as ReactiveFlowLayoutOptions, index_ReactiveLayoutBundle as ReactiveLayoutBundle, index_ReactiveLayoutOptions as ReactiveLayoutOptions, type index_RectObstacle as RectObstacle, index_SegmentBreakKind as SegmentBreakKind, index_SegmentMeasureStats as SegmentMeasureStats, index_SvgBoundsAdapter as SvgBoundsAdapter, type index_SvgMeasurer as SvgMeasurer, index_analyzeAndMeasure as analyzeAndMeasure, index_carveTextLineSlots as carveTextLineSlots, index_circleIntervalForBand as circleIntervalForBand, index_computeBlockFlow as computeBlockFlow, index_computeCharPositions as computeCharPositions, index_computeFlowLines as computeFlowLines, index_computeLineBreaks as computeLineBreaks, index_computeTotalHeight as computeTotalHeight, index_layoutNextLine as layoutNextLine, index_measureBlock as measureBlock, index_measureBlocks as measureBlocks, index_reactiveBlockLayout as reactiveBlockLayout, index_reactiveFlowLayout as reactiveFlowLayout, index_reactiveLayout as reactiveLayout, index_rectIntervalForBand as rectIntervalForBand };
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
export { reactiveFlowLayout as A, type BlockAdapters as B, CanvasMeasureAdapter as C, rectIntervalForBand as D, type FlowColumns as F, type ImageMeasurer as I, type MeasuredBlock as M, NodeCanvasMeasureAdapter as N, type Obstacle as O, type PositionedBlock as P, type ReactiveBlockLayoutBundle as R, SvgBoundsAdapter as S, type CanvasMeasureAdapterOptions as a, type CanvasModule as b, type CircleObstacle as c, CliMeasureAdapter as d, type CliMeasureAdapterOptions as e, type ComputeFlowLinesOptions as f, type ContentBlock as g, type FlowContainer as h, index as i, type FlowLinesResult as j, ImageSizeAdapter as k, type PositionedLine as l, PrecomputedAdapter as m, type PrecomputedAdapterOptions as n, type ReactiveBlockLayoutOptions as o, type ReactiveFlowLayoutBundle as p, type ReactiveFlowLayoutOptions as q, type RectObstacle as r, type SvgMeasurer as s, circleIntervalForBand as t, computeBlockFlow as u, computeFlowLines as v, computeTotalHeight as w, measureBlock as x, measureBlocks as y, reactiveBlockLayout as z };
|
package/dist/index-DIOoAZUX.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { N as Node } from './node-ClS5yC-B.js';
|
|
2
|
-
|
|
3
|
-
/** Svelte store contract — implements the minimal `subscribe` method. */
|
|
4
|
-
interface SvelteReadable<T> {
|
|
5
|
-
subscribe(run: (value: T) => void): () => void;
|
|
6
|
-
}
|
|
7
|
-
/** Svelte writable store contract. */
|
|
8
|
-
interface SvelteWritable<T> extends SvelteReadable<T> {
|
|
9
|
-
set(value: T): void;
|
|
10
|
-
update(updater: (value: T) => T): void;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Subscribe to a `Node<T>` as a Svelte readable store (implements Svelte store contract).
|
|
14
|
-
* Subscription lifecycle is tied to Svelte store unsubscription (not node terminal messages).
|
|
15
|
-
*/
|
|
16
|
-
declare function useSubscribe<T>(node: Node<T>): SvelteReadable<T | undefined | null>;
|
|
17
|
-
/**
|
|
18
|
-
* Bind a writable `Node<T>` as a Svelte writable store.
|
|
19
|
-
* Reads and writes adapt seamlessly.
|
|
20
|
-
* Setter/update always forward `[[DIRTY], [DATA, value]]`, including `value === undefined`.
|
|
21
|
-
* Subscription lifecycle is tied to Svelte store unsubscription (not node terminal messages).
|
|
22
|
-
*/
|
|
23
|
-
declare function useStore<T>(node: Node<T>): SvelteWritable<T | undefined | null>;
|
|
24
|
-
/** Maps a key to an object of nodes. Used by `useSubscribeRecord`. */
|
|
25
|
-
type NodeFactory<K, R extends Record<string, any>> = (key: K) => {
|
|
26
|
-
[P in keyof R]: Node<R[P]>;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Subscribe to a dynamic keyed record of nodes as a Svelte readable store.
|
|
30
|
-
* Re-subscribes all per-key fields whenever `keysNode` changes.
|
|
31
|
-
* Key re-sync is gated to settled batches (`messageTier >= 3`) to avoid DIRTY-phase churn.
|
|
32
|
-
*/
|
|
33
|
-
declare function useSubscribeRecord<K extends string, R extends Record<string, any>>(keysNode: Node<K[]>, factory: NodeFactory<K, R>): SvelteReadable<Record<K, R>>;
|
|
34
|
-
|
|
35
|
-
type index_NodeFactory<K, R extends Record<string, any>> = NodeFactory<K, R>;
|
|
36
|
-
type index_SvelteReadable<T> = SvelteReadable<T>;
|
|
37
|
-
type index_SvelteWritable<T> = SvelteWritable<T>;
|
|
38
|
-
declare const index_useStore: typeof useStore;
|
|
39
|
-
declare const index_useSubscribe: typeof useSubscribe;
|
|
40
|
-
declare const index_useSubscribeRecord: typeof useSubscribeRecord;
|
|
41
|
-
declare namespace index {
|
|
42
|
-
export { type index_NodeFactory as NodeFactory, type index_SvelteReadable as SvelteReadable, type index_SvelteWritable as SvelteWritable, index_useStore as useStore, index_useSubscribe as useSubscribe, index_useSubscribeRecord as useSubscribeRecord };
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export { type NodeFactory as N, type SvelteReadable as S, type SvelteWritable as a, useSubscribe as b, useSubscribeRecord as c, index as i, useStore as u };
|