@kubb/react-fabric 0.0.0 → 0.1.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/devtools.cjs +154 -85
- package/dist/devtools.cjs.map +1 -1
- package/dist/devtools.js +154 -85
- package/dist/devtools.js.map +1 -1
- package/dist/{globals-C6rGETh5.d.ts → globals-BQ_tJj2b.d.ts} +3 -3
- package/dist/{globals-CnATk-Sl.d.cts → globals-C-9ezLk9.d.cts} +3 -3
- package/dist/globals.d.cts +2 -2
- package/dist/globals.d.ts +2 -2
- package/dist/index.cjs +47 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -52
- package/dist/index.d.ts +63 -52
- package/dist/index.js +47 -72
- package/dist/index.js.map +1 -1
- package/dist/jsx-runtime.cjs +15 -7
- package/dist/jsx-runtime.cjs.map +1 -0
- package/dist/{jsx-dev-runtime.d.ts → jsx-runtime.d.cts} +3 -3
- package/dist/{jsx-dev-runtime.d.cts → jsx-runtime.d.ts} +3 -3
- package/dist/jsx-runtime.js +12 -4
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/{types-C3p0Ljxf.d.cts → types-CUKR3KZn.d.cts} +1 -1
- package/dist/{types-DEroxUW0.d.ts → types-D9OfSq91.d.ts} +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +9 -7
- package/src/ReactTemplate.tsx +22 -24
- package/src/components/Const.tsx +4 -17
- package/src/components/File.tsx +1 -1
- package/src/components/Function.tsx +6 -38
- package/src/components/Root.tsx +5 -9
- package/src/components/Type.tsx +1 -7
- package/src/{hooks → composables}/useApp.ts +2 -2
- package/src/createApp.ts +4 -9
- package/src/dom.ts +5 -3
- package/src/globals.ts +1 -1
- package/src/index.ts +3 -4
- package/src/utils/processFiles.ts +1 -1
- package/src/utils/squashExportNodes.ts +1 -1
- package/src/utils/squashImportNodes.ts +1 -1
- package/src/utils/squashSourceNodes.ts +1 -1
- package/dist/jsx-dev-runtime.cjs +0 -9
- package/dist/jsx-dev-runtime.js +0 -6
- package/dist/jsx-runtime-DmD5u6a-.js +0 -13
- package/dist/jsx-runtime-DmD5u6a-.js.map +0 -1
- package/dist/jsx-runtime-zKfRQHQD.cjs +0 -36
- package/dist/jsx-runtime-zKfRQHQD.cjs.map +0 -1
- package/src/components/Text.tsx +0 -31
- package/src/utils/throttle.ts +0 -30
- /package/src/{hooks → composables}/useFile.ts +0 -0
- /package/src/{hooks → composables}/useLifecycle.tsx +0 -0
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const require_react = require('./react-Bq0UOw6S.cjs');
|
|
2
|
-
const require_jsx_runtime$1 = require('./jsx-runtime-B3MMb3PL.cjs');
|
|
3
|
-
|
|
4
|
-
//#region src/jsx-runtime.ts
|
|
5
|
-
var import_jsx_runtime = /* @__PURE__ */ require_react.__toESM(require_jsx_runtime$1.require_jsx_runtime(), 1);
|
|
6
|
-
const Fragment = import_jsx_runtime.Fragment;
|
|
7
|
-
const jsx = import_jsx_runtime.jsx;
|
|
8
|
-
const jsxs = import_jsx_runtime.jsxs;
|
|
9
|
-
const jsxDEV = import_jsx_runtime.jsx;
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
Object.defineProperty(exports, 'Fragment', {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return Fragment;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, 'jsx', {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return jsx;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, 'jsxDEV', {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return jsxDEV;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, 'jsxs', {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return jsxs;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
//# sourceMappingURL=jsx-runtime-zKfRQHQD.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-runtime-zKfRQHQD.cjs","names":[],"sources":["../src/jsx-runtime.ts"],"sourcesContent":["import './globals.ts'\n\nimport ReactJSXRuntime from 'react/jsx-runtime'\n\nexport const Fragment = ReactJSXRuntime.Fragment\nexport const jsx = ReactJSXRuntime.jsx\nexport const jsxs = ReactJSXRuntime.jsxs\nexport const jsxDEV = ReactJSXRuntime.jsx\n"],"mappings":";;;;;AAIA,MAAa,8BAA2B;AACxC,MAAa,yBAAsB;AACnC,MAAa,0BAAuB;AACpC,MAAa,4BAAyB"}
|
package/src/components/Text.tsx
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Key, KubbNode } from '../types.ts'
|
|
2
|
-
|
|
3
|
-
type Props = {
|
|
4
|
-
key?: Key
|
|
5
|
-
/**
|
|
6
|
-
* Change the indent.
|
|
7
|
-
* @default 0
|
|
8
|
-
* @deprecated
|
|
9
|
-
*/
|
|
10
|
-
indentSize?: number
|
|
11
|
-
children?: KubbNode
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated
|
|
16
|
-
*/
|
|
17
|
-
export function Text({ children }: Props) {
|
|
18
|
-
return <kubb-text>{children}</kubb-text>
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
type SpaceProps = {}
|
|
22
|
-
|
|
23
|
-
Text.displayName = 'KubbText'
|
|
24
|
-
|
|
25
|
-
export function Space({}: SpaceProps) {
|
|
26
|
-
return <kubb-text> </kubb-text>
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
Space.displayName = 'KubbSpace'
|
|
30
|
-
|
|
31
|
-
Text.Space = Space
|
package/src/utils/throttle.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export const throttle = <R, A extends any[]>(fn: (...args: A) => R, delay: number): [(...args: A) => R | undefined, () => void] => {
|
|
2
|
-
let wait = false
|
|
3
|
-
let timeout: NodeJS.Timeout
|
|
4
|
-
let cancelled = false
|
|
5
|
-
|
|
6
|
-
return [
|
|
7
|
-
(...args: A) => {
|
|
8
|
-
if (cancelled) {
|
|
9
|
-
return undefined
|
|
10
|
-
}
|
|
11
|
-
if (wait) {
|
|
12
|
-
return undefined
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const val = fn(...args)
|
|
16
|
-
|
|
17
|
-
wait = true
|
|
18
|
-
|
|
19
|
-
timeout = setTimeout(() => {
|
|
20
|
-
wait = false
|
|
21
|
-
}, delay) as NodeJS.Timeout
|
|
22
|
-
|
|
23
|
-
return val
|
|
24
|
-
},
|
|
25
|
-
() => {
|
|
26
|
-
cancelled = true
|
|
27
|
-
clearTimeout(timeout)
|
|
28
|
-
},
|
|
29
|
-
]
|
|
30
|
-
}
|
|
File without changes
|
|
File without changes
|