effect-start 0.25.0 → 0.26.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 (117) hide show
  1. package/package.json +18 -86
  2. package/dist/ChildProcess.js +0 -42
  3. package/dist/Commander.js +0 -410
  4. package/dist/ContentNegotiation.js +0 -465
  5. package/dist/Cookies.js +0 -371
  6. package/dist/Development.js +0 -94
  7. package/dist/Effectify.js +0 -27
  8. package/dist/Entity.js +0 -289
  9. package/dist/Fetch.js +0 -192
  10. package/dist/FilePathPattern.js +0 -97
  11. package/dist/FileRouter.js +0 -204
  12. package/dist/FileRouterCodegen.js +0 -298
  13. package/dist/FileSystem.js +0 -132
  14. package/dist/Http.js +0 -107
  15. package/dist/PathPattern.js +0 -451
  16. package/dist/PlatformError.js +0 -40
  17. package/dist/PlatformRuntime.js +0 -71
  18. package/dist/Route.js +0 -143
  19. package/dist/RouteBody.js +0 -92
  20. package/dist/RouteError.js +0 -76
  21. package/dist/RouteHook.js +0 -64
  22. package/dist/RouteHttp.js +0 -367
  23. package/dist/RouteHttpTracer.js +0 -90
  24. package/dist/RouteMount.js +0 -86
  25. package/dist/RouteSchema.js +0 -271
  26. package/dist/RouteSse.js +0 -94
  27. package/dist/RouteTree.js +0 -119
  28. package/dist/RouteTrie.js +0 -179
  29. package/dist/SchemaExtra.js +0 -99
  30. package/dist/Socket.js +0 -40
  31. package/dist/SqlIntrospect.js +0 -515
  32. package/dist/Start.js +0 -79
  33. package/dist/StartApp.js +0 -3
  34. package/dist/StreamExtra.js +0 -135
  35. package/dist/System.js +0 -38
  36. package/dist/TuplePathPattern.js +0 -74
  37. package/dist/Unique.js +0 -226
  38. package/dist/Values.js +0 -52
  39. package/dist/bun/BunBundle.js +0 -186
  40. package/dist/bun/BunChildProcessSpawner.js +0 -142
  41. package/dist/bun/BunImportTrackerPlugin.js +0 -91
  42. package/dist/bun/BunRoute.js +0 -157
  43. package/dist/bun/BunRuntime.js +0 -41
  44. package/dist/bun/BunServer.js +0 -285
  45. package/dist/bun/BunVirtualFilesPlugin.js +0 -54
  46. package/dist/bun/_BunEnhancedResolve.js +0 -127
  47. package/dist/bun/index.js +0 -5
  48. package/dist/bundler/Bundle.js +0 -92
  49. package/dist/bundler/BundleFiles.js +0 -154
  50. package/dist/bundler/BundleRoute.js +0 -62
  51. package/dist/client/Overlay.js +0 -33
  52. package/dist/client/ScrollState.js +0 -106
  53. package/dist/client/index.js +0 -97
  54. package/dist/console/Console.js +0 -42
  55. package/dist/console/ConsoleErrors.js +0 -211
  56. package/dist/console/ConsoleLogger.js +0 -56
  57. package/dist/console/ConsoleMetrics.js +0 -72
  58. package/dist/console/ConsoleProcess.js +0 -59
  59. package/dist/console/ConsoleStore.js +0 -72
  60. package/dist/console/ConsoleTracer.js +0 -107
  61. package/dist/console/Simulation.js +0 -784
  62. package/dist/console/index.js +0 -3
  63. package/dist/console/routes/tree.js +0 -30
  64. package/dist/datastar/actions/fetch.js +0 -536
  65. package/dist/datastar/actions/peek.js +0 -13
  66. package/dist/datastar/actions/setAll.js +0 -19
  67. package/dist/datastar/actions/toggleAll.js +0 -19
  68. package/dist/datastar/attributes/attr.js +0 -49
  69. package/dist/datastar/attributes/bind.js +0 -194
  70. package/dist/datastar/attributes/class.js +0 -54
  71. package/dist/datastar/attributes/computed.js +0 -25
  72. package/dist/datastar/attributes/effect.js +0 -10
  73. package/dist/datastar/attributes/indicator.js +0 -33
  74. package/dist/datastar/attributes/init.js +0 -27
  75. package/dist/datastar/attributes/jsonSignals.js +0 -33
  76. package/dist/datastar/attributes/on.js +0 -81
  77. package/dist/datastar/attributes/onIntersect.js +0 -53
  78. package/dist/datastar/attributes/onInterval.js +0 -31
  79. package/dist/datastar/attributes/onSignalPatch.js +0 -51
  80. package/dist/datastar/attributes/ref.js +0 -11
  81. package/dist/datastar/attributes/show.js +0 -32
  82. package/dist/datastar/attributes/signals.js +0 -18
  83. package/dist/datastar/attributes/style.js +0 -57
  84. package/dist/datastar/attributes/text.js +0 -29
  85. package/dist/datastar/engine.js +0 -1145
  86. package/dist/datastar/index.js +0 -25
  87. package/dist/datastar/utils.js +0 -250
  88. package/dist/datastar/watchers/patchElements.js +0 -486
  89. package/dist/datastar/watchers/patchSignals.js +0 -14
  90. package/dist/experimental/EncryptedCookies.js +0 -328
  91. package/dist/experimental/index.js +0 -1
  92. package/dist/hyper/Hyper.js +0 -28
  93. package/dist/hyper/HyperHtml.js +0 -165
  94. package/dist/hyper/HyperNode.js +0 -13
  95. package/dist/hyper/HyperRoute.js +0 -45
  96. package/dist/hyper/html.js +0 -30
  97. package/dist/hyper/index.js +0 -5
  98. package/dist/hyper/jsx-runtime.js +0 -14
  99. package/dist/index.js +0 -8
  100. package/dist/node/NodeFileSystem.js +0 -675
  101. package/dist/node/NodeUtils.js +0 -23
  102. package/dist/sql/Sql.js +0 -8
  103. package/dist/sql/bun/index.js +0 -142
  104. package/dist/sql/index.js +0 -1
  105. package/dist/sql/libsql/index.js +0 -156
  106. package/dist/sql/mssql/docker.js +0 -110
  107. package/dist/sql/mssql/index.js +0 -194
  108. package/dist/testing/TestLogger.js +0 -42
  109. package/dist/testing/index.js +0 -2
  110. package/dist/testing/utils.js +0 -61
  111. package/dist/x/cloudflare/CloudflareTunnel.js +0 -63
  112. package/dist/x/cloudflare/index.js +0 -1
  113. package/dist/x/tailscale/TailscaleTunnel.js +0 -94
  114. package/dist/x/tailscale/index.js +0 -1
  115. package/dist/x/tailwind/TailwindPlugin.js +0 -294
  116. package/dist/x/tailwind/compile.js +0 -210
  117. package/dist/x/tailwind/plugin.js +0 -17
