@gjermundgaraba-designs/plain-garden 0.7.0 → 0.9.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 (221) hide show
  1. package/DESIGN.md +8 -4
  2. package/dist/src/box/box.d.ts +1 -1
  3. package/dist/src/box/box.d.ts.map +1 -1
  4. package/dist/src/box/index.d.ts.map +1 -1
  5. package/dist/src/changes/changes.d.ts +1 -1
  6. package/dist/src/changes/changes.d.ts.map +1 -1
  7. package/dist/src/changes/index.d.ts.map +1 -1
  8. package/dist/src/{codeFigure/codeFigure.d.ts → code-figure/code-figure.d.ts} +3 -3
  9. package/dist/src/code-figure/code-figure.d.ts.map +1 -0
  10. package/dist/src/{codeFigure/codeFigure.js → code-figure/code-figure.js} +10 -5
  11. package/dist/src/code-figure/index.d.ts +3 -0
  12. package/dist/src/code-figure/index.d.ts.map +1 -0
  13. package/dist/src/code-figure/index.js +1 -0
  14. package/dist/src/copy/copy.d.ts.map +1 -1
  15. package/dist/src/copy/copy.js +1 -7
  16. package/dist/src/{copyButton/copyButton.d.ts → copy-button/copy-button.d.ts} +8 -2
  17. package/dist/src/copy-button/copy-button.d.ts.map +1 -0
  18. package/dist/src/copy-button/copy-button.js +37 -0
  19. package/dist/src/copy-button/index.d.ts +3 -0
  20. package/dist/src/copy-button/index.d.ts.map +1 -0
  21. package/dist/src/{copyButton → copy-button}/index.js +1 -1
  22. package/dist/src/diagram/diagram.d.ts +1 -1
  23. package/dist/src/diagram/diagram.d.ts.map +1 -1
  24. package/dist/src/diagram/diagram.js +10 -1
  25. package/dist/src/diagram/index.d.ts.map +1 -1
  26. package/dist/src/drawing/drawing.d.ts +3 -3
  27. package/dist/src/drawing/drawing.d.ts.map +1 -1
  28. package/dist/src/drawing/drawing.js +6 -5
  29. package/dist/src/drawing/fnv1a-utf16.d.ts +2 -0
  30. package/dist/src/drawing/fnv1a-utf16.d.ts.map +1 -0
  31. package/dist/src/drawing/fnv1a-utf16.js +8 -0
  32. package/dist/src/drawing/index.d.ts +1 -1
  33. package/dist/src/drawing/index.d.ts.map +1 -1
  34. package/dist/src/drawing/render.d.ts +4 -9
  35. package/dist/src/drawing/render.d.ts.map +1 -1
  36. package/dist/src/drawing/render.js +221 -200
  37. package/dist/src/drawing/scene.d.ts +11 -7
  38. package/dist/src/drawing/scene.d.ts.map +1 -1
  39. package/dist/src/drawing/scene.js +8 -5
  40. package/dist/src/{drawnTitle/drawnTitle.d.ts → drawn-title/drawn-title.d.ts} +3 -2
  41. package/dist/src/drawn-title/drawn-title.d.ts.map +1 -0
  42. package/dist/src/{drawnTitle/drawnTitle.js → drawn-title/drawn-title.js} +3 -3
  43. package/dist/src/drawn-title/index.d.ts +3 -0
  44. package/dist/src/drawn-title/index.d.ts.map +1 -0
  45. package/dist/src/drawn-title/index.js +1 -0
  46. package/dist/src/{figRef/figRef.d.ts → fig-ref/fig-ref.d.ts} +1 -1
  47. package/dist/src/fig-ref/fig-ref.d.ts.map +1 -0
  48. package/dist/src/{figRef/figRef.js → fig-ref/fig-ref.js} +1 -1
  49. package/dist/src/fig-ref/index.d.ts +3 -0
  50. package/dist/src/fig-ref/index.d.ts.map +1 -0
  51. package/dist/src/fig-ref/index.js +1 -0
  52. package/dist/src/figure/figure.d.ts +3 -3
  53. package/dist/src/figure/figure.d.ts.map +1 -1
  54. package/dist/src/figure/figure.js +4 -2
  55. package/dist/src/figure/figures.d.ts +0 -1
  56. package/dist/src/figure/figures.d.ts.map +1 -1
  57. package/dist/src/figure/figures.js +2 -2
  58. package/dist/src/figure/index.d.ts.map +1 -1
  59. package/dist/src/illustration/illustration.d.ts +1 -0
  60. package/dist/src/illustration/illustration.d.ts.map +1 -1
  61. package/dist/src/illustration/illustration.js +2 -2
  62. package/dist/src/illustration/index.d.ts.map +1 -1
  63. package/dist/src/index.d.ts +9 -9
  64. package/dist/src/index.d.ts.map +1 -1
  65. package/dist/src/index.js +9 -9
  66. package/dist/src/links-here/index.d.ts +3 -0
  67. package/dist/src/links-here/index.d.ts.map +1 -0
  68. package/dist/src/links-here/index.js +1 -0
  69. package/dist/src/{linksHere/linksHere.d.ts → links-here/links-here.d.ts} +2 -2
  70. package/dist/src/links-here/links-here.d.ts.map +1 -0
  71. package/dist/src/{linksHere/linksHere.js → links-here/links-here.js} +2 -2
  72. package/dist/src/margin-note/index.d.ts +3 -0
  73. package/dist/src/margin-note/index.d.ts.map +1 -0
  74. package/dist/src/margin-note/index.js +1 -0
  75. package/dist/src/{marginNote/marginNote.d.ts → margin-note/margin-note.d.ts} +2 -1
  76. package/dist/src/margin-note/margin-note.d.ts.map +1 -0
  77. package/dist/src/{marginNote/marginNote.js → margin-note/margin-note.js} +4 -1
  78. package/dist/src/masthead/index.d.ts.map +1 -1
  79. package/dist/src/masthead/masthead.d.ts +1 -1
  80. package/dist/src/masthead/masthead.d.ts.map +1 -1
  81. package/dist/src/masthead/masthead.js +1 -3
  82. package/dist/src/note-header/index.d.ts +3 -0
  83. package/dist/src/note-header/index.d.ts.map +1 -0
  84. package/dist/src/note-header/index.js +1 -0
  85. package/dist/src/{noteHeader/noteHeader.d.ts → note-header/note-header.d.ts} +2 -1
  86. package/dist/src/note-header/note-header.d.ts.map +1 -0
  87. package/dist/src/{noteHeader/noteHeader.js → note-header/note-header.js} +12 -4
  88. package/dist/src/note-list/index.d.ts +3 -0
  89. package/dist/src/note-list/index.d.ts.map +1 -0
  90. package/dist/src/note-list/index.js +1 -0
  91. package/dist/src/{noteList/noteList.d.ts → note-list/note-list.d.ts} +2 -2
  92. package/dist/src/note-list/note-list.d.ts.map +1 -0
  93. package/dist/src/{noteList/noteList.js → note-list/note-list.js} +8 -3
  94. package/dist/src/ring/index.d.ts.map +1 -1
  95. package/dist/src/ring/ring.d.ts +1 -1
  96. package/dist/src/ring/ring.d.ts.map +1 -1
  97. package/dist/src/scheme/index.d.ts +1 -1
  98. package/dist/src/scheme/index.d.ts.map +1 -1
  99. package/dist/src/scheme/index.js +1 -1
  100. package/dist/src/scheme/{schemeSwitch.d.ts → scheme-switch.d.ts} +3 -2
  101. package/dist/src/scheme/scheme-switch.d.ts.map +1 -0
  102. package/dist/src/scheme/{schemeSwitch.js → scheme-switch.js} +7 -6
  103. package/dist/src/scheme/scheme.d.ts +0 -2
  104. package/dist/src/scheme/scheme.d.ts.map +1 -1
  105. package/dist/src/scheme/scheme.js +0 -2
  106. package/dist/src/scheme/switch.d.ts.map +1 -1
  107. package/dist/src/scheme/switch.js +12 -17
  108. package/dist/src/skip-link/index.d.ts +2 -0
  109. package/dist/src/skip-link/index.d.ts.map +1 -0
  110. package/dist/src/skip-link/index.js +1 -0
  111. package/dist/src/{skipLink/skipLink.d.ts → skip-link/skip-link.d.ts} +1 -1
  112. package/dist/src/skip-link/skip-link.d.ts.map +1 -0
  113. package/dist/src/{skipLink/skipLink.js → skip-link/skip-link.js} +1 -1
  114. package/dist/src/stage/index.d.ts.map +1 -1
  115. package/dist/src/stage/stage.d.ts +0 -2
  116. package/dist/src/stage/stage.d.ts.map +1 -1
  117. package/dist/src/stage/stage.js +0 -2
  118. package/dist/src/summary/index.d.ts.map +1 -1
  119. package/dist/src/summary/summary.d.ts +1 -1
  120. package/dist/src/summary/summary.d.ts.map +1 -1
  121. package/dist/src/time/time.d.ts +0 -3
  122. package/dist/src/time/time.d.ts.map +1 -1
  123. package/dist/src/time/time.js +0 -1
  124. package/package.json +13 -13
  125. package/src/box/box.ts +6 -3
  126. package/src/box/index.ts +1 -0
  127. package/src/changes/changes.ts +10 -4
  128. package/src/changes/index.ts +1 -0
  129. package/src/{codeFigure/codeFigure.ts → code-figure/code-figure.ts} +19 -8
  130. package/src/code-figure/index.ts +3 -0
  131. package/src/copy/copy.ts +8 -17
  132. package/src/copy-button/copy-button.ts +96 -0
  133. package/src/{copyButton → copy-button}/index.ts +4 -2
  134. package/src/diagram/diagram.ts +20 -4
  135. package/src/diagram/index.ts +1 -0
  136. package/src/drawing/drawing.ts +18 -8
  137. package/src/drawing/fnv1a-utf16.ts +9 -0
  138. package/src/drawing/index.ts +11 -1
  139. package/src/drawing/render.ts +460 -270
  140. package/src/drawing/scene.ts +20 -12
  141. package/src/{drawnTitle/drawnTitle.ts → drawn-title/drawn-title.ts} +8 -3
  142. package/src/drawn-title/index.ts +3 -0
  143. package/src/{figRef/figRef.ts → fig-ref/fig-ref.ts} +4 -2
  144. package/src/fig-ref/index.ts +3 -0
  145. package/src/figure/figure.ts +21 -12
  146. package/src/figure/figures.ts +3 -2
  147. package/src/figure/index.ts +2 -0
  148. package/src/illustration/illustration.ts +9 -4
  149. package/src/illustration/index.ts +1 -0
  150. package/src/index.ts +28 -9
  151. package/src/links-here/index.ts +3 -0
  152. package/src/{linksHere/linksHere.ts → links-here/links-here.ts} +12 -5
  153. package/src/margin-note/index.ts +3 -0
  154. package/src/{marginNote/marginNote.ts → margin-note/margin-note.ts} +9 -2
  155. package/src/masthead/index.ts +1 -0
  156. package/src/masthead/masthead.ts +12 -7
  157. package/src/note-header/index.ts +3 -0
  158. package/src/{noteHeader/noteHeader.ts → note-header/note-header.ts} +24 -8
  159. package/src/note-list/index.ts +3 -0
  160. package/src/{noteList/noteList.ts → note-list/note-list.ts} +17 -9
  161. package/src/plain-garden.css +9 -87
  162. package/src/ring/index.ts +1 -0
  163. package/src/ring/ring.ts +9 -5
  164. package/src/scheme/index.ts +3 -1
  165. package/src/scheme/{schemeSwitch.ts → scheme-switch.ts} +22 -11
  166. package/src/scheme/scheme.ts +3 -4
  167. package/src/scheme/switch.ts +9 -20
  168. package/src/skip-link/index.ts +1 -0
  169. package/src/stage/index.ts +1 -0
  170. package/src/stage/stage.ts +9 -6
  171. package/src/summary/index.ts +1 -0
  172. package/src/summary/summary.ts +5 -2
  173. package/src/time/time.ts +8 -5
  174. package/src/tokens.css +14 -61
  175. package/dist/src/codeFigure/codeFigure.d.ts.map +0 -1
  176. package/dist/src/codeFigure/index.d.ts +0 -3
  177. package/dist/src/codeFigure/index.d.ts.map +0 -1
  178. package/dist/src/codeFigure/index.js +0 -1
  179. package/dist/src/copyButton/copyButton.d.ts.map +0 -1
  180. package/dist/src/copyButton/copyButton.js +0 -30
  181. package/dist/src/copyButton/index.d.ts +0 -3
  182. package/dist/src/copyButton/index.d.ts.map +0 -1
  183. package/dist/src/drawnTitle/drawnTitle.d.ts.map +0 -1
  184. package/dist/src/drawnTitle/index.d.ts +0 -3
  185. package/dist/src/drawnTitle/index.d.ts.map +0 -1
  186. package/dist/src/drawnTitle/index.js +0 -1
  187. package/dist/src/figRef/figRef.d.ts.map +0 -1
  188. package/dist/src/figRef/index.d.ts +0 -3
  189. package/dist/src/figRef/index.d.ts.map +0 -1
  190. package/dist/src/figRef/index.js +0 -1
  191. package/dist/src/linksHere/index.d.ts +0 -3
  192. package/dist/src/linksHere/index.d.ts.map +0 -1
  193. package/dist/src/linksHere/index.js +0 -1
  194. package/dist/src/linksHere/linksHere.d.ts.map +0 -1
  195. package/dist/src/marginNote/index.d.ts +0 -3
  196. package/dist/src/marginNote/index.d.ts.map +0 -1
  197. package/dist/src/marginNote/index.js +0 -1
  198. package/dist/src/marginNote/marginNote.d.ts.map +0 -1
  199. package/dist/src/noteHeader/index.d.ts +0 -3
  200. package/dist/src/noteHeader/index.d.ts.map +0 -1
  201. package/dist/src/noteHeader/index.js +0 -1
  202. package/dist/src/noteHeader/noteHeader.d.ts.map +0 -1
  203. package/dist/src/noteList/index.d.ts +0 -3
  204. package/dist/src/noteList/index.d.ts.map +0 -1
  205. package/dist/src/noteList/index.js +0 -1
  206. package/dist/src/noteList/noteList.d.ts.map +0 -1
  207. package/dist/src/scheme/schemeSwitch.d.ts.map +0 -1
  208. package/dist/src/skipLink/index.d.ts +0 -2
  209. package/dist/src/skipLink/index.d.ts.map +0 -1
  210. package/dist/src/skipLink/index.js +0 -1
  211. package/dist/src/skipLink/skipLink.d.ts.map +0 -1
  212. package/src/codeFigure/index.ts +0 -2
  213. package/src/copyButton/copyButton.ts +0 -59
  214. package/src/drawnTitle/index.ts +0 -2
  215. package/src/figRef/index.ts +0 -2
  216. package/src/linksHere/index.ts +0 -2
  217. package/src/marginNote/index.ts +0 -2
  218. package/src/noteHeader/index.ts +0 -2
  219. package/src/noteList/index.ts +0 -2
  220. package/src/skipLink/index.ts +0 -1
  221. /package/src/{skipLink/skipLink.ts → skip-link/skip-link.ts} +0 -0
