@tangle-network/agent-app 0.61.4 → 0.62.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DesignCanvas-L6J72JQ2.js → DesignCanvas-IQKYAEC4.js} +3 -2
- package/dist/{DesignCanvasEditor-QFQD63MR.js → DesignCanvasEditor-O7OCZTGC.js} +5 -4
- package/dist/{TimelineEditor-7KBPJQLT.js → TimelineEditor-VB2UJ34D.js} +4 -2
- package/dist/VaultPane-AYW7CO33.js +8 -0
- package/dist/agent-profiles/d1.js +1 -1
- package/dist/agent-profiles/index.d.ts +0 -82
- package/dist/agent-profiles/index.js +1 -21
- package/dist/agent-profiles/self-management.d.ts +0 -55
- package/dist/alerting/index.d.ts +1 -1
- package/dist/alerting/index.js +1 -3
- package/dist/alerting/slack.d.ts +6 -79
- package/dist/app-auth/drizzle.d.ts +17 -271
- package/dist/app-auth/drizzle.js +6 -2
- package/dist/app-auth/drizzle.js.map +1 -1
- package/dist/app-auth/index.js +3 -3
- package/dist/assets/types.d.ts +2 -1
- package/dist/assistant/AssistantPanel.d.ts +1 -1
- package/dist/assistant/index.js +635 -392
- package/dist/assistant/index.js.map +1 -1
- package/dist/billing/identity-locks.d.ts +5 -0
- package/dist/billing/index.js +1 -1
- package/dist/brand-extraction/index.js.map +1 -1
- package/dist/brand-extraction/types.d.ts +2 -1
- package/dist/chat-react/index.js +6 -5
- package/dist/chat-routes/attachment-write-safety.d.ts +4 -0
- package/dist/chat-routes/draft-persistence.d.ts +2 -14
- package/dist/chat-routes/index.d.ts +1 -0
- package/dist/chat-routes/index.js +853 -773
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/chat-routes/sandbox-model-source.d.ts +20 -0
- package/dist/chat-routes/stored-attachments.d.ts +18 -0
- package/dist/chat-routes/turn-admission.d.ts +1 -1
- package/dist/chat-routes/turn-execution.d.ts +2 -2
- package/dist/chat-routes/turn-route-contracts.d.ts +3 -29
- package/dist/chat-store/core.d.ts +19 -1
- package/dist/chat-store/index.js.map +1 -1
- package/dist/chat-store/store.d.ts +3 -29
- package/dist/{chunk-ATQQCG4I.js → chunk-2VJLLRVV.js} +2 -2
- package/dist/{chunk-4LBCTFBP.js → chunk-4MD5PS4F.js} +5 -1
- package/dist/{chunk-4LBCTFBP.js.map → chunk-4MD5PS4F.js.map} +1 -1
- package/dist/{chunk-R4X5474U.js → chunk-52SDU43B.js} +12 -27
- package/dist/chunk-52SDU43B.js.map +1 -0
- package/dist/{chunk-MDRH3SDA.js → chunk-54YIL7WM.js} +3 -3
- package/dist/{chunk-6QJ3GB3A.js → chunk-5GSZGTPJ.js} +2 -2
- package/dist/{chunk-5IM2CLYX.js → chunk-6JEDSKFH.js} +232 -218
- package/dist/chunk-6JEDSKFH.js.map +1 -0
- package/dist/{chunk-6PRQ45QE.js → chunk-6OG4244Y.js} +1 -1
- package/dist/chunk-6OG4244Y.js.map +1 -0
- package/dist/{chunk-ZDPUC6CM.js → chunk-6ZVSMA4T.js} +3 -3
- package/dist/{chunk-TXUAGSFR.js → chunk-76MPX7JQ.js} +47 -1
- package/dist/chunk-76MPX7JQ.js.map +1 -0
- package/dist/{chunk-BOQ4HVVH.js → chunk-7ISHKBAD.js} +61 -52
- package/dist/chunk-7ISHKBAD.js.map +1 -0
- package/dist/chunk-7PULOECS.js +22 -0
- package/dist/chunk-7PULOECS.js.map +1 -0
- package/dist/{chunk-KJODHPWM.js → chunk-CPVGRQ43.js} +511 -339
- package/dist/chunk-CPVGRQ43.js.map +1 -0
- package/dist/{chunk-LO6VQ35O.js → chunk-CQZVJVME.js} +2 -2
- package/dist/{chunk-Y43PXON2.js → chunk-EFQUAWWF.js} +577 -546
- package/dist/chunk-EFQUAWWF.js.map +1 -0
- package/dist/{chunk-FPNZMIAW.js → chunk-ELX5YITO.js} +1 -1
- package/dist/chunk-ELX5YITO.js.map +1 -0
- package/dist/chunk-FGAROAUF.js +19 -0
- package/dist/chunk-FGAROAUF.js.map +1 -0
- package/dist/{chunk-HN6MZ2XL.js → chunk-FTNGGR37.js} +641 -466
- package/dist/chunk-FTNGGR37.js.map +1 -0
- package/dist/{chunk-G4F2NWZH.js → chunk-FZ3ZFVAC.js} +4 -4
- package/dist/{chunk-UCCSJX64.js → chunk-GIEUZBQQ.js} +1112 -644
- package/dist/chunk-GIEUZBQQ.js.map +1 -0
- package/dist/{chunk-MEKOWH5E.js → chunk-IVBREL7A.js} +785 -526
- package/dist/chunk-IVBREL7A.js.map +1 -0
- package/dist/{chunk-WSEXFTN4.js → chunk-JBXNU5WD.js} +26 -26
- package/dist/chunk-JBXNU5WD.js.map +1 -0
- package/dist/{chunk-F2VX6TTJ.js → chunk-JRCZHDRG.js} +2 -41
- package/dist/chunk-JRCZHDRG.js.map +1 -0
- package/dist/{chunk-LXYQOOXU.js → chunk-JRW6LCIA.js} +552 -302
- package/dist/chunk-JRW6LCIA.js.map +1 -0
- package/dist/{chunk-TVPH5T4F.js → chunk-KS4I7KVC.js} +16 -22
- package/dist/{chunk-TVPH5T4F.js.map → chunk-KS4I7KVC.js.map} +1 -1
- package/dist/{chunk-J2BBYVGF.js → chunk-MRZP65DZ.js} +1 -117
- package/dist/chunk-MRZP65DZ.js.map +1 -0
- package/dist/{chunk-L7LQRJGD.js → chunk-MVKMDROU.js} +48 -48
- package/dist/{chunk-L7LQRJGD.js.map → chunk-MVKMDROU.js.map} +1 -1
- package/dist/{chunk-4ZSLX3LY.js → chunk-OODZCBSM.js} +1 -1
- package/dist/chunk-OODZCBSM.js.map +1 -0
- package/dist/chunk-P4RRC4AO.js +47 -0
- package/dist/chunk-P4RRC4AO.js.map +1 -0
- package/dist/{chunk-ORQD4AUO.js → chunk-PCAY23GS.js} +1 -6
- package/dist/chunk-PCAY23GS.js.map +1 -0
- package/dist/{chunk-NMZUW6VJ.js → chunk-PEJ5OP5B.js} +3 -3
- package/dist/chunk-PEJ5OP5B.js.map +1 -0
- package/dist/{chunk-NHYRIM4I.js → chunk-PIPNDZ6H.js} +304 -194
- package/dist/chunk-PIPNDZ6H.js.map +1 -0
- package/dist/chunk-UHSUY6H6.js +79 -0
- package/dist/chunk-UHSUY6H6.js.map +1 -0
- package/dist/{chunk-PDD5A43Y.js → chunk-UTL6TEN6.js} +3 -3
- package/dist/{chunk-VJBFCNAU.js → chunk-UW2DKTEM.js} +123 -130
- package/dist/chunk-UW2DKTEM.js.map +1 -0
- package/dist/{chunk-S27DKRI6.js → chunk-VDYEVCQQ.js} +2 -2
- package/dist/{chunk-UFQM46NV.js → chunk-VK3F4N4U.js} +2 -2
- package/dist/{chunk-6ZIC6OG5.js → chunk-VYBTQK25.js} +126 -122
- package/dist/chunk-VYBTQK25.js.map +1 -0
- package/dist/{chunk-RL3Z747H.js → chunk-W2BV2XOC.js} +1491 -700
- package/dist/chunk-W2BV2XOC.js.map +1 -0
- package/dist/{chunk-FUZETA6Z.js → chunk-X6SZGQTK.js} +2 -2
- package/dist/{chunk-CD2LQXY6.js → chunk-XOHE6SKU.js} +14 -16
- package/dist/{chunk-CD2LQXY6.js.map → chunk-XOHE6SKU.js.map} +1 -1
- package/dist/{chunk-ZBB5KQ6B.js → chunk-Y3GO6SG3.js} +73 -66
- package/dist/chunk-Y3GO6SG3.js.map +1 -0
- package/dist/chunk-ZAMHLXNS.js +56 -0
- package/dist/chunk-ZAMHLXNS.js.map +1 -0
- package/dist/{chunk-RHFN7TUV.js → chunk-ZDHCV462.js} +47 -44
- package/dist/{chunk-RHFN7TUV.js.map → chunk-ZDHCV462.js.map} +1 -1
- package/dist/chunk-ZOS3D26Z.js +72 -0
- package/dist/chunk-ZOS3D26Z.js.map +1 -0
- package/dist/design-canvas/index.js +32 -32
- package/dist/design-canvas/index.js.map +1 -1
- package/dist/design-canvas-react/components/DesignCanvas.d.ts +1 -1
- package/dist/design-canvas-react/components/Workspace.d.ts +1 -1
- package/dist/design-canvas-react/components/glyphs.d.ts +31 -40
- package/dist/design-canvas-react/components/transform-math.d.ts +0 -8
- package/dist/design-canvas-react/components/use-workspace-keyboard.d.ts +2 -2
- package/dist/design-canvas-react/contracts.d.ts +2 -2
- package/dist/design-canvas-react/engine.js +1 -1
- package/dist/design-canvas-react/index.js +9 -7
- package/dist/design-canvas-react/index.js.map +1 -1
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/eval/calibration.d.ts +1 -38
- package/dist/eval/index.d.ts +2 -4
- package/dist/eval/index.js +0 -84
- package/dist/eval/index.js.map +1 -1
- package/dist/harness/index.d.ts +1 -1
- package/dist/harness/index.js +1 -1
- package/dist/harness/session-selection.d.ts +2 -2
- package/dist/hub-approvals/index.js +1 -1
- package/dist/hub-approvals/result.d.ts +1 -1
- package/dist/hub-approvals-react/index.js +4 -4
- package/dist/hub-approvals-react/index.js.map +1 -1
- package/dist/hub-approvals-react/parts.d.ts +1 -1
- package/dist/launch-invariants/cli.js +4 -4
- package/dist/launch-invariants/index.js +3 -3
- package/dist/launch-invariants/testing.js +4 -4
- package/dist/legibility/cli.js +1 -1
- package/dist/legibility/index.js +1 -1
- package/dist/{mention-editor-B23OMFT2.js → mention-editor-4BKBMWIK.js} +83 -57
- package/dist/mention-editor-4BKBMWIK.js.map +1 -0
- package/dist/missions/index.js +144 -137
- package/dist/missions/index.js.map +1 -1
- package/dist/operator/index.js +1 -1
- package/dist/peer-floors/check.js +1 -1
- package/dist/peer-floors/cli.js +6 -14
- package/dist/peer-floors/cli.js.map +1 -1
- package/dist/peer-floors/source-entries.d.ts +6 -0
- package/dist/platform/index.js +10 -10
- package/dist/preset-cloudflare/index.js +2 -2
- package/dist/profile/index.d.ts +0 -1
- package/dist/profile/index.js +1 -422
- package/dist/profile/index.js.map +1 -1
- package/dist/profile-editor/server.d.ts +0 -1
- package/dist/profile-editor/server.js +0 -1
- package/dist/profile-editor/server.js.map +1 -1
- package/dist/public-consultation/index.d.ts +2 -2
- package/dist/public-consultation/index.js +6 -6
- package/dist/record/drizzle.js +156 -148
- package/dist/record/drizzle.js.map +1 -1
- package/dist/runtime/index.js +4 -4
- package/dist/runtime/router-turn.js +3 -3
- package/dist/sandbox/index.js +8 -6
- package/dist/sandbox/transient-failure.d.ts +2 -0
- package/dist/sequences/drizzle.js +5 -15
- package/dist/sequences/drizzle.js.map +1 -1
- package/dist/sequences/index.d.ts +1 -0
- package/dist/sequences/index.js +18 -14
- package/dist/sequences/index.js.map +1 -1
- package/dist/sequences/row-mapping.d.ts +7 -0
- package/dist/sequences-react/components/TimelineEditor.d.ts +0 -40
- package/dist/sequences-react/components/TimelineHistory.d.ts +31 -0
- package/dist/sequences-react/components/glyphs.d.ts +12 -21
- package/dist/sequences-react/components/index.d.ts +0 -2
- package/dist/sequences-react/components/interaction-math.d.ts +3 -3
- package/dist/sequences-react/contracts.d.ts +1 -1
- package/dist/sequences-react/engine/snap.d.ts +2 -2
- package/dist/sequences-react/index.js +4 -4
- package/dist/sequences-react/index.js.map +1 -1
- package/dist/settings-react/index.js +13 -30
- package/dist/settings-react/index.js.map +1 -1
- package/dist/settings-react/timezone-picker.d.ts +0 -6
- package/dist/signoff/browser-budget.d.ts +6 -1
- package/dist/signoff/cli.d.ts +0 -7
- package/dist/signoff/cli.js +1 -2
- package/dist/signoff/cli.js.map +1 -1
- package/dist/signoff/index.js +1 -1
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.js +5 -25
- package/dist/skills/marketplace.d.ts +1 -75
- package/dist/skills-placement/box.js +3 -4
- package/dist/skills-placement/box.js.map +1 -1
- package/dist/skills-placement/index.js +3 -4
- package/dist/spend/cli-args.d.ts +1 -1
- package/dist/spend/cli.js +3 -3
- package/dist/spend/cli.js.map +1 -1
- package/dist/spend/index.js +1 -1
- package/dist/stories/design-canvas/fixtures.d.ts +1 -14
- package/dist/stream/index.js +17 -17
- package/dist/studio/generation.d.ts +1 -1
- package/dist/studio/index.js +1 -1
- package/dist/studio-react/index.js +353 -184
- package/dist/studio-react/index.js.map +1 -1
- package/dist/studio-react/studio-composer.d.ts +1 -5
- package/dist/studio-react/studio-history-screen.d.ts +1 -1
- package/dist/teams/invitations-api.d.ts +3 -3
- package/dist/teams/invitations-api.js +74 -72
- package/dist/teams/invitations-api.js.map +1 -1
- package/dist/teams/member-sync.d.ts +2 -0
- package/dist/teams/members-api.d.ts +2 -2
- package/dist/teams/members-api.js +1 -1
- package/dist/teams-react/index.js +28 -45
- package/dist/teams-react/index.js.map +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/mcp-arguments.d.ts +1 -1
- package/dist/trace/index.d.ts +1 -18
- package/dist/trace/index.js +1 -36
- package/dist/trace/index.js.map +1 -1
- package/dist/trace/mission-flow.d.ts +1 -59
- package/dist/turn-health/index.d.ts +1 -1
- package/dist/turn-health/index.js +2 -2
- package/dist/turn-health/sink.d.ts +2 -1
- package/dist/turn-trace/index.js +2 -4
- package/dist/turn-trace/recorder.d.ts +0 -2
- package/dist/vault/VaultPane.d.ts +0 -20
- package/dist/vault/VaultPaneOperations.d.ts +318 -0
- package/dist/vault/index.js +2 -1
- package/dist/vault/index.js.map +1 -1
- package/dist/vault/lazy.js +1 -1
- package/dist/web-react/agent-profile-editor.d.ts +1 -2
- package/dist/web-react/agent-profile-editor.js +6 -5
- package/dist/web-react/chat-composer.d.ts +1 -1
- package/dist/web-react/durable-plan-flow.d.ts +6 -1
- package/dist/web-react/editor-glyphs.d.ts +12 -0
- package/dist/web-react/focus-navigation.d.ts +12 -0
- package/dist/web-react/history-controls.d.ts +37 -0
- package/dist/web-react/index.js +36 -34
- package/dist/web-react/interaction-question-card.d.ts +1 -1
- package/dist/web-react/record-grid-writes.d.ts +31 -0
- package/dist/web-react/record-grid.d.ts +1 -48
- package/dist/web-react/session-history-panel.d.ts +1 -9
- package/dist/web-react/use-document-dark.d.ts +1 -0
- package/dist/workspace-export/engine.d.ts +1 -6
- package/dist/workspace-export/index.js +198 -185
- package/dist/workspace-export/index.js.map +1 -1
- package/dist/workspace-export/routes.d.ts +1 -1
- package/dist/workspace-react/index.js +9 -8
- package/dist/workspace-react/index.js.map +1 -1
- package/package.json +1 -11
- package/dist/VaultPane-RXL3WLA2.js +0 -7
- package/dist/agent-profiles/reaper.d.ts +0 -31
- package/dist/agent-profiles/reaper.js +0 -29
- package/dist/agent-profiles/reaper.js.map +0 -1
- package/dist/chunk-4ZSLX3LY.js.map +0 -1
- package/dist/chunk-5IM2CLYX.js.map +0 -1
- package/dist/chunk-6OSJNJA2.js +0 -251
- package/dist/chunk-6OSJNJA2.js.map +0 -1
- package/dist/chunk-6PRQ45QE.js.map +0 -1
- package/dist/chunk-6ZIC6OG5.js.map +0 -1
- package/dist/chunk-BDEBQ4WO.js +0 -38
- package/dist/chunk-BDEBQ4WO.js.map +0 -1
- package/dist/chunk-BOQ4HVVH.js.map +0 -1
- package/dist/chunk-F2VX6TTJ.js.map +0 -1
- package/dist/chunk-FPNZMIAW.js.map +0 -1
- package/dist/chunk-HN6MZ2XL.js.map +0 -1
- package/dist/chunk-J2BBYVGF.js.map +0 -1
- package/dist/chunk-KJODHPWM.js.map +0 -1
- package/dist/chunk-LTWJYNEC.js +0 -100
- package/dist/chunk-LTWJYNEC.js.map +0 -1
- package/dist/chunk-LXYQOOXU.js.map +0 -1
- package/dist/chunk-MEKOWH5E.js.map +0 -1
- package/dist/chunk-NHYRIM4I.js.map +0 -1
- package/dist/chunk-NMZUW6VJ.js.map +0 -1
- package/dist/chunk-ORQD4AUO.js.map +0 -1
- package/dist/chunk-R4X5474U.js.map +0 -1
- package/dist/chunk-RL3Z747H.js.map +0 -1
- package/dist/chunk-TXUAGSFR.js.map +0 -1
- package/dist/chunk-UCCSJX64.js.map +0 -1
- package/dist/chunk-VJBFCNAU.js.map +0 -1
- package/dist/chunk-WSEXFTN4.js.map +0 -1
- package/dist/chunk-Y43PXON2.js.map +0 -1
- package/dist/chunk-ZBB5KQ6B.js.map +0 -1
- package/dist/eval/parity.d.ts +0 -74
- package/dist/mention-editor-B23OMFT2.js.map +0 -1
- package/dist/profile/humanizer-skill.d.ts +0 -23
- package/dist/profile/humanizer-skill.vendored.d.ts +0 -4
- package/dist/sequences-react/components/BrandMark.d.ts +0 -10
- package/dist/skills/marketplace-drizzle.d.ts +0 -121
- package/dist/skills/marketplace-drizzle.js +0 -34
- package/dist/skills/marketplace-drizzle.js.map +0 -1
- package/dist/teams-react/components/BrandMark.d.ts +0 -10
- /package/dist/{DesignCanvas-L6J72JQ2.js.map → DesignCanvas-IQKYAEC4.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-QFQD63MR.js.map → DesignCanvasEditor-O7OCZTGC.js.map} +0 -0
- /package/dist/{TimelineEditor-7KBPJQLT.js.map → TimelineEditor-VB2UJ34D.js.map} +0 -0
- /package/dist/{VaultPane-RXL3WLA2.js.map → VaultPane-AYW7CO33.js.map} +0 -0
- /package/dist/{chunk-ATQQCG4I.js.map → chunk-2VJLLRVV.js.map} +0 -0
- /package/dist/{chunk-MDRH3SDA.js.map → chunk-54YIL7WM.js.map} +0 -0
- /package/dist/{chunk-6QJ3GB3A.js.map → chunk-5GSZGTPJ.js.map} +0 -0
- /package/dist/{chunk-ZDPUC6CM.js.map → chunk-6ZVSMA4T.js.map} +0 -0
- /package/dist/{chunk-LO6VQ35O.js.map → chunk-CQZVJVME.js.map} +0 -0
- /package/dist/{chunk-G4F2NWZH.js.map → chunk-FZ3ZFVAC.js.map} +0 -0
- /package/dist/{chunk-PDD5A43Y.js.map → chunk-UTL6TEN6.js.map} +0 -0
- /package/dist/{chunk-S27DKRI6.js.map → chunk-VDYEVCQQ.js.map} +0 -0
- /package/dist/{chunk-UFQM46NV.js.map → chunk-VK3F4N4U.js.map} +0 -0
- /package/dist/{chunk-FUZETA6Z.js.map → chunk-X6SZGQTK.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
createMultiAlertSink,
|
|
8
8
|
createThrottledAlertSink,
|
|
9
9
|
createWebhookAlertSink
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XOHE6SKU.js";
|
|
11
11
|
import {
|
|
12
12
|
tallyD1Query
|
|
13
13
|
} from "./chunk-MM6RLOXF.js";
|
|
@@ -440,4 +440,4 @@ export {
|
|
|
440
440
|
PASTED_CODE_SAMPLES,
|
|
441
441
|
isEdgeBlock
|
|
442
442
|
};
|
|
443
|
-
//# sourceMappingURL=chunk-
|
|
443
|
+
//# sourceMappingURL=chunk-VDYEVCQQ.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
otlpTraceId,
|
|
3
3
|
parseServerTiming,
|
|
4
4
|
serverTimingAttrs
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PCAY23GS.js";
|
|
6
6
|
|
|
7
7
|
// src/turn-trace/traced-fetch.ts
|
|
8
8
|
var counters = /* @__PURE__ */ new WeakMap();
|
|
@@ -130,4 +130,4 @@ export {
|
|
|
130
130
|
nextCallIndex,
|
|
131
131
|
tracedModelFetch
|
|
132
132
|
};
|
|
133
|
-
//# sourceMappingURL=chunk-
|
|
133
|
+
//# sourceMappingURL=chunk-VK3F4N4U.js.map
|
|
@@ -32,6 +32,7 @@ function scanSource(text) {
|
|
|
32
32
|
}
|
|
33
33
|
return null;
|
|
34
34
|
};
|
|
35
|
+
const { readJsxChildren, readJsxTag, openTag } = createJsxReaders(text, stack, openElement, containerOf, elements, segments, blank);
|
|
35
36
|
let i = 0;
|
|
36
37
|
while (i < text.length) {
|
|
37
38
|
const frame = top();
|
|
@@ -159,6 +160,129 @@ function scanSource(text) {
|
|
|
159
160
|
const name = text.slice(cursor + 1, nameEnd);
|
|
160
161
|
return name.length > 0 && IDENT_START.test(name[0]) ? name : null;
|
|
161
162
|
}
|
|
163
|
+
}
|
|
164
|
+
function readQuoted(text, at, quote) {
|
|
165
|
+
let cursor = at + 1;
|
|
166
|
+
while (cursor < text.length) {
|
|
167
|
+
const ch = text[cursor];
|
|
168
|
+
if (ch === "\\") {
|
|
169
|
+
cursor += 2;
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (ch === quote || ch === "\n") return cursor + 1;
|
|
173
|
+
cursor++;
|
|
174
|
+
}
|
|
175
|
+
return text.length;
|
|
176
|
+
}
|
|
177
|
+
function indexOrEnd(text, needle, from) {
|
|
178
|
+
const idx = text.indexOf(needle, from);
|
|
179
|
+
return idx === -1 ? text.length : idx;
|
|
180
|
+
}
|
|
181
|
+
function startsJsx(text, at) {
|
|
182
|
+
const next = text[at + 1];
|
|
183
|
+
if (next === void 0) return false;
|
|
184
|
+
if (next !== ">" && !IDENT_START.test(next)) return false;
|
|
185
|
+
let cursor = at - 1;
|
|
186
|
+
while (cursor >= 0 && /\s/.test(text[cursor])) cursor--;
|
|
187
|
+
if (cursor < 0) return true;
|
|
188
|
+
const prev = text[cursor];
|
|
189
|
+
if (JSX_PRECEDERS.has(prev)) return true;
|
|
190
|
+
if (!IDENT_PART.test(prev)) return false;
|
|
191
|
+
let wordEnd = cursor + 1;
|
|
192
|
+
while (cursor >= 0 && IDENT_PART.test(text[cursor])) cursor--;
|
|
193
|
+
return JSX_PRECEDING_WORDS.has(text.slice(cursor + 1, wordEnd));
|
|
194
|
+
}
|
|
195
|
+
function isRegexStart(text, at) {
|
|
196
|
+
let cursor = at - 1;
|
|
197
|
+
while (cursor >= 0 && /\s/.test(text[cursor])) cursor--;
|
|
198
|
+
if (cursor < 0) return true;
|
|
199
|
+
const prev = text[cursor];
|
|
200
|
+
return "([{=,;:?&|!+*%<>~^".includes(prev);
|
|
201
|
+
}
|
|
202
|
+
function skipRegex(text, at) {
|
|
203
|
+
let cursor = at + 1;
|
|
204
|
+
let inClass = false;
|
|
205
|
+
while (cursor < text.length) {
|
|
206
|
+
const ch = text[cursor];
|
|
207
|
+
if (ch === "\\") {
|
|
208
|
+
cursor += 2;
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
if (ch === "[") inClass = true;
|
|
212
|
+
else if (ch === "]") inClass = false;
|
|
213
|
+
else if (ch === "/" && !inClass) {
|
|
214
|
+
cursor++;
|
|
215
|
+
while (cursor < text.length && /[a-z]/.test(text[cursor])) cursor++;
|
|
216
|
+
return cursor;
|
|
217
|
+
} else if (ch === "\n") return cursor;
|
|
218
|
+
cursor++;
|
|
219
|
+
}
|
|
220
|
+
return cursor;
|
|
221
|
+
}
|
|
222
|
+
function lineIndex(text) {
|
|
223
|
+
const starts = [0];
|
|
224
|
+
for (let i = 0; i < text.length; i++) if (text[i] === "\n") starts.push(i + 1);
|
|
225
|
+
return starts;
|
|
226
|
+
}
|
|
227
|
+
function positionAt(starts, offset) {
|
|
228
|
+
let lo = 0;
|
|
229
|
+
let hi = starts.length - 1;
|
|
230
|
+
while (lo < hi) {
|
|
231
|
+
const mid = lo + hi + 1 >> 1;
|
|
232
|
+
if (starts[mid] <= offset) lo = mid;
|
|
233
|
+
else hi = mid - 1;
|
|
234
|
+
}
|
|
235
|
+
return { line: lo + 1, column: offset - starts[lo] + 1 };
|
|
236
|
+
}
|
|
237
|
+
function elementAt(elements, offset) {
|
|
238
|
+
let best = null;
|
|
239
|
+
for (const element of elements) {
|
|
240
|
+
if (element.start > offset) break;
|
|
241
|
+
const end = element.end > element.start ? element.end : element.openEnd;
|
|
242
|
+
if (offset < end && (best === null || element.start >= best.start)) best = element;
|
|
243
|
+
}
|
|
244
|
+
return best;
|
|
245
|
+
}
|
|
246
|
+
function enclosingFunctionBlock(masked, offset) {
|
|
247
|
+
let block = enclosingBlock(masked, offset);
|
|
248
|
+
while (block !== null) {
|
|
249
|
+
const head = masked.slice(Math.max(0, block.start - 60), block.start);
|
|
250
|
+
if (/(=>|\)|\bfunction\b|\bdo\b)\s*$/.test(head) && !/\b(if|for|while|switch|catch|try|else)\s*\)?\s*$/.test(head)) {
|
|
251
|
+
return block;
|
|
252
|
+
}
|
|
253
|
+
const outer = enclosingBlock(masked, block.start);
|
|
254
|
+
if (outer === null || outer.start === block.start) return block;
|
|
255
|
+
block = outer;
|
|
256
|
+
}
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
function enclosingBlock(masked, offset) {
|
|
260
|
+
let depth = 0;
|
|
261
|
+
let start = -1;
|
|
262
|
+
for (let i = offset - 1; i >= 0; i--) {
|
|
263
|
+
const ch = masked[i];
|
|
264
|
+
if (ch === "}") depth++;
|
|
265
|
+
else if (ch === "{") {
|
|
266
|
+
if (depth === 0) {
|
|
267
|
+
start = i;
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
depth--;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
if (start === -1) return null;
|
|
274
|
+
depth = 0;
|
|
275
|
+
for (let i = start; i < masked.length; i++) {
|
|
276
|
+
const ch = masked[i];
|
|
277
|
+
if (ch === "{") depth++;
|
|
278
|
+
else if (ch === "}") {
|
|
279
|
+
depth--;
|
|
280
|
+
if (depth === 0) return { start, end: i + 1 };
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return { start, end: masked.length };
|
|
284
|
+
}
|
|
285
|
+
function createJsxReaders(text, stack, openElement, containerOf, elements, segments, blank) {
|
|
162
286
|
function openTag(at) {
|
|
163
287
|
let cursor = at + 1;
|
|
164
288
|
let tag = "";
|
|
@@ -289,127 +413,7 @@ function scanSource(text) {
|
|
|
289
413
|
});
|
|
290
414
|
blank(from, to);
|
|
291
415
|
}
|
|
292
|
-
}
|
|
293
|
-
function readQuoted(text, at, quote) {
|
|
294
|
-
let cursor = at + 1;
|
|
295
|
-
while (cursor < text.length) {
|
|
296
|
-
const ch = text[cursor];
|
|
297
|
-
if (ch === "\\") {
|
|
298
|
-
cursor += 2;
|
|
299
|
-
continue;
|
|
300
|
-
}
|
|
301
|
-
if (ch === quote || ch === "\n") return cursor + 1;
|
|
302
|
-
cursor++;
|
|
303
|
-
}
|
|
304
|
-
return text.length;
|
|
305
|
-
}
|
|
306
|
-
function indexOrEnd(text, needle, from) {
|
|
307
|
-
const idx = text.indexOf(needle, from);
|
|
308
|
-
return idx === -1 ? text.length : idx;
|
|
309
|
-
}
|
|
310
|
-
function startsJsx(text, at) {
|
|
311
|
-
const next = text[at + 1];
|
|
312
|
-
if (next === void 0) return false;
|
|
313
|
-
if (next !== ">" && !IDENT_START.test(next)) return false;
|
|
314
|
-
let cursor = at - 1;
|
|
315
|
-
while (cursor >= 0 && /\s/.test(text[cursor])) cursor--;
|
|
316
|
-
if (cursor < 0) return true;
|
|
317
|
-
const prev = text[cursor];
|
|
318
|
-
if (JSX_PRECEDERS.has(prev)) return true;
|
|
319
|
-
if (!IDENT_PART.test(prev)) return false;
|
|
320
|
-
let wordEnd = cursor + 1;
|
|
321
|
-
while (cursor >= 0 && IDENT_PART.test(text[cursor])) cursor--;
|
|
322
|
-
return JSX_PRECEDING_WORDS.has(text.slice(cursor + 1, wordEnd));
|
|
323
|
-
}
|
|
324
|
-
function isRegexStart(text, at) {
|
|
325
|
-
let cursor = at - 1;
|
|
326
|
-
while (cursor >= 0 && /\s/.test(text[cursor])) cursor--;
|
|
327
|
-
if (cursor < 0) return true;
|
|
328
|
-
const prev = text[cursor];
|
|
329
|
-
return "([{=,;:?&|!+*%<>~^".includes(prev);
|
|
330
|
-
}
|
|
331
|
-
function skipRegex(text, at) {
|
|
332
|
-
let cursor = at + 1;
|
|
333
|
-
let inClass = false;
|
|
334
|
-
while (cursor < text.length) {
|
|
335
|
-
const ch = text[cursor];
|
|
336
|
-
if (ch === "\\") {
|
|
337
|
-
cursor += 2;
|
|
338
|
-
continue;
|
|
339
|
-
}
|
|
340
|
-
if (ch === "[") inClass = true;
|
|
341
|
-
else if (ch === "]") inClass = false;
|
|
342
|
-
else if (ch === "/" && !inClass) {
|
|
343
|
-
cursor++;
|
|
344
|
-
while (cursor < text.length && /[a-z]/.test(text[cursor])) cursor++;
|
|
345
|
-
return cursor;
|
|
346
|
-
} else if (ch === "\n") return cursor;
|
|
347
|
-
cursor++;
|
|
348
|
-
}
|
|
349
|
-
return cursor;
|
|
350
|
-
}
|
|
351
|
-
function lineIndex(text) {
|
|
352
|
-
const starts = [0];
|
|
353
|
-
for (let i = 0; i < text.length; i++) if (text[i] === "\n") starts.push(i + 1);
|
|
354
|
-
return starts;
|
|
355
|
-
}
|
|
356
|
-
function positionAt(starts, offset) {
|
|
357
|
-
let lo = 0;
|
|
358
|
-
let hi = starts.length - 1;
|
|
359
|
-
while (lo < hi) {
|
|
360
|
-
const mid = lo + hi + 1 >> 1;
|
|
361
|
-
if (starts[mid] <= offset) lo = mid;
|
|
362
|
-
else hi = mid - 1;
|
|
363
|
-
}
|
|
364
|
-
return { line: lo + 1, column: offset - starts[lo] + 1 };
|
|
365
|
-
}
|
|
366
|
-
function elementAt(elements, offset) {
|
|
367
|
-
let best = null;
|
|
368
|
-
for (const element of elements) {
|
|
369
|
-
if (element.start > offset) break;
|
|
370
|
-
const end = element.end > element.start ? element.end : element.openEnd;
|
|
371
|
-
if (offset < end && (best === null || element.start >= best.start)) best = element;
|
|
372
|
-
}
|
|
373
|
-
return best;
|
|
374
|
-
}
|
|
375
|
-
function enclosingFunctionBlock(masked, offset) {
|
|
376
|
-
let block = enclosingBlock(masked, offset);
|
|
377
|
-
while (block !== null) {
|
|
378
|
-
const head = masked.slice(Math.max(0, block.start - 60), block.start);
|
|
379
|
-
if (/(=>|\)|\bfunction\b|\bdo\b)\s*$/.test(head) && !/\b(if|for|while|switch|catch|try|else)\s*\)?\s*$/.test(head)) {
|
|
380
|
-
return block;
|
|
381
|
-
}
|
|
382
|
-
const outer = enclosingBlock(masked, block.start);
|
|
383
|
-
if (outer === null || outer.start === block.start) return block;
|
|
384
|
-
block = outer;
|
|
385
|
-
}
|
|
386
|
-
return null;
|
|
387
|
-
}
|
|
388
|
-
function enclosingBlock(masked, offset) {
|
|
389
|
-
let depth = 0;
|
|
390
|
-
let start = -1;
|
|
391
|
-
for (let i = offset - 1; i >= 0; i--) {
|
|
392
|
-
const ch = masked[i];
|
|
393
|
-
if (ch === "}") depth++;
|
|
394
|
-
else if (ch === "{") {
|
|
395
|
-
if (depth === 0) {
|
|
396
|
-
start = i;
|
|
397
|
-
break;
|
|
398
|
-
}
|
|
399
|
-
depth--;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
if (start === -1) return null;
|
|
403
|
-
depth = 0;
|
|
404
|
-
for (let i = start; i < masked.length; i++) {
|
|
405
|
-
const ch = masked[i];
|
|
406
|
-
if (ch === "{") depth++;
|
|
407
|
-
else if (ch === "}") {
|
|
408
|
-
depth--;
|
|
409
|
-
if (depth === 0) return { start, end: i + 1 };
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
return { start, end: masked.length };
|
|
416
|
+
return { readJsxChildren, readJsxTag, openTag };
|
|
413
417
|
}
|
|
414
418
|
|
|
415
419
|
// src/legibility/checks/empty-state.ts
|
|
@@ -1459,4 +1463,4 @@ export {
|
|
|
1459
1463
|
legibilityReportToJson,
|
|
1460
1464
|
checkLegibility
|
|
1461
1465
|
};
|
|
1462
|
-
//# sourceMappingURL=chunk-
|
|
1466
|
+
//# sourceMappingURL=chunk-VYBTQK25.js.map
|