@r_masseater/masseater-utils 0.6.1 → 0.7.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 (160) hide show
  1. package/README.md +40 -22
  2. package/dist/browser-test/vite.d.mts +6 -0
  3. package/dist/browser-test/vite.mjs +29 -0
  4. package/dist/browser-test/vite.mjs.map +1 -0
  5. package/dist/button-variants-BLMlMm-s.mjs +31 -0
  6. package/dist/button-variants-BLMlMm-s.mjs.map +1 -0
  7. package/dist/button-variants-Bupz7GI3.d.mts +6 -0
  8. package/dist/cn-DtxpfSUK.mjs +7 -0
  9. package/dist/cn-DtxpfSUK.mjs.map +1 -0
  10. package/dist/effect2cs.d.mts +27 -0
  11. package/dist/effect2cs.mjs +75 -0
  12. package/dist/effect2cs.mjs.map +1 -0
  13. package/dist/effect2rs.d.mts +52 -0
  14. package/dist/effect2rs.mjs +870 -0
  15. package/dist/effect2rs.mjs.map +1 -0
  16. package/dist/github-workflow.d.mts +3 -33
  17. package/dist/github-workflow.mjs +2 -46
  18. package/dist/github-workflow.mjs.map +1 -1
  19. package/dist/headers-BK-aW9Kw.d.mts +81 -0
  20. package/dist/headers-Cr6gAurg.mjs +115 -0
  21. package/dist/headers-Cr6gAurg.mjs.map +1 -0
  22. package/dist/heading-class-CDq0WZpR.d.mts +10 -0
  23. package/dist/heading-class-H4Z13Bpn.mjs +14 -0
  24. package/dist/heading-class-H4Z13Bpn.mjs.map +1 -0
  25. package/dist/index-BkZOsFv4.d.mts +139 -0
  26. package/dist/index-CLb1-l_c.d.mts +28 -0
  27. package/dist/index-ChbPLmqu.d.mts +33 -0
  28. package/dist/lapse/sdk.d.mts +4 -0
  29. package/dist/lapse/sdk.mjs +11 -0
  30. package/dist/lapse/sdk.mjs.map +1 -0
  31. package/dist/lapse.d.mts +8 -0
  32. package/dist/lapse.mjs +43 -0
  33. package/dist/lapse.mjs.map +1 -0
  34. package/dist/local-server/node.d.mts +21 -0
  35. package/dist/local-server/node.mjs +81 -0
  36. package/dist/local-server/node.mjs.map +1 -0
  37. package/dist/local-server/serve.d.mts +9 -0
  38. package/dist/local-server/serve.mjs +13 -0
  39. package/dist/local-server/serve.mjs.map +1 -0
  40. package/dist/local-server.d.mts +19 -0
  41. package/dist/local-server.mjs +36 -0
  42. package/dist/local-server.mjs.map +1 -0
  43. package/dist/portfolio-BQJtJtfK.mjs +45 -0
  44. package/dist/portfolio-BQJtJtfK.mjs.map +1 -0
  45. package/dist/process-_W_7DeKe.d.mts +34 -0
  46. package/dist/process-lKS6nYWh.mjs +49 -0
  47. package/dist/process-lKS6nYWh.mjs.map +1 -0
  48. package/dist/process.d.mts +2 -0
  49. package/dist/process.mjs +1 -0
  50. package/dist/security-headers/http.d.mts +10 -0
  51. package/dist/security-headers/http.mjs +25 -0
  52. package/dist/security-headers/http.mjs.map +1 -0
  53. package/dist/security-headers/request.d.mts +3 -0
  54. package/dist/security-headers/request.mjs +15 -0
  55. package/dist/security-headers/request.mjs.map +1 -0
  56. package/dist/security-headers/response.d.mts +2 -0
  57. package/dist/security-headers/response.mjs +17 -0
  58. package/dist/security-headers/response.mjs.map +1 -0
  59. package/dist/security-headers/static.d.mts +2 -0
  60. package/dist/security-headers/static.mjs +1 -0
  61. package/dist/security-headers/vite.d.mts +2 -0
  62. package/dist/security-headers/vite.mjs +1 -0
  63. package/dist/security-headers.d.mts +3 -0
  64. package/dist/security-headers.mjs +3 -0
  65. package/dist/socket-port-CTg-qfiP.mjs +20 -0
  66. package/dist/socket-port-CTg-qfiP.mjs.map +1 -0
  67. package/dist/static-page-headers-_B0WGkew.mjs +133 -0
  68. package/dist/static-page-headers-_B0WGkew.mjs.map +1 -0
  69. package/dist/sync-BkyZGGDA.mjs +121 -0
  70. package/dist/sync-BkyZGGDA.mjs.map +1 -0
  71. package/dist/table-class-BeiCXlFj.d.mts +14 -0
  72. package/dist/table-class-RQvT6MYy.mjs +21 -0
  73. package/dist/table-class-RQvT6MYy.mjs.map +1 -0
  74. package/dist/ui/backdrop-palette.d.mts +10 -0
  75. package/dist/ui/backdrop-palette.mjs +13 -0
  76. package/dist/ui/backdrop-palette.mjs.map +1 -0
  77. package/dist/ui/badge.d.mts +12 -0
  78. package/dist/ui/badge.mjs +18 -0
  79. package/dist/ui/badge.mjs.map +1 -0
  80. package/dist/ui/browser-runtime.d.mts +3 -0
  81. package/dist/ui/browser-runtime.mjs +18 -0
  82. package/dist/ui/browser-runtime.mjs.map +1 -0
  83. package/dist/ui/button-variants.d.mts +2 -0
  84. package/dist/ui/button-variants.mjs +1 -0
  85. package/dist/ui/button.d.mts +7 -0
  86. package/dist/ui/button.mjs +30 -0
  87. package/dist/ui/button.mjs.map +1 -0
  88. package/dist/ui/cn.d.mts +3 -0
  89. package/dist/ui/cn.mjs +1 -0
  90. package/dist/ui/color-scheme.d.mts +2 -0
  91. package/dist/ui/color-scheme.mjs +13 -0
  92. package/dist/ui/color-scheme.mjs.map +1 -0
  93. package/dist/ui/heading-class.d.mts +2 -0
  94. package/dist/ui/heading-class.mjs +1 -0
  95. package/dist/ui/heading.d.mts +8 -0
  96. package/dist/ui/heading.mjs +34 -0
  97. package/dist/ui/heading.mjs.map +1 -0
  98. package/dist/ui/input-class.d.mts +2 -0
  99. package/dist/ui/input-class.mjs +5 -0
  100. package/dist/ui/input-class.mjs.map +1 -0
  101. package/dist/ui/native-select-class.d.mts +2 -0
  102. package/dist/ui/native-select-class.mjs +5 -0
  103. package/dist/ui/native-select-class.mjs.map +1 -0
  104. package/dist/ui/next-page-trigger.d.mts +5 -0
  105. package/dist/ui/next-page-trigger.mjs +29 -0
  106. package/dist/ui/next-page-trigger.mjs.map +1 -0
  107. package/dist/ui/page-footer.d.mts +10 -0
  108. package/dist/ui/page-footer.mjs +24 -0
  109. package/dist/ui/page-footer.mjs.map +1 -0
  110. package/dist/ui/page-header.d.mts +11 -0
  111. package/dist/ui/page-header.mjs +22 -0
  112. package/dist/ui/page-header.mjs.map +1 -0
  113. package/dist/ui/pointer.d.mts +14 -0
  114. package/dist/ui/pointer.mjs +51 -0
  115. package/dist/ui/pointer.mjs.map +1 -0
  116. package/dist/ui/portfolio.d.mts +31 -0
  117. package/dist/ui/portfolio.mjs +1 -0
  118. package/dist/ui/table-class.d.mts +2 -0
  119. package/dist/ui/table-class.mjs +1 -0
  120. package/dist/ui/table.d.mts +30 -0
  121. package/dist/ui/table.mjs +64 -0
  122. package/dist/ui/table.mjs.map +1 -0
  123. package/dist/ui/to-wavy-letters.d.mts +12 -0
  124. package/dist/ui/to-wavy-letters.mjs +9 -0
  125. package/dist/ui/to-wavy-letters.mjs.map +1 -0
  126. package/dist/ui/web-analytics.d.mts +18 -0
  127. package/dist/ui/web-analytics.mjs +19 -0
  128. package/dist/ui/web-analytics.mjs.map +1 -0
  129. package/dist/web-analytics-BM9LdncT.d.mts +4 -0
  130. package/dist/web-analytics-Bz6nyJmQ.mjs +6 -0
  131. package/dist/web-analytics-Bz6nyJmQ.mjs.map +1 -0
  132. package/dist/yohaku-protocol/sync.d.mts +2 -0
  133. package/dist/yohaku-protocol/sync.mjs +1 -0
  134. package/dist/yohaku-protocol.d.mts +2 -0
  135. package/dist/yohaku-protocol.mjs +1 -0
  136. package/package.json +131 -4
  137. package/skills/share-types-with-rust/SKILL.md +90 -0
  138. package/src/app/browser-test-fonts.conf +28 -0
  139. package/src/app/ui-styles.css +185 -0
  140. package/src/app/ui-theme.css +81 -0
  141. package/src/app/ui-view-transition.css +5 -0
  142. package/src/shared/lib/button-variants.ts +33 -0
  143. package/src/shared/lib/input-class.ts +2 -0
  144. package/src/shared/lib/native-select-class.ts +2 -0
  145. package/src/shared/lib/table-class.ts +35 -0
  146. package/src/shared/ui/badge.tsx +29 -0
  147. package/src/shared/ui/button.tsx +39 -0
  148. package/src/shared/ui/heading.tsx +38 -0
  149. package/src/shared/ui/next-page-trigger.tsx +34 -0
  150. package/src/shared/ui/page-footer.tsx +34 -0
  151. package/src/shared/ui/page-header.tsx +29 -0
  152. package/src/shared/ui/table/column-headings.tsx +30 -0
  153. package/src/shared/ui/table/index.ts +10 -0
  154. package/src/shared/ui/table/table-body.tsx +8 -0
  155. package/src/shared/ui/table/table-caption.tsx +8 -0
  156. package/src/shared/ui/table/table-cell.tsx +8 -0
  157. package/src/shared/ui/table/table-head.tsx +13 -0
  158. package/src/shared/ui/table/table-header.tsx +8 -0
  159. package/src/shared/ui/table/table-row.tsx +8 -0
  160. package/src/shared/ui/table/table.tsx +31 -0
