@hanzo/ui 8.1.5 → 8.1.7

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 (66) hide show
  1. package/README.md +4 -2
  2. package/dist/backends/gui/textarea.cjs +5 -10
  3. package/dist/backends/gui/textarea.d.ts +11 -32
  4. package/dist/backends/gui/textarea.d.ts.map +1 -1
  5. package/dist/backends/gui/textarea.js +5 -10
  6. package/dist/backends/gui/textarea.js.map +1 -1
  7. package/dist/chat/Composer.cjs +10 -46
  8. package/dist/chat/Composer.d.ts +11 -30
  9. package/dist/chat/Composer.d.ts.map +1 -1
  10. package/dist/chat/Composer.js +10 -46
  11. package/dist/chat/Composer.js.map +1 -1
  12. package/dist/chat/Failure.cjs +9 -28
  13. package/dist/chat/Failure.d.ts +6 -20
  14. package/dist/chat/Failure.d.ts.map +1 -1
  15. package/dist/chat/Failure.js +9 -28
  16. package/dist/chat/Failure.js.map +1 -1
  17. package/dist/chat/Message.cjs +11 -34
  18. package/dist/chat/Message.d.ts +12 -40
  19. package/dist/chat/Message.d.ts.map +1 -1
  20. package/dist/chat/Message.js +11 -34
  21. package/dist/chat/Message.js.map +1 -1
  22. package/dist/chat/Sources.cjs +6 -24
  23. package/dist/chat/Sources.d.ts +8 -28
  24. package/dist/chat/Sources.d.ts.map +1 -1
  25. package/dist/chat/Sources.js +6 -24
  26. package/dist/chat/Sources.js.map +1 -1
  27. package/dist/chat/Step.cjs +16 -42
  28. package/dist/chat/Step.d.ts +5 -17
  29. package/dist/chat/Step.d.ts.map +1 -1
  30. package/dist/chat/Step.js +16 -42
  31. package/dist/chat/Step.js.map +1 -1
  32. package/dist/chat/Thread.cjs +4 -27
  33. package/dist/chat/Thread.d.ts +4 -34
  34. package/dist/chat/Thread.d.ts.map +1 -1
  35. package/dist/chat/Thread.js +4 -27
  36. package/dist/chat/Thread.js.map +1 -1
  37. package/dist/chat/index.cjs +20 -61
  38. package/dist/chat/index.d.ts +20 -61
  39. package/dist/chat/index.d.ts.map +1 -1
  40. package/dist/chat/index.js +20 -61
  41. package/dist/chat/index.js.map +1 -1
  42. package/dist/chat/pure.cjs +9 -28
  43. package/dist/chat/pure.d.ts.map +1 -1
  44. package/dist/chat/pure.js +9 -28
  45. package/dist/chat/pure.js.map +1 -1
  46. package/dist/chat/send.cjs +8 -18
  47. package/dist/chat/send.d.ts +5 -12
  48. package/dist/chat/send.d.ts.map +1 -1
  49. package/dist/chat/send.js +8 -18
  50. package/dist/chat/send.js.map +1 -1
  51. package/dist/chat/stick.cjs +2 -4
  52. package/dist/chat/stick.d.ts +2 -4
  53. package/dist/chat/stick.d.ts.map +1 -1
  54. package/dist/chat/stick.js +2 -4
  55. package/dist/chat/stick.js.map +1 -1
  56. package/dist/gallery.d.ts.map +1 -1
  57. package/dist/gallery.html +2840 -0
  58. package/dist/gallery.js.map +1 -1
  59. package/dist/product/CopyButton.d.ts +2 -8
  60. package/dist/product/CopyButton.d.ts.map +1 -1
  61. package/dist/product/CopyButton.js.map +1 -1
  62. package/dist/product/pure.cjs +3 -5
  63. package/dist/product/pure.d.ts.map +1 -1
  64. package/dist/product/pure.js +3 -5
  65. package/dist/product/pure.js.map +1 -1
  66. package/package.json +1 -1
@@ -1,41 +1,22 @@
1
1
  "use strict";
2
- // @hanzo/ui/chat/pure — the conversation's decisions, without the conversation.
2
+ // @hanzo/ui/chat/pure — the conversation's decisions, with nothing attached.
3
3
  //
