@graview/primitives 0.1.30 → 0.1.33

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.
Files changed (161) hide show
  1. package/dist/app-bar.d.ts +2 -0
  2. package/dist/app-bar.d.ts.map +1 -1
  3. package/dist/app-bar.js +9 -2
  4. package/dist/app-bar.js.map +1 -1
  5. package/dist/chat.d.ts +8 -6
  6. package/dist/chat.d.ts.map +1 -1
  7. package/dist/chat.js +6 -3
  8. package/dist/chat.js.map +1 -1
  9. package/dist/default-views.d.ts.map +1 -1
  10. package/dist/default-views.js +24 -4
  11. package/dist/default-views.js.map +1 -1
  12. package/dist/draft-frame.d.ts.map +1 -1
  13. package/dist/draft-frame.js +29 -2
  14. package/dist/draft-frame.js.map +1 -1
  15. package/dist/editable.d.ts.map +1 -1
  16. package/dist/editable.js +42 -9
  17. package/dist/editable.js.map +1 -1
  18. package/dist/find.d.ts.map +1 -1
  19. package/dist/find.js +7 -6
  20. package/dist/find.js.map +1 -1
  21. package/dist/first-look-door.d.ts +2 -2
  22. package/dist/first-look-door.js +2 -2
  23. package/dist/first-look.d.ts.map +1 -1
  24. package/dist/first-look.js +7 -4
  25. package/dist/first-look.js.map +1 -1
  26. package/dist/frame.d.ts +1 -0
  27. package/dist/frame.d.ts.map +1 -1
  28. package/dist/frame.js +2 -0
  29. package/dist/frame.js.map +1 -1
  30. package/dist/index.d.ts +13 -2
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +13 -2
  33. package/dist/index.js.map +1 -1
  34. package/dist/inline-ai-door.d.ts +15 -0
  35. package/dist/inline-ai-door.d.ts.map +1 -0
  36. package/dist/inline-ai-door.js +54 -0
  37. package/dist/inline-ai-door.js.map +1 -0
  38. package/dist/inline-ai-env.d.ts +29 -0
  39. package/dist/inline-ai-env.d.ts.map +1 -0
  40. package/dist/inline-ai-env.js +22 -0
  41. package/dist/inline-ai-env.js.map +1 -0
  42. package/dist/inline-ai-menu.d.ts +58 -0
  43. package/dist/inline-ai-menu.d.ts.map +1 -0
  44. package/dist/inline-ai-menu.js +297 -0
  45. package/dist/inline-ai-menu.js.map +1 -0
  46. package/dist/lens/calendar-dates.d.ts.map +1 -1
  47. package/dist/lens/calendar-dates.js +12 -0
  48. package/dist/lens/calendar-dates.js.map +1 -1
  49. package/dist/lens/calendar-options.d.ts +1 -1
  50. package/dist/lens-keeping.js +2 -3
  51. package/dist/lens-keeping.js.map +1 -1
  52. package/dist/map-panel.js +51 -2
  53. package/dist/map-panel.js.map +1 -1
  54. package/dist/notice-place.d.ts +2 -2
  55. package/dist/notice-place.js +2 -2
  56. package/dist/notify-door.d.ts +57 -0
  57. package/dist/notify-door.d.ts.map +1 -0
  58. package/dist/notify-door.js +136 -0
  59. package/dist/notify-door.js.map +1 -0
  60. package/dist/notify-sheet.d.ts +27 -0
  61. package/dist/notify-sheet.d.ts.map +1 -0
  62. package/dist/notify-sheet.js +102 -0
  63. package/dist/notify-sheet.js.map +1 -0
  64. package/dist/pages.d.ts +15 -4
  65. package/dist/pages.d.ts.map +1 -1
  66. package/dist/pages.js +15 -4
  67. package/dist/pages.js.map +1 -1
  68. package/dist/primitives/measure.d.ts +10 -0
  69. package/dist/primitives/measure.d.ts.map +1 -1
  70. package/dist/primitives/measure.js +27 -7
  71. package/dist/primitives/measure.js.map +1 -1
  72. package/dist/quick-ask-desk.d.ts +38 -0
  73. package/dist/quick-ask-desk.d.ts.map +1 -0
  74. package/dist/quick-ask-desk.js +36 -0
  75. package/dist/quick-ask-desk.js.map +1 -0
  76. package/dist/quick-ask-door.d.ts +33 -0
  77. package/dist/quick-ask-door.d.ts.map +1 -0
  78. package/dist/quick-ask-door.js +70 -0
  79. package/dist/quick-ask-door.js.map +1 -0
  80. package/dist/quick-ask-setting.d.ts +9 -0
  81. package/dist/quick-ask-setting.d.ts.map +1 -0
  82. package/dist/quick-ask-setting.js +11 -0
  83. package/dist/quick-ask-setting.js.map +1 -0
  84. package/dist/quick-ask.d.ts +23 -0
  85. package/dist/quick-ask.d.ts.map +1 -0
  86. package/dist/quick-ask.js +327 -0
  87. package/dist/quick-ask.js.map +1 -0
  88. package/dist/record-interactions-door.d.ts +8 -0
  89. package/dist/record-interactions-door.d.ts.map +1 -0
  90. package/dist/record-interactions-door.js +42 -0
  91. package/dist/record-interactions-door.js.map +1 -0
  92. package/dist/record-interactions.d.ts +13 -0
  93. package/dist/record-interactions.d.ts.map +1 -0
  94. package/dist/record-interactions.js +9 -0
  95. package/dist/record-interactions.js.map +1 -0
  96. package/dist/scene-css.d.ts.map +1 -1
  97. package/dist/scene-css.js +47 -13
  98. package/dist/scene-css.js.map +1 -1
  99. package/dist/scene.d.ts +9 -2
  100. package/dist/scene.d.ts.map +1 -1
  101. package/dist/scene.js +8 -1
  102. package/dist/scene.js.map +1 -1
  103. package/dist/shell.d.ts +14 -25
  104. package/dist/shell.d.ts.map +1 -1
  105. package/dist/shell.js +5 -3
  106. package/dist/shell.js.map +1 -1
  107. package/dist/spec-views.d.ts.map +1 -1
  108. package/dist/spec-views.js +6 -3
  109. package/dist/spec-views.js.map +1 -1
  110. package/dist/stretched-link.d.ts +18 -0
  111. package/dist/stretched-link.d.ts.map +1 -0
  112. package/dist/stretched-link.js +47 -0
  113. package/dist/stretched-link.js.map +1 -0
  114. package/dist/timeline.d.ts.map +1 -1
  115. package/dist/timeline.js +23 -2
  116. package/dist/timeline.js.map +1 -1
  117. package/dist/when-input-door.d.ts +8 -0
  118. package/dist/when-input-door.d.ts.map +1 -0
  119. package/dist/when-input-door.js +19 -0
  120. package/dist/when-input-door.js.map +1 -0
  121. package/dist/when-input.d.ts +34 -0
  122. package/dist/when-input.d.ts.map +1 -0
  123. package/dist/when-input.js +122 -0
  124. package/dist/when-input.js.map +1 -0
  125. package/dist/when-picker-door.d.ts +6 -0
  126. package/dist/when-picker-door.d.ts.map +1 -0
  127. package/dist/when-picker-door.js +15 -0
  128. package/dist/when-picker-door.js.map +1 -0
  129. package/dist/when-picker.d.ts +16 -0
  130. package/dist/when-picker.d.ts.map +1 -0
  131. package/dist/when-picker.js +108 -0
  132. package/dist/when-picker.js.map +1 -0
  133. package/dist/workbench/activity.d.ts +4 -0
  134. package/dist/workbench/activity.d.ts.map +1 -1
  135. package/dist/workbench/activity.js +41 -12
  136. package/dist/workbench/activity.js.map +1 -1
  137. package/dist/workbench/agent-seat.d.ts.map +1 -1
  138. package/dist/workbench/agent-seat.js +5 -2
  139. package/dist/workbench/agent-seat.js.map +1 -1
  140. package/dist/workbench/ai-entries.d.ts +22 -0
  141. package/dist/workbench/ai-entries.d.ts.map +1 -0
  142. package/dist/workbench/ai-entries.js +75 -0
  143. package/dist/workbench/ai-entries.js.map +1 -0
  144. package/dist/workbench/ai-feed.d.ts +12 -0
  145. package/dist/workbench/ai-feed.d.ts.map +1 -0
  146. package/dist/workbench/ai-feed.js +14 -0
  147. package/dist/workbench/ai-feed.js.map +1 -0
  148. package/dist/workbench/answer-args.d.ts.map +1 -1
  149. package/dist/workbench/answer-args.js +23 -5
  150. package/dist/workbench/answer-args.js.map +1 -1
  151. package/dist/workbench/inspector.js +1 -1
  152. package/dist/workbench/inspector.js.map +1 -1
  153. package/package.json +6 -6
  154. package/dist/seat-field.d.ts +0 -58
  155. package/dist/seat-field.d.ts.map +0 -1
  156. package/dist/seat-field.js +0 -185
  157. package/dist/seat-field.js.map +0 -1
  158. package/dist/seat-panel.d.ts +0 -38
  159. package/dist/seat-panel.d.ts.map +0 -1
  160. package/dist/seat-panel.js +0 -212
  161. package/dist/seat-panel.js.map +0 -1
