@b9g/crank 0.4.0 → 0.4.3
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/README.md +15 -15
- package/crank.cjs +5 -2
- package/crank.cjs.map +1 -1
- package/crank.d.ts +8 -4
- package/crank.js +5 -3
- package/crank.js.map +1 -1
- package/dom.cjs +18 -13
- package/dom.cjs.map +1 -1
- package/dom.d.ts +1 -1
- package/dom.js +18 -13
- package/dom.js.map +1 -1
- package/html.cjs +10 -2
- package/html.cjs.map +1 -1
- package/html.d.ts +1 -1
- package/html.js +10 -2
- package/html.js.map +1 -1
- package/index.cjs +1 -0
- package/index.cjs.map +1 -1
- package/index.d.ts +2 -1
- package/index.js +1 -1
- package/package.json +7 -9
- package/umd.d.ts +3 -3
- package/umd.js +28 -16
- package/umd.js.map +1 -1
package/crank.d.ts
CHANGED
|
@@ -217,7 +217,7 @@ declare class Retainer<TNode> {
|
|
|
217
217
|
/**
|
|
218
218
|
* The value associated with this element.
|
|
219
219
|
*/
|
|
220
|
-
value: TNode
|
|
220
|
+
value: ElementValue<TNode>;
|
|
221
221
|
/**
|
|
222
222
|
* The cached child values of this element. Only host and component elements
|
|
223
223
|
* will use this property.
|
|
@@ -279,7 +279,7 @@ export interface RendererImpl<TNode, TScope, TRoot extends TNode = TNode, TResul
|
|
|
279
279
|
*
|
|
280
280
|
* @returns The parsed node or string.
|
|
281
281
|
*/
|
|
282
|
-
parse(text: string, scope: TScope | undefined): TNode
|
|
282
|
+
parse(text: string, scope: TScope | undefined): ElementValue<TNode>;
|
|
283
283
|
patch<TTag extends string | symbol, TName extends string>(tag: TTag, node: TNode, name: TName, value: TagProps<TTag>[TName], oldValue: TagProps<TTag>[TName] | undefined, scope: TScope): unknown;
|
|
284
284
|
arrange<TTag extends string | symbol>(tag: TTag, node: TNode, props: TagProps<TTag>, children: Array<TNode | string>, oldProps: TagProps<TTag> | undefined, oldChildren: Array<TNode | string> | undefined): unknown;
|
|
285
285
|
dispose<TTag extends string | symbol>(tag: TTag, node: TNode, props: TagProps<TTag>): unknown;
|
|
@@ -484,7 +484,7 @@ declare type MappedEventListenerOrEventListenerObject<T extends string> = Mapped
|
|
|
484
484
|
handleEvent: MappedEventListener<T>;
|
|
485
485
|
};
|
|
486
486
|
declare global {
|
|
487
|
-
|
|
487
|
+
namespace Crank {
|
|
488
488
|
interface EventMap {
|
|
489
489
|
}
|
|
490
490
|
interface ProvisionMap {
|
|
@@ -501,4 +501,8 @@ declare global {
|
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
|
|
504
|
+
declare const _default: {
|
|
505
|
+
createElement: typeof createElement;
|
|
506
|
+
Fragment: string;
|
|
507
|
+
};
|
|
508
|
+
export default _default;
|
package/crank.js
CHANGED
|
@@ -123,7 +123,6 @@ function createElement(tag, props, ...children) {
|
|
|
123
123
|
let static_ = false;
|
|
124
124
|
const props1 = {};
|
|
125
125
|
if (props != null) {
|
|
126
|
-
// TODO: deprecate crank-whatever props
|
|
127
126
|
for (const name in props) {
|
|
128
127
|
switch (name) {
|
|
129
128
|
case "crank-key":
|
|
@@ -1631,7 +1630,10 @@ function propagateError(ctx, err) {
|
|
|
1631
1630
|
return result.catch((err) => propagateError(ctx.parent, err));
|
|
1632
1631
|
}
|
|
1633
1632
|
return result;
|
|
1634
|
-
}
|
|
1633
|
+
}
|
|
1634
|
+
// Some JSX transpilation tools expect these functions to be defined on the
|
|
1635
|
+
// default export. Prefer named exports when importing directly.
|
|
1636
|
+
var crank = { createElement, Fragment };
|
|
1635
1637
|
|
|
1636
|
-
export { Context, Copy, Element, Fragment, Portal, Raw, Renderer, cloneElement, createElement, isElement };
|
|
1638
|
+
export { Context, Copy, Element, Fragment, Portal, Raw, Renderer, cloneElement, createElement, crank as default, isElement };
|
|
1637
1639
|
//# sourceMappingURL=crank.js.map
|