@pg-labs-incubator/cobweb 0.0.5 → 0.0.6

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 (125) hide show
  1. package/package.json +7 -4
  2. package/target/esbuild/action/action.css +1 -1
  3. package/target/esbuild/action/base.jsx +1 -1
  4. package/target/esbuild/action/button.jsx +3 -3
  5. package/target/esbuild/action/fab-menu-context.jsx +1 -1
  6. package/target/esbuild/action/fab-menu.jsx +3 -3
  7. package/target/esbuild/action/fab.jsx +3 -3
  8. package/target/esbuild/action/group.jsx +7 -7
  9. package/target/esbuild/action/icon-button.jsx +3 -3
  10. package/target/esbuild/action/index.jsx +1 -1
  11. package/target/esbuild/action/split-button.jsx +4 -4
  12. package/target/esbuild/color/contrast.jsx +1 -1
  13. package/target/esbuild/color/dynamic.jsx +1 -1
  14. package/target/esbuild/color/hct.jsx +1 -1
  15. package/target/esbuild/color/index.jsx +1 -1
  16. package/target/esbuild/color/palette.jsx +1 -1
  17. package/target/esbuild/color/scheme.jsx +1 -1
  18. package/target/esbuild/color/temperature.jsx +1 -1
  19. package/target/esbuild/container/card.jsx +1 -1
  20. package/target/esbuild/container/elevation-shadow.jsx +1 -1
  21. package/target/esbuild/container/index.jsx +1 -1
  22. package/target/esbuild/dom/client.jsx +1 -1
  23. package/target/esbuild/dom/index.jsx +1 -1
  24. package/target/esbuild/dom/server.jsx +1 -1
  25. package/target/esbuild/dom/types.jsx +1 -1
  26. package/target/esbuild/feedback/badge.jsx +6 -6
  27. package/target/esbuild/feedback/focus.jsx +1 -1
  28. package/target/esbuild/feedback/index.jsx +1 -1
  29. package/target/esbuild/feedback/loading.jsx +3 -3
  30. package/target/esbuild/feedback/observe.jsx +1 -1
  31. package/target/esbuild/feedback/progress.jsx +9 -9
  32. package/target/esbuild/feedback/snackbar.jsx +6 -6
  33. package/target/esbuild/feedback/tooltip.jsx +6 -6
  34. package/target/esbuild/icon/icon.jsx +1 -1
  35. package/target/esbuild/icon/index.jsx +1 -1
  36. package/target/esbuild/index.jsx +1 -1
  37. package/target/esbuild/input/autocomplete.jsx +2 -2
  38. package/target/esbuild/input/base.jsx +2 -2
  39. package/target/esbuild/input/date-picker.jsx +19 -19
  40. package/target/esbuild/input/date-time.jsx +3 -3
  41. package/target/esbuild/input/index.jsx +1 -1
  42. package/target/esbuild/input/paired-input.jsx +1 -1
  43. package/target/esbuild/input/picker-dialog.jsx +3 -3
  44. package/target/esbuild/input/select.jsx +4 -4
  45. package/target/esbuild/input/slider.jsx +7 -7
  46. package/target/esbuild/input/text-field.jsx +4 -4
  47. package/target/esbuild/input/time-picker.jsx +5 -5
  48. package/target/esbuild/motion/follow-height.jsx +1 -0
  49. package/target/esbuild/motion/frame.jsx +1 -1
  50. package/target/esbuild/motion/index.jsx +1 -1
  51. package/target/esbuild/motion/material.jsx +1 -1
  52. package/target/esbuild/motion/motion.jsx +1 -1
  53. package/target/esbuild/motion/spring.jsx +1 -1
  54. package/target/esbuild/motion/transition.jsx +1 -1
  55. package/target/esbuild/motion/velocity.jsx +1 -1
  56. package/target/esbuild/navigation/app-bar.jsx +8 -8
  57. package/target/esbuild/navigation/base.jsx +1 -1
  58. package/target/esbuild/navigation/drawer.jsx +7 -7
  59. package/target/esbuild/navigation/index.jsx +1 -1
  60. package/target/esbuild/navigation/navigation.jsx +12 -12
  61. package/target/esbuild/navigation/scroll.jsx +1 -1
  62. package/target/esbuild/navigation/search.jsx +4 -4
  63. package/target/esbuild/navigation/tabs.jsx +3 -3
  64. package/target/esbuild/navigation/toolbar.jsx +3 -3
  65. package/target/esbuild/selection/base.jsx +1 -1
  66. package/target/esbuild/selection/checkbox.jsx +4 -4
  67. package/target/esbuild/selection/chip.jsx +5 -5
  68. package/target/esbuild/selection/index.jsx +1 -1
  69. package/target/esbuild/selection/radio.jsx +3 -3
  70. package/target/esbuild/selection/segmented.jsx +4 -4
  71. package/target/esbuild/selection/switch.jsx +3 -3
  72. package/target/esbuild/shape/corner-rounding.jsx +1 -1
  73. package/target/esbuild/shape/cubic.jsx +1 -1
  74. package/target/esbuild/shape/index.jsx +1 -1
  75. package/target/esbuild/shape/material-shapes.jsx +1 -1
  76. package/target/esbuild/shape/morph.jsx +1 -1
  77. package/target/esbuild/shape/path.jsx +1 -1
  78. package/target/esbuild/shape/point.jsx +1 -1
  79. package/target/esbuild/shape/rounded-polygon.jsx +1 -1
  80. package/target/esbuild/shape/shapes.jsx +1 -1
  81. package/target/esbuild/spacing/index.jsx +1 -1
  82. package/target/esbuild/state/component.jsx +1 -1
  83. package/target/esbuild/state/controller.jsx +1 -1
  84. package/target/esbuild/state/index.jsx +1 -1
  85. package/target/esbuild/state/ripple.jsx +1 -1
  86. package/target/esbuild/state/state.jsx +1 -1
  87. package/target/esbuild/state/style.jsx +1 -1
  88. package/target/esbuild/surface/carousel-layout.jsx +1 -1
  89. package/target/esbuild/surface/carousel.jsx +2 -2
  90. package/target/esbuild/surface/dialog.jsx +5 -5
  91. package/target/esbuild/surface/divider.jsx +1 -1
  92. package/target/esbuild/surface/drag.jsx +1 -1
  93. package/target/esbuild/surface/gestures.jsx +3 -3
  94. package/target/esbuild/surface/index.jsx +1 -1
  95. package/target/esbuild/surface/interactive.jsx +1 -1
  96. package/target/esbuild/surface/list-patterns.jsx +3 -3
  97. package/target/esbuild/surface/list.jsx +2 -2
  98. package/target/esbuild/surface/menu.jsx +3 -3
  99. package/target/esbuild/surface/scaffold.jsx +7 -7
  100. package/target/esbuild/surface/sheet.jsx +5 -5
  101. package/target/esbuild/surface/side-sheet.jsx +2 -2
  102. package/target/esbuild/surface/slots.jsx +1 -1
  103. package/target/esbuild/surface/surface.jsx +1 -1
  104. package/target/esbuild/text/index.jsx +1 -1
  105. package/target/esbuild/text/text.jsx +2 -2
  106. package/target/esbuild/text/typography.jsx +1 -1
  107. package/target/esbuild/util/box-side.jsx +1 -1
  108. package/target/esbuild/util/debug.jsx +1 -1
  109. package/target/esbuild/util/dom.jsx +1 -1
  110. package/target/esbuild/util/environment.jsx +1 -0
  111. package/target/esbuild/util/event.jsx +1 -1
  112. package/target/esbuild/util/index.jsx +1 -1
  113. package/target/esbuild/util/preconditions.jsx +1 -1
  114. package/target/esbuild/util/reactive.jsx +1 -1
  115. package/target/node/color.js +1 -0
  116. package/target/node/shape.js +1 -0
  117. package/target/tsc/motion/follow-height.d.ts +51 -0
  118. package/target/tsc/motion/index.d.ts +7 -3
  119. package/target/tsc/motion/spring.d.ts +3 -3
  120. package/target/tsc/shape/index.d.ts +1 -1
  121. package/target/tsc/shape/material-shapes.d.ts +56 -0
  122. package/target/tsc/shape/path.d.ts +16 -0
  123. package/target/tsc/util/environment.d.ts +14 -0
  124. package/target/tsc/util/index.d.ts +2 -1
  125. package/target/tsc/util/preconditions.d.ts +0 -14