@@ -1,5 +1,4 @@
1
1
  export type Point = readonly [x: number, y: number];
2
- /** The colours that become hatching, each drawn in its --draw-<colour> token. */
3
2
  export declare const HATCHES: readonly ["red", "blue", "yellow", "green", "brown", "glass"];
4
3
  export type Hatch = (typeof HATCHES)[number];
5
4
  /** A colour role: a hatching colour; paper, which hides what is behind without colour; or
@@ -12,7 +11,12 @@ export type Look = Readonly<{
12
11
  stroke?: "detail" | "dashed" | "none";
13
12
  }>;
14
13
  export type Shape = (Look & Readonly<{
15
- rect: readonly [x: number, y: number, width: number, height: number];
14
+ rect: readonly [
15
+ x: number,
16
+ y: number,
17
+ width: number,
18
+ height: number
19
+ ];
16
20
  radius?: number;
17
21
  turn?: number;
18
22
  } | {
@@ -26,13 +30,13 @@ export type Shape = (Look & Readonly<{
26
30
  to?: number;
27
31
  closed?: boolean;
28
32
  } | {
29
- poly: ReadonlyArray<Point>;
33
+ poly: readonly Point[];
30
34
  open?: boolean;
31
35
  turn?: number;
32
36
  }
33
37
  /** A smooth curve through its points. */