4
- // Every module here is a function over values: no @hanzo/gui, no React, no DOM,
5
- // no side effects. Same shape and same reason as `@hanzo/ui/product/pure`, and
6
- // the reason is measured — `import('@hanzo/ui/chat')` in Node dies on
7
- // `SyntaxError: Unexpected token 'typeof'`, so a script, a Playwright spec or a
8
- // server-side caller could not reach these at all. They had to stand up a
9
- // browser to ask whether Enter sends.
4
+ // No @hanzo/gui, no React, no DOM, no side effects, so these load in Node, in a
5
+ // spec, and in a server component. `@hanzo/ui/chat` cannot: it is TSX behind a
6
+ // client directive.
10
7
  //
11
8
  // import { sends, ready, pinned, SLACK } from '@hanzo/ui/chat/pure'
12
9
  //
13
- // These are not chat rules and the chat-shaped import was hiding that. Of the
14
- // fifteen files in hanzo.app that import `sends`, TEN are not chat: a repo-URL
15
- // field, two project renames, the SQL editor, the file explorer, the SEO tab,
16
- // the workspace menu, the console prompt, an uploader and the command palette.
17
- // "Does this keystroke commit this field" is the same question wherever a field
18
- // takes Enter. `@hanzo/ui/product/pure` re-exports all four for exactly that
19
- // reader — the one who is not writing chat and would never look here.
20
- //
21
- // It is the same mistake `CopyButton` made, recorded in this module's own
22
- // barrel: a general thing reachable only through a chat-shaped door gets
23
- // rewritten by everyone who does not think to open that door. hanzo/chat had
24
- // THREE Enter rules, and two of them (`AnswerComposer`, `SelectionAsk`) tested
25
- // `Enter && !shiftKey` straight off the event — so Enter-to-accept an IME
26
- // candidate submitted a half-typed word for Japanese, Chinese and Korean
27
- // writers. `sends` had the fix from the day it was written and nobody could
28
- // reach it.
10
+ // `@hanzo/ui/product/pure` re-exports all four, because none of them is a chat
11
+ // rule and that is the door a non-chat surface looks behind.
29
12
  Object.defineProperty(exports, "__esModule", { value: true });
30
13
  exports.SLACK = exports.pinned = exports.sends = exports.ready = void 0;
31
- // Enter, and whether a draft may go. The IME guard is the whole point; read
32
- // `sends` before writing another one.
14
+ // Enter, and whether a draft may go. Read `sends` before writing another one:
15
+ // the IME guard is the point.
33
16
  var send_1 = require("./send.cjs");
34
17
  Object.defineProperty(exports, "ready", { enumerable: true, get: function () { return send_1.ready; } });
35
18
  Object.defineProperty(exports, "sends", { enumerable: true, get: function () { return send_1.sends; } });
36
- // Stay-at-the-bottom, as a distance test. The fleet's one answer to "am I at
37
- // the bottom", which had five: 50px twice, 97%-of-height, an
38
- // IntersectionObserver at a 0.85 ratio, and on one thread nothing at all.
19
+ // Stay-at-the-bottom, as a distance test.
39
20
  var stick_1 = require("./stick.cjs");
40
21
  Object.defineProperty(exports, "pinned", { enumerable: true, get: function () { return stick_1.pinned; } });
41
22
  Object.defineProperty(exports, "SLACK", { enumerable: true, get: function () { return stick_1.SLACK; } });
