@gjermundgaraba-designs/pixel-paper 0.17.0 → 0.19.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 (57) hide show
  1. package/DESIGN.md +41 -12
  2. package/dist/src/drag/drag.d.ts +3 -0
  3. package/dist/src/drag/drag.d.ts.map +1 -1
  4. package/dist/src/drag/drag.js +14 -10
  5. package/dist/src/glyph/glyph.d.ts +3 -1
  6. package/dist/src/glyph/glyph.d.ts.map +1 -1
  7. package/dist/src/glyph/glyph.js +2 -1
  8. package/dist/src/glyph/glyphs.d.ts +3 -0
  9. package/dist/src/glyph/glyphs.d.ts.map +1 -1
  10. package/dist/src/glyph/glyphs.js +4 -3
  11. package/dist/src/identity/identity.d.ts +2 -0
  12. package/dist/src/identity/identity.d.ts.map +1 -1
  13. package/dist/src/identity/identity.js +8 -2
  14. package/dist/src/index.d.ts +1 -0
  15. package/dist/src/index.d.ts.map +1 -1
  16. package/dist/src/index.js +1 -0
  17. package/dist/src/meter/meter.d.ts +5 -1
  18. package/dist/src/meter/meter.d.ts.map +1 -1
  19. package/dist/src/meter/meter.js +15 -3
  20. package/dist/src/monogram/monogram.d.ts +7 -2
  21. package/dist/src/monogram/monogram.d.ts.map +1 -1
  22. package/dist/src/monogram/monogram.js +24 -6
  23. package/dist/src/panel/panel.d.ts +5 -1
  24. package/dist/src/panel/panel.d.ts.map +1 -1
  25. package/dist/src/panel/panel.js +7 -3
  26. package/dist/src/reel/index.d.ts +4 -0
  27. package/dist/src/reel/index.d.ts.map +1 -0
  28. package/dist/src/reel/index.js +2 -0
  29. package/dist/src/reel/layout.d.ts +180 -0
  30. package/dist/src/reel/layout.d.ts.map +1 -0
  31. package/dist/src/reel/layout.js +370 -0
  32. package/dist/src/reel/reel.d.ts +1158 -0
  33. package/dist/src/reel/reel.d.ts.map +1 -0
  34. package/dist/src/reel/reel.js +922 -0
  35. package/dist/src/sortable/sortable.d.ts +30 -30
  36. package/dist/src/sortable/sortable.d.ts.map +1 -1
  37. package/dist/src/sortable/sortable.js +2 -10
  38. package/dist/src/toast/toast.d.ts +12 -12
  39. package/dist/src/window/window.d.ts +2 -0
  40. package/dist/src/window/window.d.ts.map +1 -1
  41. package/dist/src/window/window.js +2 -1
  42. package/package.json +1 -1
  43. package/src/drag/drag.ts +19 -4
  44. package/src/glyph/glyph.ts +2 -1
  45. package/src/glyph/glyphs.ts +6 -4
  46. package/src/identity/identity.ts +10 -2
  47. package/src/index.ts +1 -0
  48. package/src/meter/meter.ts +18 -2
  49. package/src/monogram/monogram.ts +46 -6
  50. package/src/panel/panel.ts +21 -3
  51. package/src/pixel-paper.css +249 -2
  52. package/src/reel/index.ts +20 -0
  53. package/src/reel/layout.ts +602 -0
  54. package/src/reel/reel.ts +1597 -0
  55. package/src/sortable/sortable.ts +8 -16
  56. package/src/tokens.css +5 -0
  57. package/src/window/window.ts +4 -0
@@ -1,5 +1,7 @@
1
1
  import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
- import { Array, String, pipe } from "effect";
2
+ import { Array, Number, String, pipe } from "effect";
3
+ import { cellView } from "../glyph/glyph.js";
4
+ import { artRows, toCells } from "../glyph/glyphs.js";
3
5
  // LETTERS
4
6
  const WORD_BREAK = /[\s._-]+/;
5
7
  const LETTER_COUNT = 2;
