@pg-labs-incubator/cobweb 0.0.0-stage → 0.0.2

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 (320) hide show
  1. package/LICENSE +163 -0
  2. package/README.md +82 -2
  3. package/package.json +112 -3
  4. package/src/action/action.yaml +291 -0
  5. package/src/action/button-group.yaml +56 -0
  6. package/src/action/button.yaml +239 -0
  7. package/src/action/split-button.yaml +87 -0
  8. package/src/color/color.yaml +181 -0
  9. package/src/color/palette.yaml +147 -0
  10. package/src/container/card.yaml +170 -0
  11. package/src/container/corner-radius.yaml +50 -0
  12. package/src/container/elevation.yaml +19 -0
  13. package/src/design.yaml +41 -0
  14. package/src/feedback/feedback.yaml +225 -0
  15. package/src/icon/icon-font.yaml +28 -0
  16. package/src/icon/icon.yaml +31 -0
  17. package/src/input/date-picker.yaml +144 -0
  18. package/src/input/date-range-input.yaml +162 -0
  19. package/src/input/range-slider.yaml +161 -0
  20. package/src/input/select.yaml +230 -0
  21. package/src/input/slider.yaml +172 -0
  22. package/src/input/text-field.yaml +240 -0
  23. package/src/input/time-picker.yaml +220 -0
  24. package/src/motion/motion.yaml +371 -0
  25. package/src/navigation/app-bar.yaml +147 -0
  26. package/src/navigation/navigation.yaml +339 -0
  27. package/src/navigation/scroll.yaml +23 -0
  28. package/src/navigation/search.yaml +112 -0
  29. package/src/navigation/tabs.yaml +144 -0
  30. package/src/navigation/toolbar.yaml +130 -0
  31. package/src/selection/checkbox.yaml +162 -0
  32. package/src/selection/chip.yaml +219 -0
  33. package/src/selection/radio.yaml +125 -0
  34. package/src/selection/segmented-group.yaml +11 -0
  35. package/src/selection/segmented.yaml +69 -0
  36. package/src/selection/switch.yaml +209 -0
  37. package/src/spacing/measurement.yaml +80 -0
  38. package/src/state/state.yaml +38 -0
  39. package/src/surface/surface.yaml +483 -0
  40. package/src/text/line-height.yaml +144 -0
  41. package/src/text/typeface.yaml +31 -0
  42. package/src/text/typescale.yaml +726 -0
  43. package/target/esbuild/action/action.css +1 -0
  44. package/target/esbuild/action/base.jsx +1 -0
  45. package/target/esbuild/action/button.jsx +17 -0
  46. package/target/esbuild/action/fab-menu-context.jsx +1 -0
  47. package/target/esbuild/action/fab-menu.jsx +15 -0
  48. package/target/esbuild/action/fab.jsx +7 -0
  49. package/target/esbuild/action/group.jsx +22 -0
  50. package/target/esbuild/action/icon-button.jsx +5 -0
  51. package/target/esbuild/action/index.jsx +1 -0
  52. package/target/esbuild/action/split-button.jsx +12 -0
  53. package/target/esbuild/color/contrast.jsx +1 -0
  54. package/target/esbuild/color/dynamic.jsx +1 -0
  55. package/target/esbuild/color/hct.jsx +1 -0
  56. package/target/esbuild/color/index.css +1 -0
  57. package/target/esbuild/color/index.jsx +1 -0
  58. package/target/esbuild/color/palette.jsx +1 -0
  59. package/target/esbuild/color/scheme.jsx +1 -0
  60. package/target/esbuild/color/temperature.jsx +1 -0
  61. package/target/esbuild/container/card.css +1 -0
  62. package/target/esbuild/container/card.jsx +1 -0
  63. package/target/esbuild/container/elevation-shadow.css +1 -0
  64. package/target/esbuild/container/elevation-shadow.jsx +1 -0
  65. package/target/esbuild/container/index.jsx +1 -0
  66. package/target/esbuild/dom/client.jsx +1 -0
  67. package/target/esbuild/dom/index.jsx +1 -0
  68. package/target/esbuild/dom/server.jsx +1 -0
  69. package/target/esbuild/dom/types.jsx +1 -0
  70. package/target/esbuild/feedback/badge.jsx +15 -0
  71. package/target/esbuild/feedback/feedback.css +1 -0
  72. package/target/esbuild/feedback/focus.jsx +1 -0
  73. package/target/esbuild/feedback/index.jsx +1 -0
  74. package/target/esbuild/feedback/loading.jsx +7 -0
  75. package/target/esbuild/feedback/observe.jsx +1 -0
  76. package/target/esbuild/feedback/progress.jsx +35 -0
  77. package/target/esbuild/feedback/snackbar.jsx +23 -0
  78. package/target/esbuild/feedback/tooltip.jsx +24 -0
  79. package/target/esbuild/icon/icon.css +1 -0
  80. package/target/esbuild/icon/icon.jsx +1 -0
  81. package/target/esbuild/icon/index.jsx +1 -0
  82. package/target/esbuild/index.css +1 -0
  83. package/target/esbuild/index.jsx +1 -0
  84. package/target/esbuild/input/autocomplete.jsx +5 -0
  85. package/target/esbuild/input/base.jsx +4 -0
  86. package/target/esbuild/input/date-picker.css +1 -0
  87. package/target/esbuild/input/date-picker.jsx +104 -0
  88. package/target/esbuild/input/date-range-input.css +1 -0
  89. package/target/esbuild/input/date-time.jsx +21 -0
  90. package/target/esbuild/input/index.css +1 -0
  91. package/target/esbuild/input/index.jsx +1 -0
  92. package/target/esbuild/input/paired-input.jsx +1 -0
  93. package/target/esbuild/input/picker-dialog.css +1 -0
  94. package/target/esbuild/input/picker-dialog.jsx +14 -0
  95. package/target/esbuild/input/select.css +1 -0
  96. package/target/esbuild/input/select.jsx +63 -0
  97. package/target/esbuild/input/slider.css +1 -0
  98. package/target/esbuild/input/slider.jsx +51 -0
  99. package/target/esbuild/input/text-field.css +1 -0
  100. package/target/esbuild/input/text-field.jsx +67 -0
  101. package/target/esbuild/input/time-picker.css +1 -0
  102. package/target/esbuild/input/time-picker.jsx +29 -0
  103. package/target/esbuild/motion/frame.jsx +1 -0
  104. package/target/esbuild/motion/index.css +1 -0
  105. package/target/esbuild/motion/index.jsx +1 -0
  106. package/target/esbuild/motion/material.jsx +1 -0
  107. package/target/esbuild/motion/motion.jsx +1 -0
  108. package/target/esbuild/motion/spring.jsx +1 -0
  109. package/target/esbuild/motion/transition.css +1 -0
  110. package/target/esbuild/motion/transition.jsx +1 -0
  111. package/target/esbuild/motion/velocity.jsx +1 -0
  112. package/target/esbuild/navigation/app-bar.jsx +51 -0
  113. package/target/esbuild/navigation/base.jsx +1 -0
  114. package/target/esbuild/navigation/drawer.jsx +25 -0
  115. package/target/esbuild/navigation/index.jsx +1 -0
  116. package/target/esbuild/navigation/navigation.css +1 -0
  117. package/target/esbuild/navigation/navigation.jsx +29 -0
  118. package/target/esbuild/navigation/scroll.jsx +1 -0
  119. package/target/esbuild/navigation/search.jsx +29 -0
  120. package/target/esbuild/navigation/tabs.jsx +7 -0
  121. package/target/esbuild/navigation/toolbar.jsx +23 -0
  122. package/target/esbuild/selection/base.jsx +1 -0
  123. package/target/esbuild/selection/checkbox.jsx +14 -0
  124. package/target/esbuild/selection/chip.jsx +23 -0
  125. package/target/esbuild/selection/index.jsx +1 -0
  126. package/target/esbuild/selection/radio.jsx +9 -0
  127. package/target/esbuild/selection/segmented.jsx +15 -0
  128. package/target/esbuild/selection/selection.css +1 -0
  129. package/target/esbuild/selection/switch.jsx +14 -0
  130. package/target/esbuild/shape/corner-rounding.jsx +1 -0
  131. package/target/esbuild/shape/cubic.jsx +1 -0
  132. package/target/esbuild/shape/index.jsx +1 -0
  133. package/target/esbuild/shape/material-shapes.jsx +1 -0
  134. package/target/esbuild/shape/morph.jsx +1 -0
  135. package/target/esbuild/shape/path.jsx +1 -0
  136. package/target/esbuild/shape/point.jsx +1 -0
  137. package/target/esbuild/shape/rounded-polygon.jsx +1 -0
  138. package/target/esbuild/shape/shapes.jsx +1 -0
  139. package/target/esbuild/spacing/index.jsx +1 -0
  140. package/target/esbuild/state/component.css +1 -0
  141. package/target/esbuild/state/component.jsx +1 -0
  142. package/target/esbuild/state/controller.jsx +1 -0
  143. package/target/esbuild/state/index.jsx +1 -0
  144. package/target/esbuild/state/ripple.jsx +1 -0
  145. package/target/esbuild/state/state.jsx +1 -0
  146. package/target/esbuild/state/style.jsx +1 -0
  147. package/target/esbuild/surface/carousel-layout.jsx +1 -0
  148. package/target/esbuild/surface/carousel.css +1 -0
  149. package/target/esbuild/surface/carousel.jsx +10 -0
  150. package/target/esbuild/surface/dialog.jsx +35 -0
  151. package/target/esbuild/surface/divider.jsx +1 -0
  152. package/target/esbuild/surface/drag.jsx +1 -0
  153. package/target/esbuild/surface/gestures.css +1 -0
  154. package/target/esbuild/surface/gestures.jsx +7 -0
  155. package/target/esbuild/surface/index.css +1 -0
  156. package/target/esbuild/surface/index.jsx +1 -0
  157. package/target/esbuild/surface/interactive.jsx +1 -0
  158. package/target/esbuild/surface/list-patterns.jsx +26 -0
  159. package/target/esbuild/surface/list.css +1 -0
  160. package/target/esbuild/surface/list.jsx +9 -0
  161. package/target/esbuild/surface/menu.css +1 -0
  162. package/target/esbuild/surface/menu.jsx +12 -0
  163. package/target/esbuild/surface/scaffold.jsx +47 -0
  164. package/target/esbuild/surface/sheet.jsx +21 -0
  165. package/target/esbuild/surface/side-sheet.jsx +17 -0
  166. package/target/esbuild/surface/slots.jsx +1 -0
  167. package/target/esbuild/surface/surface.css +1 -0
  168. package/target/esbuild/surface/surface.jsx +1 -0
  169. package/target/esbuild/text/index.css +1 -0
  170. package/target/esbuild/text/index.jsx +1 -0
  171. package/target/esbuild/text/text.css +1 -0
  172. package/target/esbuild/text/text.jsx +3 -0
  173. package/target/esbuild/text/typography.css +1 -0
  174. package/target/esbuild/text/typography.jsx +1 -0
  175. package/target/esbuild/util/box-side.jsx +1 -0
  176. package/target/esbuild/util/debug.jsx +1 -0
  177. package/target/esbuild/util/dom.jsx +1 -0
  178. package/target/esbuild/util/event.jsx +1 -0
  179. package/target/esbuild/util/index.jsx +1 -0
  180. package/target/esbuild/util/preconditions.jsx +1 -0
  181. package/target/esbuild/util/reactive.jsx +1 -0
  182. package/target/tsc/action/action.css.d.ts +3 -0
  183. package/target/tsc/action/base.d.ts +211 -0
  184. package/target/tsc/action/button.d.ts +126 -0
  185. package/target/tsc/action/fab-menu-context.d.ts +16 -0
  186. package/target/tsc/action/fab-menu.d.ts +112 -0
  187. package/target/tsc/action/fab.d.ts +98 -0
  188. package/target/tsc/action/group.d.ts +166 -0
  189. package/target/tsc/action/icon-button.d.ts +79 -0
  190. package/target/tsc/action/index.d.ts +24 -0
  191. package/target/tsc/action/split-button.d.ts +78 -0
  192. package/target/tsc/color/contrast.d.ts +48 -0
  193. package/target/tsc/color/dynamic.d.ts +203 -0
  194. package/target/tsc/color/hct.d.ts +114 -0
  195. package/target/tsc/color/index.css.d.ts +3 -0
  196. package/target/tsc/color/index.d.ts +23 -0
  197. package/target/tsc/color/palette.d.ts +30 -0
  198. package/target/tsc/color/scheme.d.ts +446 -0
  199. package/target/tsc/color/temperature.d.ts +24 -0
  200. package/target/tsc/container/card.css.d.ts +3 -0
  201. package/target/tsc/container/card.d.ts +110 -0
  202. package/target/tsc/container/elevation-shadow.css.d.ts +3 -0
  203. package/target/tsc/container/elevation-shadow.d.ts +23 -0
  204. package/target/tsc/container/index.d.ts +44 -0
  205. package/target/tsc/dom/client.d.ts +387 -0
  206. package/target/tsc/dom/index.d.ts +93 -0
  207. package/target/tsc/dom/server.d.ts +65 -0
  208. package/target/tsc/dom/types.d.ts +134 -0
  209. package/target/tsc/feedback/badge.d.ts +116 -0
  210. package/target/tsc/feedback/feedback.css.d.ts +3 -0
  211. package/target/tsc/feedback/focus.d.ts +20 -0
  212. package/target/tsc/feedback/index.d.ts +17 -0
  213. package/target/tsc/feedback/loading.d.ts +194 -0
  214. package/target/tsc/feedback/observe.d.ts +75 -0
  215. package/target/tsc/feedback/progress.d.ts +281 -0
  216. package/target/tsc/feedback/snackbar.d.ts +398 -0
  217. package/target/tsc/feedback/tooltip.d.ts +326 -0
  218. package/target/tsc/icon/icon.css.d.ts +3 -0
  219. package/target/tsc/icon/icon.d.ts +69 -0
  220. package/target/tsc/icon/index.d.ts +13 -0
  221. package/target/tsc/index.css.d.ts +3 -0
  222. package/target/tsc/index.d.ts +7 -0
  223. package/target/tsc/input/autocomplete.d.ts +119 -0
  224. package/target/tsc/input/base.d.ts +282 -0
  225. package/target/tsc/input/date-picker.css.d.ts +3 -0
  226. package/target/tsc/input/date-picker.d.ts +351 -0
  227. package/target/tsc/input/date-range-input.css.d.ts +3 -0
  228. package/target/tsc/input/date-time.d.ts +171 -0
  229. package/target/tsc/input/index.css.d.ts +3 -0
  230. package/target/tsc/input/index.d.ts +27 -0
  231. package/target/tsc/input/paired-input.d.ts +435 -0
  232. package/target/tsc/input/picker-dialog.css.d.ts +3 -0
  233. package/target/tsc/input/picker-dialog.d.ts +84 -0
  234. package/target/tsc/input/select.css.d.ts +3 -0
  235. package/target/tsc/input/select.d.ts +267 -0
  236. package/target/tsc/input/slider.css.d.ts +3 -0
  237. package/target/tsc/input/slider.d.ts +372 -0
  238. package/target/tsc/input/text-field.css.d.ts +3 -0
  239. package/target/tsc/input/text-field.d.ts +415 -0
  240. package/target/tsc/input/time-picker.css.d.ts +3 -0
  241. package/target/tsc/input/time-picker.d.ts +212 -0
  242. package/target/tsc/motion/frame.d.ts +36 -0
  243. package/target/tsc/motion/index.css.d.ts +3 -0
  244. package/target/tsc/motion/index.d.ts +34 -0
  245. package/target/tsc/motion/material.d.ts +110 -0
  246. package/target/tsc/motion/motion.d.ts +235 -0
  247. package/target/tsc/motion/spring.d.ts +223 -0
  248. package/target/tsc/motion/transition.css.d.ts +3 -0
  249. package/target/tsc/motion/transition.d.ts +597 -0
  250. package/target/tsc/motion/velocity.d.ts +54 -0
  251. package/target/tsc/navigation/app-bar.d.ts +473 -0
  252. package/target/tsc/navigation/base.d.ts +331 -0
  253. package/target/tsc/navigation/drawer.d.ts +301 -0
  254. package/target/tsc/navigation/index.d.ts +25 -0
  255. package/target/tsc/navigation/navigation.css.d.ts +3 -0
  256. package/target/tsc/navigation/navigation.d.ts +537 -0
  257. package/target/tsc/navigation/scroll.d.ts +218 -0
  258. package/target/tsc/navigation/search.d.ts +332 -0
  259. package/target/tsc/navigation/tabs.d.ts +497 -0
  260. package/target/tsc/navigation/toolbar.d.ts +248 -0
  261. package/target/tsc/selection/base.d.ts +100 -0
  262. package/target/tsc/selection/checkbox.d.ts +194 -0
  263. package/target/tsc/selection/chip.d.ts +358 -0
  264. package/target/tsc/selection/index.d.ts +21 -0
  265. package/target/tsc/selection/radio.d.ts +198 -0
  266. package/target/tsc/selection/segmented.d.ts +333 -0
  267. package/target/tsc/selection/selection.css.d.ts +3 -0
  268. package/target/tsc/selection/switch.d.ts +165 -0
  269. package/target/tsc/shape/corner-rounding.d.ts +36 -0
  270. package/target/tsc/shape/cubic.d.ts +215 -0
  271. package/target/tsc/shape/index.d.ts +35 -0
  272. package/target/tsc/shape/material-shapes.d.ts +176 -0
  273. package/target/tsc/shape/morph.d.ts +91 -0
  274. package/target/tsc/shape/path.d.ts +177 -0
  275. package/target/tsc/shape/point.d.ts +165 -0
  276. package/target/tsc/shape/rounded-polygon.d.ts +289 -0
  277. package/target/tsc/shape/shapes.d.ts +76 -0
  278. package/target/tsc/spacing/index.d.ts +19 -0
  279. package/target/tsc/state/component.css.d.ts +3 -0
  280. package/target/tsc/state/component.d.ts +276 -0
  281. package/target/tsc/state/controller.d.ts +257 -0
  282. package/target/tsc/state/index.d.ts +19 -0
  283. package/target/tsc/state/ripple.d.ts +50 -0
  284. package/target/tsc/state/state.d.ts +129 -0
  285. package/target/tsc/state/style.d.ts +22 -0
  286. package/target/tsc/surface/carousel-layout.d.ts +212 -0
  287. package/target/tsc/surface/carousel.css.d.ts +3 -0
  288. package/target/tsc/surface/carousel.d.ts +231 -0
  289. package/target/tsc/surface/dialog.d.ts +582 -0
  290. package/target/tsc/surface/divider.d.ts +92 -0
  291. package/target/tsc/surface/drag.d.ts +92 -0
  292. package/target/tsc/surface/gestures.css.d.ts +3 -0
  293. package/target/tsc/surface/gestures.d.ts +292 -0
  294. package/target/tsc/surface/index.css.d.ts +3 -0
  295. package/target/tsc/surface/index.d.ts +29 -0
  296. package/target/tsc/surface/interactive.d.ts +22 -0
  297. package/target/tsc/surface/list-patterns.d.ts +384 -0
  298. package/target/tsc/surface/list.css.d.ts +3 -0
  299. package/target/tsc/surface/list.d.ts +340 -0
  300. package/target/tsc/surface/menu.css.d.ts +3 -0
  301. package/target/tsc/surface/menu.d.ts +590 -0
  302. package/target/tsc/surface/scaffold.d.ts +337 -0
  303. package/target/tsc/surface/sheet.d.ts +384 -0
  304. package/target/tsc/surface/side-sheet.d.ts +183 -0
  305. package/target/tsc/surface/slots.d.ts +21 -0
  306. package/target/tsc/surface/surface.css.d.ts +3 -0
  307. package/target/tsc/surface/surface.d.ts +192 -0
  308. package/target/tsc/text/index.css.d.ts +3 -0
  309. package/target/tsc/text/index.d.ts +18 -0
  310. package/target/tsc/text/text.css.d.ts +3 -0
  311. package/target/tsc/text/text.d.ts +94 -0
  312. package/target/tsc/text/typography.css.d.ts +3 -0
  313. package/target/tsc/text/typography.d.ts +82 -0
  314. package/target/tsc/util/box-side.d.ts +76 -0
  315. package/target/tsc/util/debug.d.ts +20 -0
  316. package/target/tsc/util/dom.d.ts +35 -0
  317. package/target/tsc/util/event.d.ts +93 -0
  318. package/target/tsc/util/index.d.ts +12 -0
  319. package/target/tsc/util/preconditions.d.ts +79 -0
  320. package/target/tsc/util/reactive.d.ts +36 -0