@@ -0,0 +1,9 @@
1
+ // src/shared/lib/to-wavy-letters.ts
2
+ const toWavyLetters = (text) => Array.from(text, (letter, index) => ({
3
+ key: `${letter}-${index}`,
4
+ letter,
5
+ style: { "--i": index }
6
+ }));
7
+ export { toWavyLetters };
8
+
9
+ //# sourceMappingURL=to-wavy-letters.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-wavy-letters.mjs","names":[],"sources":["../../src/shared/lib/to-wavy-letters.ts"],"sourcesContent":["import type { CssVariables } from \"#/shared/lib/css-variables.ts\";\n\nexport type WavyLetter = Readonly<{ key: string; letter: string; style: CssVariables }>;\n\nexport const toWavyLetters = (text: string): readonly WavyLetter[] =>\n Array.from(text, (letter, index) => ({\n key: `${letter}-${index}`,\n letter,\n style: { \"--i\": index },\n }));\n"],"mappings":";AAIA,MAAa,iBAAiB,SAC5B,MAAM,KAAK,OAAO,QAAQ,WAAW;CACnC,KAAK,GAAG,OAAO,GAAG;CAClB;CACA,OAAO,EAAE,OAAO,MAAM;AACxB,EAAE"}
@@ -0,0 +1,18 @@
1
+ import { n as WEB_ANALYTICS_SCRIPT_ORIGIN, t as WEB_ANALYTICS_REPORT_ORIGIN } from "../web-analytics-BM9LdncT.mjs";
2
+ export declare const WEB_ANALYTICS_BEACON: {
3
+ readonly src: "https://static.cloudflareinsights.com/beacon.min.js/v8c78df7c7c0f484497ecbca7046644da1771523124516";
4
+ readonly integrity: "sha512-8DS7rgIrAmghBFwoOTujcf6D9rXvH8xm8JQ1Ja01h9QX8EzXldiszufYa4IFfKdLUKTTrnSFXLDkUEOTrZQ8Qg==";
5
+ readonly crossOrigin: "anonymous";
6
+ };
7
+ export declare const CF_BEACON_TOKEN = "021b4961f3fd419297b186136a5a8a0a";
8
+ export declare const webAnalyticsBeacon: (token: string) => {
9
+ readonly src: "https://static.cloudflareinsights.com/beacon.min.js/v8c78df7c7c0f484497ecbca7046644da1771523124516";
10
+ readonly integrity: "sha512-8DS7rgIrAmghBFwoOTujcf6D9rXvH8xm8JQ1Ja01h9QX8EzXldiszufYa4IFfKdLUKTTrnSFXLDkUEOTrZQ8Qg==";
11
+ readonly crossOrigin: "anonymous";
12
+ readonly defer: true;
13
+ readonly "data-cf-beacon": `{"token":"${string}"}`;
14
+ };
15
+ export declare const beaconScripts: (token: unknown) => ReturnType<typeof webAnalyticsBeacon>[];
16
+ export declare const beaconHtml: (token: unknown) => string;
17
+ export { WEB_ANALYTICS_REPORT_ORIGIN, WEB_ANALYTICS_SCRIPT_ORIGIN };
18
+ //# sourceMappingURL=web-analytics.d.mts.map
@@ -0,0 +1,19 @@
1
+ import { n as WEB_ANALYTICS_SCRIPT_ORIGIN, t as WEB_ANALYTICS_REPORT_ORIGIN } from "../web-analytics-Bz6nyJmQ.mjs";
2
+ import { Array, Option, Schema, String, pipe } from "effect";
3
+ const WEB_ANALYTICS_BEACON = {
4
+ src: `${WEB_ANALYTICS_SCRIPT_ORIGIN}/beacon.min.js/v8c78df7c7c0f484497ecbca7046644da1771523124516`,
5
+ integrity: "sha512-8DS7rgIrAmghBFwoOTujcf6D9rXvH8xm8JQ1Ja01h9QX8EzXldiszufYa4IFfKdLUKTTrnSFXLDkUEOTrZQ8Qg==",
6
+ crossOrigin: "anonymous"
7
+ };
8
+ const CF_BEACON_TOKEN = "021b4961f3fd419297b186136a5a8a0a";
9
+ const webAnalyticsBeacon = (token) => ({
10
+ ...WEB_ANALYTICS_BEACON,
11
+ defer: true,
12
+ "data-cf-beacon": `{"token":"${token}"}`
13
+ });
14
+ const beaconScripts = (token) => pipe(Schema.decodeUnknownOption(Schema.NonEmptyString)(token), Option.map(webAnalyticsBeacon), Array.fromOption);
15
+ const escapeAttribute = (value) => pipe(value, String.replaceAll("&", "&amp;"), String.replaceAll("\"", "&quot;"), String.replaceAll("<", "&lt;"));
16
+ const beaconHtml = (token) => pipe(beaconScripts(token), Array.map((script) => `<script defer src="${escapeAttribute(script.src)}" integrity="${escapeAttribute(script.integrity)}" crossorigin="${script.crossOrigin}" data-cf-beacon="${escapeAttribute(script["data-cf-beacon"])}"><\/script>`), Array.join(""));
17
+ export { CF_BEACON_TOKEN, WEB_ANALYTICS_BEACON, WEB_ANALYTICS_REPORT_ORIGIN, WEB_ANALYTICS_SCRIPT_ORIGIN, beaconHtml, beaconScripts, webAnalyticsBeacon };
18
+
19
+ //# sourceMappingURL=web-analytics.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-analytics.mjs","names":["Arr","Str"],"sources":["../../src/shared/lib/web-analytics.ts"],"sourcesContent":["import { Array as Arr, Option, Schema, String as Str, pipe } from \"effect\";\n\nimport { WEB_ANALYTICS_SCRIPT_ORIGIN } from \"#/shared/config/index.ts\";\n\nconst BEACON_VERSION = \"v8c78df7c7c0f484497ecbca7046644da1771523124516\";\n\nconst BEACON_INTEGRITY =\n \"sha512-8DS7rgIrAmghBFwoOTujcf6D9rXvH8xm8JQ1Ja01h9QX8EzXldiszufYa4IFfKdLUKTTrnSFXLDkUEOTrZQ8Qg==\";\n\nexport const WEB_ANALYTICS_BEACON = {\n src: `${WEB_ANALYTICS_SCRIPT_ORIGIN}/beacon.min.js/${BEACON_VERSION}`,\n integrity: BEACON_INTEGRITY,\n crossOrigin: \"anonymous\",\n} as const;\n\nexport const CF_BEACON_TOKEN = \"021b4961f3fd419297b186136a5a8a0a\";\n\nexport const webAnalyticsBeacon = (token: string) =>\n ({\n ...WEB_ANALYTICS_BEACON,\n defer: true,\n \"data-cf-beacon\": `{\"token\":\"${token}\"}`,\n }) as const;\n\nexport const beaconScripts = (token: unknown): ReturnType<typeof webAnalyticsBeacon>[] =>\n pipe(\n Schema.decodeUnknownOption(Schema.NonEmptyString)(token),\n Option.map(webAnalyticsBeacon),\n Arr.fromOption,\n );\n\nexport { WEB_ANALYTICS_REPORT_ORIGIN, WEB_ANALYTICS_SCRIPT_ORIGIN } from \"#/shared/config/index.ts\";\n\nconst escapeAttribute = (value: string): string =>\n pipe(\n value,\n Str.replaceAll(\"&\", \"&amp;\"),\n Str.replaceAll('\"', \"&quot;\"),\n Str.replaceAll(\"<\", \"&lt;\"),\n );\n\nexport const beaconHtml = (token: unknown): string =>\n pipe(\n beaconScripts(token),\n Arr.map(\n (script) =>\n `<script defer src=\"${escapeAttribute(script.src)}\" integrity=\"${escapeAttribute(script.integrity)}\" crossorigin=\"${script.crossOrigin}\" data-cf-beacon=\"${escapeAttribute(script[\"data-cf-beacon\"])}\"></script>`,\n ),\n Arr.join(\"\"),\n );\n"],"mappings":";;AASA,MAAa,uBAAuB;CAClC,KAAK,GAAG,4BAA4B;CACpC,WAAW;CACX,aAAa;AACf;AAEA,MAAa,kBAAkB;AAE/B,MAAa,sBAAsB,WAChC;CACC,GAAG;CACH,OAAO;CACP,kBAAkB,aAAa,MAAM;AACvC;AAEF,MAAa,iBAAiB,UAC5B,KACE,OAAO,oBAAoB,OAAO,cAAc,CAAC,CAAC,KAAK,GACvD,OAAO,IAAI,kBAAkB,GAC7BA,MAAI,UACN;AAIF,MAAM,mBAAmB,UACvB,KACE,OACAC,OAAI,WAAW,KAAK,OAAO,GAC3BA,OAAI,WAAW,MAAK,QAAQ,GAC5BA,OAAI,WAAW,KAAK,MAAM,CAC5B;AAEF,MAAa,cAAc,UACzB,KACE,cAAc,KAAK,GACnBD,MAAI,KACD,WACC,sBAAsB,gBAAgB,OAAO,GAAG,EAAE,eAAe,gBAAgB,OAAO,SAAS,EAAE,iBAAiB,OAAO,YAAY,oBAAoB,gBAAgB,OAAO,iBAAiB,EAAE,aACzM,GACAA,MAAI,KAAK,EAAE,CACb"}
@@ -0,0 +1,4 @@
1
+ declare const WEB_ANALYTICS_SCRIPT_ORIGIN = "https://static.cloudflareinsights.com";
2
+ declare const WEB_ANALYTICS_REPORT_ORIGIN = "https://cloudflareinsights.com";
3
+ export { WEB_ANALYTICS_SCRIPT_ORIGIN as n, WEB_ANALYTICS_REPORT_ORIGIN as t };
4
+ //# sourceMappingURL=web-analytics-BM9LdncT.d.mts.map
@@ -0,0 +1,6 @@
1
+ // src/shared/config/web-analytics.ts
2
+ const WEB_ANALYTICS_SCRIPT_ORIGIN = "https://static.cloudflareinsights.com";
3
+ const WEB_ANALYTICS_REPORT_ORIGIN = "https://cloudflareinsights.com";
4
+ export { WEB_ANALYTICS_SCRIPT_ORIGIN as n, WEB_ANALYTICS_REPORT_ORIGIN as t };
5
+
6
+ //# sourceMappingURL=web-analytics-Bz6nyJmQ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-analytics-Bz6nyJmQ.mjs","names":[],"sources":["../src/shared/config/web-analytics.ts"],"sourcesContent":["export const WEB_ANALYTICS_SCRIPT_ORIGIN = \"https://static.cloudflareinsights.com\";\n\nexport const WEB_ANALYTICS_REPORT_ORIGIN = \"https://cloudflareinsights.com\";\n"],"mappings":";AAAA,MAAa,8BAA8B;AAE3C,MAAa,8BAA8B"}
@@ -0,0 +1,2 @@
1
+ import { C as Remark, D as Title, E as SourceOrigin, S as Reaction, T as SourceId, _ as Manuscript, a as ManuscriptBody, b as ParagraphId, c as SYNC_ORIGIN, d as SyncDocument, f as SyncStatus, g as FactKind, h as Fact, i as DocumentKind, l as SourceBody, m as Classified, n as Changes, o as Pushed, p as Annotations, r as DOCUMENTS_PATH, s as SYNC_HOST, t as CHANGES_PATH, u as StoredDocument, v as ManuscriptId, w as Source, x as ParagraphKind, y as Paragraph } from "../index-BkZOsFv4.mjs";
2
+ export { Annotations, CHANGES_PATH, Changes, Classified, DOCUMENTS_PATH, DocumentKind, Fact, FactKind, Manuscript, ManuscriptBody, ManuscriptId, Paragraph, ParagraphId, ParagraphKind, Pushed, Reaction, Remark, SYNC_HOST, SYNC_ORIGIN, Source, SourceBody, SourceId, SourceOrigin, StoredDocument, SyncDocument, SyncStatus, Title };
@@ -0,0 +1 @@
1
+ export { p as Annotations, t as CHANGES_PATH, n as Changes, m as Classified, r as DOCUMENTS_PATH, i as DocumentKind, h as Fact, g as FactKind, _ as Manuscript, a as ManuscriptBody, v as ManuscriptId, y as Paragraph, b as ParagraphId, x as ParagraphKind, o as Pushed, S as Reaction, C as Remark, s as SYNC_HOST, c as SYNC_ORIGIN, w as Source, l as SourceBody, T as SourceId, E as SourceOrigin, u as StoredDocument, d as SyncDocument, f as SyncStatus, D as Title } from "../sync-BkyZGGDA.mjs";
@@ -0,0 +1,2 @@
1
+ import { C as Remark, D as Title, E as SourceOrigin, S as Reaction, T as SourceId, _ as Manuscript, b as ParagraphId, f as SyncStatus, g as FactKind, h as Fact, m as Classified, p as Annotations, v as ManuscriptId, w as Source, x as ParagraphKind, y as Paragraph } from "./index-BkZOsFv4.mjs";
2
+ export { Annotations, Classified, Fact, FactKind, Manuscript, ManuscriptId, Paragraph, ParagraphId, ParagraphKind, Reaction, Remark, Source, SourceId, SourceOrigin, SyncStatus, Title };
@@ -0,0 +1 @@
1
+ export { p as Annotations, m as Classified, h as Fact, g as FactKind, _ as Manuscript, v as ManuscriptId, y as Paragraph, b as ParagraphId, x as ParagraphKind, S as Reaction, C as Remark, w as Source, T as SourceId, E as SourceOrigin, f as SyncStatus, D as Title } from "./sync-BkyZGGDA.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r_masseater/masseater-utils",
3
- "version": "0.6.1",
3
+ "version": "0.7.1",
4
4
  "description": "The small shared libraries of masseater's repositories as subpaths of one package: a chip row for React, Claude Code plugin helpers, Effect entry points for Node.js and GitHub Actions, file import mapping, Node package readers, OTLP assertions for Vitest and Cloudflare Workers tracing.",