@@ -1,25 +0,0 @@
1
- import "./actions/peek.js"
2
- import "./actions/setAll.js"
3
- import "./actions/toggleAll.js"
4
- import "./actions/fetch.js"
5
- import "./attributes/attr.js"
6
- import "./attributes/bind.js"
7
- import "./attributes/class.js"
8
- import "./attributes/computed.js"
9
- import "./attributes/effect.js"
10
- import "./attributes/indicator.js"
11
- import "./attributes/init.js"
12
- import "./attributes/jsonSignals.js"
13
- import "./attributes/on.js"
14
- import "./attributes/onIntersect.js"
15
- import "./attributes/onInterval.js"
16
- import "./attributes/onSignalPatch.js"
17
- import "./attributes/ref.js"
18
- import "./attributes/show.js"
19
- import "./attributes/signals.js"
20
- import "./attributes/style.js"
21
- import "./attributes/text.js"
22
- import "./watchers/patchElements.js"
23
- import "./watchers/patchSignals.js"
24
-
25
- export * from "./engine.js"
@@ -1,250 +0,0 @@
1
-
2
- /*********
3
- * dom.ts
4
- *********/
5
- export const isHTMLOrSVG = (el) =>
6
- el instanceof HTMLElement || el instanceof SVGElement || el instanceof MathMLElement
7
-
8
- /*********
9
- * math.ts
10
- *********/
11
- export const clamp = (value, min, max) => {
12
- return Math.max(min, Math.min(max, value))
13
- }
14
-
15
- export const lerp = (min, max, t, clamped = true) => {
16
- const v = min + (max - min) * t
17
- return clamped ? clamp(v, min, max) : v
18
- }
19
-
20
- export const inverseLerp = (min, max, value, clamped = true) => {
21
- if (value < min) return 0
22
- if (value > max) return 1
23
- const v = (value - min) / (max - min)
24
- return clamped ? clamp(v, min, max) : v
25
- }
26
-
27
- export const fit = (
28
- value,
29
- inMin,
30
- inMax,
31
- outMin,
32
- outMax,
33
- clamped = true,
34
- rounded = false,
35
- ) => {
36
- const t = inverseLerp(inMin, inMax, value, clamped)
37
- const fitted = lerp(outMin, outMax, t, clamped)
38
- return rounded ? Math.round(fitted) : fitted
39
- }
40
-
41
- /*********
42
- * text.ts
43
- *********/
44
- export const kebab = (str) =>
45
- str
46
- .replace(/([a-z0-9])([A-Z])/g, "$1-$2")
47
- .replace(/([a-z])([0-9]+)/gi, "$1-$2")
48
- .replace(/([0-9]+)([a-z])/gi, "$1-$2")
49
- .replace(/[\s_]+/g, "-")
50
- .toLowerCase()
51
-
52
- export const camel = (str) => kebab(str).replace(/-./g, (x) => x[1].toUpperCase())
53
-
54
- export const snake = (str) => kebab(str).replace(/-/g, "_")
55
-
56
- export const pascal = (str) =>
57
- camel(str).replace(/(^.|(?<=\.).)/g, (x) => x[0].toUpperCase())
58
-
59
- export const title = (str) => str.replace(/\b\w/g, (char) => char.toUpperCase())
60
-
61
- export const jsStrToObject = (raw) => {
62
- try {
63
- return JSON.parse(raw)
64
- } catch {
65
- return Function(`return (${raw})`)()
66
- }
67
- }
68
-
69
- const caseFns = {
70
- camel: (str) => str.replace(/-[a-z]/g, (x) => x[1].toUpperCase()),
71
- snake: (str) => str.replace(/-/g, "_"),
72
- pascal: (str) => str[0].toUpperCase() + caseFns.camel(str.slice(1)),
73
- }
74
-
75
- export const modifyCasing = (str, mods, defaultCase = "camel") => {
76
- for (const c of mods.get("case") || [defaultCase]) {
77
- str = caseFns[c]?.(str) || str
78
- }
79
- return str
80
- }
81
-
82
- export const aliasify = (name) => `data-${name}`
83
-
84
- /*********
85
- * tags.ts
86
- *********/
87
- export const tagToMs = (args) => {
88
- if (!args || args.size <= 0) return 0
89
- for (const arg of args) {
90
- if (arg.endsWith("ms")) {
91
- return +arg.replace("ms", "")
92
- }
93
- if (arg.endsWith("s")) {
94
- return +arg.replace("s", "") * 1000
95
- }
96
- try {
97
- return Number.parseFloat(arg)
98
- } catch (_) {}
99
- }
100
- return 0
101
- }
102
-
103
- export const tagHas = (tags, tag, defaultValue = false) => {
104
- if (!tags) return defaultValue
105
- return tags.has(tag.toLowerCase())
106
- }
107
-
108
- export const tagFirst = (tags, defaultValue = "") => {
109
- if (tags && tags.size > 0) {
110
- for (const tag of tags) {
111
- return tag
112
- }
113
- }
114
- return defaultValue
115
- }
116
-
117
- /*********
118
- * polyfills.ts
119
- *********/
120
- export const hasOwn =
121
- // @ts-ignore
122
- Object.hasOwn ?? Object.prototype.hasOwnProperty.call
123
-
124
- /*********
125
- * paths.ts
126
- *********/
127
- export const isPojo = (obj) =>
128
- obj !== null &&
129
- typeof obj === "object" &&
130
- (Object.getPrototypeOf(obj) === Object.prototype || Object.getPrototypeOf(obj) === null)
131
-
132
- export const isEmpty = (obj) => {
133
- for (const prop in obj) {
134
- if (hasOwn(obj, prop)) {
135
- return false
136
- }
137
- }
138
- return true
139
- }
140
-
141
- export const updateLeaves = (obj, fn) => {
142
- for (const key in obj) {
143
- const val = obj[key]
144
- if (isPojo(val) || Array.isArray(val)) {
145
- updateLeaves(val, fn)
146
- } else {
147
- obj[key] = fn(val)
148
- }
149
- }
150
- }
151
-
152
- export const pathToObj = (paths) => {
153
- const result = {}
154
- for (const [path, value] of paths) {
155
- const keys = path.split(".")
156
- const lastKey = keys.pop()
157
- const obj = keys.reduce((acc, key) => (acc[key] ??= {}), result)
158
- obj[lastKey] = value
159
- }
160
- return result
161
- }
162
-
163
- /*********
164
- * timing.ts
165
- *********/
166
- export const delay = (callback, wait) => {
167
- return (...args) => {
168
- setTimeout(() => {
169
- callback(...args)
170
- }, wait)
171
- }
172
- }
173
-
174
- export const throttle = (
175
- callback,
176
- wait,
177
- leading = true,
178
- trailing = false,
179
- debounce = false,
180
- ) => {
181
- let lastArgs = null
182
- let timer = 0
183
-
184
- return (...args) => {
185
- if (leading && !timer) {
186
- callback(...args)
187
- lastArgs = null
188
- } else {
189
- lastArgs = args
190
- }
191
- if (!timer || debounce) {
192
- if (timer) {
193
- clearTimeout(timer)
194
- }
195
- timer = setTimeout(() => {
196
- if (trailing && lastArgs !== null) {
197
- callback(...lastArgs)
198
- }
199
- lastArgs = null
200
- timer = 0
201
- }, wait)
202
- }
203
- }
204
- }
205
-
206
- export const modifyTiming = (
207
- callback,
208
- mods,
209
- ) => {
210
- const delayArgs = mods.get("delay")
211
- if (delayArgs) {
212
- const wait = tagToMs(delayArgs)
213
- callback = delay(callback, wait)
214
- }
215
-
216
- const debounceArgs = mods.get("debounce")
217
- if (debounceArgs) {
218
- const wait = tagToMs(debounceArgs)
219
- const leading = tagHas(debounceArgs, "leading", false)
220
- const trailing = !tagHas(debounceArgs, "notrailing", false)
221
- callback = throttle(callback, wait, leading, trailing, true)
222
- }
223
-
224
- const throttleArgs = mods.get("throttle")
225
- if (throttleArgs) {
226
- const wait = tagToMs(throttleArgs)
227
- const leading = !tagHas(throttleArgs, "noleading", false)
228
- const trailing = tagHas(throttleArgs, "trailing", false)
229
- callback = throttle(callback, wait, leading, trailing)
230
- }
231
-
232
- return callback
233
- }
234
-
235
- /*********
236
- * view-transitions.ts
237
- *********/
238
- export const supportsViewTransitions = !!document.startViewTransition
239
-
240
- export const modifyViewTransition = (
241
- callback,
242
- mods,
243
- ) => {
244
- if (mods.has("viewtransition") && supportsViewTransitions) {
245
- const cb = callback
246
- callback = (...args) => document.startViewTransition(() => cb(...args))
247
- }
248
-
249
- return callback
250
- }