veles 0.0.6 → 0.0.7

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/index.d.ts CHANGED
@@ -1,53 +1,12 @@
1
- import { V as VelesElement, a as VelesComponent, b as VelesStringElement, A as AttributeHelper } from './fragment-CHmQ0MhU.js';
2
- export { F as Fragment, c as createElement } from './fragment-CHmQ0MhU.js';
1
+ import { V as VelesElement, a as VelesComponent } from './types.d-DgVBp6oa.js';
2
+ export { F as Fragment, c as createElement } from './fragment-IVSEC7-Q.js';
3
+ export { S as State, c as createState } from './create-state-Bo6TT4qP.js';
3
4
 
4
5
  declare function attachComponent({ htmlElement, component, }: {
5
6
  htmlElement: HTMLElement;
6
7
  component: VelesElement | VelesComponent;
7
8
  }): () => void;
8
9
 
9
- type State<ValueType> = {
10
- trackValue(cb: (value: ValueType) => void | Function, options?: {
11
- callOnMount?: boolean;
12
- skipFirstCall?: boolean;
13
- comparator?: (value1: ValueType, value2: ValueType) => boolean;
14
- }): void;
15
- trackValueSelector<SelectorValueType>(selector: (value: ValueType) => SelectorValueType, cb: (value: SelectorValueType) => void | Function, options?: {
16
- callOnMount?: boolean;
17
- skipFirstCall?: boolean;
18
- comparator?: (value1: SelectorValueType, value2: SelectorValueType) => boolean;
19
- }): void;
20
- useValue(cb?: (value: ValueType) => VelesElement | VelesComponent | string | undefined | null, comparator?: (value1: ValueType, value2: ValueType) => boolean): VelesElement | VelesComponent | VelesStringElement;
21
- useValueSelector<SelectorValueType>(selector: (value: ValueType) => SelectorValueType, cb?: (value: SelectorValueType) => VelesElement | VelesComponent | string | undefined | null, comparator?: (value1: SelectorValueType, value2: SelectorValueType) => boolean): VelesElement | VelesComponent | VelesStringElement;
22
- useAttribute(cb?: (value: ValueType) => any): AttributeHelper<any>;
23
- useValueIterator<Element>(options: {
24
- key: string | ((options: {
25
- element: Element;
26
- index: number;
27
- }) => string);
28
- selector?: (value: ValueType) => Element[];
29
- }, cb: (props: {
30
- elementState: State<Element>;
31
- index: number;
32
- }) => VelesElement | VelesComponent): VelesComponent | VelesElement | null;
33
- getValue(): ValueType;
34
- getPreviousValue(): undefined | ValueType;
35
- setValue(newValueCB: ((currentValue: ValueType) => ValueType) | ValueType): void;
36
- _triggerUpdates(): void;
37
- };
38
- declare function createState<T>(initialValue: T, subscribeCallback?: (setValue: ReturnType<typeof createState<T>>["setValue"]) => Function): State<T>;
39
-
40
- type createdState<StateType> = ReturnType<typeof createState<StateType>>;
41
- declare function combineState<A, B>(state1: createdState<A>, state2: createdState<B>): createdState<[A, B]>;
42
- declare function combineState<A, B, C>(state1: createdState<A>, state2: createdState<B>, state3: createdState<C>): createdState<[A, B, C]>;
43
- declare function combineState<A, B, C, D>(state1: createdState<A>, state2: createdState<B>, state3: createdState<C>, state4: createdState<D>): createdState<[A, B, C, D]>;
44
- declare function combineState<A, B, C, D, E>(state1: createdState<A>, state2: createdState<B>, state3: createdState<C>, state4: createdState<D>, state5: createdState<E>): createdState<[A, B, C, D, E]>;
45
- declare function combineState<A, B, C, D, E, F>(state1: createdState<A>, state2: createdState<B>, state3: createdState<C>, state4: createdState<D>, state5: createdState<E>, state6: createdState<F>): createdState<[A, B, C, D, E, F]>;
46
- declare function combineState<A, B, C, D, E, F, G>(state1: createdState<A>, state2: createdState<B>, state3: createdState<C>, state4: createdState<D>, state5: createdState<E>, state6: createdState<F>, state7: createdState<G>): createdState<[A, B, C, D, E, F, G]>;
47
- declare function combineState<A, B, C, D, E, F, G, H>(state1: createdState<A>, state2: createdState<B>, state3: createdState<C>, state4: createdState<D>, state5: createdState<E>, state6: createdState<F>, state7: createdState<G>, state8: createdState<H>): createdState<[A, B, C, D, E, F, G, H]>;
48
- declare function combineState<A, B, C, D, E, F, G, H, I>(state1: createdState<A>, state2: createdState<B>, state3: createdState<C>, state4: createdState<D>, state5: createdState<E>, state6: createdState<F>, state7: createdState<G>, state8: createdState<H>, state9: createdState<I>): createdState<[A, B, C, D, E, F, G, H, I]>;
49
- declare function combineState<A, B, C, D, E, F, G, H, I, J>(state1: createdState<A>, state2: createdState<B>, state3: createdState<C>, state4: createdState<D>, state5: createdState<E>, state6: createdState<F>, state7: createdState<G>, state8: createdState<H>, state9: createdState<I>, state10: createdState<J>): createdState<[A, B, C, D, E, F, G, H, I, J]>;
50
-
51
10
  declare function onMount(cb: () => void | Function): void;
