@sharadox/web-library 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/LICENCA.md +76 -0
  2. package/LICENSE.md +76 -0
  3. package/NOTICE.md +3 -0
  4. package/README.md +34 -2
  5. package/distribution/animation/in-view/index.d.ts +3 -0
  6. package/distribution/animation/in-view/index.d.ts.map +1 -0
  7. package/distribution/animation/in-view/index.js +15 -0
  8. package/distribution/animation/in-view/index.js.map +1 -0
  9. package/distribution/animation/reveal/index.d.ts +4 -0
  10. package/distribution/animation/reveal/index.d.ts.map +1 -0
  11. package/distribution/animation/reveal/index.js +9 -0
  12. package/distribution/animation/reveal/index.js.map +1 -0
  13. package/distribution/animation/reveal/type.d.ts +14 -0
  14. package/distribution/animation/reveal/type.d.ts.map +1 -0
  15. package/distribution/animation/reveal/type.js +2 -0
  16. package/distribution/animation/reveal/type.js.map +1 -0
  17. package/distribution/animation/scroll-word/index.d.ts +4 -0
  18. package/distribution/animation/scroll-word/index.d.ts.map +1 -0
  19. package/distribution/animation/scroll-word/index.js +16 -0
  20. package/distribution/animation/scroll-word/index.js.map +1 -0
  21. package/distribution/animation/scroll-word/type.d.ts +11 -0
  22. package/distribution/animation/scroll-word/type.d.ts.map +1 -0
  23. package/distribution/animation/scroll-word/type.js +2 -0
  24. package/distribution/animation/scroll-word/type.js.map +1 -0
  25. package/distribution/animation/scroll-word/word/index.d.ts +4 -0
  26. package/distribution/animation/scroll-word/word/index.d.ts.map +1 -0
  27. package/distribution/animation/scroll-word/word/index.js +10 -0
  28. package/distribution/animation/scroll-word/word/index.js.map +1 -0
  29. package/distribution/animation/scroll-word/word/type.d.ts +14 -0
  30. package/distribution/animation/scroll-word/word/type.d.ts.map +1 -0
  31. package/distribution/animation/scroll-word/word/type.js +2 -0
  32. package/distribution/animation/scroll-word/word/type.js.map +1 -0
  33. package/distribution/animation/smooth-scroll/index.d.ts +4 -0
  34. package/distribution/animation/smooth-scroll/index.d.ts.map +1 -0
  35. package/distribution/animation/smooth-scroll/index.js +33 -0
  36. package/distribution/animation/smooth-scroll/index.js.map +1 -0
  37. package/distribution/animation/smooth-scroll/type.d.ts +7 -0
  38. package/distribution/animation/smooth-scroll/type.d.ts.map +1 -0
  39. package/distribution/animation/smooth-scroll/type.js +2 -0
  40. package/distribution/animation/smooth-scroll/type.js.map +1 -0
  41. package/distribution/class-name/index.d.ts +3 -0
  42. package/distribution/class-name/index.d.ts.map +1 -0
  43. package/distribution/class-name/index.js +5 -0
  44. package/distribution/class-name/index.js.map +1 -0
  45. package/distribution/form/bot-check/index.d.ts +4 -0
  46. package/distribution/form/bot-check/index.d.ts.map +1 -0
  47. package/distribution/form/bot-check/index.js +6 -0
  48. package/distribution/form/bot-check/index.js.map +1 -0
  49. package/distribution/form/bot-check/type.d.ts +11 -0
  50. package/distribution/form/bot-check/type.d.ts.map +1 -0
  51. package/distribution/form/bot-check/type.js +2 -0
  52. package/distribution/form/bot-check/type.js.map +1 -0
  53. package/distribution/form/field/index.d.ts +3 -0
  54. package/distribution/form/field/index.d.ts.map +1 -0
  55. package/distribution/form/field/index.js +7 -0
  56. package/distribution/form/field/index.js.map +1 -0
  57. package/distribution/form/rate-limit/index.d.ts +4 -0
  58. package/distribution/form/rate-limit/index.d.ts.map +1 -0
  59. package/distribution/form/rate-limit/index.js +14 -0
  60. package/distribution/form/rate-limit/index.js.map +1 -0
  61. package/distribution/form/rate-limit/type.d.ts +9 -0
  62. package/distribution/form/rate-limit/type.d.ts.map +1 -0
  63. package/distribution/form/rate-limit/type.js +2 -0
  64. package/distribution/form/rate-limit/type.js.map +1 -0
  65. package/distribution/html/escape/index.d.ts +3 -0
  66. package/distribution/html/escape/index.d.ts.map +1 -0
  67. package/distribution/html/escape/index.js +6 -0
  68. package/distribution/html/escape/index.js.map +1 -0
  69. package/distribution/internationalization/locale/index.d.ts +7 -0
  70. package/distribution/internationalization/locale/index.d.ts.map +1 -0
  71. package/distribution/internationalization/locale/index.js +17 -0
  72. package/distribution/internationalization/locale/index.js.map +1 -0
  73. package/distribution/internationalization/locale/type.d.ts +3 -0
  74. package/distribution/internationalization/locale/type.d.ts.map +1 -0
  75. package/distribution/internationalization/locale/type.js +2 -0
  76. package/distribution/internationalization/locale/type.js.map +1 -0
  77. package/distribution/internationalization/locale-redirect/index.d.ts +7 -0
  78. package/distribution/internationalization/locale-redirect/index.d.ts.map +1 -0
  79. package/distribution/internationalization/locale-redirect/index.js +16 -0
  80. package/distribution/internationalization/locale-redirect/index.js.map +1 -0
  81. package/distribution/internationalization/locale-redirect/type.d.ts +12 -0
  82. package/distribution/internationalization/locale-redirect/type.d.ts.map +1 -0
  83. package/distribution/internationalization/locale-redirect/type.js +2 -0
  84. package/distribution/internationalization/locale-redirect/type.js.map +1 -0
  85. package/distribution/internationalization/translate/index.d.ts +4 -0
  86. package/distribution/internationalization/translate/index.d.ts.map +1 -0
  87. package/distribution/internationalization/translate/index.js +5 -0
  88. package/distribution/internationalization/translate/index.js.map +1 -0
  89. package/distribution/math/clamp/index.d.ts +3 -0
  90. package/distribution/math/clamp/index.d.ts.map +1 -0
  91. package/distribution/math/clamp/index.js +5 -0
  92. package/distribution/math/clamp/index.js.map +1 -0
  93. package/distribution/math/pseudo-random/index.d.ts +3 -0
  94. package/distribution/math/pseudo-random/index.d.ts.map +1 -0
  95. package/distribution/math/pseudo-random/index.js +6 -0
  96. package/distribution/math/pseudo-random/index.js.map +1 -0
  97. package/distribution/math/radians/index.d.ts +3 -0
  98. package/distribution/math/radians/index.d.ts.map +1 -0
  99. package/distribution/math/radians/index.js +5 -0
  100. package/distribution/math/radians/index.js.map +1 -0
  101. package/distribution/pointer/spotlight/index.d.ts +3 -0
  102. package/distribution/pointer/spotlight/index.d.ts.map +1 -0
  103. package/distribution/pointer/spotlight/index.js +20 -0
  104. package/distribution/pointer/spotlight/index.js.map +1 -0
  105. package/distribution/search-engine/robots/index.d.ts +4 -0
  106. package/distribution/search-engine/robots/index.d.ts.map +1 -0
  107. package/distribution/search-engine/robots/index.js +7 -0
  108. package/distribution/search-engine/robots/index.js.map +1 -0
  109. package/distribution/search-engine/robots/type.d.ts +17 -0
  110. package/distribution/search-engine/robots/type.d.ts.map +1 -0
  111. package/distribution/search-engine/robots/type.js +2 -0
  112. package/distribution/search-engine/robots/type.js.map +1 -0
  113. package/distribution/search-engine/sitemap/index.d.ts +4 -0
  114. package/distribution/search-engine/sitemap/index.d.ts.map +1 -0
  115. package/distribution/search-engine/sitemap/index.js +12 -0
  116. package/distribution/search-engine/sitemap/index.js.map +1 -0
  117. package/distribution/search-engine/sitemap/type.d.ts +22 -0
  118. package/distribution/search-engine/sitemap/type.d.ts.map +1 -0
  119. package/distribution/search-engine/sitemap/type.js +2 -0
  120. package/distribution/search-engine/sitemap/type.js.map +1 -0
  121. package/distribution/search-engine/structured-data/index.d.ts +4 -0
  122. package/distribution/search-engine/structured-data/index.d.ts.map +1 -0
  123. package/distribution/search-engine/structured-data/index.js +6 -0
  124. package/distribution/search-engine/structured-data/index.js.map +1 -0
  125. package/distribution/search-engine/structured-data/type.d.ts +5 -0
  126. package/distribution/search-engine/structured-data/type.d.ts.map +1 -0
  127. package/distribution/search-engine/structured-data/type.js +2 -0
  128. package/distribution/search-engine/structured-data/type.js.map +1 -0
  129. package/distribution/test/visual-snapshot/index.d.ts +8 -0
  130. package/distribution/test/visual-snapshot/index.d.ts.map +1 -0
  131. package/distribution/test/visual-snapshot/index.js +20 -0
  132. package/distribution/test/visual-snapshot/index.js.map +1 -0
  133. package/distribution/test/visual-snapshot/type.d.ts +7 -0
  134. package/distribution/test/visual-snapshot/type.d.ts.map +1 -0
  135. package/distribution/test/visual-snapshot/type.js +2 -0
  136. package/distribution/test/visual-snapshot/type.js.map +1 -0
  137. package/distribution/time/format-time/index.d.ts +3 -0
  138. package/distribution/time/format-time/index.d.ts.map +1 -0
  139. package/distribution/time/format-time/index.js +5 -0
  140. package/distribution/time/format-time/index.js.map +1 -0
  141. package/distribution/time/open-state/index.d.ts +4 -0
  142. package/distribution/time/open-state/index.d.ts.map +1 -0
  143. package/distribution/time/open-state/index.js +11 -0
  144. package/distribution/time/open-state/index.js.map +1 -0
  145. package/distribution/time/open-state/type.d.ts +5 -0
  146. package/distribution/time/open-state/type.d.ts.map +1 -0
  147. package/distribution/time/open-state/type.js +2 -0
  148. package/distribution/time/open-state/type.js.map +1 -0
  149. package/distribution/time/sun-time/index.d.ts +4 -0
  150. package/distribution/time/sun-time/index.d.ts.map +1 -0
  151. package/distribution/time/sun-time/index.js +27 -0
  152. package/distribution/time/sun-time/index.js.map +1 -0
  153. package/distribution/time/sun-time/type.d.ts +6 -0
  154. package/distribution/time/sun-time/type.d.ts.map +1 -0
  155. package/distribution/time/sun-time/type.js +2 -0
  156. package/distribution/time/sun-time/type.js.map +1 -0
  157. package/distribution/time/sun-today/index.d.ts +4 -0
  158. package/distribution/time/sun-today/index.d.ts.map +1 -0
  159. package/distribution/time/sun-today/index.js +25 -0
  160. package/distribution/time/sun-today/index.js.map +1 -0
  161. package/distribution/time/sun-today/type.d.ts +9 -0
  162. package/distribution/time/sun-today/type.d.ts.map +1 -0
  163. package/distribution/time/sun-today/type.js +2 -0
  164. package/distribution/time/sun-today/type.js.map +1 -0
  165. package/distribution/time/zone-minute/index.d.ts +3 -0
  166. package/distribution/time/zone-minute/index.d.ts.map +1 -0
  167. package/distribution/time/zone-minute/index.js +13 -0
  168. package/distribution/time/zone-minute/index.js.map +1 -0
  169. package/package.json +99 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/time/sun-time/index.ts"],"names":[],"mappings":"AAEA,MAAM,kBAAkB,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;AAEzC,iGAAiG;AACjG,MAAM,UAAU,QAAQ,CAAC,IAAU,EAAE,QAAgB,EAAE,SAAiB;IACtE,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IACvE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;IAClE,MAAM,SAAS,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;IAC1D,MAAM,cAAc,GAClB,MAAM;QACN,CAAC,QAAQ;YACP,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;YAC9B,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;YAC9B,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;YAClC,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;IACxC,MAAM,WAAW,GACf,QAAQ;QACR,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;QAC9B,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;QAC9B,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;QAClC,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;QAClC,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;QAClC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IACpC,MAAM,SAAS,GACb,IAAI,CAAC,IAAI,CACP,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,GAAG,kBAAkB,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACvG,IAAI,CAAC,GAAG,CAAC,QAAQ,GAAG,kBAAkB,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAClE,GAAG,kBAAkB,CAAC;IACzB,MAAM,WAAW,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,cAAc,CAAC;IACvE,MAAM,UAAU,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,cAAc,CAAC;IACtE,OAAO,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,QAAQ,GAAG,WAAW,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,GAAG,CAAC,EAAE,CAAC;AACtG,CAAC"}
