@react-x11/components 0.10.0 → 0.12.0

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 (155) hide show
  1. package/dist/code/index.d.ts.map +1 -1
  2. package/dist/code/index.js +25 -24
  3. package/dist/code/index.js.map +1 -1
  4. package/dist/code-language/index.d.ts +1 -1
  5. package/dist/code-language/index.d.ts.map +1 -1
  6. package/dist/code-language/index.js +1 -1
  7. package/dist/code-language/index.js.map +1 -1
  8. package/dist/code-language/runs.d.ts +31 -0
  9. package/dist/code-language/runs.d.ts.map +1 -1
  10. package/dist/code-language/runs.js +105 -0
  11. package/dist/code-language/runs.js.map +1 -1
  12. package/dist/codeblock/index.d.ts +13 -0
  13. package/dist/codeblock/index.d.ts.map +1 -1
  14. package/dist/codeblock/index.js +37 -1
  15. package/dist/codeblock/index.js.map +1 -1
  16. package/dist/flow/node.d.ts +14 -6
  17. package/dist/flow/node.d.ts.map +1 -1
  18. package/dist/flow/node.js +82 -64
  19. package/dist/flow/node.js.map +1 -1
  20. package/dist/html/controls.d.ts +26 -7
  21. package/dist/html/controls.d.ts.map +1 -1
  22. package/dist/html/controls.js +28 -3
  23. package/dist/html/controls.js.map +1 -1
  24. package/dist/html/css/cascade.d.ts +32 -10
  25. package/dist/html/css/cascade.d.ts.map +1 -1
  26. package/dist/html/css/cascade.js +89 -31
  27. package/dist/html/css/cascade.js.map +1 -1
  28. package/dist/html/css/color.d.ts +19 -0
  29. package/dist/html/css/color.d.ts.map +1 -1
  30. package/dist/html/css/color.js +86 -0
  31. package/dist/html/css/color.js.map +1 -1
  32. package/dist/html/css/parse.d.ts +11 -0
  33. package/dist/html/css/parse.d.ts.map +1 -1
  34. package/dist/html/css/parse.js +114 -4
  35. package/dist/html/css/parse.js.map +1 -1
  36. package/dist/html/css/style.d.ts +45 -5
  37. package/dist/html/css/style.d.ts.map +1 -1
  38. package/dist/html/css/style.js +363 -14
  39. package/dist/html/css/style.js.map +1 -1
  40. package/dist/html/css/ua.js +22 -5
  41. package/dist/html/css/ua.js.map +1 -1
  42. package/dist/html/css/values.d.ts +10 -1
  43. package/dist/html/css/values.d.ts.map +1 -1
  44. package/dist/html/css/values.js +27 -2
  45. package/dist/html/css/values.js.map +1 -1
  46. package/dist/html/css/vars.d.ts +5 -0
  47. package/dist/html/css/vars.d.ts.map +1 -1
  48. package/dist/html/css/vars.js +2 -2
  49. package/dist/html/css/vars.js.map +1 -1
  50. package/dist/html/dom.d.ts.map +1 -1
  51. package/dist/html/dom.js +35 -2
  52. package/dist/html/dom.js.map +1 -1
  53. package/dist/html/index.d.ts.map +1 -1
  54. package/dist/html/index.js +38 -1
  55. package/dist/html/index.js.map +1 -1
  56. package/dist/html/layout/block.d.ts +11 -2
  57. package/dist/html/layout/block.d.ts.map +1 -1
  58. package/dist/html/layout/block.js +306 -25
  59. package/dist/html/layout/block.js.map +1 -1
  60. package/dist/html/layout/boxes.d.ts +61 -6
  61. package/dist/html/layout/boxes.d.ts.map +1 -1
  62. package/dist/html/layout/boxes.js +65 -16
  63. package/dist/html/layout/boxes.js.map +1 -1
  64. package/dist/html/layout/cache.d.ts +2 -2
  65. package/dist/html/layout/cache.d.ts.map +1 -1
  66. package/dist/html/layout/cache.js +8 -3
  67. package/dist/html/layout/cache.js.map +1 -1
  68. package/dist/html/layout/floats.d.ts +4 -0
  69. package/dist/html/layout/floats.d.ts.map +1 -1
  70. package/dist/html/layout/floats.js +26 -0
  71. package/dist/html/layout/floats.js.map +1 -1
  72. package/dist/html/layout/inline.d.ts +29 -2
  73. package/dist/html/layout/inline.d.ts.map +1 -1
  74. package/dist/html/layout/inline.js +1454 -125
  75. package/dist/html/layout/inline.js.map +1 -1
  76. package/dist/html/node.d.ts +33 -0
  77. package/dist/html/node.d.ts.map +1 -1
  78. package/dist/html/node.js +608 -86
  79. package/dist/html/node.js.map +1 -1
  80. package/dist/html/paint.d.ts +53 -1
  81. package/dist/html/paint.d.ts.map +1 -1
  82. package/dist/html/paint.js +746 -214
  83. package/dist/html/paint.js.map +1 -1
  84. package/dist/html/surfaces.d.ts +7 -2
  85. package/dist/html/surfaces.d.ts.map +1 -1
  86. package/dist/html/surfaces.js +16 -0
  87. package/dist/html/surfaces.js.map +1 -1
  88. package/dist/html/svg.d.ts.map +1 -1
  89. package/dist/html/svg.js +27 -20
  90. package/dist/html/svg.js.map +1 -1
  91. package/dist/internal/codelines.d.ts +42 -0
  92. package/dist/internal/codelines.d.ts.map +1 -0
  93. package/dist/internal/codelines.js +170 -0
  94. package/dist/internal/codelines.js.map +1 -0
  95. package/dist/internal/window.d.ts +22 -0
  96. package/dist/internal/window.d.ts.map +1 -1
  97. package/dist/internal/window.js +35 -8
  98. package/dist/internal/window.js.map +1 -1
  99. package/dist/markdown/index.d.ts.map +1 -1
  100. package/dist/markdown/index.js +98 -26
  101. package/dist/markdown/index.js.map +1 -1
  102. package/dist/rich-text-editor/index.d.ts.map +1 -1
  103. package/dist/rich-text-editor/index.js +3 -8
  104. package/dist/rich-text-editor/index.js.map +1 -1
  105. package/dist/rich-text-editor/markdown.d.ts.map +1 -1
  106. package/dist/rich-text-editor/markdown.js +30 -1
  107. package/dist/rich-text-editor/markdown.js.map +1 -1
  108. package/dist/rich-text-editor/replace.d.ts +13 -0
  109. package/dist/rich-text-editor/replace.d.ts.map +1 -0
  110. package/dist/rich-text-editor/replace.js +64 -0
  111. package/dist/rich-text-editor/replace.js.map +1 -0
  112. package/dist/richtext/node.d.ts +7 -0
  113. package/dist/richtext/node.d.ts.map +1 -1
  114. package/dist/richtext/node.js.map +1 -1
  115. package/dist/terminal-output/index.d.ts.map +1 -1
  116. package/dist/terminal-output/index.js +100 -25
  117. package/dist/terminal-output/index.js.map +1 -1
  118. package/dist/terminal-output/runs.d.ts +4 -1
  119. package/dist/terminal-output/runs.d.ts.map +1 -1
  120. package/dist/terminal-output/runs.js +5 -1
  121. package/dist/terminal-output/runs.js.map +1 -1
  122. package/package.json +5 -3
  123. package/src/code/index.ts +34 -32
  124. package/src/code-language/index.ts +1 -1
  125. package/src/code-language/runs.ts +111 -1
  126. package/src/codeblock/index.ts +48 -1
  127. package/src/flow/node.ts +80 -64
  128. package/src/html/controls.ts +50 -9
  129. package/src/html/css/cascade.ts +134 -43
  130. package/src/html/css/color.ts +87 -0
  131. package/src/html/css/parse.ts +107 -4
  132. package/src/html/css/style.ts +386 -23
  133. package/src/html/css/ua.ts +22 -5
  134. package/src/html/css/values.ts +31 -3
  135. package/src/html/css/vars.ts +2 -2
  136. package/src/html/dom.ts +38 -2
  137. package/src/html/index.ts +39 -1
  138. package/src/html/layout/block.ts +360 -22
  139. package/src/html/layout/boxes.ts +98 -23
  140. package/src/html/layout/cache.ts +8 -3
  141. package/src/html/layout/floats.ts +24 -0
  142. package/src/html/layout/inline.ts +1690 -119
  143. package/src/html/node.ts +648 -101
  144. package/src/html/paint.ts +883 -283
  145. package/src/html/surfaces.ts +21 -1
  146. package/src/html/svg.ts +30 -19
  147. package/src/internal/codelines.ts +200 -0
  148. package/src/internal/window.ts +36 -8
  149. package/src/markdown/index.ts +145 -26
  150. package/src/rich-text-editor/index.ts +3 -11
  151. package/src/rich-text-editor/markdown.ts +36 -1
  152. package/src/rich-text-editor/replace.ts +85 -0
  153. package/src/richtext/node.ts +7 -0
  154. package/src/terminal-output/index.ts +127 -34
  155. package/src/terminal-output/runs.ts +16 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/html/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,2DAA2D;AAC3D,EAAE;AACF,8EAA8E;AAC9E,2EAA2E;AAC3E,2EAA2E;AAC3E,4EAA4E;AAC5E,8BAA8B;AAC9B,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,yEAAyE;AACzE,4EAA4E;AAC5E,qDAAqD;AACrD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,MAAM,EACN,QAAQ,EACR,KAAK,EACL,UAAU,EACV,MA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,OAAO;gBACf,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO;gBACpD,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,IAAI,EAC3B,CAAC;gBACD,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;YAC/B,CAAC;YACD,IAAI,CAAC,KAAK,CAAC,CAAC;QACd,CAAC;IACH,CAAC,CAAC;IACF,IAAI,CAAC,IAAI,CAAC,CAAC;AACb,CAAC;AAED,SAAS,iBAAiB,CAAC,EAAW,EAAE,KAAa;IACnD,MAAM,IAAI,GAAG,CAAC,IAAa,EAAQ,EAAE;QACnC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClC,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK;gBAAE,SAAS;YACnC,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,QAAQ,EAAE,CAAC;gBAC1C,IAAI,KAAK,GAAG,EAAE,CAAC;gBACf,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;oBACjC,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM;wBAAE,KAAK,IAAI,GAAG,CAAC,IAAI,CAAC;gBAC7C,CAAC;gBACD,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;gBAChD,IAAI,GAAG,KAAK,KAAK;oBAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC;;oBAC1C,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;YACrC,CAAC;YACD,IAAI,CAAC,KAAK,CAAC,CAAC;QACd,CAAC;IACH,CAAC,CAAC;IACF,IAAI,CAAC,EAAE,CAAC,CAAC;AACX,CAAC"}