5
5
  "keywords": [
6
6
  "actions",
@@ -34,13 +34,23 @@
34
34
  "LICENSE",
35
35
  "dist",
36
36
  "skills",
37
- "src/app/skerm.css"
37
+ "src/app/browser-test-fonts.conf",
38
+ "src/app/skerm.css",
39
+ "src/app/ui-styles.css",
40
+ "src/app/ui-theme.css",
41
+ "src/app/ui-view-transition.css",
42
+ "src/shared/lib/button-variants.ts",
43
+ "src/shared/lib/input-class.ts",
44
+ "src/shared/lib/native-select-class.ts",
45
+ "src/shared/lib/table-class.ts",
46
+ "src/shared/ui"
38
47
  ],
39
48
  "type": "module",
40
49
  "sideEffects": [
41
50
  "*.css",
42
- "./dist/vitest-otlp/setup.mjs",
43
- "./dist/model-server/process.mjs"
51
+ "./dist/lapse/sdk.mjs",
52
+ "./dist/model-server/process.mjs",
53
+ "./dist/vitest-otlp/setup.mjs"
44
54
  ],
45
55
  "imports": {
46
56
  "#/*": "./src/*"
@@ -92,6 +102,47 @@
92
102
  "default": "./dist/workers-tracing/effect.mjs"
93
103
  },