package/dist/pages.js CHANGED
@@ -4,10 +4,10 @@
4
4
  *
5
5
  * Everything here is also exported from `@graview/primitives`. It is its
6
6
  * own entry because a bundler splits a page by which files a chunk can
7
- * reach, and `@graview/primitives` reaches the seat's panel, the inspector
7
+ * reach, and `@graview/primitives` reaches the workbench, the inspector
8
8
  * and the scene they stand on: the pages face, importing a mark from it,
9
9
  * fetched the whole map to draw a list. `@graview/pages` imports from here,
10
- * and the seat's panel when its ask field is first opened. Nothing in this
10
+ * and the quick ask's bar when it is first opened. Nothing in this
11
11
  * module's files may import a barrel.
12
12
  */
13
13
  export { ArrangeBar, arrangementCaption, arrangementOf, withArrangement } from "./arrange-bar.js";
@@ -21,6 +21,8 @@ export { AppLink } from "./app-link-door.js";
21
21
  export { LinkedPicker, LinkedRecordView } from "./linked-record-door.js";
22
22
  // How a date repeats: asked for in a form and changed beside a record's date, fetched with the first one drawn.
23
23
  export { RepeatEditor, RepeatPicker } from "./repeat-picker-door.js";
24
+ // A day or a moment, typed as people say it ("tomorrow 3pm") or picked from a month: every date a person gives, fetched when first asked for (Roadmap f-date-inputs).
25
+ export { prefetchWhenInput, WhenInput } from "./when-input-door.js";
24
26
  export { hasShape, TextBody, textBlocks } from "./text-body.js";