@@ -3,6 +3,62 @@ import { RoundedPolygon } from "./rounded-polygon";
3
3
  * Union of {@link MaterialShapes | Material shape} names.
4
4
  */
5
5
  export type MaterialShapeName = "Circle" | "Square" | "Slanted" | "Arch" | "SemiCircle" | "Oval" | "Pill" | "Triangle" | "Arrow" | "Fan" | "Diamond" | "ClamShell" | "Pentagon" | "Gem" | "VerySunny" | "Sunny" | "Cookie4Sided" | "Cookie6Sided" | "Cookie7Sided" | "Cookie9Sided" | "Cookie12Sided" | "Clover4Leaf" | "Clover8Leaf" | "Burst" | "SoftBurst" | "Boom" | "SoftBoom" | "Flower" | "Puffy" | "PuffyDiamond" | "Ghostish" | "PixelCircle" | "PixelTriangle" | "Bun" | "Heart";
6
+ /**
7
+ * Circle.
8
+ *
9
+ * @returns the shape
10
+ * @see {@link MaterialShapes.Circle}
11
+ */
12
+ export declare function circleShape(): RoundedPolygon;
13
+ /**
14
+ * Oval, tilted by 45 degrees counter-clockwise.
15
+ *
16
+ * @returns the shape
17
+ * @see {@link MaterialShapes.Oval}
18
+ */
19
+ export declare function ovalShape(): RoundedPolygon;
20
+ /**
21
+ * Diagonal pill, rising to the right.
22
+ *
23
+ * @returns the shape
24
+ * @see {@link MaterialShapes.Pill}
25
+ */
26
+ export declare function pillShape(): RoundedPolygon;
27
+ /**
28
+ * Rounded pentagon, pointing up.
29
+ *
30
+ * @returns the shape
31
+ * @see {@link MaterialShapes.Pentagon}
32
+ */
33
+ export declare function pentagonShape(): RoundedPolygon;
34
+ /**
35
+ * Rounded star of eight short rays.
36
+ *
37
+ * @returns the shape
38
+ * @see {@link MaterialShapes.Sunny}
39
+ */
40
+ export declare function sunnyShape(): RoundedPolygon;
41
+ /**
42
+ * Cookie of four lobes.
43
+ *
44
+ * @returns the shape
45
+ * @see {@link MaterialShapes.Cookie4Sided}
46
+ */
47
+ export declare function cookie4SidedShape(): RoundedPolygon;
48
+ /**
49
+ * Cookie of nine lobes.
50
+ *
51
+ * @returns the shape
52
+ * @see {@link MaterialShapes.Cookie9Sided}
53
+ */
54
+ export declare function cookie9SidedShape(): RoundedPolygon;
55
+ /**
56
+ * Burst of ten soft points.
57
+ *
58
+ * @returns the shape
59
+ * @see {@link MaterialShapes.SoftBurst}
60
+ */
61
+ export declare function softBurstShape(): RoundedPolygon;
6
62
  /**
7
63
  * Material 3 Expressive shapes.
8
64
  *
@@ -136,6 +136,22 @@ export declare function roundedPolygonToPath(polygon: RoundedPolygon, options?:
136
136
  * @throws {@link Error} `progress` or a coordinate is not finite
137
137
  */