94
104
  "./workers-tracing/trace-sink-worker": "./dist/workers-tracing/trace-sink-worker.mjs",
105
+ "./effect2rs": "./dist/effect2rs.mjs",
106
+ "./effect2cs": "./dist/effect2cs.mjs",
107
+ "./security-headers": "./dist/security-headers.mjs",
108
+ "./security-headers/http": "./dist/security-headers/http.mjs",
109
+ "./security-headers/request": "./dist/security-headers/request.mjs",
110
+ "./security-headers/response": "./dist/security-headers/response.mjs",
111
+ "./security-headers/static": "./dist/security-headers/static.mjs",
112
+ "./security-headers/vite": "./dist/security-headers/vite.mjs",
113
+ "./lapse": "./dist/lapse.mjs",
114
+ "./local-server": "./dist/local-server.mjs",
115
+ "./local-server/node": "./dist/local-server/node.mjs",
116
+ "./local-server/serve": "./dist/local-server/serve.mjs",
117
+ "./browser-test/vite": "./dist/browser-test/vite.mjs",
118
+ "./yohaku-protocol": "./dist/yohaku-protocol.mjs",
119
+ "./yohaku-protocol/sync": "./dist/yohaku-protocol/sync.mjs",
120
+ "./ui/backdrop-palette": "./dist/ui/backdrop-palette.mjs",
121
+ "./ui/badge": "./dist/ui/badge.mjs",
122
+ "./ui/browser-runtime": "./dist/ui/browser-runtime.mjs",
123
+ "./ui/button": "./dist/ui/button.mjs",
124
+ "./ui/button-variants": "./dist/ui/button-variants.mjs",
125
+ "./ui/cn": "./dist/ui/cn.mjs",
126
+ "./ui/color-scheme": "./dist/ui/color-scheme.mjs",
127
+ "./ui/heading": "./dist/ui/heading.mjs",
128
+ "./ui/heading-class": "./dist/ui/heading-class.mjs",
129
+ "./ui/input-class": "./dist/ui/input-class.mjs",
130
+ "./ui/native-select-class": "./dist/ui/native-select-class.mjs",
131
+ "./ui/next-page-trigger": "./dist/ui/next-page-trigger.mjs",
132
+ "./ui/page-footer": "./dist/ui/page-footer.mjs",
133
+ "./ui/page-header": "./dist/ui/page-header.mjs",
134
+ "./ui/pointer": "./dist/ui/pointer.mjs",
135
+ "./ui/portfolio": "./dist/ui/portfolio.mjs",
136
+ "./ui/styles.css": "./src/app/ui-styles.css",
137
+ "./ui/table": "./dist/ui/table.mjs",
138
+ "./ui/table-class": "./dist/ui/table-class.mjs",
139
+ "./ui/theme.css": "./src/app/ui-theme.css",
140
+ "./ui/to-wavy-letters": "./dist/ui/to-wavy-letters.mjs",
141
+ "./ui/view-transition.css": "./src/app/ui-view-transition.css",
142
+ "./ui/web-analytics": "./dist/ui/web-analytics.mjs",
143
+ "./lapse/sdk": "./dist/lapse/sdk.mjs",
144
+ "./browser-test/fonts.conf": "./src/app/browser-test-fonts.conf",
145
+ "./process": "./dist/process.mjs",
95
146
  "./package.json": "./package.json"