25
27
  export { KindFigure } from "./figure.js";
26
28
  export { ownSentence, problemLine, problemTitle, RuleLineView, RuleParts, useLined, useRuleLines } from "./rule-line.js";
@@ -34,6 +36,7 @@ export { RelationMark } from "./relation-key.js";
34
36
  // The framework's own views and the declaration's specs, for a routed face that registers them outright (`@graview/embed/pages`) without reaching every lens through the package's main entry.
35
37
  export { registerDefaultViews } from "./default-views.js";
36
38
  export { HeadingsUnder, HomeLine, pageSays, registerViewSpecs, SpecLinks } from "./spec-views.js";
39
+ export { useEndsAboveItsList } from "./stretched-link.js";
37
40
  export { StandingDot, standingWords } from "./workbench/standing.js";
38
41
  export { useViewportHeight } from "./primitives/measure.js";
39
42
  export { Profile } from "./profile.js";
@@ -42,13 +45,21 @@ export { viewsCss } from "./views-css.js";
42
45
  export { FOOT_MOVED, FOOT_OBSTACLES, NARROW_PICTURE, placeAtTheFoot, placeAtTheTop } from "./notice-place.js";
43
46
  // The way back after an act, judged and timed alike on both faces (FR-152).
44
47
  export { freshChangeOf, isTakeBackKey, lastChangeOf, takeBackLast, takeBackWords, WAY_BACK_MS } from "./way-back.js";
45
- // The seat: the ask field at the foot of the face, its panel fetched when it is first opened.
46
- export { SeatField } from "./seat-field.js";
48
+ // The quick ask (Roadmap f-quick-ask-framework): ⌘K's bar beside what the page is about, and its answer cards, fetched when first opened.
49
+ export { QuickAskDoor } from "./quick-ask-door.js";
50
+ export { openQuickAsk, useQuickAskDrawn } from "./quick-ask-desk.js";
51
+ export { quickAskOf } from "./quick-ask-setting.js";
47
52
  export { DraftDoor } from "./draft-door.js";
48
53
  export { appKeyOf } from "./reader-lenses.js";
49
54
  export { registerReaderLenses } from "./declared-lens-doors.js";
50
55
  // The context menu (FR-77's `acts`): the acts at the pointer, its pane and the tools fetched when it is first opened.
