@wordpress/element 7.0.0 → 8.0.1

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 (60) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +31 -160
  3. package/build/index.cjs +0 -3
  4. package/build/index.cjs.map +2 -2
  5. package/build/platform.cjs.map +2 -2
  6. package/build/react-platform.cjs +8 -14
  7. package/build/react-platform.cjs.map +2 -2
  8. package/build/{find-dom-node.cjs → react-polyfill-base.cjs} +55 -22
  9. package/build/react-polyfill-base.cjs.map +7 -0
  10. package/build/react-polyfill.cjs +80 -0
  11. package/build/react-polyfill.cjs.map +7 -0
  12. package/build/react.cjs +0 -10
  13. package/build/react.cjs.map +2 -2
  14. package/build/serialize.cjs +1 -3
  15. package/build/serialize.cjs.map +2 -2
  16. package/build-module/index.mjs +0 -2
  17. package/build-module/index.mjs.map +2 -2
  18. package/build-module/platform.mjs.map +2 -2
  19. package/build-module/react-platform.mjs +8 -14
  20. package/build-module/react-platform.mjs.map +2 -2
  21. package/build-module/{find-dom-node.mjs → react-polyfill-base.mjs} +45 -9
  22. package/build-module/react-polyfill-base.mjs.map +7 -0
  23. package/build-module/react-polyfill.mjs +47 -0
  24. package/build-module/react-polyfill.mjs.map +7 -0
  25. package/build-module/react.mjs +0 -10
  26. package/build-module/react.mjs.map +2 -2
  27. package/build-module/serialize.mjs +1 -3
  28. package/build-module/serialize.mjs.map +2 -2
  29. package/build-types/index.d.ts +0 -1
  30. package/build-types/index.d.ts.map +1 -1
  31. package/build-types/platform.d.ts +1 -13
  32. package/build-types/platform.d.ts.map +1 -1
  33. package/build-types/raw-html.d.ts +11 -25
  34. package/build-types/raw-html.d.ts.map +1 -1
  35. package/build-types/react-platform.d.ts +23 -49
  36. package/build-types/react-platform.d.ts.map +1 -1
  37. package/build-types/react-polyfill-base.d.ts +5 -0
  38. package/build-types/react-polyfill-base.d.ts.map +1 -0
  39. package/build-types/react-polyfill.d.ts +42 -0
  40. package/build-types/react-polyfill.d.ts.map +1 -0
  41. package/build-types/react.d.ts +1 -36
  42. package/build-types/react.d.ts.map +1 -1
  43. package/build-types/serialize.d.ts.map +1 -1
  44. package/package.json +13 -9
  45. package/src/index.ts +6 -1
  46. package/src/platform.ts +1 -14
  47. package/src/react-platform.ts +29 -59
  48. package/src/{find-dom-node.ts → react-polyfill-base.ts} +57 -16
  49. package/src/react-polyfill.ts +99 -0
  50. package/src/react.ts +1 -48
  51. package/src/serialize.ts +1 -3
  52. package/src/test/find-dom-node.js +2 -2
  53. package/src/test/platform.js +10 -2
  54. package/src/test/react-polyfill.js +77 -0
  55. package/build/find-dom-node.cjs.map +0 -7
  56. package/build-module/find-dom-node.mjs.map +0 -7
  57. package/src/platform.android.js +0 -21
  58. package/src/platform.ios.js +0 -21
  59. package/src/react-platform.native.js +0 -14
  60. package/src/test/platform.native.js +0 -15
@@ -1,21 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { Platform as OriginalPlatform } from 'react-native';
5
-
6
- const Platform = {
7
- ...OriginalPlatform,
8
- OS: 'native',
9
- select: ( spec ) => {
10
- if ( 'ios' in spec ) {
11
- return spec.ios;
12
- } else if ( 'native' in spec ) {
13
- return spec.native;
14
- }
15
- return spec.default;
16
- },
17
- isNative: true,
18
- isIOS: true,
19
- };
20
-
21
- export default Platform;
@@ -1,14 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { AppRegistry } from 'react-native';
5
-
6
- /**
7
- * Registers an app root component allowing the native system to run the app.
8
- *
9
- * @param {string} appKey Unique app name identifier.
10
- * @param {Function} componentProvider Function returning the app root React component.
11
- */
12
- export const registerComponent = ( appKey, componentProvider ) => {
13
- AppRegistry.registerComponent( appKey, componentProvider );
14
- };
@@ -1,15 +0,0 @@
1
- /**
2
- * Internal dependencies
3
- */
4
- import Platform from '../platform';
5
-
6
- describe( 'Platform', () => {
7
- it( 'is chooses the right thing', () => {
8
- const selection = Platform.select( {
9
- web: 'web',
10
- native: 'native',
11
- } );
12
-
13
- expect( selection ).toBe( 'native' );
14
- } );
15
- } );