@pixui-dev/pxw 0.1.34 → 0.1.35

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 (97) hide show
  1. package/bin/pxw.js +56 -56
  2. package/bin/wpbuild.js +10 -10
  3. package/config/daemon.js +157 -157
  4. package/config/default.conf +20 -20
  5. package/config/devops.js +550 -550
  6. package/config/h5es.js +14 -14
  7. package/config/index.html +183 -183
  8. package/config/pfbs.js +259 -259
  9. package/config/util.js +143 -143
  10. package/config/webpack.js +325 -325
  11. package/lib/assets/check.html +62 -62
  12. package/lib/assets/preact.js +4354 -4354
  13. package/lib/check/main.less +62 -62
  14. package/lib/check/main.tsx +41 -41
  15. package/lib/check/tool.js +3 -3
  16. package/lib/check/util.tsx +110 -110
  17. package/lib/grpc-web/dist/ChunkParser.js +117 -117
  18. package/lib/grpc-web/dist/Code.js +58 -58
  19. package/lib/grpc-web/dist/client.js +299 -299
  20. package/lib/grpc-web/dist/debug.js +16 -16
  21. package/lib/grpc-web/dist/detach.js +7 -7
  22. package/lib/grpc-web/dist/index.js +29 -29
  23. package/lib/grpc-web/dist/invoke.js +32 -32
  24. package/lib/grpc-web/dist/message.js +3 -3
  25. package/lib/grpc-web/dist/metadata.js +5 -5
  26. package/lib/grpc-web/dist/service.js +3 -3
  27. package/lib/grpc-web/dist/transports/Transport.js +15 -15
  28. package/lib/grpc-web/dist/transports/http/fetch.js +117 -117
  29. package/lib/grpc-web/dist/transports/http/http.js +15 -15
  30. package/lib/grpc-web/dist/transports/http/xhr.js +136 -136
  31. package/lib/grpc-web/dist/transports/http/xhrUtil.js +36 -36
  32. package/lib/grpc-web/dist/transports/websocket/websocket.js +95 -95
  33. package/lib/grpc-web/dist/typings/ChunkParser.d.ts +17 -17
  34. package/lib/grpc-web/dist/typings/Code.d.ts +20 -20
  35. package/lib/grpc-web/dist/typings/client.d.ts +25 -25
  36. package/lib/grpc-web/dist/typings/debug.d.ts +1 -1
  37. package/lib/grpc-web/dist/typings/detach.d.ts +1 -1
  38. package/lib/grpc-web/dist/typings/index.d.ts +45 -45
  39. package/lib/grpc-web/dist/typings/invoke.d.ts +20 -20
  40. package/lib/grpc-web/dist/typings/message.d.ts +8 -8
  41. package/lib/grpc-web/dist/typings/metadata.d.ts +2 -2
  42. package/lib/grpc-web/dist/typings/service.d.ts +16 -16
  43. package/lib/grpc-web/dist/typings/transports/Transport.d.ts +22 -22
  44. package/lib/grpc-web/dist/typings/transports/http/fetch.d.ts +6 -6
  45. package/lib/grpc-web/dist/typings/transports/http/http.d.ts +5 -5
  46. package/lib/grpc-web/dist/typings/transports/http/xhr.d.ts +27 -27
  47. package/lib/grpc-web/dist/typings/transports/http/xhrUtil.d.ts +3 -3
  48. package/lib/grpc-web/dist/typings/transports/websocket/websocket.d.ts +2 -2
  49. package/lib/grpc-web/dist/typings/unary.d.ts +23 -23
  50. package/lib/grpc-web/dist/typings/util.d.ts +2 -2
  51. package/lib/grpc-web/dist/unary.js +44 -44
  52. package/lib/grpc-web/dist/util.js +11 -11
  53. package/lib/grpcTransport/PixHttp2Transport.ts +107 -107
  54. package/lib/grpcTransport/PixLuaTransport.ts +82 -82
  55. package/lib/h5es-types/v1.9.2/h5es.d.ts +1756 -1756
  56. package/lib/h5es-types/v3.5.0/h5es.d.ts +1851 -1851
  57. package/lib/h5es-types/v3.5.6/h5es.d.ts +1911 -1911
  58. package/lib/pi_component/tinyList/tinyList.js +483 -483
  59. package/lib/pi_component/tinyList/tinyList.tsx +517 -517
  60. package/lib/preact-router.js +395 -395
  61. package/lib/preact.js +4355 -4355
  62. package/lib/preact.tq.js +4385 -4385
  63. package/lib/react-window/src/FixedSizeGrid.js +172 -172
  64. package/lib/react-window/src/FixedSizeList.js +91 -91
  65. package/lib/react-window/src/VariableSizeGrid.js +329 -329
  66. package/lib/react-window/src/VariableSizeList.js +231 -231
  67. package/lib/react-window/src/__tests__/FixedSizeGrid.js +942 -942
  68. package/lib/react-window/src/__tests__/FixedSizeList.js +749 -749
  69. package/lib/react-window/src/__tests__/VariableSizeGrid.js +598 -598
  70. package/lib/react-window/src/__tests__/VariableSizeList.js +345 -345
  71. package/lib/react-window/src/__tests__/__snapshots__/FixedSizeGrid.js.snap +912 -912
  72. package/lib/react-window/src/__tests__/__snapshots__/FixedSizeList.js.snap +568 -568
  73. package/lib/react-window/src/__tests__/__snapshots__/VariableSizeGrid.js.snap +542 -542
  74. package/lib/react-window/src/__tests__/__snapshots__/VariableSizeList.js.snap +331 -331
  75. package/lib/react-window/src/__tests__/areEqual.js +28 -28
  76. package/lib/react-window/src/__tests__/shouldComponentUpdate.js +32 -32
  77. package/lib/react-window/src/areEqual.js +13 -13
  78. package/lib/react-window/src/createGridComponent.js +657 -657
  79. package/lib/react-window/src/createListComponent.js +574 -574
  80. package/lib/react-window/src/domHelpers.js +69 -69
  81. package/lib/react-window/src/index.js +9 -9
  82. package/lib/react-window/src/shallowDiffers.js +17 -17
  83. package/lib/react-window/src/shouldComponentUpdate.js +11 -11
  84. package/lib/react-window/src/test.js.flow +382 -382
  85. package/lib/react-window/src/timer.js +36 -36
  86. package/lib/types/dom.ts +17 -17
  87. package/lib/types/ext.d.ts +75 -75
  88. package/lib/types/preact/css.d.ts +7476 -7476
  89. package/lib/types/preact/index.d.ts +340 -340
  90. package/lib/types/preact/internal.d.ts +94 -94
  91. package/lib/types/preact/jsx.d.ts +368 -368
  92. package/lib/types/preact-router/index.d.ts +84 -84
  93. package/package.json +127 -127
  94. package/scripts/pack.js +40 -40
  95. package/scripts/postinstall.js +12 -12
  96. package/scripts/run-pxw.js +19 -19
  97. package/tsconfig.json +30 -30