51
56
  export { Inspector } from "./workbench/inspector-door.js";
57
+ // The inline AI (Roadmap f-ai-candidate-catalog): its part of the context menu and the ghost of what it proposed, fetched when first drawn.
58
+ export { GhostDoor, InlineAiSections, useInlineAiSection } from "./inline-ai-door.js";
59
+ // Notify me (Roadmap f-notify-subscriptions): its part of the context menu, the sheet, a face's own press and Activity's list, the sheet and list fetched when first drawn.
60
+ export { askToNotify, NotifiedDoor, NotifyButton, NotifyDoor, NotifySections, useNotifiedCount, useNotifySection } from "./notify-door.js";
61
+ // What AI did on a record, on its page (Roadmap f-activity-ai-entries), fetched with the first entry.
62
+ export { RecordInteractionsDoor } from "./record-interactions-door.js";
52
63
  // Choosing several records on a list, and the bar that acts on them all at once — fetched with the first one chosen.
53
64
  export { CHOOSING_CSS, LONG_PRESS_MS, useChoosing } from "./choosing.js";
54
65
  export { prefetchSeveral, SeveralBarDoor } from "./several-door.js";
package/dist/pages.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pages.js","sourceRoot":"","sources":["../src/pages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAElG,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,gHAAgH;AAChH,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,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AAgB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE3I,sGAAsG;AACtG,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,qHAAqH;AACrH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEpE,gGAAgG;AAChG,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE1D,wGAAwG;AACxG,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
@@ -6,6 +6,16 @@
6
6
  * themselves out for a desk (a 316px label column, seven day columns) were
7
7
  * unreadable in half of them. The width is the fact they need to choose a
8
8
  * shape by; this is the one place it is read.
9
+ *
10
+ * DRAWN IN THE ROOM IT HAS, FROM ITS FIRST FRAME. The width was read after
11
+ * the paint, and a change to it was rendered after the paint too: a card
12
+ * on the ground is given its size by the scene after the lens inside it
13
+ * first measured, and the coverage matrix in a 225-pixel card on
14
+ * graview.dev at 360 wide painted one frame laid out for a desk — its
15
+ * rotated column names 83 pixels past the screen — before it stacked, and
16
+ * the watch saw that frame. It is read before the first paint, of the box
17
+ * the ref holds now, and a change the browser reports before a paint is
18
+ * drawn in that paint.
9
19
  */
