@elaraai/e3-ui 1.0.86 → 1.0.87
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/src/bind/data-indexed.d.ts +159 -0
- package/dist/src/bind/data-indexed.d.ts.map +1 -0
- package/dist/src/bind/data-indexed.js +105 -0
- package/dist/src/bind/data-indexed.js.map +1 -0
- package/dist/src/bind/data.d.ts +5 -3
- package/dist/src/bind/data.d.ts.map +1 -1
- package/dist/src/bind/data.js +6 -0
- package/dist/src/bind/data.js.map +1 -1
- package/dist/src/bind/record.d.ts +34 -23
- package/dist/src/bind/record.d.ts.map +1 -1
- package/dist/src/bind/record.js +46 -19
- package/dist/src/bind/record.js.map +1 -1
- package/dist/src/calendar/index.d.ts +2923 -0
- package/dist/src/calendar/index.d.ts.map +1 -0
- package/dist/src/calendar/index.js +135 -0
- package/dist/src/calendar/index.js.map +1 -0
- package/dist/src/decision/queue.d.ts +3 -3
- package/dist/src/decision/queue.d.ts.map +1 -1
- package/dist/src/decision/queue.js +2 -2
- package/dist/src/decision/queue.js.map +1 -1
- package/dist/src/decision/types.d.ts +4 -0
- package/dist/src/decision/types.d.ts.map +1 -1
- package/dist/src/decision/types.js +4 -0
- package/dist/src/decision/types.js.map +1 -1
- package/dist/src/flowchart/canvas.d.ts +114 -0
- package/dist/src/flowchart/canvas.d.ts.map +1 -0
- package/dist/src/flowchart/canvas.js +84 -0
- package/dist/src/flowchart/canvas.js.map +1 -0
- package/dist/src/flowchart/flowchart.d.ts +79 -0
- package/dist/src/flowchart/flowchart.d.ts.map +1 -0
- package/dist/src/flowchart/flowchart.js +9 -0
- package/dist/src/flowchart/flowchart.js.map +1 -0
- package/dist/src/flowchart/index.d.ts +305 -0
- package/dist/src/flowchart/index.d.ts.map +1 -0
- package/dist/src/flowchart/index.js +267 -0
- package/dist/src/flowchart/index.js.map +1 -0
- package/dist/src/flowchart/library.d.ts +720 -0
- package/dist/src/flowchart/library.d.ts.map +1 -0
- package/dist/src/flowchart/library.js +611 -0
- package/dist/src/flowchart/library.js.map +1 -0
- package/dist/src/flowchart/over.d.ts +234 -0
- package/dist/src/flowchart/over.d.ts.map +1 -0
- package/dist/src/flowchart/over.js +220 -0
- package/dist/src/flowchart/over.js.map +1 -0
- package/dist/src/flowchart/patch.d.ts +64 -0
- package/dist/src/flowchart/patch.d.ts.map +1 -0
- package/dist/src/flowchart/patch.js +67 -0
- package/dist/src/flowchart/patch.js.map +1 -0
- package/dist/src/flowchart/payload.d.ts +8220 -0
- package/dist/src/flowchart/payload.d.ts.map +1 -0
- package/dist/src/flowchart/payload.js +521 -0
- package/dist/src/flowchart/payload.js.map +1 -0
- package/dist/src/flowchart/types.d.ts +393 -0
- package/dist/src/flowchart/types.d.ts.map +1 -0
- package/dist/src/flowchart/types.js +216 -0
- package/dist/src/flowchart/types.js.map +1 -0
- package/dist/src/flowchart/values.d.ts +267 -0
- package/dist/src/flowchart/values.d.ts.map +1 -0
- package/dist/src/flowchart/values.js +216 -0
- package/dist/src/flowchart/values.js.map +1 -0
- package/dist/src/flowchart/window.d.ts +521 -0
- package/dist/src/flowchart/window.d.ts.map +1 -0
- package/dist/src/flowchart/window.js +69 -0
- package/dist/src/flowchart/window.js.map +1 -0
- package/dist/src/index.d.ts +25 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +48 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +35 -3
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +72 -3
- package/dist/src/internal.js.map +1 -1
- package/dist/src/plan/assemble.d.ts +2224 -0
- package/dist/src/plan/assemble.d.ts.map +1 -0
- package/dist/src/plan/assemble.js +210 -0
- package/dist/src/plan/assemble.js.map +1 -0
- package/dist/src/plan/builders.d.ts +790 -0
- package/dist/src/plan/builders.d.ts.map +1 -0
- package/dist/src/plan/builders.js +749 -0
- package/dist/src/plan/builders.js.map +1 -0
- package/dist/src/plan/event-rows.d.ts +2565 -0
- package/dist/src/plan/event-rows.d.ts.map +1 -0
- package/dist/src/plan/event-rows.js +689 -0
- package/dist/src/plan/event-rows.js.map +1 -0
- package/dist/src/plan/factories.d.ts +458 -0
- package/dist/src/plan/factories.d.ts.map +1 -0
- package/dist/src/plan/factories.js +484 -0
- package/dist/src/plan/factories.js.map +1 -0
- package/dist/src/plan/index.d.ts +672 -0
- package/dist/src/plan/index.d.ts.map +1 -0
- package/dist/src/plan/index.js +532 -0
- package/dist/src/plan/index.js.map +1 -0
- package/dist/src/plan/ir.d.ts +2594 -0
- package/dist/src/plan/ir.d.ts.map +1 -0
- package/dist/src/plan/ir.js +78 -0
- package/dist/src/plan/ir.js.map +1 -0
- package/dist/src/plan/library.d.ts +772 -0
- package/dist/src/plan/library.d.ts.map +1 -0
- package/dist/src/plan/library.js +424 -0
- package/dist/src/plan/library.js.map +1 -0
- package/dist/src/plan/ordered-source.d.ts +27 -0
- package/dist/src/plan/ordered-source.d.ts.map +1 -0
- package/dist/src/plan/ordered-source.js +48 -0
- package/dist/src/plan/ordered-source.js.map +1 -0
- package/dist/src/plan/over.d.ts +247 -0
- package/dist/src/plan/over.d.ts.map +1 -0
- package/dist/src/plan/over.js +266 -0
- package/dist/src/plan/over.js.map +1 -0
- package/dist/src/plan/pick.d.ts +78 -0
- package/dist/src/plan/pick.d.ts.map +1 -0
- package/dist/src/plan/pick.js +146 -0
- package/dist/src/plan/pick.js.map +1 -0
- package/dist/src/plan/plan.d.ts +11611 -0
- package/dist/src/plan/plan.d.ts.map +1 -0
- package/dist/src/plan/plan.js +428 -0
- package/dist/src/plan/plan.js.map +1 -0
- package/dist/src/plan/refs.d.ts +218 -0
- package/dist/src/plan/refs.d.ts.map +1 -0
- package/dist/src/plan/refs.js +226 -0
- package/dist/src/plan/refs.js.map +1 -0
- package/dist/src/plan/root.d.ts +290 -0
- package/dist/src/plan/root.d.ts.map +1 -0
- package/dist/src/plan/root.js +463 -0
- package/dist/src/plan/root.js.map +1 -0
- package/dist/src/plan/series.d.ts +13554 -0
- package/dist/src/plan/series.d.ts.map +1 -0
- package/dist/src/plan/series.js +1921 -0
- package/dist/src/plan/series.js.map +1 -0
- package/dist/src/plan/types.d.ts +12400 -0
- package/dist/src/plan/types.d.ts.map +1 -0
- package/dist/src/plan/types.js +1335 -0
- package/dist/src/plan/types.js.map +1 -0
- package/dist/src/roster/coverage.d.ts +240 -0
- package/dist/src/roster/coverage.d.ts.map +1 -0
- package/dist/src/roster/coverage.js +109 -0
- package/dist/src/roster/coverage.js.map +1 -0
- package/dist/src/roster/index.d.ts +4028 -0
- package/dist/src/roster/index.d.ts.map +1 -0
- package/dist/src/roster/index.js +115 -0
- package/dist/src/roster/index.js.map +1 -0
- package/dist/src/roster/library.d.ts +106 -0
- package/dist/src/roster/library.d.ts.map +1 -0
- package/dist/src/roster/library.js +78 -0
- package/dist/src/roster/library.js.map +1 -0
- package/dist/src/roster/people.d.ts +50 -0
- package/dist/src/roster/people.d.ts.map +1 -0
- package/dist/src/roster/people.js +32 -0
- package/dist/src/roster/people.js.map +1 -0
- package/dist/src/roster/rules.d.ts +275 -0
- package/dist/src/roster/rules.d.ts.map +1 -0
- package/dist/src/roster/rules.js +162 -0
- package/dist/src/roster/rules.js.map +1 -0
- package/dist/src/roster/types.d.ts +672 -0
- package/dist/src/roster/types.d.ts.map +1 -0
- package/dist/src/roster/types.js +248 -0
- package/dist/src/roster/types.js.map +1 -0
- package/dist/src/roster/visibility.d.ts +66 -0
- package/dist/src/roster/visibility.d.ts.map +1 -0
- package/dist/src/roster/visibility.js +25 -0
- package/dist/src/roster/visibility.js.map +1 -0
- package/dist/src/schedule/days.d.ts +54 -0
- package/dist/src/schedule/days.d.ts.map +1 -0
- package/dist/src/schedule/days.js +68 -0
- package/dist/src/schedule/days.js.map +1 -0
- package/dist/src/schedule/events.d.ts +433 -0
- package/dist/src/schedule/events.d.ts.map +1 -0
- package/dist/src/schedule/events.js +851 -0
- package/dist/src/schedule/events.js.map +1 -0
- package/dist/src/schedule/index.d.ts +150 -0
- package/dist/src/schedule/index.d.ts.map +1 -0
- package/dist/src/schedule/index.js +132 -0
- package/dist/src/schedule/index.js.map +1 -0
- package/dist/src/schedule/library.d.ts +70 -0
- package/dist/src/schedule/library.d.ts.map +1 -0
- package/dist/src/schedule/library.js +102 -0
- package/dist/src/schedule/library.js.map +1 -0
- package/dist/src/schedule/patch.d.ts +74 -0
- package/dist/src/schedule/patch.d.ts.map +1 -0
- package/dist/src/schedule/patch.js +68 -0
- package/dist/src/schedule/patch.js.map +1 -0
- package/dist/src/schedule/record-window.d.ts +189 -0
- package/dist/src/schedule/record-window.d.ts.map +1 -0
- package/dist/src/schedule/record-window.js +95 -0
- package/dist/src/schedule/record-window.js.map +1 -0
- package/dist/src/schedule/resources.d.ts +165 -0
- package/dist/src/schedule/resources.d.ts.map +1 -0
- package/dist/src/schedule/resources.js +234 -0
- package/dist/src/schedule/resources.js.map +1 -0
- package/dist/src/schedule/templates.d.ts +47 -0
- package/dist/src/schedule/templates.d.ts.map +1 -0
- package/dist/src/schedule/templates.js +61 -0
- package/dist/src/schedule/templates.js.map +1 -0
- package/dist/src/schedule/types.d.ts +1677 -0
- package/dist/src/schedule/types.d.ts.map +1 -0
- package/dist/src/schedule/types.js +374 -0
- package/dist/src/schedule/types.js.map +1 -0
- package/dist/src/schedule/window.d.ts +154 -0
- package/dist/src/schedule/window.d.ts.map +1 -0
- package/dist/src/schedule/window.js +363 -0
- package/dist/src/schedule/window.js.map +1 -0
- package/dist/src/sheet/bridge.d.ts +385 -0
- package/dist/src/sheet/bridge.d.ts.map +1 -0
- package/dist/src/sheet/bridge.js +809 -0
- package/dist/src/sheet/bridge.js.map +1 -0
- package/dist/src/sheet/columns.d.ts +410 -0
- package/dist/src/sheet/columns.d.ts.map +1 -0
- package/dist/src/sheet/columns.js +99 -0
- package/dist/src/sheet/columns.js.map +1 -0
- package/dist/src/sheet/context-bridge.d.ts +48 -0
- package/dist/src/sheet/context-bridge.d.ts.map +1 -0
- package/dist/src/sheet/context-bridge.js +216 -0
- package/dist/src/sheet/context-bridge.js.map +1 -0
- package/dist/src/sheet/draft-bridge.d.ts +37 -0
- package/dist/src/sheet/draft-bridge.d.ts.map +1 -0
- package/dist/src/sheet/draft-bridge.js +153 -0
- package/dist/src/sheet/draft-bridge.js.map +1 -0
- package/dist/src/sheet/drafts.d.ts +14 -0
- package/dist/src/sheet/drafts.d.ts.map +1 -0
- package/dist/src/sheet/drafts.js +14 -0
- package/dist/src/sheet/drafts.js.map +1 -0
- package/dist/src/sheet/editing-bridge.d.ts +40 -0
- package/dist/src/sheet/editing-bridge.d.ts.map +1 -0
- package/dist/src/sheet/editing-bridge.js +231 -0
- package/dist/src/sheet/editing-bridge.js.map +1 -0
- package/dist/src/sheet/editing-types.d.ts +268 -0
- package/dist/src/sheet/editing-types.d.ts.map +1 -0
- package/dist/src/sheet/editing-types.js +34 -0
- package/dist/src/sheet/editing-types.js.map +1 -0
- package/dist/src/sheet/edits.d.ts +37 -0
- package/dist/src/sheet/edits.d.ts.map +1 -0
- package/dist/src/sheet/edits.js +31 -0
- package/dist/src/sheet/edits.js.map +1 -0
- package/dist/src/sheet/fields.d.ts +693 -0
- package/dist/src/sheet/fields.d.ts.map +1 -0
- package/dist/src/sheet/fields.js +280 -0
- package/dist/src/sheet/fields.js.map +1 -0
- package/dist/src/sheet/group.d.ts +165 -0
- package/dist/src/sheet/group.d.ts.map +1 -0
- package/dist/src/sheet/group.js +52 -0
- package/dist/src/sheet/group.js.map +1 -0
- package/dist/src/sheet/index.d.ts +542 -0
- package/dist/src/sheet/index.d.ts.map +1 -0
- package/dist/src/sheet/index.js +387 -0
- package/dist/src/sheet/index.js.map +1 -0
- package/dist/src/sheet/library.d.ts +284 -0
- package/dist/src/sheet/library.d.ts.map +1 -0
- package/dist/src/sheet/library.js +259 -0
- package/dist/src/sheet/library.js.map +1 -0
- package/dist/src/sheet/link.d.ts +398 -0
- package/dist/src/sheet/link.d.ts.map +1 -0
- package/dist/src/sheet/link.js +228 -0
- package/dist/src/sheet/link.js.map +1 -0
- package/dist/src/sheet/record.d.ts +75 -0
- package/dist/src/sheet/record.d.ts.map +1 -0
- package/dist/src/sheet/record.js +128 -0
- package/dist/src/sheet/record.js.map +1 -0
- package/dist/src/sheet/registers.d.ts +681 -0
- package/dist/src/sheet/registers.d.ts.map +1 -0
- package/dist/src/sheet/registers.js +671 -0
- package/dist/src/sheet/registers.js.map +1 -0
- package/dist/src/sheet/root.d.ts +329 -0
- package/dist/src/sheet/root.d.ts.map +1 -0
- package/dist/src/sheet/root.js +511 -0
- package/dist/src/sheet/root.js.map +1 -0
- package/dist/src/sheet/seed-bridge.d.ts +14 -0
- package/dist/src/sheet/seed-bridge.d.ts.map +1 -0
- package/dist/src/sheet/seed-bridge.js +51 -0
- package/dist/src/sheet/seed-bridge.js.map +1 -0
- package/dist/src/sheet/sheet.d.ts +11819 -0
- package/dist/src/sheet/sheet.d.ts.map +1 -0
- package/dist/src/sheet/sheet.js +236 -0
- package/dist/src/sheet/sheet.js.map +1 -0
- package/dist/src/sheet/sub-rows.d.ts +299 -0
- package/dist/src/sheet/sub-rows.d.ts.map +1 -0
- package/dist/src/sheet/sub-rows.js +272 -0
- package/dist/src/sheet/sub-rows.js.map +1 -0
- package/dist/src/sheet/templates.d.ts +161 -0
- package/dist/src/sheet/templates.d.ts.map +1 -0
- package/dist/src/sheet/templates.js +122 -0
- package/dist/src/sheet/templates.js.map +1 -0
- package/dist/src/sheet/transactions.d.ts +76 -0
- package/dist/src/sheet/transactions.d.ts.map +1 -0
- package/dist/src/sheet/transactions.js +40 -0
- package/dist/src/sheet/transactions.js.map +1 -0
- package/dist/src/sheet/types.d.ts +15226 -0
- package/dist/src/sheet/types.d.ts.map +1 -0
- package/dist/src/sheet/types.js +1070 -0
- package/dist/src/sheet/types.js.map +1 -0
- package/dist/src/sheet/views.d.ts +29 -0
- package/dist/src/sheet/views.d.ts.map +1 -0
- package/dist/src/sheet/views.js +43 -0
- package/dist/src/sheet/views.js.map +1 -0
- package/dist/src/studio/component.d.ts.map +1 -1
- package/dist/src/studio/component.js +11 -8
- package/dist/src/studio/component.js.map +1 -1
- package/dist/src/utils/derive.d.ts +134 -8
- package/dist/src/utils/derive.d.ts.map +1 -1
- package/dist/src/utils/derive.js +409 -7
- package/dist/src/utils/derive.js.map +1 -1
- package/dist/src/utils/ordered-source.d.ts +38 -0
- package/dist/src/utils/ordered-source.d.ts.map +1 -0
- package/dist/src/utils/ordered-source.js +45 -0
- package/dist/src/utils/ordered-source.js.map +1 -0
- package/dist/src/utils/row-inspector.d.ts +36 -0
- package/dist/src/utils/row-inspector.d.ts.map +1 -0
- package/dist/src/utils/row-inspector.js +49 -0
- package/dist/src/utils/row-inspector.js.map +1 -0
- package/dist/test/bind/data/data.examples.d.ts +21 -19
- package/dist/test/bind/data/data.examples.d.ts.map +1 -1
- package/dist/test/bind/data/data.examples.js +122 -122
- package/dist/test/bind/data/data.examples.js.map +1 -1
- package/dist/test/bind/record/record.examples.d.ts.map +1 -1
- package/dist/test/bind/record/record.examples.js +9 -9
- package/dist/test/bind/record/record.examples.js.map +1 -1
- package/dist/test/calendar/calendar-records.examples.d.ts +228 -0
- package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -0
- package/dist/test/calendar/calendar-records.examples.js +91 -0
- package/dist/test/calendar/calendar-records.examples.js.map +1 -0
- package/dist/test/calendar/calendar.examples.d.ts +776 -0
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -0
- package/dist/test/calendar/calendar.examples.js +336 -0
- package/dist/test/calendar/calendar.examples.js.map +1 -0
- package/dist/test/decision/journal.examples.d.ts +28 -28
- package/dist/test/decision/journal.examples.d.ts.map +1 -1
- package/dist/test/decision/journal.examples.js +4 -4
- package/dist/test/decision/journal.examples.js.map +1 -1
- package/dist/test/decision/queue.examples.d.ts.map +1 -1
- package/dist/test/decision/queue.examples.js +5 -7
- package/dist/test/decision/queue.examples.js.map +1 -1
- package/dist/test/flowchart/flowchart.examples.d.ts +3713 -0
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -0
- package/dist/test/flowchart/flowchart.examples.js +465 -0
- package/dist/test/flowchart/flowchart.examples.js.map +1 -0
- package/dist/test/plan/plan-events.examples.d.ts +3666 -0
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -0
- package/dist/test/plan/plan-events.examples.js +773 -0
- package/dist/test/plan/plan-events.examples.js.map +1 -0
- package/dist/test/plan/plan-records.examples.d.ts +3 -0
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -0
- package/dist/test/plan/plan-records.examples.js +45 -0
- package/dist/test/plan/plan-records.examples.js.map +1 -0
- package/dist/test/plan/plan-windows.examples.d.ts +588 -0
- package/dist/test/plan/plan-windows.examples.d.ts.map +1 -0
- package/dist/test/plan/plan-windows.examples.js +170 -0
- package/dist/test/plan/plan-windows.examples.js.map +1 -0
- package/dist/test/plan/plan.examples.d.ts +8095 -0
- package/dist/test/plan/plan.examples.d.ts.map +1 -0
- package/dist/test/plan/plan.examples.js +2500 -0
- package/dist/test/plan/plan.examples.js.map +1 -0
- package/dist/test/roster/domain.examples.d.ts +367 -0
- package/dist/test/roster/domain.examples.d.ts.map +1 -0
- package/dist/test/roster/domain.examples.js +72 -0
- package/dist/test/roster/domain.examples.js.map +1 -0
- package/dist/test/roster/roster-records.examples.d.ts +729 -0
- package/dist/test/roster/roster-records.examples.d.ts.map +1 -0
- package/dist/test/roster/roster-records.examples.js +86 -0
- package/dist/test/roster/roster-records.examples.js.map +1 -0
- package/dist/test/roster/roster.examples.d.ts +750 -0
- package/dist/test/roster/roster.examples.d.ts.map +1 -0
- package/dist/test/roster/roster.examples.js +198 -0
- package/dist/test/roster/roster.examples.js.map +1 -0
- package/dist/test/roster/warehouse.d.ts +87 -0
- package/dist/test/roster/warehouse.d.ts.map +1 -0
- package/dist/test/roster/warehouse.js +883 -0
- package/dist/test/roster/warehouse.js.map +1 -0
- package/dist/test/sheet/sheet-link.examples.d.ts +7 -0
- package/dist/test/sheet/sheet-link.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-link.examples.js +41 -0
- package/dist/test/sheet/sheet-link.examples.js.map +1 -0
- package/dist/test/sheet/sheet-records.examples.d.ts +421 -0
- package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-records.examples.js +79 -0
- package/dist/test/sheet/sheet-records.examples.js.map +1 -0
- package/dist/test/sheet/sheet-transactions.examples.d.ts +7 -0
- package/dist/test/sheet/sheet-transactions.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-transactions.examples.js +58 -0
- package/dist/test/sheet/sheet-transactions.examples.js.map +1 -0
- package/dist/test/sheet/sheet.examples.d.ts +5562 -0
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet.examples.js +1178 -0
- package/dist/test/sheet/sheet.examples.js.map +1 -0
- package/dist/test/studio/studio.examples.d.ts.map +1 -1
- package/dist/test/studio/studio.examples.js +11 -11
- package/dist/test/studio/studio.examples.js.map +1 -1
- package/package.json +12 -9
|
@@ -0,0 +1,790 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Plan value builders — shorthand resolvers, the instant sugar
|
|
7
|
+
* ({@link resolveInstant} / `Plan.at`), the axis declarations (`Plan.axis`,
|
|
8
|
+
* `.time` / `.number` / `.ordinal`), element value builders (`Plan.run` /
|
|
9
|
+
* `decision` / `port` / `event` / `marker` / `chip` / `mark`) and cell
|
|
10
|
+
* builders (`heatCells` / `weightCells` / `segmentCells` / `tableCells`).
|
|
11
|
+
* Every element is pure data — rich click/hover surfaces resolve through
|
|
12
|
+
* the ROOT's `popover` / `hover` functions over `PlanElementRefType`
|
|
13
|
+
* (`Plan Data Interface.md` §3.3), never per-element embeds.
|
|
14
|
+
*
|
|
15
|
+
* @packageDocumentation
|
|
16
|
+
*/
|
|
17
|
+
import { type ExprType, type SubtypeExprOrValue, ArrayType, BooleanType, DateTimeType, FloatType, IntegerType, OptionType, StringType, StructType } from "@elaraai/east";
|
|
18
|
+
import { EventStateType, IconType, StatusValueType, type EventStateLiteral, type IconName, type StatusValueLiteral } from "@elaraai/east-ui";
|
|
19
|
+
import { ColorSchemeType, MatrixFillType, TickFormatType, type ColorSchemeLiteral, type MatrixFillLiteral, type SolidIconPrefix } from "@elaraai/east-ui/internal";
|
|
20
|
+
import { type PlanAxisOptions, type PlanNumberAxisOptions, type PlanOrdinalAxisOptions, PlanInstantType, type PlanInstantLikeType, type PlanInstantInput, type PlanAxisKindLiteral, type PlanKindOf, type PlanInstantExpr, type PlanRunExpr, type PlanDecisionMarkExpr, type PlanPortExpr, type PlanBucketEventExpr, type PlanCellMarkerExpr, type PlanChipExpr, type PlanEventMarkExpr, type PlanHeatCellsExpr, type PlanTableCellsExpr, type PlanTableSeriesExpr, type PlanAxisExpr, type PlanCellsInput, type PlanTableCellsInput, PlanStretchType, type PlanStretchLiteral, PlanContentAlignType, type PlanContentAlignLiteral, PlanAnimationType, type PlanAnimationLiteral, PlanEventMarkKindType, PlanHeatCellType, PlanWeightCellType, PlanSegmentType, PlanSegmentCellType, PlanTableToneType, type PlanTableToneLiteral, PlanLinkType, PlanRunRefType, PlanLaneType, PlanRowIdType, PlanFoldType, type PlanFoldLiteral, PlanQuantityType, PlanHeatScaleType, PlanUiStateType } from "./types.js";
|
|
21
|
+
/**
|
|
22
|
+
* Resolves the shared event-lifecycle string shorthands into an
|
|
23
|
+
* {@link EventStateType} value: `"estimated"`, `"added"`, `"recommended"`,
|
|
24
|
+
* `"removed"` (the three `proposed` flavours), `"confirmed"`,
|
|
25
|
+
* `"in-progress"`, `"actual"`, `"rejected"`.
|
|
26
|
+
*
|
|
27
|
+
* @param state - An `EventStateType` value/expression or a string shorthand
|
|
28
|
+
* @returns The resolved `EventStateType` value
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolvePlanEventState(state: SubtypeExprOrValue<EventStateType> | EventStateLiteral): SubtypeExprOrValue<EventStateType>;
|
|
31
|
+
/** A fold input — a {@link PlanFoldLiteral} or a `PlanFoldType` value / expression (#824). */
|
|
32
|
+
export type PlanFoldInput = PlanFoldLiteral | SubtypeExprOrValue<PlanFoldType>;
|
|
33
|
+
/**
|
|
34
|
+
* Resolve a fold input, falling back to the default of what it folds.
|
|
35
|
+
*
|
|
36
|
+
* @param fold - The declared fold, if any
|
|
37
|
+
* @param fallback - The default for the values being folded (`mean` for levels, `sum` for amounts)
|
|
38
|
+
* @returns The fold
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveFold(fold: PlanFoldInput | undefined, fallback: PlanFoldLiteral): ExprType<PlanFoldType>;
|
|
41
|
+
/**
|
|
42
|
+
* An icon input — a bare Font Awesome solid name (`"rocket"`), a
|
|
43
|
+
* `{ prefix: "fas", name }` pair, or an `IconType` expression (the Banner
|
|
44
|
+
* envelope precedent). East UI draws Font Awesome's solid set only (#1263).
|
|
45
|
+
* The mounting context pins size and colour; hosts choose the glyph, never
|
|
46
|
+
* the geometry.
|
|
47
|
+
*/
|
|
48
|
+
export type PlanIconInput = IconName | {
|
|
49
|
+
prefix: SolidIconPrefix;
|
|
50
|
+
name: string;
|
|
51
|
+
} | SubtypeExprOrValue<IconType>;
|
|
52
|
+
/**
|
|
53
|
+
* Resolve a {@link PlanIconInput} into an `IconType` value.
|
|
54
|
+
*
|
|
55
|
+
* @param icon - The icon
|
|
56
|
+
* @param where - What takes it, as a refusal names it (`Plan.run icon`, …)
|
|
57
|
+
* @returns The icon as an `IconType` value or expression
|
|
58
|
+
* @throws {Error} When an icon given by value is not of Font Awesome's solid set (#1263)
|
|
59
|
+
*/
|
|
60
|
+
export declare function resolveIcon(icon: PlanIconInput, where?: string): SubtypeExprOrValue<IconType>;
|
|
61
|
+
/**
|
|
62
|
+
* Resolves an instant input into a {@link PlanInstantType} value — the one
|
|
63
|
+
* place the arm is inferred (#631).
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* The input is any {@link PlanInstantLikeType} value or expression. JS values
|
|
67
|
+
* wrap by their type (`Date` ⇒ `time`, `number` / `bigint` ⇒ `number`,
|
|
68
|
+
* `string` ⇒ `ordinal`); East expressions wrap by their STATIC type
|
|
69
|
+
* (`DateTimeType` ⇒ `time`, `FloatType` ⇒ `number`, `IntegerType` ⇒ `number`
|
|
70
|
+
* via `toFloat`, `StringType` ⇒ `ordinal`); a {@link PlanInstantType} value
|
|
71
|
+
* or expression passes through (subtype-checked by `East.value`). Nothing
|
|
72
|
+
* here knows the canvas axis — the arm is the INPUT's; the renderer holds it
|
|
73
|
+
* against the root's declaration.
|
|
74
|
+
*
|
|
75
|
+
* @param v - The instant (a value or expression of a {@link PlanInstantLikeType})
|
|
76
|
+
* @param where - The field being resolved, for the error message
|
|
77
|
+
* @returns The instant as a `PlanInstantType` expression
|
|
78
|
+
* @throws {Error} If `v` is an expression of a non-instant type
|
|
79
|
+
*/
|
|
80
|
+
export declare function resolveInstant(v: PlanInstantInput, where: string): ExprType<PlanInstantType>;
|
|
81
|
+
/**
|
|
82
|
+
* The `Plan.at` builders — one instant per axis kind, explicitly. The
|
|
83
|
+
* element builders already wrap by type; these are for element RECORDS
|
|
84
|
+
* written as data (`{ at: Plan.at.time(week(27n)), … }` in a
|
|
85
|
+
* `Plan.Types.HeatCell` array) and for reading as a declaration. Each
|
|
86
|
+
* result is BRANDED with its arm ({@link PlanInstantExpr}), so a cell
|
|
87
|
+
* list built from them carries the kind to the root's compile-time check.
|
|
88
|
+
*/
|
|
89
|
+
export declare const at: {
|
|
90
|
+
/**
|
|
91
|
+
* A `time` instant.
|
|
92
|
+
*
|
|
93
|
+
* @param v - The UTC instant (a `Date` or `DateTimeType` expression)
|
|
94
|
+
* @returns A `PlanInstantType` expression with the `time` arm, branded `"time"`
|
|
95
|
+
*/
|
|
96
|
+
readonly time: (v: SubtypeExprOrValue<DateTimeType>) => PlanInstantExpr<"time">;
|
|
97
|
+
/**
|
|
98
|
+
* A `number` instant.
|
|
99
|
+
*
|
|
100
|
+
* @param v - The position (a number or `FloatType` expression)
|
|
101
|
+
* @returns A `PlanInstantType` expression with the `number` arm, branded `"number"`
|
|
102
|
+
*/
|
|
103
|
+
readonly number: (v: SubtypeExprOrValue<FloatType> | number) => PlanInstantExpr<"number">;
|
|
104
|
+
/**
|
|
105
|
+
* An `ordinal` instant.
|
|
106
|
+
*
|
|
107
|
+
* @param v - The declared value (a string or `StringType` expression)
|
|
108
|
+
* @returns A `PlanInstantType` expression with the `ordinal` arm, branded `"ordinal"`
|
|
109
|
+
*/
|
|
110
|
+
readonly ordinal: (v: SubtypeExprOrValue<StringType>) => PlanInstantExpr<"ordinal">;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* The axis values built WITHOUT a window (#822) — a canvas given one must bind
|
|
114
|
+
* a slice, whose range supplies the window, or the root refuses it at build
|
|
115
|
+
* time. An axis held in a variable (`$.const(Plan.axis(…))`) is not the value
|
|
116
|
+
* recorded here, so its canvas is held to the rule at render instead.
|
|
117
|
+
*/
|
|
118
|
+
export declare const WINDOWLESS_AXES: WeakSet<object>;
|
|
119
|
+
/**
|
|
120
|
+
* The kind of an axis value `Plan.axis` built.
|
|
121
|
+
*
|
|
122
|
+
* @param axis - A Plan's `axis`
|
|
123
|
+
* @returns `"time"`, `"number"` or `"ordinal"`; `undefined` for an axis held in a variable
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
126
|
+
export declare function axisKindOf(axis: unknown): PlanAxisKindLiteral | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Builds the `time` axis declaration — `Plan.axis({ … })` / `Plan.axis.time`.
|
|
129
|
+
*
|
|
130
|
+
* @param options - Window, resolution(s), now instant and tick format ({@link PlanAxisOptions})
|
|
131
|
+
* @returns An East expression of {@link PlanAxisType} (the `time` arm), branded `"time"` — the root's canvas kind
|
|
132
|
+
*
|
|
133
|
+
* @remarks
|
|
134
|
+
* The window is half-open `[min, max)` in UTC; omit it to follow the bound
|
|
135
|
+
* slice's datetime range — a canvas states one or the other (#822). There is
|
|
136
|
+
* no fit to the data. `resolutions` lists the WEEK/DAY-style segment options
|
|
137
|
+
* (omit ⇒ no segment). When the Plan is slice-bound, slice state supersedes
|
|
138
|
+
* window + resolution after mount — the slice is the single source of truth.
|
|
139
|
+
*/
|
|
140
|
+
export declare function createTimeAxis(options: PlanAxisOptions): PlanAxisExpr<"time">;
|
|
141
|
+
/**
|
|
142
|
+
* Builds the `number` axis declaration — `Plan.axis.number({ … })`.
|
|
143
|
+
*
|
|
144
|
+
* @param options - Window, step, now position and tick format ({@link PlanNumberAxisOptions})
|
|
145
|
+
* @returns An East expression of {@link PlanAxisType} (the `number` arm), branded `"number"` — the root's canvas kind
|
|
146
|
+
* @throws {Error} If a literal `step` is not `> 0`
|
|
147
|
+
*
|
|
148
|
+
* @remarks
|
|
149
|
+
* `[min, max)` ÷ `step` = `n` buckets, edges on whole multiples of `step`
|
|
150
|
+
* (the `TimeResolution` rule, numerically). Omit the window to follow the
|
|
151
|
+
* bound slice's `float` / `integer` range — a canvas states one or the other
|
|
152
|
+
* (#822). Element instants on this canvas are numbers — a `FloatType` /
|
|
153
|
+
* `IntegerType` accessor or a bare number wraps to the `number` arm.
|
|
154
|
+
*/
|
|
155
|
+
export declare function createNumberAxis(options: PlanNumberAxisOptions): PlanAxisExpr<"number">;
|
|
156
|
+
/**
|
|
157
|
+
* Builds the `ordinal` axis declaration — `Plan.axis.ordinal({ … })`.
|
|
158
|
+
*
|
|
159
|
+
* @param options - The ordered values and the now value ({@link PlanOrdinalAxisOptions})
|
|
160
|
+
* @returns An East expression of {@link PlanAxisType} (the `ordinal` arm), branded `"ordinal"` — the root's canvas kind
|
|
161
|
+
* @throws {Error} If a literal `values` list is empty
|
|
162
|
+
*
|
|
163
|
+
* @remarks
|
|
164
|
+
* The declared values ARE the buckets, one each, in order; the window is
|
|
165
|
+
* the whole list, so there is no slice range to brush and the window keys
|
|
166
|
+
* idle. Element instants on this canvas are the values — a `StringType`
|
|
167
|
+
* accessor or a bare string wraps to the `ordinal` arm.
|
|
168
|
+
*/
|
|
169
|
+
export declare function createOrdinalAxis(options: PlanOrdinalAxisOptions): PlanAxisExpr<"ordinal">;
|
|
170
|
+
/**
|
|
171
|
+
* The `Plan.axis` builder — the `time` shorthand, with the explicit
|
|
172
|
+
* per-kind builders as members (the Planner's `Planner.axis.time / .number /
|
|
173
|
+
* .ordinal` names).
|
|
174
|
+
*/
|
|
175
|
+
export interface PlanAxisBuilder {
|
|
176
|
+
/** The `time` axis (the shorthand — `Plan.axis({ resolution: "week", … })`). */
|
|
177
|
+
(options: PlanAxisOptions): PlanAxisExpr<"time">;
|
|
178
|
+
/** The `time` axis, explicitly. */
|
|
179
|
+
time: typeof createTimeAxis;
|
|
180
|
+
/** The `number` axis — a numeric window ÷ `step`. */
|
|
181
|
+
number: typeof createNumberAxis;
|
|
182
|
+
/** The `ordinal` axis — a declared list of values. */
|
|
183
|
+
ordinal: typeof createOrdinalAxis;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Builds the shared axis declaration — `Plan.axis({ … })` is the `time`
|
|
187
|
+
* shorthand; `Plan.axis.time` / `.number` / `.ordinal` declare each kind.
|
|
188
|
+
*
|
|
189
|
+
* @param options - The time-axis options ({@link PlanAxisOptions})
|
|
190
|
+
* @returns An East expression of {@link PlanAxisType}, branded with its kind
|
|
191
|
+
*/
|
|
192
|
+
export declare const createAxis: PlanAxisBuilder;
|
|
193
|
+
/**
|
|
194
|
+
* How a quantity prints — see {@link Plan.quantity}.
|
|
195
|
+
*
|
|
196
|
+
* @property unit - The unit it is in (`"k sheets"`); quantities in different units never sum together
|
|
197
|
+
* @property format - How the value prints (a `Format.*` spec); omit ⇒ the canvas's plain number
|
|
198
|
+
* @property text - The caption to print instead of the formatted value and unit
|
|
199
|
+
*/
|
|
200
|
+
export interface PlanQuantityOptions {
|
|
201
|
+
/** The unit the value is in (`"k sheets"`) — printed after it, and what a rollup sums by. */
|
|
202
|
+
unit?: SubtypeExprOrValue<StringType>;
|
|
203
|
+
/** How the value prints — a `Format.*` spec (the shared `TickFormatType`), in the viewer's locale. */
|
|
204
|
+
format?: SubtypeExprOrValue<TickFormatType>;
|
|
205
|
+
/** The caption to print instead of the formatted value and unit — the value still sums and weighs. */
|
|
206
|
+
text?: SubtypeExprOrValue<StringType>;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Builds a quantity — a number with its unit and how it prints (#824). A run
|
|
210
|
+
* carries one as its `quantity` (its bar prints it; a parent's rollup band sums
|
|
211
|
+
* its runs' per unit), and so does a link (its weight and its caption).
|
|
212
|
+
*
|
|
213
|
+
* @param value - The amount (a number or `FloatType` expression)
|
|
214
|
+
* @param options - Its unit, format and caption override ({@link PlanQuantityOptions})
|
|
215
|
+
* @returns An East expression of {@link PlanQuantityType}
|
|
216
|
+
*/
|
|
217
|
+
export declare function createQuantity(value: SubtypeExprOrValue<FloatType> | number, options?: PlanQuantityOptions): ExprType<PlanQuantityType>;
|
|
218
|
+
/**
|
|
219
|
+
* Flat input for {@link Plan.run} — one continuous state-run bar.
|
|
220
|
+
*
|
|
221
|
+
* @typeParam S - The `start` input's type — its axis kind brands the result ({@link PlanKindOf})
|
|
222
|
+
* @typeParam E - The `end` input's type
|
|
223
|
+
* @property key - Stable run identity (drag refs, link edges)
|
|
224
|
+
* @property start - Run start (inclusive) — an instant input (a Date / number / string, or a typed expression)
|
|
225
|
+
* @property end - Run end (exclusive)
|
|
226
|
+
* @property label - The bar text (`"RUN · J-4642"`)
|
|
227
|
+
* @property quantity - Optional quantity (`Plan.quantity(96, { unit: "k sheets" })`) — printed after the label, summed into rollup bands per unit
|
|
228
|
+
* @property state - The lifecycle state (string shorthand or `EventStateType`)
|
|
229
|
+
* @property status - Optional status tint (`"warning"` ⇒ the over-dwell ring)
|
|
230
|
+
* @property moved - Optional same-status churn counter (`moved ×k`)
|
|
231
|
+
* @property icon - Optional leading FA glyph (10px, inherits bar text colour)
|
|
232
|
+
*/
|
|
233
|
+
export interface PlanRunInput<S extends PlanInstantInput = PlanInstantInput, E extends PlanInstantInput = PlanInstantInput> {
|
|
234
|
+
/** Stable run identity (drag refs, link edges). */
|
|
235
|
+
key: SubtypeExprOrValue<StringType>;
|
|
236
|
+
/** Run start (inclusive) — wraps to the axis arm by its type (see {@link PlanInstantLikeType}). */
|
|
237
|
+
start: S;
|
|
238
|
+
/** Run end (exclusive). */
|
|
239
|
+
end: E;
|
|
240
|
+
/** The bar text (`"RUN · J-4642"`). */
|
|
241
|
+
label: SubtypeExprOrValue<StringType>;
|
|
242
|
+
/** Optional quantity — `Plan.quantity(96, { unit: "k sheets" })`: the bar prints its caption after the label
|
|
243
|
+
* (the muted `.q` text), and a parent's rollup band sums it with its siblings' in the same unit. */
|
|
244
|
+
quantity?: SubtypeExprOrValue<PlanQuantityType>;
|
|
245
|
+
/** The lifecycle state — a string shorthand or an `EventStateType` value. */
|
|
246
|
+
state: SubtypeExprOrValue<EventStateType> | EventStateLiteral;
|
|
247
|
+
/** Optional status tint — `"warning"` draws the `.stuck` over-dwell ring. */
|
|
248
|
+
status?: SubtypeExprOrValue<StatusValueType> | StatusValueLiteral;
|
|
249
|
+
/** Optional same-status churn counter (rendered `moved ×k`, never extra bars). */
|
|
250
|
+
moved?: SubtypeExprOrValue<IntegerType> | number;
|
|
251
|
+
/** Optional leading FA glyph (10px, inherits the bar text colour). */
|
|
252
|
+
icon?: PlanIconInput;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Builds one span run from a flat input. The result is BRANDED with the axis
|
|
256
|
+
* kind `start` / `end` imply ({@link PlanKindOf}) — a `DateTimeType` accessor
|
|
257
|
+
* makes a `"time"` run, a `FloatType` one a `"number"` run — so the series and
|
|
258
|
+
* root can refuse a mismatched kind at compile time; an erased input (an
|
|
259
|
+
* `Expr<PlanInstantType>`) leaves the run unbranded.
|
|
260
|
+
*
|
|
261
|
+
* @typeParam S - The `start` input's type
|
|
262
|
+
* @typeParam E - The `end` input's type
|
|
263
|
+
* @param input - The run configuration ({@link PlanRunInput})
|
|
264
|
+
* @returns An East expression of {@link PlanRunType}, branded with its kind
|
|
265
|
+
*/
|
|
266
|
+
export declare function createRun<S extends PlanInstantInput, E extends PlanInstantInput>(input: PlanRunInput<S, E>): PlanRunExpr<PlanKindOf<S | E>>;
|
|
267
|
+
/**
|
|
268
|
+
* Flat input for {@link Plan.decision} — a ◇/◆ diamond on a run transition.
|
|
269
|
+
*
|
|
270
|
+
* @typeParam A - The `at` input's type — its axis kind brands the result
|
|
271
|
+
* @property key - Stable decision identity
|
|
272
|
+
* @property at - The transition instant the diamond sits on
|
|
273
|
+
* @property applied - `true` fills the diamond (◆)
|
|
274
|
+
*/
|
|
275
|
+
export interface PlanDecisionInput<A extends PlanInstantInput = PlanInstantInput> {
|
|
276
|
+
/** Stable decision identity. */
|
|
277
|
+
key: SubtypeExprOrValue<StringType>;
|
|
278
|
+
/** The transition instant the diamond sits on (see {@link PlanInstantLikeType}). */
|
|
279
|
+
at: A;
|
|
280
|
+
/** `true` fills the diamond (◆ applied). */
|
|
281
|
+
applied: SubtypeExprOrValue<BooleanType> | boolean;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Builds one decision mark from a flat input, branded with `at`'s kind.
|
|
285
|
+
*
|
|
286
|
+
* @typeParam A - The `at` input's type
|
|
287
|
+
* @param input - The decision configuration ({@link PlanDecisionInput})
|
|
288
|
+
* @returns An East expression of {@link PlanDecisionMarkType}, branded with its kind
|
|
289
|
+
*/
|
|
290
|
+
export declare function createDecision<A extends PlanInstantInput>(input: PlanDecisionInput<A>): PlanDecisionMarkExpr<PlanKindOf<A>>;
|
|
291
|
+
/**
|
|
292
|
+
* Flat input for {@link Plan.port} — a quantity in/out glyph on a span row.
|
|
293
|
+
*
|
|
294
|
+
* @typeParam A - The `at` input's type — its axis kind brands the result
|
|
295
|
+
* @property at - The instant the quantity moves
|
|
296
|
+
* @property label - Optional caption (`"−24 k sheets"`)
|
|
297
|
+
*/
|
|
298
|
+
export interface PlanPortInput<A extends PlanInstantInput = PlanInstantInput> {
|
|
299
|
+
/** The instant the quantity moves (see {@link PlanInstantLikeType}). */
|
|
300
|
+
at: A;
|
|
301
|
+
/** Optional caption (`"−24 k sheets"`). */
|
|
302
|
+
label?: SubtypeExprOrValue<StringType>;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Builds one port glyph from a flat input, branded with `at`'s kind.
|
|
306
|
+
*
|
|
307
|
+
* @typeParam A - The `at` input's type
|
|
308
|
+
* @param input - The port configuration ({@link PlanPortInput})
|
|
309
|
+
* @returns An East expression of {@link PlanPortType}, branded with its kind
|
|
310
|
+
*/
|
|
311
|
+
export declare function createPort<A extends PlanInstantInput>(input: PlanPortInput<A>): PlanPortExpr<PlanKindOf<A>>;
|
|
312
|
+
/**
|
|
313
|
+
* Flat input for {@link Plan.event} — one bucket-row tile (the full Planner
|
|
314
|
+
* point-event grammar).
|
|
315
|
+
*
|
|
316
|
+
* @typeParam A - The `at` input's type — its axis kind brands the result
|
|
317
|
+
* @property key - Stable event identity (drag refs)
|
|
318
|
+
* @property at - The bucket instant
|
|
319
|
+
* @property lane - The lane key (`[]`-laned rows omit it; in a laned row, omitting takes the full cell)
|
|
320
|
+
* @property label - Optional tile text; omitted ⇒ the resting ✓ / `plan` chip
|
|
321
|
+
* @property icon - Optional leading FA glyph (icon-only tile when `label` omitted)
|
|
322
|
+
* @property state - The lifecycle state (string shorthand or value)
|
|
323
|
+
* @property tone - Optional semantic tile tint
|
|
324
|
+
* @property color - Optional raw colour token override
|
|
325
|
+
* @property colorPalette - Optional brand palette override
|
|
326
|
+
* @property stretch - Optional fill axis (`"horizontal"` / `"vertical"` / `"both"`)
|
|
327
|
+
* @property content - Optional two-axis content alignment
|
|
328
|
+
* @property animation - Optional attention animation (`"pulse"`)
|
|
329
|
+
*/
|
|
330
|
+
export interface PlanBucketEventInput<A extends PlanInstantInput = PlanInstantInput> {
|
|
331
|
+
/** Stable event identity (drag-grammar cell refs). */
|
|
332
|
+
key: SubtypeExprOrValue<StringType>;
|
|
333
|
+
/** The bucket instant (see {@link PlanInstantLikeType}). */
|
|
334
|
+
at: A;
|
|
335
|
+
/** The lane key. In a laned row, omitting takes the full cell (the mixed grammar). */
|
|
336
|
+
lane?: SubtypeExprOrValue<StringType>;
|
|
337
|
+
/** Optional tile text; omitted ⇒ ✓ (confirmed/actual) or the dashed `plan` chip (proposed). */
|
|
338
|
+
label?: SubtypeExprOrValue<StringType>;
|
|
339
|
+
/** Optional leading FA glyph (chip-sized, inherits chip colour; icon-only tile when `label` omitted). */
|
|
340
|
+
icon?: PlanIconInput;
|
|
341
|
+
/** The lifecycle state — a string shorthand or an `EventStateType` value. */
|
|
342
|
+
state: SubtypeExprOrValue<EventStateType> | EventStateLiteral;
|
|
343
|
+
/** Optional semantic tile tint (keeps the state's border-style). */
|
|
344
|
+
tone?: SubtypeExprOrValue<StatusValueType> | StatusValueLiteral;
|
|
345
|
+
/** Optional raw colour token override (`"teal.solid"`). */
|
|
346
|
+
color?: SubtypeExprOrValue<StringType>;
|
|
347
|
+
/** Optional brand palette override (`"teal"`, `"purple"`). */
|
|
348
|
+
colorPalette?: SubtypeExprOrValue<ColorSchemeType> | ColorSchemeLiteral;
|
|
349
|
+
/** Optional fill axis. */
|
|
350
|
+
stretch?: SubtypeExprOrValue<PlanStretchType> | PlanStretchLiteral;
|
|
351
|
+
/** Optional two-axis content alignment (defaults to top-left). */
|
|
352
|
+
content?: {
|
|
353
|
+
/** Horizontal content alignment (→ `justifyContent`). */
|
|
354
|
+
horizontal?: SubtypeExprOrValue<PlanContentAlignType> | PlanContentAlignLiteral;
|
|
355
|
+
/** Vertical content alignment (→ `alignItems`). */
|
|
356
|
+
vertical?: SubtypeExprOrValue<PlanContentAlignType> | PlanContentAlignLiteral;
|
|
357
|
+
};
|
|
358
|
+
/** Optional attention animation (`"pulse"` honours `prefers-reduced-motion`). */
|
|
359
|
+
animation?: SubtypeExprOrValue<PlanAnimationType> | PlanAnimationLiteral;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Builds one bucket event from a flat input, branded with `at`'s kind.
|
|
363
|
+
*
|
|
364
|
+
* @typeParam A - The `at` input's type
|
|
365
|
+
* @param input - The event configuration ({@link PlanBucketEventInput})
|
|
366
|
+
* @returns An East expression of {@link PlanBucketEventType}, branded with its kind
|
|
367
|
+
*/
|
|
368
|
+
export declare function createBucketEvent<A extends PlanInstantInput>(input: PlanBucketEventInput<A>): PlanBucketEventExpr<PlanKindOf<A>>;
|
|
369
|
+
/**
|
|
370
|
+
* Flat input for {@link Plan.lane} — one bucket-row sub-slot lane.
|
|
371
|
+
*
|
|
372
|
+
* @property key - The lane key (`"am"`) — bucket events reference it via `lane`
|
|
373
|
+
* @property label - Optional printed caption (`"AM"`); omitted ⇒ an unlabelled strip
|
|
374
|
+
*/
|
|
375
|
+
export interface PlanLaneInput {
|
|
376
|
+
/** The lane key (`"am"`) — bucket events reference it via `lane`. */
|
|
377
|
+
key: SubtypeExprOrValue<StringType>;
|
|
378
|
+
/** Optional printed caption (`"AM"`); omitted ⇒ an unlabelled strip. */
|
|
379
|
+
label?: SubtypeExprOrValue<StringType>;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Builds one bucket-row lane from a flat input.
|
|
383
|
+
*
|
|
384
|
+
* @param input - The lane configuration ({@link PlanLaneInput})
|
|
385
|
+
* @returns An East expression of {@link PlanLaneType}
|
|
386
|
+
*/
|
|
387
|
+
export declare function createLane(input: PlanLaneInput): ExprType<PlanLaneType>;
|
|
388
|
+
/**
|
|
389
|
+
* A row's id by its series and path — `Plan.ref("press-jobs", "H1", "p03")`
|
|
390
|
+
* is the row series `press-jobs` made from entry `p03` under `H1` (#822).
|
|
391
|
+
* What `links` name their ends with, and what a callback's row compares to.
|
|
392
|
+
*
|
|
393
|
+
* @remarks
|
|
394
|
+
* A segment is an entry's key as the canvas prints it: a String key as is, any
|
|
395
|
+
* other key type as its `.east` text (`printFor`), an `Array` child's index as
|
|
396
|
+
* its digits.
|
|
397
|
+
*
|
|
398
|
+
* @param series - The series key
|
|
399
|
+
* @param path - The entry keys that lead to the row, outermost first
|
|
400
|
+
* @returns The `entry` id
|
|
401
|
+
*/
|
|
402
|
+
export declare function createRef(series: SubtypeExprOrValue<StringType>, ...path: SubtypeExprOrValue<StringType>[]): ExprType<PlanRowIdType>;
|
|
403
|
+
/**
|
|
404
|
+
* A section header's id — `Plan.sectionRef("crew-block", "H1")` is the
|
|
405
|
+
* `crew-block` section's header under entry `H1`; a top-level section's path
|
|
406
|
+
* is empty (#822).
|
|
407
|
+
*
|
|
408
|
+
* @param series - The section's series key
|
|
409
|
+
* @param path - The path of the entry the section sits under (empty at the top level)
|
|
410
|
+
* @returns The `section` id
|
|
411
|
+
*/
|
|
412
|
+
export declare function createSectionRef(series: SubtypeExprOrValue<StringType>, ...path: SubtypeExprOrValue<StringType>[]): ExprType<PlanRowIdType>;
|
|
413
|
+
/**
|
|
414
|
+
* What a bound `ui` state starts as — see {@link Plan.uiState}.
|
|
415
|
+
*
|
|
416
|
+
* @property selected - The selected row
|
|
417
|
+
* @property collapsed - Rows folded against what they declare
|
|
418
|
+
* @property expanded - Rows opened against what they declare
|
|
419
|
+
* @property charts - Chart rows expanded from spark
|
|
420
|
+
* @property focus - A row to bring into view (a request the canvas spends)
|
|
421
|
+
*/
|
|
422
|
+
export interface PlanUiStateInput {
|
|
423
|
+
/** The selected row. */
|
|
424
|
+
selected?: SubtypeExprOrValue<PlanRowIdType>;
|
|
425
|
+
/** Rows folded — overriding what they declare. */
|
|
426
|
+
collapsed?: SubtypeExprOrValue<PlanRowIdType>[] | SubtypeExprOrValue<ArrayType<PlanRowIdType>>;
|
|
427
|
+
/** Rows opened — overriding what they declare. */
|
|
428
|
+
expanded?: SubtypeExprOrValue<PlanRowIdType>[] | SubtypeExprOrValue<ArrayType<PlanRowIdType>>;
|
|
429
|
+
/** Chart rows expanded from spark to full height. */
|
|
430
|
+
charts?: SubtypeExprOrValue<PlanRowIdType>[] | SubtypeExprOrValue<ArrayType<PlanRowIdType>>;
|
|
431
|
+
/** A row to bring into view — the canvas spends the request (`none`) once it has. */
|
|
432
|
+
focus?: SubtypeExprOrValue<PlanRowIdType>;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Builds a {@link PlanUiStateType} value — the seed of a bound `ui` state
|
|
436
|
+
* (`State.bind([Plan.Types.UiState], key, Plan.uiState())`, #824). Omitted
|
|
437
|
+
* fields are empty: nothing selected, every row as it declares, no chart
|
|
438
|
+
* expanded, nothing to bring into view.
|
|
439
|
+
*
|
|
440
|
+
* @param init - What the state starts as ({@link PlanUiStateInput})
|
|
441
|
+
* @returns An East expression of {@link PlanUiStateType}
|
|
442
|
+
*/
|
|
443
|
+
export declare function createUiState(init?: PlanUiStateInput): ExprType<PlanUiStateType>;
|
|
444
|
+
/**
|
|
445
|
+
* Flat input for {@link Plan.link} — one run-edge quantity link of the
|
|
446
|
+
* canvas's link graph (a Plan's `links`). Each end is a row and a run on it
|
|
447
|
+
* (`from` and `fromRun`), or an event of one of the Plan's event kinds
|
|
448
|
+
* (`from: Plan.eventRef("job", key)`, no run), wherever it draws (#1191).
|
|
449
|
+
*
|
|
450
|
+
* @property key - The link's identity — what a click on its ribbon names it by (#824)
|
|
451
|
+
* @property from - The source row's id (`Plan.ref(series, …path)`), or an event (`Plan.eventRef(kind, key)`)
|
|
452
|
+
* @property fromRun - The source run key (the ribbon leaves this run's end edge); none with an event
|
|
453
|
+
* @property to - The destination row's id, or an event
|
|
454
|
+
* @property toRun - The destination run key (the ribbon lands on this run's start edge); none with an event
|
|
455
|
+
* @property quantity - The moved quantity (`Plan.quantity(34, { unit: "k sheets" })`) — the link's weight and caption
|
|
456
|
+
*/
|
|
457
|
+
export interface PlanLinkInput {
|
|
458
|
+
/** The link's identity — what the `link` element ref a ribbon click reports names it by (#824). */
|
|
459
|
+
key: SubtypeExprOrValue<StringType>;
|
|
460
|
+
/** The source row's id (`Plan.ref(series, …path)`), or an event (`Plan.eventRef(kind, key)`). */
|
|
461
|
+
from: SubtypeExprOrValue<PlanRowIdType> | ExprType<PlanRunRefType>;
|
|
462
|
+
/** The source run key (the ribbon leaves this run's end edge) — with a row's id; an event names its own. */
|
|
463
|
+
fromRun?: SubtypeExprOrValue<StringType>;
|
|
464
|
+
/** The destination row's id, or an event. */
|
|
465
|
+
to: SubtypeExprOrValue<PlanRowIdType> | ExprType<PlanRunRefType>;
|
|
466
|
+
/** The destination run key (the ribbon lands on this run's start edge) — with a row's id; an event names its own. */
|
|
467
|
+
toRun?: SubtypeExprOrValue<StringType>;
|
|
468
|
+
/** The moved quantity — `Plan.quantity(34, { unit: "k sheets" })`: its value's third of the family's largest
|
|
469
|
+
* sets the link's weight (2, 4 or 8), and its caption prints on the link, on a paper knockout. Omit ⇒ the
|
|
470
|
+
* thinnest link (1.5), no caption. */
|
|
471
|
+
quantity?: SubtypeExprOrValue<PlanQuantityType>;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* The event kinds a link names at its ends, when they are known at build —
|
|
475
|
+
* what a Plan checks against its `events` (#1191).
|
|
476
|
+
*
|
|
477
|
+
* @param link - A link value
|
|
478
|
+
* @returns The kinds its event ends name, in order — none for a link between rows; `undefined` for a link
|
|
479
|
+
* `Plan.link` did not build here (held in a variable, or built in East) or whose event end was held in a
|
|
480
|
+
* variable, which a Plan checks as it is evaluated instead
|
|
481
|
+
* @internal
|
|
482
|
+
*/
|
|
483
|
+
export declare function linkEventKinds(link: unknown): readonly string[] | undefined;
|
|
484
|
+
/**
|
|
485
|
+
* Builds one link edge from a flat input. Links are root DATA
|
|
486
|
+
* (`links={transfers.map(($, t) => Plan.link({ … }))}`): the links-focus
|
|
487
|
+
* control gathers a row's transitive upstream/downstream family over them.
|
|
488
|
+
*
|
|
489
|
+
* @param input - The link configuration ({@link PlanLinkInput})
|
|
490
|
+
* @returns An East expression of {@link PlanLinkType}
|
|
491
|
+
* @throws {Error} When an end is a row's id without its run, or an event with one
|
|
492
|
+
*/
|
|
493
|
+
export declare function createLink(input: PlanLinkInput): ExprType<PlanLinkType>;
|
|
494
|
+
/**
|
|
495
|
+
* Flat input for {@link Plan.marker} — a bucket-cell status ring.
|
|
496
|
+
*
|
|
497
|
+
* @typeParam A - The `at` input's type — its axis kind brands the result
|
|
498
|
+
* @property at - The bucket instant the marker rings
|
|
499
|
+
* @property lane - The lane key within the cell
|
|
500
|
+
* @property status - The semantic status (default `"danger"`)
|
|
501
|
+
* @property message - The hover-tooltip text
|
|
502
|
+
*/
|
|
503
|
+
export interface PlanCellMarkerInput<A extends PlanInstantInput = PlanInstantInput> {
|
|
504
|
+
/** The bucket instant the marker rings (see {@link PlanInstantLikeType}). */
|
|
505
|
+
at: A;
|
|
506
|
+
/** The lane key within the cell. */
|
|
507
|
+
lane?: SubtypeExprOrValue<StringType>;
|
|
508
|
+
/** The semantic status (default `"danger"`). */
|
|
509
|
+
status?: SubtypeExprOrValue<StatusValueType> | StatusValueLiteral;
|
|
510
|
+
/** The hover-tooltip text. */
|
|
511
|
+
message: SubtypeExprOrValue<StringType>;
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Builds one cell marker from a flat input, branded with `at`'s kind.
|
|
515
|
+
*
|
|
516
|
+
* @typeParam A - The `at` input's type
|
|
517
|
+
* @param input - The marker configuration ({@link PlanCellMarkerInput})
|
|
518
|
+
* @returns An East expression of {@link PlanCellMarkerType}, branded with its kind
|
|
519
|
+
*/
|
|
520
|
+
export declare function createCellMarker<A extends PlanInstantInput>(input: PlanCellMarkerInput<A>): PlanCellMarkerExpr<PlanKindOf<A>>;
|
|
521
|
+
/**
|
|
522
|
+
* Flat input for {@link Plan.chip} — one cards-row shift chip.
|
|
523
|
+
*
|
|
524
|
+
* @typeParam F - The `from` input's type — its axis kind brands the result
|
|
525
|
+
* @typeParam T - The `to` input's type
|
|
526
|
+
* @property key - Stable chip identity
|
|
527
|
+
* @property from - Chip start (inclusive)
|
|
528
|
+
* @property to - Chip end (exclusive)
|
|
529
|
+
* @property label - The chip text (`"80h"`, `"+64h"`)
|
|
530
|
+
* @property state - The lifecycle state (string shorthand or value)
|
|
531
|
+
* @property icon - Optional leading FA glyph
|
|
532
|
+
*/
|
|
533
|
+
export interface PlanChipInput<F extends PlanInstantInput = PlanInstantInput, T extends PlanInstantInput = PlanInstantInput> {
|
|
534
|
+
/** Stable chip identity (drag refs). */
|
|
535
|
+
key: SubtypeExprOrValue<StringType>;
|
|
536
|
+
/** Chip start (inclusive) — see {@link PlanInstantLikeType}. */
|
|
537
|
+
from: F;
|
|
538
|
+
/** Chip end (exclusive). */
|
|
539
|
+
to: T;
|
|
540
|
+
/** The chip text (`"80h"`, `"+64h"`). */
|
|
541
|
+
label: SubtypeExprOrValue<StringType>;
|
|
542
|
+
/** The lifecycle state — confirmed tint · proposed dashed · removed strikethrough · estimated ghost. */
|
|
543
|
+
state: SubtypeExprOrValue<EventStateType> | EventStateLiteral;
|
|
544
|
+
/** Optional leading FA glyph (shift-type etc.). */
|
|
545
|
+
icon?: PlanIconInput;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Builds one cards chip from a flat input, branded with the kind `from` /
|
|
549
|
+
* `to` imply.
|
|
550
|
+
*
|
|
551
|
+
* @typeParam F - The `from` input's type
|
|
552
|
+
* @typeParam T - The `to` input's type
|
|
553
|
+
* @param input - The chip configuration ({@link PlanChipInput})
|
|
554
|
+
* @returns An East expression of {@link PlanChipType}, branded with its kind
|
|
555
|
+
*/
|
|
556
|
+
export declare function createChip<F extends PlanInstantInput, T extends PlanInstantInput>(input: PlanChipInput<F, T>): PlanChipExpr<PlanKindOf<F | T>>;
|
|
557
|
+
/**
|
|
558
|
+
* Flat input for {@link Plan.mark} — one event-row instant mark.
|
|
559
|
+
*
|
|
560
|
+
* @typeParam A - The `at` input's type — its axis kind brands the result
|
|
561
|
+
* @property key - Stable mark identity
|
|
562
|
+
* @property at - The instant
|
|
563
|
+
* @property kind - `"milestone"` / `"exception"` / `Plan.markKind.decision(applied)`
|
|
564
|
+
* @property icon - Optional FA glyph swap (12px, kind-coloured)
|
|
565
|
+
* @property label - Optional caption (printed when there is room)
|
|
566
|
+
*/
|
|
567
|
+
export interface PlanEventMarkInput<A extends PlanInstantInput = PlanInstantInput> {
|
|
568
|
+
/** Stable mark identity. */
|
|
569
|
+
key: SubtypeExprOrValue<StringType>;
|
|
570
|
+
/** The instant (see {@link PlanInstantLikeType}). */
|
|
571
|
+
at: A;
|
|
572
|
+
/** The mark kind — `"milestone"` / `"exception"` string shorthand or a `PlanEventMarkKindType` value (see `Plan.markKind`). */
|
|
573
|
+
kind: SubtypeExprOrValue<PlanEventMarkKindType> | "milestone" | "exception";
|
|
574
|
+
/** Optional FA glyph swap (12px, still kind-coloured). */
|
|
575
|
+
icon?: PlanIconInput;
|
|
576
|
+
/** Optional caption (printed when there is room). */
|
|
577
|
+
label?: SubtypeExprOrValue<StringType>;
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Builds one event mark from a flat input, branded with `at`'s kind.
|
|
581
|
+
*
|
|
582
|
+
* @typeParam A - The `at` input's type
|
|
583
|
+
* @param input - The mark configuration ({@link PlanEventMarkInput})
|
|
584
|
+
* @returns An East expression of {@link PlanEventMarkType}, branded with its kind
|
|
585
|
+
*/
|
|
586
|
+
export declare function createEventMark<A extends PlanInstantInput>(input: PlanEventMarkInput<A>): PlanEventMarkExpr<PlanKindOf<A>>;
|
|
587
|
+
/** The `Plan.markKind` builders — non-null mark kinds. */
|
|
588
|
+
export declare const markKind: {
|
|
589
|
+
/**
|
|
590
|
+
* A decision diamond mark — ◇ pending / ◆ applied.
|
|
591
|
+
*
|
|
592
|
+
* @param applied - `true` fills the diamond
|
|
593
|
+
* @returns A `PlanEventMarkKindType` expression with the `decision` arm
|
|
594
|
+
*/
|
|
595
|
+
readonly decision: (applied: SubtypeExprOrValue<BooleanType> | boolean) => ExprType<PlanEventMarkKindType>;
|
|
596
|
+
};
|
|
597
|
+
/**
|
|
598
|
+
* A heat scale — the value at no depth, the value at full depth, and the warn
|
|
599
|
+
* threshold ({@link PlanHeatScaleType}).
|
|
600
|
+
*
|
|
601
|
+
* @property min - The value painted at no depth (default: the least shown)
|
|
602
|
+
* @property max - The value painted at full depth (default: the greatest shown)
|
|
603
|
+
* @property warnAt - Warn-ring threshold (≥ it rings the cell)
|
|
604
|
+
*/
|
|
605
|
+
export interface PlanHeatScaleInput {
|
|
606
|
+
/** The value painted at no depth (default: the least value shown). */
|
|
607
|
+
min?: SubtypeExprOrValue<FloatType> | number;
|
|
608
|
+
/** The value painted at full depth (default: the greatest value shown). */
|
|
609
|
+
max?: SubtypeExprOrValue<FloatType> | number;
|
|
610
|
+
/** Warn-ring threshold (≥ it rings the cell). */
|
|
611
|
+
warnAt?: SubtypeExprOrValue<FloatType> | number;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Build a heat scale value from its input.
|
|
615
|
+
*
|
|
616
|
+
* @param input - The scale ({@link PlanHeatScaleInput}); omit ⇒ every bound from the values shown
|
|
617
|
+
* @returns An East expression of {@link PlanHeatScaleType}
|
|
618
|
+
*/
|
|
619
|
+
export declare function createHeatScale(input?: PlanHeatScaleInput): ExprType<PlanHeatScaleType>;
|
|
620
|
+
/**
|
|
621
|
+
* How a cells arm folds and prints (#824) — the options every cell builder
|
|
622
|
+
* takes.
|
|
623
|
+
*
|
|
624
|
+
* @property fold - How a bucket folds the cells that fall in it at a coarser resolution than theirs
|
|
625
|
+
* @property format - How the arm's values print (a `Format.*` spec)
|
|
626
|
+
*/
|
|
627
|
+
export interface PlanCellsFoldOptions {
|
|
628
|
+
/** How a bucket folds the cells that fall in it at a coarser resolution than theirs
|
|
629
|
+
* (`"sum"` / `"mean"` / `"min"` / `"max"` / `"last"` / `"count"`; each builder says its default). */
|
|
630
|
+
fold?: PlanFoldInput;
|
|
631
|
+
/** How the arm's values print — a `Format.*` spec (the shared `TickFormatType`), in the viewer's locale. */
|
|
632
|
+
format?: SubtypeExprOrValue<TickFormatType>;
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* Options for {@link Plan.heatCells} — the heat scale, the warn threshold, and
|
|
636
|
+
* how the cells fold and print.
|
|
637
|
+
*
|
|
638
|
+
* @property min - Scale minimum (default: the least shown)
|
|
639
|
+
* @property max - Scale maximum (default: the greatest shown)
|
|
640
|
+
* @property warnAt - Warn-ring threshold (≥ it rings the cell)
|
|
641
|
+
* @property fold - How a bucket folds its cells (default `"mean"`)
|
|
642
|
+
* @property format - How a value prints — a cell without a `label` prints its value only when one is declared
|
|
643
|
+
*/
|
|
644
|
+
export interface PlanHeatCellsOptions extends PlanHeatScaleInput, PlanCellsFoldOptions {
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Wraps per-bucket heat cells into the `heat` arm of {@link PlanHeatCellsType}.
|
|
648
|
+
* Literal records whose `at` is a `Plan.at.*` value brand the result with
|
|
649
|
+
* that kind ({@link PlanCellsInput}); an East array is kind-erased.
|
|
650
|
+
*
|
|
651
|
+
* @remarks
|
|
652
|
+
* At a coarser resolution than the cells', a bucket shows ONE cell — the
|
|
653
|
+
* `fold` of the cells in it (`"mean"` by default: a heat cell is a level).
|
|
654
|
+
* A cell prints its `label`; one without prints its value only through a
|
|
655
|
+
* declared `format` (#824).
|
|
656
|
+
*
|
|
657
|
+
* @typeParam K - The kind inferred from the literal records' `at`
|
|
658
|
+
* @param cells - The cells (`{ at, value, label }` structs; `value: none` ⇒ the no-data hatch)
|
|
659
|
+
* @param options - Scale, warn threshold, fold and format ({@link PlanHeatCellsOptions})
|
|
660
|
+
* @returns A `PlanHeatCellsType` expression, branded with the cells' kind
|
|
661
|
+
*/
|
|
662
|
+
export declare function createHeatCells<K extends PlanAxisKindLiteral = never>(cells: PlanCellsInput<PlanHeatCellType, K>, options?: PlanHeatCellsOptions): PlanHeatCellsExpr<K>;
|
|
663
|
+
/**
|
|
664
|
+
* Wraps per-bucket weight cells into the `weight` arm of
|
|
665
|
+
* {@link PlanHeatCellsType} (booked-vs-free bars; planned ⇒ pale). Literal
|
|
666
|
+
* records with `Plan.at.*` instants brand the result with their kind.
|
|
667
|
+
*
|
|
668
|
+
* @remarks
|
|
669
|
+
* At a coarser resolution, a bucket shows ONE bar — the `fold` of its cells'
|
|
670
|
+
* fractions (`"mean"` by default: a cell is the fraction of its bucket booked,
|
|
671
|
+
* and a month's fraction is its weeks' mean), pale only when every cell in it
|
|
672
|
+
* is planned. `format` prints the fraction in the words a reader hears
|
|
673
|
+
* (default: a percent).
|
|
674
|
+
*
|
|
675
|
+
* @typeParam K - The kind inferred from the literal records' `at`
|
|
676
|
+
* @param cells - The cells (`{ at, fraction, planned }` structs)
|
|
677
|
+
* @param options - Fold and format ({@link PlanCellsFoldOptions})
|
|
678
|
+
* @returns A `PlanHeatCellsType` expression, branded with the cells' kind
|
|
679
|
+
*/
|
|
680
|
+
export declare function createWeightCells<K extends PlanAxisKindLiteral = never>(cells: PlanCellsInput<PlanWeightCellType, K>, options?: PlanCellsFoldOptions): PlanHeatCellsExpr<K>;
|
|
681
|
+
/**
|
|
682
|
+
* Wraps per-bucket segment cells into the `segments` arm of
|
|
683
|
+
* {@link PlanHeatCellsType} (committed / pending / slack compositions).
|
|
684
|
+
* Literal records with `Plan.at.*` instants brand the result with their kind.
|
|
685
|
+
*
|
|
686
|
+
* @remarks
|
|
687
|
+
* At a coarser resolution, a bucket shows ONE composition — each fill's
|
|
688
|
+
* weights folded across the cells in it (`"sum"` by default: the weights are
|
|
689
|
+
* amounts, and the bar normalises them). `format` prints a segment's share in
|
|
690
|
+
* the words a reader hears (default: a percent).
|
|
691
|
+
*
|
|
692
|
+
* @typeParam K - The kind inferred from the literal records' `at`
|
|
693
|
+
* @param cells - The cells (`{ at, segments }` structs — build segments with `Plan.segment`)
|
|
694
|
+
* @param options - Fold and format ({@link PlanCellsFoldOptions})
|
|
695
|
+
* @returns A `PlanHeatCellsType` expression, branded with the cells' kind
|
|
696
|
+
*/
|
|
697
|
+
export declare function createSegmentCells<K extends PlanAxisKindLiteral = never>(cells: PlanCellsInput<PlanSegmentCellType, K>, options?: PlanCellsFoldOptions): PlanHeatCellsExpr<K>;
|
|
698
|
+
/**
|
|
699
|
+
* Flat input for {@link Plan.segment} — one weighted slice of a segment cell.
|
|
700
|
+
*
|
|
701
|
+
* @property fill - The status-leveraged fill (string shorthand or `MatrixFillType`)
|
|
702
|
+
* @property weight - The proportional weight
|
|
703
|
+
* @property label - Optional in-bar text (printed when wide enough)
|
|
704
|
+
*/
|
|
705
|
+
export interface PlanSegmentInput {
|
|
706
|
+
/** The status-leveraged fill. */
|
|
707
|
+
fill: SubtypeExprOrValue<MatrixFillType> | MatrixFillLiteral;
|
|
708
|
+
/** The proportional weight (normalised with siblings). */
|
|
709
|
+
weight: SubtypeExprOrValue<FloatType> | number;
|
|
710
|
+
/** Optional in-bar text (printed when the segment is wide enough). */
|
|
711
|
+
label?: SubtypeExprOrValue<StringType>;
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* Builds one segment from a flat input (the Matrix segment vocabulary).
|
|
715
|
+
*
|
|
716
|
+
* @param input - The segment configuration ({@link PlanSegmentInput})
|
|
717
|
+
* @returns An East expression of {@link PlanSegmentType}
|
|
718
|
+
*/
|
|
719
|
+
export declare function createSegment(input: PlanSegmentInput): ExprType<typeof PlanSegmentType>;
|
|
720
|
+
/**
|
|
721
|
+
* Flat input for {@link Plan.tableSeries} — one value series of a
|
|
722
|
+
* multi-series table row. Style is declared ONCE here, per position (never
|
|
723
|
+
* per cell — the wire-lean contract); the cells stay raw values.
|
|
724
|
+
*
|
|
725
|
+
* @typeParam K - The cells' axis kind (a `Plan.tableCells` result carries it)
|
|
726
|
+
* @property cells - The series' cells (a `Plan.tableCells` result / `PlanTableCellType` values)
|
|
727
|
+
* @property format - Numeral format override for this series (else the row's `format`)
|
|
728
|
+
* @property tone - Default tone for the series' values (`"muted"` de-emphasises a plan column)
|
|
729
|
+
* @property strong - Semibold emphasis for this series' values
|
|
730
|
+
* @property rollup - `true` ⇒ this series feeds declared parent aggregation (flag none ⇒ every series does)
|
|
731
|
+
* @property fold - How a bucket folds this series' cells at a coarser resolution (default `"sum"`)
|
|
732
|
+
*/
|
|
733
|
+
export interface PlanTableSeriesInput<K extends PlanAxisKindLiteral = never> {
|
|
734
|
+
/** The series' cells (a `Plan.tableCells` result / `PlanTableCellType` values). */
|
|
735
|
+
cells: PlanTableCellsInput<K>;
|
|
736
|
+
/** Numeral format override for THIS series — a `Format.*` spec (else the row's `format`). */
|
|
737
|
+
format?: SubtypeExprOrValue<TickFormatType>;
|
|
738
|
+
/** Default tone for the series' values; per-cell tones and the derived neg/em-dash win. */
|
|
739
|
+
tone?: SubtypeExprOrValue<PlanTableToneType> | PlanTableToneLiteral;
|
|
740
|
+
/** Semibold emphasis for this series' values (default `false`). */
|
|
741
|
+
strong?: SubtypeExprOrValue<BooleanType> | boolean;
|
|
742
|
+
/** `true` ⇒ this series feeds declared parent aggregation (default `false` — flag none and every series does). */
|
|
743
|
+
rollup?: SubtypeExprOrValue<BooleanType> | boolean;
|
|
744
|
+
/** How a bucket folds this series' cells at a coarser resolution than theirs (default `"sum"`, #824). */
|
|
745
|
+
fold?: PlanFoldInput;
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Builds one table-row value series (see {@link Plan.table}'s `series`) —
|
|
749
|
+
* per-position style declared once, raw cells beneath it; the result carries
|
|
750
|
+
* the cells' axis kind.
|
|
751
|
+
*
|
|
752
|
+
* @typeParam K - The cells' axis kind
|
|
753
|
+
* @param input - The series configuration ({@link PlanTableSeriesInput})
|
|
754
|
+
* @returns An East expression of {@link PlanTableSeriesType}, branded with the cells' kind
|
|
755
|
+
*/
|
|
756
|
+
export declare function createTableSeries<K extends PlanAxisKindLiteral = never>(input: PlanTableSeriesInput<K>): PlanTableSeriesExpr<K>;
|
|
757
|
+
/**
|
|
758
|
+
* The raw table-cell record — `{ at, value }`, its `at` any
|
|
759
|
+
* {@link PlanInstantLikeType} (wrapped to the axis arm by its static type).
|
|
760
|
+
*/
|
|
761
|
+
export type PlanRawTableCellType = StructType<{
|
|
762
|
+
at: PlanInstantLikeType;
|
|
763
|
+
value: OptionType<FloatType>;
|
|
764
|
+
}>;
|
|
765
|
+
/**
|
|
766
|
+
* Builds per-bucket table cells from raw values. The RENDERER prints each
|
|
767
|
+
* value through the row's `format` (a `Format.*` spec — the shared
|
|
768
|
+
* `TickFormatType`), tones negatives `neg` and renders `none` as the muted
|
|
769
|
+
* em-dash; build `PlanTableCellType` values directly for explicit `text` /
|
|
770
|
+
* `tone` overrides.
|
|
771
|
+
*
|
|
772
|
+
* @remarks
|
|
773
|
+
* The `at` of each raw cell wraps to the axis arm by its type — a
|
|
774
|
+
* `DateTimeType` field to `time`, a numeric field to `number`, a string
|
|
775
|
+
* field to `ordinal`, a {@link PlanInstantType} field as is — so a
|
|
776
|
+
* `{ at: DateTimeType, value }` dataset keeps compiling unchanged.
|
|
777
|
+
*
|
|
778
|
+
* Literal records brand the result with the kind their `at` implies
|
|
779
|
+
* ({@link PlanKindOf}); an East array is kind-erased.
|
|
780
|
+
*
|
|
781
|
+
* @typeParam A - The literal records' `at` type
|
|
782
|
+
* @param cells - The raw cells (`{ at, value }` records; `value` an `Option<Float>`)
|
|
783
|
+
* @returns An `ArrayType(PlanTableCellType)` expression, branded with the cells' kind
|
|
784
|
+
* @throws {Error} If an East array's element `at` is not an instant-typed field
|
|
785
|
+
*/
|
|
786
|
+
export declare function createTableCells<A extends PlanInstantInput = never>(cells: {
|
|
787
|
+
at: A;
|
|
788
|
+
value: SubtypeExprOrValue<OptionType<FloatType>>;
|
|
789
|
+
}[] | SubtypeExprOrValue<ArrayType<PlanRawTableCellType>>): PlanTableCellsExpr<PlanKindOf<A>>;
|
|
790
|
+
//# sourceMappingURL=builders.d.ts.map
|