@@ -272,10 +272,19 @@ export declare function resolveEdges(box: Box, containingWidth: number): void;
272
272
  export declare function establishesBFC(box: Box): boolean;
273
273
  /** What a box's `position: relative` offset moves it by, applied after
274
274
  * layout so it does not affect anything else's position — which is the
275
- * whole of what makes it *relative* — and its translation with it. */
276
- export declare function applyRelativeOffsets(box: Box): void;
275
+ * whole of what makes it *relative* — and its translation with it, and
276
+ * where `position: sticky` puts one at rest (`stickyOffset`). */
277
+ export declare function applyRelativeOffsets(box: Box, viewportWidth: number, viewportHeight: number): void;
277
278
  /** Whether a box is transformed, which is what makes it a containing
278
279
  * block and a layer as a positioned box is (CSS Transforms 1, 2). */
279
280
  export declare function transformed(style: ComputedStyle): boolean;
281
+ /**
282
+ * Move a laid-out box, and everything in it, by how far its translation
283
+ * changed when its style went from `was` to the one it has — what
284
+ * `applyRelativeOffsets` moves it by now, less what it moved it by then.
285
+ * For a style changed in place, where nothing else moves (a `transform` is
286
+ * what makes that true). Not for an inline box, whose text is what moves.
287
+ */
288
+ export declare function retranslate(box: Box, was: ComputedStyle): void;
280
289
  export {};