52
11
  declare function onUnmount(cb: Function): void;
53
12
 
@@ -56,4 +15,4 @@ declare function createRef<T>(initialRefValue?: T | null): {
56
15
  current: T | null;
57
16
  };
58
17
 
59
- export { type State, attachComponent, combineState, createRef, createState, onMount, onUnmount };
18
+ export { attachComponent, createRef, onMount, onUnmount };
package/dist/index.js CHANGED
@@ -1,13 +1,16 @@
1
1
  import {
2
- Fragment,
2
+ Fragment
3
+ } from "./chunk-X6QYYW56.js";
4
+ import {
5
+ createState
6
+ } from "./chunk-MH6DPZ3V.js";
7
+ import {
3
8
  callMountHandlers,
4
9
  createElement,
5
10
  getComponentVelesNode,
6
- identity,
7
11
  onMount,
8
- onUnmount,
9
- unique
10
- } from "./chunk-IENMGHS4.js";
12
+ onUnmount
13
+ } from "./chunk-ILNLS6QO.js";
11
14
 
12
15
  // src/attach-component.ts
13
16
  function attachComponent({
@@ -23,412 +26,6 @@ function attachComponent({
23
26
  };
24
27
  }
25
28
 
26
- // src/create-element/create-text-element.ts
27
- function createTextElement(text) {
28
- const unmountHandlers = [];
29
- return {
30
- velesStringElement: true,
31
- // in case there is no text, we create an empty Text node, so we still can
32
- // have a reference to it, replace it, call lifecycle methods, etc
33
- html: document.createTextNode(text || ""),
34
- _privateMethods: {
35
- _addUnmountHandler: (cb) => {
36
- unmountHandlers.push(cb);
37
- },
38
- _callUnmountHandlers: () => {
39
- unmountHandlers.forEach((cb) => cb());
40
- }
41
- }
42
- };
43
- }
44
-
45
- // src/hooks/create-state.ts
46
- function createState(initialValue, subscribeCallback) {
47
- let value = initialValue;
48
- let previousValue = void 0;
49
- let trackingEffects = [];
50
- let trackingSelectorElements = [];
51
- let trackingAttributes = [];
52
- let trackingIterators = [];
53
- const result = {
54
- // supposed to be used at the component level
55
- trackValue: (cb, options = {}) => {
56
- result.trackValueSelector(void 0, cb, options);
57
- },
58
- trackValueSelector(selector, cb, options = {}) {
59
- const trackedValue = selector ? selector(value) : value;
60
- trackingEffects.push({
61
- cb,
62
- selector,
63
- comparator: options.comparator,
64
- selectedValue: trackedValue
65
- });
66
- if (!options.skipFirstCall) {
67
- if (options.callOnMount) {
68
- onMount(() => {
69
- cb(trackedValue);
70
- });
71
- } else {
72
- cb(trackedValue);
73
- }
74
- }
75
- onUnmount(() => {
76
- trackingEffects = trackingEffects.filter(
77
- (trackingCallback) => trackingCallback.cb !== cb
78
- );
79
- });
80
- },
81
- useValue: (cb, comparator) => {
82
- return result.useValueSelector(void 0, cb, comparator);
83
- },
84
- useValueSelector(selector, cb, comparator = identity) {
85
- const selectedValue = selector ? selector(value) : value;
86
- const returnedNode = cb ? cb(selectedValue) : String(selectedValue);
87
- const node = !returnedNode || typeof returnedNode === "string" ? createTextElement(returnedNode) : returnedNode;
88
- const trackingSelectorElement = {
89
- selector,
90
- selectedValue,
91
- cb,
92
- node,
93
- comparator
94
- };
95
- trackingSelectorElements.push(trackingSelectorElement);
96
- node._privateMethods._addUnmountHandler(() => {
97
- trackingSelectorElements = trackingSelectorElements.filter(
98
- (el) => trackingSelectorElement !== el
99
- );
100
- });
101
- return node;
102
- },
103
- useValueIterator(options, cb) {
104
- const children = [];
105
- const elementsByKey = {};
106
- const elements = options.selector ? options.selector(value) : value;
107
- if (!Array.isArray(elements)) {
108
- console.error("useValueIterator received non-array value");
109
- return null;
110
- }
111
- elements.forEach((element, index) => {
112
- let calculatedKey = "";
113
- if (typeof options.key === "string" && typeof element === "object" && element !== null && options.key in element) {
114
- calculatedKey = element[options.key];
115
- } else if (typeof options.key === "function") {
116
- calculatedKey = options.key({ element, index });
117
- } else {
118
- }
119
- const elementState = createState(element);
120
- if (!calculatedKey) {
121
- return;
122
- }
123
- let node = cb({ elementState, index });
124
- elementsByKey[calculatedKey] = {
125
- node,
126
- index,
127
- elementState
128
- };
129
- children.push([node, calculatedKey, elementState]);
130
- });
131
- const trackingParams = {};
132
- trackingIterators.push(trackingParams);
133
- const wrapperComponent = createElement(() => {
134
- onUnmount(() => {
135
- trackingIterators = trackingIterators.filter(
136
- (currentTrackingParams) => currentTrackingParams !== trackingParams
137
- );
138
- });
139
- return createElement("div", {
140
- phantom: true,
141
- children: children.map((child) => child[0])
142
- });
143
- });
144
- trackingParams.cb = cb;
145
- trackingParams.key = options.key;
146
- trackingParams.elementsByKey = elementsByKey;
147
- trackingParams.renderedElements = children;
148
- trackingParams.wrapperComponent = wrapperComponent;
149
- if (options.selector) {
150
- trackingParams.selector = options.selector;
151
- }
152
- return wrapperComponent;
153
- },
154
- useAttribute: (cb) => {
155
- const attributeValue = cb ? cb(value) : value;
156
- const attributeHelper = (htmlElement, attributeName, node) => {
157
- const trackingElement = { cb, htmlElement, attributeName };
158
- trackingAttributes.push(trackingElement);
159
- node._privateMethods._addUnmountHandler(() => {
160
- trackingAttributes = trackingAttributes.filter(
161
- (trackingAttribute) => trackingAttribute !== trackingElement
162
- );
163
- });
164
- return attributeValue;
165
- };
166
- attributeHelper.velesAttribute = true;
167
- return attributeHelper;
168
- },
169
- // useful for stuff like callbacks
170
- getValue: () => {
171
- return value;
172
- },
173
- getPreviousValue: () => {
174
- return previousValue;
175
- },
176
- // set up new value only through the callback which
177
- // gives the latest value to ensure no outdated data
178
- // can be used for the state
179
- setValue: (newValueCB) => {
180
- const newValue = (
181
- // @ts-expect-error
182
- typeof newValueCB === "function" ? newValueCB(value) : newValueCB
183
- );
184
- if (newValue !== value) {
185
- previousValue = value;
186
- value = newValue;
187
- result._triggerUpdates();
188
- }
189
- },
190
- // TODO: remove it from this object completely
191
- // and access it from closure
192
- _triggerUpdates: () => {
193
- const newTrackingSelectorElements = [];
194
- trackingSelectorElements.forEach((selectorTrackingElement) => {
195
- const { selectedValue, selector, cb, node, comparator } = selectorTrackingElement;
196
- const newSelectedValue = selector ? selector(value) : value;
197
- if (comparator(selectedValue, newSelectedValue)) {
198
- newTrackingSelectorElements.push(selectorTrackingElement);
199
- return;
200
- }
201
- const returnednewNode = cb ? cb(newSelectedValue) : String(newSelectedValue);
202
- const newNode = !returnednewNode || typeof returnednewNode === "string" ? createTextElement(returnednewNode) : returnednewNode;
203
- const { velesElementNode: oldVelesElementNode } = getComponentVelesNode(node);
204
- const { velesElementNode: newVelesElementNode } = getComponentVelesNode(newNode);
205
- const parentVelesElement = oldVelesElementNode.parentVelesElement;
206
- const newTrackingSelectorElement = {
207
- selector,
208
- selectedValue: newSelectedValue,
209
- cb,
210
- node: newNode,
211
- comparator
212
- };
213
- if (parentVelesElement) {
214
- newVelesElementNode.parentVelesElement = parentVelesElement;
215
- parentVelesElement.html.replaceChild(
216
- newVelesElementNode.html,
217
- oldVelesElementNode.html
218
- );
219
- parentVelesElement.childComponents = parentVelesElement.childComponents.map(
220
- (childComponent) => childComponent === node ? newNode : node
221
- );
222
- node._privateMethods._callUnmountHandlers();
223
- callMountHandlers(newNode);
224
- newNode._privateMethods._addUnmountHandler(() => {
225
- trackingSelectorElements = trackingSelectorElements.filter(
226
- (el) => el !== newTrackingSelectorElement
227
- );
228
- });
229
- } else {
230
- console.log("parent node was not found");
231
- }
232
- newTrackingSelectorElements.push(newTrackingSelectorElement);
233
- });
234
- trackingSelectorElements = unique(
235
- trackingSelectorElements.concat(newTrackingSelectorElements)
236
- );
237
- trackingAttributes.forEach(({ cb, htmlElement, attributeName }) => {
238
- const newAttributeValue = cb ? cb(value) : value;
239
- htmlElement.setAttribute(attributeName, newAttributeValue);
240
- });
241
- trackingEffects.forEach((trackingEffect) => {
242
- const { cb, selectedValue, selector, comparator } = trackingEffect;
243
- const newSelectedValue = selector ? selector(value) : value;
244
- if (comparator ? comparator(selectedValue, newSelectedValue) : selectedValue === newSelectedValue) {
245
- return;
246
- }
247
- cb(newSelectedValue);
248
- trackingEffect.selectedValue = newSelectedValue;
249
- });
250
- trackingIterators.forEach((trackingIterator) => {
251
- const {
252
- cb,
253
- key,
254
- renderedElements,
255
- elementsByKey,
256
- wrapperComponent,
257
- selector
258
- } = trackingIterator;
259
- if (!wrapperComponent) {
260
- console.error("there is no wrapper component for the iterator");
261
- return;
262
- }
263
- const { velesElementNode: wrapperVelesElementNode } = getComponentVelesNode(wrapperComponent);
264
- const parentVelesElement = wrapperVelesElementNode.parentVelesElement;
265
- if (!parentVelesElement) {
266
- console.error(
267
- "there is no parent Veles node for the iterator wrapper"
268
- );
269
- return;
270
- }
271
- const elements = selector ? selector(value) : value;
272
- if (Array.isArray(elements)) {
273
- const newRenderedElements = [];
274
- const newElementsByKey = {};
275
- const renderedExistingElements = {};
276
- elements.forEach((element, index) => {
277
- let calculatedKey = "";
278
- if (typeof key === "string" && typeof element === "object" && element !== null && key in element) {
279
- calculatedKey = element[key];
280
- } else if (typeof key === "function") {
281
- calculatedKey = key({ element, index });
282
- } else {
283
- }
284
- if (!calculatedKey) {
285
- return;
286
- }
287
- const existingElement = elementsByKey[calculatedKey];
288
- if (existingElement) {
289
- renderedExistingElements[calculatedKey] = true;
290
- const currentValue = existingElement.elementState.getValue();
291
- if (currentValue !== element) {
292
- existingElement.elementState.setValue(() => element);
293
- }
294
- newRenderedElements.push([
295
- existingElement.node,
296
- calculatedKey,
297
- existingElement.elementState
298
- ]);
299
- newElementsByKey[calculatedKey] = {
300
- elementState: existingElement.elementState,
301
- index,
302
- node: existingElement.node
303
- };
304
- } else {
305
- const elementState = createState(element);
306
- const node = cb({ elementState, index });
307
- newRenderedElements.push([node, calculatedKey, elementState]);
308
- newElementsByKey[calculatedKey] = {
309
- elementState,
310
- index,
311
- node
312
- };
313
- }
314
- });
315
- const positioningOffset = {};
316
- let newElementsCount = 0;
317
- let offset = 0;
318
- let currentElement = null;
319
- newRenderedElements.forEach((newRenderedElement, index) => {
320
- var _a, _b, _c;
321
- if (positioningOffset[index]) {
322
- offset = offset + positioningOffset[index];
323
- }
324
- const [newNode, calculatedKey, newState] = newRenderedElement;
325
- const existingElement = elementsByKey[calculatedKey];
326
- if (existingElement) {
327
- const { velesElementNode: existingElementNode } = getComponentVelesNode(existingElement.node);
328
- if (existingElement.index + offset === index) {
329
- currentElement = existingElementNode.html;
330
- return;
331
- }
332
- if (existingElement.index + offset > index) {
333
- if (currentElement) {
334
- currentElement.after(existingElementNode.html);
335
- positioningOffset[existingElement.index + 1] = -1;
336
- } else {
337
- const firstRenderedElement = (_a = renderedElements[0]) == null ? void 0 : _a[0];
338
- if (firstRenderedElement) {
339
- const { velesElementNode: firstRenderedVelesNode } = getComponentVelesNode(firstRenderedElement);
340
- firstRenderedVelesNode.html.before(
341
- existingElementNode.html
342
- );
343
- } else {
344
- }
345
- }
346
- currentElement = existingElementNode.html;
347
- offset = offset + 1;
348
- } else {
349
- if (currentElement) {
350
- currentElement.after(existingElementNode.html);
351
- positioningOffset[existingElement.index + 1] = 1;
352
- } else {
353
- const firstRenderedElement = (_b = renderedElements[0]) == null ? void 0 : _b[0];
354
- if (firstRenderedElement) {
355
- const { velesElementNode: firstRenderedVelesNode } = getComponentVelesNode(firstRenderedElement);
356
- firstRenderedVelesNode.html.before(
357
- existingElementNode.html
358
- );
359
- } else {
360
- }
361
- }
362
- currentElement = existingElementNode.html;
363
- offset = offset - 1;
364
- }
365
- } else {
366
- const { velesElementNode: newNodeVelesElement } = getComponentVelesNode(newNode);
367
- newNodeVelesElement.parentVelesElement = parentVelesElement;
368
- if (currentElement) {
369
- currentElement.after(newNodeVelesElement.html);
370
- } else {
371
- const firstRenderedElement = (_c = renderedElements[0]) == null ? void 0 : _c[0];
372
- if (firstRenderedElement) {
373
- const { velesElementNode: firstRenderedVelesNode } = getComponentVelesNode(firstRenderedElement);
374
- firstRenderedVelesNode.html.before(newNodeVelesElement.html);
375
- } else {
376
- parentVelesElement.html.prepend(newNodeVelesElement.html);
377
- }
378
- }
379
- offset = offset + 1;
380
- currentElement = newNodeVelesElement.html;
381
- newElementsCount = newElementsCount + 1;
382
- callMountHandlers(newNode);
383
- }
384
- });
385
- if (renderedElements.length === newRenderedElements.length + newElementsCount) {
386
- } else {
387
- renderedElements.forEach(([oldNode, calculatedKey]) => {
388
- if (renderedExistingElements[calculatedKey] === true) {
389
- return;
390
- } else {
391
- const { velesElementNode: oldRenderedVelesNode } = getComponentVelesNode(oldNode);
392
- oldRenderedVelesNode.html.remove();
393
- oldNode._privateMethods._callUnmountHandlers();
394
- if ("velesNode" in wrapperVelesElementNode) {
395
- wrapperVelesElementNode.childComponents = wrapperVelesElementNode.childComponents.filter(
396
- (childComponent) => childComponent !== oldNode
397
- );
398
- } else {
399
- throw new Error("Wrapper iterator element is a string");
400
- }
401
- }
402
- });
403
- }
404
- trackingIterator.renderedElements = newRenderedElements;
405
- trackingIterator.elementsByKey = newElementsByKey;
406
- }
407
- });
408
- }
409
- };
410
- if (subscribeCallback) {
411
- const unsubscribe = subscribeCallback(result.setValue);
412
- if (unsubscribe) {
413
- onUnmount(unsubscribe);
414
- }
415
- }
416
- return result;
417
- }
418
-
419
- // src/hooks/combine-state.ts
420
- function combineState(...states) {
421
- const initialValue = states.map((state) => state.getValue());
422
- const combinedState = createState(initialValue);
423
- states.forEach((state) => {
424
- state.trackValue(() => {
425
- const updatedValue = states.map((state2) => state2.getValue());
426
- combinedState.setValue(updatedValue);
427
- });
428
- });
429
- return combinedState;
430
- }
431
-
432
29
  // src/create-ref.ts
433
30
  function createRef(initialRefValue = null) {
434
31
  return {
@@ -439,7 +36,6 @@ function createRef(initialRefValue = null) {
439
36
  export {
440
37
  Fragment,
441
38
  attachComponent,
442
- combineState,
443
39
  createElement,
444
40
  createRef,
445
41
  createState,
@@ -26,7 +26,7 @@ __export(jsx_runtime_exports, {
26
26
  });
27
27
  module.exports = __toCommonJS(jsx_runtime_exports);
28
28
 
29
- // src/utils.ts
29
+ // src/_utils.ts
30
30
  function getComponentVelesNode(component) {
31
31
  const componentsTree = [];
32
32
  if ("velesStringElement" in component) {
@@ -1,5 +1,5 @@
1
- import { A as AttributeHelper, d as VelesChildren } from './fragment-CHmQ0MhU.cjs';
2
- export { F as Fragment, c as jsx, c as jsxDEV, c as jsxs } from './fragment-CHmQ0MhU.cjs';
1
+ export { F as Fragment, c as jsx, c as jsxDEV, c as jsxs } from './fragment-CU26z590.cjs';
2
+ import { A as AttributeHelper, b as VelesChildren } from './types.d-DgVBp6oa.cjs';
3
3
 
4
4
  // pretty much all the credit goes to Preact JSX type definitions
5
5
  // https://github.com/preactjs/preact/blob/main/src/jsx.d.ts
@@ -1,5 +1,5 @@
1
- import { A as AttributeHelper, d as VelesChildren } from './fragment-CHmQ0MhU.js';
2
- export { F as Fragment, c as jsx, c as jsxDEV, c as jsxs } from './fragment-CHmQ0MhU.js';
1
+ export { F as Fragment, c as jsx, c as jsxDEV, c as jsxs } from './fragment-IVSEC7-Q.js';
2
+ import { A as AttributeHelper, b as VelesChildren } from './types.d-DgVBp6oa.js';
3
3
 
4
4
  // pretty much all the credit goes to Preact JSX type definitions
5
5
  // https://github.com/preactjs/preact/blob/main/src/jsx.d.ts
@@ -1,7 +1,9 @@
1
1
  import {
2
- Fragment,
2
+ Fragment
3
+ } from "./chunk-X6QYYW56.js";
4
+ import {
3
5
  createElement
4
- } from "./chunk-IENMGHS4.js";
6
+ } from "./chunk-ILNLS6QO.js";
5
7
  export {
6
8
  Fragment,
7
9
  createElement as jsx,
@@ -253,10 +253,4 @@ type AttributeHelper<T> = {
253
253
  velesAttribute: boolean;
254
254
  };
255
255
 
256
- declare function createElement(element: string | ComponentFunction, props?: VelesElementProps): VelesElement | VelesComponent;
257
-
258
- declare function Fragment({ children }: {
259
- children: VelesChildren;
260
- }): VelesComponent | VelesElement;
261
-
262
- export { type AttributeHelper as A, Fragment as F, type VelesElement as V, type VelesComponent as a, type VelesStringElement as b, createElement as c, type VelesChildren as d };
256
+ export type { AttributeHelper as A, ComponentFunction as C, VelesElement as V, VelesComponent as a, VelesChildren as b, VelesElementProps as c, VelesStringElement as d };
@@ -253,10 +253,4 @@ type AttributeHelper<T> = {
253
253
  velesAttribute: boolean;
254
254
  };
255
255
 
256
- declare function createElement(element: string | ComponentFunction, props?: VelesElementProps): VelesElement | VelesComponent;
257
-
258
- declare function Fragment({ children }: {
259
- children: VelesChildren;
260
- }): VelesComponent | VelesElement;
261
-
262
- export { type AttributeHelper as A, Fragment as F, type VelesElement as V, type VelesComponent as a, type VelesStringElement as b, createElement as c, type VelesChildren as d };
256
+ export type { AttributeHelper as A, ComponentFunction as C, VelesElement as V, VelesComponent as a, VelesChildren as b, VelesElementProps as c, VelesStringElement as d };