@hyalo/angular 0.0.0-stage → 0.3.1

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 (229) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/LICENSE +21 -0
  3. package/README.md +45 -2
  4. package/fesm2022/hyalo-angular-accordion.mjs +230 -0
  5. package/fesm2022/hyalo-angular-accordion.mjs.map +1 -0
  6. package/fesm2022/hyalo-angular-alert.mjs +171 -0
  7. package/fesm2022/hyalo-angular-alert.mjs.map +1 -0
  8. package/fesm2022/hyalo-angular-aspect-ratio.mjs +64 -0
  9. package/fesm2022/hyalo-angular-aspect-ratio.mjs.map +1 -0
  10. package/fesm2022/hyalo-angular-avatar.mjs +169 -0
  11. package/fesm2022/hyalo-angular-avatar.mjs.map +1 -0
  12. package/fesm2022/hyalo-angular-badge.mjs +268 -0
  13. package/fesm2022/hyalo-angular-badge.mjs.map +1 -0
  14. package/fesm2022/hyalo-angular-bento.mjs +132 -0
  15. package/fesm2022/hyalo-angular-bento.mjs.map +1 -0
  16. package/fesm2022/hyalo-angular-blocks.mjs +985 -0
  17. package/fesm2022/hyalo-angular-blocks.mjs.map +1 -0
  18. package/fesm2022/hyalo-angular-border-beam.mjs +73 -0
  19. package/fesm2022/hyalo-angular-border-beam.mjs.map +1 -0
  20. package/fesm2022/hyalo-angular-breadcrumb.mjs +77 -0
  21. package/fesm2022/hyalo-angular-breadcrumb.mjs.map +1 -0
  22. package/fesm2022/hyalo-angular-button-group.mjs +90 -0
  23. package/fesm2022/hyalo-angular-button-group.mjs.map +1 -0
  24. package/fesm2022/hyalo-angular-button.mjs +204 -0
  25. package/fesm2022/hyalo-angular-button.mjs.map +1 -0
  26. package/fesm2022/hyalo-angular-card.mjs +221 -0
  27. package/fesm2022/hyalo-angular-card.mjs.map +1 -0
  28. package/fesm2022/hyalo-angular-carousel.mjs +709 -0
  29. package/fesm2022/hyalo-angular-carousel.mjs.map +1 -0
  30. package/fesm2022/hyalo-angular-chapter-nav.mjs +336 -0
  31. package/fesm2022/hyalo-angular-chapter-nav.mjs.map +1 -0
  32. package/fesm2022/hyalo-angular-chart-engine-DSJop6He.mjs +5 -0
  33. package/fesm2022/hyalo-angular-chart-engine-DSJop6He.mjs.map +1 -0
  34. package/fesm2022/hyalo-angular-chart.mjs +391 -0
  35. package/fesm2022/hyalo-angular-chart.mjs.map +1 -0
  36. package/fesm2022/hyalo-angular-choice.mjs +789 -0
  37. package/fesm2022/hyalo-angular-choice.mjs.map +1 -0
  38. package/fesm2022/hyalo-angular-code-block-highlight-B20d5C76.mjs +40 -0
  39. package/fesm2022/hyalo-angular-code-block-highlight-B20d5C76.mjs.map +1 -0
  40. package/fesm2022/hyalo-angular-code-block.mjs +161 -0
  41. package/fesm2022/hyalo-angular-code-block.mjs.map +1 -0
  42. package/fesm2022/hyalo-angular-command.mjs +193 -0
  43. package/fesm2022/hyalo-angular-command.mjs.map +1 -0
  44. package/fesm2022/hyalo-angular-copy.mjs +138 -0
  45. package/fesm2022/hyalo-angular-copy.mjs.map +1 -0
  46. package/fesm2022/hyalo-angular-core.mjs +424 -0
  47. package/fesm2022/hyalo-angular-core.mjs.map +1 -0
  48. package/fesm2022/hyalo-angular-description-list.mjs +57 -0
  49. package/fesm2022/hyalo-angular-description-list.mjs.map +1 -0
  50. package/fesm2022/hyalo-angular-dialog.mjs +600 -0
  51. package/fesm2022/hyalo-angular-dialog.mjs.map +1 -0
  52. package/fesm2022/hyalo-angular-divider.mjs +66 -0
  53. package/fesm2022/hyalo-angular-divider.mjs.map +1 -0
  54. package/fesm2022/hyalo-angular-empty-state.mjs +123 -0
  55. package/fesm2022/hyalo-angular-empty-state.mjs.map +1 -0
  56. package/fesm2022/hyalo-angular-field.mjs +344 -0
  57. package/fesm2022/hyalo-angular-field.mjs.map +1 -0
  58. package/fesm2022/hyalo-angular-filter.mjs +309 -0
  59. package/fesm2022/hyalo-angular-filter.mjs.map +1 -0
  60. package/fesm2022/hyalo-angular-hotspot.mjs +225 -0
  61. package/fesm2022/hyalo-angular-hotspot.mjs.map +1 -0
  62. package/fesm2022/hyalo-angular-hover-card.mjs +233 -0
  63. package/fesm2022/hyalo-angular-hover-card.mjs.map +1 -0
  64. package/fesm2022/hyalo-angular-icon.mjs +385 -0
  65. package/fesm2022/hyalo-angular-icon.mjs.map +1 -0
  66. package/fesm2022/hyalo-angular-image-compare.mjs +168 -0
  67. package/fesm2022/hyalo-angular-image-compare.mjs.map +1 -0
  68. package/fesm2022/hyalo-angular-interaction.mjs +446 -0
  69. package/fesm2022/hyalo-angular-interaction.mjs.map +1 -0
  70. package/fesm2022/hyalo-angular-kbd.mjs +41 -0
  71. package/fesm2022/hyalo-angular-kbd.mjs.map +1 -0
  72. package/fesm2022/hyalo-angular-lightbox.mjs +228 -0
  73. package/fesm2022/hyalo-angular-lightbox.mjs.map +1 -0
  74. package/fesm2022/hyalo-angular-link.mjs +42 -0
  75. package/fesm2022/hyalo-angular-link.mjs.map +1 -0
  76. package/fesm2022/hyalo-angular-list.mjs +131 -0
  77. package/fesm2022/hyalo-angular-list.mjs.map +1 -0
  78. package/fesm2022/hyalo-angular-marquee.mjs +197 -0
  79. package/fesm2022/hyalo-angular-marquee.mjs.map +1 -0
  80. package/fesm2022/hyalo-angular-menu.mjs +423 -0
  81. package/fesm2022/hyalo-angular-menu.mjs.map +1 -0
  82. package/fesm2022/hyalo-angular-mesh.mjs +126 -0
  83. package/fesm2022/hyalo-angular-mesh.mjs.map +1 -0
  84. package/fesm2022/hyalo-angular-motion.mjs +620 -0
  85. package/fesm2022/hyalo-angular-motion.mjs.map +1 -0
  86. package/fesm2022/hyalo-angular-navbar.mjs +343 -0
  87. package/fesm2022/hyalo-angular-navbar.mjs.map +1 -0
  88. package/fesm2022/hyalo-angular-navigation-menu.mjs +222 -0
  89. package/fesm2022/hyalo-angular-navigation-menu.mjs.map +1 -0
  90. package/fesm2022/hyalo-angular-number-ticker.mjs +174 -0
  91. package/fesm2022/hyalo-angular-number-ticker.mjs.map +1 -0
  92. package/fesm2022/hyalo-angular-overlay.mjs +163 -0
  93. package/fesm2022/hyalo-angular-overlay.mjs.map +1 -0
  94. package/fesm2022/hyalo-angular-pagination.mjs +187 -0
  95. package/fesm2022/hyalo-angular-pagination.mjs.map +1 -0
  96. package/fesm2022/hyalo-angular-popover-overlay-kit-6wPwnxln.mjs +3 -0
  97. package/fesm2022/hyalo-angular-popover.mjs +516 -0
  98. package/fesm2022/hyalo-angular-popover.mjs.map +1 -0
  99. package/fesm2022/hyalo-angular-progress.mjs +209 -0
  100. package/fesm2022/hyalo-angular-progress.mjs.map +1 -0
  101. package/fesm2022/hyalo-angular-progressive-blur.mjs +73 -0
  102. package/fesm2022/hyalo-angular-progressive-blur.mjs.map +1 -0
  103. package/fesm2022/hyalo-angular-refraction-renderer-5ZA-kfsA.mjs +186 -0
  104. package/fesm2022/hyalo-angular-refraction-renderer-5ZA-kfsA.mjs.map +1 -0
  105. package/fesm2022/hyalo-angular-refraction.mjs +178 -0
  106. package/fesm2022/hyalo-angular-refraction.mjs.map +1 -0
  107. package/fesm2022/hyalo-angular-scroll-area.mjs +93 -0
  108. package/fesm2022/hyalo-angular-scroll-area.mjs.map +1 -0
  109. package/fesm2022/hyalo-angular-scroll-to-top.mjs +127 -0
  110. package/fesm2022/hyalo-angular-scroll-to-top.mjs.map +1 -0
  111. package/fesm2022/hyalo-angular-segmented.mjs +223 -0
  112. package/fesm2022/hyalo-angular-segmented.mjs.map +1 -0
  113. package/fesm2022/hyalo-angular-select.mjs +561 -0
  114. package/fesm2022/hyalo-angular-select.mjs.map +1 -0
  115. package/fesm2022/hyalo-angular-sidebar.mjs +241 -0
  116. package/fesm2022/hyalo-angular-sidebar.mjs.map +1 -0
  117. package/fesm2022/hyalo-angular-skeleton.mjs +131 -0
  118. package/fesm2022/hyalo-angular-skeleton.mjs.map +1 -0
  119. package/fesm2022/hyalo-angular-sparkline.mjs +110 -0
  120. package/fesm2022/hyalo-angular-sparkline.mjs.map +1 -0
  121. package/fesm2022/hyalo-angular-split-text.mjs +126 -0
  122. package/fesm2022/hyalo-angular-split-text.mjs.map +1 -0
  123. package/fesm2022/hyalo-angular-stat.mjs +193 -0
  124. package/fesm2022/hyalo-angular-stat.mjs.map +1 -0
  125. package/fesm2022/hyalo-angular-stepper.mjs +254 -0
  126. package/fesm2022/hyalo-angular-stepper.mjs.map +1 -0
  127. package/fesm2022/hyalo-angular-table.mjs +335 -0
  128. package/fesm2022/hyalo-angular-table.mjs.map +1 -0
  129. package/fesm2022/hyalo-angular-tabs.mjs +324 -0
  130. package/fesm2022/hyalo-angular-tabs.mjs.map +1 -0
  131. package/fesm2022/hyalo-angular-theme.mjs +94 -0
  132. package/fesm2022/hyalo-angular-theme.mjs.map +1 -0
  133. package/fesm2022/hyalo-angular-timeline.mjs +157 -0
  134. package/fesm2022/hyalo-angular-timeline.mjs.map +1 -0
  135. package/fesm2022/hyalo-angular-toast.mjs +323 -0
  136. package/fesm2022/hyalo-angular-toast.mjs.map +1 -0
  137. package/fesm2022/hyalo-angular.mjs +2 -0
  138. package/package.json +329 -3
  139. package/styles/hyalo-core.css +25 -0
  140. package/styles/hyalo.css +17 -0
  141. package/styles/overlays/dialog.css +9 -0
  142. package/styles/overlays/popover.css +9 -0
  143. package/styles/overlays/select.css +9 -0
  144. package/styles/overlays/toast.css +8 -0
  145. package/styles/palettes/aurora.css +47 -0
  146. package/styles/palettes/ember.css +47 -0
  147. package/styles/palettes/graphite.css +47 -0
  148. package/styles/palettes/ocean.css +47 -0
  149. package/styles/palettes/orchid.css +47 -0
  150. package/styles/palettes/rose.css +47 -0
  151. package/styles/parts/card.css +49 -0
  152. package/styles/parts/dialog.css +116 -0
  153. package/styles/parts/drawer.css +124 -0
  154. package/styles/parts/field.css +44 -0
  155. package/styles/parts/glass.css +139 -0
  156. package/styles/parts/motion.css +101 -0
  157. package/styles/parts/navbar.css +55 -0
  158. package/styles/parts/popover.css +27 -0
  159. package/styles/parts/presence.css +55 -0
  160. package/styles/parts/reset.css +42 -0
  161. package/styles/parts/select.css +46 -0
  162. package/styles/parts/themes.css +105 -0
  163. package/styles/parts/toast.css +128 -0
  164. package/styles/parts/tokens.css +151 -0
  165. package/styles/parts/typography.css +81 -0
  166. package/types/hyalo-angular-accordion.d.ts +74 -0
  167. package/types/hyalo-angular-alert.d.ts +47 -0
  168. package/types/hyalo-angular-aspect-ratio.d.ts +13 -0
  169. package/types/hyalo-angular-avatar.d.ts +39 -0
  170. package/types/hyalo-angular-badge.d.ts +82 -0
  171. package/types/hyalo-angular-bento.d.ts +25 -0
  172. package/types/hyalo-angular-blocks.d.ts +272 -0
  173. package/types/hyalo-angular-border-beam.d.ts +15 -0
  174. package/types/hyalo-angular-breadcrumb.d.ts +22 -0
  175. package/types/hyalo-angular-button-group.d.ts +19 -0
  176. package/types/hyalo-angular-button.d.ts +89 -0
  177. package/types/hyalo-angular-card.d.ts +61 -0
  178. package/types/hyalo-angular-carousel.d.ts +147 -0
  179. package/types/hyalo-angular-chapter-nav.d.ts +79 -0
  180. package/types/hyalo-angular-chart.d.ts +90 -0
  181. package/types/hyalo-angular-choice.d.ts +259 -0
  182. package/types/hyalo-angular-code-block.d.ts +46 -0
  183. package/types/hyalo-angular-command.d.ts +41 -0
  184. package/types/hyalo-angular-copy.d.ts +39 -0
  185. package/types/hyalo-angular-core.d.ts +210 -0
  186. package/types/hyalo-angular-description-list.d.ts +16 -0
  187. package/types/hyalo-angular-dialog.d.ts +171 -0
  188. package/types/hyalo-angular-divider.d.ts +12 -0
  189. package/types/hyalo-angular-empty-state.d.ts +30 -0
  190. package/types/hyalo-angular-field.d.ts +141 -0
  191. package/types/hyalo-angular-filter.d.ts +122 -0
  192. package/types/hyalo-angular-hotspot.d.ts +70 -0
  193. package/types/hyalo-angular-hover-card.d.ts +47 -0
  194. package/types/hyalo-angular-icon.d.ts +122 -0
  195. package/types/hyalo-angular-image-compare.d.ts +55 -0
  196. package/types/hyalo-angular-interaction.d.ts +131 -0
  197. package/types/hyalo-angular-kbd.d.ts +5 -0
  198. package/types/hyalo-angular-lightbox.d.ts +67 -0
  199. package/types/hyalo-angular-link.d.ts +5 -0
  200. package/types/hyalo-angular-list.d.ts +30 -0
  201. package/types/hyalo-angular-marquee.d.ts +48 -0
  202. package/types/hyalo-angular-menu.d.ts +105 -0
  203. package/types/hyalo-angular-mesh.d.ts +36 -0
  204. package/types/hyalo-angular-motion.d.ts +218 -0
  205. package/types/hyalo-angular-navbar.d.ts +110 -0
  206. package/types/hyalo-angular-navigation-menu.d.ts +47 -0
  207. package/types/hyalo-angular-number-ticker.d.ts +52 -0
  208. package/types/hyalo-angular-overlay.d.ts +40 -0
  209. package/types/hyalo-angular-pagination.d.ts +59 -0
  210. package/types/hyalo-angular-popover.d.ts +152 -0
  211. package/types/hyalo-angular-progress.d.ts +46 -0
  212. package/types/hyalo-angular-progressive-blur.d.ts +14 -0
  213. package/types/hyalo-angular-refraction.d.ts +46 -0
  214. package/types/hyalo-angular-scroll-area.d.ts +18 -0
  215. package/types/hyalo-angular-scroll-to-top.d.ts +31 -0
  216. package/types/hyalo-angular-segmented.d.ts +79 -0
  217. package/types/hyalo-angular-select.d.ts +176 -0
  218. package/types/hyalo-angular-sidebar.d.ts +57 -0
  219. package/types/hyalo-angular-skeleton.d.ts +34 -0
  220. package/types/hyalo-angular-sparkline.d.ts +19 -0
  221. package/types/hyalo-angular-split-text.d.ts +24 -0
  222. package/types/hyalo-angular-stat.d.ts +56 -0
  223. package/types/hyalo-angular-stepper.d.ts +63 -0
  224. package/types/hyalo-angular-table.d.ts +125 -0
  225. package/types/hyalo-angular-tabs.d.ts +102 -0
  226. package/types/hyalo-angular-theme.d.ts +46 -0
  227. package/types/hyalo-angular-timeline.d.ts +36 -0
  228. package/types/hyalo-angular-toast.d.ts +79 -0
  229. package/types/hyalo-angular.d.ts +2 -0