@@ -11,12 +13,28 @@ const initials = (name) => __foldkitBrandViewResult((pipe(name.split(WORD_BREAK)
11
13
  ? pipe(Array.take(words, LETTER_COUNT), Array.map((word) => __foldkitBrandViewResult((word.slice(0, 1)), "@gjermundgaraba-designs/pixel-paper/src/monogram/monogram.js#anonymous")), Array.join(""))
12
14
  : Array.headNonEmpty(words).slice(0, LETTER_COUNT)), "@gjermundgaraba-designs/pixel-paper/src/monogram/monogram.js#onNonEmpty"),
13
15
  }))), "@gjermundgaraba-designs/pixel-paper/src/monogram/monogram.js#initials");
14
- /** Letters in an ink square: the identity of a person, a provider or a source, where the
15
- * system draws no logos. An image named by `label`, or hidden when `isDecorative`. */
16
+ // DRAWING
17
+ /** A drawing prints a pixel per cell, two in a large monogram, so its cells stay whole. */
18
+ const DRAWN_CELL = 1;
19
+ const LARGE_DRAWN_CELL = 2;
20
+ const drawingView = (art, isLarge, h) => {
21
+ const rows = artRows(art);
22
+ const columns = Array.reduce(rows, 0, (widest, row) => __foldkitBrandViewResult((Number.max(widest, row.length)), "@gjermundgaraba-designs/pixel-paper/src/monogram/monogram.js#anonymous~2"));
23
+ const cell = isLarge ? LARGE_DRAWN_CELL : DRAWN_CELL;
24
+ return __foldkitBrandViewResult((h.svg([
25
+ h.ViewBox(`0 0 ${columns} ${rows.length}`),
26
+ h.Width(`${columns * cell}`),
27
+ h.Height(`${rows.length * cell}`),
28
+ h.AriaHidden(true),
29
+ h.Class("px-icon"),
30
+ ], Array.map(toCells(art, columns), cellView(h)))), "@gjermundgaraba-designs/pixel-paper/src/monogram/monogram.js#drawingView");
31
+ };
32
+ /** Letters in an ink square, or a mark the product draws in cells: the identity of a person,
33
+ * a provider or a source. An image named by `label`, or hidden when `isDecorative`. */
16
34
  export const view = (config, h) => {
17
- const { label, letters, isLarge = false, isCurrent = false, isDecorative = false } = config;
35
+ const { label, letters, drawing, isLarge = false, isCurrent = false, isDecorative = false, } = config;
18
36
  return __foldkitBrandViewResult((h.span([
19
37
  ...(isDecorative ? [h.AriaHidden(true)] : [h.Role("img"), h.AriaLabel(label)]),
20
- h.Class(`monogram${isLarge ? " large" : ""}${isCurrent ? " current" : ""}`),
21
- ], [letters ?? initials(label)])), "@gjermundgaraba-designs/pixel-paper/src/monogram/monogram.js#view");
38
+ h.Class(`monogram${drawing === undefined ? "" : " drawn"}${isLarge ? " large" : ""}${isCurrent ? " current" : ""}`),
39
+ ], [drawing === undefined ? (letters ?? initials(label)) : drawingView(drawing, isLarge, h)])), "@gjermundgaraba-designs/pixel-paper/src/monogram/monogram.js#view");
22
40
  };
