@pixui-dev/pxw 0.1.16 → 0.1.19

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 (109) hide show
  1. package/bin/pxw.js +199 -217
  2. package/bin/wpbuild.js +10 -10
  3. package/config/default.conf +20 -20
  4. package/config/devops.js +361 -358
  5. package/config/h5es.js +10 -10
  6. package/config/index.html +181 -181
  7. package/config/pfbs.js +245 -207
  8. package/config/util.js +140 -140
  9. package/config/webpack.js +309 -291
  10. package/lib/assets/check.html +62 -62
  11. package/lib/assets/preact.js +4354 -4354
  12. package/lib/check/main.less +62 -62
  13. package/lib/check/main.tsx +41 -41
  14. package/lib/check/tool.js +3 -3
  15. package/lib/check/util.tsx +110 -110
  16. package/lib/grpc-web/dist/ChunkParser.js +117 -117
  17. package/lib/grpc-web/dist/Code.js +58 -58
  18. package/lib/grpc-web/dist/client.js +299 -299
  19. package/lib/grpc-web/dist/debug.js +16 -16
  20. package/lib/grpc-web/dist/detach.js +7 -7
  21. package/lib/grpc-web/dist/index.js +29 -29
  22. package/lib/grpc-web/dist/invoke.js +32 -32
  23. package/lib/grpc-web/dist/message.js +3 -3
  24. package/lib/grpc-web/dist/metadata.js +5 -5
  25. package/lib/grpc-web/dist/service.js +3 -3
  26. package/lib/grpc-web/dist/transports/Transport.js +15 -15
  27. package/lib/grpc-web/dist/transports/http/fetch.js +117 -117
  28. package/lib/grpc-web/dist/transports/http/http.js +15 -15
  29. package/lib/grpc-web/dist/transports/http/xhr.js +136 -136
  30. package/lib/grpc-web/dist/transports/http/xhrUtil.js +36 -36
  31. package/lib/grpc-web/dist/transports/websocket/websocket.js +95 -95
  32. package/lib/grpc-web/dist/typings/ChunkParser.d.ts +17 -17
  33. package/lib/grpc-web/dist/typings/Code.d.ts +20 -20
  34. package/lib/grpc-web/dist/typings/client.d.ts +25 -25
  35. package/lib/grpc-web/dist/typings/debug.d.ts +1 -1
  36. package/lib/grpc-web/dist/typings/detach.d.ts +1 -1
  37. package/lib/grpc-web/dist/typings/index.d.ts +45 -45
  38. package/lib/grpc-web/dist/typings/invoke.d.ts +20 -20
  39. package/lib/grpc-web/dist/typings/message.d.ts +8 -8
  40. package/lib/grpc-web/dist/typings/metadata.d.ts +2 -2
  41. package/lib/grpc-web/dist/typings/service.d.ts +16 -16
  42. package/lib/grpc-web/dist/typings/transports/Transport.d.ts +22 -22
  43. package/lib/grpc-web/dist/typings/transports/http/fetch.d.ts +6 -6
  44. package/lib/grpc-web/dist/typings/transports/http/http.d.ts +5 -5
  45. package/lib/grpc-web/dist/typings/transports/http/xhr.d.ts +27 -27
  46. package/lib/grpc-web/dist/typings/transports/http/xhrUtil.d.ts +3 -3
  47. package/lib/grpc-web/dist/typings/transports/websocket/websocket.d.ts +2 -2
  48. package/lib/grpc-web/dist/typings/unary.d.ts +23 -23
  49. package/lib/grpc-web/dist/typings/util.d.ts +2 -2
  50. package/lib/grpc-web/dist/unary.js +44 -44
  51. package/lib/grpc-web/dist/util.js +11 -11
  52. package/lib/grpcTransport/PixHttp2Transport.ts +107 -107
  53. package/lib/grpcTransport/PixLuaTransport.ts +82 -82
  54. package/lib/h5es-types/v1.9.2/h5es.d.ts +1698 -1698
  55. package/lib/h5es-types/v3.5.0/h5es.d.ts +1788 -1788
  56. package/lib/pi_component/tinyList/tinyList.js +483 -483
  57. package/lib/pi_component/tinyList/tinyList.tsx +517 -517
  58. package/lib/preact-router.js +395 -395
  59. package/lib/preact.js +4355 -4355
  60. package/lib/preact.tq.js +4385 -4385
  61. package/lib/react-window/src/FixedSizeGrid.js +172 -172
  62. package/lib/react-window/src/FixedSizeList.js +91 -91
  63. package/lib/react-window/src/VariableSizeGrid.js +329 -329
  64. package/lib/react-window/src/VariableSizeList.js +231 -231
  65. package/lib/react-window/src/__tests__/FixedSizeGrid.js +942 -942
  66. package/lib/react-window/src/__tests__/FixedSizeList.js +749 -749
  67. package/lib/react-window/src/__tests__/VariableSizeGrid.js +598 -598
  68. package/lib/react-window/src/__tests__/VariableSizeList.js +345 -345
  69. package/lib/react-window/src/__tests__/__snapshots__/FixedSizeGrid.js.snap +912 -912
  70. package/lib/react-window/src/__tests__/__snapshots__/FixedSizeList.js.snap +568 -568
  71. package/lib/react-window/src/__tests__/__snapshots__/VariableSizeGrid.js.snap +542 -542
  72. package/lib/react-window/src/__tests__/__snapshots__/VariableSizeList.js.snap +331 -331
  73. package/lib/react-window/src/__tests__/areEqual.js +28 -28
  74. package/lib/react-window/src/__tests__/shouldComponentUpdate.js +32 -32
  75. package/lib/react-window/src/areEqual.js +13 -13
  76. package/lib/react-window/src/createGridComponent.js +657 -657
  77. package/lib/react-window/src/createListComponent.js +574 -574
  78. package/lib/react-window/src/domHelpers.js +69 -69
  79. package/lib/react-window/src/index.js +9 -9
  80. package/lib/react-window/src/shallowDiffers.js +17 -17
  81. package/lib/react-window/src/shouldComponentUpdate.js +11 -11
  82. package/lib/react-window/src/test.js.flow +382 -382
  83. package/lib/react-window/src/timer.js +36 -36
  84. package/lib/types/css.d.ts +7476 -7476
  85. package/lib/types/dom.ts +17 -17
  86. package/lib/types/ext.d.ts +81 -81
  87. package/lib/types/internal.d.ts +94 -94
  88. package/lib/types/jsx.d.ts +309 -309
  89. package/lib/types/preact.d.ts +340 -340
  90. package/package.json +113 -111
  91. package/scripts/pack.js +40 -0
  92. package/scripts/postinstall.js +12 -0
  93. package/scripts/run-pxw.js +13 -0
  94. package/tsconfig.json +30 -30
  95. package/lib/pika-svelte/compiler.js +0 -29829
  96. package/lib/pika-svelte/easing/index.js +0 -158
  97. package/lib/pika-svelte/index.js +0 -72
  98. package/lib/pika-svelte/internal/index.js +0 -1926
  99. package/lib/pika-svelte/motion/index.js +0 -210
  100. package/lib/pika-svelte/package.json +0 -145
  101. package/lib/pika-svelte/register.js +0 -57
  102. package/lib/pika-svelte/rollup.config.js +0 -126
  103. package/lib/pika-svelte/store/index.js +0 -123
  104. package/lib/pika-svelte/transition/index.js +0 -185
  105. package/lib/svelte-tab/Tab.svelte +0 -31
  106. package/lib/svelte-tab/TabList.svelte +0 -10
  107. package/lib/svelte-tab/TabPanel.svelte +0 -13
  108. package/lib/svelte-tab/Tabs.svelte +0 -68
  109. package/lib/svelte-tab/tabs.js +0 -4