96
147
  },
97
148
  "publishConfig": {
@@ -105,10 +156,14 @@
105
156
  "@cloudflare/workers-types": "5.20261129.1",
106
157
  "@effect/platform-node": "4.2.0",
107
158
  "@effect/platform-node-shared": "4.2.0",
159
+ "@effect/sql-sqlite-node": "4.2.0",
108
160
  "@effect/vitest": "4.2.0",
161
+ "@fontsource-variable/roboto-flex": "5.3.0",
109
162
  "@npmcli/package-json": "8.0.1",
110
163
  "@opentelemetry/api": "1.10.0",
164
+ "@opentelemetry/exporter-trace-otlp-http": "0.301.2",
111
165
  "@opentelemetry/sdk-node": "0.301.2",
166
+ "@paper-design/shaders": "0.0.82",
112
167
  "@pnpm/deps.path": "1101.0.11",
113
168
  "@pnpm/lockfile.fs": "1100.2.20",
114
169
  "@pnpm/workspace.projects-reader": "1101.1.9",
@@ -119,13 +174,25 @@
119
174
  "@types/node": "26.6.11",
120
175
  "@types/npmcli__package-json": "4.0.4",
121
176
  "@types/react": "19.3.3",
177
+ "@vitest/browser-playwright": "5.1.1",
122
178
  "alchemy": "2.0.0-beta.87",
179
+ "class-variance-authority": "0.7.1",
180
+ "clsx": "2.1.1",
181
+ "dejavu-fonts-ttf": "2.37.3",
123
182
  "effect": "4.2.0",
124
183
  "elysia": "1.4.32",
184
+ "happy-dom": "21.0.4",
125
185
  "miniflare": "4.20260730.0",
186
+ "playwright": "1.65.1",
126
187
  "publint": "0.3.25",
188
+ "quicktype-core": "26.0.0",
189
+ "radix-ui": "1.8.1",
127
190
  "react": "19.3.1",
191
+ "srvx": "1.0.8",
192
+ "tailwind-merge": "3.7.1",
193
+ "tailwindcss": "4.3.5",
128
194
  "ts-content-mapper": "0.1.1",
195
+ "tw-animate-css": "1.4.0",
129
196
  "typescript": "7.1.0-dev.20261129.1",
130
197
  "vite-plus": "1.8.0"
131
198
  },