@@ -1,36 +1,36 @@
1
- // @flow
2
-
3
- // Animation frame based implementation of setTimeout.
4
- // Inspired by Joe Lambert, https://gist.github.com/joelambert/1002116#file-requesttimeout-js
5
-
6
- const hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
7
-
8
- const now = hasNativePerformanceNow ? () => performance.now() : () => Date.now();
9
-
10
- export type TimeoutID = {|
11
- id: AnimationFrameID,
12
- |};
13
-
14
- export function cancelTimeout(timeoutID: TimeoutID) {
15
- cancelAnimationFrame(timeoutID.id);
16
- }
17
-
18
- export function requestTimeout(callback: Function, delay: number): TimeoutID {
19
- const start = now();
20
-
21
- function tick() {
22
- let n = now();
23
- // console.log('requestTimeout', n, start, n - start, delay);
24
- if (n - start >= delay) {
25
- callback.call(null);
26
- } else {
27
- timeoutID.id = requestAnimationFrame(tick);
28
- }
29
- }
30
-
31
- const timeoutID: TimeoutID = {
32
- id: requestAnimationFrame(tick),
33
- };
34
-
35
- return timeoutID;
36
- }
1
+ // @flow
2
+
3
+ // Animation frame based implementation of setTimeout.
4
+ // Inspired by Joe Lambert, https://gist.github.com/joelambert/1002116#file-requesttimeout-js
5
+
6
+ const hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
7
+
8
+ const now = hasNativePerformanceNow ? () => performance.now() : () => Date.now();
9
+
10
+ export type TimeoutID = {|
11
+ id: AnimationFrameID,
12
+ |};
13
+
14
+ export function cancelTimeout(timeoutID: TimeoutID) {
15
+ cancelAnimationFrame(timeoutID.id);
16
+ }
17
+
18
+ export function requestTimeout(callback: Function, delay: number): TimeoutID {
19
+ const start = now();
20
+
21
+ function tick() {
22
+ let n = now();
23
+ // console.log('requestTimeout', n, start, n - start, delay);
24
+ if (n - start >= delay) {
25
+ callback.call(null);
26
+ } else {
27
+ timeoutID.id = requestAnimationFrame(tick);
28
+ }
29
+ }
30
+
31
+ const timeoutID: TimeoutID = {
32
+ id: requestAnimationFrame(tick),
33
+ };
34
+
35
+ return timeoutID;
36
+ }
package/lib/types/dom.ts CHANGED
@@ -1,17 +1,17 @@
1
- import { createElement, render, Component } from 'preact';
2
-
3
- let dumpDOM = (type, props, ...children) => {
4
- console.log('==>dom', 'type', type, 'props', props, 'chlidren', children);
5
- return {
6
- type,
7
- props,
8
- children,
9
- };
10
- };
11
-
12
- console.log('preact check', createElement, render, Component);
13
-
14
- export { render, createElement } from 'preact';
15
-
16
- //注:这个是给tsx文件import h from 'preact'用的,其实有了上面的插件这句话在js层面可以省略,但少了它之后在ts层面就无法判断jsx元素的类型信息,导致editor里对attr和style的语法提示失效
17
- export default createElement;
1
+ import { createElement, render, Component } from 'preact';
2
+
3
+ let dumpDOM = (type, props, ...children) => {
4
+ console.log('==>dom', 'type', type, 'props', props, 'chlidren', children);
5
+ return {
6
+ type,
7
+ props,
8
+ children,
9
+ };
10
+ };
11
+
12
+ console.log('preact check', createElement, render, Component);
13
+
14
+ export { render, createElement } from 'preact';
15
+
16
+ //注:这个是给tsx文件import h from 'preact'用的,其实有了上面的插件这句话在js层面可以省略,但少了它之后在ts层面就无法判断jsx元素的类型信息,导致editor里对attr和style的语法提示失效
17
+ export default createElement;
@@ -1,75 +1,75 @@
1
- interface NodeModule {
2
- hot: any;
3
- }
4
-
5
- declare module '*.less' {
6
- const resource: { [key: string]: string };
7
- export = resource;
8
- }
9
-
10
- declare module '*.png' {
11
- const value: any;
12
- export default value;
13
- }
14
- declare module '*.gif' {
15
- const value: any;
16
- export default value;
17
- }
18
- declare module '*.jpg' {
19
- const value: any;
20
- export default value;
21
- }
22
-
23
- declare module '*.mp4' {
24
- const value: any;
25
- export default value;
26
- }
27
-
28
- declare module '*.lottie' {
29
- const value: any;
30
- export default value;
31
- }
32
-
33
- interface Console {
34
- enable_trace: (boolean) => {};
35
- }
36
-
37
- declare class Http2Connection {
38
- constructor(url: string, metadata?: string[string], debug?: bool);
39
-
40
- send(msg: Uint8Array): number;
41
-
42
- close(msg: Record<string, any>): number;
43
-
44
- setHeadersCallBack(func: Function): number;
45
-
46
- setDataCallBack(func: Function): number;
47
-
48
- setEndCallBack(func: Function): number;
49
- }
50
-
51
- interface Window {
52
- Http2Connection: any;
53
- noProto: any;
54
- }
55
-
56
- interface External {
57
- }
58
-
59
- declare function LuaProxy(): lua;
60
- declare class WxCard {
61
- Ping(msg: string) {}
62
- }
63
- declare class PandoraCommon {
64
- static callLua(msg: string): any;
65
- }
66
- declare class PandoraSDKAdapter {
67
- static external: any;
68
- static getInstance();
69
- static callLua(name: string, f1: Function, f2: Function, msg: string): any;
70
- }
71
- declare class Lua {
72
- constructor();
73
- callLua(name: string, f1: Function, f2: Function, msg: string): any;
74
- PixWxCardRequest: WxCard;
75
- }
1
+ interface NodeModule {
2
+ hot: any;
3
+ }
4
+
5
+ declare module '*.less' {
6
+ const resource: { [key: string]: string };
7
+ export = resource;
8
+ }
9
+
10
+ declare module '*.png' {
11
+ const value: any;
12
+ export default value;
13
+ }
14
+ declare module '*.gif' {
15
+ const value: any;
16
+ export default value;
17
+ }
18
+ declare module '*.jpg' {
19
+ const value: any;
20
+ export default value;
21
+ }
22
+
23
+ declare module '*.mp4' {
24
+ const value: any;
25
+ export default value;
26
+ }
27
+
28
+ declare module '*.lottie' {
29
+ const value: any;
30
+ export default value;
31
+ }
32
+
33
+ interface Console {
34
+ enable_trace: (boolean) => {};
35
+ }
36
+
37
+ declare class Http2Connection {
38
+ constructor(url: string, metadata?: string[string], debug?: bool);
39
+
40
+ send(msg: Uint8Array): number;
41
+
42
+ close(msg: Record<string, any>): number;
43
+
44
+ setHeadersCallBack(func: Function): number;
45
+
46
+ setDataCallBack(func: Function): number;
47
+
48
+ setEndCallBack(func: Function): number;
49
+ }
50
+
51
+ interface Window {
52
+ Http2Connection: any;
53
+ noProto: any;
54
+ }
55
+
56
+ interface External {
57
+ }
58
+
59
+ declare function LuaProxy(): lua;
60
+ declare class WxCard {
61
+ Ping(msg: string) {}
62
+ }
63
+ declare class PandoraCommon {
64
+ static callLua(msg: string): any;
65
+ }
66
+ declare class PandoraSDKAdapter {
67
+ static external: any;
68
+ static getInstance();
69
+ static callLua(name: string, f1: Function, f2: Function, msg: string): any;
70
+ }
71
+ declare class Lua {
72
+ constructor();
73
+ callLua(name: string, f1: Function, f2: Function, msg: string): any;
74
+ PixWxCardRequest: WxCard;
75
+ }