@@ -9,6 +9,10 @@ export type ViewConfig = Readonly<{
9
9
  id: string;
10
10
  /** Pixel caps in the inverted title bar. */
11
11
  title: string;
12
+ /** What screen readers call the panel where its title repeats among its siblings (panels
13
+ * titled by a kind, one per account): the title and what tells this one apart. The
14
+ * title names it otherwise. */
15
+ name?: string;
12
16
  /** A quiet IconButton before the title, such as the grip a Sortable of panels hands each
13
17
  * panel. On the ink bar it prints as `actions` do. */
14
18
  lead?: ReadonlyArray<Html | string>;
@@ -26,6 +30,6 @@ export type ViewConfig = Readonly<{
26
30
  /** The id of a panel's title, which names it. */
27
31
  export declare const titleId: (id: string) => string;
28
32
  /** The unit of the system: paper in a 2px ink box on a 5px print shadow, under a title bar. A
29
- * region landmark (`<section>`) named by its `h2` title, keyed by its `id`. */
33
+ * region landmark (`<section>`) named by its `h2` title, or by `name`, keyed by its `id`. */
30
34
  export declare const view: <Message>(config: ViewConfig, h: HtmlBuilder<Message>) => Html;
31
35
  //# sourceMappingURL=panel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/panel/panel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAMtD,uDAAuD;AACvD,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC;;;;kCAI8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd;2DACuD;IACvD,IAAI,CAAC,EAAE,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IACpC,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;yFACqF;IACrF,OAAO,CAAC,EAAE,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IACvC,IAAI,EAAE,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IACnC,2EAA2E;IAC3E,IAAI,CAAC,EAAE,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IACpC,uFAAuF;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC,CAAC;AAEH,iDAAiD;AACjD,eAAO,MAAM,OAAO,OAAQ,MAAM,KAAG,MAAuB,CAAC;AAE7D;gFACgF;AAChF,eAAO,MAAM,IAAI,GAAI,OAAO,UAAU,UAAU,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IAoB3E,CAAC"}
1
+ {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/panel/panel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAMtD,uDAAuD;AACvD,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC;;;;kCAI8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd;;oCAEgC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;2DACuD;IACvD,IAAI,CAAC,EAAE,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IACpC,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;yFACqF;IACrF,OAAO,CAAC,EAAE,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IACvC,IAAI,EAAE,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IACnC,2EAA2E;IAC3E,IAAI,CAAC,EAAE,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IACpC,uFAAuF;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC,CAAC;AAEH,iDAAiD;AACjD,eAAO,MAAM,OAAO,OAAQ,MAAM,KAAG,MAAuB,CAAC;AAE7D;8FAC8F;AAC9F,eAAO,MAAM,IAAI,GAAI,OAAO,UAAU,UAAU,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IAkC3E,CAAC"}
@@ -3,10 +3,14 @@ import { slotView } from "../slot/slot.js";
3
3
  /** The id of a panel's title, which names it. */
4
4
  export const titleId = (id) => __foldkitBrandViewResult((`${id}-title`), "@gjermundgaraba-designs/pixel-paper/src/panel/panel.js#titleId");
5
5
  /** The unit of the system: paper in a 2px ink box on a 5px print shadow, under a title bar. A
6
- * region landmark (`<section>`) named by its `h2` title, keyed by its `id`. */
6
+ * region landmark (`<section>`) named by its `h2` title, or by `name`, keyed by its `id`. */
7
7
  export const view = (config, h) => {
8
- const { id, title, lead = [], meta, actions = [], body, foot = [], isFlush = false } = config;
9
- return __foldkitBrandViewResult((h.keyed("section")(id, [h.Id(id), h.AriaLabelledBy(titleId(id)), h.Class("panel")], [
8
+ const { id, title, name, lead = [], meta, actions = [], body, foot = [], isFlush = false, } = config;
9
+ return __foldkitBrandViewResult((h.keyed("section")(id, [
10
+ h.Id(id),
11
+ name === undefined ? h.AriaLabelledBy(titleId(id)) : h.AriaLabel(name),
12
+ h.Class("panel"),
13
+ ], [
10
14
  h.header([h.Class("panel-tb")], [
11
15
  ...slotView("span", "panel-lead", lead, h),
12
16
  h.h2([h.Id(titleId(id))], [title]),
@@ -0,0 +1,4 @@
1
+ export { Layout, OutMessage, Pane, apply } from "./layout.ts";
2
+ export { Action, AnnounceReel, FocusGrip, FocusPane, Message, Model, RestoreFocus, ScrollIntoView, SizeLiftedPane, focusedPaneId, init, perform, reconcile, subscriptions, update, view, } from "./reel.ts";
3
+ export type { InitConfig, PaneRender, UpdateContext, ViewInputs } from "./reel.ts";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/reel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,SAAS,EACT,OAAO,EACP,KAAK,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,aAAa,EACb,IAAI,EACJ,OAAO,EACP,SAAS,EACT,aAAa,EACb,MAAM,EACN,IAAI,GACL,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Layout, OutMessage, Pane, apply } from "./layout.js";
2
+ export { Action, AnnounceReel, FocusGrip, FocusPane, Message, Model, RestoreFocus, ScrollIntoView, SizeLiftedPane, focusedPaneId, init, perform, reconcile, subscriptions, update, view, } from "./reel.js";
@@ -0,0 +1,180 @@
1
+ import { Option, Schema } from "effect";
2
+ /** Schema for one pane as the reel knows it: its id, unique in the reel and the application's
3
+ * to keep, its name in words (its grip, its splitter and what screen readers hear), and its
4
+ * share of its column's height, a weight against its neighbours'. */
5
+ export declare const Pane: Schema.Struct<{
6
+ readonly id: Schema.String;
7
+ readonly label: Schema.String;
8
+ readonly weight: Schema.Number;
9
+ }>;
10
+ export type Pane = typeof Pane.Type;
11
+ /** Schema for one column: its id, unique among the reel's columns and the application's to
12
+ * keep, its width, a fraction of the reel's visible width (1 fills it), and its panes, top
13
+ * to bottom. A column `apply` makes for a pane pulled out takes the pane's id (`notes`, or
14
+ * `notes/2` where a column has it), so pane and column ids share one namespace. */
15
+ export declare const Column: Schema.Struct<{
16
+ readonly id: Schema.String;
17
+ readonly width: Schema.Number;
18
+ readonly panes: Schema.NonEmptyArray<Schema.Struct<{
19
+ readonly id: Schema.String;
20
+ readonly label: Schema.String;
21
+ readonly weight: Schema.Number;
22
+ }>>;
23
+ }>;
24
+ export type Column = typeof Column.Type;
25
+ /** Schema for a reel's layout: its columns, left to right. The application's to keep. */
26
+ export declare const Layout: Schema.$Array<Schema.Struct<{
27
+ readonly id: Schema.String;
28
+ readonly width: Schema.Number;
29
+ readonly panes: Schema.NonEmptyArray<Schema.Struct<{
30
+ readonly id: Schema.String;
31
+ readonly label: Schema.String;
32
+ readonly weight: Schema.Number;
33
+ }>>;
34
+ }>>;
35
+ export type Layout = typeof Layout.Type;
36
+ /** What is held: a pane or a column, by its id. */
37
+ export declare const Subject: import("foldkit/schema").TaggedUnion<{
38
+ readonly Pane: {
39
+ paneId: Schema.String;
40
+ };
41
+ readonly Column: {
42
+ columnId: Schema.String;
43
+ };
44
+ }>;
45
+ export type Subject = typeof Subject.Type;
46
+ /** Where a held pane or column would land: into a column, at a place among its other panes,
47
+ * or in the gap before a column (none: after the last), as a column of its own. */
48
+ export declare const Target: import("foldkit/schema").TaggedUnion<{
49
+ readonly Into: {
50
+ columnId: Schema.String;
51
+ index: Schema.Number;
52
+ };
53
+ readonly Gap: {
54
+ maybeBeforeColumnId: Schema.Option<Schema.String>;
55
+ };
56
+ }>;
57
+ export type Target = typeof Target.Type;
58
+ /** Union of what a reel asks the application to do to its layout, which the application
59
+ * applies (`apply` does it) or not, by id, so a request still means what it meant after the
60
+ * layout changed under it. `MovedPane`: a pane into a column, at `toIndex` among that
61
+ * column's other panes. `PulledOutPane`: a pane into a column of its own, before a column
62
+ * (none: after the last). `MovedColumn`: a column to before another (none: last).
63
+ * `ResizedColumn`: a column's width. `ResizedPanes`: a column's panes' weights, by pane id. */
64
+ export declare const OutMessage: import("foldkit/message").MessageUnion<{
65
+ readonly MovedPane: {
66
+ paneId: Schema.String;
67
+ toColumnId: Schema.String;
68
+ toIndex: Schema.Number;
69
+ };
70
+ readonly PulledOutPane: {
71
+ paneId: Schema.String;
72
+ maybeBeforeColumnId: Schema.Option<Schema.String>;
73
+ };
74
+ readonly MovedColumn: {
75
+ columnId: Schema.String;
76
+ maybeBeforeColumnId: Schema.Option<Schema.String>;
77
+ };
78
+ readonly ResizedColumn: {
79
+ columnId: Schema.String;
80
+ width: Schema.Number;
81
+ };
82
+ readonly ResizedPanes: {
83
+ columnId: Schema.String;
84
+ weights: Schema.$Record<Schema.String, Schema.Number>;
85
+ };
86
+ }>;
87
+ export type OutMessage = typeof OutMessage.Type;
88
+ /** A splitter: the one after a column, which sizes its width, or the one below a pane, which
89
+ * shares the height between it and the pane under it. */
90
+ export declare const Splitter: import("foldkit/schema").TaggedUnion<{
91
+ readonly Width: {
92
+ columnId: Schema.String;
93
+ };
94
+ readonly Split: {
95
+ abovePaneId: Schema.String;
96
+ };
97
+ }>;
98
+ export type Splitter = typeof Splitter.Type;
99
+ /** A resize: a column's width, or its panes' weights. */
100
+ export declare const Resize: Schema.Union<readonly [import("foldkit/schema").CallableTaggedStruct<"ResizedColumn", {
101
+ readonly columnId: Schema.String;
102
+ readonly width: Schema.Number;
103
+ }>, import("foldkit/schema").CallableTaggedStruct<"ResizedPanes", {
104
+ readonly columnId: Schema.String;
105
+ readonly weights: Schema.$Record<Schema.String, Schema.Number>;
106
+ }>]>;
107
+ export type Resize = typeof Resize.Type;
108
+ /** A pane where it sits: its column (and that column's index) and its row. */
109
+ export type Place = Readonly<{
110
+ column: Column;
111
+ columnIndex: number;
112
+ row: number;
113
+ pane: Pane;
114
+ }>;
115
+ export declare const placeOf: (layout: Layout, paneId: string) => Option.Option<Place>;
116
+ export declare const placeAt: (layout: Layout, columnIndex: number, row: number) => Option.Option<Place>;
117
+ export declare const firstPlace: (layout: Layout) => Option.Option<Place>;
118
+ export declare const columnIndexOf: (layout: Layout, columnId: string) => Option.Option<number>;
119
+ export declare const columnOf: (layout: Layout, columnId: string) => Option.Option<Column>;
120
+ /**
121
+ * The layout once `request` is applied: what the reel asked, done the way every client does
122
+ * it. A pane that leaves its column takes the mean weight of the column it joins; a column
123
+ * left without panes goes; a pane pulled out keeps its old column's width, in a column named
124
+ * for it. A request naming a pane or column the layout no longer has changes nothing.
125
+ */
126
+ export declare const apply: (layout: Layout, request: OutMessage) => Layout;
127
+ export declare const widthWords: (width: number) => string;
128
+ export declare const widthMark: (width: number) => string;
129
+ /** The next preset wider than `width`, or the narrowest past the widest. */
130
+ export declare const nextPreset: (width: number) => number;
131
+ /** What a place is called when a drop would leave the pane or column where it is. */
132
+ export declare const WHERE_IT_WAS = "where it was";
133
+ export declare const fill: (template: string, fields: Readonly<Record<string, string | number>>) => string;
134
+ export declare const subjectWords: (layout: Layout, subject: Subject) => Option.Option<string>;
135
+ export declare const placeWords: (layout: Layout, place: Place) => string;
136
+ /** Where `subject` sits in `layout`, in words. */
137
+ export declare const whereWords: (layout: Layout, subject: Subject) => Option.Option<string>;
138
+ /** Where `subject` is now, as a target: a pane at its place, a column in the gap before
139
+ * itself. */
140
+ export declare const originOf: (layout: Layout, subject: Subject) => Option.Option<Target>;
141
+ export declare const isPresent: (layout: Layout, subject: Subject) => boolean;
142
+ /** What dropping `subject` at `target` asks of the layout: none where it would change
143
+ * nothing (where it is, or a target whose column is gone). */
144
+ export declare const requestOf: (layout: Layout, subject: Subject, target: Target) => Option.Option<OutMessage>;
145
+ /** Where `subject` would be once dropped at `target`, in words. */
146
+ export declare const landingWords: (layout: Layout, subject: Subject, target: Target) => string;
147
+ /** The column a target sits in or before (the last, for the gap after it), which a keyboard
148
+ * step scrolls to. */
149
+ export declare const columnOfTarget: (layout: Layout, target: Target) => Option.Option<string>;
150
+ export declare const Step: Schema.Literals<readonly ["Up", "Down", "Left", "Right"]>;
151
+ export type Step = typeof Step.Type;
152
+ /** Whether the column `target` names (into it, or the gap before it) is still in `layout`. */
153
+ export declare const isTargetPresent: (layout: Layout, target: Target) => boolean;
154
+ /** A keyboard step from `target`: left and right cross from a column to the gap beside it and
155
+ * on to the next column, up and down move among a column's panes. A stop where the drop would
156
+ * change nothing is passed over, but for where `subject` started; with nothing further that
157
+ * way, it stays (where `subject` started, if the target's column has gone). */
158
+ export declare const steppedTarget: (layout: Layout, subject: Subject, target: Target, step: Step) => Target;
159
+ /** A column as a pointer reads it: its id, its left and right edges, and the vertical middles
160
+ * of its slots, the held pane's left out. */
161
+ export type ColumnBox = Readonly<{
162
+ id: string;
163
+ left: number;
164
+ right: number;
165
+ slotMiddles: ReadonlyArray<number>;
166
+ }>;
167
+ /** Where a pointer at (`clientX`, `clientY`) over a reel whose columns sit at `columns`, left
168
+ * to right, would drop `subject`. A column lands in the gap nearest the pointer, counted by
169
+ * the columns whose middle it has passed. A pane over a column's edge band (or over a gap, or
170
+ * past the last column) lands in that gap, as a column of its own; over the rest of a column
171
+ * it lands among that column's other panes, after each whose middle is above the pointer. */
172
+ export declare const targetAtPoint: (subject: Subject, columns: ReadonlyArray<ColumnBox>, clientX: number, clientY: number) => Target;
173
+ /** What moving `splitter` by `share` asks of the layout, from the sizes the layout holds (not
174
+ * the sizes printed, which the stylesheet may hold at a minimum): a width splitter adds
175
+ * `share` to its column's width; a pane splitter moves `share` of its column's height from
176
+ * the pane below it to the pane above. None when what it sizes is gone. */
177
+ export declare const resizeOf: (layout: Layout, splitter: Splitter, share: number) => Option.Option<Resize>;
178
+ /** Whether what `splitter` sizes is still in `layout`. */
179
+ export declare const isSplitterPresent: (layout: Layout, splitter: Splitter) => boolean;
180
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/reel/layout.ts"],"names":[],"mappings":"AAGA,OAAO,EAA+B,MAAM,EAAqB,MAAM,EAAQ,MAAM,QAAQ,CAAC;AAQ9F;;sEAEsE;AACtE,eAAO,MAAM,IAAI;;;;EAIf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,OAAO,IAAI,CAAC,IAAI,CAAC;AAEpC;;;oFAGoF;AACpF,eAAO,MAAM,MAAM;;;;;;;;EAIjB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAC;AAExC,yFAAyF;AACzF,eAAO,MAAM,MAAM;;;;;;;;GAAuB,CAAC;AAC3C,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAC;AAExC,mDAAmD;AACnD,eAAO,MAAM,OAAO;;QACV,MAAM;;;QACJ,QAAQ;;EAClB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAE1C;oFACoF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