@@ -1 +1 @@
1
- {"version":3,"file":"pure.d.ts","sourceRoot":"","sources":["../../src/chat/pure.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,QAAQ,CAAA;AAKhD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"pure.d.ts","sourceRoot":"","sources":["../../src/chat/pure.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,QAAQ,CAAA;AAGhD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA"}
package/dist/chat/pure.js CHANGED
@@ -1,35 +1,16 @@
1
- // @hanzo/ui/chat/pure — the conversation's decisions, without the conversation.
1
+ // @hanzo/ui/chat/pure — the conversation's decisions, with nothing attached.
2
2
  //
3
- // Every module here is a function over values: no @hanzo/gui, no React, no DOM,
4
- // no side effects. Same shape and same reason as `@hanzo/ui/product/pure`, and
5
- // the reason is measured — `import('@hanzo/ui/chat')` in Node dies on
6
- // `SyntaxError: Unexpected token 'typeof'`, so a script, a Playwright spec or a
7
- // server-side caller could not reach these at all. They had to stand up a
8
- // browser to ask whether Enter sends.
3
+ // No @hanzo/gui, no React, no DOM, no side effects, so these load in Node, in a
4
+ // spec, and in a server component. `@hanzo/ui/chat` cannot: it is TSX behind a
5
+ // client directive.
9
6
  //
10
7
  // import { sends, ready, pinned, SLACK } from '@hanzo/ui/chat/pure'
11
8
  //
12
- // These are not chat rules and the chat-shaped import was hiding that. Of the
13
- // fifteen files in hanzo.app that import `sends`, TEN are not chat: a repo-URL
14
- // field, two project renames, the SQL editor, the file explorer, the SEO tab,
15
- // the workspace menu, the console prompt, an uploader and the command palette.
16
- // "Does this keystroke commit this field" is the same question wherever a field
17
- // takes Enter. `@hanzo/ui/product/pure` re-exports all four for exactly that
18
- // reader — the one who is not writing chat and would never look here.
19
- //
20
- // It is the same mistake `CopyButton` made, recorded in this module's own
21
- // barrel: a general thing reachable only through a chat-shaped door gets
22
- // rewritten by everyone who does not think to open that door. hanzo/chat had
23
- // THREE Enter rules, and two of them (`AnswerComposer`, `SelectionAsk`) tested
24
- // `Enter && !shiftKey` straight off the event — so Enter-to-accept an IME
25
- // candidate submitted a half-typed word for Japanese, Chinese and Korean
26
- // writers. `sends` had the fix from the day it was written and nobody could
27
- // reach it.
28
- // Enter, and whether a draft may go. The IME guard is the whole point; read
29
- // `sends` before writing another one.
9
+ // `@hanzo/ui/product/pure` re-exports all four, because none of them is a chat
10
+ // rule and that is the door a non-chat surface looks behind.
11
+ // Enter, and whether a draft may go. Read `sends` before writing another one:
12
+ // the IME guard is the point.
30
13
  export { ready, sends } from './send.js';
31
- // Stay-at-the-bottom, as a distance test. The fleet's one answer to "am I at
32
- // the bottom", which had five: 50px twice, 97%-of-height, an
33
- // IntersectionObserver at a 0.85 ratio, and on one thread nothing at all.
14
+ // Stay-at-the-bottom, as a distance test.
34
15
  export { pinned, SLACK } from './stick.js';
35
16
  //# sourceMappingURL=pure.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pure.js","sourceRoot":"","sources":["../../src/chat/pure.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,sEAAsE;AACtE,gFAAgF;AAChF,0EAA0E;AAC1E,sCAAsC;AACtC,EAAE;AACF,sEAAsE;AACtE,EAAE;AACF,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,+EAA+E;AAC/E,gFAAgF;AAChF,6EAA6E;AAC7E,sEAAsE;AACtE,EAAE;AACF,0EAA0E;AAC1E,yEAAyE;AACzE,6EAA6E;AAC7E,+EAA+E;AAC/E,0EAA0E;AAC1E,yEAAyE;AACzE,4EAA4E;AAC5E,YAAY;AAEZ,4EAA4E;AAC5E,sCAAsC;AACtC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAa,MAAM,QAAQ,CAAA;AAEhD,6EAA6E;AAC7E,6DAA6D;AAC7D,0EAA0E;AAC1E,OAAO,EAAE,MAAM,EAAE,KAAK,EAAc,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"pure.js","sourceRoot":"","sources":["../../src/chat/pure.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,oBAAoB;AACpB,EAAE;AACF,sEAAsE;AACtE,EAAE;AACF,+EAA+E;AAC/E,6DAA6D;AAE7D,8EAA8E;AAC9E,8BAA8B;AAC9B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAa,MAAM,QAAQ,CAAA;AAEhD,0CAA0C;AAC1C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAc,MAAM,SAAS,CAAA"}
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
- * The two decisions a composer makes, as pure functions.
4
- *
5
- * Every Hanzo chat surface had re-implemented both inline, and they had drifted:
6
- * one sent on a bare Enter while composing an IME candidate (committing a
7
- * half-typed word), another let a whitespace-only draft through. Keeping them
8
- * here means the rules are asserted once, without a DOM.
3
+ * The two decisions a composer makes, as pure functions — asserted once,
4
+ * without a DOM.
9
5
  */
10
6
  Object.defineProperty(exports, "__esModule", { value: true });
11
7
  exports.ready = exports.sends = void 0;
@@ -14,12 +10,9 @@ const IME = 229;
14
10
  /**
15
11
  * Whether the IME owns this keystroke, from all three signals browsers use.
16
12
  *
17
- * `isComposing` alone is not enough. Safari does not set it reliably on the
18
- * keydown that accepts a candidate, and reports the key as `Process` or with
19
- * only the legacy `keyCode` of 229 — so a composer that trusts `isComposing`
20
- * by itself still submits a half-typed word out from under a Japanese, Chinese
21
- * or Korean writer. That is the bug this module exists to end, and it is not
22
- * ended by checking one flag.
13
+ * `isComposing` alone is not enough: Safari does not set it reliably on the
14
+ * keydown that accepts a candidate, reporting `Process` or only the legacy
15
+ * `keyCode` of 229.
23
16
  */
24
17
  const claimed = (key, mods) => mods.isComposing === true || key === 'Process' || mods.keyCode === IME;
25
18
  /**
@@ -28,12 +21,9 @@ const claimed = (key, mods) => mods.isComposing === true || key === 'Process' ||
28
21
  * every surface already taught its users, and it holds even with Shift down.
29
22
  * A keystroke the IME has claimed belongs to the IME, never to the composer.
30
23
  *
31
- * HAND IT `e.nativeEvent`, NEVER `e`. React's synthetic KeyboardEvent does not
32
- * carry `isComposing` or `keyCode`, so passing the synthetic event gets one of
33
- * the three IME signals instead of three, type-checks cleanly, reads correctly
34
- * at the call site, and puts the mid-candidate submit straight back for every
35
- * Japanese, Chinese and Korean writer. That is the entire bug this function
36
- * exists to end, and it is re-introducible in one character.
24
+ * Hand it `e.nativeEvent`, never `e`: React's synthetic event carries neither
25
+ * `isComposing` nor `keyCode`, so `e` type-checks and silently drops two of the
26
+ * three IME signals.
37
27
  *
38
28
  * onKeyDown={(e) => { if (sends(e.key, e.nativeEvent)) { … } }}
39
29
  */
@@ -1,10 +1,6 @@
1
1
  /**
2
- * The two decisions a composer makes, as pure functions.
3
- *
4
- * Every Hanzo chat surface had re-implemented both inline, and they had drifted:
5
- * one sent on a bare Enter while composing an IME candidate (committing a
6
- * half-typed word), another let a whitespace-only draft through. Keeping them
7
- * here means the rules are asserted once, without a DOM.
2
+ * The two decisions a composer makes, as pure functions — asserted once,
3
+ * without a DOM.
8
4
  */
9
5
  /** Modifier state, in the shape web and native events agree on. */
10
6
  export interface Mods {
@@ -23,12 +19,9 @@ export interface Mods {
23
19
  * every surface already taught its users, and it holds even with Shift down.
24
20
  * A keystroke the IME has claimed belongs to the IME, never to the composer.
25
21
  *
26
- * HAND IT `e.nativeEvent`, NEVER `e`. React's synthetic KeyboardEvent does not
27
- * carry `isComposing` or `keyCode`, so passing the synthetic event gets one of
28
- * the three IME signals instead of three, type-checks cleanly, reads correctly
29
- * at the call site, and puts the mid-candidate submit straight back for every
30
- * Japanese, Chinese and Korean writer. That is the entire bug this function
31
- * exists to end, and it is re-introducible in one character.
22
+ * Hand it `e.nativeEvent`, never `e`: React's synthetic event carries neither
23
+ * `isComposing` nor `keyCode`, so `e` type-checks and silently drops two of the
24
+ * three IME signals.
32
25
  *
33
26
  * onKeyDown={(e) => { if (sends(e.key, e.nativeEvent)) { … } }}
34
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../src/chat/send.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,mEAAmE;AACnE,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gFAAgF;IAChF,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAkBD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,KAAK,GAAI,KAAK,MAAM,EAAE,OAAM,IAAS,KAAG,OAIpD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,cAAY,EAAE,kBAAgB,KAAG,OACvB,CAAA"}
1
+ {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../src/chat/send.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mEAAmE;AACnE,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gFAAgF;IAChF,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAeD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,GAAI,KAAK,MAAM,EAAE,OAAM,IAAS,KAAG,OAIpD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,cAAY,EAAE,kBAAgB,KAAG,OACvB,CAAA"}
package/dist/chat/send.js CHANGED
@@ -1,22 +1,15 @@
1
1
  /**
2
- * The two decisions a composer makes, as pure functions.
3
- *
4
- * Every Hanzo chat surface had re-implemented both inline, and they had drifted:
5
- * one sent on a bare Enter while composing an IME candidate (committing a
6
- * half-typed word), another let a whitespace-only draft through. Keeping them
7
- * here means the rules are asserted once, without a DOM.
2
+ * The two decisions a composer makes, as pure functions — asserted once,
3
+ * without a DOM.
8
4
  */
9
5
  /** The keyCode every browser reports for a keystroke an IME has claimed. */
10
6
  const IME = 229;
11
7
  /**
12
8
  * Whether the IME owns this keystroke, from all three signals browsers use.
13
9
  *
14
- * `isComposing` alone is not enough. Safari does not set it reliably on the
15
- * keydown that accepts a candidate, and reports the key as `Process` or with
16
- * only the legacy `keyCode` of 229 — so a composer that trusts `isComposing`
17
- * by itself still submits a half-typed word out from under a Japanese, Chinese
18
- * or Korean writer. That is the bug this module exists to end, and it is not
19
- * ended by checking one flag.
10
+ * `isComposing` alone is not enough: Safari does not set it reliably on the
11
+ * keydown that accepts a candidate, reporting `Process` or only the legacy
12
+ * `keyCode` of 229.
20
13
  */
21
14
  const claimed = (key, mods) => mods.isComposing === true || key === 'Process' || mods.keyCode === IME;
22
15
  /**
@@ -25,12 +18,9 @@ const claimed = (key, mods) => mods.isComposing === true || key === 'Process' ||
25
18
  * every surface already taught its users, and it holds even with Shift down.
26
19
  * A keystroke the IME has claimed belongs to the IME, never to the composer.
27
20
  *
28
- * HAND IT `e.nativeEvent`, NEVER `e`. React's synthetic KeyboardEvent does not
29
- * carry `isComposing` or `keyCode`, so passing the synthetic event gets one of
30
- * the three IME signals instead of three, type-checks cleanly, reads correctly
31
- * at the call site, and puts the mid-candidate submit straight back for every
32
- * Japanese, Chinese and Korean writer. That is the entire bug this function
33
- * exists to end, and it is re-introducible in one character.
21
+ * Hand it `e.nativeEvent`, never `e`: React's synthetic event carries neither
22
+ * `isComposing` nor `keyCode`, so `e` type-checks and silently drops two of the
23
+ * three IME signals.
34
24
  *
35
25
  * onKeyDown={(e) => { if (sends(e.key, e.nativeEvent)) { … } }}
36
26
  */
@@ -1 +1 @@
1
- {"version":3,"file":"send.js","sourceRoot":"","sources":["../../src/chat/send.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAcH,4EAA4E;AAC5E,MAAM,GAAG,GAAG,GAAG,CAAA;AAEf;;;;;;;;;GASG;AACH,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,IAAU,EAAW,EAAE,CACnD,IAAI,CAAC,WAAW,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,KAAK,GAAG,CAAA;AAExE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,OAAa,EAAE,EAAW,EAAE;IAC7D,IAAI,GAAG,KAAK,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC;QAAE,OAAO,KAAK,CAAA;IACvD,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAC/D,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,CAAA;AACvD,CAAC,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,IAAI,GAAG,KAAK,EAAE,QAAQ,GAAG,KAAK,EAAW,EAAE,CAC9E,CAAC,IAAI,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAA"}
1
+ {"version":3,"file":"send.js","sourceRoot":"","sources":["../../src/chat/send.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,4EAA4E;AAC5E,MAAM,GAAG,GAAG,GAAG,CAAA;AAEf;;;;;;GAMG;AACH,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,IAAU,EAAW,EAAE,CACnD,IAAI,CAAC,WAAW,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,KAAK,GAAG,CAAA;AAExE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,OAAa,EAAE,EAAW,EAAE;IAC7D,IAAI,GAAG,KAAK,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC;QAAE,OAAO,KAAK,CAAA;IACvD,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAC/D,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,CAAA;AACvD,CAAC,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,IAAI,GAAG,KAAK,EAAE,QAAQ,GAAG,KAAK,EAAW,EAAE,CAC9E,CAAC,IAAI,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAA"}
@@ -2,10 +2,8 @@
2
2
  /**
3
3
  * Stay-at-the-bottom, as a pure decision.
4
4
  *
5
- * A thread should follow a streaming answer, but it must stop following the
6
- * moment the reader scrolls up to re-read something — otherwise every new token
7
- * yanks them back down. The rule is a distance test against the bottom, and it
8
- * is the piece each surface had written slightly differently.
5
+ * A thread follows a streaming answer and stops the moment the reader scrolls
6
+ * up, or every new token yanks them back down. A distance test against the end.
9
7
  */
10
8
  Object.defineProperty(exports, "__esModule", { value: true });
11
9
  exports.pinned = exports.SLACK = void 0;
@@ -1,10 +1,8 @@
1
1
  /**
2
2
  * Stay-at-the-bottom, as a pure decision.
3
3
  *
4
- * A thread should follow a streaming answer, but it must stop following the
5
- * moment the reader scrolls up to re-read something — otherwise every new token
6
- * yanks them back down. The rule is a distance test against the bottom, and it
7
- * is the piece each surface had written slightly differently.
4
+ * A thread follows a streaming answer and stops the moment the reader scrolls
5
+ * up, or every new token yanks them back down. A distance test against the end.
8
6
  */
9
7
  /** How far from the bottom still counts as "at the bottom", in px. */
10
8
  export declare const SLACK = 48;
@@ -1 +1 @@
1
- {"version":3,"file":"stick.d.ts","sourceRoot":"","sources":["../../src/chat/stick.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,sEAAsE;AACtE,eAAO,MAAM,KAAK,KAAK,CAAA;AAEvB,MAAM,WAAW,KAAK;IACpB,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,+BAA+B,KAAK,EAAE,cAAa,KAAG,OACvC,CAAA"}
1
+ {"version":3,"file":"stick.d.ts","sourceRoot":"","sources":["../../src/chat/stick.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,sEAAsE;AACtE,eAAO,MAAM,KAAK,KAAK,CAAA;AAEvB,MAAM,WAAW,KAAK;IACpB,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,+BAA+B,KAAK,EAAE,cAAa,KAAG,OACvC,CAAA"}
@@ -1,10 +1,8 @@
1
1
  /**
2
2
  * Stay-at-the-bottom, as a pure decision.
3
3
  *
4
- * A thread should follow a streaming answer, but it must stop following the
5
- * moment the reader scrolls up to re-read something — otherwise every new token
6
- * yanks them back down. The rule is a distance test against the bottom, and it
7
- * is the piece each surface had written slightly differently.
4
+ * A thread follows a streaming answer and stops the moment the reader scrolls
5
+ * up, or every new token yanks them back down. A distance test against the end.
8
6
  */
9
7
  /** How far from the bottom still counts as "at the bottom", in px. */
10
8
  export const SLACK = 48;
@@ -1 +1 @@
1
- {"version":3,"file":"stick.js","sourceRoot":"","sources":["../../src/chat/stick.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,sEAAsE;AACtE,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,CAAA;AAWvB;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAS,EAAE,KAAK,GAAG,KAAK,EAAW,EAAE,CACrF,OAAO,GAAG,QAAQ,GAAG,MAAM,IAAI,KAAK,CAAA"}
1
+ {"version":3,"file":"stick.js","sourceRoot":"","sources":["../../src/chat/stick.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,sEAAsE;AACtE,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,CAAA;AAWvB;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAS,EAAE,KAAK,GAAG,KAAK,EAAW,EAAE,CACrF,OAAO,GAAG,QAAQ,GAAG,MAAM,IAAI,KAAK,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../src/gallery.tsx"],"names":[],"mappings":"AAiHA;;;GAGG;AACH,eAAO,MAAM,OAAO,+CA2gBnB,CAAA;AAED,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../src/gallery.tsx"],"names":[],"mappings":"AAiHA;;;GAGG;AACH,eAAO,MAAM,OAAO,+CA6fnB,CAAA;AAED,eAAe,OAAO,CAAA"}