@@ -0,0 +1,192 @@
1
+ import type { JSX } from "solid-js";
2
+ import type { DomProps } from "..";
3
+ import type { InteractableComponent, InteractableProps } from "../state";
4
+ import { InteractableController } from "../state/controller";
5
+ import "../container/elevation-shadow.css";
6
+ import "./surface.css";
7
+ /**
8
+ * Material surface color roles.
9
+ *
10
+ * | Value | Container role | Content role |
11
+ * | ----------------------------- | --------------------------- | -------------------- |
12
+ * | `"surface"` | `surface` | `onSurface` |
13
+ * | `"surface-dim"` | `surfaceDim` | `onSurface` |
14
+ * | `"surface-bright"` | `surfaceBright` | `onSurface` |
15
+ * | `"surface-container-lowest"` | `surfaceContainerLowest` | `onSurface` |
16
+ * | `"surface-container-low"` | `surfaceContainerLow` | `onSurface` |
17
+ * | `"surface-container"` | `surfaceContainer` | `onSurface` |
18
+ * | `"surface-container-high"` | `surfaceContainerHigh` | `onSurface` |
19
+ * | `"surface-container-highest"` | `surfaceContainerHighest` | `onSurface` |
20
+ * | `"inverse"` | `inverseSurface` | `inverseOnSurface` |
21
+ * | `"primary"` | `primary` | `onPrimary` |
22
+ * | `"secondary"` | `secondary` | `onSecondary` |
23
+ * | `"tertiary"` | `tertiary` | `onTertiary` |
24
+ * | `"error"` | `error` | `onError` |
25
+ */
26
+ export type SurfaceColor = "surface" | "surface-dim" | "surface-bright" | "surface-container-lowest" | "surface-container-low" | "surface-container" | "surface-container-high" | "surface-container-highest" | "inverse" | "primary" | "secondary" | "tertiary" | "error";
27
+ /**
28
+ * Properties accepted by {@link Surface}.
29
+ */
30
+ export type SurfaceBaseProps = DomProps<HTMLDivElement, Omit<JSX.HTMLAttributes<HTMLDivElement>, "role" | "tabindex" | "aria-disabled" | "aria-selected">> & {
31
+ /**
32
+ * Surface color role.
33
+ *
34
+ * The color applies to the container; content uses the matching content role. See
35
+ * {@link SurfaceColor}.
36
+ *
37
+ * @defaultValue `"surface-container"`
38
+ */
39
+ color?: SurfaceColor | undefined;
40
+ /**
41
+ * Material elevation level.
42
+ *
43
+ * The level selects the `cw-Elevation` shadow of the surface.
44
+ *
45
+ * @defaultValue `0`
46
+ */
47
+ elevation?: 0 | 1 | 2 | 3 | 4 | 5 | undefined;
48
+ /**
49
+ * Named corner shape or a CSS `border-radius` value.
50
+ *
51
+ * Named shapes map to the `cw-CornerRadius` roles. When omitted, the `cw-Surface-shape` role
52
+ * applies, which an expressive theme enlarges; an explicit shape is never overridden by a
53
+ * theme.
54
+ */
55
+ shape?: "none" | "extra-small" | "small" | "medium" | "large" | "extra-large" | "full" | string | undefined;
56
+ /**
57
+ * Surface is a button.
58
+ *
59
+ * When `true`, the surface has the `button` role, is keyboard focusable, activates with Enter
60
+ * and Space, and renders hover, focus, and press state layers.
61
+ *
62
+ * @defaultValue `false`
63
+ */
64
+ clickable?: boolean | undefined;
65
+ /**
66
+ * Surface is an independent toggle.
67
+ *
68
+ * When `true`, the surface has the `button` role and an `aria-pressed` state which activation
69
+ * toggles. Activating a nested interactive element, or a nested surface, does not toggle it.
70
+ *
71
+ * @defaultValue `false`
72
+ */
73
+ selectable?: boolean | undefined;
74
+ /**
75
+ * Controlled selection state.
76
+ *
77
+ * Supplying this property, even as `undefined`, makes selection controlled: activation
78
+ * requests a change through {@link SurfaceBaseProps.onSelectedChange | `onSelectedChange`}
79
+ * and the parent must update this property.
80
+ */
81
+ selected?: boolean | undefined;
82
+ /**
83
+ * Initial selection state of an uncontrolled selectable surface.
84
+ *
85
+ * @remarks
86
+ * This is **not** reactive.
87
+ *
88
+ * @defaultValue `false`
89
+ */
90
+ defaultSelected?: boolean | undefined;
91
+ /**
92
+ * Surface is disabled.
93
+ *
94
+ * A disabled interactive surface is removed from sequential focus, does not activate, and
95
+ * ignores programmatic clicks. A disabled surface is rendered at the `disabledOpacity` role.
96
+ *
97
+ * @defaultValue `false`
98
+ */
99
+ disabled?: boolean | undefined;
100
+ /**
101
+ * Sequential focus index.
102
+ *
103
+ * An interactive surface defaults to `0`; a disabled interactive surface always uses `-1`.
104
+ */
105
+ tabIndex?: number | undefined;
106
+ /**
107
+ * Handle activation of a selectable surface.
108
+ *
109
+ * Invoked for controlled and uncontrolled surfaces, *before* an uncontrolled surface updates
110
+ * its own state.
111
+ *
112
+ * @remarks
113
+ * This is **not** reactive.
114
+ *
115
+ * @param selected - requested selection state
116
+ * @param event - activating click event
117
+ */
118
+ onSelectedChange?: ((selected: boolean, event: Event) => void) | undefined;
119
+ };
120
+ /**
121
+ * Surface properties, including the standard Cobweb interaction callbacks.
122
+ */
123
+ export type SurfaceProps = InteractableProps<SurfaceBaseProps>;
124
+ /**
125
+ * Client controller of a {@link Surface}.
126
+ *
127
+ * The controller owns the surface's classes, button semantics and keyboard activation. While a
128
+ * surface is neither clickable nor selectable, it installs no activation listeners and enables no
129
+ * interaction states.
130
+ */
131
+ export declare class SurfaceController extends InteractableController<SurfaceBaseProps> {
132
+ #private;
133
+ /**
134
+ * Construct a new `SurfaceController`.
135
+ *
136
+ * @param props - component properties
137
+ */
138
+ constructor(props: SurfaceBaseProps);
139
+ /**
140
+ * Apply local properties to component state and styling.
141
+ *
142
+ * @see {@link ../dom/client#DomController.applyComponentProps}
143
+ */
144
+ protected applyComponentProps(): void;
145
+ /**
146
+ * Toggle a selectable surface when it, rather than a nested control, is activated.
147
+ *
148
+ * @param event - interaction event received by the controller
149
+ */
150
+ protected onEvent(event: Event): void;
151
+ /**
152
+ * Render the component's element tree.
153
+ *
154
+ * @param children - nested component children, possibly an accessor
155
+ * @returns rendered component elements
156
+ * @see {@link ../dom/client#DomController.render}
157
+ */
158
+ protected render(children: JSX.Element): JSX.Element;
159
+ /**
160
+ * Release activation listeners when the controller is disposed.
161
+ *
162
+ * @see {@link ../dom/client#DomController.onControllerCleanup}
163
+ */
164
+ protected onControllerCleanup(): void;
165
+ }
166
+ /**
167
+ * Material surface container.
168
+ *
169
+ * A surface is a container on a Material color role, with an optional corner shape and elevation.
170
+ * It can also act as a button, or as an independent toggle, while keeping native keyboard and ARIA
171
+ * semantics available to assistive technology.
172
+ *
173
+ * # States
174
+ *
175
+ * A {@link SurfaceBaseProps.clickable | clickable} or {@link SurfaceBaseProps.selectable |
176
+ * selectable} surface has the `button` role and enters the {@link FocusState | focus}, {@link
177
+ * HoverState | hover}, and {@link PressState | press} interaction states, unless it is {@link
178
+ * SurfaceBaseProps.disabled | disabled}. A selectable surface exposes its selection through
179
+ * `aria-pressed`; a selected surface uses the selected container and content colors.
180
+ *
181
+ * # Design
182
+ *
183
+ * Surface design is controlled through the [`cw-Surface`](./surface.yaml) component design
184
+ * attribute. The `cw-Surface-clickable`, `cw-Surface-selectable`, `cw-Surface-selected`, and
185
+ * `cw-Surface-disabled` classes reflect the corresponding properties, and `cw-Surface-<state>`
186
+ * classes reflect the entered interaction state. State layers use the `cw-State` layer opacities
187
+ * on the content color, and the focus indicator uses the `cw-State` focus indicator roles.
188
+ *
189
+ * @param props - component properties
190
+ * @returns rendered component elements
191
+ */
192
+ export declare const Surface: InteractableComponent<SurfaceBaseProps>;
@@ -0,0 +1,3 @@
1
+ // SPDX-License-Identifier: MPL-2.0
2
+
3
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Typography and typescale definitions.
3
+ *
4
+ * This module defines the {@link Text} component, which renders text according to the baseline
5
+ * and emphasized styles of the [`cw-Typescale`](./typescale.yaml) design attribute, and the {@link
6
+ * Typography} component, which selects the [`cw-LineHeight`](./line-height.yaml) category of a
7
+ * subtree by language.
8
+ *
9
+ * Fonts are named by the [`cw-Typeface`](./typeface.yaml) design attribute; Cobweb does not
10
+ * bundle them, so applications load the named fonts, for example with `@font-face` rules. The
11
+ * root stylesheet defines the `cw-LineHeight` properties referenced by every typescale role.
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+ export type { TextEmphasis, TextProps, TextRole, TextSize, Typescale } from "./text";
16
+ export { Text } from "./text";
17
+ export type { TypographyHeight, TypographyProps } from "./typography";
18
+ export { Typography } from "./typography";
@@ -0,0 +1,3 @@
1
+ // SPDX-License-Identifier: MPL-2.0
2
+
3
+ export {};
@@ -0,0 +1,94 @@
1
+ import type { JSX, VoidProps } from "solid-js";
2
+ import type { DomComponent, DomProps } from "..";
3
+ import "./text.css";
4
+ /**
5
+ * {@link Text} display role enumeration.
6
+ *
7
+ * This equals the top-level group roles of the [`cw-Typescale`](./typescale.yaml) design
8
+ * attribute.
9
+ *
10
+ * @see {@link Typescale}
11
+ */
12
+ export type TextRole = "body" | "display" | "headline" | "label" | "title";
13
+ /**
14
+ * {@link Text} size enumeration.
15
+ *
16
+ * This equals the {@link TextRole | role} size group roles of the
17
+ * [`cw-Typescale`](./typescale.yaml) design attribute.
18
+ *
19
+ * @see {@link Typescale}
20
+ */
21
+ export type TextSize = "large" | "medium" | "small";
22
+ /**
23
+ * {@link Text} emphasis enumeration.
24
+ *
25
+ * Emphasized styles use the same role and size as their baseline counterparts, with a heavier
26
+ * weight and the tracking specified by Material 3 Expressive.
27
+ *
28
+ * @see {@link Typescale}
29
+ */
30
+ export type TextEmphasis = "emphasized";
31
+ /**
32
+ * Typescale a {@link Text | text} is rendered with.
33
+ *
34
+ * Typescale may be a {@link TextRole | role}, {@link TextSize | size}, and optional {@link
35
+ * TextEmphasis | emphasis}, delimited by hyphens, or just a role. When set to just a role, the
36
+ * default `"large"` size and baseline style are applied.
37
+ *
38
+ * @see {@link TextProps.scale}
39
+ */
40
+ export type Typescale = `${TextRole}-${TextSize}-${TextEmphasis}` | `${TextRole}-${TextSize}` | TextRole;
41
+ /**
42
+ * {@link Text} component properties.
43
+ */
44
+ export type TextProps = VoidProps<DomProps<HTMLSpanElement, JSX.HTMLElementTags["span"]>> & {
45
+ /**
46
+ * Typescale text is rendered with.
47
+ *
48
+ * @defaultValue `"body-large"`
49
+ */
50
+ scale?: Typescale;
51
+ /**
52
+ * Text content.
53
+ */
54
+ value?: string;
55
+ };
56
+ /**
57
+ * Text rendered with {@link Typescale | typescale}.
58
+ *
59
+ * This renders {@link TextProps.value | `props.value`} with typescale CSS properties based on
60
+ * {@link TextProps.scale | `props.scale`}.
61
+ *
62
+ * ```tsx
63
+ * import type { JSX, VoidProps } from "solid-js";
64
+ *
65
+ * import { Text } from "@pg-labs-incubator/cobweb/text";
66
+ *
67
+ * export default function(_props: VoidProps): JSX.Element {
68
+ * return <>
69
+ * <Text value="Body (large): --cw-Typescale-body-large" />
70
+ * <Text
71
+ * scale="body-small"
72
+ * value="Body (small): --cw-Typescale-body-small" />
73
+ * <Text
74
+ * scale="label"
75
+ * value="Label (large): --cw-Typescale-label-large" />
76
+ * </>;
77
+ * }
78
+ * ```
79
+ *
80
+ * # Design
81
+ *
82
+ * The [`cw-Typescale`](./typescale.yaml) design attribute controls the typescale CSS properties
83
+ * of the rendered text. Typescale size and roles can be controlled using `props.scale`. Fonts are
84
+ * selected by the [`cw-Typeface`](./typeface.yaml) design attribute and are not bundled; see its
85
+ * description for loading them. Line heights follow the language within a {@link
86
+ * ./typography#Typography | typography} scope.
87
+ *
88
+ * Note that the rendered text is *not* selectable or interactable. If selection or interaction
89
+ * is required, `user-select`, `pointer-events`, and `touch-action` should be used.
90
+ *
91
+ * @param props - text properties
92
+ * @returns rendered element
93
+ */
94
+ export declare const Text: DomComponent<TextProps>;
@@ -0,0 +1,3 @@
1
+ // SPDX-License-Identifier: MPL-2.0
2
+
3
+ export {};
@@ -0,0 +1,82 @@
1
+ import type { JSX } from "solid-js";
2
+ import type { DomComponent, DomProps } from "..";
3
+ import "./typography.css";
4
+ /**
5
+ * Line height category of a {@link Typography} scope.
6
+ *
7
+ * Categories select line heights of the [`cw-LineHeight`](./line-height.yaml) design attribute:
8
+ *
9
+ * | Category | Line heights |
10
+ * | -------------- | -------------------------------------------------------------------- |
11
+ * | `"auto"` | Category of the language, see {@link Typography}. |
12
+ * | `"small"` | Default role values, Material's type scale line heights. |
13
+ * | `"medium"` | `medium` theme, for dense and tall scripts. |
14
+ * | `"large"` | `large` theme, for Burmese and Telugu. |
15
+ * | `"extraLarge"` | `extraLarge` theme, for script styles such as Nastaliq. |
16
+ */
17
+ export type TypographyHeight = "auto" | "small" | "medium" | "large" | "extraLarge";
18
+ /**
19
+ * {@link Typography} component properties.
20
+ */
21
+ export type TypographyProps = DomProps<HTMLDivElement, JSX.HTMLElementTags["div"]> & {
22
+ /**
23
+ * Line height category applied within the scope.
24
+ *
25
+ * An explicit category applies to the whole scope, including nested elements declaring another
26
+ * language, until a nested scope selects its own height. `"auto"` selects the category by
27
+ * language, also within a scope of an explicit category.
28
+ *
29
+ * @defaultValue `"auto"`
30
+ */
31
+ height?: TypographyHeight;
32
+ };
33
+ /**
34
+ * Typography scope selecting line heights by language.
35
+ *
36
+ * Text rendered with [`cw-Typescale`](./typescale.yaml) roles uses the line heights of the
37
+ * [`cw-LineHeight`](./line-height.yaml) design attribute. Outside of a scope, these are the small
38
+ * category: Material's type scale line heights, which suit English-like scripts. Within a scope,
39
+ * the scope element and every nested element with a `lang` attribute select the first of:
40
+ *
41
+ * 1. the {@link TypographyProps.height | height} of the nearest scope, unless `"auto"`;
42
+ *
43
+ * 2. the category of the script subtag of the nearest language tag: medium for dense and tall
44
+ * scripts (Arabic, Bengali, Devanagari, Ethiopic, Gujarati, Gurmukhi, Han, Hangul, Japanese
45
+ * kana, Kannada, Khmer, Lao, Malayalam, Odia, Sinhala, Tamil, Thai, and Tibetan), large for
46
+ * Burmese and Telugu, and small for Cyrillic, Greek, Hebrew, and Latin, except Vietnamese;
47
+ *
48
+ * 3. the category of the language: medium for languages written in a dense or tall script by
49
+ * default and for Vietnamese, large for Burmese and Telugu, and small for every other
50
+ * language, including undetermined ones.
51
+ *
52
+ * Nastaliq requires an explicit `"extraLarge"` height, since an Arabic script or language tag does
53
+ * not identify the font style. Baseline and emphasized styles share their line heights, while
54
+ * `cw-Typescale` line height overrides and authored `line-height` declarations retain their normal
55
+ * priority. Categories are resolved by CSS alone, so the server renders the same markup regardless
56
+ * of the language of the document.
57
+ *
58
+ * ```tsx
59
+ * import { Text, Typography } from "@pg-labs-incubator/cobweb/text";
60
+ *
61
+ * <Typography attr:lang="ar">
62
+ * <Text value="مرحبا" />
63
+ * <Typography height="extraLarge" attr:lang="ur">
64
+ * <Text value="خوش آمدید" />
65
+ * </Typography>
66
+ * </Typography>
67
+ * ```
68
+ *
69
+ * # Design
70
+ *
71
+ * The categories are the default values and the `medium`, `large`, and `extraLarge` themes of the
72
+ * [`cw-LineHeight`](./line-height.yaml) design attribute. Categories are a Cobweb web adaptation;
73
+ * Material's type scale defines the small category only.
74
+ *
75
+ * # Styles
76
+ *
77
+ * The scope element has the `cw-Typography` class.
78
+ *
79
+ * @param props - typography scope properties
80
+ * @returns rendered scope element
81
+ */
82
+ export declare const Typography: DomComponent<TypographyProps>;
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Top {@link BoxSide | side} of box, equivalent to `block-start`.
3
+ *
4
+ * @see {@link BoxSide}
5
+ */
6
+ export declare const BoxTop = 0;
7
+ /**
8
+ * Right {@link BoxSide | side} of box, equivalent to `inline-end`.
9
+ *
10
+ * @see {@link BoxSide}
11
+ */
12
+ export declare const BoxRight = 1;
13
+ /**
14
+ * Bottom {@link BoxSide | side} of box, equivalent to `block-end`.
15
+ *
16
+ * @see {@link BoxSide}
17
+ */
18
+ export declare const BoxBottom = 2;
19
+ /**
20
+ * Left {@link BoxSide | side} of box, equivalent to `inline-start`.
21
+ *
22
+ * @see {@link BoxSide}
23
+ */
24
+ export declare const BoxLeft = 3;
25
+ /**
26
+ * Union of box sides.
27
+ *
28
+ * Each side discriminant evaluates to an integer equal to the common CSS value order for the
29
+ * respective side. For example, the
30
+ * [`border-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/border-color) property can
31
+ * be assigned to a list of values which style the top, right, bottom, and left border color.
32
+ *
33
+ * @see {@link LogicalBoxSides}
34
+ */
35
+ export type BoxSide = typeof BoxBottom | typeof BoxLeft | typeof BoxRight | typeof BoxTop;
36
+ /**
37
+ * Table mapping logical box {@link BoxSide | side} to physical side.
38
+ *
39
+ * The {@link BoxTop}, {@link BoxRight}, {@link BoxBottom}, and {@link BoxLeft} constants can be
40
+ * used to retrieve the physical side block-start, inline-end, block-end, and inline-start logical
41
+ * sides map to, respectively.
42
+ *
43
+ * @see {@link BoxSide}
44
+ * @see {@link logicalBoxSidesOf}
45
+ */
46
+ export type LogicalBoxSides = [
47
+ top: BoxSide,
48
+ right: BoxSide,
49
+ bottom: BoxSide,
50
+ left: BoxSide
51
+ ];
52
+ /**
53
+ * Determine whether a box side lies on the `x` or `y` axis.
54
+ *
55
+ * @param side - side to test
56
+ * @returns `0` or `1` if `side` lies on `x` or `y` axis, respectively
57
+ */
58
+ export declare function axisOfBoxSide(side: BoxSide): 0 | 1;
59
+ /**
60
+ * Determine the logical box side {@link LogicalBoxSides | mapping} based on the current style of
61
+ * an element.
62
+ *
63
+ * This determines the logical to physical side mapping for `elem`, or pseudo-element `pseudoElem`
64
+ * of `elem`, based on the `direction` and `writing-mode` CSS properties currently styled for the
65
+ * element or pseudo-element. Unknown writing modes are mapped as `horizontal-tb`.
66
+ *
67
+ * In a {@link solid-js/web#isServer | server} environment, or when the document of `elem` has no
68
+ * browsing context, this returns the mapping of the `horizontal-tb` writing mode and the `ltr`
69
+ * direction.
70
+ *
71
+ * @param elem - element to determine logical side mapping of
72
+ * @param pseudoElem - pseudo-element selector, within `elem`, to resolve logical sides of, or
73
+ * `undefined` to resolve logical sides of `elem`
74
+ * @returns logical to physical side mapping
75
+ */
76
+ export declare function logicalBoxSidesOf(elem: Element, pseudoElem?: string): LogicalBoxSides;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Fail if {@link solid-js#DEV | debugging} is enabled *and* condition evaluates to `false`.
3
+ *
4
+ * If `cond` is a `boolean`, it is validated as-is; otherwise, `cond` must be a function which
5
+ * evaluates to a `boolean`, which is then validated.
6
+ *
7
+ * @param cond - condition to validate or function whose condition should be evaluated
8
+ * @param msg - message to fail with
9
+ * @throws {@link Error} debugging is enabled and `cond` is `false`
10
+ */
11
+ export declare function assertDebug(cond: boolean | (() => boolean), msg?: string): asserts cond;
12
+ /**
13
+ * Print message if {@link solid-js#DEV | debugging} is enabled.
14
+ *
15
+ * This invokes `console.log()` with `msg` and `args` if, and only if, debugging is enabled.
16
+ *
17
+ * @param msg - message to print
18
+ * @param args - additional message arguments to print
19
+ */
20
+ export declare function printDebug(msg?: unknown, ...args: unknown[]): void;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Resolve the value an element attribute is assigned to.
3
+ *
4
+ * Attribute values are resolved as follows:
5
+ *
6
+ * | `value` | ARIA and keyword attributes | Other attributes |
7
+ * | --------------------- | --------------------------- | ---------------- |
8
+ * | `undefined` or `null` | `null` | `null` |
9
+ * | `true` | `true` state keyword | `""` |
10
+ * | `false` | `false` state keyword | `null` |
11
+ * | `number` or `string` | text of `value` | text of `value` |
12
+ *
13
+ * ARIA states and properties, such as `aria-expanded` or `aria-pressed`, distinguish a `"false"`
14
+ * value from a missing attribute, unlike boolean attributes, such as `disabled` or `hidden`; their
15
+ * state keywords are `"true"` and `"false"`. The state keywords of other enumerated attributes
16
+ * are listed in {@link KEYWORD_ATTRIBUTES}.
17
+ *
18
+ * @param name - name of attribute
19
+ * @param value - value to resolve
20
+ * @returns value the attribute is assigned to, or `null` if the attribute is removed
21
+ */
22
+ export declare function attributeValueOf(name: string, value: boolean | number | string | null | undefined): string | null;
23
+ /**
24
+ * Set attribute for element or remove attribute from element.
25
+ *
26
+ * The attribute is assigned to the value {@link attributeValueOf | resolved} for `value`, or is
27
+ * removed if `value` resolves to `null`. Values of any type other than `boolean`, `number`,
28
+ * `string`, `null`, or `undefined` leave the attribute unchanged.
29
+ *
30
+ * @param elem - element to set attribute on
31
+ * @param name - name of attribute
32
+ * @param value - value to set to
33
+ * @see {@link attributeValueOf}
34
+ */
35
+ export declare function setAttribute(elem: Element, name: string, value: unknown): void;
@@ -0,0 +1,93 @@
1
+ /**
2
+ * User-agent supports passive event listeners.
3
+ *
4
+ * @remarks
5
+ * In a {@link solid-js/web#isServer | server} environment, this always evaluates to `false`.
6
+ */
7
+ export declare const HAS_PASSIVE_EVENT_LISTENERS: boolean;
8
+ /**
9
+ * Transform event listener options to options supported by user-agent.
10
+ *
11
+ * @param opts - options to transform
12
+ * @param _target - ignored; accepted so that callers may pass the target the listener is
13
+ * registered with
14
+ * @returns `opts` if, and only if, user-agent {@link HAS_PASSIVE_EVENT_LISTENERS | supports}
15
+ * passive events; otherwise, `opts.capture` or `false` if `opts.capture` was not specified,
16
+ * respectively
17
+ */
18
+ export declare function eventListenerOptionsOf(opts: AddEventListenerOptions, _target?: EventTarget): AddEventListenerOptions | boolean;
19
+ /**
20
+ * Defer a component request until bubbling consumers had an opportunity to cancel an event.
21
+ *
22
+ * Components listen to events on their elements directly, while SolidJS invokes delegated event
23
+ * handlers, such as `onClick` and `event:click` handlers, from a listener of the document, which
24
+ * is invoked *after* component listeners. This defers the request of a component, received
25
+ * through `event`, until delegated handlers, and listeners of the window, had an opportunity to
26
+ * veto the request by cancelling `event` with `preventDefault()`. If `event` was cancelled by
27
+ * then, the request is discarded. Otherwise, the request is accepted: the default action of
28
+ * `event` is cancelled, if `preventDefault` is `true`, and `action` is invoked in a microtask.
29
+ *
30
+ * If `event` bubbles to a document, requests settle at the first of:
31
+ *
32
+ * 1. `event` reaching the window, once listeners of the window, registered before `event` was
33
+ * dispatched, were invoked.
34
+ *
35
+ * 2. the end of propagation at the document, if propagation was stopped by then, for example, by
36
+ * a delegated handler, once listeners of the document were invoked.
37
+ *
38
+ * 3. a microtask, queued when `stopPropagation()` or `stopImmediatePropagation()` is invoked on
39
+ * `event`; this observes propagation stopped before `event` reaches the document.
40
+ *
41
+ * 4. a task, or a microtask if `event` is not trusted, queued when the request is deferred, if
42
+ * none of the above is observed, for example, as propagation was stopped through the
43
+ * `cancelBubble` setter, or a listener of the window deferred the request.
44
+ *
45
+ * If `event` does not bubble, does not propagate to a document, or was stopped from propagating
46
+ * further, no delegated handler can observe it, and requests settle in a microtask.
47
+ *
48
+ * The default action of `event` can be cancelled only while `event` is dispatched. Microtasks
49
+ * run once the JavaScript execution context stack is empty. When the user agent dispatches an
50
+ * event, for example, in response to user input, the stack is empty after each listener returns,
51
+ * so a microtask queued by a listener runs *before* the next listener is invoked, while the event
52
+ * is still dispatched. When script dispatches an event, for example, through `dispatchEvent()`,
53
+ * `click()`, or `focus()`, the stack is empty only after that script returns, which is *after*
54
+ * the event was dispatched; requests which settle in a microtask still invoke their actions, but
55
+ * can no longer cancel the default action.
56
+ *
57
+ * @param event - event the request is received through
58
+ * @param _root - ignored, as the propagation path is resolved from `event`; accepted so that
59
+ * callers may pass the element whose listener received `event`
60
+ * @param action - function to invoke when the request is accepted
61
+ * @param preventDefault - `true` if, and only if, the default action of `event` is cancelled when
62
+ * the request is accepted; defaults to `true`
63
+ * @remarks
64
+ * Deferred requests are subject to the following:
65
+ *
66
+ * - Any invocation of `preventDefault()` before requests settle vetoes them, including those not
67
+ * intended to veto a component request, such as that of a router handling a click on a link.
68
+ *
69
+ * - Requests deferred for the same event settle together, in the order they were deferred. The
70
+ * first accepted request which cancels the default action consumes the event, and requests
71
+ * deferred after it are discarded; for example, of nested components handling the same event,
72
+ * the innermost component consumes the event.
73
+ *
74
+ * - An action which tests `event.defaultPrevented` must not cancel the default action
75
+ * (`preventDefault` is `false`); otherwise, the action observes its own cancellation.
76
+ *
77
+ * - Listeners invoked after requests settled, such as listeners of the same target as the
78
+ * listener which stopped propagation, cannot veto requests.
79
+ */
80
+ export declare function deferAfterDelegatedCancellation(event: Event, _root: Element | null, action: () => void, preventDefault?: boolean): void;
81
+ /**
82
+ * Test whether a pointer leaving an element moves into the element, or one of its descendants.
83
+ *
84
+ * Chromium dispatches `pointerleave` to a pseudo-element the pointer leaves for its originating
85
+ * element, or a descendant of it, while a capturing `pointerleave` listener is installed on an
86
+ * ancestor. The event is retargeted to the originating element, although the pointer is still
87
+ * within it: such a leave toward its own subtree is not a leave of the element.
88
+ *
89
+ * @param event - `pointerleave` event received
90
+ * @param elem - element `event` is targeted at
91
+ * @returns `true` if, and only if, the related target of `event` is `elem`, or a descendant of it
92
+ */
93
+ export declare function isLeaveWithin(event: PointerEvent, elem: Element): boolean;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Utility definitions.
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+ export type { BoxSide, LogicalBoxSides } from "./box-side";
7
+ export { BoxBottom, BoxLeft, BoxRight, BoxTop, axisOfBoxSide, logicalBoxSidesOf } from "./box-side";
8
+ export { assertDebug, printDebug } from "./debug";
9
+ export { attributeValueOf, setAttribute } from "./dom";
10
+ export { HAS_PASSIVE_EVENT_LISTENERS, deferAfterDelegatedCancellation, eventListenerOptionsOf } from "./event";
11
+ export { checkArgument, checkArray, checkBoolean, checkBrowser, checkNumber, checkObject, checkServer, checkState, checkString, checkValueDefined } from "./preconditions";
12
+ export { consumeProps, isPropReactive } from "./reactive";