@@ -133,18 +200,33 @@
133
200
  "@alchemy.run/cloudflare": "^2.0.0-beta.85",
134
201
  "@bufbuild/protobuf": ">=2.17.0",
135
202
  "@effect/platform-node": ">=4.1.5",
203
+ "@effect/sql-sqlite-node": ">=4.1.5",
204
+ "@fontsource-variable/roboto-flex": ">=5.3.0",
136
205
  "@npmcli/package-json": ">=8.0.1",
206
+ "@opentelemetry/exporter-trace-otlp-http": ">=0.301.2",
207
+ "@opentelemetry/sdk-node": ">=0.301.2",
137
208
  "@pnpm/deps.path": ">=1101.0.11",
138
209
  "@pnpm/lockfile.fs": ">=1100.2.20",
139
210
  "@pnpm/workspace.projects-reader": ">=1101.1.9",
140
211
  "@pnpm/workspace.workspace-manifest-reader": ">=1100.3.4",
141
212
  "@pnpm/workspace.workspace-manifest-writer": ">=1100.2.13",
142
213
  "@tanstack/react-start": "^1.169.4",
214
+ "@vitest/browser-playwright": ">=5.1.1",
143
215
  "alchemy": "^2.0.0-beta.85",
216
+ "class-variance-authority": ">=0.7.1",
217
+ "clsx": ">=2.1.1",
218
+ "dejavu-fonts-ttf": ">=2.37.3",
144
219
  "effect": "^4.1.0",
145
220
  "elysia": "^1.4.30",
221
+ "playwright": ">=1.65.1",
222
+ "quicktype-core": ">=26.0.0",
223
+ "radix-ui": ">=1.8.1",
146
224
  "react": "^19.3.1",
225
+ "srvx": ">=1.0.8",
226
+ "tailwind-merge": ">=3.7.1",
227
+ "tailwindcss": "^4.3.5",
147
228
  "ts-content-mapper": ">=0.1.1",
229
+ "tw-animate-css": ">=1.4.0",
148
230
  "vite-plus": "^1.8.0"
149
231
  },