@@ -0,0 +1,6 @@
1
+ /** Sunrise and sunset as real instants, so they can be formatted in any timezone. */
2
+ export interface SunTimes {
3
+ rise: Date;
4
+ set: Date;
5
+ }
6
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../source/time/sun-time/type.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,IAAI,CAAC;IACX,GAAG,EAAE,IAAI,CAAC;CACX"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../../../source/time/sun-time/type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { SunToday } from "@sharadox/web-library/time/sun-today/type";
2
+ /** Today's sunrise and sunset at a place (tomorrow's once the sun has set), refreshed every minute. Null until mounted. */
3
+ export declare function useSunToday(latitude: number, longitude: number): SunToday | null;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/time/sun-today/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAE1E,2HAA2H;AAC3H,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAkB9D"}
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ import { useEffect, useState } from "react";
3
+ import { sunTimes } from "@sharadox/web-library/time/sun-time";
4
+ /** Today's sunrise and sunset at a place (tomorrow's once the sun has set), refreshed every minute. Null until mounted. */
5
+ export function useSunToday(latitude, longitude) {
6
+ const [sun, setSun] = useState(null);
7
+ useEffect(() => {
8
+ const tick = () => {
9
+ const now = new Date();
10
+ let times = sunTimes(now, latitude, longitude);
11
+ const tomorrow = now > times.set;
12
+ if (tomorrow)
13
+ times = sunTimes(new Date(now.getTime() + 864e5), latitude, longitude);
14
+ setSun({ ...times, now, tomorrow });
15
+ };
16
+ const first = setTimeout(tick, 0);
17
+ const timer = setInterval(tick, 60_000);
18
+ return () => {
19
+ clearTimeout(first);
20
+ clearInterval(timer);
21
+ };
22
+ }, [latitude, longitude]);
23
+ return sun;
24
+ }
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/time/sun-today/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAG/D,2HAA2H;AAC3H,MAAM,UAAU,WAAW,CAAC,QAAgB,EAAE,SAAiB;IAC7D,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAkB,IAAI,CAAC,CAAC;IACtD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,IAAI,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;YAC/C,MAAM,QAAQ,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;YACjC,IAAI,QAAQ;gBAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;YACrF,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;QACtC,CAAC,CAAC;QACF,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAClC,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACxC,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAC1B,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,9 @@
1
+ /** Sun times for the relevant evening, plus the moment they were computed for. */
2
+ export interface SunToday {
3
+ rise: Date;
4
+ set: Date;
5
+ now: Date;
6
+ /** After today's sunset these are tomorrow's times. */
7
+ tomorrow: boolean;
8
+ }
9
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../source/time/sun-today/type.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,IAAI,CAAC;IACX,GAAG,EAAE,IAAI,CAAC;IACV,GAAG,EAAE,IAAI,CAAC;IACV,uDAAuD;IACvD,QAAQ,EAAE,OAAO,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../../../source/time/sun-today/type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ /** Minutes since midnight in a time zone for an instant, whatever the visitor's own time zone. */
2
+ export declare function minutesInZone(date: Date, timeZone: string): number;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/time/zone-minute/index.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUlE"}
@@ -0,0 +1,13 @@
1
+ /** Minutes since midnight in a time zone for an instant, whatever the visitor's own time zone. */
2
+ export function minutesInZone(date, timeZone) {
3
+ const parts = new Intl.DateTimeFormat("en-GB", {
4
+ timeZone,
5
+ hour: "2-digit",
6
+ minute: "2-digit",
7
+ hourCycle: "h23",
8
+ }).formatToParts(date);
9
+ const hours = Number(parts.find((part) => part.type === "hour")?.value ?? 0);
10
+ const minutes = Number(parts.find((part) => part.type === "minute")?.value ?? 0);
11
+ return hours * 60 + minutes;
12
+ }
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/time/zone-minute/index.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,MAAM,UAAU,aAAa,CAAC,IAAU,EAAE,QAAgB;IACxD,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;QAC7C,QAAQ;QACR,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,KAAK;KACjB,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;IAC7E,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;IACjF,OAAO,KAAK,GAAG,EAAE,GAAG,OAAO,CAAC;AAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,102 @@
1
1
  {
2
2
  "name": "@sharadox/web-library",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "Generic building blocks for web applications: internationalization, search engine metadata, animation, time and forms.",
5
+ "private": false,
6
+ "license": "SEE LICENSE IN LICENCA.md",
7
+ "author": "Sharadox <email@sharadox.com>",
8
+ "type": "module",
9
+ "exports": {
10
+ "./*/type": {
11
+ "sharadox-source": "./source/*/type.ts",
12
+ "types": "./distribution/*/type.d.ts"
13
+ },
14
+ "./*": {
15
+ "sharadox-source": [
16
+ "./source/*/index.ts",
17
+ "./source/*/index.tsx"
18
+ ],
19
+ "types": "./distribution/*/index.d.ts",
20
+ "default": "./distribution/*/index.js"
21
+ }
22
+ },
23
+ "files": [
24
+ "distribution",
25
+ "LICENCA.md",
26
+ "LICENSE.md",
27
+ "NOTICE.md"
28
+ ],
29
+ "sideEffects": [
30
+ "**/*.css"
31
+ ],
32
+ "engines": {
33
+ "node": ">=20"
34
+ },
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "peerDependencies": {
39
+ "react": ">=19",
40
+ "@playwright/test": ">=1.50"
41
+ },
42
+ "peerDependenciesMeta": {
43
+ "react": {
44
+ "optional": true
45
+ },
46
+ "@playwright/test": {
47
+ "optional": true
48
+ }
49
+ },
50
+ "lint-staged": {
51
+ "*.{ts,tsx,js,mjs,cjs}": [
52
+ "prettier --write",
53
+ "eslint --fix --max-warnings=0"
54
+ ],
55
+ "*.{json,md,yml,yaml,scss}": "prettier --write"
56
+ },
57
+ "devDependencies": {
58
+ "@eslint/js": "^9.39.5",
59
+ "@playwright/test": "1.65.0",
60
+ "@testing-library/dom": "^10.4.2",
61
+ "@testing-library/react": "^16.3.3",
62
+ "@types/node": "^24.19.2",
63
+ "@types/react": "^19.3.0",
64
+ "@vitejs/plugin-react": "^6.3.0",
65
+ "eslint": "9.39.5",
66
+ "eslint-config-prettier": "^10.1.8",
67
+ "eslint-plugin-react-hooks": "^7.1.1",
68
+ "happy-dom": "^21.0.4",
69
+ "husky": "^9.1.7",
70
+ "lint-staged": "^17.6.0",
71
+ "next": "16.4.5",
72
+ "prettier": "^3.9.10",
73
+ "react": "^19.3.1",
74
+ "react-dom": "^19.3.1",
75
+ "sass": "^1.108.1",
76
+ "turbo": "^2.11.10",
77
+ "typedoc": "^0.28.20",
78
+ "typescript": "6.0.3",
79
+ "typescript-eslint": "^8.72.2",
80
+ "vitest": "^5.1.0"
81
+ },
82
+ "repository": {
83
+ "type": "git",
84
+ "url": "git+https://github.com/Sharadox/web-library.git"
85
+ },
86
+ "homepage": "https://github.com/Sharadox/web-library#readme",
87
+ "dependencies": {
88
+ "lenis": "^1.3.27",
89
+ "motion": "^12.43.0"
90
+ },
91
+ "scripts": {
92
+ "build": "rm -rf distribution && tsc -p tsconfig.build.json && sass --no-source-map source:distribution && node script/rewrite-style-import/index.ts",
93
+ "lint": "eslint --max-warnings=0 .",
94
+ "format": "prettier --write .",
95
+ "format:check": "prettier --check .",
96
+ "type-check": "tsc --noEmit",
97
+ "test:unit": "vitest run",
98
+ "test:benchmark": "vitest bench --run --passWithNoTests",
99
+ "documentation": "typedoc",
100
+ "verify": "turbo run format:check lint type-check test:unit test:benchmark build"
101
+ }
6
102
  }