@hyperfixi/behaviors 2.0.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.
- package/dist/all.browser.global.js +116 -0
- package/dist/all.browser.global.js.map +1 -0
- package/dist/behaviors/draggable.cjs +109 -0
- package/dist/behaviors/draggable.cjs.map +1 -0
- package/dist/behaviors/draggable.d.cts +15 -0
- package/dist/behaviors/draggable.d.ts +15 -0
- package/dist/behaviors/draggable.js +14 -0
- package/dist/behaviors/draggable.js.map +1 -0
- package/dist/behaviors/removable.cjs +120 -0
- package/dist/behaviors/removable.cjs.map +1 -0
- package/dist/behaviors/removable.d.cts +15 -0
- package/dist/behaviors/removable.d.ts +15 -0
- package/dist/behaviors/removable.js +14 -0
- package/dist/behaviors/removable.js.map +1 -0
- package/dist/behaviors/resizable.cjs +146 -0
- package/dist/behaviors/resizable.cjs.map +1 -0
- package/dist/behaviors/resizable.d.cts +15 -0
- package/dist/behaviors/resizable.d.ts +15 -0
- package/dist/behaviors/resizable.js +14 -0
- package/dist/behaviors/resizable.js.map +1 -0
- package/dist/behaviors/sortable.cjs +119 -0
- package/dist/behaviors/sortable.cjs.map +1 -0
- package/dist/behaviors/sortable.d.cts +15 -0
- package/dist/behaviors/sortable.d.ts +15 -0
- package/dist/behaviors/sortable.js +14 -0
- package/dist/behaviors/sortable.js.map +1 -0
- package/dist/behaviors/toggleable.cjs +105 -0
- package/dist/behaviors/toggleable.cjs.map +1 -0
- package/dist/behaviors/toggleable.d.cts +15 -0
- package/dist/behaviors/toggleable.d.ts +15 -0
- package/dist/behaviors/toggleable.js +14 -0
- package/dist/behaviors/toggleable.js.map +1 -0
- package/dist/chunk-272NKUJ3.js +63 -0
- package/dist/chunk-272NKUJ3.js.map +1 -0
- package/dist/chunk-2NQHIHD5.js +37 -0
- package/dist/chunk-2NQHIHD5.js.map +1 -0
- package/dist/chunk-3DVDS7CT.js +170 -0
- package/dist/chunk-3DVDS7CT.js.map +1 -0
- package/dist/chunk-3Q652JQB.js +37 -0
- package/dist/chunk-3Q652JQB.js.map +1 -0
- package/dist/chunk-BWZ6EGII.js +62 -0
- package/dist/chunk-BWZ6EGII.js.map +1 -0
- package/dist/chunk-G6WR2AYR.js +52 -0
- package/dist/chunk-G6WR2AYR.js.map +1 -0
- package/dist/chunk-HMRPQWQU.js +37 -0
- package/dist/chunk-HMRPQWQU.js.map +1 -0
- package/dist/chunk-MEP6B7XW.js +37 -0
- package/dist/chunk-MEP6B7XW.js.map +1 -0
- package/dist/chunk-URBOGGW6.js +32 -0
- package/dist/chunk-URBOGGW6.js.map +1 -0
- package/dist/chunk-V5IWDPDP.js +89 -0
- package/dist/chunk-V5IWDPDP.js.map +1 -0
- package/dist/chunk-WU37DFAL.js +37 -0
- package/dist/chunk-WU37DFAL.js.map +1 -0
- package/dist/chunk-WUHHMDAA.js +48 -0
- package/dist/chunk-WUHHMDAA.js.map +1 -0
- package/dist/core.browser.global.js +39 -0
- package/dist/core.browser.global.js.map +1 -0
- package/dist/draggable.browser.global.js +25 -0
- package/dist/draggable.browser.global.js.map +1 -0
- package/dist/index.cjs +907 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +134 -0
- package/dist/index.d.ts +134 -0
- package/dist/index.js +193 -0
- package/dist/index.js.map +1 -0
- package/dist/loaders.cjs +562 -0
- package/dist/loaders.cjs.map +1 -0
- package/dist/loaders.d.cts +2 -0
- package/dist/loaders.d.ts +2 -0
- package/dist/loaders.js +8 -0
- package/dist/loaders.js.map +1 -0
- package/dist/registry.cjs +214 -0
- package/dist/registry.cjs.map +1 -0
- package/dist/registry.d.cts +116 -0
- package/dist/registry.d.ts +116 -0
- package/dist/registry.js +47 -0
- package/dist/registry.js.map +1 -0
- package/dist/removable.browser.global.js +23 -0
- package/dist/removable.browser.global.js.map +1 -0
- package/dist/resizable.browser.global.js +35 -0
- package/dist/resizable.browser.global.js.map +1 -0
- package/dist/schemas/index.cjs +353 -0
- package/dist/schemas/index.cjs.map +1 -0
- package/dist/schemas/index.d.cts +75 -0
- package/dist/schemas/index.d.ts +75 -0
- package/dist/schemas/index.js +41 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/sortable.browser.global.js +25 -0
- package/dist/sortable.browser.global.js.map +1 -0
- package/dist/toggleable.browser.global.js +16 -0
- package/dist/toggleable.browser.global.js.map +1 -0
- package/dist/types-CCc_2wAb.d.cts +100 -0
- package/dist/types-CCc_2wAb.d.ts +100 -0
- package/package.json +109 -0
- package/src/behaviors/draggable.ts +60 -0
- package/src/behaviors/index.ts +40 -0
- package/src/behaviors/integration.test.ts +80 -0
- package/src/behaviors/removable.ts +55 -0
- package/src/behaviors/resizable.ts +55 -0
- package/src/behaviors/sortable.ts +56 -0
- package/src/behaviors/toggleable.ts +55 -0
- package/src/core-bundle.ts +35 -0
- package/src/generated/index.ts +9 -0
- package/src/generated/metadata.ts +78 -0
- package/src/generated/types.ts +51 -0
- package/src/index.test.ts +180 -0
- package/src/index.ts +222 -0
- package/src/loaders.ts +39 -0
- package/src/registry.test.ts +207 -0
- package/src/registry.ts +304 -0
- package/src/schemas/draggable.schema.ts +54 -0
- package/src/schemas/index.ts +60 -0
- package/src/schemas/removable.schema.ts +69 -0
- package/src/schemas/resizable.schema.ts +91 -0
- package/src/schemas/sortable.schema.ts +68 -0
- package/src/schemas/toggleable.schema.ts +50 -0
- package/src/schemas/types.ts +107 -0
package/dist/loaders.cjs
ADDED
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __esm = (fn, res) => function __init() {
|
|
5
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
|
+
};
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// src/schemas/draggable.schema.ts
|
|
13
|
+
var draggableSchema;
|
|
14
|
+
var init_draggable_schema = __esm({
|
|
15
|
+
"src/schemas/draggable.schema.ts"() {
|
|
16
|
+
"use strict";
|
|
17
|
+
draggableSchema = {
|
|
18
|
+
name: "Draggable",
|
|
19
|
+
category: "ui",
|
|
20
|
+
tier: "core",
|
|
21
|
+
version: "1.0.0",
|
|
22
|
+
description: "Makes elements draggable with pointer events",
|
|
23
|
+
parameters: [
|
|
24
|
+
{
|
|
25
|
+
name: "dragHandle",
|
|
26
|
+
type: "selector",
|
|
27
|
+
optional: true,
|
|
28
|
+
default: "me",
|
|
29
|
+
description: "CSS selector for the drag handle element"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
events: [
|
|
33
|
+
{ name: "draggable:start", description: "Fired when drag begins" },
|
|
34
|
+
{ name: "draggable:move", description: "Fired during each movement" },
|
|
35
|
+
{ name: "draggable:end", description: "Fired when drag completes" }
|
|
36
|
+
],
|
|
37
|
+
requirements: ["position: absolute or position: fixed on the element"],
|
|
38
|
+
source: `
|
|
39
|
+
behavior Draggable(dragHandle)
|
|
40
|
+
init
|
|
41
|
+
if no dragHandle set dragHandle to me
|
|
42
|
+
end
|
|
43
|
+
on pointerdown(clientX, clientY) from dragHandle
|
|
44
|
+
halt the event
|
|
45
|
+
trigger draggable:start
|
|
46
|
+
measure x
|
|
47
|
+
set startX to it
|
|
48
|
+
measure y
|
|
49
|
+
set startY to it
|
|
50
|
+
set xoff to clientX - startX
|
|
51
|
+
set yoff to clientY - startY
|
|
52
|
+
repeat until event pointerup from document
|
|
53
|
+
wait for pointermove(clientX, clientY) or
|
|
54
|
+
pointerup(clientX, clientY) from document
|
|
55
|
+
add { left: \${clientX - xoff}px; top: \${clientY - yoff}px; }
|
|
56
|
+
trigger draggable:move
|
|
57
|
+
end
|
|
58
|
+
trigger draggable:end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
`.trim()
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// src/schemas/sortable.schema.ts
|
|
67
|
+
var sortableSchema;
|
|
68
|
+
var init_sortable_schema = __esm({
|
|
69
|
+
"src/schemas/sortable.schema.ts"() {
|
|
70
|
+
"use strict";
|
|
71
|
+
sortableSchema = {
|
|
72
|
+
name: "Sortable",
|
|
73
|
+
category: "ui",
|
|
74
|
+
tier: "common",
|
|
75
|
+
version: "1.0.0",
|
|
76
|
+
description: "Makes child elements reorderable via drag-and-drop",
|
|
77
|
+
parameters: [
|
|
78
|
+
{
|
|
79
|
+
name: "handle",
|
|
80
|
+
type: "selector",
|
|
81
|
+
optional: true,
|
|
82
|
+
default: "none",
|
|
83
|
+
description: "CSS selector for drag handles within items"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "dragClass",
|
|
87
|
+
type: "string",
|
|
88
|
+
optional: true,
|
|
89
|
+
default: "sorting",
|
|
90
|
+
description: "CSS class added to item during drag"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
events: [
|
|
94
|
+
{ name: "sortable:start", description: "Fired when drag begins" },
|
|
95
|
+
{
|
|
96
|
+
name: "sortable:move",
|
|
97
|
+
description: "Fired during drag \u2014 handle this event to reorder DOM elements"
|
|
98
|
+
},
|
|
99
|
+
{ name: "sortable:end", description: "Fired when drag completes" }
|
|
100
|
+
],
|
|
101
|
+
requirements: ["Users must handle DOM reordering in sortable:move event handlers"],
|
|
102
|
+
source: `
|
|
103
|
+
behavior Sortable(handle, dragClass)
|
|
104
|
+
init
|
|
105
|
+
if no dragClass set dragClass to "sorting"
|
|
106
|
+
end
|
|
107
|
+
on pointerdown(target, clientY) from me
|
|
108
|
+
set item to closest <li/> in target
|
|
109
|
+
if no item exit
|
|
110
|
+
if handle
|
|
111
|
+
set handleEl to target.closest(handle)
|
|
112
|
+
if no handleEl exit
|
|
113
|
+
end
|
|
114
|
+
halt the event
|
|
115
|
+
add dragClass to item
|
|
116
|
+
trigger sortable:start on me
|
|
117
|
+
repeat until event pointerup from document
|
|
118
|
+
wait for pointermove(clientY) from document
|
|
119
|
+
trigger sortable:move on me
|
|
120
|
+
end
|
|
121
|
+
remove dragClass from item
|
|
122
|
+
trigger sortable:end on me
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
`.trim()
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
// src/schemas/resizable.schema.ts
|
|
131
|
+
var resizableSchema;
|
|
132
|
+
var init_resizable_schema = __esm({
|
|
133
|
+
"src/schemas/resizable.schema.ts"() {
|
|
134
|
+
"use strict";
|
|
135
|
+
resizableSchema = {
|
|
136
|
+
name: "Resizable",
|
|
137
|
+
category: "ui",
|
|
138
|
+
tier: "optional",
|
|
139
|
+
version: "1.0.0",
|
|
140
|
+
description: "Makes elements resizable by dragging",
|
|
141
|
+
parameters: [
|
|
142
|
+
{
|
|
143
|
+
name: "handle",
|
|
144
|
+
type: "selector",
|
|
145
|
+
optional: true,
|
|
146
|
+
default: "me",
|
|
147
|
+
description: "CSS selector for the resize handle (defaults to the element itself)"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: "minWidth",
|
|
151
|
+
type: "number",
|
|
152
|
+
optional: true,
|
|
153
|
+
default: 50,
|
|
154
|
+
description: "Minimum width in pixels"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: "minHeight",
|
|
158
|
+
type: "number",
|
|
159
|
+
optional: true,
|
|
160
|
+
default: 50,
|
|
161
|
+
description: "Minimum height in pixels"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "maxWidth",
|
|
165
|
+
type: "number",
|
|
166
|
+
optional: true,
|
|
167
|
+
default: 9999,
|
|
168
|
+
description: "Maximum width in pixels"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: "maxHeight",
|
|
172
|
+
type: "number",
|
|
173
|
+
optional: true,
|
|
174
|
+
default: 9999,
|
|
175
|
+
description: "Maximum height in pixels"
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
events: [
|
|
179
|
+
{ name: "resizable:start", description: "Fired when resize begins" },
|
|
180
|
+
{ name: "resizable:resize", description: "Fired during resize" },
|
|
181
|
+
{ name: "resizable:end", description: "Fired when resize completes" }
|
|
182
|
+
],
|
|
183
|
+
source: `
|
|
184
|
+
behavior Resizable(handle, minWidth, minHeight, maxWidth, maxHeight)
|
|
185
|
+
init
|
|
186
|
+
if no handle set handle to me
|
|
187
|
+
if no minWidth set minWidth to 50
|
|
188
|
+
if no minHeight set minHeight to 50
|
|
189
|
+
if no maxWidth set maxWidth to 9999
|
|
190
|
+
if no maxHeight set maxHeight to 9999
|
|
191
|
+
end
|
|
192
|
+
on pointerdown(clientX, clientY) from handle
|
|
193
|
+
halt the event
|
|
194
|
+
trigger resizable:start
|
|
195
|
+
measure width
|
|
196
|
+
set startWidth to it
|
|
197
|
+
measure height
|
|
198
|
+
set startHeight to it
|
|
199
|
+
set startX to clientX
|
|
200
|
+
set startY to clientY
|
|
201
|
+
repeat until event pointerup from document
|
|
202
|
+
wait for pointermove(clientX, clientY) or
|
|
203
|
+
pointerup from document
|
|
204
|
+
set newWidth to startWidth + (clientX - startX)
|
|
205
|
+
set newHeight to startHeight + (clientY - startY)
|
|
206
|
+
if newWidth < minWidth set newWidth to minWidth
|
|
207
|
+
if newWidth > maxWidth set newWidth to maxWidth
|
|
208
|
+
if newHeight < minHeight set newHeight to minHeight
|
|
209
|
+
if newHeight > maxHeight set newHeight to maxHeight
|
|
210
|
+
add { width: \${newWidth}px; height: \${newHeight}px; }
|
|
211
|
+
trigger resizable:resize
|
|
212
|
+
end
|
|
213
|
+
trigger resizable:end
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
`.trim()
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
// src/schemas/removable.schema.ts
|
|
222
|
+
var removableSchema;
|
|
223
|
+
var init_removable_schema = __esm({
|
|
224
|
+
"src/schemas/removable.schema.ts"() {
|
|
225
|
+
"use strict";
|
|
226
|
+
removableSchema = {
|
|
227
|
+
name: "Removable",
|
|
228
|
+
category: "data",
|
|
229
|
+
tier: "common",
|
|
230
|
+
version: "1.2.0",
|
|
231
|
+
description: "Makes elements removable on click",
|
|
232
|
+
parameters: [
|
|
233
|
+
{
|
|
234
|
+
name: "triggerEl",
|
|
235
|
+
type: "selector",
|
|
236
|
+
optional: true,
|
|
237
|
+
default: "me",
|
|
238
|
+
description: "Element that triggers removal (e.g., a close button)"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: "confirm",
|
|
242
|
+
type: "boolean",
|
|
243
|
+
optional: true,
|
|
244
|
+
default: false,
|
|
245
|
+
description: "Show confirmation dialog before removal"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: "effect",
|
|
249
|
+
type: "string",
|
|
250
|
+
optional: true,
|
|
251
|
+
default: "none",
|
|
252
|
+
enum: ["fade", "none"],
|
|
253
|
+
description: 'Transition effect: "fade" or "none"'
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
events: [
|
|
257
|
+
{ name: "removable:before", description: "Fired before removal (cancelable)" },
|
|
258
|
+
{ name: "removable:removed", description: "Fired after removal" }
|
|
259
|
+
],
|
|
260
|
+
source: `
|
|
261
|
+
behavior Removable(triggerEl, confirm, effect)
|
|
262
|
+
init
|
|
263
|
+
if triggerEl is undefined
|
|
264
|
+
set triggerEl to me
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
on click from triggerEl
|
|
268
|
+
if confirm
|
|
269
|
+
if not window.confirm("Are you sure?")
|
|
270
|
+
halt
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
trigger removable:before
|
|
274
|
+
if effect is "fade"
|
|
275
|
+
transition opacity to 0 over 300ms
|
|
276
|
+
end
|
|
277
|
+
trigger removable:removed
|
|
278
|
+
remove me
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
`.trim()
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
// src/schemas/toggleable.schema.ts
|
|
287
|
+
var toggleableSchema;
|
|
288
|
+
var init_toggleable_schema = __esm({
|
|
289
|
+
"src/schemas/toggleable.schema.ts"() {
|
|
290
|
+
"use strict";
|
|
291
|
+
toggleableSchema = {
|
|
292
|
+
name: "Toggleable",
|
|
293
|
+
category: "form",
|
|
294
|
+
tier: "core",
|
|
295
|
+
version: "1.0.0",
|
|
296
|
+
description: "Toggles a CSS class on click",
|
|
297
|
+
parameters: [
|
|
298
|
+
{
|
|
299
|
+
name: "cls",
|
|
300
|
+
type: "string",
|
|
301
|
+
optional: true,
|
|
302
|
+
default: "active",
|
|
303
|
+
description: "CSS class to toggle"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
name: "target",
|
|
307
|
+
type: "selector",
|
|
308
|
+
optional: true,
|
|
309
|
+
default: "me",
|
|
310
|
+
description: "Element to toggle the class on"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
events: [
|
|
314
|
+
{ name: "toggleable:on", description: "Fired when class is added" },
|
|
315
|
+
{ name: "toggleable:off", description: "Fired when class is removed" }
|
|
316
|
+
],
|
|
317
|
+
source: `
|
|
318
|
+
behavior Toggleable(cls, target)
|
|
319
|
+
init
|
|
320
|
+
if cls is undefined
|
|
321
|
+
set cls to "active"
|
|
322
|
+
end
|
|
323
|
+
if target is undefined
|
|
324
|
+
set target to me
|
|
325
|
+
end
|
|
326
|
+
end
|
|
327
|
+
on click
|
|
328
|
+
toggle .{cls} on target
|
|
329
|
+
end
|
|
330
|
+
end
|
|
331
|
+
`.trim()
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
// src/behaviors/draggable.ts
|
|
337
|
+
var draggable_exports = {};
|
|
338
|
+
__export(draggable_exports, {
|
|
339
|
+
default: () => draggable_default,
|
|
340
|
+
draggableMetadata: () => draggableMetadata,
|
|
341
|
+
draggableSource: () => draggableSource,
|
|
342
|
+
registerDraggable: () => registerDraggable
|
|
343
|
+
});
|
|
344
|
+
async function registerDraggable(hyperfixi) {
|
|
345
|
+
const hf = hyperfixi || (typeof window !== "undefined" ? window.lokascript : null);
|
|
346
|
+
if (!hf) {
|
|
347
|
+
throw new Error(
|
|
348
|
+
"LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors."
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
const result = hf.compileSync(draggableSchema.source, { traditional: true });
|
|
352
|
+
if (!result.ok) {
|
|
353
|
+
throw new Error(`Failed to compile Draggable behavior: ${JSON.stringify(result.errors)}`);
|
|
354
|
+
}
|
|
355
|
+
const ctx = hf.createContext ? hf.createContext() : { locals: /* @__PURE__ */ new Map(), globals: /* @__PURE__ */ new Map() };
|
|
356
|
+
await hf.execute(result.ast, ctx);
|
|
357
|
+
}
|
|
358
|
+
var draggableSource, draggableMetadata, draggable_default;
|
|
359
|
+
var init_draggable = __esm({
|
|
360
|
+
"src/behaviors/draggable.ts"() {
|
|
361
|
+
"use strict";
|
|
362
|
+
init_draggable_schema();
|
|
363
|
+
draggableSource = draggableSchema.source;
|
|
364
|
+
draggableMetadata = draggableSchema;
|
|
365
|
+
if (typeof window !== "undefined" && window.lokascript) {
|
|
366
|
+
registerDraggable().catch(console.error);
|
|
367
|
+
}
|
|
368
|
+
draggable_default = {
|
|
369
|
+
source: draggableSchema.source,
|
|
370
|
+
metadata: draggableSchema,
|
|
371
|
+
register: registerDraggable
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
// src/behaviors/sortable.ts
|
|
377
|
+
var sortable_exports = {};
|
|
378
|
+
__export(sortable_exports, {
|
|
379
|
+
default: () => sortable_default,
|
|
380
|
+
registerSortable: () => registerSortable,
|
|
381
|
+
sortableMetadata: () => sortableMetadata,
|
|
382
|
+
sortableSource: () => sortableSource
|
|
383
|
+
});
|
|
384
|
+
async function registerSortable(hyperfixi) {
|
|
385
|
+
const hf = hyperfixi || (typeof window !== "undefined" ? window.lokascript : null);
|
|
386
|
+
if (!hf) {
|
|
387
|
+
throw new Error(
|
|
388
|
+
"LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors."
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
const result = hf.compileSync(sortableSchema.source, { traditional: true });
|
|
392
|
+
if (!result.ok) {
|
|
393
|
+
throw new Error(`Failed to compile Sortable behavior: ${JSON.stringify(result.errors)}`);
|
|
394
|
+
}
|
|
395
|
+
const ctx = hf.createContext ? hf.createContext() : { locals: /* @__PURE__ */ new Map(), globals: /* @__PURE__ */ new Map() };
|
|
396
|
+
await hf.execute(result.ast, ctx);
|
|
397
|
+
}
|
|
398
|
+
var sortableSource, sortableMetadata, sortable_default;
|
|
399
|
+
var init_sortable = __esm({
|
|
400
|
+
"src/behaviors/sortable.ts"() {
|
|
401
|
+
"use strict";
|
|
402
|
+
init_sortable_schema();
|
|
403
|
+
sortableSource = sortableSchema.source;
|
|
404
|
+
sortableMetadata = sortableSchema;
|
|
405
|
+
if (typeof window !== "undefined" && window.lokascript) {
|
|
406
|
+
registerSortable().catch(console.error);
|
|
407
|
+
}
|
|
408
|
+
sortable_default = {
|
|
409
|
+
source: sortableSchema.source,
|
|
410
|
+
metadata: sortableSchema,
|
|
411
|
+
register: registerSortable
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
// src/behaviors/resizable.ts
|
|
417
|
+
var resizable_exports = {};
|
|
418
|
+
__export(resizable_exports, {
|
|
419
|
+
default: () => resizable_default,
|
|
420
|
+
registerResizable: () => registerResizable,
|
|
421
|
+
resizableMetadata: () => resizableMetadata,
|
|
422
|
+
resizableSource: () => resizableSource
|
|
423
|
+
});
|
|
424
|
+
async function registerResizable(hyperfixi) {
|
|
425
|
+
const hf = hyperfixi || (typeof window !== "undefined" ? window.lokascript : null);
|
|
426
|
+
if (!hf) {
|
|
427
|
+
throw new Error(
|
|
428
|
+
"LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors."
|
|
429
|
+
);
|
|
430
|
+
}
|
|
431
|
+
const result = hf.compileSync(resizableSchema.source, { traditional: true });
|
|
432
|
+
if (!result.ok) {
|
|
433
|
+
throw new Error(`Failed to compile Resizable behavior: ${JSON.stringify(result.errors)}`);
|
|
434
|
+
}
|
|
435
|
+
const ctx = hf.createContext ? hf.createContext() : { locals: /* @__PURE__ */ new Map(), globals: /* @__PURE__ */ new Map() };
|
|
436
|
+
await hf.execute(result.ast, ctx);
|
|
437
|
+
}
|
|
438
|
+
var resizableSource, resizableMetadata, resizable_default;
|
|
439
|
+
var init_resizable = __esm({
|
|
440
|
+
"src/behaviors/resizable.ts"() {
|
|
441
|
+
"use strict";
|
|
442
|
+
init_resizable_schema();
|
|
443
|
+
resizableSource = resizableSchema.source;
|
|
444
|
+
resizableMetadata = resizableSchema;
|
|
445
|
+
if (typeof window !== "undefined" && window.lokascript) {
|
|
446
|
+
registerResizable().catch(console.error);
|
|
447
|
+
}
|
|
448
|
+
resizable_default = {
|
|
449
|
+
source: resizableSchema.source,
|
|
450
|
+
metadata: resizableSchema,
|
|
451
|
+
register: registerResizable
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
// src/behaviors/removable.ts
|
|
457
|
+
var removable_exports = {};
|
|
458
|
+
__export(removable_exports, {
|
|
459
|
+
default: () => removable_default,
|
|
460
|
+
registerRemovable: () => registerRemovable,
|
|
461
|
+
removableMetadata: () => removableMetadata,
|
|
462
|
+
removableSource: () => removableSource
|
|
463
|
+
});
|
|
464
|
+
async function registerRemovable(hyperfixi) {
|
|
465
|
+
const hf = hyperfixi || (typeof window !== "undefined" ? window.lokascript : null);
|
|
466
|
+
if (!hf) {
|
|
467
|
+
throw new Error(
|
|
468
|
+
"LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors."
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
const result = hf.compileSync(removableSchema.source, { traditional: true });
|
|
472
|
+
if (!result.ok) {
|
|
473
|
+
throw new Error(`Failed to compile Removable behavior: ${JSON.stringify(result.errors)}`);
|
|
474
|
+
}
|
|
475
|
+
const ctx = hf.createContext ? hf.createContext() : { locals: /* @__PURE__ */ new Map(), globals: /* @__PURE__ */ new Map() };
|
|
476
|
+
await hf.execute(result.ast, ctx);
|
|
477
|
+
}
|
|
478
|
+
var removableSource, removableMetadata, removable_default;
|
|
479
|
+
var init_removable = __esm({
|
|
480
|
+
"src/behaviors/removable.ts"() {
|
|
481
|
+
"use strict";
|
|
482
|
+
init_removable_schema();
|
|
483
|
+
removableSource = removableSchema.source;
|
|
484
|
+
removableMetadata = removableSchema;
|
|
485
|
+
if (typeof window !== "undefined" && window.lokascript) {
|
|
486
|
+
registerRemovable().catch(console.error);
|
|
487
|
+
}
|
|
488
|
+
removable_default = {
|
|
489
|
+
source: removableSchema.source,
|
|
490
|
+
metadata: removableSchema,
|
|
491
|
+
register: registerRemovable
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
// src/behaviors/toggleable.ts
|
|
497
|
+
var toggleable_exports = {};
|
|
498
|
+
__export(toggleable_exports, {
|
|
499
|
+
default: () => toggleable_default,
|
|
500
|
+
registerToggleable: () => registerToggleable,
|
|
501
|
+
toggleableMetadata: () => toggleableMetadata,
|
|
502
|
+
toggleableSource: () => toggleableSource
|
|
503
|
+
});
|
|
504
|
+
async function registerToggleable(hyperfixi) {
|
|
505
|
+
const hf = hyperfixi || (typeof window !== "undefined" ? window.lokascript : null);
|
|
506
|
+
if (!hf) {
|
|
507
|
+
throw new Error(
|
|
508
|
+
"LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors."
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
const result = hf.compileSync(toggleableSchema.source, { traditional: true });
|
|
512
|
+
if (!result.ok) {
|
|
513
|
+
throw new Error(`Failed to compile Toggleable behavior: ${JSON.stringify(result.errors)}`);
|
|
514
|
+
}
|
|
515
|
+
const ctx = hf.createContext ? hf.createContext() : { locals: /* @__PURE__ */ new Map(), globals: /* @__PURE__ */ new Map() };
|
|
516
|
+
await hf.execute(result.ast, ctx);
|
|
517
|
+
}
|
|
518
|
+
var toggleableSource, toggleableMetadata, toggleable_default;
|
|
519
|
+
var init_toggleable = __esm({
|
|
520
|
+
"src/behaviors/toggleable.ts"() {
|
|
521
|
+
"use strict";
|
|
522
|
+
init_toggleable_schema();
|
|
523
|
+
toggleableSource = toggleableSchema.source;
|
|
524
|
+
toggleableMetadata = toggleableSchema;
|
|
525
|
+
if (typeof window !== "undefined" && window.lokascript) {
|
|
526
|
+
registerToggleable().catch(console.error);
|
|
527
|
+
}
|
|
528
|
+
toggleable_default = {
|
|
529
|
+
source: toggleableSchema.source,
|
|
530
|
+
metadata: toggleableSchema,
|
|
531
|
+
register: registerToggleable
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
// src/registry.ts
|
|
537
|
+
var schemas = /* @__PURE__ */ new Map();
|
|
538
|
+
var loaders = /* @__PURE__ */ new Map();
|
|
539
|
+
function registerSchema(schema) {
|
|
540
|
+
schemas.set(schema.name, schema);
|
|
541
|
+
}
|
|
542
|
+
function registerLoader(name, loader) {
|
|
543
|
+
loaders.set(name, loader);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
// src/loaders.ts
|
|
547
|
+
init_draggable_schema();
|
|
548
|
+
init_sortable_schema();
|
|
549
|
+
init_resizable_schema();
|
|
550
|
+
init_removable_schema();
|
|
551
|
+
init_toggleable_schema();
|
|
552
|
+
registerSchema(draggableSchema);
|
|
553
|
+
registerSchema(sortableSchema);
|
|
554
|
+
registerSchema(resizableSchema);
|
|
555
|
+
registerSchema(removableSchema);
|
|
556
|
+
registerSchema(toggleableSchema);
|
|
557
|
+
registerLoader("Draggable", () => Promise.resolve().then(() => (init_draggable(), draggable_exports)));
|
|
558
|
+
registerLoader("Sortable", () => Promise.resolve().then(() => (init_sortable(), sortable_exports)));
|
|
559
|
+
registerLoader("Resizable", () => Promise.resolve().then(() => (init_resizable(), resizable_exports)));
|
|
560
|
+
registerLoader("Removable", () => Promise.resolve().then(() => (init_removable(), removable_exports)));
|
|
561
|
+
registerLoader("Toggleable", () => Promise.resolve().then(() => (init_toggleable(), toggleable_exports)));
|
|
562
|
+
//# sourceMappingURL=loaders.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/draggable.schema.ts","../src/schemas/sortable.schema.ts","../src/schemas/resizable.schema.ts","../src/schemas/removable.schema.ts","../src/schemas/toggleable.schema.ts","../src/behaviors/draggable.ts","../src/behaviors/sortable.ts","../src/behaviors/resizable.ts","../src/behaviors/removable.ts","../src/behaviors/toggleable.ts","../src/registry.ts","../src/loaders.ts"],"sourcesContent":["import type { BehaviorSchema } from './types';\n\n/**\n * Draggable Behavior Schema\n *\n * Makes elements draggable with pointer events.\n * Supports custom drag handles and lifecycle events.\n */\nexport const draggableSchema: BehaviorSchema = {\n name: 'Draggable',\n category: 'ui',\n tier: 'core',\n version: '1.0.0',\n description: 'Makes elements draggable with pointer events',\n parameters: [\n {\n name: 'dragHandle',\n type: 'selector',\n optional: true,\n default: 'me',\n description: 'CSS selector for the drag handle element',\n },\n ],\n events: [\n { name: 'draggable:start', description: 'Fired when drag begins' },\n { name: 'draggable:move', description: 'Fired during each movement' },\n { name: 'draggable:end', description: 'Fired when drag completes' },\n ],\n requirements: ['position: absolute or position: fixed on the element'],\n source: `\nbehavior Draggable(dragHandle)\n init\n if no dragHandle set dragHandle to me\n end\n on pointerdown(clientX, clientY) from dragHandle\n halt the event\n trigger draggable:start\n measure x\n set startX to it\n measure y\n set startY to it\n set xoff to clientX - startX\n set yoff to clientY - startY\n repeat until event pointerup from document\n wait for pointermove(clientX, clientY) or\n pointerup(clientX, clientY) from document\n add { left: \\${clientX - xoff}px; top: \\${clientY - yoff}px; }\n trigger draggable:move\n end\n trigger draggable:end\n end\nend\n`.trim(),\n};\n","import type { BehaviorSchema } from './types';\n\n/**\n * Sortable Behavior Schema\n *\n * Drag-and-drop reordering of list items.\n * Apply to a container element; children become sortable.\n *\n * Note: This behavior fires lifecycle events but does NOT automatically\n * reorder DOM elements. Users must handle actual reordering in their\n * `sortable:move` event handlers.\n */\nexport const sortableSchema: BehaviorSchema = {\n name: 'Sortable',\n category: 'ui',\n tier: 'common',\n version: '1.0.0',\n description: 'Makes child elements reorderable via drag-and-drop',\n parameters: [\n {\n name: 'handle',\n type: 'selector',\n optional: true,\n default: 'none',\n description: 'CSS selector for drag handles within items',\n },\n {\n name: 'dragClass',\n type: 'string',\n optional: true,\n default: 'sorting',\n description: 'CSS class added to item during drag',\n },\n ],\n events: [\n { name: 'sortable:start', description: 'Fired when drag begins' },\n {\n name: 'sortable:move',\n description: 'Fired during drag — handle this event to reorder DOM elements',\n },\n { name: 'sortable:end', description: 'Fired when drag completes' },\n ],\n requirements: ['Users must handle DOM reordering in sortable:move event handlers'],\n source: `\nbehavior Sortable(handle, dragClass)\n init\n if no dragClass set dragClass to \"sorting\"\n end\n on pointerdown(target, clientY) from me\n set item to closest <li/> in target\n if no item exit\n if handle\n set handleEl to target.closest(handle)\n if no handleEl exit\n end\n halt the event\n add dragClass to item\n trigger sortable:start on me\n repeat until event pointerup from document\n wait for pointermove(clientY) from document\n trigger sortable:move on me\n end\n remove dragClass from item\n trigger sortable:end on me\n end\nend\n`.trim(),\n};\n","import type { BehaviorSchema } from './types';\n\n/**\n * Resizable Behavior Schema\n *\n * Makes elements resizable by dragging edges or corners.\n * Supports minimum/maximum dimensions and resize handles.\n */\nexport const resizableSchema: BehaviorSchema = {\n name: 'Resizable',\n category: 'ui',\n tier: 'optional',\n version: '1.0.0',\n description: 'Makes elements resizable by dragging',\n parameters: [\n {\n name: 'handle',\n type: 'selector',\n optional: true,\n default: 'me',\n description: 'CSS selector for the resize handle (defaults to the element itself)',\n },\n {\n name: 'minWidth',\n type: 'number',\n optional: true,\n default: 50,\n description: 'Minimum width in pixels',\n },\n {\n name: 'minHeight',\n type: 'number',\n optional: true,\n default: 50,\n description: 'Minimum height in pixels',\n },\n {\n name: 'maxWidth',\n type: 'number',\n optional: true,\n default: 9999,\n description: 'Maximum width in pixels',\n },\n {\n name: 'maxHeight',\n type: 'number',\n optional: true,\n default: 9999,\n description: 'Maximum height in pixels',\n },\n ],\n events: [\n { name: 'resizable:start', description: 'Fired when resize begins' },\n { name: 'resizable:resize', description: 'Fired during resize' },\n { name: 'resizable:end', description: 'Fired when resize completes' },\n ],\n source: `\nbehavior Resizable(handle, minWidth, minHeight, maxWidth, maxHeight)\n init\n if no handle set handle to me\n if no minWidth set minWidth to 50\n if no minHeight set minHeight to 50\n if no maxWidth set maxWidth to 9999\n if no maxHeight set maxHeight to 9999\n end\n on pointerdown(clientX, clientY) from handle\n halt the event\n trigger resizable:start\n measure width\n set startWidth to it\n measure height\n set startHeight to it\n set startX to clientX\n set startY to clientY\n repeat until event pointerup from document\n wait for pointermove(clientX, clientY) or\n pointerup from document\n set newWidth to startWidth + (clientX - startX)\n set newHeight to startHeight + (clientY - startY)\n if newWidth < minWidth set newWidth to minWidth\n if newWidth > maxWidth set newWidth to maxWidth\n if newHeight < minHeight set newHeight to minHeight\n if newHeight > maxHeight set newHeight to maxHeight\n add { width: \\${newWidth}px; height: \\${newHeight}px; }\n trigger resizable:resize\n end\n trigger resizable:end\n end\nend\n`.trim(),\n};\n","import type { BehaviorSchema } from './types';\n\n/**\n * Removable Behavior Schema\n *\n * Removes an element when a trigger is clicked.\n * Supports optional confirmation and transition effects.\n *\n * @since 1.2.0 — `trigger` parameter renamed to `triggerEl` to avoid\n * shadowing the hyperscript `trigger` command keyword. Users migrating\n * from v1.x should update: `install Removable(triggerEl: .close-btn)`.\n */\nexport const removableSchema: BehaviorSchema = {\n name: 'Removable',\n category: 'data',\n tier: 'common',\n version: '1.2.0',\n description: 'Makes elements removable on click',\n parameters: [\n {\n name: 'triggerEl',\n type: 'selector',\n optional: true,\n default: 'me',\n description: 'Element that triggers removal (e.g., a close button)',\n },\n {\n name: 'confirm',\n type: 'boolean',\n optional: true,\n default: false,\n description: 'Show confirmation dialog before removal',\n },\n {\n name: 'effect',\n type: 'string',\n optional: true,\n default: 'none',\n enum: ['fade', 'none'],\n description: 'Transition effect: \"fade\" or \"none\"',\n },\n ],\n events: [\n { name: 'removable:before', description: 'Fired before removal (cancelable)' },\n { name: 'removable:removed', description: 'Fired after removal' },\n ],\n source: `\nbehavior Removable(triggerEl, confirm, effect)\n init\n if triggerEl is undefined\n set triggerEl to me\n end\n end\n on click from triggerEl\n if confirm\n if not window.confirm(\"Are you sure?\")\n halt\n end\n end\n trigger removable:before\n if effect is \"fade\"\n transition opacity to 0 over 300ms\n end\n trigger removable:removed\n remove me\n end\nend\n`.trim(),\n};\n","import type { BehaviorSchema } from './types';\n\n/**\n * Toggleable Behavior Schema\n *\n * Toggles a CSS class on click.\n * Useful for accordions, dropdowns, and toggle buttons.\n */\nexport const toggleableSchema: BehaviorSchema = {\n name: 'Toggleable',\n category: 'form',\n tier: 'core',\n version: '1.0.0',\n description: 'Toggles a CSS class on click',\n parameters: [\n {\n name: 'cls',\n type: 'string',\n optional: true,\n default: 'active',\n description: 'CSS class to toggle',\n },\n {\n name: 'target',\n type: 'selector',\n optional: true,\n default: 'me',\n description: 'Element to toggle the class on',\n },\n ],\n events: [\n { name: 'toggleable:on', description: 'Fired when class is added' },\n { name: 'toggleable:off', description: 'Fired when class is removed' },\n ],\n source: `\nbehavior Toggleable(cls, target)\n init\n if cls is undefined\n set cls to \"active\"\n end\n if target is undefined\n set target to me\n end\n end\n on click\n toggle .{cls} on target\n end\nend\n`.trim(),\n};\n","/**\n * Draggable Behavior\n *\n * A reusable behavior that makes elements draggable with pointer events.\n * Supports custom drag handles, lifecycle events, and smooth positioning.\n *\n * @example\n * ```html\n * <!-- Basic usage -->\n * <div _=\"install Draggable\">Drag me!</div>\n *\n * <!-- With custom drag handle -->\n * <div _=\"install Draggable(dragHandle: .titlebar)\">\n * <div class=\"titlebar\">Drag here</div>\n * <div class=\"content\">Content</div>\n * </div>\n * ```\n */\n\nimport { draggableSchema } from '../schemas/draggable.schema';\nimport type { LokaScriptInstance, LokaScriptWindow } from '../schemas/types';\n\n// Re-export schema-derived values for backwards compatibility\nexport const draggableSource = draggableSchema.source;\nexport const draggableMetadata = draggableSchema;\n\n/**\n * Register the Draggable behavior with LokaScript.\n */\nexport async function registerDraggable(hyperfixi?: LokaScriptInstance): Promise<void> {\n const hf =\n hyperfixi ||\n (typeof window !== 'undefined' ? (window as unknown as LokaScriptWindow).lokascript : null);\n\n if (!hf) {\n throw new Error(\n 'LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.'\n );\n }\n\n const result = hf.compileSync(draggableSchema.source, { traditional: true });\n\n if (!result.ok) {\n throw new Error(`Failed to compile Draggable behavior: ${JSON.stringify(result.errors)}`);\n }\n\n const ctx = hf.createContext ? hf.createContext() : { locals: new Map(), globals: new Map() };\n await hf.execute(result.ast, ctx);\n}\n\n// Auto-register when loaded as a script tag\nif (typeof window !== 'undefined' && (window as unknown as LokaScriptWindow).lokascript) {\n registerDraggable().catch(console.error);\n}\n\nexport default {\n source: draggableSchema.source,\n metadata: draggableSchema,\n register: registerDraggable,\n};\n","/**\n * Sortable Behavior\n *\n * A behavior for drag-and-drop reordering of list items.\n * Apply to a container element; children become sortable.\n *\n * @example\n * ```html\n * <ul _=\"install Sortable\">\n * <li>Item 1</li>\n * <li>Item 2</li>\n * </ul>\n * ```\n */\n\nimport { sortableSchema } from '../schemas/sortable.schema';\nimport type { LokaScriptInstance, LokaScriptWindow } from '../schemas/types';\n\n// Re-export schema-derived values for backwards compatibility\nexport const sortableSource = sortableSchema.source;\nexport const sortableMetadata = sortableSchema;\n\n/**\n * Register the Sortable behavior with LokaScript.\n */\nexport async function registerSortable(hyperfixi?: LokaScriptInstance): Promise<void> {\n const hf =\n hyperfixi ||\n (typeof window !== 'undefined' ? (window as unknown as LokaScriptWindow).lokascript : null);\n\n if (!hf) {\n throw new Error(\n 'LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.'\n );\n }\n\n const result = hf.compileSync(sortableSchema.source, { traditional: true });\n\n if (!result.ok) {\n throw new Error(`Failed to compile Sortable behavior: ${JSON.stringify(result.errors)}`);\n }\n\n const ctx = hf.createContext ? hf.createContext() : { locals: new Map(), globals: new Map() };\n await hf.execute(result.ast, ctx);\n}\n\n// Auto-register when loaded as a script tag\nif (typeof window !== 'undefined' && (window as unknown as LokaScriptWindow).lokascript) {\n registerSortable().catch(console.error);\n}\n\nexport default {\n source: sortableSchema.source,\n metadata: sortableSchema,\n register: registerSortable,\n};\n","/**\n * Resizable Behavior\n *\n * A behavior that makes elements resizable by dragging edges or corners.\n * Supports minimum/maximum dimensions and resize handles.\n *\n * @example\n * ```html\n * <div _=\"install Resizable\" style=\"width: 200px; height: 150px;\">\n * Resize me!\n * </div>\n * ```\n */\n\nimport { resizableSchema } from '../schemas/resizable.schema';\nimport type { LokaScriptInstance, LokaScriptWindow } from '../schemas/types';\n\n// Re-export schema-derived values for backwards compatibility\nexport const resizableSource = resizableSchema.source;\nexport const resizableMetadata = resizableSchema;\n\n/**\n * Register the Resizable behavior with LokaScript.\n */\nexport async function registerResizable(hyperfixi?: LokaScriptInstance): Promise<void> {\n const hf =\n hyperfixi ||\n (typeof window !== 'undefined' ? (window as unknown as LokaScriptWindow).lokascript : null);\n\n if (!hf) {\n throw new Error(\n 'LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.'\n );\n }\n\n const result = hf.compileSync(resizableSchema.source, { traditional: true });\n\n if (!result.ok) {\n throw new Error(`Failed to compile Resizable behavior: ${JSON.stringify(result.errors)}`);\n }\n\n const ctx = hf.createContext ? hf.createContext() : { locals: new Map(), globals: new Map() };\n await hf.execute(result.ast, ctx);\n}\n\n// Auto-register when loaded as a script tag\nif (typeof window !== 'undefined' && (window as unknown as LokaScriptWindow).lokascript) {\n registerResizable().catch(console.error);\n}\n\nexport default {\n source: resizableSchema.source,\n metadata: resizableSchema,\n register: registerResizable,\n};\n","/**\n * Removable Behavior\n *\n * A behavior that removes an element when a trigger is clicked.\n * Supports optional confirmation and transition effects.\n *\n * @example\n * ```html\n * <div _=\"install Removable\">Click to remove</div>\n *\n * <div _=\"install Removable(confirm: true)\">With confirmation</div>\n * ```\n */\n\nimport { removableSchema } from '../schemas/removable.schema';\nimport type { LokaScriptInstance, LokaScriptWindow } from '../schemas/types';\n\n// Re-export schema-derived values for backwards compatibility\nexport const removableSource = removableSchema.source;\nexport const removableMetadata = removableSchema;\n\n/**\n * Register the Removable behavior with LokaScript.\n */\nexport async function registerRemovable(hyperfixi?: LokaScriptInstance): Promise<void> {\n const hf =\n hyperfixi ||\n (typeof window !== 'undefined' ? (window as unknown as LokaScriptWindow).lokascript : null);\n\n if (!hf) {\n throw new Error(\n 'LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.'\n );\n }\n\n const result = hf.compileSync(removableSchema.source, { traditional: true });\n\n if (!result.ok) {\n throw new Error(`Failed to compile Removable behavior: ${JSON.stringify(result.errors)}`);\n }\n\n const ctx = hf.createContext ? hf.createContext() : { locals: new Map(), globals: new Map() };\n await hf.execute(result.ast, ctx);\n}\n\n// Auto-register when loaded as a script tag\nif (typeof window !== 'undefined' && (window as unknown as LokaScriptWindow).lokascript) {\n registerRemovable().catch(console.error);\n}\n\nexport default {\n source: removableSchema.source,\n metadata: removableSchema,\n register: registerRemovable,\n};\n","/**\n * Toggleable Behavior\n *\n * A behavior that toggles a CSS class on click.\n * Useful for accordions, dropdowns, and toggle buttons.\n *\n * @example\n * ```html\n * <button _=\"install Toggleable\">Toggle</button>\n *\n * <button _=\"install Toggleable(cls: expanded, target: #menu)\">Menu</button>\n * ```\n */\n\nimport { toggleableSchema } from '../schemas/toggleable.schema';\nimport type { LokaScriptInstance, LokaScriptWindow } from '../schemas/types';\n\n// Re-export schema-derived values for backwards compatibility\nexport const toggleableSource = toggleableSchema.source;\nexport const toggleableMetadata = toggleableSchema;\n\n/**\n * Register the Toggleable behavior with LokaScript.\n */\nexport async function registerToggleable(hyperfixi?: LokaScriptInstance): Promise<void> {\n const hf =\n hyperfixi ||\n (typeof window !== 'undefined' ? (window as unknown as LokaScriptWindow).lokascript : null);\n\n if (!hf) {\n throw new Error(\n 'LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.'\n );\n }\n\n const result = hf.compileSync(toggleableSchema.source, { traditional: true });\n\n if (!result.ok) {\n throw new Error(`Failed to compile Toggleable behavior: ${JSON.stringify(result.errors)}`);\n }\n\n const ctx = hf.createContext ? hf.createContext() : { locals: new Map(), globals: new Map() };\n await hf.execute(result.ast, ctx);\n}\n\n// Auto-register when loaded as a script tag\nif (typeof window !== 'undefined' && (window as unknown as LokaScriptWindow).lokascript) {\n registerToggleable().catch(console.error);\n}\n\nexport default {\n source: toggleableSchema.source,\n metadata: toggleableSchema,\n register: registerToggleable,\n};\n","/**\n * Behavior Registry\n *\n * Central registration point for behaviors. Modeled on semantic/registry.ts.\n * Supports lazy loading, category/tier queries, and tree-shaking.\n *\n * @example\n * ```typescript\n * // Register a behavior\n * registerBehavior('Draggable', DraggableModule);\n *\n * // Query behaviors\n * const uiBehaviors = getBehaviorsByCategory('ui');\n * const coreBehaviors = getBehaviorsByTier('core');\n *\n * // Lazy load on demand\n * const module = await loadBehavior('Resizable');\n * ```\n */\n\nimport type {\n BehaviorModule,\n BehaviorSchema,\n BehaviorCategory,\n BehaviorTier,\n LokaScriptInstance,\n} from './schemas/types';\n\n// =============================================================================\n// Registry State\n// =============================================================================\n\nconst behaviors = new Map<string, BehaviorModule>();\nconst schemas = new Map<string, BehaviorSchema>();\nconst loaders = new Map<string, () => Promise<{ default: BehaviorModule }>>();\nconst loadingPromises = new Map<string, Promise<BehaviorModule>>();\n\n// =============================================================================\n// Registration Functions\n// =============================================================================\n\n/**\n * Register a behavior module.\n */\nexport function registerBehavior(name: string, module: BehaviorModule): void {\n behaviors.set(name, module);\n if (module.metadata) {\n schemas.set(name, module.metadata);\n }\n}\n\n/**\n * Register a behavior schema (without the module).\n */\nexport function registerSchema(schema: BehaviorSchema): void {\n schemas.set(schema.name, schema);\n}\n\n/**\n * Register a lazy loader for a behavior.\n * The loader should return a module with a default export.\n */\nexport function registerLoader(\n name: string,\n loader: () => Promise<{ default: BehaviorModule }>\n): void {\n loaders.set(name, loader);\n}\n\n// =============================================================================\n// Query Functions (Sync)\n// =============================================================================\n\n/**\n * Get a behavior module by name.\n * @throws Error if behavior is not registered\n */\nexport function getBehavior(name: string): BehaviorModule {\n const behavior = behaviors.get(name);\n if (!behavior) {\n const registered = Array.from(behaviors.keys()).join(', ');\n throw new Error(\n `Behavior '${name}' is not registered. ` +\n `Registered behaviors: ${registered || 'none'}. ` +\n `Use loadBehavior('${name}') to lazy load it.`\n );\n }\n return behavior;\n}\n\n/**\n * Try to get a behavior, returning undefined if not registered.\n */\nexport function tryGetBehavior(name: string): BehaviorModule | undefined {\n return behaviors.get(name);\n}\n\n/**\n * Get a behavior schema by name.\n * @throws Error if schema is not registered\n */\nexport function getSchema(name: string): BehaviorSchema {\n const schema = schemas.get(name);\n if (!schema) {\n throw new Error(\n `Schema for behavior '${name}' is not registered. ` +\n `Use tryGetSchema('${name}') for a non-throwing alternative.`\n );\n }\n return schema;\n}\n\n/**\n * Try to get a schema, returning undefined if not registered.\n */\nexport function tryGetSchema(name: string): BehaviorSchema | undefined {\n return schemas.get(name);\n}\n\n/**\n * Check if a behavior is registered.\n */\nexport function isRegistered(name: string): boolean {\n return behaviors.has(name);\n}\n\n/**\n * Check if a loader is registered for a behavior.\n */\nexport function hasLoader(name: string): boolean {\n return loaders.has(name);\n}\n\n/**\n * Get all registered behavior names.\n */\nexport function getRegisteredBehaviors(): string[] {\n return Array.from(behaviors.keys());\n}\n\n/**\n * Get all behavior names that have loaders (including unloaded).\n */\nexport function getAvailableBehaviors(): string[] {\n const names = new Set([...behaviors.keys(), ...loaders.keys()]);\n return Array.from(names);\n}\n\n// =============================================================================\n// Query by Metadata\n// =============================================================================\n\n/**\n * Get behavior names by category.\n */\nexport function getBehaviorsByCategory(category: BehaviorCategory): string[] {\n const result: string[] = [];\n for (const [name, schema] of schemas) {\n if (schema.category === category) {\n result.push(name);\n }\n }\n return result;\n}\n\n/**\n * Get behavior names by tier.\n */\nexport function getBehaviorsByTier(tier: BehaviorTier): string[] {\n const result: string[] = [];\n for (const [name, schema] of schemas) {\n if (schema.tier === tier) {\n result.push(name);\n }\n }\n return result;\n}\n\n/**\n * Get all schemas.\n */\nexport function getAllSchemas(): BehaviorSchema[] {\n return Array.from(schemas.values());\n}\n\n/**\n * Get all schemas as a record.\n */\nexport function getAllSchemasRecord(): Record<string, BehaviorSchema> {\n const result: Record<string, BehaviorSchema> = {};\n for (const [name, schema] of schemas) {\n result[name] = schema;\n }\n return result;\n}\n\n// =============================================================================\n// Lazy Loading (Async)\n// =============================================================================\n\n/**\n * Load a behavior by name.\n * If already loaded, returns the cached module.\n * If a loader is registered, loads and caches the module.\n */\nexport async function loadBehavior(name: string): Promise<BehaviorModule> {\n // Return cached if available\n const cached = behaviors.get(name);\n if (cached) {\n return cached;\n }\n\n // Check for in-flight load\n const inFlight = loadingPromises.get(name);\n if (inFlight) {\n return inFlight;\n }\n\n // Check for loader\n const loader = loaders.get(name);\n if (!loader) {\n throw new Error(\n `No loader registered for behavior '${name}'. ` +\n `Available loaders: ${Array.from(loaders.keys()).join(', ') || 'none'}`\n );\n }\n\n // Load and cache\n const promise = loader().then(mod => {\n const module = mod.default;\n registerBehavior(name, module);\n loadingPromises.delete(name);\n return module;\n });\n\n loadingPromises.set(name, promise);\n return promise;\n}\n\n/**\n * Preload all behaviors in a tier.\n */\nexport async function preloadTier(tier: BehaviorTier): Promise<void> {\n const names = getBehaviorsByTier(tier);\n await Promise.all(\n names.map(name =>\n loadBehavior(name).catch(err => {\n console.warn(`[behaviors] Failed to preload '${name}' (tier: ${tier}):`, err);\n })\n )\n );\n}\n\n/**\n * Preload all behaviors in a category.\n */\nexport async function preloadCategory(category: BehaviorCategory): Promise<void> {\n const names = getBehaviorsByCategory(category);\n await Promise.all(\n names.map(name =>\n loadBehavior(name).catch(err => {\n console.warn(`[behaviors] Failed to preload '${name}' (category: ${category}):`, err);\n })\n )\n );\n}\n\n/**\n * Load and register all available behaviors.\n */\nexport async function loadAll(): Promise<void> {\n const names = getAvailableBehaviors();\n await Promise.all(\n names.map(name =>\n loadBehavior(name).catch(err => {\n console.warn(`[behaviors] Failed to load '${name}':`, err);\n })\n )\n );\n}\n\n// =============================================================================\n// Runtime Registration\n// =============================================================================\n\n/**\n * Register a behavior with HyperFixi runtime.\n * Compiles and executes the behavior source.\n */\nexport async function registerWithRuntime(\n name: string,\n hyperfixi?: LokaScriptInstance\n): Promise<void> {\n const module = await loadBehavior(name);\n await module.register(hyperfixi);\n}\n\n/**\n * Register all loaded behaviors with HyperFixi runtime.\n */\nexport async function registerAllWithRuntime(hyperfixi?: LokaScriptInstance): Promise<void> {\n const registrations = Array.from(behaviors.values()).map(module => module.register(hyperfixi));\n await Promise.all(registrations);\n}\n","/**\n * Behavior Loaders\n *\n * Registers lazy loaders for all behaviors.\n * Import this module to enable on-demand loading without bundling all behaviors.\n *\n * @example\n * ```typescript\n * // Enable lazy loading\n * import '@hyperfixi/behaviors/loaders';\n *\n * // Now load behaviors on demand\n * import { loadBehavior } from '@hyperfixi/behaviors/registry';\n * await loadBehavior('Draggable');\n * ```\n */\n\nimport { registerLoader, registerSchema } from './registry';\n\n// Register schemas for metadata queries before loading\nimport { draggableSchema } from './schemas/draggable.schema';\nimport { sortableSchema } from './schemas/sortable.schema';\nimport { resizableSchema } from './schemas/resizable.schema';\nimport { removableSchema } from './schemas/removable.schema';\nimport { toggleableSchema } from './schemas/toggleable.schema';\n\n// Register all schemas\nregisterSchema(draggableSchema);\nregisterSchema(sortableSchema);\nregisterSchema(resizableSchema);\nregisterSchema(removableSchema);\nregisterSchema(toggleableSchema);\n\n// Register lazy loaders - behaviors are only loaded when requested\nregisterLoader('Draggable', () => import('./behaviors/draggable'));\nregisterLoader('Sortable', () => import('./behaviors/sortable'));\nregisterLoader('Resizable', () => import('./behaviors/resizable'));\nregisterLoader('Removable', () => import('./behaviors/removable'));\nregisterLoader('Toggleable', () => import('./behaviors/toggleable'));\n"],"mappings":";;;;;;;;;;;;AAAA,IAQa;AARb;AAAA;AAAA;AAQO,IAAM,kBAAkC;AAAA,MAC7C,MAAM;AAAA,MACN,UAAU;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aAAa;AAAA,MACb,YAAY;AAAA,QACV;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,UAAU;AAAA,UACV,SAAS;AAAA,UACT,aAAa;AAAA,QACf;AAAA,MACF;AAAA,MACA,QAAQ;AAAA,QACN,EAAE,MAAM,mBAAmB,aAAa,yBAAyB;AAAA,QACjE,EAAE,MAAM,kBAAkB,aAAa,6BAA6B;AAAA,QACpE,EAAE,MAAM,iBAAiB,aAAa,4BAA4B;AAAA,MACpE;AAAA,MACA,cAAc,CAAC,sDAAsD;AAAA,MACrE,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBR,KAAK;AAAA,IACP;AAAA;AAAA;;;ACrDA,IAYa;AAZb;AAAA;AAAA;AAYO,IAAM,iBAAiC;AAAA,MAC5C,MAAM;AAAA,MACN,UAAU;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aAAa;AAAA,MACb,YAAY;AAAA,QACV;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,UAAU;AAAA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