@graphrefly/ts 0.0.1 → 0.0.3
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 +197 -117
- package/dist/actions-types-CH-XCU9O.d.cts +657 -0
- package/dist/actions-types-w2iPQTkv.d.ts +657 -0
- package/dist/adapters/index.cjs +5157 -2951
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.d.cts +207 -70
- package/dist/adapters/index.d.ts +207 -70
- package/dist/adapters/index.js +3738 -1688
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/nestjs/microservices.cjs +841 -0
- package/dist/adapters/nestjs/microservices.cjs.map +1 -0
- package/dist/adapters/nestjs/microservices.d.cts +45 -0
- package/dist/adapters/nestjs/microservices.d.ts +45 -0
- package/dist/adapters/nestjs/microservices.js +206 -0
- package/dist/adapters/nestjs/microservices.js.map +1 -0
- package/dist/adapters/nestjs/native.cjs +1391 -0
- package/dist/adapters/nestjs/native.cjs.map +1 -0
- package/dist/adapters/nestjs/native.d.cts +111 -0
- package/dist/adapters/nestjs/native.d.ts +111 -0
- package/dist/adapters/nestjs/native.js +577 -0
- package/dist/adapters/nestjs/native.js.map +1 -0
- package/dist/adapters/nestjs/websockets.cjs +924 -0
- package/dist/adapters/nestjs/websockets.cjs.map +1 -0
- package/dist/adapters/nestjs/websockets.d.cts +47 -0
- package/dist/adapters/nestjs/websockets.d.ts +47 -0
- package/dist/adapters/nestjs/websockets.js +286 -0
- package/dist/adapters/nestjs/websockets.js.map +1 -0
- package/dist/adapters/nestjs.cjs +1085 -0
- package/dist/adapters/nestjs.cjs.map +1 -0
- package/dist/adapters/nestjs.d.cts +385 -0
- package/dist/adapters/nestjs.d.ts +385 -0
- package/dist/adapters/nestjs.js +112 -0
- package/dist/adapters/nestjs.js.map +1 -0
- package/dist/adapters/observe-storage.d.cts +3 -3
- package/dist/adapters/observe-storage.d.ts +3 -3
- package/dist/adapters/observe-storage.js +4 -4
- package/dist/adapters/react.cjs.map +1 -1
- package/dist/adapters/react.d.cts +2 -2
- package/dist/adapters/react.d.ts +2 -2
- package/dist/adapters/react.js +1 -1
- package/dist/adapters/solid.cjs.map +1 -1
- package/dist/adapters/solid.d.cts +2 -2
- package/dist/adapters/solid.d.ts +2 -2
- package/dist/adapters/solid.js +1 -1
- package/dist/adapters/svelte.cjs.map +1 -1
- package/dist/adapters/svelte.d.cts +2 -2
- package/dist/adapters/svelte.d.ts +2 -2
- package/dist/adapters/svelte.js +1 -1
- package/dist/adapters/vue.cjs.map +1 -1
- package/dist/adapters/vue.d.cts +2 -2
- package/dist/adapters/vue.d.ts +2 -2
- package/dist/adapters/vue.js +1 -1
- package/dist/{agent-runtime-BesGDZcB.d.ts → agent-runtime-types-core-CKwrBDyi.d.ts} +171 -320
- package/dist/{agent-runtime-DZTJ3C-p.d.cts → agent-runtime-types-core-bfl4m0vM.d.cts} +171 -320
- package/dist/agent-runtime-types-tool-BLPV3azj.d.cts +695 -0
- package/dist/agent-runtime-types-tool-hwqvVqNt.d.ts +695 -0
- package/dist/agentic-memory-retention-CLwI76JK.d.ts +14 -0
- package/dist/agentic-memory-retention-Cz8GR6ie.d.cts +14 -0
- package/dist/{agentic-memory-DfuVZ-lY.d.cts → agentic-memory-types-JDr7MPhh.d.cts} +13 -57
- package/dist/{agentic-memory-BmRCvh0d.d.ts → agentic-memory-types-khYJgzKL.d.ts} +13 -57
- package/dist/{capability-admission-B0BzqAm5.d.cts → capability-admission-B8RNFyaZ.d.cts} +3 -3
- package/dist/{capability-admission-g0mn9hpq.d.ts → capability-admission-Dkw1Xz3r.d.ts} +3 -3
- package/dist/chunk-2KUAG2GZ.js +9693 -0
- package/dist/chunk-2KUAG2GZ.js.map +1 -0
- package/dist/{chunk-CZNV3VXM.js → chunk-3J7UPZL5.js} +11 -11
- package/dist/{chunk-HKK2JD7Z.js → chunk-3LYI6ADX.js} +12 -125
- package/dist/chunk-3LYI6ADX.js.map +1 -0
- package/dist/{chunk-YXMZ2N6J.js → chunk-4M37FH2I.js} +1071 -1025
- package/dist/chunk-4M37FH2I.js.map +1 -0
- package/dist/{chunk-YDSIVHRR.js → chunk-4NWSNI4K.js} +1598 -1584
- package/dist/chunk-4NWSNI4K.js.map +1 -0
- package/dist/{chunk-Z2ANQ6JW.js → chunk-4Q77MMJY.js} +2 -2
- package/dist/{chunk-SS2A464I.js → chunk-54WPEODM.js} +3 -3
- package/dist/chunk-54WPEODM.js.map +1 -0
- package/dist/chunk-6E76H4OU.js +132 -0
- package/dist/chunk-6E76H4OU.js.map +1 -0
- package/dist/chunk-7GOTIIQ7.js +819 -0
- package/dist/chunk-7GOTIIQ7.js.map +1 -0
- package/dist/{chunk-V7CIJE4B.js → chunk-DKFWDTVY.js} +92 -9
- package/dist/chunk-DKFWDTVY.js.map +1 -0
- package/dist/{chunk-FBUU43PM.js → chunk-E4QCH32M.js} +448 -446
- package/dist/chunk-E4QCH32M.js.map +1 -0
- package/dist/{chunk-XKXWK2KP.js → chunk-GXU6WFEJ.js} +1157 -1021
- package/dist/chunk-GXU6WFEJ.js.map +1 -0
- package/dist/{chunk-K3FXTC3I.js → chunk-HJACH5PU.js} +3 -3
- package/dist/{chunk-GTPCOEOZ.js → chunk-IDMLXLLG.js} +3 -3
- package/dist/{chunk-DKP56CSW.js → chunk-JKAYLDQV.js} +2 -2
- package/dist/{chunk-4VLAQHZI.js → chunk-K7FB3JTD.js} +17 -1
- package/dist/chunk-K7FB3JTD.js.map +1 -0
- package/dist/{chunk-43BKLFZU.js → chunk-KFURM6FM.js} +10 -10
- package/dist/{chunk-H75VXTGT.js → chunk-L6LDXRWE.js} +3 -3
- package/dist/{chunk-H75VXTGT.js.map → chunk-L6LDXRWE.js.map} +1 -1
- package/dist/chunk-MCOFHMUU.js +4131 -0
- package/dist/chunk-MCOFHMUU.js.map +1 -0
- package/dist/chunk-MQEQMS7B.js +1009 -0
- package/dist/chunk-MQEQMS7B.js.map +1 -0
- package/dist/chunk-MTELVIYR.js +1421 -0
- package/dist/chunk-MTELVIYR.js.map +1 -0
- package/dist/{chunk-3JR3EDB2.js → chunk-NNDIFUKX.js} +121 -115
- package/dist/chunk-NNDIFUKX.js.map +1 -0
- package/dist/{chunk-2747WN4Y.js → chunk-PUSRRALM.js} +3 -3
- package/dist/{chunk-QFY4AFY4.js → chunk-PVC7WDKI.js} +58 -52
- package/dist/chunk-PVC7WDKI.js.map +1 -0
- package/dist/{chunk-VTHLCFN4.js → chunk-RAHNUYA5.js} +2 -2
- package/dist/chunk-TQPCAIQI.js +612 -0
- package/dist/chunk-TQPCAIQI.js.map +1 -0
- package/dist/{chunk-IXZBUWSP.js → chunk-UEMN5URK.js} +2 -2
- package/dist/chunk-WOS7RJYZ.js +1320 -0
- package/dist/chunk-WOS7RJYZ.js.map +1 -0
- package/dist/{chunk-6PHB5CJS.js → chunk-ZLFRB6FI.js} +2 -2
- package/dist/composition/index.cjs +1228 -1076
- package/dist/composition/index.cjs.map +1 -1
- package/dist/composition/index.d.cts +3 -3
- package/dist/composition/index.d.ts +3 -3
- package/dist/composition/index.js +4 -4
- package/dist/core/index.cjs +1198 -1046
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +23 -2
- package/dist/core/index.d.ts +23 -2
- package/dist/core/index.js +2 -2
- package/dist/cqrs/index.d.cts +3 -3
- package/dist/cqrs/index.d.ts +3 -3
- package/dist/cqrs/messaging.d.cts +4 -4
- package/dist/cqrs/messaging.d.ts +4 -4
- package/dist/cqrs/work-queue.d.cts +5 -5
- package/dist/cqrs/work-queue.d.ts +5 -5
- package/dist/data-structures/index.cjs +1226 -1074
- package/dist/data-structures/index.cjs.map +1 -1
- package/dist/data-structures/index.d.cts +8 -7
- package/dist/data-structures/index.d.ts +8 -7
- package/dist/data-structures/index.js +6 -5
- package/dist/{describe-DYMw_l1C.d.cts → describe-BumQ-3_0.d.cts} +1 -1
- package/dist/{describe-BpyJuWkw.d.ts → describe-cYr_Z5zm.d.ts} +1 -1
- package/dist/executors/tool-provider-adapters.cjs +3091 -0
- package/dist/executors/tool-provider-adapters.cjs.map +1 -0
- package/dist/executors/tool-provider-adapters.d.cts +174 -0
- package/dist/executors/tool-provider-adapters.d.ts +174 -0
- package/dist/executors/tool-provider-adapters.js +1336 -0
- package/dist/executors/tool-provider-adapters.js.map +1 -0
- package/dist/executors/tool-provider-runtime.cjs +5178 -0
- package/dist/executors/tool-provider-runtime.cjs.map +1 -0
- package/dist/executors/tool-provider-runtime.d.cts +17 -0
- package/dist/executors/tool-provider-runtime.d.ts +17 -0
- package/dist/executors/tool-provider-runtime.js +15 -0
- package/dist/executors/tool-provider-runtime.js.map +1 -0
- package/dist/executors/tool-provider.cjs +6392 -0
- package/dist/executors/tool-provider.cjs.map +1 -0
- package/dist/executors/tool-provider.d.cts +60 -0
- package/dist/executors/tool-provider.d.ts +60 -0
- package/dist/executors/tool-provider.js +89 -0
- package/dist/executors/tool-provider.js.map +1 -0
- package/dist/executors/work-queue.d.cts +6 -6
- package/dist/executors/work-queue.d.ts +6 -6
- package/dist/graph/index.cjs +1499 -1341
- package/dist/graph/index.cjs.map +1 -1
- package/dist/graph/index.d.cts +9 -8
- package/dist/graph/index.d.ts +9 -8
- package/dist/graph/index.js +23 -22
- package/dist/{graph-DCEWh4T2.d.cts → graph-C1C-wb0L.d.cts} +266 -137
- package/dist/{graph-D-1-SQeC.d.ts → graph-CS0b4V9B.d.ts} +266 -137
- package/dist/{index-72VZC0-E.d.cts → index-DLrNopda.d.cts} +151 -10
- package/dist/{index-Bmxeu0nK.d.ts → index-DzJni3_6.d.ts} +151 -10
- package/dist/index.cjs +3397 -3140
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -9
- package/dist/index.d.ts +12 -9
- package/dist/index.js +110 -109
- package/dist/inspection/boundary.d.cts +4 -4
- package/dist/inspection/boundary.d.ts +4 -4
- package/dist/measurements-BWAnochv.d.ts +294 -0
- package/dist/measurements-B_gJfD8h.d.cts +294 -0
- package/dist/messaging/index.cjs +57 -51
- package/dist/messaging/index.cjs.map +1 -1
- package/dist/messaging/index.d.cts +11 -276
- package/dist/messaging/index.d.ts +11 -276
- package/dist/messaging/index.js +1 -1
- package/dist/operators/index.cjs +1228 -1076
- package/dist/operators/index.cjs.map +1 -1
- package/dist/operators/index.d.cts +5 -5
- package/dist/operators/index.d.ts +5 -5
- package/dist/operators/index.js +5 -5
- package/dist/orchestration/index.cjs +8844 -6071
- package/dist/orchestration/index.cjs.map +1 -1
- package/dist/orchestration/index.d.cts +171 -224
- package/dist/orchestration/index.d.ts +171 -224
- package/dist/orchestration/index.js +42 -991
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/messaging.d.cts +5 -8
- package/dist/orchestration/messaging.d.ts +5 -8
- package/dist/orchestration/work-queue.cjs +1243 -5
- package/dist/orchestration/work-queue.cjs.map +1 -1
- package/dist/orchestration/work-queue.d.cts +121 -10
- package/dist/orchestration/work-queue.d.ts +121 -10
- package/dist/orchestration/work-queue.js +1067 -4
- package/dist/orchestration/work-queue.js.map +1 -1
- package/dist/patterns/event-flow.cjs +6 -20
- package/dist/patterns/event-flow.cjs.map +1 -1
- package/dist/patterns/event-flow.d.cts +4 -4
- package/dist/patterns/event-flow.d.ts +4 -4
- package/dist/patterns/event-flow.js +2 -2
- package/dist/patterns/index.cjs +453 -465
- package/dist/patterns/index.cjs.map +1 -1
- package/dist/patterns/index.d.cts +6 -5
- package/dist/patterns/index.d.ts +6 -5
- package/dist/patterns/index.js +3 -3
- package/dist/process-types-BB7oRhX3.d.cts +200 -0
- package/dist/process-types-QNhyoYJ8.d.ts +200 -0
- package/dist/{reactive-collection-DNV0-gFi.d.cts → reactive-collection-BYlWvtnp.d.cts} +4 -34
- package/dist/{reactive-collection-BAmfrGjd.d.ts → reactive-collection-efOEdGFN.d.ts} +4 -34
- package/dist/{reactive-collection-storage-BNEldDyi.d.cts → reactive-collection-storage-BjoLsoiC.d.cts} +5 -5
- package/dist/{reactive-collection-storage-YZsAQsWK.d.ts → reactive-collection-storage-DwW6UuK_.d.ts} +5 -5
- package/dist/{reactive-map-DRD1LJ2H.d.cts → reactive-map-BHacbIqz.d.cts} +7 -2
- package/dist/{reactive-map-EsDiCmJk.d.ts → reactive-map-DN4Jyqnf.d.ts} +7 -2
- package/dist/render/index.d.cts +2 -2
- package/dist/render/index.d.ts +2 -2
- package/dist/scheduled-readiness-BmqXxnzX.d.ts +91 -0
- package/dist/scheduled-readiness-CYSw7KDE.d.cts +91 -0
- package/dist/semantic-memory-graph-B_LwbM-E.d.cts +30 -0
- package/dist/semantic-memory-graph-rsFNNhwn.d.ts +30 -0
- package/dist/{semantic-memory-graph-DKuNzuWw.d.cts → semantic-memory-graph-types-Y73bbwVI.d.cts} +2 -28
- package/dist/{semantic-memory-graph-uwbwJdhe.d.ts → semantic-memory-graph-types-safmPkuX.d.ts} +2 -28
- package/dist/solutions/index.cjs +6353 -6169
- package/dist/solutions/index.cjs.map +1 -1
- package/dist/solutions/index.d.cts +12 -10
- package/dist/solutions/index.d.ts +12 -10
- package/dist/solutions/index.js +5 -5
- package/dist/solutions/reactive-layout/browser/index.cjs +116 -108
- package/dist/solutions/reactive-layout/browser/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/browser/index.d.cts +4 -4
- package/dist/solutions/reactive-layout/browser/index.d.ts +4 -4
- package/dist/solutions/reactive-layout/browser/index.js +3 -3
- package/dist/solutions/reactive-layout/index.cjs +3578 -3350
- package/dist/solutions/reactive-layout/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/index.d.cts +32 -576
- package/dist/solutions/reactive-layout/index.d.ts +32 -576
- package/dist/solutions/reactive-layout/index.js +65 -5
- package/dist/solutions/reactive-layout/node-canvas/index.cjs +127 -117
- package/dist/solutions/reactive-layout/node-canvas/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/node-canvas/index.d.cts +4 -4
- package/dist/solutions/reactive-layout/node-canvas/index.d.ts +4 -4
- package/dist/solutions/reactive-layout/node-canvas/index.js +3 -3
- package/dist/solutions/reactive-layout/react-native/index.cjs +127 -117
- package/dist/solutions/reactive-layout/react-native/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/react-native/index.d.cts +4 -4
- package/dist/solutions/reactive-layout/react-native/index.d.ts +4 -4
- package/dist/solutions/reactive-layout/react-native/index.js +3 -3
- package/dist/solutions/reactive-layout/skia/index.cjs +127 -117
- package/dist/solutions/reactive-layout/skia/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/skia/index.d.cts +4 -4
- package/dist/solutions/reactive-layout/skia/index.d.ts +4 -4
- package/dist/solutions/reactive-layout/skia/index.js +3 -3
- package/dist/solutions/work-item/actions.cjs +1609 -1428
- package/dist/solutions/work-item/actions.cjs.map +1 -1
- package/dist/solutions/work-item/actions.d.cts +23 -184
- package/dist/solutions/work-item/actions.d.ts +23 -184
- package/dist/solutions/work-item/actions.js +1558 -934
- package/dist/solutions/work-item/actions.js.map +1 -1
- package/dist/solutions/work-item/scheduling.cjs +9181 -1838
- package/dist/solutions/work-item/scheduling.cjs.map +1 -1
- package/dist/solutions/work-item/scheduling.d.cts +1763 -328
- package/dist/solutions/work-item/scheduling.d.ts +1763 -328
- package/dist/solutions/work-item/scheduling.js +117 -3
- package/dist/solutions/work-item/work-queue.d.cts +7 -7
- package/dist/solutions/work-item/work-queue.d.ts +7 -7
- package/dist/sources/browser.cjs +1318 -1083
- package/dist/sources/browser.cjs.map +1 -1
- package/dist/sources/browser.d.cts +22 -6
- package/dist/sources/browser.d.ts +22 -6
- package/dist/sources/browser.js +4 -4
- package/dist/sources/browser.js.map +1 -1
- package/dist/sources/index.cjs +1318 -1083
- package/dist/sources/index.cjs.map +1 -1
- package/dist/sources/index.d.cts +4 -4
- package/dist/sources/index.d.ts +4 -4
- package/dist/sources/index.js +4 -4
- package/dist/sources/node.d.cts +3 -3
- package/dist/sources/node.d.ts +3 -3
- package/dist/storage/browser.cjs +16 -0
- package/dist/storage/browser.cjs.map +1 -1
- package/dist/storage/browser.js +3 -3
- package/dist/storage/index.cjs +16 -0
- package/dist/storage/index.cjs.map +1 -1
- package/dist/storage/index.d.cts +5 -4
- package/dist/storage/index.d.ts +5 -4
- package/dist/storage/index.js +6 -6
- package/dist/storage/node.cjs +16 -0
- package/dist/storage/node.cjs.map +1 -1
- package/dist/storage/node.js +3 -3
- package/dist/{store-C-joM4gh.d.ts → store-6_CHF6Ge.d.ts} +1 -1
- package/dist/{store-CNJwmT-h.d.cts → store-BljX8RkQ.d.cts} +1 -1
- package/dist/types-BAw2QVVE.d.cts +274 -0
- package/dist/types-BUbbbh4f.d.cts +34 -0
- package/dist/types-CMnzoL54.d.cts +457 -0
- package/dist/{types-CcPIn7sy.d.cts → types-CTN3XoMl.d.cts} +57 -108
- package/dist/types-CV_ohy5T.d.cts +357 -0
- package/dist/{types-BsJvElYZ.d.ts → types-DChxk1vK.d.ts} +57 -108
- package/dist/types-DRu7SnLV.d.ts +274 -0
- package/dist/types-DeID_FRl.d.ts +34 -0
- package/dist/types-IhKH0hGW.d.ts +357 -0
- package/dist/types-ePlD2uyT.d.ts +457 -0
- package/dist/{work-item-runtime-qaVgsL0T.d.cts → work-item-runtime-types-BTxLskN5.d.cts} +3 -93
- package/dist/{work-item-runtime-C3M79vE9.d.ts → work-item-runtime-types-DAsZbb2y.d.ts} +3 -93
- package/dist/work-queue/index.cjs +957 -953
- package/dist/work-queue/index.cjs.map +1 -1
- package/dist/work-queue/index.d.cts +9 -357
- package/dist/work-queue/index.d.ts +9 -357
- package/dist/work-queue/index.js +957 -953
- package/dist/work-queue/index.js.map +1 -1
- package/package.json +611 -513
- package/dist/chunk-3JR3EDB2.js.map +0 -1
- package/dist/chunk-4VLAQHZI.js.map +0 -1
- package/dist/chunk-6XAIOL3X.js +0 -2407
- package/dist/chunk-6XAIOL3X.js.map +0 -1
- package/dist/chunk-FBUU43PM.js.map +0 -1
- package/dist/chunk-HKK2JD7Z.js.map +0 -1
- package/dist/chunk-PC3BTTBE.js +0 -3217
- package/dist/chunk-PC3BTTBE.js.map +0 -1
- package/dist/chunk-QFY4AFY4.js.map +0 -1
- package/dist/chunk-SS2A464I.js.map +0 -1
- package/dist/chunk-V7CIJE4B.js.map +0 -1
- package/dist/chunk-XKXWK2KP.js.map +0 -1
- package/dist/chunk-YDSIVHRR.js.map +0 -1
- package/dist/chunk-YXMZ2N6J.js.map +0 -1
- /package/dist/{chunk-CZNV3VXM.js.map → chunk-3J7UPZL5.js.map} +0 -0
- /package/dist/{chunk-Z2ANQ6JW.js.map → chunk-4Q77MMJY.js.map} +0 -0
- /package/dist/{chunk-K3FXTC3I.js.map → chunk-HJACH5PU.js.map} +0 -0
- /package/dist/{chunk-GTPCOEOZ.js.map → chunk-IDMLXLLG.js.map} +0 -0
- /package/dist/{chunk-DKP56CSW.js.map → chunk-JKAYLDQV.js.map} +0 -0
- /package/dist/{chunk-43BKLFZU.js.map → chunk-KFURM6FM.js.map} +0 -0
- /package/dist/{chunk-2747WN4Y.js.map → chunk-PUSRRALM.js.map} +0 -0
- /package/dist/{chunk-VTHLCFN4.js.map → chunk-RAHNUYA5.js.map} +0 -0
- /package/dist/{chunk-IXZBUWSP.js.map → chunk-UEMN5URK.js.map} +0 -0
- /package/dist/{chunk-6PHB5CJS.js.map → chunk-ZLFRB6FI.js.map} +0 -0
|
@@ -1,581 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
export { C as CapabilityMeasureAdapter, a as CellMeasureAdapter, I as ImageSizeAdapter, b as InjectedMeasureAdapter, P as PrecomputedMeasureAdapter, S as SvgBoundsAdapter, c as analyzeAndMeasure, d as blockAdaptersProvider, e as blockMeasurementProvider, E as blockedIntervalsForBand, f as capabilityTextMeasurements, g as carveTextLineSlots, h as cellTextMeasurements, i as circleIntervalForBand, F as columnGeometry, j as computeBlockFlow, k as computeCharPositions, l as computeFlowLines, m as computeLineBreaks, n as computeTotalHeight, o as imageSizeMeasurements, p as injectedTextMeasurements, G as inputNode, H as latestMeasurementValue, q as layoutNextLine, r as measureBlock, s as measureBlocks, J as measurementIssue, K as measurementOk, t as mergeMeasurements, u as precomputedTextMeasurements, v as reactiveBlockLayout, w as reactiveFlowLayout, x as reactiveLayout, y as readinessMeasurements, z as readinessTextMeasurements, A as rectIntervalForBand, L as sanitizeFlowColumns, M as sanitizeFlowContainer, N as sanitizeObstacles, O as scopedName, B as svgBoundsMeasurements, Q as textMeasurementFacts, D as textMeasurementProvider, R as tryMeasureHyphenWidth, T as validMeasurementSize } from '../../measurements-B_gJfD8h.cjs';
|
|
2
|
+
import { a1 as SegmentAdapter, a2 as SegmentBreakKind, a5 as Size, M as MeasureBlockOptions, z as MeasurementAdapter } from '../../types-CMnzoL54.cjs';
|
|
3
|
+
export { B as BLOCKS_MEASUREMENT_KIND, a as BaseContentBlock, b as BlockAdapters, c as BlockAdaptersProviderOptions, d as BlockMeasurementProviderOptions, e as BlocksMeasurement, C as CapabilityTextMeasurementsOptions, f as CellMeasureAdapterOptions, g as CellTextMeasurementsOptions, af as CharPosition, h as CircleObstacle, i as ComputeFlowLinesOptions, j as ContentBlock, F as FlowColumns, k as FlowContainer, l as FlowLinesResult, I as IMAGE_SIZE_MEASUREMENT_KIND, m as ImageContentBlock, n as ImageMeasurer, o as ImageSizeLookup, p as ImageSizeMeasurementTarget, q as ImageSizeMeasurementsOptions, r as InjectedMeasureAdapterOptions, s as InjectedTextMeasurementsOptions, ag as Interval, L as LayoutCursor, t as LayoutLine, u as LayoutNextLineContext, v as LayoutNextLineResult, w as LineBreaksResult, x as MeasureFn, y as MeasuredBlock, A as MeasurementFact, D as MeasurementIssue, E as MeasurementReadiness, G as MeasurementResult, H as Measurements, J as MergeMeasurementsOptions, O as Obstacle, P as PositionedBlock, K as PositionedLine, N as PrecomputedMeasureAdapterOptions, Q as PrecomputedTextMeasurementsOptions, R as PreparedSegment, S as READINESS_MEASUREMENT_KIND, T as ReactiveBlockLayoutBundle, U as ReactiveBlockLayoutOptions, V as ReactiveFlowLayoutBundle, W as ReactiveFlowLayoutOptions, X as ReactiveLayoutBundle, Y as ReactiveLayoutOptions, Z as ReadinessMeasurementsOptions, _ as ReadinessTextMeasurementsOptions, $ as RectObstacle, a0 as SVG_BOUNDS_MEASUREMENT_KIND, a3 as SegmentInfo, a4 as SegmentMeasureStats, a6 as SvgBoundsMeasurementTarget, a7 as SvgBoundsMeasurementsOptions, a8 as SvgContentBlock, a9 as SvgMeasurer, aa as TEXT_SEGMENTS_MEASUREMENT_KIND, ab as TextContentBlock, ac as TextMeasureCapability, ad as TextMeasurementProviderOptions, ae as TextSegmentsMeasurement } from '../../types-CMnzoL54.cjs';
|
|
4
|
+
import { C as Ctx } from '../../types-CTN3XoMl.cjs';
|
|
5
|
+
import '../../data/index.cjs';
|
|
6
|
+
import '../../graph-C1C-wb0L.cjs';
|
|
4
7
|
import '../../core/index.cjs';
|
|
5
8
|
import '../../messages-CAzUPPJM.cjs';
|
|
6
9
|
import '../../codec-BB7p8fJc.cjs';
|
|
7
|
-
import '../../describe-
|
|
10
|
+
import '../../describe-BumQ-3_0.cjs';
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
/** Synchronous word/grapheme segmentation contract for hosts without Intl.Segmenter. */
|
|
35
|
-
interface SegmentAdapter {
|
|
36
|
-
segmentWords(text: string): Iterable<SegmentInfo>;
|
|
37
|
-
segmentGraphemes(text: string): Iterable<SegmentInfo>;
|
|
38
|
-
}
|
|
39
|
-
/** Layout segment class used by the line breaker. */
|
|
40
|
-
type SegmentBreakKind = "text" | "space" | "zero-width-break" | "soft-hyphen" | "hard-break";
|
|
41
|
-
/** Measured text run consumed by pure line/block/flow helpers. */
|
|
42
|
-
interface PreparedSegment {
|
|
43
|
-
readonly text: string;
|
|
44
|
-
readonly width: number;
|
|
45
|
-
readonly kind: SegmentBreakKind;
|
|
46
|
-
readonly graphemeWidths: readonly number[] | null;
|
|
47
|
-
}
|
|
48
|
-
/** One laid-out line with segment/grapheme cursor bounds. */
|
|
49
|
-
interface LayoutLine {
|
|
50
|
-
readonly text: string;
|
|
51
|
-
readonly width: number;
|
|
52
|
-
readonly startSegment: number;
|
|
53
|
-
readonly startGrapheme: number;
|
|
54
|
-
readonly endSegment: number;
|
|
55
|
-
readonly endGrapheme: number;
|
|
56
|
-
}
|
|
57
|
-
/** Positioned grapheme box for hit testing or custom renderers. */
|
|
58
|
-
interface CharPosition {
|
|
59
|
-
readonly x: number;
|
|
60
|
-
readonly y: number;
|
|
61
|
-
readonly width: number;
|
|
62
|
-
readonly height: number;
|
|
63
|
-
readonly line: number;
|
|
64
|
-
}
|
|
65
|
-
/** Result emitted by `reactiveLayout().lineBreaks`. */
|
|
66
|
-
interface LineBreaksResult {
|
|
67
|
-
readonly lines: readonly LayoutLine[];
|
|
68
|
-
readonly lineCount: number;
|
|
69
|
-
}
|
|
70
|
-
/** Cursor into a prepared segment array. */
|
|
71
|
-
interface LayoutCursor {
|
|
72
|
-
readonly segmentIndex: number;
|
|
73
|
-
readonly graphemeIndex: number;
|
|
74
|
-
}
|
|
75
|
-
/** Pure helper result for one `layoutNextLine` step. */
|
|
76
|
-
interface LayoutNextLineResult {
|
|
77
|
-
readonly text: string;
|
|
78
|
-
readonly width: number;
|
|
79
|
-
readonly start: LayoutCursor;
|
|
80
|
-
readonly end: LayoutCursor;
|
|
81
|
-
}
|
|
82
|
-
/** Horizontal interval used by obstacle carving. */
|
|
83
|
-
interface Interval {
|
|
84
|
-
readonly left: number;
|
|
85
|
-
readonly right: number;
|
|
86
|
-
}
|
|
87
|
-
declare const TEXT_SEGMENTS_MEASUREMENT_KIND = "text-segments";
|
|
88
|
-
declare const BLOCKS_MEASUREMENT_KIND = "blocks";
|
|
89
|
-
/** Measurement kind for standalone readiness facts. */
|
|
90
|
-
declare const READINESS_MEASUREMENT_KIND = "readiness";
|
|
91
|
-
/** Measurement kind for standalone image-size facts. */
|
|
92
|
-
declare const IMAGE_SIZE_MEASUREMENT_KIND = "image-size";
|
|
93
|
-
/** Measurement kind for standalone SVG-bounds facts. */
|
|
94
|
-
declare const SVG_BOUNDS_MEASUREMENT_KIND = "svg-bounds";
|
|
95
|
-
interface TextSegmentsMeasurement {
|
|
96
|
-
readonly segments: readonly PreparedSegment[];
|
|
97
|
-
readonly hyphenWidth?: number;
|
|
98
|
-
}
|
|
99
|
-
interface BlocksMeasurement {
|
|
100
|
-
readonly blocks: readonly MeasuredBlock[];
|
|
101
|
-
}
|
|
102
|
-
interface MeasurementResult<T = unknown> {
|
|
103
|
-
readonly kind: "ok";
|
|
104
|
-
readonly targetId: string;
|
|
105
|
-
readonly measurementKind: string;
|
|
106
|
-
readonly value: T;
|
|
107
|
-
readonly source?: string;
|
|
108
|
-
readonly metadata?: Record<string, unknown>;
|
|
109
|
-
}
|
|
110
|
-
interface MeasurementIssue extends DataIssue {
|
|
111
|
-
readonly subjectId: string;
|
|
112
|
-
readonly measurementKind: string;
|
|
113
|
-
}
|
|
114
|
-
type MeasurementFact<T = unknown> = MeasurementResult<T> | MeasurementIssue;
|
|
115
|
-
type Measurements = readonly MeasurementFact[];
|
|
116
|
-
interface MergeMeasurementsOptions {
|
|
117
|
-
readonly graph: Graph;
|
|
118
|
-
readonly sources: readonly Node<Measurements>[];
|
|
119
|
-
readonly name?: string;
|
|
120
|
-
}
|
|
121
|
-
interface TextMeasurementProviderOptions {
|
|
122
|
-
readonly graph: Graph;
|
|
123
|
-
readonly text: Node<string>;
|
|
124
|
-
readonly font: Node<string>;
|
|
125
|
-
readonly adapter: Node<MeasurementAdapter>;
|
|
126
|
-
readonly segmentAdapter?: Node<SegmentAdapter>;
|
|
127
|
-
readonly targetId?: string;
|
|
128
|
-
readonly source?: string;
|
|
129
|
-
readonly name?: string;
|
|
130
|
-
}
|
|
131
|
-
interface InjectedTextMeasurementsOptions extends Omit<TextMeasurementProviderOptions, "adapter"> {
|
|
132
|
-
readonly measure: MeasureFn;
|
|
133
|
-
readonly cache?: boolean;
|
|
134
|
-
}
|
|
135
|
-
interface PrecomputedTextMeasurementsOptions extends Omit<TextMeasurementProviderOptions, "adapter">, PrecomputedMeasureAdapterOptions {
|
|
136
|
-
}
|
|
137
|
-
interface CellTextMeasurementsOptions extends Omit<TextMeasurementProviderOptions, "adapter">, CellMeasureAdapterOptions {
|
|
138
|
-
}
|
|
139
|
-
interface CapabilityTextMeasurementsOptions extends Omit<TextMeasurementProviderOptions, "adapter"> {
|
|
140
|
-
readonly capability: Node<TextMeasureCapability>;
|
|
141
|
-
}
|
|
142
|
-
interface MeasurementReadiness {
|
|
143
|
-
readonly ready: boolean;
|
|
144
|
-
readonly code?: string;
|
|
145
|
-
readonly message?: string;
|
|
146
|
-
readonly source?: string;
|
|
147
|
-
readonly details?: unknown;
|
|
148
|
-
readonly metadata?: Record<string, unknown>;
|
|
149
|
-
}
|
|
150
|
-
/** Options for projecting readiness into graph-visible measurement facts. */
|
|
151
|
-
interface ReadinessMeasurementsOptions {
|
|
152
|
-
readonly graph: Graph;
|
|
153
|
-
readonly readiness: Node<MeasurementReadiness>;
|
|
154
|
-
readonly targetId?: string;
|
|
155
|
-
readonly measurementKind?: string;
|
|
156
|
-
readonly source?: string;
|
|
157
|
-
readonly name?: string;
|
|
158
|
-
}
|
|
159
|
-
interface ReadinessTextMeasurementsOptions extends TextMeasurementProviderOptions {
|
|
160
|
-
readonly readiness: Node<MeasurementReadiness>;
|
|
161
|
-
}
|
|
162
|
-
/** Minimal caller-owned lookup for explicit image sizes. */
|
|
163
|
-
interface ImageSizeLookup {
|
|
164
|
-
get(src: string): Size | undefined;
|
|
165
|
-
}
|
|
166
|
-
/** One image-size fact target for `imageSizeMeasurements`. */
|
|
167
|
-
interface ImageSizeMeasurementTarget {
|
|
168
|
-
readonly id?: string;
|
|
169
|
-
readonly src: string;
|
|
170
|
-
readonly metadata?: Record<string, unknown>;
|
|
171
|
-
}
|
|
172
|
-
/** Options for projecting image-size facts from a caller-owned synchronous measurer. */
|
|
173
|
-
interface ImageSizeMeasurementsOptions {
|
|
174
|
-
readonly graph: Graph;
|
|
175
|
-
readonly images: Node<readonly ImageSizeMeasurementTarget[]>;
|
|
176
|
-
readonly measurer: Node<ImageMeasurer>;
|
|
177
|
-
readonly measurementKind?: string;
|
|
178
|
-
readonly source?: string;
|
|
179
|
-
readonly name?: string;
|
|
180
|
-
}
|
|
181
|
-
/** One SVG-bounds fact target for `svgBoundsMeasurements`. */
|
|
182
|
-
interface SvgBoundsMeasurementTarget {
|
|
183
|
-
readonly id?: string;
|
|
184
|
-
readonly svg: string;
|
|
185
|
-
readonly metadata?: Record<string, unknown>;
|
|
186
|
-
}
|
|
187
|
-
/** Options for projecting SVG bounds from a caller-owned synchronous measurer. */
|
|
188
|
-
interface SvgBoundsMeasurementsOptions {
|
|
189
|
-
readonly graph: Graph;
|
|
190
|
-
readonly svgs: Node<readonly SvgBoundsMeasurementTarget[]>;
|
|
191
|
-
readonly measurer: Node<SvgMeasurer>;
|
|
192
|
-
readonly measurementKind?: string;
|
|
193
|
-
readonly source?: string;
|
|
194
|
-
readonly name?: string;
|
|
195
|
-
}
|
|
196
|
-
interface BlockMeasurementProviderOptions {
|
|
197
|
-
readonly graph: Graph;
|
|
198
|
-
readonly blocks: Node<readonly ContentBlock[]>;
|
|
199
|
-
readonly maxWidth: Node<number>;
|
|
200
|
-
readonly adapters: Node<BlockAdapters>;
|
|
201
|
-
readonly segmentAdapter?: Node<SegmentAdapter>;
|
|
202
|
-
readonly font?: Node<string>;
|
|
203
|
-
readonly lineHeight?: Node<number>;
|
|
204
|
-
readonly targetId?: string;
|
|
205
|
-
readonly source?: string;
|
|
206
|
-
readonly name?: string;
|
|
207
|
-
}
|
|
208
|
-
interface BlockAdaptersProviderOptions {
|
|
209
|
-
readonly graph: Graph;
|
|
210
|
-
readonly text?: Node<MeasurementAdapter>;
|
|
211
|
-
readonly svg?: Node<SvgMeasurer>;
|
|
212
|
-
readonly image?: Node<ImageMeasurer>;
|
|
213
|
-
readonly name?: string;
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Graph-visible bundle returned by `reactiveLayout`.
|
|
217
|
-
*
|
|
218
|
-
* The setters are state-node sugar over real graph inputs; the output nodes are ordinary
|
|
219
|
-
* inspectable nodes visible through `graph.describe()`.
|
|
220
|
-
*/
|
|
221
|
-
interface ReactiveLayoutBundle {
|
|
222
|
-
readonly graph: Graph;
|
|
223
|
-
readonly input: {
|
|
224
|
-
readonly lineHeight: Node<number>;
|
|
225
|
-
readonly maxWidth: Node<number>;
|
|
226
|
-
readonly measurements: Node<Measurements>;
|
|
227
|
-
};
|
|
228
|
-
setLineHeight(lineHeight: number): void;
|
|
229
|
-
setMaxWidth(maxWidth: number): void;
|
|
230
|
-
readonly segments: Node<readonly PreparedSegment[]>;
|
|
231
|
-
readonly lineBreaks: Node<LineBreaksResult>;
|
|
232
|
-
readonly height: Node<number>;
|
|
233
|
-
readonly charPositions: Node<readonly CharPosition[]>;
|
|
234
|
-
}
|
|
235
|
-
/** Optional context shared by pure line-breaking helpers. */
|
|
236
|
-
interface LayoutNextLineContext {
|
|
237
|
-
readonly adapter?: MeasurementAdapter;
|
|
238
|
-
readonly font?: string;
|
|
239
|
-
readonly cache?: Map<string, Map<string, number>>;
|
|
240
|
-
readonly hyphenWidth?: number;
|
|
241
|
-
readonly segmentAdapter?: SegmentAdapter;
|
|
242
|
-
}
|
|
243
|
-
/** Cache accounting object callers can pass into `analyzeAndMeasure`. */
|
|
244
|
-
interface SegmentMeasureStats {
|
|
245
|
-
hits: number;
|
|
246
|
-
misses: number;
|
|
247
|
-
}
|
|
248
|
-
/** Options for the single-column reactive text layout bundle. */
|
|
249
|
-
interface ReactiveLayoutOptions {
|
|
250
|
-
readonly measurements: Node<Measurements>;
|
|
251
|
-
readonly graph: Graph;
|
|
252
|
-
readonly segmentAdapter?: SegmentAdapter;
|
|
253
|
-
readonly targetId?: string;
|
|
254
|
-
readonly name?: string;
|
|
255
|
-
readonly lineHeight?: number | Node<number>;
|
|
256
|
-
readonly maxWidth?: number | Node<number>;
|
|
257
|
-
}
|
|
258
|
-
/** Host text measurement function accepted by `InjectedMeasureAdapter`. */
|
|
259
|
-
type MeasureFn = (text: string, font: string) => number | {
|
|
260
|
-
readonly width: number;
|
|
261
|
-
};
|
|
262
|
-
/** Options for caller-injected synchronous measurement. */
|
|
263
|
-
interface InjectedMeasureAdapterOptions {
|
|
264
|
-
readonly cache?: boolean;
|
|
265
|
-
}
|
|
266
|
-
/** Options for deterministic precomputed text metrics. */
|
|
267
|
-
interface PrecomputedMeasureAdapterOptions {
|
|
268
|
-
readonly metrics: ReadonlyMap<string, number> | Record<string, number>;
|
|
269
|
-
readonly fallback?: "per-char" | "error";
|
|
270
|
-
readonly cellWidth?: number;
|
|
271
|
-
}
|
|
272
|
-
/** Fixed-cell measurement options for terminal/snapshot rendering. */
|
|
273
|
-
interface CellMeasureAdapterOptions {
|
|
274
|
-
readonly cellWidth?: number;
|
|
275
|
-
readonly wideCellWidth?: number;
|
|
276
|
-
readonly tabCells?: number;
|
|
277
|
-
}
|
|
278
|
-
/** Width/height pair in CSS-like pixels. */
|
|
279
|
-
interface Size {
|
|
280
|
-
readonly width: number;
|
|
281
|
-
readonly height: number;
|
|
282
|
-
}
|
|
283
|
-
/** Synchronous SVG measurement seam; no DOM parser is provided by the core. */
|
|
284
|
-
interface SvgMeasurer {
|
|
285
|
-
measureSvg(svg: string): Size;
|
|
286
|
-
}
|
|
287
|
-
/** Synchronous image measurement seam; no loading/fetching is provided by the core. */
|
|
288
|
-
interface ImageMeasurer {
|
|
289
|
-
measureImage(src: string): Size;
|
|
290
|
-
}
|
|
291
|
-
/** Optional per-kind block measurement adapters. */
|
|
292
|
-
interface BlockAdapters {
|
|
293
|
-
readonly text?: MeasurementAdapter;
|
|
294
|
-
readonly svg?: SvgMeasurer;
|
|
295
|
-
readonly image?: ImageMeasurer;
|
|
296
|
-
}
|
|
297
|
-
/** Shared spacing/id fields for block layout inputs. */
|
|
298
|
-
interface BaseContentBlock {
|
|
299
|
-
readonly id?: string;
|
|
300
|
-
readonly marginTop?: number;
|
|
301
|
-
readonly marginBottom?: number;
|
|
302
|
-
}
|
|
303
|
-
/** Text block input for `measureBlock` and `reactiveBlockLayout`. */
|
|
304
|
-
interface TextContentBlock extends BaseContentBlock {
|
|
305
|
-
readonly kind: "text";
|
|
306
|
-
readonly text: string;
|
|
307
|
-
readonly font?: string;
|
|
308
|
-
readonly lineHeight?: number;
|
|
309
|
-
readonly maxWidth?: number;
|
|
310
|
-
}
|
|
311
|
-
/** Image block input with explicit dimensions or an injected `ImageMeasurer`. */
|
|
312
|
-
interface ImageContentBlock extends BaseContentBlock {
|
|
313
|
-
readonly kind: "image";
|
|
314
|
-
readonly src: string;
|
|
315
|
-
readonly width?: number;
|
|
316
|
-
readonly height?: number;
|
|
317
|
-
readonly maxWidth?: number;
|
|
318
|
-
}
|
|
319
|
-
/** SVG block input with explicit dimensions or an injected `SvgMeasurer`. */
|
|
320
|
-
interface SvgContentBlock extends BaseContentBlock {
|
|
321
|
-
readonly kind: "svg";
|
|
322
|
-
readonly svg: string;
|
|
323
|
-
readonly width?: number;
|
|
324
|
-
readonly height?: number;
|
|
325
|
-
readonly maxWidth?: number;
|
|
326
|
-
}
|
|
327
|
-
/** Heterogeneous block-layout input. */
|
|
328
|
-
type ContentBlock = TextContentBlock | ImageContentBlock | SvgContentBlock;
|
|
329
|
-
/** Measured block produced by `measureBlock` or `measureBlocks`. */
|
|
330
|
-
interface MeasuredBlock {
|
|
331
|
-
readonly block: ContentBlock;
|
|
332
|
-
readonly kind: ContentBlock["kind"];
|
|
333
|
-
readonly id?: string;
|
|
334
|
-
readonly width: number;
|
|
335
|
-
readonly height: number;
|
|
336
|
-
readonly marginTop: number;
|
|
337
|
-
readonly marginBottom: number;
|
|
338
|
-
readonly segments?: readonly PreparedSegment[];
|
|
339
|
-
readonly lineBreaks?: LineBreaksResult;
|
|
340
|
-
readonly charPositions?: readonly CharPosition[];
|
|
341
|
-
}
|
|
342
|
-
/** Block with vertical-flow coordinates. */
|
|
343
|
-
interface PositionedBlock extends MeasuredBlock {
|
|
344
|
-
readonly x: number;
|
|
345
|
-
readonly y: number;
|
|
346
|
-
}
|
|
347
|
-
/** Options for pure block measurement helpers. */
|
|
348
|
-
interface MeasureBlockOptions {
|
|
349
|
-
readonly adapter?: MeasurementAdapter;
|
|
350
|
-
readonly adapters?: BlockAdapters;
|
|
351
|
-
readonly font?: string;
|
|
352
|
-
readonly lineHeight?: number;
|
|
353
|
-
readonly maxWidth?: number;
|
|
354
|
-
readonly cache?: Map<string, Map<string, number>>;
|
|
355
|
-
readonly hyphenWidth?: number;
|
|
356
|
-
readonly segmentAdapter?: SegmentAdapter;
|
|
357
|
-
}
|
|
358
|
-
/** Options for the graph-visible block layout bundle. */
|
|
359
|
-
interface ReactiveBlockLayoutOptions {
|
|
360
|
-
readonly measurements: Node<Measurements>;
|
|
361
|
-
readonly graph: Graph;
|
|
362
|
-
readonly targetId?: string;
|
|
363
|
-
readonly name?: string;
|
|
364
|
-
readonly gap?: number | Node<number>;
|
|
365
|
-
}
|
|
366
|
-
/** Graph-visible vertical block layout bundle. */
|
|
367
|
-
interface ReactiveBlockLayoutBundle {
|
|
368
|
-
readonly graph: Graph;
|
|
369
|
-
readonly input: {
|
|
370
|
-
readonly gap: Node<number>;
|
|
371
|
-
readonly measurements: Node<Measurements>;
|
|
372
|
-
};
|
|
373
|
-
setGap(gap: number): void;
|
|
374
|
-
readonly measuredBlocks: Node<readonly MeasuredBlock[]>;
|
|
375
|
-
readonly blockFlow: Node<readonly PositionedBlock[]>;
|
|
376
|
-
readonly totalHeight: Node<number>;
|
|
377
|
-
}
|
|
378
|
-
/** Circular obstacle for flow layout slot carving. */
|
|
379
|
-
interface CircleObstacle {
|
|
380
|
-
readonly kind: "circle";
|
|
381
|
-
readonly cx: number;
|
|
382
|
-
readonly cy: number;
|
|
383
|
-
readonly r: number;
|
|
384
|
-
}
|
|
385
|
-
/** Rectangular obstacle for flow layout slot carving. */
|
|
386
|
-
interface RectObstacle {
|
|
387
|
-
readonly kind: "rect";
|
|
388
|
-
readonly x: number;
|
|
389
|
-
readonly y: number;
|
|
390
|
-
readonly width: number;
|
|
391
|
-
readonly height: number;
|
|
392
|
-
}
|
|
393
|
-
/** Obstacle shape accepted by flow layout. */
|
|
394
|
-
type Obstacle = CircleObstacle | RectObstacle;
|
|
395
|
-
/** Flow container geometry. */
|
|
396
|
-
interface FlowContainer {
|
|
397
|
-
readonly width: number;
|
|
398
|
-
readonly height: number;
|
|
399
|
-
readonly paddingX?: number;
|
|
400
|
-
readonly paddingY?: number;
|
|
401
|
-
}
|
|
402
|
-
/** Optional column geometry for flow layout. */
|
|
403
|
-
interface FlowColumns {
|
|
404
|
-
readonly count?: number;
|
|
405
|
-
readonly gap?: number;
|
|
406
|
-
}
|
|
407
|
-
/** Positioned line emitted by `computeFlowLines` / `reactiveFlowLayout`. */
|
|
408
|
-
interface PositionedLine extends LayoutLine {
|
|
409
|
-
readonly x: number;
|
|
410
|
-
readonly y: number;
|
|
411
|
-
readonly slotWidth: number;
|
|
412
|
-
readonly columnIndex: number;
|
|
413
|
-
}
|
|
414
|
-
/** Flow layout result plus the continuation cursor. */
|
|
415
|
-
interface FlowLinesResult {
|
|
416
|
-
readonly lines: readonly PositionedLine[];
|
|
417
|
-
readonly cursor: LayoutCursor;
|
|
418
|
-
readonly done: boolean;
|
|
419
|
-
}
|
|
420
|
-
/** Options for pure flow layout computation. */
|
|
421
|
-
interface ComputeFlowLinesOptions {
|
|
422
|
-
readonly container: FlowContainer;
|
|
423
|
-
readonly columns?: FlowColumns;
|
|
424
|
-
readonly obstacles?: readonly Obstacle[];
|
|
425
|
-
readonly lineHeight: number;
|
|
426
|
-
readonly minSlotWidth?: number;
|
|
427
|
-
readonly hyphenWidth?: number;
|
|
428
|
-
readonly segmentAdapter?: SegmentAdapter;
|
|
429
|
-
}
|
|
430
|
-
/** Options for the graph-visible flow layout bundle. */
|
|
431
|
-
interface ReactiveFlowLayoutOptions {
|
|
432
|
-
readonly measurements: Node<Measurements>;
|
|
433
|
-
readonly graph: Graph;
|
|
434
|
-
readonly segmentAdapter?: SegmentAdapter;
|
|
435
|
-
readonly targetId?: string;
|
|
436
|
-
readonly name?: string;
|
|
437
|
-
readonly lineHeight?: number | Node<number>;
|
|
438
|
-
readonly container?: FlowContainer | Node<FlowContainer>;
|
|
439
|
-
readonly columns?: FlowColumns | Node<FlowColumns>;
|
|
440
|
-
readonly obstacles?: readonly Obstacle[] | Node<readonly Obstacle[]>;
|
|
441
|
-
readonly minSlotWidth?: number;
|
|
442
|
-
}
|
|
443
|
-
/** Graph-visible multi-column flow layout bundle. */
|
|
444
|
-
interface ReactiveFlowLayoutBundle {
|
|
445
|
-
readonly graph: Graph;
|
|
446
|
-
readonly input: {
|
|
447
|
-
readonly lineHeight: Node<number>;
|
|
448
|
-
readonly container: Node<FlowContainer>;
|
|
449
|
-
readonly columns: Node<FlowColumns>;
|
|
450
|
-
readonly obstacles: Node<readonly Obstacle[]>;
|
|
451
|
-
readonly measurements: Node<Measurements>;
|
|
452
|
-
};
|
|
453
|
-
setLineHeight(lineHeight: number): void;
|
|
454
|
-
setContainer(container: FlowContainer): void;
|
|
455
|
-
setColumns(columns: FlowColumns): void;
|
|
456
|
-
setObstacles(obstacles: readonly Obstacle[]): void;
|
|
457
|
-
readonly segments: Node<readonly PreparedSegment[]>;
|
|
458
|
-
readonly flowLines: Node<FlowLinesResult>;
|
|
459
|
-
}
|
|
460
|
-
/** Adapter that wraps a caller-owned synchronous measurement function. */
|
|
461
|
-
declare class InjectedMeasureAdapter implements MeasurementAdapter {
|
|
462
|
-
private readonly measure;
|
|
463
|
-
private readonly shouldCache;
|
|
464
|
-
private readonly cache;
|
|
465
|
-
constructor(measure: MeasureFn, opts?: InjectedMeasureAdapterOptions);
|
|
466
|
-
measureSegment(text: string, font: string): {
|
|
467
|
-
readonly width: number;
|
|
468
|
-
};
|
|
469
|
-
clearCache(): void;
|
|
470
|
-
}
|
|
471
|
-
/** Deterministic adapter backed by caller-supplied width metrics. */
|
|
472
|
-
declare class PrecomputedMeasureAdapter implements MeasurementAdapter {
|
|
473
|
-
private readonly metrics;
|
|
474
|
-
private readonly fallback;
|
|
475
|
-
private readonly cellWidth;
|
|
476
|
-
constructor(opts: PrecomputedMeasureAdapterOptions);
|
|
477
|
-
measureSegment(text: string, font: string): {
|
|
478
|
-
readonly width: number;
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
/** Fixed-cell adapter for CLI, snapshots, and tests. */
|
|
482
|
-
declare class CellMeasureAdapter implements MeasurementAdapter {
|
|
483
|
-
private readonly cellWidth;
|
|
484
|
-
private readonly wideCellWidth;
|
|
485
|
-
private readonly tabCells;
|
|
486
|
-
constructor(opts?: CellMeasureAdapterOptions);
|
|
487
|
-
measureSegment(text: string): {
|
|
488
|
-
readonly width: number;
|
|
489
|
-
};
|
|
490
|
-
}
|
|
491
|
-
/** Adapter over a caller-owned platform capability such as NodeCanvas, Skia, or RN text APIs. */
|
|
492
|
-
declare class CapabilityMeasureAdapter implements MeasurementAdapter {
|
|
493
|
-
private readonly capability;
|
|
494
|
-
constructor(capability: TextMeasureCapability);
|
|
495
|
-
measureSegment(text: string, font: string): {
|
|
496
|
-
readonly width: number;
|
|
497
|
-
};
|
|
498
|
-
clearCache(): void;
|
|
499
|
-
}
|
|
500
|
-
/**
|
|
501
|
-
* Minimal string-based SVG bounds reader for explicit width/height or viewBox.
|
|
502
|
-
*
|
|
503
|
-
* This is not a DOM SVG parser and does not resolve external resources.
|
|
504
|
-
*/
|
|
505
|
-
declare class SvgBoundsAdapter implements SvgMeasurer {
|
|
506
|
-
measureSvg(svg: string): Size;
|
|
507
|
-
}
|
|
508
|
-
/** Image measurer backed by explicit caller-provided dimensions; it never loads images. */
|
|
509
|
-
declare class ImageSizeAdapter implements ImageMeasurer {
|
|
510
|
-
private readonly sizes;
|
|
511
|
-
constructor(sizes: ImageSizeLookup | Record<string, Size>);
|
|
512
|
-
measureImage(src: string): Size;
|
|
513
|
-
}
|
|
514
|
-
/** Generic sync text measurement provider that emits graph-visible measurement facts. */
|
|
515
|
-
declare function textMeasurementProvider(opts: TextMeasurementProviderOptions): Node<Measurements>;
|
|
516
|
-
/** Provider helper for caller-injected synchronous text measurement. */
|
|
517
|
-
declare function injectedTextMeasurements(opts: InjectedTextMeasurementsOptions): Node<Measurements>;
|
|
518
|
-
/** Provider helper for deterministic precomputed text metrics. */
|
|
519
|
-
declare function precomputedTextMeasurements(opts: PrecomputedTextMeasurementsOptions): Node<Measurements>;
|
|
520
|
-
/** Provider helper for fixed-cell terminal/snapshot text measurement. */
|
|
521
|
-
declare function cellTextMeasurements(opts: CellTextMeasurementsOptions): Node<Measurements>;
|
|
522
|
-
/** Provider helper for caller-injected platform text capability nodes. */
|
|
523
|
-
declare function capabilityTextMeasurements(opts: CapabilityTextMeasurementsOptions): Node<Measurements>;
|
|
524
|
-
/** Provider helper that makes readiness facts an explicit measurement dependency. */
|
|
525
|
-
declare function readinessTextMeasurements(opts: ReadinessTextMeasurementsOptions): Node<Measurements>;
|
|
526
|
-
/** Provider helper that emits graph-visible readiness facts without measuring layout. */
|
|
527
|
-
declare function readinessMeasurements(opts: ReadinessMeasurementsOptions): Node<Measurements>;
|
|
528
|
-
/** Provider helper for image-size facts from caller-owned synchronous image measurers. */
|
|
529
|
-
declare function imageSizeMeasurements(opts: ImageSizeMeasurementsOptions): Node<Measurements>;
|
|
530
|
-
/** Provider helper for SVG bounds facts from caller-owned synchronous SVG measurers. */
|
|
531
|
-
declare function svgBoundsMeasurements(opts: SvgBoundsMeasurementsOptions): Node<Measurements>;
|
|
532
|
-
/** Merge provider fact nodes into the single measurements node consumed by layout bundles. */
|
|
533
|
-
declare function mergeMeasurements(opts: MergeMeasurementsOptions): Node<Measurements>;
|
|
534
|
-
/** Compose optional block measurement capability nodes into one graph-visible adapter node. */
|
|
535
|
-
declare function blockAdaptersProvider(opts: BlockAdaptersProviderOptions): Node<BlockAdapters>;
|
|
536
|
-
/** Provider helper for block measurement facts over declared block/max-width deps. */
|
|
537
|
-
declare function blockMeasurementProvider(opts: BlockMeasurementProviderOptions): Node<Measurements>;
|
|
538
|
-
/** Segment text and measure every resulting segment with a caller-owned synchronous adapter. */
|
|
539
|
-
declare function analyzeAndMeasure(text: string, font: string, adapter: MeasurementAdapter, cache: Map<string, Map<string, number>>, stats?: SegmentMeasureStats, segmentAdapter?: SegmentAdapter): PreparedSegment[];
|
|
540
|
-
/** Greedy single-column line breaking over prepared segments. */
|
|
541
|
-
declare function computeLineBreaks(segments: readonly PreparedSegment[], maxWidth: number, opts?: {
|
|
542
|
-
readonly hyphenWidth?: number;
|
|
543
|
-
readonly segmentAdapter?: SegmentAdapter;
|
|
544
|
-
}): LineBreaksResult;
|
|
545
|
-
/** Lay out one line from a cursor, returning the next cursor for continuation. */
|
|
546
|
-
declare function layoutNextLine(segments: readonly PreparedSegment[], cursor: LayoutCursor, slotWidth: number, ctx?: LayoutNextLineContext): LayoutNextLineResult | null;
|
|
547
|
-
/** Subtract obstacle intervals from a horizontal text band. */
|
|
548
|
-
declare function carveTextLineSlots(base: Interval, blocked: readonly Interval[], minSlotWidth?: number): Interval[];
|
|
549
|
-
/** Compute per-grapheme boxes for already-broken lines. */
|
|
550
|
-
declare function computeCharPositions(lineBreaks: LineBreaksResult, segments: readonly PreparedSegment[], lineHeight: number, segmentAdapter?: SegmentAdapter): readonly CharPosition[];
|
|
551
|
-
/** Measure one text/image/SVG block using only explicit or injected synchronous adapters. */
|
|
552
|
-
declare function measureBlock(block: ContentBlock, opts: MeasureBlockOptions): MeasuredBlock;
|
|
553
|
-
/** Measure a block list while sharing a measurement cache across text blocks. */
|
|
554
|
-
declare function measureBlocks(blocks: readonly ContentBlock[], opts: MeasureBlockOptions): readonly MeasuredBlock[];
|
|
555
|
-
/** Stack measured blocks vertically with margins and a fixed gap. */
|
|
556
|
-
declare function computeBlockFlow(blocks: readonly MeasuredBlock[], gap?: number): readonly PositionedBlock[];
|
|
557
|
-
/** Compute the bottom edge of a positioned block flow. */
|
|
558
|
-
declare function computeTotalHeight(blocks: readonly PositionedBlock[]): number;
|
|
559
|
-
/** Intersect a circle obstacle with a horizontal line band. */
|
|
560
|
-
declare function circleIntervalForBand(obstacle: CircleObstacle, bandTop: number, bandBottom: number): Interval | null;
|
|
561
|
-
/** Intersect a rectangle obstacle with a horizontal line band. */
|
|
562
|
-
declare function rectIntervalForBand(obstacle: RectObstacle, bandTop: number, bandBottom: number): Interval | null;
|
|
563
|
-
/** Flow prepared text through columns and carved obstacle slots. */
|
|
564
|
-
declare function computeFlowLines(segments: readonly PreparedSegment[], opts: ComputeFlowLinesOptions): FlowLinesResult;
|
|
565
|
-
/**
|
|
566
|
-
* Create a graph-visible single-column text layout bundle.
|
|
567
|
-
*
|
|
568
|
-
* D181: this adds ordinary state/output nodes only; it does not add protocol behavior,
|
|
569
|
-
* hidden subscriptions, GraphSpec ownership, storage, or platform globals.
|
|
570
|
-
*/
|
|
571
|
-
declare function reactiveLayout(opts: ReactiveLayoutOptions): ReactiveLayoutBundle;
|
|
572
|
-
/**
|
|
573
|
-
* Create a graph-visible vertical block layout bundle over the same DOM-free core.
|
|
574
|
-
*
|
|
575
|
-
* Image/SVG sizing is explicit or injected; no async image loading or DOM SVG parsing occurs.
|
|
576
|
-
*/
|
|
577
|
-
declare function reactiveBlockLayout(opts: ReactiveBlockLayoutOptions): ReactiveBlockLayoutBundle;
|
|
578
|
-
/** Create a graph-visible multi-column flow layout bundle with rectangle/circle obstacles. */
|
|
579
|
-
declare function reactiveFlowLayout(opts: ReactiveFlowLayoutOptions): ReactiveFlowLayoutBundle;
|
|
12
|
+
declare const kinsokuStart: Set<string>;
|
|
13
|
+
declare const leftStickyPunctuation: Set<string>;
|
|
14
|
+
declare function isCJK(text: string): boolean;
|
|
15
|
+
declare function normalizeWhitespace(text: string): string;
|
|
16
|
+
declare function segmentText(text: string, segmentAdapter: SegmentAdapter): {
|
|
17
|
+
readonly texts: string[];
|
|
18
|
+
readonly isWordLike: boolean[];
|
|
19
|
+
readonly kinds: SegmentBreakKind[];
|
|
20
|
+
}[];
|
|
21
|
+
declare function createDefaultSegmentAdapter(): SegmentAdapter;
|
|
22
|
+
declare function getDefaultSegmentAdapter(): SegmentAdapter;
|
|
23
|
+
declare function measuredWidth(value: number | {
|
|
24
|
+
readonly width: number;
|
|
25
|
+
}): number;
|
|
26
|
+
declare function metricKey(text: string, font: string): string;
|
|
27
|
+
|
|
28
|
+
declare function nonNegativeFinite(value: number, fallback: number): number;
|
|
29
|
+
declare function finiteNumber(value: number, fallback: number): number;
|
|
30
|
+
declare function emitLayoutError(ctx: Ctx, error: unknown, fallback: string): void;
|
|
31
|
+
declare function positiveFinite(value: number, fallback: number): number;
|
|
32
|
+
declare function clampDimension(value: number | undefined): number;
|
|
33
|
+
declare function fitSize(size: Size, maxWidth: number): Size;
|
|
34
|
+
declare function blockMaxWidth(blockMaxWidth: number | undefined, maxWidth: number): number;
|
|
35
|
+
declare function resolveTextAdapter(opts: MeasureBlockOptions): MeasurementAdapter;
|
|
580
36
|
|
|
581
|
-
export {
|
|
37
|
+
export { MeasureBlockOptions, MeasurementAdapter, SegmentAdapter, SegmentBreakKind, Size, blockMaxWidth, clampDimension, createDefaultSegmentAdapter, emitLayoutError, finiteNumber, fitSize, getDefaultSegmentAdapter, isCJK, kinsokuStart, leftStickyPunctuation, measuredWidth, metricKey, nonNegativeFinite, normalizeWhitespace, positiveFinite, resolveTextAdapter, segmentText };
|