@cleanweb/oore 2.0.0-alpha.21 → 2.0.0-alpha.23
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/build/_cjs/base/index.d.ts +3 -3
- package/build/_cjs/base/index.js +3 -3
- package/build/_cjs/base/state/class-types.d.ts +2 -2
- package/build/_cjs/base/state/class.d.ts +1 -1
- package/build/_cjs/base/state/hook-types.d.ts +1 -1
- package/build/_cjs/base/state/hooks.d.ts +1 -1
- package/build/_cjs/base/state/hooks.js +1 -1
- package/build/_cjs/base/state/index.d.ts +5 -5
- package/build/_cjs/base/state/index.js +3 -3
- package/build/_cjs/classy/class/index.d.ts +3 -3
- package/build/_cjs/classy/class/index.js +3 -3
- package/build/_cjs/classy/class/types/extractor.d.ts +1 -1
- package/build/_cjs/classy/index.d.ts +3 -3
- package/build/_cjs/classy/index.js +3 -3
- package/build/_cjs/classy/instance/index.d.ts +3 -3
- package/build/_cjs/classy/instance/index.js +3 -3
- package/build/_cjs/classy/instance/mount-callbacks.d.ts +1 -1
- package/build/_cjs/classy/instance/mount-callbacks.js +1 -1
- package/build/_cjs/classy/instance/types/hook.d.ts +1 -1
- package/build/_cjs/classy/logic/index.d.ts +2 -2
- package/build/_cjs/classy/logic/index.js +1 -1
- package/build/_cjs/classy/logic/types/hook.d.ts +1 -1
- package/build/_cjs/docs-src/api/base-classes.d.ts +3 -3
- package/build/_cjs/docs-src/api/base-classes.js +3 -3
- package/build/_cjs/docs-src/api/index.d.ts +8 -8
- package/build/_cjs/docs-src/api/index.js +8 -8
- package/build/_cjs/docs-src/api/references.d.ts +5 -5
- package/build/_cjs/docs-src/api/references.js +5 -5
- package/build/_cjs/helpers/index.d.ts +4 -4
- package/build/_cjs/helpers/index.js +4 -4
- package/build/_cjs/helpers/rerender.js +1 -1
- package/build/_cjs/helpers/use-component/index.d.ts +1 -1
- package/build/_cjs/index.d.ts +3 -3
- package/build/_cjs/index.js +3 -3
- package/build/_cjs/slots/hook.d.ts +2 -2
- package/build/_cjs/slots/hook.js +1 -1
- package/build/_cjs/slots/index.d.ts +1 -1
- package/build/_cjs/slots/index.js +1 -1
- package/build/base/index.d.ts +3 -3
- package/build/base/index.js +3 -19
- package/build/base/merged-state.js +4 -8
- package/build/base/methods.js +5 -9
- package/build/base/state/class-types.d.ts +2 -2
- package/build/base/state/class-types.js +1 -2
- package/build/base/state/class.d.ts +1 -1
- package/build/base/state/class.js +5 -9
- package/build/base/state/hook-types.d.ts +1 -1
- package/build/base/state/hook-types.js +1 -2
- package/build/base/state/hooks.d.ts +1 -1
- package/build/base/state/hooks.js +7 -11
- package/build/base/state/index.d.ts +5 -5
- package/build/base/state/index.js +3 -31
- package/build/classy/class/index.d.ts +3 -3
- package/build/classy/class/index.js +16 -20
- package/build/classy/class/types/extractor.d.ts +1 -1
- package/build/classy/class/types/extractor.js +1 -2
- package/build/classy/class/utils/function-name.js +1 -5
- package/build/classy/index.d.ts +3 -3
- package/build/classy/index.js +3 -19
- package/build/classy/instance/index.d.ts +3 -3
- package/build/classy/instance/index.js +11 -16
- package/build/classy/instance/mount-callbacks.d.ts +1 -1
- package/build/classy/instance/mount-callbacks.js +5 -9
- package/build/classy/instance/types/hook.d.ts +1 -1
- package/build/classy/instance/types/hook.js +1 -2
- package/build/classy/logic/index.d.ts +2 -2
- package/build/classy/logic/index.js +7 -12
- package/build/classy/logic/types/hook.d.ts +1 -1
- package/build/classy/logic/types/hook.js +1 -2
- package/build/docs-src/api/base-classes.d.ts +3 -3
- package/build/docs-src/api/base-classes.js +3 -9
- package/build/docs-src/api/index.d.ts +8 -8
- package/build/docs-src/api/index.js +8 -39
- package/build/docs-src/api/references.d.ts +5 -5
- package/build/docs-src/api/references.js +5 -31
- package/build/helpers/errors.js +1 -5
- package/build/helpers/index.d.ts +4 -4
- package/build/helpers/index.js +5 -23
- package/build/helpers/mount-state.js +4 -8
- package/build/helpers/rerender.js +7 -11
- package/build/helpers/type-guards.js +1 -5
- package/build/helpers/use-component/index.d.ts +1 -1
- package/build/helpers/use-component/index.js +3 -7
- package/build/helpers/use-component/types.js +1 -2
- package/build/index.d.ts +3 -3
- package/build/index.js +3 -19
- package/build/slots/hook.d.ts +2 -2
- package/build/slots/hook.js +15 -45
- package/build/slots/index.d.ts +1 -1
- package/build/slots/index.js +1 -17
- package/build/slots/types.js +1 -2
- package/build/tsconfig.json +6 -2
- package/package.json +1 -1
package/build/helpers/errors.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.throwDevError = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* Throw an error with the provided message
|
|
6
3
|
* only when `NODE_ENV` is *not* 'production'.
|
|
@@ -10,7 +7,7 @@ exports.throwDevError = void 0;
|
|
|
10
7
|
* Useful for enforcing certain conditions in development
|
|
11
8
|
* while failing more gracefully in production.
|
|
12
9
|
*/
|
|
13
|
-
const throwDevError = (message) => {
|
|
10
|
+
export const throwDevError = (message) => {
|
|
14
11
|
if (process.env.NODE_ENV === 'production') {
|
|
15
12
|
console.warn(message);
|
|
16
13
|
}
|
|
@@ -18,4 +15,3 @@ const throwDevError = (message) => {
|
|
|
18
15
|
throw new Error(message);
|
|
19
16
|
}
|
|
20
17
|
};
|
|
21
|
-
exports.throwDevError = throwDevError;
|
package/build/helpers/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* <!-- @ mergeModuleWith API -->
|
|
3
3
|
* @module Helpers
|
|
4
4
|
*/
|
|
5
|
-
export * from './mount-state';
|
|
6
|
-
export * from './rerender';
|
|
7
|
-
export * from './use-component';
|
|
8
|
-
export * from './type-guards';
|
|
5
|
+
export * from './mount-state.js';
|
|
6
|
+
export * from './rerender.js';
|
|
7
|
+
export * from './use-component/index.js';
|
|
8
|
+
export * from './type-guards.js';
|
|
9
9
|
/**
|
|
10
10
|
* An empty function.
|
|
11
11
|
* It returns (void) without performing any operations.
|
package/build/helpers/index.js
CHANGED
|
@@ -1,31 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* <!-- @ mergeModuleWith API -->
|
|
4
3
|
* @module Helpers
|
|
5
4
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(o, k2, desc);
|
|
13
|
-
}) : (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.noOp = void 0;
|
|
22
|
-
__exportStar(require("./mount-state"), exports);
|
|
23
|
-
__exportStar(require("./rerender"), exports);
|
|
24
|
-
__exportStar(require("./use-component"), exports);
|
|
25
|
-
__exportStar(require("./type-guards"), exports);
|
|
5
|
+
export * from './mount-state.js';
|
|
6
|
+
export * from './rerender.js';
|
|
7
|
+
export * from './use-component/index.js';
|
|
8
|
+
export * from './type-guards.js';
|
|
26
9
|
/**
|
|
27
10
|
* An empty function.
|
|
28
11
|
* It returns (void) without performing any operations.
|
|
29
12
|
*/
|
|
30
|
-
const noOp = () => { };
|
|
31
|
-
exports.noOp = noOp;
|
|
13
|
+
export const noOp = () => { };
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useMountState = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
5
2
|
/**
|
|
6
3
|
* Returns a value that is false before the component has been mounted,
|
|
7
4
|
* then true during all subsequent rerenders.
|
|
8
5
|
*/
|
|
9
|
-
const useMountState = () => {
|
|
6
|
+
export const useMountState = () => {
|
|
10
7
|
/**
|
|
11
8
|
* This must not be a state value. It should not be the cause of a rerender.
|
|
12
9
|
* It merely provides information about the render count,
|
|
13
10
|
* without influencing that count itself.
|
|
14
11
|
* So `mounted` should never be created with `useState`.
|
|
15
12
|
*/
|
|
16
|
-
const mounted =
|
|
17
|
-
|
|
13
|
+
const mounted = useRef(false);
|
|
14
|
+
useEffect(() => {
|
|
18
15
|
mounted.current = true;
|
|
19
16
|
return () => {
|
|
20
17
|
mounted.current = false;
|
|
@@ -22,4 +19,3 @@ const useMountState = () => {
|
|
|
22
19
|
}, []);
|
|
23
20
|
return () => mounted.current;
|
|
24
21
|
};
|
|
25
|
-
exports.useMountState = useMountState;
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.useRerender = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const mount_state_1 = require("../helpers/mount-state");
|
|
1
|
+
import { useCallback, useRef, useState } from 'react';
|
|
2
|
+
import { useMountState } from '../helpers/mount-state.js';
|
|
6
3
|
;
|
|
7
4
|
/**
|
|
8
5
|
* Returns a function that can be called to manually trigger
|
|
9
6
|
* a rerender of your component.
|
|
10
7
|
*/
|
|
11
|
-
const useRerender = () => {
|
|
12
|
-
const isMounted =
|
|
13
|
-
const renderCount =
|
|
14
|
-
const [, forceRerender] =
|
|
8
|
+
export const useRerender = () => {
|
|
9
|
+
const isMounted = useMountState();
|
|
10
|
+
const renderCount = useRef(0);
|
|
11
|
+
const [, forceRerender] = useState(renderCount.current);
|
|
15
12
|
renderCount.current++;
|
|
16
|
-
const rerender =
|
|
13
|
+
const rerender = useCallback(() => {
|
|
17
14
|
let resolve;
|
|
18
15
|
const promise = new Promise((_r) => resolve = _r);
|
|
19
16
|
const execute = () => {
|
|
@@ -39,4 +36,3 @@ const useRerender = () => {
|
|
|
39
36
|
refresher.currentCount = renderCount.current;
|
|
40
37
|
return refresher;
|
|
41
38
|
};
|
|
42
|
-
exports.useRerender = useRerender;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.canIndex = void 0;
|
|
4
|
-
const canIndex = (key, targetObject) => {
|
|
1
|
+
export const canIndex = (key, targetObject) => {
|
|
5
2
|
const test = typeof key === 'number' ? `${key}` : key;
|
|
6
3
|
return Reflect.ownKeys(targetObject).includes(test);
|
|
7
4
|
};
|
|
8
|
-
exports.canIndex = canIndex;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Use = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
1
|
+
import { useEffect } from 'react';
|
|
5
2
|
/**
|
|
6
3
|
* A component you can use to consume React hooks
|
|
7
4
|
* in a {@link Component | React.Component} class.
|
|
8
5
|
*/
|
|
9
|
-
const Use = (params) => {
|
|
6
|
+
export const Use = (params) => {
|
|
10
7
|
const { hook: useGenericHook, argumentsList, onUpdate } = params;
|
|
11
8
|
const output = useGenericHook(...argumentsList);
|
|
12
|
-
|
|
9
|
+
useEffect(() => {
|
|
13
10
|
onUpdate(output);
|
|
14
11
|
}, [output]);
|
|
15
12
|
return null;
|
|
16
13
|
};
|
|
17
|
-
exports.Use = Use;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/build/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './classy';
|
|
2
|
-
export * from './base';
|
|
3
|
-
export * from './helpers';
|
|
1
|
+
export * from './classy/index.js';
|
|
2
|
+
export * from './base/index.js';
|
|
3
|
+
export * from './helpers/index.js';
|
package/build/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./classy"), exports);
|
|
18
|
-
__exportStar(require("./base"), exports);
|
|
19
|
-
__exportStar(require("./helpers"), exports);
|
|
1
|
+
export * from './classy/index.js';
|
|
2
|
+
export * from './base/index.js';
|
|
3
|
+
export * from './helpers/index.js';
|
package/build/slots/hook.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode, ReactPortal } from 'react';
|
|
2
|
-
import type { IUseSlots, PotentialSlotComponent } from './types';
|
|
2
|
+
import type { IUseSlots, PotentialSlotComponent } from './types.js';
|
|
3
3
|
export declare const isElementChild: (child: ReactNode) => child is ReactElement<any, any>;
|
|
4
4
|
interface IGetSlotName {
|
|
5
5
|
(TargetComponent: PotentialSlotComponent, child?: ReactElement): string | undefined;
|
|
@@ -17,4 +17,4 @@ export declare const isPortalChild: (child: ReactNode) => child is ReactPortal;
|
|
|
17
17
|
* @see {@link SlotComponent} for more on how to use the returned slot nodes.
|
|
18
18
|
*/
|
|
19
19
|
export declare const useSlots: IUseSlots;
|
|
20
|
-
export type { SlottedComponent, TSlotsRecord, SlotComponent, PotentialSlotComponent, } from './types';
|
|
20
|
+
export type { SlottedComponent, TSlotsRecord, SlotComponent, PotentialSlotComponent, } from './types.js';
|
package/build/slots/hook.js
CHANGED
|
@@ -1,39 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.useSlots = exports.isPortalChild = exports.getComponentSlotName = exports.isElementChild = void 0;
|
|
27
|
-
const errors_1 = require("../helpers/errors");
|
|
28
|
-
const react_1 = __importStar(require("react"));
|
|
29
|
-
const isElementChild = (child) => {
|
|
1
|
+
import { throwDevError } from '../helpers/errors.js';
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
export const isElementChild = (child) => {
|
|
30
4
|
if (child && typeof child === 'object' && 'type' in child) {
|
|
31
5
|
return true;
|
|
32
6
|
}
|
|
33
7
|
return false;
|
|
34
8
|
};
|
|
35
|
-
|
|
36
|
-
const getComponentSlotName = (TargetComponent, child) => {
|
|
9
|
+
export const getComponentSlotName = (TargetComponent, child) => {
|
|
37
10
|
if (child) {
|
|
38
11
|
const keyTypes = ['string', 'number', 'symbol'];
|
|
39
12
|
const slotName = child.props['data-slot-name'];
|
|
@@ -52,13 +25,11 @@ const getComponentSlotName = (TargetComponent, child) => {
|
|
|
52
25
|
}
|
|
53
26
|
return undefined;
|
|
54
27
|
};
|
|
55
|
-
|
|
56
|
-
const isPortalChild = (child) => {
|
|
28
|
+
export const isPortalChild = (child) => {
|
|
57
29
|
return (!!child
|
|
58
30
|
&& typeof child === 'object'
|
|
59
31
|
&& 'children' in child);
|
|
60
32
|
};
|
|
61
|
-
exports.isPortalChild = isPortalChild;
|
|
62
33
|
/**
|
|
63
34
|
* Groups `children` prop into predefined slots.
|
|
64
35
|
*
|
|
@@ -69,14 +40,14 @@ exports.isPortalChild = isPortalChild;
|
|
|
69
40
|
*
|
|
70
41
|
* @see {@link SlotComponent} for more on how to use the returned slot nodes.
|
|
71
42
|
*/
|
|
72
|
-
const useSlots = (children, Caller) => {
|
|
73
|
-
const slotsAliasLookup =
|
|
43
|
+
export const useSlots = (children, Caller) => {
|
|
44
|
+
const slotsAliasLookup = useMemo(() => {
|
|
74
45
|
const entries = Object.entries(Caller.Slots);
|
|
75
46
|
const aliasLookup = {};
|
|
76
47
|
entries.forEach(([alias, RegisteredSlotComponent]) => {
|
|
77
|
-
const slotName =
|
|
48
|
+
const slotName = getComponentSlotName(RegisteredSlotComponent);
|
|
78
49
|
if (!slotName) {
|
|
79
|
-
|
|
50
|
+
throwDevError(`A registered slot component did not have a slot name. All components registered as slots must either be a string tag-name or a React component with either "slotName" or "displayName". The affected component was: ${RegisteredSlotComponent}`);
|
|
80
51
|
return;
|
|
81
52
|
}
|
|
82
53
|
aliasLookup[slotName] = alias;
|
|
@@ -84,7 +55,7 @@ const useSlots = (children, Caller) => {
|
|
|
84
55
|
return aliasLookup;
|
|
85
56
|
}, [Caller.Slots]);
|
|
86
57
|
// @todo Expose original source order of `children` with respect to slot aliases.
|
|
87
|
-
const result =
|
|
58
|
+
const result = useMemo(() => {
|
|
88
59
|
var _a;
|
|
89
60
|
const slotNodes = {};
|
|
90
61
|
const unmatchedChildren = [];
|
|
@@ -92,27 +63,27 @@ const useSlots = (children, Caller) => {
|
|
|
92
63
|
const requiredSlotAliases = [
|
|
93
64
|
...((_a = Caller.requiredSlotAliases) !== null && _a !== void 0 ? _a : [])
|
|
94
65
|
];
|
|
95
|
-
|
|
66
|
+
React.Children.forEach(children, (_child) => {
|
|
96
67
|
var _a;
|
|
97
68
|
const child = _child;
|
|
98
69
|
if (!child) {
|
|
99
70
|
invalidChildren.push(child);
|
|
100
71
|
return;
|
|
101
72
|
}
|
|
102
|
-
if (!
|
|
73
|
+
if (!React.isValidElement(child)) {
|
|
103
74
|
console.warn(`Invalid node found in JSX children while parsing slots. Got: "${child}".`);
|
|
104
75
|
invalidChildren.push(child);
|
|
105
76
|
return;
|
|
106
77
|
}
|
|
107
78
|
;
|
|
108
79
|
// @todo Check for fragment
|
|
109
|
-
if (!
|
|
80
|
+
if (!isElementChild(child)) {
|
|
110
81
|
unmatchedChildren.push(child);
|
|
111
82
|
return;
|
|
112
83
|
}
|
|
113
84
|
const slotAlias = (() => {
|
|
114
85
|
var _a;
|
|
115
|
-
const slotName =
|
|
86
|
+
const slotName = getComponentSlotName(child.type, child);
|
|
116
87
|
return slotName ? (_a = slotsAliasLookup[slotName]) !== null && _a !== void 0 ? _a : null : null;
|
|
117
88
|
})();
|
|
118
89
|
if (slotAlias) {
|
|
@@ -133,11 +104,10 @@ const useSlots = (children, Caller) => {
|
|
|
133
104
|
});
|
|
134
105
|
requiredSlotAliases.forEach((slotAlias) => {
|
|
135
106
|
if (!slotNodes[slotAlias]) {
|
|
136
|
-
|
|
107
|
+
throwDevError(`Missing required slot "${String(slotAlias)}".`);
|
|
137
108
|
}
|
|
138
109
|
});
|
|
139
110
|
return [slotNodes, unmatchedChildren, invalidChildren];
|
|
140
111
|
}, [children]);
|
|
141
112
|
return result;
|
|
142
113
|
};
|
|
143
|
-
exports.useSlots = useSlots;
|
package/build/slots/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './hook';
|
|
1
|
+
export * from './hook.js';
|
package/build/slots/index.js
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./hook"), exports);
|
|
1
|
+
export * from './hook.js';
|
package/build/slots/types.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/build/tsconfig.json
CHANGED
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"forceConsistentCasingInFileNames": true,
|
|
24
24
|
"incremental": false,
|
|
25
25
|
"esModuleInterop": true,
|
|
26
|
-
"module": "
|
|
27
|
-
"moduleResolution": "
|
|
26
|
+
"module": "esnext",
|
|
27
|
+
"moduleResolution": "bundler",
|
|
28
28
|
"resolveJsonModule": true,
|
|
29
29
|
"isolatedModules": true,
|
|
30
30
|
"jsx": "react-jsx",
|
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
"strictBindCallApply": true,
|
|
36
36
|
"exactOptionalPropertyTypes": true,
|
|
37
37
|
},
|
|
38
|
+
"tsc-alias": {
|
|
39
|
+
"resolveFullPaths": true,
|
|
40
|
+
"resolveFullExtension": ".js"
|
|
41
|
+
},
|
|
38
42
|
"include": [
|
|
39
43
|
"./globals.d.ts",
|
|
40
44
|
"**/*.ts",
|
package/package.json
CHANGED