@@ -1,185 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var easing = require('../easing/index.js');
6
- var internal = require('../internal/index.js');
7
-
8
- /*! *****************************************************************************
9
- Copyright (c) Microsoft Corporation.
10
-
11
- Permission to use, copy, modify, and/or distribute this software for any
12
- purpose with or without fee is hereby granted.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
15
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
16
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
17
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
18
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
19
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20
- PERFORMANCE OF THIS SOFTWARE.
21
- ***************************************************************************** */
22
-
23
- function __rest(s, e) {
24
- var t = {};
25
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
26
- if (s != null && typeof Object.getOwnPropertySymbols === 'function')
27
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
28
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
29
- }
30
- return t;
31
- }
32
-
33
- function blur(node, { delay = 0, duration = 400, easing: easing$1 = easing.cubicInOut, amount = 5, opacity = 0 } = {}) {
34
- const style = getComputedStyle(node);
35
- const target_opacity = +style.opacity;
36
- const f = style.filter === 'none' ? '' : style.filter;
37
- const od = target_opacity * (1 - opacity);
38
- return {
39
- delay,
40
- duration,
41
- easing: easing$1,
42
- css: (_t, u) => `opacity: ${target_opacity - od * u}; filter: ${f} blur(${u * amount}px);`,
43
- };
44
- }
45
- function fade(node, { delay = 0, duration = 400, easing: easing$1 = easing.linear } = {}) {
46
- const o = +getComputedStyle(node).opacity;
47
- return {
48
- delay,
49
- duration,
50
- easing: easing$1,
51
- css: (t) => `opacity: ${t * o}`,
52
- };
53
- }
54
- function fly(node, { delay = 0, duration = 400, easing: easing$1 = easing.cubicOut, x = 0, y = 0, opacity = 0 } = {}) {
55
- const style = getComputedStyle(node);
56
- const target_opacity = +style.opacity;
57
- const transform = style.transform === 'none' ? '' : style.transform;
58
- const od = target_opacity * (1 - opacity);
59
- return {
60
- delay,
61
- duration,
62
- easing: easing$1,
63
- css: (t, u) => `
64
- transform: ${transform} translate(${(1 - t) * x}px, ${(1 - t) * y}px);
65
- opacity: ${target_opacity - od * u}`,
66
- };
67
- }
68
- function slide(node, { delay = 0, duration = 400, easing: easing$1 = easing.cubicOut } = {}) {
69
- const style = getComputedStyle(node);
70
- const opacity = +style.opacity;
71
- const height = parseFloat(style.height);
72
- const padding_top = parseFloat(style.paddingTop);
73
- const padding_bottom = parseFloat(style.paddingBottom);
74
- const margin_top = parseFloat(style.marginTop);
75
- const margin_bottom = parseFloat(style.marginBottom);
76
- const border_top_width = parseFloat(style.borderTopWidth);
77
- const border_bottom_width = parseFloat(style.borderBottomWidth);
78
- return {
79
- delay,
80
- duration,
81
- easing: easing$1,
82
- css: (t) =>
83
- 'overflow: hidden;' +
84
- `opacity: ${Math.min(t * 20, 1) * opacity};` +
85
- `height: ${t * height}px;` +
86
- `padding-top: ${t * padding_top}px;` +
87
- `padding-bottom: ${t * padding_bottom}px;` +
88
- `margin-top: ${t * margin_top}px;` +
89
- `margin-bottom: ${t * margin_bottom}px;` +
90
- `border-top-width: ${t * border_top_width}px;` +
91
- `border-bottom-width: ${t * border_bottom_width}px;`,
92
- };
93
- }
94
- function scale(node, { delay = 0, duration = 400, easing: easing$1 = easing.cubicOut, start = 0, opacity = 0 } = {}) {
95
- const style = getComputedStyle(node);
96
- const target_opacity = +style.opacity;
97
- const transform = style.transform === 'none' ? '' : style.transform;
98
- const sd = 1 - start;
99
- const od = target_opacity * (1 - opacity);
100
- return {
101
- delay,
102
- duration,
103
- easing: easing$1,
104
- css: (_t, u) => `
105
- transform: ${transform} scale(${1 - sd * u});
106
- opacity: ${target_opacity - od * u}
107
- `,
108
- };
109
- }
110
- function draw(node, { delay = 0, speed, duration, easing: easing$1 = easing.cubicInOut } = {}) {
111
- const len = node.getTotalLength();
112
- if (duration === undefined) {
113
- if (speed === undefined) {
114
- duration = 800;
115
- }
116
- else {
117
- duration = len / speed;
118
- }
119
- }
120
- else if (typeof duration === 'function') {
121
- duration = duration(len);
122
- }
123
- return {
124
- delay,
125
- duration,
126
- easing: easing$1,
127
- css: (t, u) => `stroke-dasharray: ${t * len} ${u * len}`,
128
- };
129
- }
130
- function crossfade(_a) {
131
- var { fallback } = _a,
132
- defaults = __rest(_a, ['fallback']);
133
- const to_receive = new Map();
134
- const to_send = new Map();
135
- function crossfade(from, node, params) {
136
- const { delay = 0, duration = (d) => Math.sqrt(d) * 30, easing: easing$1 = easing.cubicOut } = internal.assign(internal.assign({}, defaults), params);
137
- const to = node.getBoundingClientRect();
138
- const dx = from.left - to.left;
139
- const dy = from.top - to.top;
140
- const dw = from.width / to.width;
141
- const dh = from.height / to.height;
142
- const d = Math.sqrt(dx * dx + dy * dy);
143
- const style = getComputedStyle(node);
144
- const transform = style.transform === 'none' ? '' : style.transform;
145
- const opacity = +style.opacity;
146
- return {
147
- delay,
148
- duration: internal.is_function(duration) ? duration(d) : duration,
149
- easing: easing$1,
150
- css: (t, u) => `
151
- opacity: ${t * opacity};
152
- transform-origin: top left;
153
- transform: ${transform} translate(${u * dx}px,${u * dy}px) scale(${t + (1 - t) * dw}, ${t + (1 - t) * dh});
154
- `,
155
- };
156
- }
157
- function transition(items, counterparts, intro) {
158
- return (node, params) => {
159
- items.set(params.key, {
160
- rect: node.getBoundingClientRect(),
161
- });
162
- return () => {
163
- if (counterparts.has(params.key)) {
164
- const { rect } = counterparts.get(params.key);
165
- counterparts.delete(params.key);
166
- return crossfade(rect, node, params);
167
- }
168
- // if the node is disappearing altogether
169
- // (i.e. wasn't claimed by the other list)
170
- // then we need to supply an outro
171
- items.delete(params.key);
172
- return fallback && fallback(node, params, intro);
173
- };
174
- };
175
- }
176
- return [transition(to_send, to_receive, false), transition(to_receive, to_send, true)];
177
- }
178
-
179
- exports.blur = blur;
180
- exports.crossfade = crossfade;
181
- exports.draw = draw;
182
- exports.fade = fade;
183
- exports.fly = fly;
184
- exports.scale = scale;
185
- exports.slide = slide;
@@ -1,31 +0,0 @@
1
- <script>
2
- import { getContext } from 'svelte';
3
- import { TABS } from './Tabs.svelte';
4
-
5
- const tab = {};
6
- const { registerTab, selectTab, selectedTab } = getContext(TABS);
7
-
8
- registerTab(tab);
9
- </script>
10
-
11
- <style>
12
- button {
13
- background: none;
14
- border: none;
15
- border-bottom: 2px solid white;
16
- border-radius: 0;
17
- margin: 5px;
18
- color: #ccc;
19
- font-size: 25px;
20
- cursor: pointer;
21
- }
22
-
23
- .selected {
24
- /* border-bottom: 2px solid teal; */
25
- color: #333;
26
- }
27
- </style>
28
-
29
- <button class:selected="{$selectedTab === tab}" on:click="{() => selectTab(tab)}">
30
- <slot></slot>
31
- </button>
@@ -1,10 +0,0 @@
1
- <div class="tab-list">
2
- <slot></slot>
3
- </div>
4
-
5
- <style>
6
- .tab-list {
7
- border-bottom: 1px solid #000000aa;
8
- flex-direction: row;
9
- }
10
- </style>
@@ -1,13 +0,0 @@
1
- <script>
2
- import { getContext } from 'svelte';
3
- import { TABS } from './Tabs.svelte';
4
-
5
- const panel = {};
6
- const { registerPanel, selectedPanel } = getContext(TABS);
7
-
8
- registerPanel(panel);
9
- </script>
10
-
11
- {#if $selectedPanel === panel}
12
- <slot></slot>
13
- {/if}
@@ -1,68 +0,0 @@
1
- <script context="module">
2
- export const TABS = {};
3
- </script>
4
-
5
- <script>
6
- import { setContext, onDestroy } from "svelte";
7
- import { writable } from "svelte/store";
8
-
9
- const tabs = [];
10
- const panels = [];
11
- const selectedTab = writable(null);
12
- const selectedPanel = writable(null);
13
-
14
- export let onChange = undefined;
15
- export let selectedIndex = writable(null);
16
-
17
- setContext(TABS, {
18
- registerTab: (tab) => {
19
- tabs.push(tab);
20
- selectedTab.update((current) => current || tab);
21
-
22
- onDestroy(() => {
23
- const i = tabs.indexOf(tab);
24
- tabs.splice(i, 1);
25
- selectedTab.update((current) =>
26
- current === tab ? tabs[i] || tabs[tabs.length - 1] : current
27
- );
28
- });
29
- },
30
-
31
- registerPanel: (panel) => {
32
- panels.push(panel);
33
- selectedPanel.update((current) => current || panel);
34
-
35
- onDestroy(() => {
36
- const i = panels.indexOf(panel);
37
- panels.splice(i, 1);
38
- selectedPanel.update((current) =>
39
- current === panel
40
- ? panels[i] || panels[panels.length - 1]
41
- : current
42
- );
43
- });
44
- },
45
-
46
- selectTab: (tab) => {
47
- const i = tabs.indexOf(tab);
48
- selectedTab.set(tab);
49
- selectedPanel.set(panels[i]);
50
- selectedIndex.set(i);
51
- if (onChange) onChange(i);
52
- },
53
-
54
- selectedTab,
55
- selectedPanel,
56
- });
57
- </script>
58
-
59
- <div class="tabs">
60
- <slot />
61
- </div>
62
-
63
- <style>
64
- .tabs {
65
- align-self: stretch;
66
- /* border: 1px solid black; */
67
- }
68
- </style>
@@ -1,4 +0,0 @@
1
- export { default as Tabs } from './Tabs.svelte';
2
- export { default as TabList } from './TabList.svelte';
3
- export { default as TabPanel } from './TabPanel.svelte';
4
- export { default as Tab } from './Tab.svelte';