138
138
  export declare function morphToPath(morph: Morph, progress: number, options?: PathOptions, path?: Path): Path;
139
+ /**
140
+ * Shorten SVG path data.
141
+ *
142
+ * This rounds coordinates to `precision` decimal places and leaves out the zeros and separators
143
+ * which they do not need: a minus sign always starts a coordinate, and a point does after a
144
+ * coordinate with a point. Rounding keeps every command, so both ends of a morph still
145
+ * interpolate. Paths written once, as those of an image or a build, are the ones worth shortening,
146
+ * since this takes longer than writing them.
147
+ *
148
+ * @param data - SVG path data
149
+ * @param precision - decimal places of a coordinate, an integer from 0 to 100
150
+ * @returns equivalent path data, as far as the rounding goes
151
+ * @throws {@link Error} `data` is not SVG path data
152
+ * @throws {@link RangeError} `precision` is out of range
153
+ */
154
+ export declare function compactSvgPath(data: string, precision: number): string;
139
155
  /**
140
156
  * Serialize polygon outline as SVG path data.
141
157
  *
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Ensure execution is within a browser environment.
3
+ *
4
+ * @throws {@link Error} not executing within a browser environment
5
+ * @see {@link checkServer}
6
+ */
7
+ export declare function checkBrowser(): void;
8
+ /**
9
+ * Ensure execution is within a server environment.
10
+ *
11
+ * @throws {@link Error} not executing within a server environment
12
+ * @see {@link checkBrowser}
13
+ */
14
+ export declare function checkServer(): void;
@@ -7,6 +7,7 @@ export type { BoxSide, LogicalBoxSides } from "./box-side";
7
7
  export { BoxBottom, BoxLeft, BoxRight, BoxTop, axisOfBoxSide, logicalBoxSidesOf } from "./box-side";
8
8
  export { assertDebug, printDebug } from "./debug";
9
9
  export { attributeValueOf, setAttribute } from "./dom";
10
+ export { checkBrowser, checkServer } from "./environment";
10
11
  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 { checkArgument, checkArray, checkBoolean, checkNumber, checkObject, checkState, checkString, checkValueDefined } from "./preconditions";
12
13
  export { consumeProps, isPropReactive } from "./reactive";
@@ -6,20 +6,6 @@
6
6
  * @throws {@link Error} `valid` is `false`
7
7
  */
8
8
  export declare function checkState(valid: boolean, msg?: string): asserts valid;
9
- /**
10
- * Ensure execution is within a browser environment.
11
- *
12
- * @throws {@link Error} not executing within a browser environment
13
- * @see {@link checkServer}
14
- */
15
- export declare function checkBrowser(): void;
16
- /**
17
- * Ensure execution is within a server environment.
18
- *
19
- * @throws {@link Error} not executing within a server environment
20
- * @see {@link checkBrowser}
21
- */
22
- export declare function checkServer(): void;
23
9
  /**
24
10
  * Ensure an argument is valid.
25
11
  *