10
20
  export declare function useWidth(ref: {
11
21
  current: HTMLElement | null;
@@ -1 +1 @@
1
- {"version":3,"file":"measure.d.ts","sourceRoot":"","sources":["../../src/primitives/measure.ts"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE;IAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;CAAE,GAAG,MAAM,GAAG,IAAI,CAY5E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,UAAO,GAAG,MAAM,GAAG,SAAS,CAsB/D;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;;;;;CAQM,CAAC"}
1
+ {"version":3,"file":"measure.d.ts","sourceRoot":"","sources":["../../src/primitives/measure.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE;IAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;CAAE,GAAG,MAAM,GAAG,IAAI,CAoB5E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,UAAO,GAAG,MAAM,GAAG,SAAS,CAsB/D;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;;;;;CAQM,CAAC"}
@@ -1,4 +1,5 @@
1
- import { useEffect, useState } from "react";
1
+ import { useEffect, useLayoutEffect, useState } from "react";
2
+ import { flushSync } from "react-dom";
2
3
  /*
3
4
  * WHAT THE FRAME OF EVERY FACE MEASURES WITH (FR-104): the room a view has,
4
5
  * and a caption kept for the ear alone. Their own module rather than the
@@ -14,19 +15,38 @@ import { useEffect, useState } from "react";
14
15
  * themselves out for a desk (a 316px label column, seven day columns) were
15
16
  * unreadable in half of them. The width is the fact they need to choose a
16
17
  * shape by; this is the one place it is read.
18
+ *
19
+ * DRAWN IN THE ROOM IT HAS, FROM ITS FIRST FRAME. The width was read after
20
+ * the paint, and a change to it was rendered after the paint too: a card
21
+ * on the ground is given its size by the scene after the lens inside it
22
+ * first measured, and the coverage matrix in a 225-pixel card on
23
+ * graview.dev at 360 wide painted one frame laid out for a desk — its
24
+ * rotated column names 83 pixels past the screen — before it stacked, and
25
+ * the watch saw that frame. It is read before the first paint, of the box
26
+ * the ref holds now, and a change the browser reports before a paint is
27
+ * drawn in that paint.
17
28
  */
18
29
  export function useWidth(ref) {
19
30
  const [width, setWidth] = useState(null);
20
- useEffect(() => {
21
- const element = ref.current;
31
+ const [element, setElement] = useState(null);
32
+ // After every render, before the paint: the box the ref holds now.
33
+ useLayoutEffect(() => {
34
+ if (ref.current !== element)
35
+ setElement(ref.current);
36
+ });
37
+ useLayoutEffect(() => {
22
38
  if (!element || typeof ResizeObserver === "undefined")
23
39
  return;
24
- const read = () => setWidth(Math.round(element.getBoundingClientRect().width));
25
- read();
26
- const observer = new ResizeObserver(read);
40
+ const measured = () => Math.round(element.getBoundingClientRect().width);
41
+ setWidth(measured());
42
+ // The browser reports a resize after layout and before the paint; rendered then, the paint has it.
43
+ const observer = new ResizeObserver(() => {
44
+ const next = measured();
45
+ flushSync(() => setWidth(next));
46
+ });
27
47
  observer.observe(element);
28
48
  return () => observer.disconnect();
29
- }, [ref]);
49
+ }, [element]);
30
50
  return width;
31
51
  }
32
52
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"measure.js","sourceRoot":"","sources":["../../src/primitives/measure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAsB,MAAM,OAAO,CAAC;AAEhE;;;;;;GAMG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAoC;IAC3D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IACxD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,OAAO,IAAI,OAAO,cAAc,KAAK,WAAW;YAAE,OAAO;QAC9D,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QAC/E,IAAI,EAAE,CAAC;QACP,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;QAC1C,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC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,CAAC,qBAAqB,CAAC,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACT,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,YAAY;IACtB,UAAU,EAAE,QAAQ;CACY,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { AiTarget, PointedAt } from "@graview/core/catalog";
2
+ import type { AiDesk } from "@graview/react/provider";
3
+ /**
4
+ * WHERE THE QUICK ASK IS OPEN, AND WHETHER IT IS DRAWN, per app's desk
5
+ * (Roadmap f-quick-ask-framework) — apart from its door, so Find, the bar
6
+ * and the search page ask it without carrying the door up front.
7
+ */
8
+ /** What the bar is opened on, and words already asked there. */
9
+ export interface QuickAskOpening {
10
+ /** What a menu or a selection pointed at; read as a target when the bar is drawn (`aiTargetOf`). */
11
+ readonly pointed?: PointedAt;
12
+ /** A target already read, as an entry in Activity keeps it. */
13
+ readonly target?: AiTarget;
14
+ /** Words to ask at once: the card opens answering them. */
15
+ readonly asked?: string;
16
+ /** Where the keyboard goes back to when the bar is put away. */
17
+ readonly returnTo?: HTMLElement | null;
18
+ }
19
+ interface Held {
20
+ open: (QuickAskOpening & {
21
+ readonly at: number;
22
+ }) | null;
23
+ drawn: number;
24
+ readonly listeners: Set<() => void>;
25
+ }
26
+ export declare const HELD: WeakMap<AiDesk, Held>;
27
+ export declare const heldOf: (desk: AiDesk) => Held;
28
+ export declare const tell: (held: Held) => void;
29
+ /** Opens the bar (or, with words, an answer card) on this app's desk; null puts it away. */
30
+ export declare function openQuickAsk(desk: AiDesk, opening: QuickAskOpening | null): void;
31
+ /** Whether a quick ask is drawn on this app's desk: Find offers "Ask: ‘…’" only where one is. False with no desk (a bar drawn outside any app). */
32
+ export declare function useQuickAskDrawn(desk: AiDesk | undefined): boolean;
33
+ /** What the bar is open on now, or null. */
34
+ export declare function useOpening(desk: AiDesk): (QuickAskOpening & {
35
+ readonly at: number;
36
+ }) | null;
37
+ export {};
38
+ //# sourceMappingURL=quick-ask-desk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quick-ask-desk.d.ts","sourceRoot":"","sources":["../src/quick-ask-desk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGtD;;;;GAIG;AAEH,gEAAgE;AAChE,MAAM,WAAW,eAAe;IAC9B,oGAAoG;IACpG,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC;IAC3B,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CACxC;AAED,UAAU,IAAI;IACZ,IAAI,EAAE,CAAC,eAAe,GAAG;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;CACrC;AACD,eAAO,MAAM,IAAI,uBAA8B,CAAC;AAChD,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,KAAG,IAIrC,CAAC;AACF,eAAO,MAAM,IAAI,GAAI,MAAM,IAAI,SAE9B,CAAC;AAGF,4FAA4F;AAC5F,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI,GAAG,IAAI,CAIhF;AAQD,mJAAmJ;AACnJ,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAGlE;AAGD,4CAA4C;AAC5C,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM;iBApCG,MAAM;UAuC/C"}
@@ -0,0 +1,36 @@
1
+ import { useSyncExternalStore } from "react";
2
+ export const HELD = new WeakMap();
3
+ export const heldOf = (desk) => {
4
+ let held = HELD.get(desk);
5
+ if (!held)
6
+ HELD.set(desk, (held = { open: null, drawn: 0, listeners: new Set() }));
7
+ return held;
8
+ };
9
+ export const tell = (held) => {
10
+ for (const listener of [...held.listeners])
11
+ listener();
12
+ };
13
+ let opened = 0;
14
+ /** Opens the bar (or, with words, an answer card) on this app's desk; null puts it away. */
15
+ export function openQuickAsk(desk, opening) {
16
+ const held = heldOf(desk);
17
+ held.open = opening ? { ...opening, at: ++opened } : null;
18
+ tell(held);
19
+ }
20
+ const subscribeTo = (desk) => (listener) => {
21
+ const held = heldOf(desk);
22
+ held.listeners.add(listener);
23
+ return () => void held.listeners.delete(listener);
24
+ };
25
+ /** Whether a quick ask is drawn on this app's desk: Find offers "Ask: ‘…’" only where one is. False with no desk (a bar drawn outside any app). */
26
+ export function useQuickAskDrawn(desk) {
27
+ const drawn = () => (desk ? heldOf(desk).drawn > 0 : false);
28
+ return useSyncExternalStore(desk ? subscribeTo(desk) : NO_SUBSCRIPTION, drawn, drawn);
29
+ }
30
+ const NO_SUBSCRIPTION = () => () => undefined;
31
+ /** What the bar is open on now, or null. */
32
+ export function useOpening(desk) {
33
+ const open = () => heldOf(desk).open;
34
+ return useSyncExternalStore(subscribeTo(desk), open, open);
35
+ }
36
+ //# sourceMappingURL=quick-ask-desk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quick-ask-desk.js","sourceRoot":"","sources":["../src/quick-ask-desk.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,o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,CAAC,QAAQ,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,mJAAmJ;AACnJ,MAAM,UAAU,gBAAgB,CAAC,IAAwB;IACvD,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC5D,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACxF,CAAC;AACD,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;AAE9C,4CAA4C;AAC5C,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;IACrC,OAAO,oBAAoB,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * THE QUICK ASK (Roadmap f-quick-ask-framework): the command bar, opened
3
+ * with ⌘K (Ctrl+K) beside what the person is on — the selection, a record's
4
+ * page, a list, else the place — and the answer cards it leaves there.
5
+ *
6
+ * It replaced the Ask box: a field at the picture's foot that grew into a
7
+ * chat thread over the picture, on both faces. Now words are asked where
8
+ * the thing is. The bar completes the acts on the target, its places, its
9
+ * records and "Show …" (a panel the catalog can draw); words that complete
10
+ * nothing are asked, and the answer is a card placed beside the record or
11
+ * the list, with what acts on it — a change waits as a ghost, never made
12
+ * until accepted — and a field for a follow-up on the card. A follow-up
13
+ * replaces the card's answer: it is a quick ask, not a thread.
14
+ *
15
+ * Drawn only where the host gave a model and did not say AI is off, and
16
+ * where the app's setting (`quickAsk`) leaves it on: otherwise there is no
17
+ * bar, no card and no chord, and ⌘K is Find's again. The bar and the card
18
+ * are fetched when first opened: a page whose reader never asks carries
19
+ * neither.
20
+ *
21
+ * Find's last row ("Ask: ‘…’") and the context menu's "Ask about this…"
22
+ * open it too, through `openQuickAsk`.
23
+ */
24
+ export type { QuickAskOpening } from "./quick-ask-desk.js";
25
+ export interface QuickAskDoorProps {
26
+ /** The face it is drawn on: the scene places a card by the card it is about; a page by its heading. */
27
+ readonly face: "scene" | "pages";
28
+ /** The app's setting: false draws no quick ask at all (see `quickAskOf`). */
29
+ readonly on?: boolean;
30
+ }
31
+ /** The quick ask's chord, bar and card, where it is drawn at all. */
32
+ export declare function QuickAskDoor({ face, on }: QuickAskDoorProps): import("react").JSX.Element | null;
33
+ //# sourceMappingURL=quick-ask-door.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quick-ask-door.d.ts","sourceRoot":"","sources":["../src/quick-ask-door.tsx"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAW3D,MAAM,WAAW,iBAAiB;IAChC,uGAAuG;IACvG,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACjC,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,qEAAqE;AACrE,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,EAAS,EAAE,EAAE,iBAAiB,sCA+DlE"}
@@ -0,0 +1,70 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { retryingImport } from "@graview/core/retry";
3
+ import { lazyModule, useGraview, usePlayback } from "@graview/react/provider";
4
+ import { heldOf, openQuickAsk, tell, useOpening } from "./quick-ask-desk.js";
5
+ import { inlineAiOn } from "@graview/tools/frame";
6
+ import { Suspense, useEffect, useRef } from "react";
7
+ const cardModule = /* @__PURE__ */ lazyModule(retryingImport(() => import("./quick-ask.js")));
8
+ const Card = /* @__PURE__ */ cardModule.part((module, props) => {
9
+ const Drawn = module.QuickAskCard;
10
+ return _jsx(Drawn, { ...props });
11
+ }, { what: "The quick ask" });
12
+ /** The quick ask's chord, bar and card, where it is drawn at all. */
13
+ export function QuickAskDoor({ face, on = true }) {
14
+ const { ai, aiDesk, selection, view } = useGraview();
15
+ /* While somebody looks back through the timeline, nothing is asked of the app (Roadmap f-playback). */
16
+ const lookingBack = usePlayback()?.open ?? false;
17
+ const drawn = on && inlineAiOn(ai) && !lookingBack;
18
+ const opening = useOpening(aiDesk);
19
+ const marker = useRef(null);
20
+ const here = useRef({ selection, place: view.within?.["view"] });
21
+ here.current = { selection, place: view.within?.["view"] };
22
+ /* Drawn: Find offers "Ask: ‘…’", and the first look points at the chord. */
23
+ useEffect(() => {
24
+ if (!drawn)
25
+ return;
26
+ const held = heldOf(aiDesk);
27
+ held.drawn += 1;
28
+ tell(held);
29
+ return () => {
30
+ held.drawn = Math.max(0, held.drawn - 1);
31
+ if (held.drawn === 0)
32
+ held.open = null;
33
+ tell(held);
34
+ };
35
+ }, [drawn, aiDesk]);
36
+ /*
37
+ * ⌘K OR CTRL+K, FROM ANYWHERE IN THE APP: the bar, beside what is
38
+ * selected. Heard before Find hears it (the capture phase), so where the
39
+ * quick ask is drawn the chord is its, and `/` stays Find's. Inside an
40
+ * embed only a key pressed in the embed or on nothing at all is the bar's,
41
+ * and of two embeds the first to answer has it, as Find's rule is.
42
+ */
43
+ useEffect(() => {
44
+ if (!drawn)
45
+ return;
46
+ const onKey = (event) => {
47
+ if (event.defaultPrevented || event.key.toLowerCase() !== "k" || !(event.metaKey || event.ctrlKey) || event.altKey || event.shiftKey)
48
+ return;
49
+ const root = marker.current?.closest("[data-graview-embed]");
50
+ const target = event.target;
51
+ const nowhere = !(target instanceof Node) || target === document.body || target === document.documentElement;
52
+ if (root && !(nowhere || (target instanceof Node && root.contains(target))))
53
+ return;
54
+ event.preventDefault();
55
+ cardModule.prefetch();
56
+ const at = document.activeElement;
57
+ const { selection: chosen, place } = here.current;
58
+ openQuickAsk(aiDesk, {
59
+ pointed: { ...(chosen[0] !== undefined ? { on: chosen[0] } : {}), about: chosen, ...(place ? { place } : {}) },
60
+ returnTo: at instanceof HTMLElement && at !== document.body ? at : null,
61
+ });
62
+ };
63
+ window.addEventListener("keydown", onKey, true);
64
+ return () => window.removeEventListener("keydown", onKey, true);
65
+ }, [drawn, aiDesk]);
66
+ if (!drawn)
67
+ return null;
68
+ return (_jsxs(_Fragment, { children: [_jsx("span", { ref: marker, hidden: true, "data-graview-quick-ask": face }), opening ? (_jsx(Suspense, { fallback: null, children: _jsx(Card, { face: face, opening: opening, close: () => openQuickAsk(aiDesk, null) }, opening.at) })) : null] }));
69
+ }
70
+ //# sourceMappingURL=quick-ask-door.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quick-ask-door.js","sourceRoot":"","sources":["../src/quick-ask-door.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAsB,MAAM,OAAO,CAAC;AA6BxE,MAAM,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAC9F,MAAM,IAAI,GAAG,eAAe,CAAC,UAAU,CAAC,IAAI,CAC1C,CAAC,MAAM,EAAE,KAAwB,EAAE,EAAE;IACnC,MAAM,KAAK,GAAG,MAAM,CAAC,YAAgD,CAAC;I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,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;gBAC9G,QAAQ,EAAE,EAAE,YAAY,WAAW,IAAI,EAAE,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;aACxE,CAAC,CAAC;QACL,CAAC,CAAC;QACF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAChD,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAClE,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IAEpB,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OAAO,CACL,8BAEE,eAAM,GAAG,EAAE,MAAM,EAAE,MAAM,kCAAyB,IAAI,GAAI,EACzD,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,QAAQ,IAAC,QAAQ,EAAE,IAAI,YACtB,KAAC,IAAI,IAAkB,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAjF,OAAO,CAAC,EAAE,CAA2E,GACvF,CACZ,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * THE APP'S QUICK-ASK SETTING, from what a host stored for the Ask box it
3
+ * replaced (Roadmap f-quick-ask-framework): the Ask box's `"field"` is on
4
+ * and its `"hidden"` is off, a boolean is itself, and nothing said is on.
5
+ * A host that kept the old setting hands it here and passes the answer as
6
+ * `quickAsk` — to the Shell, a routed face's context, or an embed.
7
+ */
8
+ export declare function quickAskOf(setting: unknown): boolean;
9
+ //# sourceMappingURL=quick-ask-setting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quick-ask-setting.d.ts","sourceRoot":"","sources":["../src/quick-ask-setting.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEpD"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * THE APP'S QUICK-ASK SETTING, from what a host stored for the Ask box it
3
+ * replaced (Roadmap f-quick-ask-framework): the Ask box's `"field"` is on
4
+ * and its `"hidden"` is off, a boolean is itself, and nothing said is on.
5
+ * A host that kept the old setting hands it here and passes the answer as
6
+ * `quickAsk` — to the Shell, a routed face's context, or an embed.
7
+ */
8
+ export function quickAskOf(setting) {
9
+ return !(setting === "hidden" || setting === false);
10
+ }
11
+ //# sourceMappingURL=quick-ask-setting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quick-ask-setting.js","sourceRoot":"","sources":["../src/quick-ask-setting.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,OAAgB;IACzC,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,CAAC,CAAC;AACtD,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { QuickAskOpening } from "./quick-ask-desk.js";
2
+ import "./frame.js";
3
+ /**
4
+ * THE COMMAND BAR AND ITS ANSWER CARD (`quick-ask-door.tsx`), fetched when
5
+ * first opened.
6
+ *
7
+ * One card beside what it is about. Opened, it is the bar: a field that
8
+ * completes the acts on the target, "Show …" for the panels the catalog can
9
+ * draw of it, its places and its records, and — for words that are a
10
+ * question — "Ask: ‘…’". Asked, the same card holds the answer: a few
11
+ * sentences, the places, records and panels that act on it, and the
12
+ * changes it proposes as a ghost on the card, accepted all or some as one
13
+ * batch, with its one undo. Its field
14
+ * stays, for a follow-up: asked there, the answer replaces the one before,
15
+ * and the model is told only that one step back.
16
+ */
17
+ export interface QuickAskCardProps {
18
+ readonly face: "scene" | "pages";
19
+ readonly opening: QuickAskOpening;
20
+ readonly close: () => void;
21
+ }
22
+ export declare function QuickAskCard({ face, opening, close }: QuickAskCardProps): import("react").JSX.Element;
23
+ //# sourceMappingURL=quick-ask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quick-ask.d.ts","sourceRoot":"","sources":["../src/quick-ask.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,YAAY,CAAC;AAEpB;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC;CAC5B;AAiCD,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,iBAAiB,+BA6TvE"}