281
290
  //# sourceMappingURL=block.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../src/html/layout/block.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAEV,aAAa,EACb,WAAW,EAEZ,MAAM,iBAAiB,CAAC;AAUzB,OAAO,EAEL,GAAG,EAUJ,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EAKhB,MAAM,YAAY,CAAC;AAUpB,OAAO,KAAK,EAAE,SAAS,EAA+B,MAAM,aAAa,CAAC;AAO1E,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,oEAAoE;IACpE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oEAAoE;IACpE,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC;uCACmC;IACnC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;gCAC4B;IAC5B,QAAQ,CAAC,EAA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OAAO,CAazD;AAED,uEAAuE;AACvE,wBAAgB,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAO3D;AAED;4EAC4E;AAC5E,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAGtD;AA6BD;;iEAEiE;AACjE,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI,CAiDpE;AAyCD;+DAC+D;AAC/D,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CA8BhD;AAED;;;kEAGkE;AAClE,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,GACrB,IAAI,CA2BN;AAED;sEACsE;AACtE,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAEzD;AAeD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CAM9D"}
@@ -13,13 +13,13 @@
13
13
  import { AUTO, gapOf, isPct, isTransparent, resolve, resolveOrNull, } from '../css/values.js';
14
14
  import { CONTAIN_INLINE_SIZE, CONTAIN_LAYOUT, CONTAIN_PAINT, CONTAIN_SIZE, scrolls, } from '../css/style.js';
15
15
  import { lineOf, spanToName } from './grid-lines.js';
16
- import { BOX_RAISES, Box, CLAMPED, CUT_BLOCKS, GRID_TRACKS, FIRST_LINE, INLINE_OFFSETS, LINE_BOX_RAISES, SHIFTED_LINES, TEXT_SHIFTS, isBlank, } from './boxes.js';
16
+ import { BOX_RAISES, Box, CLAMPED, CUT_BLOCKS, GRID_TRACKS, FIRST_LINE, INLINE_OFFSETS, MOVED_OFF_LINES, LINE_BOX_RAISES, SHIFTED_LINES, TEXT_SHIFTS, isBlank, } from './boxes.js';
17
17
  import { FloatContext } from './floats.js';
18
- import { faceExtentOf, layoutInline, lineHeightMultiplier, spaceBreaksOnly, strutOf, widestWord, } from './inline.js';
18
+ import { faceExtentOf, joinsBefore, layoutInline, lineHeightMultiplier, spaceBreaksOnly, strutOf, widestWord, } from './inline.js';
19
19
  import { layoutFlex } from './flex.js';
20
20
  import { finishCaptions, layoutTable } from './table.js';
21
21
  import { collapseEdges } from './collapse.js';
22
- import { computePaintBounds, hoistNegative, stackLayers } from '../paint.js';
22
+ import { clipsFor, computePaintBounds, FIXED_BOXES, fixedToViewport, hoistNegative, OUT_OF_FLOW_REACH, stackLayers, } from '../paint.js';
23
23
  /** Lay the whole document out at a width. */
