eleva 1.0.0-alpha → 1.0.0-rc.10

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 (68) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +554 -137
  3. package/dist/eleva-plugins.cjs.js +3397 -0
  4. package/dist/eleva-plugins.cjs.js.map +1 -0
  5. package/dist/eleva-plugins.esm.js +3392 -0
  6. package/dist/eleva-plugins.esm.js.map +1 -0
  7. package/dist/eleva-plugins.umd.js +3403 -0
  8. package/dist/eleva-plugins.umd.js.map +1 -0
  9. package/dist/eleva-plugins.umd.min.js +3 -0
  10. package/dist/eleva-plugins.umd.min.js.map +1 -0
  11. package/dist/eleva.cjs.js +1448 -0
  12. package/dist/eleva.cjs.js.map +1 -0
  13. package/dist/eleva.d.ts +1057 -80
  14. package/dist/eleva.esm.js +1230 -274
  15. package/dist/eleva.esm.js.map +1 -1
  16. package/dist/eleva.umd.js +1230 -274
  17. package/dist/eleva.umd.js.map +1 -1
  18. package/dist/eleva.umd.min.js +3 -0
  19. package/dist/eleva.umd.min.js.map +1 -0
  20. package/dist/plugins/attr.umd.js +231 -0
  21. package/dist/plugins/attr.umd.js.map +1 -0
  22. package/dist/plugins/attr.umd.min.js +3 -0
  23. package/dist/plugins/attr.umd.min.js.map +1 -0
  24. package/dist/plugins/props.umd.js +711 -0
  25. package/dist/plugins/props.umd.js.map +1 -0
  26. package/dist/plugins/props.umd.min.js +3 -0
  27. package/dist/plugins/props.umd.min.js.map +1 -0
  28. package/dist/plugins/router.umd.js +1807 -0
  29. package/dist/plugins/router.umd.js.map +1 -0
  30. package/dist/plugins/router.umd.min.js +3 -0
  31. package/dist/plugins/router.umd.min.js.map +1 -0
  32. package/dist/plugins/store.umd.js +684 -0
  33. package/dist/plugins/store.umd.js.map +1 -0
  34. package/dist/plugins/store.umd.min.js +3 -0
  35. package/dist/plugins/store.umd.min.js.map +1 -0
  36. package/package.json +240 -62
  37. package/src/core/Eleva.js +552 -145
  38. package/src/modules/Emitter.js +154 -18
  39. package/src/modules/Renderer.js +288 -86
  40. package/src/modules/Signal.js +132 -13
  41. package/src/modules/TemplateEngine.js +153 -27
  42. package/src/plugins/Attr.js +252 -0
  43. package/src/plugins/Props.js +590 -0
  44. package/src/plugins/Router.js +1919 -0
  45. package/src/plugins/Store.js +741 -0
  46. package/src/plugins/index.js +40 -0
  47. package/types/core/Eleva.d.ts +482 -48
  48. package/types/core/Eleva.d.ts.map +1 -1
  49. package/types/modules/Emitter.d.ts +151 -20
  50. package/types/modules/Emitter.d.ts.map +1 -1
  51. package/types/modules/Renderer.d.ts +151 -12
  52. package/types/modules/Renderer.d.ts.map +1 -1
  53. package/types/modules/Signal.d.ts +130 -16
  54. package/types/modules/Signal.d.ts.map +1 -1
  55. package/types/modules/TemplateEngine.d.ts +154 -14
  56. package/types/modules/TemplateEngine.d.ts.map +1 -1
  57. package/types/plugins/Attr.d.ts +28 -0
  58. package/types/plugins/Attr.d.ts.map +1 -0
  59. package/types/plugins/Props.d.ts +48 -0
  60. package/types/plugins/Props.d.ts.map +1 -0
  61. package/types/plugins/Router.d.ts +1000 -0
  62. package/types/plugins/Router.d.ts.map +1 -0
  63. package/types/plugins/Store.d.ts +86 -0
  64. package/types/plugins/Store.d.ts.map +1 -0
  65. package/types/plugins/index.d.ts +5 -0
  66. package/types/plugins/index.d.ts.map +1 -0
  67. package/dist/eleva.min.js +0 -2
  68. package/dist/eleva.min.js.map +0 -1
