@visactor/react-vrender 0.9.0-alpha.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.
Files changed (52) hide show
  1. package/README.md +9 -0
  2. package/cjs/Stage.d.ts +9 -0
  3. package/cjs/Stage.js +63 -0
  4. package/cjs/Stage.js.map +1 -0
  5. package/cjs/host-elements.d.ts +34 -0
  6. package/cjs/host-elements.js +23 -0
  7. package/cjs/host-elements.js.map +1 -0
  8. package/cjs/hostConfig.d.ts +7 -0
  9. package/cjs/hostConfig.js +153 -0
  10. package/cjs/hostConfig.js.map +1 -0
  11. package/cjs/index.d.ts +3 -0
  12. package/cjs/index.js +22 -0
  13. package/cjs/index.js.map +1 -0
  14. package/cjs/processProps.d.ts +54 -0
  15. package/cjs/processProps.js +83 -0
  16. package/cjs/processProps.js.map +1 -0
  17. package/cjs/types.d.ts +62 -0
  18. package/cjs/types.js +6 -0
  19. package/cjs/types.js.map +1 -0
  20. package/cjs/util/debug.d.ts +2 -0
  21. package/cjs/util/debug.js +10 -0
  22. package/cjs/util/debug.js.map +1 -0
  23. package/cjs/util/index.d.ts +2 -0
  24. package/cjs/util/index.js +14 -0
  25. package/cjs/util/index.js.map +1 -0
  26. package/dist/reactvrender.js.js +15 -0
  27. package/dist/reactvrender.js.min.js +15 -0
  28. package/es/Stage.d.ts +9 -0
  29. package/es/Stage.js +59 -0
  30. package/es/Stage.js.map +1 -0
  31. package/es/host-elements.d.ts +34 -0
  32. package/es/host-elements.js +45 -0
  33. package/es/host-elements.js.map +1 -0
  34. package/es/hostConfig.d.ts +7 -0
  35. package/es/hostConfig.js +146 -0
  36. package/es/hostConfig.js.map +1 -0
  37. package/es/index.d.ts +3 -0
  38. package/es/index.js +6 -0
  39. package/es/index.js.map +1 -0
  40. package/es/processProps.d.ts +54 -0
  41. package/es/processProps.js +74 -0
  42. package/es/processProps.js.map +1 -0
  43. package/es/types.d.ts +62 -0
  44. package/es/types.js +2 -0
  45. package/es/types.js.map +1 -0
  46. package/es/util/debug.d.ts +2 -0
  47. package/es/util/debug.js +8 -0
  48. package/es/util/debug.js.map +1 -0
  49. package/es/util/index.d.ts +2 -0
  50. package/es/util/index.js +6 -0
  51. package/es/util/index.js.map +1 -0
  52. package/package.json +49 -0
@@ -0,0 +1,8 @@
1
+ export const log = __DEV__ ? (...args) => {
2
+ console.log(...args);
3
+ } : () => {};
4
+
5
+ export const error = __DEV__ ? errorMsg => {
6
+ throw new Error(errorMsg);
7
+ } : () => {};
8
+ //# sourceMappingURL=debug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/util/debug.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,GAAG,GAAG,OAAO;IACxB,CAAC,CAAC,CAAC,GAAG,IAAW,EAAE,EAAE;QAEjB,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IACvB,CAAC;IACH,CAAC,CAAC,GAAG,EAAE;QACH,OAAO;IACT,CAAC,CAAC;AAEN,MAAM,CAAC,MAAM,KAAK,GAAG,OAAO;IAC1B,CAAC,CAAC,CAAC,QAAgB,EAAE,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IACH,CAAC,CAAC,GAAG,EAAE;QACH,OAAO;IACT,CAAC,CAAC","file":"debug.js","sourcesContent":["declare const __DEV__: boolean;\n\nexport const log = __DEV__\n ? (...args: any[]) => {\n // eslint-disable-next-line no-console\n console.log(...args);\n }\n : () => {\n return;\n };\n\nexport const error = __DEV__\n ? (errorMsg: string) => {\n throw new Error(errorMsg);\n }\n : () => {\n return;\n };\n"]}
@@ -0,0 +1,2 @@
1
+ import type React from 'react';
2
+ export declare function assertRef<T>(forwardedRef: any): asserts forwardedRef is React.MutableRefObject<T>;
@@ -0,0 +1,6 @@
1
+ import { error } from "./debug";
2
+
3
+ export function assertRef(forwardedRef) {
4
+ "function" == typeof forwardedRef && error("Callback ref not support!");
5
+ }
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/util/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,UAAU,SAAS,CAAI,YAAiB;IAC5C,IAAI,OAAO,YAAY,KAAK,UAAU,EAAE;QACtC,KAAK,CAAC,2BAA2B,CAAC,CAAC;KACpC;AACH,CAAC","file":"index.js","sourcesContent":["import type React from 'react';\nimport { error } from './debug';\n\nexport function assertRef<T>(forwardedRef: any): asserts forwardedRef is React.MutableRefObject<T> {\n if (typeof forwardedRef === 'function') {\n error('Callback ref not support!');\n }\n}\n"]}
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@visactor/react-vrender",
3
+ "version": "0.9.0-alpha.0",
4
+ "description": "",
5
+ "sideEffects": false,
6
+ "main": "cjs/index.js",
7
+ "module": "es/index.js",
8
+ "types": "es/index.d.ts",
9
+ "files": [
10
+ "cjs",
11
+ "es",
12
+ "dist"
13
+ ],
14
+ "peerDependencies": {
15
+ "react": "^18.2.0"
16
+ },
17
+ "dependencies": {
18
+ "@visactor/vrender": "0.9.0-alpha.0",
19
+ "@visactor/vutils": "0.9.0-alpha.2",
20
+ "react-reconciler": "^0.29.0",
21
+ "tslib": "^2.3.1"
22
+ },
23
+ "devDependencies": {
24
+ "@rushstack/eslint-patch": "~1.1.4",
25
+ "react": "16.13.0",
26
+ "react-dom": "16.13.0",
27
+ "@types/react": "16.9.49",
28
+ "@types/react-dom": "16.9.8",
29
+ "@types/react-reconciler": "^0.28.2",
30
+ "@vitejs/plugin-react": "3.1.0",
31
+ "eslint": "~8.18.0",
32
+ "vite": "3.2.6",
33
+ "typescript": "4.9.5",
34
+ "@internal/ts-config": "0.0.1",
35
+ "@internal/eslint-config": "0.0.1",
36
+ "@internal/bundler": "0.0.1"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ "scripts": {
42
+ "compile": "tsc --noEmit",
43
+ "eslint": "eslint --debug --fix src/",
44
+ "build": "bundle",
45
+ "dev": "bundle --clean -f es -w",
46
+ "test": "",
47
+ "start": "vite ./vite"
48
+ }
49
+ }