24
24
  export function layoutDocument(tree, fonts, viewportWidth, viewportHeight) {
25
25
  const ctx = {
@@ -47,7 +47,9 @@ export function layoutDocument(tree, fonts, viewportWidth, viewportHeight) {
47
47
  // there — or `<p>hi</p>` would stand 8px lower than the same paragraph in
48
48
  // `<body>`.
49
49
  resolveEdges(root, viewportWidth);
50
+ const body = fragmentBodyHeight(tree, viewportHeight);
50
51
  const leading = root.marginTop;
52
+ const trailing = root.marginBottom;
51
53
  root.padRight += root.marginRight;
52
54
  root.padBottom += root.marginBottom;
53
55
  root.padLeft += root.marginLeft;
@@ -55,13 +57,15 @@ export function layoutDocument(tree, fonts, viewportWidth, viewportHeight) {
55
57
  root.marginRight = 0;
56
58
  root.marginBottom = 0;
57
59
  root.marginLeft = 0;
60
+ if (body)
61
+ handPercentBase(root, body.inner);
58
62
  const contentWidth = Math.max(0, viewportWidth - root.horizontalExtra);
59
63
  const floats = new FloatContext(root.contentX, root.contentX + contentWidth);
60
64
  // the initial containing block is the viewport's size, which a percentage
61
65
  // height on the root element resolves against (CSS 2.1 10.1, 10.5); a
62
66
  // fragment has no root element, and the box standing in for its body has
63
67
  // the body's `auto` height to give
64
- let readsViewportHeight = false;
68
+ let readsViewportHeight = body?.viewport === true;
65
69
  for (const child of root.children) {
66
70
  if (child.el?.name !== 'html')
67
71
  continue;
@@ -75,7 +79,9 @@ export function layoutDocument(tree, fonts, viewportWidth, viewportHeight) {
75
79
  }
76
80
  const flow = layoutChildren(root, ctx, floats, root.contentY, contentWidth, leading);
77
81
  const floatBottom = floats.bottom === -Infinity ? 0 : floats.bottom - root.contentY;
78
- root.height = Math.max(flow.height, floatBottom) + root.verticalExtra;
82
+ root.height = body
83
+ ? leading + body.outer + trailing
84
+ : Math.max(flow.height, floatBottom) + root.verticalExtra;
79
85
  // Positioned boxes last, and in the order they were found, so a later one
80
86
  // can be positioned against an earlier one's resolved rectangle.
81
87
  for (let i = 0; i < ctx.positioned.length; i += 1) {
@@ -87,25 +93,76 @@ export function layoutDocument(tree, fonts, viewportWidth, viewportHeight) {
87
93
  // and the ink bounds are computed after that, so culling sees where boxes
88
94
  // ended up rather than where they were laid out.
89
95
  if (tree.relative)
90
- applyRelativeOffsets(root);
96
+ applyRelativeOffsets(root, viewportWidth, viewportHeight);
91
97
  const reach = computePaintBounds(root, tree.movedInline);
92
98
  if (tree.negative)
93
99
  hoistNegative(root);
94
100
  stackLayers(root);
95
101
  // The document is as tall as what overflows the root, not the root: an
96
102
  // `html, body { height: 100% }` a window tall holds a message longer than
97
- // the window, and the element sizes to all of it.
103
+ // the window, and the element sizes to all of it. Not what a box that
104
+ // clips its overflow holds: that is its own to scroll, and the root's
105
+ // scrollable overflow takes in a positioned box only where no box on the
106
+ // way to it clips it (CSS Overflow 3, 2.2): an absolute box 900px down
107
+ // an `overflow: hidden` card made a page a browser shows 400px tall run
108
+ // on to 980, blank
98
109
  let bottom = Math.max(root.height, reach);
110
+ let fixed = null;
99
111
  for (const { box } of ctx.positioned) {
100
- if (box.style.position !== 'fixed')
101
- bottom = Math.max(bottom, box.y + box.height);
102
- }
112
+ if (box.style.position === 'fixed') {
113
+ if (fixedToViewport(box))
114
+ (fixed ??= []).push(box);
115
+ continue;
116
+ }
117
+ if (clipsFor(box, root).length)
118
+ continue;
119
+ // and what it holds, where it does not clip it: a page set in an
120
+ // absolute wrapper 497px tall runs on below it, and the document with
121
+ // it — design 094 was a window tall and no taller, its text past the
122
+ // end of the scroll
123
+ bottom = Math.max(bottom, OUT_OF_FLOW_REACH.get(box) ?? box.y + box.height);
124
+ }
125
+ if (fixed)
126
+ FIXED_BOXES.set(tree, fixed);
127
+ else
128
+ FIXED_BOXES.delete(tree);
103
129
  return {
104
130
  width: viewportWidth,
105
131
  height: bottom,
106
132
  readsViewportHeight: readsViewportHeight || ctx.readViewportHeight === true,
107
133
  };
108
134
  }
135
+ /**
136
+ * How tall the body a fragment's root box stands in for says it is, where
137
+ * that is definite (CSS 2.1 10.5): a length, `100vh` among them, or a
138
+ * percentage of the `<html>` implied around it where that has a height of
139
+ * its own — a length, or a percentage of the viewport, as `html, body {
140
+ * height: 100% }` fills a window. Its border box, and its content box,
141
+ * which what it holds takes its percentages of; `viewport` where the
142
+ * answer read the viewport's height. Null where the document has an
143
+ * `<html>` or a `<body>`, and where the body's height is `auto`, and the
144
+ * box is as tall as what is in it. Measured before its margins are folded
145
+ * into its padding.
146
+ */
147
+ function fragmentBodyHeight(tree, viewportHeight) {
148
+ const html = tree.impliedHtml;
149
+ if (!html)
150
+ return null;
151
+ const root = tree.root;
152
+ const style = root.style;
153
+ const base = resolveOrNull(html.height, viewportHeight);
154
+ const set = resolveOrNull(style.height, base ?? NaN);
155
+ if (set === null)
156
+ return null;
157
+ root.percentHeightBase = base ?? NaN;
158
+ const extra = root.verticalExtra;
159
+ const outer = clampHeight(root, style.boxSizing === 'border-box' ? Math.max(set, extra) : set + extra);
160
+ return {
161
+ outer,
162
+ inner: Math.max(0, outer - extra),
163
+ viewport: isPct(style.height) && isPct(html.height),
164
+ };
165
+ }
109
166
  /** No margin at all, shared: most joins leave a strut as it was. */
110
167
  const NO_MARGIN = Object.freeze({ pos: 0, neg: 0 });
111
168
  /** One margin, as a strut to collapse others with. */
@@ -533,6 +590,12 @@ function layoutChildren(box, ctx, floats, contentTop, contentWidth, leading = 0)
533
590
  // this box's first formatted line is its first child's in flow (CSS 2.1
534
591
  // 5.12.1), which its `::first-line` is handed to
535
592
  let firstLine = ctx.firstLine ? firstLineOf(box) : null;
593
+ // and the room a list item's marker takes on it (`MARKER_ROOM`): an
594
+ // inside marker's is handed down to the line it is on, and an outside
595
+ // one's is room above the baseline of the first child that has a line,
596
+ // which goes lower where the marker reaches higher (`MARKER_ASCENT`)
597
+ let pushed = MARKER_ASCENT.get(box) ?? null;
598
+ let marked = pushed === null ? (MARKER_ROOM.get(box) ?? null) : null;
536
599
  const clamp = ctx.clamp ?? null;
537
600
  for (const child of box.children) {
538
601
  if (child.kind === 'text' && isBlank(child.text))
@@ -552,6 +615,10 @@ function layoutChildren(box, ctx, floats, contentTop, contentWidth, leading = 0)
552
615
  HANDED.set(child, firstLine);
553
616
  firstLine = null;
554
617
  }
618
+ if (marked && !child.outOfFlow && !child.isFloat) {
619
+ MARKER_ROOM.set(child, marked);
620
+ marked = null;
621
+ }
555
622
  if (child.outOfFlow) {
556
623
  placeStatic(child, box, contentLeft, contentWidth, y + marginOf(pendingMargin));
557
624
  ctx.positioned.push({
@@ -609,6 +676,7 @@ function layoutChildren(box, ctx, floats, contentTop, contentWidth, leading = 0)
609
676
  childY = clearance;
610
677
  }
611
678
  const counted = clamp?.fit?.lines ?? 0;
679
+ const floatMark = floats.count;
612
680
  if (!floats.isEmpty &&
613
681
  (child.kind === 'replaced' || establishesBFC(child))) {
614
682
  layoutBesideFloats(child, ctx, floats, contentLeft, childY, contentWidth);
@@ -616,6 +684,17 @@ function layoutChildren(box, ctx, floats, contentTop, contentWidth, leading = 0)
616
684
  else {
617
685
  layoutBlockLevel(child, ctx, floats, contentLeft, childY, contentWidth);
618
686
  }
687
+ if (pushed !== null) {
688
+ const line = firstLineIn(child);
689
+ if (line) {
690
+ const push = pushed - (line.y + line.baseline - child.y);
691
+ if (push > 0) {
692
+ translate(child, 0, push);
693
+ floats.moveSince(floatMark, push);
694
+ }
695
+ pushed = null;
696
+ }
697
+ }
619
698
  // a block with none of the flow's lines in it — an image, a box of a
620
699
  // formatting context of its own — puts the clamp point of an `auto`
621
700
  // clamp before it where it ends below the room
@@ -663,11 +742,14 @@ function layoutChildren(box, ctx, floats, contentTop, contentWidth, leading = 0)
663
742
  // escapes, and the caller merges it into the box's own bottom margin so
664
743
  // the next sibling still sees it. Dropping it here was the bug that made
665
744
  // `<div><p>…</p></div><p>…</p>` set the two paragraphs solid.
745
+ // A percentage of a height that depends on content computes to `auto`
746
+ // (CSS 2.1 10.5), and lets it through as `auto` does: a `height: 100%`
747
+ // wrapper in an `auto` body kept its last child's margin inside it
666
748
  if (!first &&
667
749
  !cleared &&
668
750
  !box.borderBottom &&
669
751
  !box.padBottom &&
670
- box.style.height === AUTO &&
752
+ specifiedHeight(box) === null &&
671
753
  !establishesBFC(box)) {
672
754
  const height = y - contentTop;
673
755
  // A minimum height that makes the box taller parts the margin from its
@@ -746,11 +828,21 @@ function layoutBesideFloats(box, ctx, floats, contentLeft, y, contentWidth) {
746
828
  band = over;
747
829
  continue;
748
830
  }
831
+ // Where no float narrows the room on either side, the box is where
832
+ // it would be were there none, and one too wide for its containing
833
+ // block overflows it here: below the floats it would be the same box
834
+ // in the same room. Blink tests a fit only against a side a float is
835
+ // on (`can_expand_outside_opportunity`, BlockLayoutAlgorithm::
836
+ // LayoutNewFormattingContext). Design 209's 247px heading, which
837
+ // clips its overflow, in a 240px column beside a float that ends
838
+ // left of the column, went under the float, 555px down.
839
+ if (lo === -Infinity && hi === Infinity)
840
+ fits = true;
749
841
  // What is too wide overflows at the end of the line, as far as a
750
842
  // negative margin there takes it, but no further into a float or
751
843
  // past the room; at the start it would run into the floats, and
752
844
  // waits below them (the suite's floats-wrap-bfc-with-margin tests)
753
- if (inRoom) {
845
+ else if (inRoom) {
754
846
  fits = box.marginLeft + box.width + box.marginRight <= room + 0.5;
755
847
  }
756
848
  else if (rtl) {
@@ -812,6 +904,7 @@ function layoutInlineContent(box, ctx, floats, contentTop, contentWidth, content
812
904
  floats,
813
905
  originX: contentLeft,
814
906
  clipText: ctx.clipText,
907
+ firstStrut: MARKER_ROOM.get(box),
815
908
  floatBoxes: floated
816
909
  ? {
817
910
  size: (child) => sizeFloat(child, ctx, contentWidth),
@@ -997,7 +1090,8 @@ function makesNothing(box) {
997
1090
  return true;
998
1091
  }
999
1092
  /** Whether a `::first-line` style sets its line's text otherwise than its
1000
- * block's: in another face, size or line height, or spaced apart. */
1093
+ * block's: in another face, size or line height, spaced apart, or in
1094
+ * capitals. */
1001
1095
  function setsFonts(line, block) {
1002
1096
  return (line.fontFamily !== block.fontFamily ||
1003
1097
  line.fontSize !== block.fontSize ||
@@ -1011,7 +1105,8 @@ function setsFonts(line, block) {
1011
1105
  line.fontVariantLigatures !== block.fontVariantLigatures ||
1012
1106
  line.fontVariantPosition !== block.fontVariantPosition ||
1013
1107
  line.fontKerning !== block.fontKerning ||
1014
- line.fontFeatureSettings !== block.fontFeatureSettings);
1108
+ line.fontFeatureSettings !== block.fontFeatureSettings ||
1109
+ line.textTransform !== block.textTransform);
1015
1110
  }
1016
1111
  /** `::first-line` styles handed down to the first child in flow of a box
1017
1112
  * that has one, whose first line is the box's (`layoutChildren`). */
@@ -1342,13 +1437,32 @@ function layoutBox(box, ctx, borderBoxWidth, x, y, outerFloats) {
1342
1437
  // the line a pass before gave a marker, which this one may not
1343
1438
  if (box.marker)
1344
1439
  box.lines = null;
1440
+ if (box.marker && ctx.fonts) {
1441
+ const room = markerRoom(box, box.marker, ctx.fonts);
1442
+ if (room)
1443
+ MARKER_ROOM.set(box, room);
1444
+ else
1445
+ MARKER_ROOM.delete(box);
1446
+ if (box.style.listStylePosition === 'inside')
1447
+ MARKER_ASCENT.delete(box);
1448
+ else
1449
+ MARKER_ASCENT.set(box, markerAscent(box, box.marker, ctx.fonts));
1450
+ }
1345
1451
  const flow = layoutChildren(box, ctx, floats, box.contentY, contentWidth);
1346
1452
  // A list item with a marker and no line holds one, the marker's, a line
1347
1453
  // of its own face tall: an empty `<li>` is a line tall in a browser, and
1348
1454
  // an inline-block around one sits on its marker's baseline.
1349
1455
  let height = flow.height;
1350
1456
  if (box.marker && ctx.fonts && !firstLineIn(box)) {
1351
- const strut = strutOf(ctx.fonts, box.style);
1457
+ const own = strutOf(ctx.fonts, box.style);
1458
+ // as tall as the marker on it, as a first line with text is
1459
+ const room = MARKER_ROOM.get(box);
1460
+ const strut = room
1461
+ ? {
1462
+ ascent: Math.max(own.ascent, room.ascent),
1463
+ descent: Math.max(own.descent, room.descent),
1464
+ }
1465
+ : own;
1352
1466
  const line = strut.ascent + strut.descent;
1353
1467
  box.lines = [
1354
1468
  {
@@ -1390,6 +1504,47 @@ function layoutBox(box, ctx, borderBoxWidth, x, y, outerFloats) {
1390
1504
  if (box.marker)
1391
1505
  layoutMarker(box, box.marker, ctx);
1392
1506
  }
1507
+ /**
1508
+ * The room a list item's marker takes about its first line's baseline,
1509
+ * handed to the box that line is in: an image's height above it, its
1510
+ * bottom on the baseline as an inline image's is, and a marker in a face
1511
+ * of its own — a `::marker` rule's — its face at its line height. CSS 2.1
1512
+ * (12.5.1) leaves where an outside marker goes to the user agent; Blink
1513
+ * and Gecko both set it on the item's first line and make the line as tall
1514
+ * as it, and design 032's bullets, images taller than its 10px text, set
1515
+ * every item's first line lower than ours did.
1516
+ */
1517
+ const MARKER_ROOM = new WeakMap();
1518
+ function markerRoom(box, marker, fonts) {
1519
+ if (marker.image) {
1520
+ return marker.image.height > 0
1521
+ ? { ascent: marker.image.height, descent: 0 }
1522
+ : null;
1523
+ }
1524
+ return marker.style && marker.style !== box.style
1525
+ ? strutOf(fonts, marker.style)
1526
+ : null;
1527
+ }
1528
+ /**
1529
+ * How far an outside marker reaches above the baseline it sits on. The
1530
+ * marker is a line of its own face, the item's or a `::marker` rule's, so a
1531
+ * bullet or a number reaches its face's ascent on that line, and an image,
1532
+ * set on the line bottom on the baseline, the higher of that and its own
1533
+ * height. Where the item's first line is in a block inside it — a link set
1534
+ * `display: block`, a paragraph — and the block's first baseline is nearer
1535
+ * its top than that, the block goes lower by the difference, and its line
1536
+ * stays the height it was: CSS 2.1 (12.5.1) leaves this to the user agent,
1537
+ * and Blink aligns the marker's baseline with the block's and pushes the
1538
+ * block down (`UnpositionedListMarker::AddToBox`). Its first line grew
1539
+ * instead, and design 196's links, under 18px bullets, were 21px tall where
1540
+ * Chrome has them 14px, 7px lower. On the item's own line the two come to
1541
+ * the same: the line grows by what the push would have moved it.
1542
+ */
1543
+ const MARKER_ASCENT = new WeakMap();
1544
+ function markerAscent(box, marker, fonts) {
1545
+ const ascent = strutOf(fonts, marker.style ?? box.style).ascent;
1546
+ return marker.image ? Math.max(marker.image.height, ascent) : ascent;
1547
+ }
1393
1548
  /** The first line box anywhere under a box, in layout order. */
1394
1549
  function firstLineIn(box) {
1395
1550
  if (box.lines?.length)
@@ -2273,11 +2428,20 @@ function wordBound(box, fonts, measured) {
2273
2428
  for (const line of box.lines) {
2274
2429
  if (unbroken)
2275
2430
  widest = Math.max(widest, line.width);
2431
+ // a word across inline boxes' edges is in two fragments of text, and
2432
+ // as wide as its parts in both and the edges between: bound by the
2433
+ // widest word of each, a float in a narrow room took a letter of a
2434
+ // word of letters in bordered spans for its least width, and was cut
2435
+ // to the room (`joinsBefore`)
2436
+ let chain = 0;
2276
2437
  for (const text of line.texts) {
2277
- if (text.layout === last)
2438
+ const joins = joinsBefore(text);
2439
+ if (joins === undefined && text.layout === last)
2278
2440
  continue;
2279
2441
  last = text.layout;
2280
- widest = Math.max(widest, widestWord(fonts, text.layout, measured));
2442
+ const own = widestWord(fonts, text.layout, measured);
2443
+ chain = joins === undefined ? own : chain + joins + own;
2444
+ widest = Math.max(widest, chain);
2281
2445
  }
2282
2446
  for (const placed of line.atomics) {
2283
2447
  const b = placed.box;
@@ -3363,23 +3527,32 @@ export function establishesBFC(box) {
3363
3527
  }
3364
3528
  /** What a box's `position: relative` offset moves it by, applied after
3365
3529
  * layout so it does not affect anything else's position — which is the
3366
- * whole of what makes it *relative* — and its translation with it. */
3367
- export function applyRelativeOffsets(box) {
3530
+ * whole of what makes it *relative* — and its translation with it, and
3531
+ * where `position: sticky` puts one at rest (`stickyOffset`). */
3532
+ export function applyRelativeOffsets(box, viewportWidth, viewportHeight) {
3368
3533
  for (const child of box.children)
3369
- applyRelativeOffsets(child);
3534
+ applyRelativeOffsets(child, viewportWidth, viewportHeight);
3370
3535
  const style = box.style;
3371
3536
  if (transformed(style) && box.kind !== 'inline') {
3372
3537
  // a transform moves the box it is on, and an inline box is none
3373
3538
  const [dx, dy] = translationOf(box);
3374
- if (dx || dy)
3539
+ if (dx || dy) {
3375
3540
  translate(box, dx, dy);
3541
+ movedOffLine(box);
3542
+ }
3376
3543
  }
3377
3544
  if (style.position !== 'relative' && style.position !== 'sticky')
3378
3545
  return;
3379
- const [dx, dy] = relativeOffset(box);
3546
+ const [dx, dy] = style.position === 'sticky'
3547
+ ? stickyOffset(box, viewportWidth, viewportHeight)
3548
+ : relativeOffset(box);
3549
+ if (!(dx || dy))
3550
+ return;
3380
3551
  translate(box, dx, dy);
3381
- if (box.kind !== 'inline' || !(dx || dy))
3552
+ if (box.kind !== 'inline') {
3553
+ movedOffLine(box);
3382
3554
  return;
3555
+ }
3383
3556
  offsetInline(box, dx, dy);
3384
3557
  // the blocks it was broken around move with it (9.2.1.1)
3385
3558
  const blocks = box.cut ? CUT_BLOCKS.get(box) : undefined;
@@ -3394,10 +3567,10 @@ export function transformed(style) {
3394
3567
  }
3395
3568
  /** How far `translate` and a `transform` move a box: a percentage is of
3396
3569
  * its own border box (CSS Transforms 1, 7). */
3397
- function translationOf(box) {
3570
+ function translationOf(box, style = box.style) {
3398
3571
  let dx = 0;
3399
3572
  let dy = 0;
3400
- for (const moved of [box.style.translate, box.style.transformTranslate]) {
3573
+ for (const moved of [style.translate, style.transformTranslate]) {
3401
3574
  if (!moved)
3402
3575
  continue;
3403
3576
  dx += resolve(moved[0], box.width, 0);
@@ -3405,6 +3578,21 @@ function translationOf(box) {
3405
3578
  }
3406
3579
  return [dx, dy];
3407
3580
  }
3581
+ /**
3582
+ * Move a laid-out box, and everything in it, by how far its translation
3583
+ * changed when its style went from `was` to the one it has — what
3584
+ * `applyRelativeOffsets` moves it by now, less what it moved it by then.
3585
+ * For a style changed in place, where nothing else moves (a `transform` is
3586
+ * what makes that true). Not for an inline box, whose text is what moves.
3587
+ */
3588
+ export function retranslate(box, was) {
3589
+ const [x0, y0] = translationOf(box, was);
3590
+ const [x1, y1] = translationOf(box);
3591
+ if (x1 === x0 && y1 === y0)
3592
+ return;
3593
+ translate(box, x1 - x0, y1 - y0);
3594
+ movedOffLine(box);
3595
+ }
3408
3596
  /** How far `position: relative` moves a box. */
3409
3597
  function relativeOffset(box) {
3410
3598
  const style = box.style;
@@ -3422,6 +3610,72 @@ function relativeOffset(box) {
3422
3610
  const dy = top ?? (bottom !== null ? -bottom : 0);
3423
3611
  return [dx, dy];
3424
3612
  }
3613
+ /**
3614
+ * Where `position: sticky` puts a box at rest (CSS Positioned Layout 3,
3615
+ * 3.4): moved only as far as keeps its border box inside the sticky view
3616
+ * rectangle — its nearest scroll container's scrollport, scrolled to its
3617
+ * start, less its insets — and no further than keeps its margin box in its
3618
+ * containing block, `top` winning over `bottom` and the start side over the
3619
+ * end. Nothing here scrolls a box the document holds, so for one of those
3620
+ * this is where the box stays. The viewport does scroll, and the document
3621
+ * with it, and a sticky box does not follow: against the viewport only its
3622
+ * `top` and its start side are kept, which at rest put a box as a browser
3623
+ * does, while a `bottom: 0` would pin a footer to the middle of the page
3624
+ * once it was scrolled. Taken as `relative`, a box stood its `top` below
3625
+ * where a browser starts it: Wikipedia's contents, 24px low.
3626
+ */
3627
+ function stickyOffset(box, viewportWidth, viewportHeight) {
3628
+ const style = box.style;
3629
+ // the scroll container a sticky box keeps to: the nearest box that
3630
+ // scrolls, or the viewport, whose are the root's and the body's overflow
3631
+ let port = box.parent;
3632
+ while (port && !scrolls(port.style))
3633
+ port = port.parent;
3634
+ const tag = port?.el?.name;
3635
+ const inside = !!port && tag !== 'html' && tag !== 'body';
3636
+ let cb = box.parent;
3637
+ while (cb && cb.kind === 'inline')
3638
+ cb = cb.parent;
3639
+ if (!cb)
3640
+ return [0, 0];
3641
+ // the scrollport, at its start: a scroll container's padding box, or
3642
+ // the viewport, which the document's top is at
3643
+ const px = port && inside ? port.x + port.borderLeft : 0;
3644
+ const py = port && inside ? port.y + port.borderTop : 0;
3645
+ const pw = port && inside
3646
+ ? port.width - port.borderLeft - port.borderRight
3647
+ : viewportWidth;
3648
+ const ph = port && inside
3649
+ ? port.height - port.borderTop - port.borderBottom
3650
+ : viewportHeight;
3651
+ const dx = stuck(box.x, box.width, box.marginLeft, box.marginRight, cb.contentX, cb.contentWidth, px, pw, resolveOrNull(style.left, pw), inside ? resolveOrNull(style.right, pw) : null,
3652
+ // `left` wins where both hold, or `right` in a right-to-left block
3653
+ cb.style.direction !== 'rtl');
3654
+ const dy = stuck(box.y, box.height, box.marginTop, box.marginBottom, cb.contentY, cb.contentHeight, py, ph, resolveOrNull(style.top, ph), inside ? resolveOrNull(style.bottom, ph) : null, true);
3655
+ return [dx, dy];
3656
+ }
3657
+ /**
3658
+ * How far a sticky box moves along one axis: toward the end until its
3659
+ * start edge is `start` inside the scrollport's, or toward the start until
3660
+ * its end edge is `end` inside the scrollport's, each no further than its
3661
+ * margin box stays in its containing block — and where both would move
3662
+ * it, `startWins` says which does.
3663
+ */
3664
+ function stuck(at, size, marginStart, marginEnd, cbAt, cbSize, portAt, portSize, start, end, startWins) {
3665
+ let byStart = 0;
3666
+ if (start !== null && Number.isFinite(start) && at < portAt + start) {
3667
+ const room = cbAt + cbSize - (at + size + marginEnd);
3668
+ byStart = Math.max(0, Math.min(portAt + start - at, room));
3669
+ }
3670
+ let byEnd = 0;
3671
+ if (end !== null && Number.isFinite(end)) {
3672
+ const over = at + size - (portAt + portSize - end);
3673
+ const room = at - marginStart - cbAt;
3674
+ if (over > 0)
3675
+ byEnd = -Math.max(0, Math.min(over, room));
3676
+ }
3677
+ return startWins ? byStart || byEnd : byEnd || byStart;
3678
+ }
3425
3679
  /**
3426
3680
  * Move an inline box's text where `position: relative` puts the box. Its
3427
3681
  * text is on its block's lines, laid out apart from the text around it
@@ -3450,9 +3704,36 @@ function offsetInline(box, dx, dy) {
3450
3704
  y: (was?.y ?? 0) + dy,
3451
3705
  });
3452
3706
  SHIFTED_LINES.add(line);
3707
+ markMovedOff(lines, line);
3708
+ }
3709
+ }
3710
+ }
3711
+ /** Mark the line an inline-block or an image a box moved off was placed
3712
+ * on, where it was on one: the line stays, and the box is drawn where it
3713
+ * went (`MOVED_OFF_LINES`). */
3714
+ function movedOffLine(box) {
3715
+ let block = box.parent;
3716
+ while (block && block.kind === 'inline')
3717
+ block = block.parent;
3718
+ const lines = block?.lines;
3719
+ if (!lines)
3720
+ return;
3721
+ for (const line of lines) {
3722
+ for (const placed of line.atomics) {
3723
+ if (placed.box !== box)
3724
+ continue;
3725
+ markMovedOff(lines, line);
3726
+ return;
3453
3727
  }
3454
3728
  }
3455
3729
  }
3730
+ function markMovedOff(lines, line) {
3731
+ const moved = MOVED_OFF_LINES.get(lines);
3732
+ if (moved)
3733
+ moved.add(line);
3734
+ else
3735
+ MOVED_OFF_LINES.set(lines, new Set([line]));
3736
+ }
3456
3737
  /** Whether `inner` is `outer` or inside it. */
3457
3738
  function holds(outer, inner) {
3458
3739
  for (let at = inner; at; at = at.parent) {