@@ -0,0 +1,231 @@
1
+ /*! Eleva Attr Plugin v1.0.0-rc.10 | MIT License | https://elevajs.com */
2
+ (function (global, factory) {
3
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
5
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ElevaAttrPlugin = {}));
6
+ })(this, (function (exports) { 'use strict';
7
+
8
+ /**
9
+ * A regular expression to match hyphenated lowercase letters.
10
+ * @private
11
+ * @type {RegExp}
12
+ */
13
+ const CAMEL_RE = /-([a-z])/g;
14
+
15
+ /**
16
+ * @class 🎯 AttrPlugin
17
+ * @classdesc A plugin that provides advanced attribute handling for Eleva components.
18
+ * This plugin extends the renderer with sophisticated attribute processing including:
19
+ * - ARIA attribute handling with proper property mapping
20
+ * - Data attribute management
21
+ * - Boolean attribute processing
22
+ * - Dynamic property detection and mapping
23
+ * - Attribute cleanup and removal
24
+ *
25
+ * @example
26
+ * // Install the plugin
27
+ * const app = new Eleva("myApp");
28
+ * app.use(AttrPlugin);
29
+ *
30
+ * // Use advanced attributes in components
31
+ * app.component("myComponent", {
32
+ * template: (ctx) => `
33
+ * <button
34
+ * aria-expanded="${ctx.isExpanded.value}"
35
+ * data-user-id="${ctx.userId.value}"
36
+ * disabled="${ctx.isLoading.value}"
37
+ * class="btn ${ctx.variant.value}"
38
+ * >
39
+ * ${ctx.text.value}
40
+ * </button>
41
+ * `
42
+ * });
43
+ */
44
+ const AttrPlugin = {
45
+ /**
46
+ * Unique identifier for the plugin
47
+ * @type {string}
48
+ */
49
+ name: "attr",
50
+ /**
51
+ * Plugin version
52
+ * @type {string}
53
+ */
54
+ version: "1.0.0-rc.10",
55
+ /**
56
+ * Plugin description
57
+ * @type {string}
58
+ */
59
+ description: "Advanced attribute handling for Eleva components",
60
+ /**
61
+ * Installs the plugin into the Eleva instance
62
+ *
63
+ * @param {Object} eleva - The Eleva instance
64
+ * @param {Object} options - Plugin configuration options
65
+ * @param {boolean} [options.enableAria=true] - Enable ARIA attribute handling
66
+ * @param {boolean} [options.enableData=true] - Enable data attribute handling
67
+ * @param {boolean} [options.enableBoolean=true] - Enable boolean attribute handling
68
+ * @param {boolean} [options.enableDynamic=true] - Enable dynamic property detection
69
+ */
70
+ install(eleva, options = {}) {
71
+ const {
72
+ enableAria = true,
73
+ enableData = true,
74
+ enableBoolean = true,
75
+ enableDynamic = true
76
+ } = options;
77
+
78
+ /**
79
+ * Updates the attributes of an element to match a new element's attributes.
80
+ * This method provides sophisticated attribute processing including:
81
+ * - ARIA attribute handling with proper property mapping
82
+ * - Data attribute management
83
+ * - Boolean attribute processing
84
+ * - Dynamic property detection and mapping
85
+ * - Attribute cleanup and removal
86
+ *
87
+ * @param {HTMLElement} oldEl - The original element to update
88
+ * @param {HTMLElement} newEl - The new element to update
89
+ * @returns {void}
90
+ */
91
+ const updateAttributes = (oldEl, newEl) => {
92
+ const oldAttrs = oldEl.attributes;
93
+ const newAttrs = newEl.attributes;
94
+
95
+ // Process new attributes
96
+ for (let i = 0; i < newAttrs.length; i++) {
97
+ const {
98
+ name,
99
+ value
100
+ } = newAttrs[i];
101
+
102
+ // Skip event attributes (handled by event system)
103
+ if (name.startsWith("@")) continue;
104
+
105
+ // Skip if attribute hasn't changed
106
+ if (oldEl.getAttribute(name) === value) continue;
107
+
108
+ // Handle ARIA attributes
109
+ if (enableAria && name.startsWith("aria-")) {
110
+ const prop = "aria" + name.slice(5).replace(CAMEL_RE, (_, l) => l.toUpperCase());
111
+ oldEl[prop] = value;
112
+ oldEl.setAttribute(name, value);
113
+ }
114
+ // Handle data attributes
115
+ else if (enableData && name.startsWith("data-")) {
116
+ oldEl.dataset[name.slice(5)] = value;
117
+ oldEl.setAttribute(name, value);
118
+ }
119
+ // Handle other attributes
120
+ else {
121
+ let prop = name.replace(CAMEL_RE, (_, l) => l.toUpperCase());
122
+
123
+ // Dynamic property detection
124
+ if (enableDynamic && !(prop in oldEl) && !Object.getOwnPropertyDescriptor(Object.getPrototypeOf(oldEl), prop)) {
125
+ const elementProps = Object.getOwnPropertyNames(Object.getPrototypeOf(oldEl));
126
+ const matchingProp = elementProps.find(p => p.toLowerCase() === name.toLowerCase() || p.toLowerCase().includes(name.toLowerCase()) || name.toLowerCase().includes(p.toLowerCase()));
127
+ if (matchingProp) {
128
+ prop = matchingProp;
129
+ }
130
+ }
131
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(oldEl), prop);
132
+ const hasProperty = prop in oldEl || descriptor;
133
+ if (hasProperty) {
134
+ // Boolean attribute handling
135
+ if (enableBoolean) {
136
+ const isBoolean = typeof oldEl[prop] === "boolean" || descriptor?.get && typeof descriptor.get.call(oldEl) === "boolean";
137
+ if (isBoolean) {
138
+ const boolValue = value !== "false" && (value === "" || value === prop || value === "true");
139
+ oldEl[prop] = boolValue;
140
+ if (boolValue) {
141
+ oldEl.setAttribute(name, "");
142
+ } else {
143
+ oldEl.removeAttribute(name);
144
+ }
145
+ } else {
146
+ oldEl[prop] = value;
147
+ oldEl.setAttribute(name, value);
148
+ }
149
+ } else {
150
+ oldEl[prop] = value;
151
+ oldEl.setAttribute(name, value);
152
+ }
153
+ } else {
154
+ oldEl.setAttribute(name, value);
155
+ }
156
+ }
157
+ }
158
+
159
+ // Remove old attributes that are no longer present
160
+ for (let i = oldAttrs.length - 1; i >= 0; i--) {
161
+ const name = oldAttrs[i].name;
162
+ if (!newEl.hasAttribute(name)) {
163
+ oldEl.removeAttribute(name);
164
+ }
165
+ }
166
+ };
167
+
168
+ // Extend the renderer with the advanced attribute handler
169
+ if (eleva.renderer) {
170
+ eleva.renderer.updateAttributes = updateAttributes;
171
+
172
+ // Store the original _patchNode method
173
+ const originalPatchNode = eleva.renderer._patchNode;
174
+ eleva.renderer._originalPatchNode = originalPatchNode;
175
+
176
+ // Override the _patchNode method to use our attribute handler
177
+ eleva.renderer._patchNode = function (oldNode, newNode) {
178
+ if (oldNode?._eleva_instance) return;
179
+ if (!this._isSameNode(oldNode, newNode)) {
180
+ oldNode.replaceWith(newNode.cloneNode(true));
181
+ return;
182
+ }
183
+ if (oldNode.nodeType === Node.ELEMENT_NODE) {
184
+ updateAttributes(oldNode, newNode);
185
+ this._diff(oldNode, newNode);
186
+ } else if (oldNode.nodeType === Node.TEXT_NODE && oldNode.nodeValue !== newNode.nodeValue) {
187
+ oldNode.nodeValue = newNode.nodeValue;
188
+ }
189
+ };
190
+ }
191
+
192
+ // Add plugin metadata to the Eleva instance
193
+ if (!eleva.plugins) {
194
+ eleva.plugins = new Map();
195
+ }
196
+ eleva.plugins.set(this.name, {
197
+ name: this.name,
198
+ version: this.version,
199
+ description: this.description,
200
+ options
201
+ });
202
+
203
+ // Add utility methods for manual attribute updates
204
+ eleva.updateElementAttributes = updateAttributes;
205
+ },
206
+ /**
207
+ * Uninstalls the plugin from the Eleva instance
208
+ *
209
+ * @param {Object} eleva - The Eleva instance
210
+ */
211
+ uninstall(eleva) {
212
+ // Restore original _patchNode method if it exists
213
+ if (eleva.renderer && eleva.renderer._originalPatchNode) {
214
+ eleva.renderer._patchNode = eleva.renderer._originalPatchNode;
215
+ delete eleva.renderer._originalPatchNode;
216
+ }
217
+
218
+ // Remove plugin metadata
219
+ if (eleva.plugins) {
220
+ eleva.plugins.delete(this.name);
221
+ }
222
+
223
+ // Remove utility methods
224
+ delete eleva.updateElementAttributes;
225
+ }
226
+ };
227
+
228
+ exports.AttrPlugin = AttrPlugin;
229
+
230
+ }));
231
+ //# sourceMappingURL=attr.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attr.umd.js","sources":["../../src/plugins/Attr.js"],"sourcesContent":["\"use strict\";\n\n/**\n * A regular expression to match hyphenated lowercase letters.\n * @private\n * @type {RegExp}\n */\nconst CAMEL_RE = /-([a-z])/g;\n\n/**\n * @class 🎯 AttrPlugin\n * @classdesc A plugin that provides advanced attribute handling for Eleva components.\n * This plugin extends the renderer with sophisticated attribute processing including:\n * - ARIA attribute handling with proper property mapping\n * - Data attribute management\n * - Boolean attribute processing\n * - Dynamic property detection and mapping\n * - Attribute cleanup and removal\n *\n * @example\n * // Install the plugin\n * const app = new Eleva(\"myApp\");\n * app.use(AttrPlugin);\n *\n * // Use advanced attributes in components\n * app.component(\"myComponent\", {\n * template: (ctx) => `\n * <button\n * aria-expanded=\"${ctx.isExpanded.value}\"\n * data-user-id=\"${ctx.userId.value}\"\n * disabled=\"${ctx.isLoading.value}\"\n * class=\"btn ${ctx.variant.value}\"\n * >\n * ${ctx.text.value}\n * </button>\n * `\n * });\n */\nexport const AttrPlugin = {\n /**\n * Unique identifier for the plugin\n * @type {string}\n */\n name: \"attr\",\n\n /**\n * Plugin version\n * @type {string}\n */\n version: \"1.0.0-rc.10\",\n\n /**\n * Plugin description\n * @type {string}\n */\n description: \"Advanced attribute handling for Eleva components\",\n\n /**\n * Installs the plugin into the Eleva instance\n *\n * @param {Object} eleva - The Eleva instance\n * @param {Object} options - Plugin configuration options\n * @param {boolean} [options.enableAria=true] - Enable ARIA attribute handling\n * @param {boolean} [options.enableData=true] - Enable data attribute handling\n * @param {boolean} [options.enableBoolean=true] - Enable boolean attribute handling\n * @param {boolean} [options.enableDynamic=true] - Enable dynamic property detection\n */\n install(eleva, options = {}) {\n const {\n enableAria = true,\n enableData = true,\n enableBoolean = true,\n enableDynamic = true,\n } = options;\n\n /**\n * Updates the attributes of an element to match a new element's attributes.\n * This method provides sophisticated attribute processing including:\n * - ARIA attribute handling with proper property mapping\n * - Data attribute management\n * - Boolean attribute processing\n * - Dynamic property detection and mapping\n * - Attribute cleanup and removal\n *\n * @param {HTMLElement} oldEl - The original element to update\n * @param {HTMLElement} newEl - The new element to update\n * @returns {void}\n */\n const updateAttributes = (oldEl, newEl) => {\n const oldAttrs = oldEl.attributes;\n const newAttrs = newEl.attributes;\n\n // Process new attributes\n for (let i = 0; i < newAttrs.length; i++) {\n const { name, value } = newAttrs[i];\n\n // Skip event attributes (handled by event system)\n if (name.startsWith(\"@\")) continue;\n\n // Skip if attribute hasn't changed\n if (oldEl.getAttribute(name) === value) continue;\n\n // Handle ARIA attributes\n if (enableAria && name.startsWith(\"aria-\")) {\n const prop =\n \"aria\" + name.slice(5).replace(CAMEL_RE, (_, l) => l.toUpperCase());\n oldEl[prop] = value;\n oldEl.setAttribute(name, value);\n }\n // Handle data attributes\n else if (enableData && name.startsWith(\"data-\")) {\n oldEl.dataset[name.slice(5)] = value;\n oldEl.setAttribute(name, value);\n }\n // Handle other attributes\n else {\n let prop = name.replace(CAMEL_RE, (_, l) => l.toUpperCase());\n\n // Dynamic property detection\n if (\n enableDynamic &&\n !(prop in oldEl) &&\n !Object.getOwnPropertyDescriptor(Object.getPrototypeOf(oldEl), prop)\n ) {\n const elementProps = Object.getOwnPropertyNames(\n Object.getPrototypeOf(oldEl)\n );\n const matchingProp = elementProps.find(\n (p) =>\n p.toLowerCase() === name.toLowerCase() ||\n p.toLowerCase().includes(name.toLowerCase()) ||\n name.toLowerCase().includes(p.toLowerCase())\n );\n\n if (matchingProp) {\n prop = matchingProp;\n }\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(\n Object.getPrototypeOf(oldEl),\n prop\n );\n const hasProperty = prop in oldEl || descriptor;\n\n if (hasProperty) {\n // Boolean attribute handling\n if (enableBoolean) {\n const isBoolean =\n typeof oldEl[prop] === \"boolean\" ||\n (descriptor?.get &&\n typeof descriptor.get.call(oldEl) === \"boolean\");\n\n if (isBoolean) {\n const boolValue =\n value !== \"false\" &&\n (value === \"\" || value === prop || value === \"true\");\n oldEl[prop] = boolValue;\n\n if (boolValue) {\n oldEl.setAttribute(name, \"\");\n } else {\n oldEl.removeAttribute(name);\n }\n } else {\n oldEl[prop] = value;\n oldEl.setAttribute(name, value);\n }\n } else {\n oldEl[prop] = value;\n oldEl.setAttribute(name, value);\n }\n } else {\n oldEl.setAttribute(name, value);\n }\n }\n }\n\n // Remove old attributes that are no longer present\n for (let i = oldAttrs.length - 1; i >= 0; i--) {\n const name = oldAttrs[i].name;\n if (!newEl.hasAttribute(name)) {\n oldEl.removeAttribute(name);\n }\n }\n };\n\n // Extend the renderer with the advanced attribute handler\n if (eleva.renderer) {\n eleva.renderer.updateAttributes = updateAttributes;\n\n // Store the original _patchNode method\n const originalPatchNode = eleva.renderer._patchNode;\n eleva.renderer._originalPatchNode = originalPatchNode;\n\n // Override the _patchNode method to use our attribute handler\n eleva.renderer._patchNode = function (oldNode, newNode) {\n if (oldNode?._eleva_instance) return;\n\n if (!this._isSameNode(oldNode, newNode)) {\n oldNode.replaceWith(newNode.cloneNode(true));\n return;\n }\n\n if (oldNode.nodeType === Node.ELEMENT_NODE) {\n updateAttributes(oldNode, newNode);\n this._diff(oldNode, newNode);\n } else if (\n oldNode.nodeType === Node.TEXT_NODE &&\n oldNode.nodeValue !== newNode.nodeValue\n ) {\n oldNode.nodeValue = newNode.nodeValue;\n }\n };\n }\n\n // Add plugin metadata to the Eleva instance\n if (!eleva.plugins) {\n eleva.plugins = new Map();\n }\n eleva.plugins.set(this.name, {\n name: this.name,\n version: this.version,\n description: this.description,\n options,\n });\n\n // Add utility methods for manual attribute updates\n eleva.updateElementAttributes = updateAttributes;\n },\n\n /**\n * Uninstalls the plugin from the Eleva instance\n *\n * @param {Object} eleva - The Eleva instance\n */\n uninstall(eleva) {\n // Restore original _patchNode method if it exists\n if (eleva.renderer && eleva.renderer._originalPatchNode) {\n eleva.renderer._patchNode = eleva.renderer._originalPatchNode;\n delete eleva.renderer._originalPatchNode;\n }\n\n // Remove plugin metadata\n if (eleva.plugins) {\n eleva.plugins.delete(this.name);\n }\n\n // Remove utility methods\n delete eleva.updateElementAttributes;\n },\n};\n"],"names":["CAMEL_RE","AttrPlugin","name","version","description","install","eleva","options","enableAria","enableData","enableBoolean","enableDynamic","updateAttributes","oldEl","newEl","oldAttrs","attributes","newAttrs","i","length","value","startsWith","getAttribute","prop","slice","replace","_","l","toUpperCase","setAttribute","dataset","Object","getOwnPropertyDescriptor","getPrototypeOf","elementProps","getOwnPropertyNames","matchingProp","find","p","toLowerCase","includes","descriptor","hasProperty","isBoolean","get","call","boolValue","removeAttribute","hasAttribute","renderer","originalPatchNode","_patchNode","_originalPatchNode","oldNode","newNode","_eleva_instance","_isSameNode","replaceWith","cloneNode","nodeType","Node","ELEMENT_NODE","_diff","TEXT_NODE","nodeValue","plugins","Map","set","updateElementAttributes","uninstall","delete"],"mappings":";;;;;;;EAEA;EACA;EACA;EACA;EACA;EACA,MAAMA,QAAQ,GAAG,WAAW;;EAE5B;EACA;EACA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Attr Plugin v1.0.0-rc.10 | MIT License | https://elevajs.com */
2
+ var e,t;e=this,t=function(e){"use strict";const t=/-([a-z])/g;e.AttrPlugin={name:"attr",version:"1.0.0-rc.10",description:"Advanced attribute handling for Eleva components",install(e,r={}){const{enableAria:n=!0,enableData:o=!0,enableBoolean:i=!0,enableDynamic:a=!0}=r,s=(e,r)=>{const s=e.attributes,l=r.attributes;for(let r=0;r<l.length;r++){const{name:s,value:d}=l[r];if(!s.startsWith("@")&&e.getAttribute(s)!==d)if(n&&s.startsWith("aria-"))e["aria"+s.slice(5).replace(t,(e,t)=>t.toUpperCase())]=d,e.setAttribute(s,d);else if(o&&s.startsWith("data-"))e.dataset[s.slice(5)]=d,e.setAttribute(s,d);else{let r=s.replace(t,(e,t)=>t.toUpperCase());if(a&&!(r in e)&&!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),r)){const t=Object.getOwnPropertyNames(Object.getPrototypeOf(e)).find(e=>e.toLowerCase()===s.toLowerCase()||e.toLowerCase().includes(s.toLowerCase())||s.toLowerCase().includes(e.toLowerCase()));t&&(r=t)}const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),r);if(r in e||n)if(i)if("boolean"==typeof e[r]||n?.get&&"boolean"==typeof n.get.call(e)){const t="false"!==d&&(""===d||d===r||"true"===d);e[r]=t,t?e.setAttribute(s,""):e.removeAttribute(s)}else e[r]=d,e.setAttribute(s,d);else e[r]=d,e.setAttribute(s,d);else e.setAttribute(s,d)}}for(let t=s.length-1;t>=0;t--){const n=s[t].name;r.hasAttribute(n)||e.removeAttribute(n)}};e.renderer&&(e.renderer.updateAttributes=s,e.renderer._originalPatchNode=e.renderer._patchNode,e.renderer._patchNode=function(e,t){e?._eleva_instance||(this._isSameNode(e,t)?e.nodeType===Node.ELEMENT_NODE?(s(e,t),this._diff(e,t)):e.nodeType===Node.TEXT_NODE&&e.nodeValue!==t.nodeValue&&(e.nodeValue=t.nodeValue):e.replaceWith(t.cloneNode(!0)))}),e.plugins||(e.plugins=new Map),e.plugins.set(this.name,{name:this.name,version:this.version,description:this.description,options:r}),e.updateElementAttributes=s},uninstall(e){e.renderer&&e.renderer._originalPatchNode&&(e.renderer._patchNode=e.renderer._originalPatchNode,delete e.renderer._originalPatchNode),e.plugins&&e.plugins.delete(this.name),delete e.updateElementAttributes}}},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ElevaAttrPlugin={});
3
+ //# sourceMappingURL=attr.umd.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attr.umd.min.js","sources":["../../src/plugins/Attr.js"],"sourcesContent":["\"use strict\";\n\n/**\n * A regular expression to match hyphenated lowercase letters.\n * @private\n * @type {RegExp}\n */\nconst CAMEL_RE = /-([a-z])/g;\n\n/**\n * @class 🎯 AttrPlugin\n * @classdesc A plugin that provides advanced attribute handling for Eleva components.\n * This plugin extends the renderer with sophisticated attribute processing including:\n * - ARIA attribute handling with proper property mapping\n * - Data attribute management\n * - Boolean attribute processing\n * - Dynamic property detection and mapping\n * - Attribute cleanup and removal\n *\n * @example\n * // Install the plugin\n * const app = new Eleva(\"myApp\");\n * app.use(AttrPlugin);\n *\n * // Use advanced attributes in components\n * app.component(\"myComponent\", {\n * template: (ctx) => `\n * <button\n * aria-expanded=\"${ctx.isExpanded.value}\"\n * data-user-id=\"${ctx.userId.value}\"\n * disabled=\"${ctx.isLoading.value}\"\n * class=\"btn ${ctx.variant.value}\"\n * >\n * ${ctx.text.value}\n * </button>\n * `\n * });\n */\nexport const AttrPlugin = {\n /**\n * Unique identifier for the plugin\n * @type {string}\n */\n name: \"attr\",\n\n /**\n * Plugin version\n * @type {string}\n */\n version: \"1.0.0-rc.10\",\n\n /**\n * Plugin description\n * @type {string}\n */\n description: \"Advanced attribute handling for Eleva components\",\n\n /**\n * Installs the plugin into the Eleva instance\n *\n * @param {Object} eleva - The Eleva instance\n * @param {Object} options - Plugin configuration options\n * @param {boolean} [options.enableAria=true] - Enable ARIA attribute handling\n * @param {boolean} [options.enableData=true] - Enable data attribute handling\n * @param {boolean} [options.enableBoolean=true] - Enable boolean attribute handling\n * @param {boolean} [options.enableDynamic=true] - Enable dynamic property detection\n */\n install(eleva, options = {}) {\n const {\n enableAria = true,\n enableData = true,\n enableBoolean = true,\n enableDynamic = true,\n } = options;\n\n /**\n * Updates the attributes of an element to match a new element's attributes.\n * This method provides sophisticated attribute processing including:\n * - ARIA attribute handling with proper property mapping\n * - Data attribute management\n * - Boolean attribute processing\n * - Dynamic property detection and mapping\n * - Attribute cleanup and removal\n *\n * @param {HTMLElement} oldEl - The original element to update\n * @param {HTMLElement} newEl - The new element to update\n * @returns {void}\n */\n const updateAttributes = (oldEl, newEl) => {\n const oldAttrs = oldEl.attributes;\n const newAttrs = newEl.attributes;\n\n // Process new attributes\n for (let i = 0; i < newAttrs.length; i++) {\n const { name, value } = newAttrs[i];\n\n // Skip event attributes (handled by event system)\n if (name.startsWith(\"@\")) continue;\n\n // Skip if attribute hasn't changed\n if (oldEl.getAttribute(name) === value) continue;\n\n // Handle ARIA attributes\n if (enableAria && name.startsWith(\"aria-\")) {\n const prop =\n \"aria\" + name.slice(5).replace(CAMEL_RE, (_, l) => l.toUpperCase());\n oldEl[prop] = value;\n oldEl.setAttribute(name, value);\n }\n // Handle data attributes\n else if (enableData && name.startsWith(\"data-\")) {\n oldEl.dataset[name.slice(5)] = value;\n oldEl.setAttribute(name, value);\n }\n // Handle other attributes\n else {\n let prop = name.replace(CAMEL_RE, (_, l) => l.toUpperCase());\n\n // Dynamic property detection\n if (\n enableDynamic &&\n !(prop in oldEl) &&\n !Object.getOwnPropertyDescriptor(Object.getPrototypeOf(oldEl), prop)\n ) {\n const elementProps = Object.getOwnPropertyNames(\n Object.getPrototypeOf(oldEl)\n );\n const matchingProp = elementProps.find(\n (p) =>\n p.toLowerCase() === name.toLowerCase() ||\n p.toLowerCase().includes(name.toLowerCase()) ||\n name.toLowerCase().includes(p.toLowerCase())\n );\n\n if (matchingProp) {\n prop = matchingProp;\n }\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(\n Object.getPrototypeOf(oldEl),\n prop\n );\n const hasProperty = prop in oldEl || descriptor;\n\n if (hasProperty) {\n // Boolean attribute handling\n if (enableBoolean) {\n const isBoolean =\n typeof oldEl[prop] === \"boolean\" ||\n (descriptor?.get &&\n typeof descriptor.get.call(oldEl) === \"boolean\");\n\n if (isBoolean) {\n const boolValue =\n value !== \"false\" &&\n (value === \"\" || value === prop || value === \"true\");\n oldEl[prop] = boolValue;\n\n if (boolValue) {\n oldEl.setAttribute(name, \"\");\n } else {\n oldEl.removeAttribute(name);\n }\n } else {\n oldEl[prop] = value;\n oldEl.setAttribute(name, value);\n }\n } else {\n oldEl[prop] = value;\n oldEl.setAttribute(name, value);\n }\n } else {\n oldEl.setAttribute(name, value);\n }\n }\n }\n\n // Remove old attributes that are no longer present\n for (let i = oldAttrs.length - 1; i >= 0; i--) {\n const name = oldAttrs[i].name;\n if (!newEl.hasAttribute(name)) {\n oldEl.removeAttribute(name);\n }\n }\n };\n\n // Extend the renderer with the advanced attribute handler\n if (eleva.renderer) {\n eleva.renderer.updateAttributes = updateAttributes;\n\n // Store the original _patchNode method\n const originalPatchNode = eleva.renderer._patchNode;\n eleva.renderer._originalPatchNode = originalPatchNode;\n\n // Override the _patchNode method to use our attribute handler\n eleva.renderer._patchNode = function (oldNode, newNode) {\n if (oldNode?._eleva_instance) return;\n\n if (!this._isSameNode(oldNode, newNode)) {\n oldNode.replaceWith(newNode.cloneNode(true));\n return;\n }\n\n if (oldNode.nodeType === Node.ELEMENT_NODE) {\n updateAttributes(oldNode, newNode);\n this._diff(oldNode, newNode);\n } else if (\n oldNode.nodeType === Node.TEXT_NODE &&\n oldNode.nodeValue !== newNode.nodeValue\n ) {\n oldNode.nodeValue = newNode.nodeValue;\n }\n };\n }\n\n // Add plugin metadata to the Eleva instance\n if (!eleva.plugins) {\n eleva.plugins = new Map();\n }\n eleva.plugins.set(this.name, {\n name: this.name,\n version: this.version,\n description: this.description,\n options,\n });\n\n // Add utility methods for manual attribute updates\n eleva.updateElementAttributes = updateAttributes;\n },\n\n /**\n * Uninstalls the plugin from the Eleva instance\n *\n * @param {Object} eleva - The Eleva instance\n */\n uninstall(eleva) {\n // Restore original _patchNode method if it exists\n if (eleva.renderer && eleva.renderer._originalPatchNode) {\n eleva.renderer._patchNode = eleva.renderer._originalPatchNode;\n delete eleva.renderer._originalPatchNode;\n }\n\n // Remove plugin metadata\n if (eleva.plugins) {\n eleva.plugins.delete(this.name);\n }\n\n // Remove utility methods\n delete eleva.updateElementAttributes;\n },\n};\n"],"names":["CAMEL_RE","name","version","description","install","eleva","options","enableAria","enableData","enableBoolean","enableDynamic","updateAttributes","oldEl","newEl","oldAttrs","attributes","newAttrs","i","length","value","startsWith","getAttribute","slice","replace","_","l","toUpperCase","setAttribute","dataset","prop","Object","getOwnPropertyDescriptor","getPrototypeOf","matchingProp","getOwnPropertyNames","find","p","toLowerCase","includes","descriptor","get","call","boolValue","removeAttribute","hasAttribute","renderer","_originalPatchNode","_patchNode","oldNode","newNode","_eleva_instance","this","_isSameNode","nodeType","Node","ELEMENT_NODE","_diff","TEXT_NODE","nodeValue","replaceWith","cloneNode","plugins","Map","set","updateElementAttributes","uninstall","delete"],"mappings":";0CAOA,MAAMA,EAAW,yBA+BS,CAKxBC,KAAM,OAMNC,QAAS,cAMTC,YAAa,mDAYbC,OAAAA,CAAQC,EAAOC,EAAU,IACvB,MAAMC,WACJA,GAAa,EAAIC,WACjBA,GAAa,EAAIC,cACjBA,GAAgB,EAAIC,cACpBA,GAAgB,GACdJ,EAeEK,EAAmBA,CAACC,EAAOC,KAC/B,MAAMC,EAAWF,EAAMG,WACjBC,EAAWH,EAAME,WAGvB,IAAK,IAAIE,EAAI,EAAGA,EAAID,EAASE,OAAQD,IAAK,CACxC,MAAMhB,KAAEA,EAAIkB,MAAEA,GAAUH,EAASC,GAGjC,IA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