34
38
  | {
35
- curve: ReadonlyArray<Point>;
39
+ curve: readonly Point[];
36
40
  closed?: boolean;
37
41
  }
38
42
  /** Half an ellipse standing on its base: a loaf, a hill, a dome. */
@@ -43,7 +47,7 @@ export type Shape = (Look & Readonly<{
43
47
  }
44
48
  /** An arrow through its points (two make a straight one), its head on the last. */
45
49
  | {
46
- arrow: ReadonlyArray<Point>;
50
+ arrow: readonly Point[];
47
51
  }
48
52
  /** Short words in the drawing itself, centred on `at` (a baseline) unless aligned to
49
53
  start or end there. */
@@ -57,7 +61,7 @@ export type Shape = (Look & Readonly<{
57
61
  (lower case, digits and hyphens; once per scene; not inside another named group) is
58
62
  what a figure's notes point at. */
59
63
  | Readonly<{
60
- group: ReadonlyArray<Shape>;
64
+ group: readonly Shape[];
61
65
  name?: string;
62
66
  origin?: Point;
63
67
  place?: Point;
@@ -97,6 +101,6 @@ export type Scene = Readonly<{
97
101
  /** The x-range to keep when a phone crops the drawing. */
98
102
  focus?: readonly [from: number, to: number];
99
103
  /** Back to front: later shapes hide earlier ones. */
100
- shapes: ReadonlyArray<Shape>;
104
+ shapes: readonly Shape[];
101
105
  }>;
102
106
  //# sourceMappingURL=scene.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scene.d.ts","sourceRoot":"","sources":["../../../src/drawing/scene.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;AAEpD,iFAAiF;AACjF,eAAO,MAAM,OAAO,YAAI,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AACrF,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7C;uEACuE;AACvE,MAAM,MAAM,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC;AAE7C,MAAM,MAAM,IAAI,GAAG,QAAQ,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;oCACgC;IAChC,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;CACvC,CAAC,CAAC;AAEH,MAAM,MAAM,KAAK,GACb,CAAC,IAAI,GACH,QAAQ,CACJ;IACE,IAAI,EAAE,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE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AAQ,EAAE,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AAC3E,0CAA0C;GACxC;IAAE,MAAM,EAAE,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAA;CAAE,CAC3D,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,QAAQ,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;IAC5C,qDAAqD;IACrD,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;CAC1B,CAAC,CAAC"}
@@ -1,5 +1,8 @@
1
- /* A drawing, described once: the renderer draws it in the style of a note's stage. Writers
2
- do not draw these; they say what they want and an agent writes the Scene. The guide for
3
- that agent, with a worked scene, is DESIGN.md, "Authoring drawings". */
4
- /** The colours that become hatching, each drawn in its --draw-<colour> token. */
5
- export const HATCHES = ["red", "blue", "yellow", "green", "brown", "glass"];
1
+ export const HATCHES = [
2
+ "red",
3
+ "blue",
4
+ "yellow",
5
+ "green",
6
+ "brown",
7
+ "glass",
8
+ ];
@@ -3,6 +3,7 @@ import type { Scene } from "../drawing/scene.ts";
3
3
  import type { StageName } from "../stage/stage.ts";
4
4
  /** Configuration for rendering a drawn title with `view`. */
5
5
  export type ViewConfig = Readonly<{
6
+ id: string;
6
7
  scene: Scene;
7
8
  stage: StageName;
8
9
  label: string;
@@ -12,5 +13,5 @@ export type ViewConfig = Readonly<{
12
13
  title stands on the scene's ground line at the left, the parts list follows. On a phone
13
14
  the drawing, cropped to the scene's focus, stands above the title. Two things, the
14
15
  wrapper and the parts list: spread them into the page. */
15
- export declare const view: <Message>(config: ViewConfig, h: HtmlBuilder<Message>) => ReadonlyArray<Html>;
16
- //# sourceMappingURL=drawnTitle.d.ts.map
16
+ export declare const view: <Message>(config: ViewConfig, h: HtmlBuilder<Message>) => readonly Html[];
17
+ //# sourceMappingURL=drawn-title.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawn-title.d.ts","sourceRoot":"","sources":["../../../src/drawn-title/drawn-title.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAItD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,6DAA6D;AAC7D,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH;;;6DAG6D;AAC7D,eAAO,MAAM,IAAI,GAAI,OAAO,UAClB,UAAU,KACf,WAAW,CAAC,OAAO,CAAC,KACtB,SAAS,IAAI,EAUf,CAAC"}
@@ -6,9 +6,9 @@ import { titlePlacement } from "../drawing/render.js";
6
6
  the drawing, cropped to the scene's focus, stands above the title. Two things, the
7
7
  wrapper and the parts list: spread them into the page. */
8
8
  export const view = (config, h) => {
9
- const { scene, stage, label, title } = config;
9
+ const { id, scene, stage, label, title } = config;
10
10
  return __foldkitBrandViewResult(([
11
- h.div([h.Class("drawn-title"), h.Style(titlePlacement(scene))], [h.h1([], [title]), Drawing.view({ scene, stage, label }, h)]),
11
+ h.div([h.Class("drawn-title"), h.Style(titlePlacement(scene))], [h.h1([], [title]), Drawing.view({ id, scene, stage, label }, h)]),
12
12
  ...Drawing.partsView(scene, h),
13
- ]), "@gjermundgaraba-designs/plain-garden/src/drawnTitle/drawnTitle.js#view");
13
+ ]), "@gjermundgaraba-designs/plain-garden/src/drawn-title/drawn-title.js#view");
14
14
  };
@@ -0,0 +1,3 @@
1
+ export { view } from "./drawn-title.ts";
2
+ export type { ViewConfig } from "./drawn-title.ts";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/drawn-title/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ export { view } from "./drawn-title.js";
@@ -5,4 +5,4 @@ export type ViewConfig = Readonly<{
5
5
  }>;
6
6
  /** A reference to a figure from the prose: "Fig. 3", linked. */
7
7
  export declare const view: <Message>(config: ViewConfig, h: HtmlBuilder<Message>) => Html;
8
- //# sourceMappingURL=figRef.d.ts.map
8
+ //# sourceMappingURL=fig-ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fig-ref.d.ts","sourceRoot":"","sources":["../../../src/fig-ref/fig-ref.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAItD,2DAA2D;AAC3D,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC,CAAC;AAEH,gEAAgE;AAChE,eAAO,MAAM,IAAI,GAAI,OAAO,UAClB,UAAU,KACf,WAAW,CAAC,OAAO,CAAC,KACtB,IAAuE,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
2
  import { figureId } from "../figure/figures.js";
3
3
  /** A reference to a figure from the prose: "Fig. 3", linked. */
4
- export const view = (config, h) => __foldkitBrandViewResult((h.a([h.Href(`#${figureId(config.to)}`)], [`Fig. ${config.to}`])), "@gjermundgaraba-designs/plain-garden/src/figRef/figRef.js#view");
4
+ export const view = (config, h) => __foldkitBrandViewResult((h.a([h.Href(`#${figureId(config.to)}`)], [`Fig. ${config.to}`])), "@gjermundgaraba-designs/plain-garden/src/fig-ref/fig-ref.js#view");
@@ -0,0 +1,3 @@
1
+ export { view } from "./fig-ref.ts";
2
+ export type { ViewConfig } from "./fig-ref.ts";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fig-ref/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export { view } from "./fig-ref.js";
@@ -9,10 +9,10 @@ export type Note = Readonly<{
9
9
  export type ViewConfig = Readonly<{
10
10
  number: number;
11
11
  caption: string;
12
- notes?: ReadonlyArray<Note> | undefined;
12
+ notes?: readonly Note[] | undefined;
13
13
  /** What sits after the caption: a code figure's Copy button. */
14
- tools?: ReadonlyArray<Html>;
15
- body: ReadonlyArray<Html>;
14
+ tools?: readonly Html[];
15
+ body: readonly Html[];
16
16
  }>;
17
17
  /** A numbered figure: its body (a table, an image, code, a drawing), "Fig. N. caption" with
18
18
  any tools, and the notes that point into it. A drawing in a figure takes the same number,
@@ -1 +1 @@
1
- {"version":3,"file":"figure.d.ts","sourceRoot":"","sources":["../../../src/figure/figure.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAItD,MAAM,MAAM,IAAI,GAAG,QAAQ,CAAC;IAC1B;gEAC4D;IAC5D,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;CACpC,CAAC,CAAC;AAEH,wDAAwD;AACxD,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;IACxC,gEAAgE;IAChE,KAAK,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;CAC3B,CAAC,CAAC;AAKH;;uDAEuD;AACvD,eAAO,MAAM,IAAI,GAAI,OAAO,UAAU,UAAU,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IAqC3E,CAAC"}
1
+ {"version":3,"file":"figure.d.ts","sourceRoot":"","sources":["../../../src/figure/figure.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAItD,MAAM,MAAM,IAAI,GAAG,QAAQ,CAAC;IAC1B;gEAC4D;IAC5D,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;CACpC,CAAC,CAAC;AAEH,wDAAwD;AACxD,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,IAAI,EAAE,GAAG,SAAS,CAAC;IACpC,gEAAgE;IAChE,KAAK,CAAC,EAAE,SAAS,IAAI,EAAE,CAAC;IACxB,IAAI,EAAE,SAAS,IAAI,EAAE,CAAC;CACvB,CAAC,CAAC;AAOH;;uDAEuD;AACvD,eAAO,MAAM,IAAI,GAAI,OAAO,UAClB,UAAU,KACf,WAAW,CAAC,OAAO,CAAC,KACtB,IAyCF,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
- import { Array } from "effect";
2
+ import { Array, Predicate } from "effect";
3
3
  import { figureId, noteId } from "./figures.js";
4
- const noteLabel = (note) => __foldkitBrandViewResult((typeof note.at === "number" ? `Line ${note.at}` : note.at.replaceAll("-", " ")), "@gjermundgaraba-designs/plain-garden/src/figure/figure.js#noteLabel");
4
+ const noteLabel = (note) => __foldkitBrandViewResult((Predicate.isNumber(note.at)
5
+ ? `Line ${note.at}`
6
+ : note.at.replaceAll("-", " ")), "@gjermundgaraba-designs/plain-garden/src/figure/figure.js#noteLabel");
5
7
  /** A numbered figure: its body (a table, an image, code, a drawing), "Fig. N. caption" with
6
8
  any tools, and the notes that point into it. A drawing in a figure takes the same number,
7
9
  so its named groups are what the notes point at. */
@@ -1,4 +1,3 @@
1
- /** A figure's id: fig-3. */
2
1
  export declare const figureId: (figure: number) => string;
3
2
  /** The id of a place inside a figure a note can point at: a line of code by its number
4
3
  (fig-3-l5), or a group in a drawing by its name (fig-3-lease). */
@@ -1 +1 @@
1
- {"version":3,"file":"figures.d.ts","sourceRoot":"","sources":["../../../src/figure/figures.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,eAAO,MAAM,QAAQ,WAAY,MAAM,KAAG,MAAyB,CAAC;AAEpE;qEACqE;AACrE,eAAO,MAAM,MAAM,WAAY,MAAM,MAAM,MAAM,GAAG,MAAM,KAAG,MACI,CAAC"}
1
+ {"version":3,"file":"figures.d.ts","sourceRoot":"","sources":["../../../src/figure/figures.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,WAAY,MAAM,KAAG,MAAyB,CAAC;AAEpE;qEACqE;AACrE,eAAO,MAAM,MAAM,WAAY,MAAM,MAAM,MAAM,GAAG,MAAM,KAAG,MACI,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
- /** A figure's id: fig-3. */
2
+ import { Predicate } from "effect";
3
3
  export const figureId = (figure) => __foldkitBrandViewResult((`fig-${figure}`), "@gjermundgaraba-designs/plain-garden/src/figure/figures.js#figureId");
4
4
  /** The id of a place inside a figure a note can point at: a line of code by its number
5
5
  (fig-3-l5), or a group in a drawing by its name (fig-3-lease). */
6
- export const noteId = (figure, at) => __foldkitBrandViewResult((`${figureId(figure)}-${typeof at === "number" ? `l${at}` : at}`), "@gjermundgaraba-designs/plain-garden/src/figure/figures.js#noteId");
6
+ export const noteId = (figure, at) => __foldkitBrandViewResult((`${figureId(figure)}-${Predicate.isNumber(at) ? `l${at}` : at}`), "@gjermundgaraba-designs/plain-garden/src/figure/figures.js#noteId");
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/figure/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/figure/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC"}
@@ -3,6 +3,7 @@ import type { Scene } from "../drawing/scene.ts";
3
3
  import type { StageName } from "../stage/stage.ts";
4
4
  /** Configuration for rendering an illustration with `view`. */
5
5
  export type ViewConfig = Readonly<{
6
+ id: string;
6
7
  scene: Scene;
7
8
  stage: StageName;
8
9
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"illustration.d.ts","sourceRoot":"","sources":["../../../src/illustration/illustration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,+DAA+D;AAC/D,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC,CAAC;AAEH;+EAC+E;AAC/E,eAAO,MAAM,IAAI,GAAI,OAAO,UAAU,UAAU,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IAU3E,CAAC"}
1
+ {"version":3,"file":"illustration.d.ts","sourceRoot":"","sources":["../../../src/illustration/illustration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,+DAA+D;AAC/D,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC,CAAC;AAEH;+EAC+E;AAC/E,eAAO,MAAM,IAAI,GAAI,OAAO,UAClB,UAAU,KACf,WAAW,CAAC,OAAO,CAAC,KACtB,IAWF,CAAC"}
@@ -3,9 +3,9 @@ import * as Drawing from "../drawing/drawing.js";
3
3
  /** A drawing inside the text: across the measure, or small at the right with the text
4
4
  wrapping round it. Pass the note's stage, so it is drawn as the note is. */
5
5
  export const view = (config, h) => {
6
- const { scene, stage, label, caption, isSmall = false } = config;
6
+ const { id, scene, stage, label, caption, isSmall = false } = config;
7
7
  return __foldkitBrandViewResult((h.figure([h.Class(isSmall ? "illustration small" : "illustration")], [
8
- Drawing.view({ scene, stage, label }, h),
8
+ Drawing.view({ id, scene, stage, label }, h),
9
9
  ...Drawing.partsView(scene, h),
10
10
  ...(caption === undefined ? [] : [h.figcaption([], [caption])]),
11
11
  ])), "@gjermundgaraba-designs/plain-garden/src/illustration/illustration.js#view");
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/illustration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/illustration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,21 +1,21 @@
1
1
  export * as Box from "./box/index.ts";
2
2
  export * as Changes from "./changes/index.ts";
3
- export * as CodeFigure from "./codeFigure/index.ts";
4
- export * as CopyButton from "./copyButton/index.ts";
3
+ export * as CodeFigure from "./code-figure/index.ts";
4
+ export * as CopyButton from "./copy-button/index.ts";
5
5
  export * as Diagram from "./diagram/index.ts";
6
6
  export * as Drawing from "./drawing/index.ts";
7
- export * as DrawnTitle from "./drawnTitle/index.ts";
8
- export * as FigRef from "./figRef/index.ts";
7
+ export * as DrawnTitle from "./drawn-title/index.ts";
8
+ export * as FigRef from "./fig-ref/index.ts";
9
9
  export * as Figure from "./figure/index.ts";
10
10
  export * as Illustration from "./illustration/index.ts";
11
- export * as LinksHere from "./linksHere/index.ts";
12
- export * as MarginNote from "./marginNote/index.ts";
11
+ export * as LinksHere from "./links-here/index.ts";
12
+ export * as MarginNote from "./margin-note/index.ts";
13
13
  export * as Masthead from "./masthead/index.ts";
14
- export * as NoteHeader from "./noteHeader/index.ts";
15
- export * as NoteList from "./noteList/index.ts";
14
+ export * as NoteHeader from "./note-header/index.ts";
15
+ export * as NoteList from "./note-list/index.ts";
16
16
  export * as Ring from "./ring/index.ts";
17
17
  export * as Scheme from "./scheme/index.ts";
18
- export * as SkipLink from "./skipLink/index.ts";
18
+ export * as SkipLink from "./skip-link/index.ts";
19
19
  export * as Stage from "./stage/index.ts";
20
20
  export * as Summary from "./summary/index.ts";
21
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AAEtC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAE9C,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAErD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAErD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAE9C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAE9C,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAErD,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAE7C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAE5C,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAC;AAExD,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAErD,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAErD,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAC;AAEjD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAE5C,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAC;AAEjD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAE1C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC"}
package/dist/src/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  export * as Box from "./box/index.js";
2
2
  export * as Changes from "./changes/index.js";
3
- export * as CodeFigure from "./codeFigure/index.js";
4
- export * as CopyButton from "./copyButton/index.js";
3
+ export * as CodeFigure from "./code-figure/index.js";
4
+ export * as CopyButton from "./copy-button/index.js";
5
5
  export * as Diagram from "./diagram/index.js";
6
6
  export * as Drawing from "./drawing/index.js";
7
- export * as DrawnTitle from "./drawnTitle/index.js";
8
- export * as FigRef from "./figRef/index.js";
7
+ export * as DrawnTitle from "./drawn-title/index.js";
8
+ export * as FigRef from "./fig-ref/index.js";
9
9
  export * as Figure from "./figure/index.js";
10
10
  export * as Illustration from "./illustration/index.js";
11
- export * as LinksHere from "./linksHere/index.js";
12
- export * as MarginNote from "./marginNote/index.js";
11
+ export * as LinksHere from "./links-here/index.js";
12
+ export * as MarginNote from "./margin-note/index.js";
13
13
  export * as Masthead from "./masthead/index.js";
14
- export * as NoteHeader from "./noteHeader/index.js";
15
- export * as NoteList from "./noteList/index.js";
14
+ export * as NoteHeader from "./note-header/index.js";
15
+ export * as NoteList from "./note-list/index.js";
16
16
  export * as Ring from "./ring/index.js";
17
17
  export * as Scheme from "./scheme/index.js";
18
- export * as SkipLink from "./skipLink/index.js";
18
+ export * as SkipLink from "./skip-link/index.js";
19
19
  export * as Stage from "./stage/index.js";
20
20
  export * as Summary from "./summary/index.js";
@@ -0,0 +1,3 @@
1
+ export { view } from "./links-here.ts";
2
+ export type { Link, ViewConfig } from "./links-here.ts";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/links-here/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1 @@
1
+ export { view } from "./links-here.js";
@@ -5,9 +5,9 @@ export type Link = Readonly<{
5
5
  }>;
6
6
  /** Configuration for rendering the box with `view`. */
7
7
  export type ViewConfig = Readonly<{
8
- links: ReadonlyArray<Link>;
8
+ links: readonly Link[];
9
9
  }>;
10
10
  /** The notes that link to this one, in a box at the end of it, its heading id `links-here`:
11
11
  one box per note. */
12
12
  export declare const view: <Message>(config: ViewConfig, h: HtmlBuilder<Message>) => Html;
13
- //# sourceMappingURL=linksHere.d.ts.map
13
+ //# sourceMappingURL=links-here.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"links-here.d.ts","sourceRoot":"","sources":["../../../src/links-here/links-here.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAItD,MAAM,MAAM,IAAI,GAAG,QAAQ,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7D,uDAAuD;AACvD,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;CACxB,CAAC,CAAC;AAEH;wBACwB;AACxB,eAAO,MAAM,IAAI,GAAI,OAAO,UAClB,UAAU,KACf,WAAW,CAAC,OAAO,CAAC,KACtB,IAmBA,CAAC"}
@@ -6,6 +6,6 @@ export const view = (config, h) => __foldkitBrandViewResult((Box.view({
6
6
  id: "links-here",
7
7
  heading: "Pages that link here",
8
8
  body: [
9
- h.ul([], config.links.map((link) => __foldkitBrandViewResult((h.keyed("li")(link.href, [], [h.a([h.Href(link.href)], [link.title])])), "@gjermundgaraba-designs/plain-garden/src/linksHere/linksHere.js#anonymous"))),
9
+ h.ul([], config.links.map((link) => __foldkitBrandViewResult((h.keyed("li")(link.href, [], [h.a([h.Href(link.href)], [link.title])])), "@gjermundgaraba-designs/plain-garden/src/links-here/links-here.js#anonymous"))),
10
10
  ],
11
- }, h)), "@gjermundgaraba-designs/plain-garden/src/linksHere/linksHere.js#view");
11
+ }, h)), "@gjermundgaraba-designs/plain-garden/src/links-here/links-here.js#view");
@@ -0,0 +1,3 @@
1
+ export { view } from "./margin-note.ts";
2
+ export type { ViewConfig } from "./margin-note.ts";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/margin-note/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ export { view } from "./margin-note.js";
@@ -2,6 +2,7 @@ import type { Html, HtmlBuilder } from "foldkit/html";
2
2
  import type { Scene } from "../drawing/scene.ts";
3
3
  /** Configuration for rendering a margin note with `view`. */
4
4
  export type ViewConfig = Readonly<{
5
+ id: string;
5
6
  scene: Scene;
6
7
  /** The writer's words, in the hand. */
7
8
  words: string;
@@ -10,4 +11,4 @@ export type ViewConfig = Readonly<{
10
11
  an arrow at the text, and a few words in hand lettering. Put it just before the paragraph
11
12
  it points at. On a narrow screen it sits in the column, the text wrapping round it. */
12
13
  export declare const view: <Message>(config: ViewConfig, h: HtmlBuilder<Message>) => Html;
13
- //# sourceMappingURL=marginNote.d.ts.map
14
+ //# sourceMappingURL=margin-note.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"margin-note.d.ts","sourceRoot":"","sources":["../../../src/margin-note/margin-note.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,6DAA6D;AAC7D,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC;IACb,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH;;0FAE0F;AAC1F,eAAO,MAAM,IAAI,GAAI,OAAO,UAClB,UAAU,KACf,WAAW,CAAC,OAAO,CAAC,KACtB,IAOA,CAAC"}
@@ -3,4 +3,7 @@ import * as Drawing from "../drawing/drawing.js";
3
3
  /** The writer's pencil in the margin beside the next paragraph: a small hatched sketch with
4
4
  an arrow at the text, and a few words in hand lettering. Put it just before the paragraph
5
5
  it points at. On a narrow screen it sits in the column, the text wrapping round it. */
6
- export const view = (config, h) => __foldkitBrandViewResult((h.div([h.Class("margin-note"), h.Role("note")], [Drawing.view({ scene: config.scene, stage: "growing" }, h), h.p([], [config.words])])), "@gjermundgaraba-designs/plain-garden/src/marginNote/marginNote.js#view");
6
+ export const view = (config, h) => __foldkitBrandViewResult((h.div([h.Class("margin-note"), h.Role("note")], [
7
+ Drawing.view({ id: config.id, scene: config.scene, stage: "growing" }, h),
8
+ h.p([], [config.words]),
9
+ ])), "@gjermundgaraba-designs/plain-garden/src/margin-note/margin-note.js#view");
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/masthead/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/masthead/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -8,7 +8,7 @@ export type ViewConfig = Readonly<{
8
8
  name: string;
9
9
  /** Where the site's name links: its front page. */
10
10
  home: string;
11
- items: ReadonlyArray<MenuItem>;
11
+ items: readonly MenuItem[];
12
12
  /** The href of the page being read. */
13
13
  current?: string;
14
14
  /** The nav's accessible name. */
@@ -1 +1 @@
1
- {"version":3,"file":"masthead.d.ts","sourceRoot":"","sources":["../../../src/masthead/masthead.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAA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}
@@ -14,9 +14,7 @@ export const view = (config, h) => {
14
14
  toHref: (href) => __foldkitBrandViewResult((href), "@gjermundgaraba-designs/plain-garden/src/masthead/masthead.js#toHref"),
15
15
  isItemCurrent: (href) => __foldkitBrandViewResult((href === current), "@gjermundgaraba-designs/plain-garden/src/masthead/masthead.js#isItemCurrent"),
16
16
  toView: (render) => __foldkitBrandViewResult((h.nav(render.nav, [
17
- h.ul([h.Class("site-nav")],
18
- // Nav renders one item per href it was given, in order, so each pairs with its own.
19
- Array.map(Array.zip(render.items, items), ([item, { label }]) => __foldkitBrandViewResult((h.keyed("li")(item.value, [], [h.a(item.link, [label])])), "@gjermundgaraba-designs/plain-garden/src/masthead/masthead.js#anonymous~2"))),
17
+ h.ul([h.Class("site-nav")], Array.map(Array.zip(render.items, items), ([item, { label: itemLabel }]) => __foldkitBrandViewResult((h.keyed("li")(item.value, [], [h.a(item.link, [itemLabel])])), "@gjermundgaraba-designs/plain-garden/src/masthead/masthead.js#anonymous~2"))),
20
18
  ])), "@gjermundgaraba-designs/plain-garden/src/masthead/masthead.js#toView"),
21
19
  }),
22
20
  ])), "@gjermundgaraba-designs/plain-garden/src/masthead/masthead.js#view");
@@ -0,0 +1,3 @@
1
+ export { view } from "./note-header.ts";
2
+ export type { ViewConfig } from "./note-header.ts";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/note-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ export { view } from "./note-header.js";
@@ -14,6 +14,7 @@ export type ViewConfig = Readonly<{
14
14
  standfirst?: string;
15
15
  /** The note's drawing and what it shows; the title stands on its ground line. */
16
16
  drawing?: Readonly<{
17
+ id: string;
17
18
  scene: Scene;
18
19
  label: string;
19
20
  }>;
@@ -22,4 +23,4 @@ export type ViewConfig = Readonly<{
22
23
  note's stage draws), a meta line (its stage, when it was started and last updated, its
23
24
  length), and an optional standfirst. */
24
25
  export declare const view: <Message>(config: ViewConfig, h: HtmlBuilder<Message>) => Html;
25
- //# sourceMappingURL=noteHeader.d.ts.map
26
+ //# sourceMappingURL=note-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"note-header.d.ts","sourceRoot":"","sources":["../../../src/note-header/note-header.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAG3C,6DAA6D;AAC7D,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,OAAO,CAAC,EAAE,QAAQ,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjE,CAAC,CAAC;AAEH;;2CAE2C;AAC3C,eAAO,MAAM,IAAI,GAAI,OAAO,UAClB,UAAU,KACf,WAAW,CAAC,OAAO,CAAC,KACtB,IAmCF,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
- import * as DrawnTitle from "../drawnTitle/drawnTitle.js";
2
+ import * as DrawnTitle from "../drawn-title/drawn-title.js";
3
3
  import * as Stage from "../stage/stage.js";
4
4
  import * as Time from "../time/time.js";
5
5
  /** A note's head: the title (standing on the note's drawing, when it has one, drawn as the
@@ -10,7 +10,13 @@ export const view = (config, h) => {
10
10
  return __foldkitBrandViewResult((h.header([h.Class("note-head")], [
11
11
  ...(drawing === undefined
12
12
  ? [h.h1([], [title])]
13
- : DrawnTitle.view({ scene: drawing.scene, stage, label: drawing.label, title }, h)),
13
+ : DrawnTitle.view({
14
+ id: drawing.id,
15
+ scene: drawing.scene,
16
+ stage,
17
+ label: drawing.label,
18
+ title,
19
+ }, h)),
14
20
  h.p([h.Class("meta")], [
15
21
  Stage.view(stage, h),
16
22
  h.span([], ["Started ", Time.view({ datetime: started }, h)]),
@@ -19,6 +25,8 @@ export const view = (config, h) => {
19
25
  : [h.span([], ["Updated ", Time.view({ datetime: updated }, h)])]),
20
26
  ...(length === undefined ? [] : [h.span([], [`${length} read`])]),
21
27
  ]),
22
- ...(standfirst === undefined ? [] : [h.p([h.Class("standfirst")], [standfirst])]),
23
- ])), "@gjermundgaraba-designs/plain-garden/src/noteHeader/noteHeader.js#view");
28
+ ...(standfirst === undefined
29
+ ? []
30
+ : [h.p([h.Class("standfirst")], [standfirst])]),
31
+ ])), "@gjermundgaraba-designs/plain-garden/src/note-header/note-header.js#view");
24
32
  };
@@ -0,0 +1,3 @@
1
+ export { view } from "./note-list.ts";
2
+ export type { NoteLink, ViewConfig } from "./note-list.ts";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/note-list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1 @@
1
+ export { view } from "./note-list.js";
@@ -12,10 +12,10 @@ export type NoteLink = Readonly<{
12
12
  }>;
13
13
  /** Configuration for rendering a note list with `view`. */
14
14
  export type ViewConfig = Readonly<{
15
- notes: ReadonlyArray<NoteLink>;
15
+ notes: readonly NoteLink[];
16
16
  }>;
17
17
  /** A curated list of notes: each with its stage mark in the margin column, its title, a flag
18
18
  when it is fresh, and a line with its stage and what it holds. The list keeps the order
19
19
  it is given: the writer's, not the calendar's. */
20
20
  export declare const view: <Message>(config: ViewConfig, h: HtmlBuilder<Message>) => Html;
21
- //# sourceMappingURL=noteList.d.ts.map
21
+ //# sourceMappingURL=note-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"note-list.d.ts","sourceRoot":"","sources":["../../../src/note-list/note-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;gBACY;IACZ,IAAI,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;CAC1B,CAAC,CAAC;AAEH,2DAA2D;AAC3D,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAA;CAAE,CAAC,CAAC;AAElE;;qDAEqD;AACrD,eAAO,MAAM,IAAI,GAAI,OAAO,UAClB,UAAU,KACf,WAAW,CAAC,OAAO,CAAC,KACtB,IAiCA,CAAC"}
@@ -8,8 +8,13 @@ export const view = (config, h) => __foldkitBrandViewResult((h.ul([h.Class("note
8
8
  h.div([], [
9
9
  h.p([], [
10
10
  h.a([h.Href(note.href)], [note.title]),
11
- ...(note.flag === undefined ? [] : [h.span([h.Class("flag")], [note.flag])]),
11
+ ...(note.flag === undefined
12
+ ? []
13
+ : [h.span([h.Class("flag")], [note.flag])]),
14
+ ]),
15
+ h.p([h.Class("about")], [
16
+ Stage.word(note.stage),
17
+ ...(note.about === undefined ? [] : [` · ${note.about}`]),
12
18
  ]),
13
- h.p([h.Class("about")], [Stage.word(note.stage), ...(note.about === undefined ? [] : [` · ${note.about}`])]),
14
19
  ]),
15
- ])), "@gjermundgaraba-designs/plain-garden/src/noteList/noteList.js#anonymous")))), "@gjermundgaraba-designs/plain-garden/src/noteList/noteList.js#view");
20
+ ])), "@gjermundgaraba-designs/plain-garden/src/note-list/note-list.js#anonymous")))), "@gjermundgaraba-designs/plain-garden/src/note-list/note-list.js#view");
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ring/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ring/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Html, HtmlBuilder } from "foldkit/html";
2
- import type { Link } from "../linksHere/linksHere.ts";
2
+ import type { Link } from "../links-here/links-here.ts";
3
3
  /** Configuration for rendering the ring with `view`. */
4
4
  export type ViewConfig = Readonly<{
5
5
  previous?: Link;