150
232
  "peerDependenciesMeta": {
@@ -157,9 +239,21 @@
157
239
  "@effect/platform-node": {
158
240
  "optional": true
159
241
  },
242
+ "@effect/sql-sqlite-node": {
243
+ "optional": true
244
+ },
245
+ "@fontsource-variable/roboto-flex": {
246
+ "optional": true
247
+ },
160
248
  "@npmcli/package-json": {
161
249
  "optional": true
162
250
  },
251
+ "@opentelemetry/exporter-trace-otlp-http": {
252
+ "optional": true
253
+ },
254
+ "@opentelemetry/sdk-node": {
255
+ "optional": true
256
+ },
163
257
  "@pnpm/deps.path": {
164
258
  "optional": true
165
259
  },
@@ -178,21 +272,54 @@
178
272
  "@tanstack/react-start": {
179
273
  "optional": true
180
274
  },
275
+ "@vitest/browser-playwright": {
276
+ "optional": true
277
+ },
181
278
  "alchemy": {
182
279
  "optional": true
183
280
  },
281
+ "class-variance-authority": {
282
+ "optional": true
283
+ },
284
+ "clsx": {
285
+ "optional": true
286
+ },
287
+ "dejavu-fonts-ttf": {
288
+ "optional": true
289
+ },
184
290
  "effect": {
185
291
  "optional": true
186
292
  },
187
293
  "elysia": {
188
294
  "optional": true
189
295
  },
296
+ "playwright": {
297
+ "optional": true
298
+ },
299
+ "quicktype-core": {
300
+ "optional": true
301
+ },
302
+ "radix-ui": {
303
+ "optional": true
304
+ },
190
305
  "react": {
191
306
  "optional": true
192
307
  },
308
+ "srvx": {
309
+ "optional": true
310
+ },
311
+ "tailwind-merge": {
312
+ "optional": true
313
+ },
314
+ "tailwindcss": {
315
+ "optional": true
316
+ },
193
317
  "ts-content-mapper": {
194
318
  "optional": true
195
319
  },
320
+ "tw-animate-css": {
321
+ "optional": true
322
+ },
196
323
  "vite-plus": {
197
324
  "optional": true
198
325
  }
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: share-types-with-rust
3
+ description: >
4
+ Use when TypeScript and Rust in this repository exchange data: a Tauri app talking to its web
5
+ side, a Rust process reading JSON that TypeScript writes, or any Rust struct, enum, or constant
6
+ that mirrors a TypeScript type. Covers defining the types as Effect Schema, generating the serde
7
+ Rust with the effect2rs subpath of @r_masseater/masseater-utils from the app's own codegen
8
+ command, the checkRust freshness and hand-written copy check, and the wire differences that stay
9
+ between the two sides. Also use when codegen:check reports a stale file or a hand-written copy.
10
+ metadata:
11
+ purpose: >
12
+ Keep one source of truth for every type that crosses the TypeScript and Rust boundary, so the
13
+ Rust side is always generated from Effect Schema and never drifts or gets copied by hand.
14
+ type: core
15
+ library: "@r_masseater/masseater-utils"
16
+ sources:
17
+ - src/app/effect2rs*
18
+ - src/entities/rust-item/**
19
+ - src/features/check-rust/**
20
+ - src/features/render-rust/**
21
+ - effect2rs-conformance/**
22
+ ---
23
+
24
+ # share-types-with-rust
25
+
26
+ Effect Schema is the source of truth. Rust never declares a type that crosses the boundary. It imports the module that effect2rs generates.
27
+
28
+ ## Add or change a shared type
29
+
30
+ Define the type as an Effect Schema in the app's protocol module.
31
+ Give every struct, enum, and alias an `identifier` annotation.
32
+ effect2rs refuses an anonymous nested struct and reports its path.
33
+
34
+ Export the schema from a module that the app's codegen command passes to `effect2rs` as `definitions`.
35
+ The codegen spreads whole modules into `definitions`, so a new export is generated without touching it.
36
+ Do not pick names one by one, because a name you forget is never generated.
37
+
38
+ Set `derive` to `specta::Type` for tauri-specta and add `schemars::JsonSchema` when Rust needs a JSON Schema.
39
+
40
+ When the schemas use a type that another output already generates, map its identifier to the Rust path in `external`.
41
+ A shared crate's protocol is the usual case.
42
+ The output then imports that type instead of generating a second copy.
43
+
44
+ Run the app's `vp run codegen`.
45
+ Commit the generated `protocol.rs` together with the schema change.
46
+ Rust code declares `pub mod protocol;` and imports from `crate::protocol`.
47
+
48
+ Tauri command signatures stay on tauri-specta. effect2rs produces the types the commands take and return.
49
+
50
+ ## What the check catches
51
+
52
+ `vp run codegen:check` runs `checkRust` on every output as part of `verify`.
53
+ It fails with `StaleRust` when the file is missing or differs from what the schemas generate now.
54
+ Run `vp run codegen` again to fix it.
55
+
56
+ It fails with `HandWrittenCopies` when another `.rs` file in the output's directory declares a generated name.
57
+ Delete that struct, enum, alias, or constant and import the generated item instead.
58
+ Never edit `protocol.rs` to silence either error, because the next generation overwrites it.
59
+
60
+ ## What becomes what
61
+
62
+ Struct keys become snake_case fields, and serde renames them back to the wire key.
63
+ Rust keywords become raw identifiers.
64
+ Names that cannot be raw, empty names, and leading digits get a suffix or a prefix.
65
+ Non-ASCII letters are dropped from the Rust name while the wire key stays the same.
66
+
67
+ A union of string literals becomes an enum with `as_str` and `parse`.
68
+ A union of structs sharing a literal tag becomes an internally tagged enum.
69
+ effect2rs refuses unions of number literals and unions that mix kinds.
70
+
71
+ Integer checks pick a 32-bit or 64-bit Rust integer, and other numbers become `f64`.
72
+ With `specta::Type`, 64-bit integers reach TypeScript as `number` and `Schema.Unknown` as `unknown`.
73
+ A transformation generates its encoded side, so `Schema.DateTimeUtcFromString` becomes `String`.
74
+ Plain strings, numbers, and booleans exported next to the schemas become `pub const`.
75
+ Recursive references are boxed, and `Eq` is derived only where no float is reachable.
76
+ The output is already formatted the way rustfmt formats it.
77
+
78
+ ## Differences that remain
79
+
80
+ The cargo crate in `effect2rs-conformance/` of this package round-trips encoded samples through serde.
81
+ It also checks that Rust rejects every sample that Effect rejects.
82
+ Some gaps are known and accepted.
83
+ serde accepts a missing key for an `Option` field, while Effect requires a `NullOr` key to be present.
84
+ `optional(NullOr(...))` serializes `None` as an absent key, so a `null` from TypeScript comes back absent.
85
+ Rust does not validate dates or other string-encoded values.
86
+ Both sides ignore unknown keys.
87
+ specta needs its `serde_json` feature when a type contains `Schema.Unknown`.
88
+
89
+ When a schema needs something effect2rs does not support, extend effect2rs instead of writing the type by hand.
90
+ Add a case to its tests and to the conformance samples at the same time.
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
3
+ <fontconfig>
4
+ <dir prefix="xdg">ttf</dir>
5
+ <match target="pattern">
6
+ <edit name="family" mode="append_last"><string>sans-serif</string></edit>
7
+ </match>
8
+ <alias binding="same">
9
+ <family>monospace</family>
10
+ <prefer><family>DejaVu Sans Mono</family></prefer>
11
+ </alias>
12
+ <alias binding="same">
13
+ <family>sans-serif</family>
14
+ <prefer><family>DejaVu Sans</family></prefer>
15
+ </alias>
16
+ <alias binding="same">
17
+ <family>serif</family>
18
+ <prefer><family>DejaVu Serif</family></prefer>
19
+ </alias>
20
+ <match target="font">
21
+ <edit name="antialias" mode="assign"><bool>true</bool></edit>
22
+ <edit name="hinting" mode="assign"><bool>false</bool></edit>
23
+ <edit name="hintstyle" mode="assign"><const>hintnone</const></edit>
24
+ <edit name="rgba" mode="assign"><const>none</const></edit>
25
+ <edit name="lcdfilter" mode="assign"><const>lcdnone</const></edit>
26
+ <edit name="embeddedbitmap" mode="assign"><bool>false</bool></edit>
27
+ </match>
28
+ </fontconfig>
@@ -0,0 +1,185 @@
1
+ @import "tailwindcss";
2
+ @import "tw-animate-css";
3
+ @import "@fontsource-variable/roboto-flex/standard.css";
4
+ @import "./ui-view-transition.css";
5
+
6
+ @source "../shared/ui";
7
+ @source "../shared/lib";
8
+
9
+ @theme inline {
10
+ --font-display: "Roboto Flex Variable", ui-sans-serif, system-ui, sans-serif;
11
+ }
12
+
13
+ @layer components {
14
+ .stage {
15
+ --mx: 0.5;
16
+ --my: 0.5;
17
+ --tx: calc(var(--mx) - 0.5);
18
+ --ty: calc(var(--my) - 0.5);
19
+ --ease: cubic-bezier(0.16, 1, 0.3, 1);
20
+ }
21
+
22
+ .stage-backdrop {
23
+ inset: -8%;
24
+ transform: translate3d(calc(var(--tx) * -6%), calc(var(--ty) * -6%), 0)
25
+ scale(calc(1.04 + max(var(--tx), -1 * var(--tx)) * 0.06));
26
+ transition: transform 1.6s var(--ease);
27
+ }
28
+
29
+ .stage-backdrop-still {
30
+ background:
31
+ radial-gradient(circle at 15% 20%, var(--still-sky), transparent 55%),
32
+ radial-gradient(circle at 85% 15%, var(--still-pink), transparent 50%),
33
+ radial-gradient(circle at 50% 50%, var(--still-amber), transparent 60%),
34
+ radial-gradient(circle at 80% 85%, var(--still-indigo), transparent 55%),
35
+ radial-gradient(circle at 20% 80%, var(--still-mint), transparent 55%), var(--still-base);
36
+ }
37
+
38
+ .stage-backdrop canvas {
39
+ animation: backdrop-reveal 1.2s var(--ease) both;
40
+ }
41
+
42
+ .stage-spotlight {
43
+ width: 70vmax;
44
+ height: 70vmax;
45
+ background: radial-gradient(
46
+ circle,
47
+ color-mix(in oklch, var(--background) 85%, transparent),
48
+ transparent 65%
49
+ );
50
+ mix-blend-mode: soft-light;
51
+ transform: translate3d(calc(var(--mx) * 100vw - 50%), calc(var(--my) * 100dvh - 50%), 0);
52
+ transition: transform 0.9s var(--ease);
53
+ }
54
+
55
+ .stage-title {
56
+ transform: perspective(60rem) rotateX(calc(var(--ty) * -14deg)) rotateY(calc(var(--tx) * 18deg))
57
+ translate3d(calc(var(--tx) * 1.5rem), calc(var(--ty) * 1.5rem), 0);
58
+ transition: transform 1.2s var(--ease);
59
+ }
60
+
61
+ .stage-letter {
62
+ --dx: calc(((var(--i) + 0.5) / var(--n) - 0.5) * 0.6 + 0.5 - var(--mx));
63
+ --near: max(0, 1 - max(var(--dx), -1 * var(--dx)) * 3.2 - max(var(--ty), -1 * var(--ty)) * 1.2);
64
+ font-variation-settings: "wght" calc(320 + 430 * var(--near));
65
+ transition: font-variation-settings 0.6s var(--ease);
66
+ }
67
+
68
+ @media (prefers-reduced-motion: no-preference) {
69
+ @scope (.stage:not([data-pointer])) to (.stage) {
70
+ .stage-letter {
71
+ animation: stage-wave 6s ease-in-out infinite;
72
+ animation-delay: calc(var(--i) * 0.2s - 6s);
73
+ }
74
+ }
75
+ }
76
+
77
+ .stage-links {
78
+ transform: translate3d(calc(var(--tx) * 2rem), calc(var(--ty) * 2rem), 0);
79
+ transition: transform 1.4s var(--ease);
80
+ }
81
+
82
+ @keyframes backdrop-reveal {
83
+ from {
84
+ opacity: 0;
85
+ }
86
+ }
87
+
88
+ @keyframes stage-wave {
89
+ 0%,
90
+ 100% {
91
+ font-variation-settings: "wght" 320;
92
+ }
93
+ 50% {
94
+ font-variation-settings: "wght" 640;
95
+ }
96
+ }
97
+
98
+ @media (prefers-reduced-motion: reduce) {
99
+ .stage-backdrop,
100
+ .stage-title,
101
+ .stage-links {
102
+ transition: none;
103
+ transform: none;
104
+ }
105
+
106
+ .stage-backdrop canvas {
107
+ display: none;
108
+ }
109
+ }
110
+ }
111
+
112
+ @utility vt-backdrop {
113
+ view-transition-name: backdrop;
114
+ }
115
+
116
+ @utility vt-site-name {
117
+ view-transition-name: site-name;
118
+ }
119
+
120
+ @utility vt-match {
121
+ view-transition-name: match-element;
122
+ view-transition-class: page;
123
+ }
124
+
125
+ @utility glass-surface {
126
+ @apply bg-background/35 ring-foreground/5 rounded-3xl ring-1 backdrop-blur-md;
127
+ }
128
+
129
+ @utility nudge-forward {
130
+ @apply transition-transform duration-700 ease-(--ease) group-hover:translate-x-1 group-focus-visible:translate-x-1;
131
+ }
132
+
133
+ @utility nudge-back {
134
+ @apply transition-transform duration-700 ease-(--ease) group-hover:-translate-x-1 group-focus-visible:-translate-x-1;
135
+ }
136
+
137
+ @utility stage-link {
138
+ @apply text-foreground/80 hover:text-foreground focus-visible:text-foreground font-display inline-block text-sm tracking-widest uppercase underline-offset-8 transition-colors hover:underline focus-visible:underline;
139
+ }
140
+
141
+ ::view-transition-group(*) {
142
+ animation-duration: 0.3s;
143
+ animation-timing-function: cubic-bezier(0.34, 1.2, 0.64, 1);
144
+ }
145
+
146
+ ::view-transition-old(*):only-child {
147
+ animation: drift-out 0.15s cubic-bezier(0.4, 0, 1, 1) both;
148
+ }
149
+
150
+ ::view-transition-new(*):only-child {
151
+ animation: drift-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
152
+ }
153
+
154
+ ::view-transition-old(root),
155
+ ::view-transition-new(root),
156
+ ::view-transition-old(backdrop),
157
+ ::view-transition-new(backdrop) {
158
+ animation: none;
159
+ }
160
+
161
+ ::view-transition-old(backdrop) {
162
+ display: none;
163
+ }
164
+
165
+ @keyframes drift-out {
166
+ to {
167
+ opacity: 0;
168
+ transform: translateY(-1.5rem) scale(0.98);
169
+ }
170
+ }
171
+
172
+ @keyframes drift-in {
173
+ from {
174
+ opacity: 0;
175
+ transform: translateY(2rem) scale(1.02);
176
+ }
177
+ }
178
+
179
+ @media (prefers-reduced-motion: reduce) {
180
+ ::view-transition-group(*),
181
+ ::view-transition-old(*),
182
+ ::view-transition-new(*) {
183
+ animation: none;
184
+ }
185
+ }