@@ -0,0 +1,209 @@
1
+ import { DOCUMENT } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, afterNextRender, computed, inject, input, signal } from "@angular/core";
4
+ import { HyMotion } from "@hyalo/angular/motion";
5
+ var HyProgress = class HyProgress {
6
+ motion = inject(HyMotion);
7
+ host = inject(ElementRef);
8
+ document = inject(DOCUMENT);
9
+ visible = signal(true, ...ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []);
10
+ foreground = signal(true, ...ngDevMode ? [{ debugName: "foreground" }] : /* istanbul ignore next */ []);
11
+ moving = computed(() => this.motion.enabled() && this.visible() && this.foreground(), ...ngDevMode ? [{ debugName: "moving" }] : /* istanbul ignore next */ []);
12
+ constructor() {
13
+ let observer;
14
+ const abort = new AbortController();
15
+ afterNextRender(() => {
16
+ this.foreground.set(!this.document.hidden);
17
+ this.document.addEventListener("visibilitychange", () => this.foreground.set(!this.document.hidden), { signal: abort.signal });
18
+ if (typeof IntersectionObserver !== "undefined") {
19
+ observer = new IntersectionObserver((entries) => this.visible.set(entries.some((entry) => entry.isIntersecting)));
20
+ observer.observe(this.host.nativeElement);
21
+ }
22
+ });
23
+ inject(DestroyRef).onDestroy(() => {
24
+ observer?.disconnect();
25
+ abort.abort();
26
+ });
27
+ }
28
+ value = input(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
29
+ label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
30
+ variant = input("bar", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
31
+ amount = computed(() => this.value() === null ? null : Math.min(100, Math.max(0, Number.isFinite(this.value()) ? this.value() ?? 0 : 0)), ...ngDevMode ? [{ debugName: "amount" }] : /* istanbul ignore next */ []);
32
+ offset = computed(() => 100 - (this.amount() ?? 25), ...ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []);
33
+ static ɵfac = i0.ɵɵngDeclareFactory({
34
+ minVersion: "12.0.0",
35
+ version: "22.2.3",
36
+ ngImport: i0,
37
+ type: HyProgress,
38
+ deps: [],
39
+ target: i0.ɵɵFactoryTarget.Component
40
+ });
41
+ static ɵcmp = i0.ɵɵngDeclareComponent({
42
+ minVersion: "17.0.0",
43
+ version: "22.2.3",
44
+ type: HyProgress,
45
+ isStandalone: true,
46
+ selector: "hy-progress",
47
+ inputs: {
48
+ value: {
49
+ classPropertyName: "value",
50
+ publicName: "value",
51
+ isSignal: true,
52
+ isRequired: false,
53
+ transformFunction: null
54
+ },
55
+ label: {
56
+ classPropertyName: "label",
57
+ publicName: "label",
58
+ isSignal: true,
59
+ isRequired: true,
60
+ transformFunction: null
61
+ },
62
+ variant: {
63
+ classPropertyName: "variant",
64
+ publicName: "variant",
65
+ isSignal: true,
66
+ isRequired: false,
67
+ transformFunction: null
68
+ }
69
+ },
70
+ host: {
71
+ attributes: {
72
+ "role": "progressbar",
73
+ "aria-valuemin": "0",
74
+ "aria-valuemax": "100"
75
+ },
76
+ properties: {
77
+ "attr.aria-label": "label()",
78
+ "attr.aria-valuenow": "amount()",
79
+ "attr.data-variant": "variant()",
80
+ "class.indeterminate": "amount()===null",
81
+ "class.moving": "moving()"
82
+ }
83
+ },
84
+ ngImport: i0,
85
+ template: "@if (variant() === 'circle') {\r\n <svg viewBox=\"0 0 40 40\" aria-hidden=\"true\">\r\n <circle class=\"track\" cx=\"20\" cy=\"20\" r=\"16\" />\r\n <circle\r\n class=\"fill\"\r\n cx=\"20\"\r\n cy=\"20\"\r\n r=\"16\"\r\n pathLength=\"100\"\r\n stroke-dasharray=\"100\"\r\n [attr.stroke-dashoffset]=\"offset()\"\r\n />\r\n </svg>\r\n} @else {\r\n <div class=\"track\" aria-hidden=\"true\">\r\n <div\r\n class=\"fill\"\r\n [style.transform]=\"amount() === null ? null : 'scaleX(' + amount()! / 100 + ')'\"\r\n ></div>\r\n </div>\r\n}\r\n",
86
+ styles: [":host{--hy-progress-direction: 1;display:block;color:var(--hy-primary)}:host([data-variant=\"bar\"]) .track{block-size:.5rem;border-radius:var(--hy-radius-pill);overflow:hidden;background:var(--hy-surface-3)}:host([data-variant=\"bar\"]) .fill{block-size:100%;background:currentColor;transform-origin:left center}:host-context([dir=\"rtl\"]) .fill{transform-origin:right center}:host([data-variant=\"circle\"]){inline-size:3rem;block-size:3rem}svg{display:block;inline-size:100%;block-size:100%;transform:rotate(-90deg)}circle{fill:none;stroke-width:3;stroke-linecap:round}.track{stroke:var(--hy-surface-3)}.fill{stroke:currentColor}:host(.indeterminate.moving) svg{animation:hy-progress-spin 1s linear infinite}:host(.indeterminate) .track>.fill{inline-size:30%}:host(.indeterminate.moving) .track>.fill{animation:hy-progress-slide 1.4s var(--hy-ease-inout) infinite}@keyframes hy-progress-spin{to{transform:rotate(270deg)}}:host-context([dir=\"rtl\"]){--hy-progress-direction: -1}@keyframes hy-progress-slide{0%{transform:translate(calc(-100% * var(--hy-progress-direction)))}to{transform:translate(calc(340% * var(--hy-progress-direction)))}}@media(prefers-reduced-motion:reduce){:host-context(:root:not([data-hy-motion=\"full\"])).moving svg,:host-context(:root:not([data-hy-motion=\"full\"])).moving .track>.fill{animation:none}}\n"],
87
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
88
+ });
89
+ };
90
+ i0.ɵɵngDeclareClassMetadata({
91
+ minVersion: "12.0.0",
92
+ version: "22.2.3",
93
+ ngImport: i0,
94
+ type: HyProgress,
95
+ decorators: [{
96
+ type: Component,
97
+ args: [{
98
+ selector: "hy-progress",
99
+ changeDetection: ChangeDetectionStrategy.OnPush,
100
+ host: {
101
+ role: "progressbar",
102
+ "[attr.aria-label]": "label()",
103
+ "aria-valuemin": "0",
104
+ "aria-valuemax": "100",
105
+ "[attr.aria-valuenow]": "amount()",
106
+ "[attr.data-variant]": "variant()",
107
+ "[class.indeterminate]": "amount()===null",
108
+ "[class.moving]": "moving()"
109
+ },
110
+ template: "@if (variant() === 'circle') {\r\n <svg viewBox=\"0 0 40 40\" aria-hidden=\"true\">\r\n <circle class=\"track\" cx=\"20\" cy=\"20\" r=\"16\" />\r\n <circle\r\n class=\"fill\"\r\n cx=\"20\"\r\n cy=\"20\"\r\n r=\"16\"\r\n pathLength=\"100\"\r\n stroke-dasharray=\"100\"\r\n [attr.stroke-dashoffset]=\"offset()\"\r\n />\r\n </svg>\r\n} @else {\r\n <div class=\"track\" aria-hidden=\"true\">\r\n <div\r\n class=\"fill\"\r\n [style.transform]=\"amount() === null ? null : 'scaleX(' + amount()! / 100 + ')'\"\r\n ></div>\r\n </div>\r\n}\r\n",
111
+ styles: [":host{--hy-progress-direction: 1;display:block;color:var(--hy-primary)}:host([data-variant=\"bar\"]) .track{block-size:.5rem;border-radius:var(--hy-radius-pill);overflow:hidden;background:var(--hy-surface-3)}:host([data-variant=\"bar\"]) .fill{block-size:100%;background:currentColor;transform-origin:left center}:host-context([dir=\"rtl\"]) .fill{transform-origin:right center}:host([data-variant=\"circle\"]){inline-size:3rem;block-size:3rem}svg{display:block;inline-size:100%;block-size:100%;transform:rotate(-90deg)}circle{fill:none;stroke-width:3;stroke-linecap:round}.track{stroke:var(--hy-surface-3)}.fill{stroke:currentColor}:host(.indeterminate.moving) svg{animation:hy-progress-spin 1s linear infinite}:host(.indeterminate) .track>.fill{inline-size:30%}:host(.indeterminate.moving) .track>.fill{animation:hy-progress-slide 1.4s var(--hy-ease-inout) infinite}@keyframes hy-progress-spin{to{transform:rotate(270deg)}}:host-context([dir=\"rtl\"]){--hy-progress-direction: -1}@keyframes hy-progress-slide{0%{transform:translate(calc(-100% * var(--hy-progress-direction)))}to{transform:translate(calc(340% * var(--hy-progress-direction)))}}@media(prefers-reduced-motion:reduce){:host-context(:root:not([data-hy-motion=\"full\"])).moving svg,:host-context(:root:not([data-hy-motion=\"full\"])).moving .track>.fill{animation:none}}\n"]
112
+ }]
113
+ }],
114
+ ctorParameters: () => [],
115
+ propDecorators: {
116
+ value: [{
117
+ type: i0.Input,
118
+ args: [{
119
+ isSignal: true,
120
+ alias: "value",
121
+ required: false
122
+ }]
123
+ }],
124
+ label: [{
125
+ type: i0.Input,
126
+ args: [{
127
+ isSignal: true,
128
+ alias: "label",
129
+ required: true
130
+ }]
131
+ }],
132
+ variant: [{
133
+ type: i0.Input,
134
+ args: [{
135
+ isSignal: true,
136
+ alias: "variant",
137
+ required: false
138
+ }]
139
+ }]
140
+ }
141
+ });
142
+ var HySpinner = class HySpinner {
143
+ label = input("Loading", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
144
+ static ɵfac = i0.ɵɵngDeclareFactory({
145
+ minVersion: "12.0.0",
146
+ version: "22.2.3",
147
+ ngImport: i0,
148
+ type: HySpinner,
149
+ deps: [],
150
+ target: i0.ɵɵFactoryTarget.Component
151
+ });
152
+ static ɵcmp = i0.ɵɵngDeclareComponent({
153
+ minVersion: "17.1.0",
154
+ version: "22.2.3",
155
+ type: HySpinner,
156
+ isStandalone: true,
157
+ selector: "hy-spinner",
158
+ inputs: { label: {
159
+ classPropertyName: "label",
160
+ publicName: "label",
161
+ isSignal: true,
162
+ isRequired: false,
163
+ transformFunction: null
164
+ } },
165
+ ngImport: i0,
166
+ template: "<hy-progress variant=\"circle\" [label]=\"label()\" />",
167
+ isInline: true,
168
+ styles: [":host{display:inline-flex;inline-size:1.5rem;block-size:1.5rem}hy-progress{inline-size:100%;block-size:100%}\n"],
169
+ dependencies: [{
170
+ kind: "component",
171
+ type: HyProgress,
172
+ selector: "hy-progress",
173
+ inputs: [
174
+ "value",
175
+ "label",
176
+ "variant"
177
+ ]
178
+ }],
179
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
180
+ });
181
+ };
182
+ i0.ɵɵngDeclareClassMetadata({
183
+ minVersion: "12.0.0",
184
+ version: "22.2.3",
185
+ ngImport: i0,
186
+ type: HySpinner,
187
+ decorators: [{
188
+ type: Component,
189
+ args: [{
190
+ selector: "hy-spinner",
191
+ changeDetection: ChangeDetectionStrategy.OnPush,
192
+ template: "<hy-progress variant=\"circle\" [label]=\"label()\" />",
193
+ imports: [HyProgress],
194
+ styles: [":host{display:inline-flex;inline-size:1.5rem;block-size:1.5rem}hy-progress{inline-size:100%;block-size:100%}\n"]
195
+ }]
196
+ }],
197
+ propDecorators: { label: [{
198
+ type: i0.Input,
199
+ args: [{
200
+ isSignal: true,
201
+ alias: "label",
202
+ required: false
203
+ }]
204
+ }] }
205
+ });
206
+ const HY_PROGRESS = [HyProgress, HySpinner];
207
+ export { HY_PROGRESS, HyProgress, HySpinner };
208
+
209
+ //# sourceMappingURL=hyalo-angular-progress.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hyalo-angular-progress.mjs","names":[],"sources":["../../../projects/hyalo/progress/progress.ts","../../../projects/hyalo/progress/progress.html"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n afterNextRender,\r\n computed,\r\n inject,\r\n input,\r\n signal,\r\n} from '@angular/core';\r\nimport { HyMotion } from '@hyalo/angular/motion';\r\n@Component({\r\n selector: 'hy-progress',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n templateUrl: './progress.html',\r\n styleUrl: './progress.css',\r\n host: {\r\n role: 'progressbar',\r\n '[attr.aria-label]': 'label()',\r\n 'aria-valuemin': '0',\r\n 'aria-valuemax': '100',\r\n '[attr.aria-valuenow]': 'amount()',\r\n '[attr.data-variant]': 'variant()',\r\n '[class.indeterminate]': 'amount()===null',\r\n '[class.moving]': 'moving()',\r\n },\r\n})\r\nexport class HyProgress {\r\n protected readonly motion = inject(HyMotion);\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly document = inject(DOCUMENT);\r\n private readonly visible = signal(true);\r\n private readonly foreground = signal(true);\r\n protected readonly moving = computed(\r\n () => this.motion.enabled() && this.visible() && this.foreground(),\r\n );\r\n constructor() {\r\n let observer: IntersectionObserver | undefined;\r\n const abort = new AbortController();\r\n afterNextRender(() => {\r\n this.foreground.set(!this.document.hidden);\r\n this.document.addEventListener(\r\n 'visibilitychange',\r\n () => this.foreground.set(!this.document.hidden),\r\n { signal: abort.signal },\r\n );\r\n if (typeof IntersectionObserver !== 'undefined') {\r\n observer = new IntersectionObserver((entries) =>\r\n this.visible.set(entries.some((entry) => entry.isIntersecting)),\r\n );\r\n observer.observe(this.host.nativeElement);\r\n }\r\n });\r\n inject(DestroyRef).onDestroy(() => {\r\n observer?.disconnect();\r\n abort.abort();\r\n });\r\n }\r\n readonly value = input<number | null>(null);\r\n readonly label = input.required<string>();\r\n readonly variant = input<'bar' | 'circle'>('bar');\r\n readonly amount = computed(() =>\r\n this.value() === null\r\n ? null\r\n : Math.min(100, Math.max(0, Number.isFinite(this.value()) ? (this.value() ?? 0) : 0)),\r\n );\r\n readonly offset = computed(() => 100 - (this.amount() ?? 25));\r\n}\r\n@Component({\r\n selector: 'hy-spinner',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: '<hy-progress variant=\"circle\" [label]=\"label()\" />',\r\n imports: [HyProgress],\r\n styles:\r\n ':host{display:inline-flex;inline-size:1.5rem;block-size:1.5rem}hy-progress{inline-size:100%;block-size:100%}',\r\n})\r\nexport class HySpinner {\r\n readonly label = input('Loading');\r\n}\r\nexport const HY_PROGRESS = [HyProgress, HySpinner] as const;\r\n","@if (variant() === 'circle') {\r\n <svg viewBox=\"0 0 40 40\" aria-hidden=\"true\">\r\n <circle class=\"track\" cx=\"20\" cy=\"20\" r=\"16\" />\r\n <circle\r\n class=\"fill\"\r\n cx=\"20\"\r\n cy=\"20\"\r\n r=\"16\"\r\n pathLength=\"100\"\r\n stroke-dasharray=\"100\"\r\n [attr.stroke-dashoffset]=\"offset()\"\r\n />\r\n </svg>\r\n} @else {\r\n <div class=\"track\" aria-hidden=\"true\">\r\n <div\r\n class=\"fill\"\r\n [style.transform]=\"amount() === null ? null : 'scaleX(' + amount()! / 100 + ')'\"\r\n ></div>\r\n </div>\r\n}\r\n"],"mappings":";;;;AA6BA,IAAa,aAAb,MAAa,WAAU;CACF,SAAS,OAAO,QAAQ;CAC1B,OA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ACnB;GAAA,UAAA;GAAA,QAAA,CAAA,0zCAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDH,IAAa,YAAb,MAAa,UAAS;CACX,QAAQ,MAAM,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CADtB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAS,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAT,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAS,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,OAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,UAAA;EAAA,UALV;EAAoD,UAAA;EAAA,QAAA,CAAA,gHAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MA5CnD;GAAU,UAAA;GAAA,QAAA;IAAA;IAAA;IAAA;GAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAiDV,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EARrB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAY,iBACL,wBAAwB;GAAM,UACrC;GAAoD,SACrD,CAAC,UAAU;GAAC,QAAA,CAAA,gHAAA;EAAA,CAAA;;;;;;;;;;;AAOvB,MAAa,cAAc,CAAC,YAAY,SAAS"}
@@ -0,0 +1,73 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, computed, inject, input } from "@angular/core";
3
+ import { HyFidelity } from "@hyalo/angular/core";
4
+ var HyProgressiveBlur = class HyProgressiveBlur {
5
+ edge = input("top", ...ngDevMode ? [{ debugName: "edge" }] : /* istanbul ignore next */ []);
6
+ fidelity = inject(HyFidelity);
7
+ blur = computed(() => this.fidelity.tier() === "high", ...ngDevMode ? [{ debugName: "blur" }] : /* istanbul ignore next */ []);
8
+ static ɵfac = i0.ɵɵngDeclareFactory({
9
+ minVersion: "12.0.0",
10
+ version: "22.2.3",
11
+ ngImport: i0,
12
+ type: HyProgressiveBlur,
13
+ deps: [],
14
+ target: i0.ɵɵFactoryTarget.Component
15
+ });
16
+ static ɵcmp = i0.ɵɵngDeclareComponent({
17
+ minVersion: "17.1.0",
18
+ version: "22.2.3",
19
+ type: HyProgressiveBlur,
20
+ isStandalone: true,
21
+ selector: "hy-progressive-blur",
22
+ inputs: { edge: {
23
+ classPropertyName: "edge",
24
+ publicName: "edge",
25
+ isSignal: true,
26
+ isRequired: false,
27
+ transformFunction: null
28
+ } },
29
+ host: {
30
+ attributes: { "aria-hidden": "true" },
31
+ properties: {
32
+ "attr.data-edge": "edge()",
33
+ "class.blur": "blur()"
34
+ }
35
+ },
36
+ ngImport: i0,
37
+ template: "<i></i><i></i>",
38
+ isInline: true,
39
+ styles: [":host{position:absolute;inset-inline:0;inset-block-start:0;block-size:var(--hy-edge-height, 3rem);pointer-events:none;background:linear-gradient(var(--hy-surface-1),transparent);z-index:1}:host([data-edge=\"bottom\"]){inset-block-start:auto;inset-block-end:0;rotate:180deg}i{position:absolute;inset:0;-webkit-mask-image:linear-gradient(black,transparent);mask-image:linear-gradient(black,transparent)}:host(.blur) i:first-child{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}:host(.blur) i:last-child{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);-webkit-mask-image:linear-gradient(black,transparent 65%);mask-image:linear-gradient(black,transparent 65%)}@media(prefers-reduced-transparency:reduce),(forced-colors:active){i{display:none}}\n"],
40
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
41
+ });
42
+ };
43
+ i0.ɵɵngDeclareClassMetadata({
44
+ minVersion: "12.0.0",
45
+ version: "22.2.3",
46
+ ngImport: i0,
47
+ type: HyProgressiveBlur,
48
+ decorators: [{
49
+ type: Component,
50
+ args: [{
51
+ selector: "hy-progressive-blur",
52
+ changeDetection: ChangeDetectionStrategy.OnPush,
53
+ host: {
54
+ "aria-hidden": "true",
55
+ "[attr.data-edge]": "edge()",
56
+ "[class.blur]": "blur()"
57
+ },
58
+ template: "<i></i><i></i>",
59
+ styles: [":host{position:absolute;inset-inline:0;inset-block-start:0;block-size:var(--hy-edge-height, 3rem);pointer-events:none;background:linear-gradient(var(--hy-surface-1),transparent);z-index:1}:host([data-edge=\"bottom\"]){inset-block-start:auto;inset-block-end:0;rotate:180deg}i{position:absolute;inset:0;-webkit-mask-image:linear-gradient(black,transparent);mask-image:linear-gradient(black,transparent)}:host(.blur) i:first-child{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}:host(.blur) i:last-child{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);-webkit-mask-image:linear-gradient(black,transparent 65%);mask-image:linear-gradient(black,transparent 65%)}@media(prefers-reduced-transparency:reduce),(forced-colors:active){i{display:none}}\n"]
60
+ }]
61
+ }],
62
+ propDecorators: { edge: [{
63
+ type: i0.Input,
64
+ args: [{
65
+ isSignal: true,
66
+ alias: "edge",
67
+ required: false
68
+ }]
69
+ }] }
70
+ });
71
+ export { HyProgressiveBlur };
72
+
73
+ //# sourceMappingURL=hyalo-angular-progressive-blur.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hyalo-angular-progressive-blur.mjs","names":[],"sources":["../../../projects/hyalo/progressive-blur/progressive-blur.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { HyFidelity } from '@hyalo/angular/core';\n@Component({\n selector: 'hy-progressive-blur',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { 'aria-hidden': 'true', '[attr.data-edge]': 'edge()', '[class.blur]': 'blur()' },\n template: '<i></i><i></i>',\n styleUrl: './progressive-blur.css',\n})\nexport class HyProgressiveBlur {\n readonly edge = input<'top' | 'bottom'>('top');\n private readonly fidelity = inject(HyFidelity);\n protected readonly blur = computed(() => this.fidelity.tier() === 'high');\n}\n"],"mappings":";;;AASA,IAAa,oBAAb,MAAa,kBAAiB;CACnB,OAAO,MAAwB,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC7B,WAAW,OAAO,UAAU;CAC1B,OAAO,eAAe,KAAK,SAAS,KAAI,MAAO,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAH9D,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAiB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAjB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAiB,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,MAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,MAAA;GAAA,YAAA,EAAA,eAAA,OAAA;GAAA,YAAA;IAAA,kBAAA;IAAA,cAAA;GAAA;EAAA;EAAA,UAAA;EAAA,UAHlB;EAAgB,UAAA;EAAA,QAAA,CAAA,iwBAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAGf,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EAP7B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAqB,iBACd,wBAAwB;GAAM,MACzC;IAAE,eAAe;IAAQ,oBAAoB;IAAU,gBAAgB;GAAQ;GAAE,UAC7E;GAAgB,QAAA,CAAA,iwBAAA;EAAA,CAAA"}
@@ -0,0 +1,186 @@
1
+ var RefractionRenderer = class {
2
+ document;
3
+ canvas;
4
+ gl;
5
+ program;
6
+ buffer;
7
+ uniforms;
8
+ surfaces = /* @__PURE__ */ new Set();
9
+ frame = 0;
10
+ lost = false;
11
+ onLost = (event) => {
12
+ event.preventDefault();
13
+ this.lost = true;
14
+ this.stop();
15
+ for (const surface of this.surfaces) {
16
+ surface.target.canvas.width = 0;
17
+ surface.target.canvas.removeAttribute("data-rendered");
18
+ }
19
+ };
20
+ constructor(document) {
21
+ this.document = document;
22
+ this.canvas = document.createElement("canvas");
23
+ const gl = this.canvas.getContext("webgl", {
24
+ alpha: true,
25
+ premultipliedAlpha: false
26
+ });
27
+ if (!gl) throw new Error("WebGL unavailable");
28
+ this.gl = gl;
29
+ const vertex = this.shader(gl.VERTEX_SHADER, "attribute vec2 p; varying vec2 uv; void main(){ uv=(p+1.0)*0.5; gl_Position=vec4(p,0.0,1.0); }");
30
+ const fragment = this.shader(gl.FRAGMENT_SHADER, `
31
+ precision mediump float;
32
+ varying vec2 uv;
33
+ uniform sampler2D image;
34
+ uniform float strength;
35
+ uniform float aspect;
36
+ uniform float imageAspect;
37
+ void main(){
38
+ vec2 q=uv;
39
+ float edge=pow(abs(q.x-0.5)*2.0,8.0)+pow(abs(q.y-0.5)*2.0,8.0);
40
+ q+=(q-0.5)*edge*strength;
41
+ if(aspect>imageAspect) q.y=(q.y-0.5)*imageAspect/aspect+0.5;
42
+ else q.x=(q.x-0.5)*aspect/imageAspect+0.5;
43
+ vec4 color=texture2D(image,clamp(q,0.001,0.999));
44
+ gl_FragColor=vec4(color.rgb+edge*0.07,color.a);
45
+ }`);
46
+ const program = gl.createProgram();
47
+ if (!program) throw new Error("WebGL program unavailable");
48
+ this.program = program;
49
+ gl.attachShader(program, vertex);
50
+ gl.attachShader(program, fragment);
51
+ gl.linkProgram(program);
52
+ gl.deleteShader(vertex);
53
+ gl.deleteShader(fragment);
54
+ if (!gl.getProgramParameter(program, gl.LINK_STATUS)) throw new Error("WebGL link failed");
55
+ gl.useProgram(program);
56
+ const buffer = gl.createBuffer();
57
+ this.buffer = buffer;
58
+ gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
59
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
60
+ -1,
61
+ -1,
62
+ 1,
63
+ -1,
64
+ -1,
65
+ 1,
66
+ 1,
67
+ 1
68
+ ]), gl.STATIC_DRAW);
69
+ const position = gl.getAttribLocation(program, "p");
70
+ gl.enableVertexAttribArray(position);
71
+ gl.vertexAttribPointer(position, 2, gl.FLOAT, false, 0, 0);
72
+ this.uniforms = Object.fromEntries([
73
+ "image",
74
+ "strength",
75
+ "aspect",
76
+ "imageAspect"
77
+ ].map((name) => [name, gl.getUniformLocation(program, name)]));
78
+ this.canvas.addEventListener("webglcontextlost", this.onLost);
79
+ }
80
+ shader(kind, source) {
81
+ const shader = this.gl.createShader(kind);
82
+ if (!shader) throw new Error("WebGL shader unavailable");
83
+ this.gl.shaderSource(shader, source);
84
+ this.gl.compileShader(shader);
85
+ if (!this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS)) {
86
+ this.gl.deleteShader(shader);
87
+ throw new Error("WebGL compilation failed");
88
+ }
89
+ return shader;
90
+ }
91
+ register(target) {
92
+ const image = this.document.createElement("img");
93
+ image.crossOrigin = "anonymous";
94
+ const surface = {
95
+ target,
96
+ image,
97
+ texture: null,
98
+ ready: false
99
+ };
100
+ this.surfaces.add(surface);
101
+ image.onload = () => {
102
+ if (!this.surfaces.has(surface) || this.lost) return;
103
+ const gl = this.gl;
104
+ const texture = gl.createTexture();
105
+ gl.bindTexture(gl.TEXTURE_2D, texture);
106
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
107
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
108
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
109
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
110
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1);
111
+ try {
112
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
113
+ surface.texture = texture;
114
+ surface.ready = true;
115
+ } catch {
116
+ gl.deleteTexture(texture);
117
+ }
118
+ this.draw();
119
+ };
120
+ image.src = target.src;
121
+ return () => {
122
+ this.surfaces.delete(surface);
123
+ image.onload = null;
124
+ if (surface.texture) this.gl.deleteTexture(surface.texture);
125
+ target.canvas.width = 0;
126
+ target.canvas.removeAttribute("data-rendered");
127
+ if (!this.surfaces.size) this.stop();
128
+ };
129
+ }
130
+ draw() {
131
+ if (this.frame || this.lost) return;
132
+ this.frame = this.document.defaultView?.requestAnimationFrame(() => {
133
+ this.frame = 0;
134
+ const measured = [...this.surfaces].filter((surface) => surface.ready && surface.target.canvas.isConnected).map((surface) => ({
135
+ surface,
136
+ rect: surface.target.canvas.getBoundingClientRect()
137
+ }));
138
+ for (const { surface, rect } of measured) this.render(surface, rect);
139
+ }) ?? 0;
140
+ }
141
+ render(surface, rect) {
142
+ if (!surface.ready || !surface.texture) return;
143
+ const { canvas } = surface.target;
144
+ if (rect.width <= 0 || rect.height <= 0) return;
145
+ const dpr = Math.min(this.document.defaultView?.devicePixelRatio ?? 1, 2);
146
+ const width = Math.min(2048, Math.round(rect.width * dpr)), height = Math.min(2048, Math.round(rect.height * dpr));
147
+ if (this.canvas.width !== width) this.canvas.width = width;
148
+ if (this.canvas.height !== height) this.canvas.height = height;
149
+ const gl = this.gl;
150
+ gl.viewport(0, 0, width, height);
151
+ gl.useProgram(this.program);
152
+ gl.bindTexture(gl.TEXTURE_2D, surface.texture);
153
+ gl.uniform1i(this.uniforms["image"] ?? null, 0);
154
+ gl.uniform1f(this.uniforms["strength"] ?? null, Math.max(0, Math.min(1, surface.target.strength())));
155
+ gl.uniform1f(this.uniforms["aspect"] ?? null, width / height);
156
+ gl.uniform1f(this.uniforms["imageAspect"] ?? null, surface.image.naturalWidth / surface.image.naturalHeight);
157
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
158
+ if (canvas.width !== width) canvas.width = width;
159
+ if (canvas.height !== height) canvas.height = height;
160
+ const context = canvas.getContext("2d");
161
+ if (context) {
162
+ context.drawImage(this.canvas, 0, 0);
163
+ canvas.setAttribute("data-rendered", "");
164
+ }
165
+ }
166
+ stop() {
167
+ this.document.defaultView?.cancelAnimationFrame(this.frame);
168
+ this.frame = 0;
169
+ }
170
+ destroy() {
171
+ this.lost = true;
172
+ this.stop();
173
+ for (const surface of this.surfaces) {
174
+ surface.image.onload = null;
175
+ if (surface.texture) this.gl.deleteTexture(surface.texture);
176
+ }
177
+ this.surfaces.clear();
178
+ this.canvas.removeEventListener("webglcontextlost", this.onLost);
179
+ this.gl.deleteBuffer(this.buffer);
180
+ this.gl.deleteProgram(this.program);
181
+ this.gl.getExtension("WEBGL_lose_context")?.loseContext();
182
+ }
183
+ };
184
+ export { RefractionRenderer };
185
+
186
+ //# sourceMappingURL=hyalo-angular-refraction-renderer-5ZA-kfsA.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hyalo-angular-refraction-renderer-5ZA-kfsA.mjs","names":[],"sources":["../../../projects/hyalo/refraction/renderer.ts"],"sourcesContent":["/** One WebGL context shared by all surfaces; each surface receives a 2D copy. */\nexport interface RefractionTarget {\n readonly canvas: HTMLCanvasElement;\n readonly src: string;\n readonly strength: () => number;\n}\ninterface Surface {\n readonly target: RefractionTarget;\n readonly image: HTMLImageElement;\n texture: WebGLTexture | null;\n ready: boolean;\n}\nexport class RefractionRenderer {\n private readonly canvas: HTMLCanvasElement;\n private readonly gl: WebGLRenderingContext;\n private readonly program: WebGLProgram;\n private readonly buffer: WebGLBuffer | null;\n private readonly uniforms: Record<string, WebGLUniformLocation | null>;\n private readonly surfaces = new Set<Surface>();\n private frame = 0;\n private lost = false;\n private readonly onLost = (event: Event): void => {\n event.preventDefault();\n this.lost = true;\n this.stop();\n for (const surface of this.surfaces) {\n surface.target.canvas.width = 0;\n surface.target.canvas.removeAttribute('data-rendered');\n }\n };\n\n constructor(private readonly document: Document) {\n this.canvas = document.createElement('canvas');\n const gl = this.canvas.getContext('webgl', { alpha: true, premultipliedAlpha: false });\n if (!gl) throw new Error('WebGL unavailable');\n this.gl = gl;\n const vertex = this.shader(\n gl.VERTEX_SHADER,\n 'attribute vec2 p; varying vec2 uv; void main(){ uv=(p+1.0)*0.5; gl_Position=vec4(p,0.0,1.0); }',\n );\n const fragment = this.shader(\n gl.FRAGMENT_SHADER,\n `\n precision mediump float;\n varying vec2 uv;\n uniform sampler2D image;\n uniform float strength;\n uniform float aspect;\n uniform float imageAspect;\n void main(){\n vec2 q=uv;\n float edge=pow(abs(q.x-0.5)*2.0,8.0)+pow(abs(q.y-0.5)*2.0,8.0);\n q+=(q-0.5)*edge*strength;\n if(aspect>imageAspect) q.y=(q.y-0.5)*imageAspect/aspect+0.5;\n else q.x=(q.x-0.5)*aspect/imageAspect+0.5;\n vec4 color=texture2D(image,clamp(q,0.001,0.999));\n gl_FragColor=vec4(color.rgb+edge*0.07,color.a);\n }`,\n );\n const program = gl.createProgram();\n if (!program) throw new Error('WebGL program unavailable');\n this.program = program;\n gl.attachShader(program, vertex);\n gl.attachShader(program, fragment);\n gl.linkProgram(program);\n gl.deleteShader(vertex);\n gl.deleteShader(fragment);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) throw new Error('WebGL link failed');\n gl.useProgram(program);\n const buffer = gl.createBuffer();\n this.buffer = buffer;\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]), gl.STATIC_DRAW);\n const position = gl.getAttribLocation(program, 'p');\n gl.enableVertexAttribArray(position);\n gl.vertexAttribPointer(position, 2, gl.FLOAT, false, 0, 0);\n this.uniforms = Object.fromEntries(\n ['image', 'strength', 'aspect', 'imageAspect'].map((name) => [\n name,\n gl.getUniformLocation(program, name),\n ]),\n );\n this.canvas.addEventListener('webglcontextlost', this.onLost);\n // Keep CSS fallback after a context loss. A new renderer is created on the next registration.\n }\n private shader(kind: number, source: string): WebGLShader {\n const shader = this.gl.createShader(kind);\n if (!shader) throw new Error('WebGL shader unavailable');\n this.gl.shaderSource(shader, source);\n this.gl.compileShader(shader);\n if (!this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS)) {\n this.gl.deleteShader(shader);\n throw new Error('WebGL compilation failed');\n }\n return shader;\n }\n register(target: RefractionTarget): () => void {\n const image = this.document.createElement('img');\n image.crossOrigin = 'anonymous';\n const surface: Surface = { target, image, texture: null, ready: false };\n this.surfaces.add(surface);\n image.onload = (): void => {\n if (!this.surfaces.has(surface) || this.lost) return;\n const gl = this.gl;\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1);\n try {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);\n surface.texture = texture;\n surface.ready = true;\n } catch {\n gl.deleteTexture(texture);\n }\n this.draw();\n };\n image.src = target.src;\n return (): void => {\n this.surfaces.delete(surface);\n image.onload = null;\n if (surface.texture) this.gl.deleteTexture(surface.texture);\n target.canvas.width = 0;\n target.canvas.removeAttribute('data-rendered');\n if (!this.surfaces.size) this.stop();\n };\n }\n /** Render only on load, resize or an input change. Refraction itself is stationary. */\n draw(): void {\n if (this.frame || this.lost) return;\n this.frame =\n this.document.defaultView?.requestAnimationFrame(() => {\n this.frame = 0;\n const measured = [...this.surfaces]\n .filter((surface) => surface.ready && surface.target.canvas.isConnected)\n .map((surface) => ({ surface, rect: surface.target.canvas.getBoundingClientRect() }));\n for (const { surface, rect } of measured) this.render(surface, rect);\n }) ?? 0;\n }\n private render(surface: Surface, rect: DOMRect): void {\n if (!surface.ready || !surface.texture) return;\n const { canvas } = surface.target;\n if (rect.width <= 0 || rect.height <= 0) return;\n const dpr = Math.min(this.document.defaultView?.devicePixelRatio ?? 1, 2);\n const width = Math.min(2048, Math.round(rect.width * dpr)),\n height = Math.min(2048, Math.round(rect.height * dpr));\n if (this.canvas.width !== width) this.canvas.width = width;\n if (this.canvas.height !== height) this.canvas.height = height;\n const gl = this.gl;\n gl.viewport(0, 0, width, height);\n gl.useProgram(this.program);\n gl.bindTexture(gl.TEXTURE_2D, surface.texture);\n gl.uniform1i(this.uniforms['image'] ?? null, 0);\n gl.uniform1f(\n this.uniforms['strength'] ?? null,\n Math.max(0, Math.min(1, surface.target.strength())),\n );\n gl.uniform1f(this.uniforms['aspect'] ?? null, width / height);\n gl.uniform1f(\n this.uniforms['imageAspect'] ?? null,\n surface.image.naturalWidth / surface.image.naturalHeight,\n );\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n if (canvas.width !== width) canvas.width = width;\n if (canvas.height !== height) canvas.height = height;\n const context = canvas.getContext('2d');\n if (context) {\n context.drawImage(this.canvas, 0, 0);\n canvas.setAttribute('data-rendered', '');\n }\n }\n private stop(): void {\n this.document.defaultView?.cancelAnimationFrame(this.frame);\n this.frame = 0;\n }\n destroy(): void {\n this.lost = true;\n this.stop();\n for (const surface of this.surfaces) {\n surface.image.onload = null;\n if (surface.texture) this.gl.deleteTexture(surface.texture);\n }\n this.surfaces.clear();\n this.canvas.removeEventListener('webglcontextlost', this.onLost);\n this.gl.deleteBuffer(this.buffer);\n this.gl.deleteProgram(this.program);\n this.gl.getExtension('WEBGL_lose_context')?.loseContext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