@torpor/view 0.0.11 → 0.0.12
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/CHANGELOG.md +6 -0
- package/dist/{ServerSlotRender-AWF3bD5B.d.cts → ServerSlotRender-t1sOutne.d.cts} +1 -1
- package/dist/{ServerSlotRender-AWF3bD5B.d.ts → ServerSlotRender-t1sOutne.d.ts} +1 -1
- package/dist/{chunk-GO2L324Q.js → chunk-T6JGCJ5T.js} +5 -2
- package/dist/chunk-T6JGCJ5T.js.map +1 -0
- package/dist/compile.cjs +38 -31
- package/dist/compile.cjs.map +1 -1
- package/dist/compile.d.cts +1 -0
- package/dist/compile.d.ts +1 -0
- package/dist/compile.js +38 -31
- package/dist/compile.js.map +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/ssr.cjs +4 -1
- package/dist/ssr.cjs.map +1 -1
- package/dist/ssr.d.cts +2 -2
- package/dist/ssr.d.ts +2 -2
- package/dist/ssr.js +1 -1
- package/dist/ssr.js.map +1 -1
- package/package.json +6 -6
- package/scripts/buildTestOutput.ts +2 -121
- package/src/compile/build/client/buildAddFragment.ts +1 -1
- package/src/compile/build/client/buildAwaitNode.ts +1 -1
- package/src/compile/build/client/buildComponentNode.ts +1 -1
- package/src/compile/build/client/buildControlNode.ts +1 -1
- package/src/compile/build/client/buildElementNode.ts +7 -1
- package/src/compile/build/client/buildForNode.ts +1 -1
- package/src/compile/build/client/buildFragment.ts +1 -1
- package/src/compile/build/client/buildFragmentText.ts +7 -1
- package/src/compile/build/client/buildHeadNode.ts +1 -1
- package/src/compile/build/client/buildHtmlNode.ts +1 -1
- package/src/compile/build/client/buildIfNode.ts +1 -1
- package/src/compile/build/client/buildMount.ts +1 -1
- package/src/compile/build/client/buildNode.ts +1 -1
- package/src/compile/build/client/buildReplaceNode.ts +1 -1
- package/src/compile/build/client/buildRootNode.ts +1 -1
- package/src/compile/build/client/buildRun.ts +1 -1
- package/src/compile/build/client/buildScriptNode.ts +1 -1
- package/src/compile/build/client/buildSlotNode.ts +1 -1
- package/src/compile/build/client/buildSwitchNode.ts +1 -1
- package/src/compile/build/client/buildTextNode.ts +1 -1
- package/src/compile/build/client/replaceForVarNames.ts +1 -1
- package/src/compile/build/server/buildServerAwaitNode.ts +1 -1
- package/src/compile/build/server/buildServerComponentNode.ts +1 -1
- package/src/compile/build/server/buildServerControlNode.ts +1 -1
- package/src/compile/build/server/buildServerElementNode.ts +9 -1
- package/src/compile/build/server/buildServerForNode.ts +1 -1
- package/src/compile/build/server/buildServerHtmlNode.ts +1 -1
- package/src/compile/build/server/buildServerIfNode.ts +1 -1
- package/src/compile/build/server/buildServerNode.ts +5 -1
- package/src/compile/build/server/buildServerReplaceNode.ts +1 -1
- package/src/compile/build/server/buildServerRootNode.ts +5 -1
- package/src/compile/build/server/buildServerScriptNode.ts +1 -1
- package/src/compile/build/server/buildServerSlotNode.ts +1 -1
- package/src/compile/build/server/buildServerSpecialNode.ts +1 -1
- package/src/compile/build/server/buildServerSwitchNode.ts +1 -1
- package/src/compile/build/server/buildServerTextNode.ts +1 -1
- package/src/compile/build/utils/isFullyReactive.ts +1 -1
- package/src/compile/build/utils/isReactive.ts +1 -1
- package/src/compile/build/utils/isReactiveAttribute.ts +1 -1
- package/src/compile/parse/addSpaceElement.ts +4 -1
- package/src/compile/parse/parseControl.ts +4 -1
- package/src/compile/parse/parseImports.ts +1 -1
- package/src/compile/parse/parseMarkup.ts +1 -1
- package/src/compile/parse/parseStyles.ts +1 -1
- package/src/compile/parse/scopeStyles.ts +13 -21
- package/src/compile/parse/slottifyChildNodes.ts +1 -1
- package/src/compile/parse/utils/addError.ts +5 -1
- package/src/compile/parse/utils/consumeUntil.ts +1 -1
- package/src/compile/parse/utils/isAlphaNumeric.ts +1 -1
- package/src/compile/parse/utils/isAlphaNumericChar.ts +1 -1
- package/src/compile/parse/utils/isSpace.ts +1 -1
- package/src/compile/parse/utils/isSpaceChar.ts +1 -1
- package/src/compile/types/nodes/TemplateNode.ts +3 -0
- package/src/compile/utils/Builder.ts +3 -3
- package/src/compile/utils/trimEnd.ts +1 -1
- package/src/compile/utils/trimMatched.ts +1 -1
- package/src/compile/utils/trimQuotes.ts +1 -1
- package/src/compile/utils/trimStart.ts +1 -1
- package/src/compile/utils/trimStartAndEnd.ts +1 -1
- package/src/compile/utils/voidTags.ts +1 -1
- package/src/debug/printHtml.ts +1 -1
- package/src/motion/animate.ts +1 -1
- package/src/render/$mount.ts +1 -1
- package/src/render/$run.ts +1 -1
- package/src/render/$serverMount.ts +1 -1
- package/src/render/$serverRun.ts +1 -1
- package/src/render/$stream.ts +1 -1
- package/src/render/addAnimation.ts +1 -1
- package/src/render/addEvent.ts +1 -1
- package/src/render/addFragment.ts +1 -1
- package/src/render/applyProps.ts +1 -1
- package/src/render/clearRange.ts +1 -1
- package/src/render/createComment.ts +1 -1
- package/src/render/createElement.ts +1 -1
- package/src/render/createFragment.ts +1 -1
- package/src/render/createText.ts +1 -1
- package/src/render/flushMountEffects.ts +1 -1
- package/src/render/getClasses.ts +4 -1
- package/src/render/hydrate.ts +1 -1
- package/src/render/hydrateRoot.ts +1 -1
- package/src/render/mount.ts +1 -1
- package/src/render/moveRange.ts +1 -1
- package/src/render/popRange.ts +1 -1
- package/src/render/runControl.ts +1 -1
- package/src/render/runControlBranch.ts +1 -1
- package/src/render/runList.ts +1 -1
- package/src/render/runListItems.ts +1 -1
- package/src/render/setAttribute.ts +1 -1
- package/src/render/setDynamicElement.ts +1 -1
- package/src/watch/proxyGet.ts +1 -1
- package/src/watch/removeEffect.ts +1 -1
- package/src/watch/runEffect.ts +1 -1
- package/src/watch/symbols.ts +1 -1
- package/src/watch/trackEffect.ts +1 -1
- package/src/watch/transferEffects.ts +1 -1
- package/src/watch/triggerEffects.ts +1 -1
- package/test/bench/components/output/Bench-client.ts +0 -204
- package/test/bench/components/output/Bench-server.ts +0 -130
- package/test/bench/components/temp/Bench-client-5fee290225ae4771aa847360006123671e8f17f1.ts +208 -0
- package/test/bench/components/temp/Bench-server-00cefa588803c01ca4f2741c595e4f045cdd101e.ts +130 -0
- package/test/build-server/components/{output/IfNested-client.ts → temp/IfNested-client-979db97eea5b4595550b9b46f297f3fbc31796d2.ts} +11 -0
- package/test/buildHtml.ts +1 -1
- package/test/buildOutputFiles.ts +47 -12
- package/test/class/class.test.ts +29 -6
- package/test/class/components/Class.torp +15 -1
- package/test/class/components/output/Class-client.ts +10 -6
- package/test/class/components/output/Class-server.ts +1 -1
- package/test/class/components/temp/{Class-client-600bf865c14f1052d24e1c79242f837aaf5ae5e8.ts → Class-client-8c3f9e0257cc2b687e9bb7106cccbab94a4b5adf.ts} +10 -6
- package/test/class/components/temp/Class-server-2218c3284845fdab80d1a41ebace9a9e2ddd6fc1.ts +17 -0
- package/test/component/components/temp/Header-client-ac151eea86e3f6b058fab101661e13ae73864968.ts +34 -0
- package/test/component/components/temp/Header-server-4f10f2332f3ca7a097517cfb938ab1e6f31d68ac.ts +17 -0
- package/test/console/components/temp/{Console-client-254d7d4799471401334d698b1631ab1cb5b70558.ts → Console-client-2f206752ce59e59fba9bb91263b4102fd515951e.ts} +1 -1
- package/test/console/components/temp/Console-server-b4b15f7a0d1d2b50d87bad4870e1b8d368707c04.ts +17 -0
- package/test/globalSetup.ts +1 -1
- package/test/helpers.ts +6 -2
- package/test/hydrateComponent.ts +1 -1
- package/test/importComponent.ts +12 -40
- package/test/mountComponent.ts +5 -1
- package/test/party/components/temp/AnswerButton-client-243454cd7bf84c648f244b3587e60d01a0401039.ts +33 -0
- package/test/party/components/temp/AnswerButton-server-938e46c1d2510ea37454854ef527e4aa64eb8e52.ts +16 -0
- package/test/party/components/temp/FunnyButton-client-2e6bec8259065b5bc9ae16d1ca93dd1bd0c56b7c.ts +40 -0
- package/test/party/components/temp/FunnyButton-server-e8ab55e47c735f7e42c55d2b7504dfa4190a1b40.ts +32 -0
- package/test/party/components/temp/Time-client-7ba4ca9322af2cb88a873c812fc776760c337c64.ts +47 -0
- package/test/party/components/temp/Time-server-08f66c7f3f32b13de06d75fe679cf58b5727c473.ts +31 -0
- package/test/party/components/temp/UserProfile-client-938bcef20a2555de22aca939022a32742ac5e729.ts +51 -0
- package/test/party/components/temp/UserProfile-server-9df5c59b8797fa67c479bc76450104d45e6076f9.ts +22 -0
- package/test/party/components/temp/UserProfileContext-client-93211cdba795b8baf926f60f5b17da90701743b3.ts +44 -0
- package/test/party/components/temp/UserProfileContext-server-cf58767df1e2d1dde919f59de73cdd9764bbc006.ts +20 -0
- package/test/slots/components/temp/Article-client-741f94eab2e96655f4c9d69ccd7d9c7cc998f4ce.ts +41 -0
- package/test/slots/components/temp/Article-server-a6bd47a621cc213db4313eb775a52246541dd203.ts +28 -0
- package/test/slots/components/temp/Header-client-e2e1e7d60b48b0841cd0c20224f520330ca96458.ts +38 -0
- package/test/slots/components/temp/Header-server-1c195508a91c32822da22a08576c8a30c9070636.ts +22 -0
- package/test/slots/components/temp/List-client-0659d999cfb48b865fe5b8aaaf2a4ddac3a8a8b6.ts +76 -0
- package/test/slots/components/temp/List-server-4b76485a259d054187edad8aa691d80ac918ad86.ts +25 -0
- package/test/special-component/components/temp/BigTitle-client-881a9f84876fb3f6d994736edb253b96e71de926.ts +32 -0
- package/test/special-component/components/temp/BigTitle-server-9efc738f5eb131a4b859c4a99a8e255d93834e9a.ts +20 -0
- package/test/special-component/components/temp/SmallTitle-client-25b3097b7ae47848dd82967403faf7745fc43388.ts +32 -0
- package/test/special-component/components/temp/SmallTitle-server-fc105db9a91b83644d67e049ce583a3d1a61f50c.ts +20 -0
- package/tsconfig.json +1 -1
- package/tsup.config.ts +7 -2
- package/vitest.config.ts +2 -2
- package/dist/chunk-GO2L324Q.js.map +0 -1
- package/test/bench/components/temp/Bench-client-3efcd3b6c03c7a51368df3b8b1bdf2e7fa722432.ts +0 -126
- package/test/build-server/components/IfNested.d.ts +0 -18
- package/test/class/components/temp/Class-server-082505b03612c762384ffff329472db3f55b8097.ts +0 -17
- /package/test/build-server/components/{output/IfNested-server.ts → temp/IfNested-server-3c4e4b6f2162c0906cef685830219b9ea9ee985c.ts} +0 -0
package/src/watch/proxyGet.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Effect } from "../types/Effect";
|
|
2
2
|
|
|
3
|
-
export default function removeEffect(effect: Effect) {
|
|
3
|
+
export default function removeEffect(effect: Effect): void {
|
|
4
4
|
//let effectName = String(effect.run).split("{")[0].trim();
|
|
5
5
|
//console.log(`removing effect '${effectName}'`);
|
|
6
6
|
|
package/src/watch/runEffect.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import context from "../render/context";
|
|
2
2
|
import { type Effect } from "../types/Effect";
|
|
3
3
|
|
|
4
|
-
export default function runEffect(effect: Effect) {
|
|
4
|
+
export default function runEffect(effect: Effect): void {
|
|
5
5
|
// Reactivate it in case it's been deactivated
|
|
6
6
|
effect.active = true;
|
|
7
7
|
|
package/src/watch/symbols.ts
CHANGED
package/src/watch/trackEffect.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import context from "../render/context";
|
|
2
2
|
import { type ProxyData } from "../types/ProxyData";
|
|
3
3
|
|
|
4
|
-
export default function trackEffect(data: ProxyData, key: PropertyKey) {
|
|
4
|
+
export default function trackEffect(data: ProxyData, key: PropertyKey): void {
|
|
5
5
|
// If there's an active effect, register this target/prop with it, so that
|
|
6
6
|
// it will be called when this prop is set
|
|
7
7
|
if (context.activeEffect) {
|
|
@@ -8,7 +8,7 @@ import { proxyDataSymbol } from "./symbols";
|
|
|
8
8
|
export default function transferEffects(
|
|
9
9
|
oldValue: Record<PropertyKey, any>,
|
|
10
10
|
newValue: Record<PropertyKey, any>,
|
|
11
|
-
) {
|
|
11
|
+
): void {
|
|
12
12
|
const oldData = oldValue[proxyDataSymbol] as ProxyData;
|
|
13
13
|
const newData = newValue[proxyDataSymbol] as ProxyData;
|
|
14
14
|
moveChildEffects(oldValue, newValue, oldData, newData);
|
|
@@ -2,7 +2,7 @@ import { type ProxyData } from "../types/ProxyData";
|
|
|
2
2
|
import removeEffect from "./removeEffect";
|
|
3
3
|
import runEffect from "./runEffect";
|
|
4
4
|
|
|
5
|
-
export default function triggerEffects(data: ProxyData, key: PropertyKey) {
|
|
5
|
+
export default function triggerEffects(data: ProxyData, key: PropertyKey): void {
|
|
6
6
|
// Get the effects for the supplied property
|
|
7
7
|
let effects = data.propData.get(key)?.effects;
|
|
8
8
|
if (effects) {
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import $run from "../../../../src/render/$run";
|
|
2
|
-
import $watch from "../../../../src/render/$watch";
|
|
3
|
-
import { type ListItem } from "../../../../src/types/ListItem";
|
|
4
|
-
import { type SlotRender } from "../../../../src/types/SlotRender";
|
|
5
|
-
import t_add_fragment from "../../../../src/render/addFragment";
|
|
6
|
-
import t_anchor from "../../../../src/render/nodeAnchor";
|
|
7
|
-
import t_child from "../../../../src/render/nodeChild";
|
|
8
|
-
import t_class from "../../../../src/render/getClasses";
|
|
9
|
-
import t_event from "../../../../src/render/addEvent";
|
|
10
|
-
import t_fmt from "../../../../src/render/formatText";
|
|
11
|
-
import t_fragment from "../../../../src/render/getFragment";
|
|
12
|
-
import t_list_item from "../../../../src/render/newListItem";
|
|
13
|
-
import t_next from "../../../../src/render/nodeNext";
|
|
14
|
-
import t_pop_range from "../../../../src/render/popRange";
|
|
15
|
-
import t_push_range from "../../../../src/render/pushRange";
|
|
16
|
-
import t_range from "../../../../src/render/newRange";
|
|
17
|
-
import t_root from "../../../../src/render/nodeRoot";
|
|
18
|
-
import t_run_list from "../../../../src/render/runList";
|
|
19
|
-
|
|
20
|
-
export default function Bench(
|
|
21
|
-
$parent: ParentNode,
|
|
22
|
-
$anchor: Node | null,
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
$props?: Record<PropertyKey, any>,
|
|
25
|
-
// @ts-ignore
|
|
26
|
-
$context?: Record<PropertyKey, any>,
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
$slots?: Record<string, SlotRender>
|
|
29
|
-
) {
|
|
30
|
-
|
|
31
|
-
let rowId = 1;
|
|
32
|
-
let $state = $watch({
|
|
33
|
-
data: [],
|
|
34
|
-
selected: null,
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const adjectives = [
|
|
38
|
-
"pretty",
|
|
39
|
-
"large",
|
|
40
|
-
"big",
|
|
41
|
-
"small",
|
|
42
|
-
"tall",
|
|
43
|
-
"short",
|
|
44
|
-
"long",
|
|
45
|
-
"handsome",
|
|
46
|
-
"plain",
|
|
47
|
-
"quaint",
|
|
48
|
-
"clean",
|
|
49
|
-
"elegant",
|
|
50
|
-
"easy",
|
|
51
|
-
"angry",
|
|
52
|
-
"crazy",
|
|
53
|
-
"helpful",
|
|
54
|
-
"mushy",
|
|
55
|
-
"odd",
|
|
56
|
-
"unsightly",
|
|
57
|
-
"adorable",
|
|
58
|
-
"important",
|
|
59
|
-
"inexpensive",
|
|
60
|
-
"cheap",
|
|
61
|
-
"expensive",
|
|
62
|
-
"fancy",
|
|
63
|
-
];
|
|
64
|
-
const colours = ["red", "yellow", "blue", "green", "pink", "brown", "purple", "brown", "white", "black", "orange"];
|
|
65
|
-
const nouns = [
|
|
66
|
-
"table",
|
|
67
|
-
"chair",
|
|
68
|
-
"house",
|
|
69
|
-
"bbq",
|
|
70
|
-
"desk",
|
|
71
|
-
"car",
|
|
72
|
-
"pony",
|
|
73
|
-
"cookie",
|
|
74
|
-
"sandwich",
|
|
75
|
-
"burger",
|
|
76
|
-
"pizza",
|
|
77
|
-
"mouse",
|
|
78
|
-
"keyboard",
|
|
79
|
-
];
|
|
80
|
-
|
|
81
|
-
function append() {
|
|
82
|
-
$state.data = [...$state.data, ...buildData(1000)];
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function clear() {
|
|
86
|
-
$state.data = [];
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function partialUpdate() {
|
|
90
|
-
for (let i = 0; i < $state.data.length; i += 10) {
|
|
91
|
-
const row = $state.data[i];
|
|
92
|
-
row.label = row.label + " !!!";
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function remove(row) {
|
|
97
|
-
const clone = $state.data.slice();
|
|
98
|
-
clone.splice(clone.indexOf(row), 1);
|
|
99
|
-
$state.data = clone;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function create() {
|
|
103
|
-
// TODO: Build this up to 1000:
|
|
104
|
-
$state.data = buildData(10);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function createLots() {
|
|
108
|
-
$state.data = buildData(10000);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function swapRows() {
|
|
112
|
-
if ($state.data.length > 998) {
|
|
113
|
-
const clone = $state.data.slice();
|
|
114
|
-
const tmp = clone[1];
|
|
115
|
-
clone[1] = clone[998];
|
|
116
|
-
clone[998] = tmp;
|
|
117
|
-
$state.data = clone;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function _random(max) {
|
|
122
|
-
return Math.round(Math.random() * 1000) % max;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
class Item {
|
|
126
|
-
id = rowId++;
|
|
127
|
-
label = `${adjectives[_random(adjectives.length)]} ${colours[_random(colours.length)]} ${nouns[_random(nouns.length)]}`;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function buildData(count = 1000) {
|
|
131
|
-
const data = new Array(count);
|
|
132
|
-
for (let i = 0; i < count; i++) {
|
|
133
|
-
data[i] = $watch(new Item());
|
|
134
|
-
}
|
|
135
|
-
return data;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/* User interface */
|
|
139
|
-
const t_fragments: DocumentFragment[] = [];
|
|
140
|
-
|
|
141
|
-
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, `<div id="main" class="container"> <div class="jumbotron"> <div class="row"> <div class="col-md-6"> <h1>Torpor (keyed)</h1> </div> <div class="col-md-6"> <div class="row"> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="create">Create 1,000 rows</button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="createlots"> Create 10,000 rows </button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="append"> Append 1,000 rows </button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="update"> Update every 10th row </button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="clear">Clear</button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="swaprows">Swap Rows</button> </div> </div> </div> </div> </div> <table class="table table-hover table-striped test-data"> <tbody> <!> </tbody> </table> <span class="preloadicon glyphicon glyphicon-remove" aria-hidden="true"></span> </div>`);
|
|
142
|
-
const t_div_1 = t_root(t_fragment_0) as HTMLDivElement;
|
|
143
|
-
const t_button_1 = t_next(t_child(t_next(t_child(t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_child(t_div_1)))))))))))))) as HTMLElement;
|
|
144
|
-
const t_button_2 = t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_child(t_div_1)))))))))))))))) as HTMLElement;
|
|
145
|
-
const t_button_3 = t_next(t_child(t_next(t_next(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_child(t_div_1)))))))))))))))))) as HTMLElement;
|
|
146
|
-
const t_button_4 = t_next(t_child(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_child(t_div_1)))))))))))))))))))) as HTMLElement;
|
|
147
|
-
const t_button_5 = t_next(t_child(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_child(t_div_1)))))))))))))))))))))) as HTMLElement;
|
|
148
|
-
const t_button_6 = t_next(t_child(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_child(t_div_1)))))))))))))))))))))))) as HTMLElement;
|
|
149
|
-
const t_for_parent_1 = t_next(t_child(t_next(t_next(t_next(t_child(t_div_1)))))) as HTMLElement;
|
|
150
|
-
const t_for_anchor_1 = t_anchor(t_next(t_child(t_for_parent_1))) as HTMLElement;
|
|
151
|
-
|
|
152
|
-
/* @for */
|
|
153
|
-
let t_for_range_1 = t_range();
|
|
154
|
-
t_run_list(
|
|
155
|
-
t_for_range_1,
|
|
156
|
-
t_for_parent_1,
|
|
157
|
-
t_for_anchor_1,
|
|
158
|
-
function createNewItems() {
|
|
159
|
-
let t_new_items: ListItem[] = [];
|
|
160
|
-
for (let row of $state.data) {
|
|
161
|
-
t_new_items.push(t_list_item({ row }, row.id));
|
|
162
|
-
/*t_new_items.push({
|
|
163
|
-
key: row.id,
|
|
164
|
-
data: { row }
|
|
165
|
-
});*/
|
|
166
|
-
}
|
|
167
|
-
return t_new_items;
|
|
168
|
-
},
|
|
169
|
-
function createListItem(t_item, t_before) {
|
|
170
|
-
let t_old_range_1 = t_push_range(t_item, true);
|
|
171
|
-
const t_fragment_1 = t_fragment($parent.ownerDocument!, t_fragments, 1, ` <tr> <td class="col-md-1">#</td> <td class="col-md-4"> <a>#</a> </td> <td class="col-md-1"> <a> <span class="glyphicon glyphicon-remove" aria-hidden="true"></span> </a> </td> <td class="col-md-6"></td> </tr> `);
|
|
172
|
-
const t_root_1 = t_root(t_fragment_1);
|
|
173
|
-
const t_tr_1 = t_next(t_root_1) as HTMLElement;
|
|
174
|
-
const t_text_1 = t_child(t_next(t_child(t_tr_1)));
|
|
175
|
-
const t_a_1 = t_next(t_child(t_next(t_next(t_next(t_child(t_tr_1)))))) as HTMLElement;
|
|
176
|
-
const t_text_2 = t_child(t_a_1);
|
|
177
|
-
const t_a_2 = t_next(t_child(t_next(t_next(t_next(t_next(t_next(t_child(t_tr_1)))))))) as HTMLElement;
|
|
178
|
-
const t_text_3 = t_next(t_tr_1);
|
|
179
|
-
$run(function setClasses() {
|
|
180
|
-
t_tr_1.className = t_class({ danger: $state.selected === t_item.data.row.id });
|
|
181
|
-
});
|
|
182
|
-
$run(function setTextContent() {
|
|
183
|
-
t_text_1.textContent = t_fmt(t_item.data.row.id);
|
|
184
|
-
});
|
|
185
|
-
t_event(t_a_1, "click", () => $state.selected = t_item.data.row.id);
|
|
186
|
-
$run(function setTextContent() {
|
|
187
|
-
t_text_2.textContent = ` ${t_fmt(t_item.data.row.label)} `;
|
|
188
|
-
});
|
|
189
|
-
t_event(t_a_2, "click", () => remove(t_item.data.row));
|
|
190
|
-
t_add_fragment(t_fragment_1, t_for_parent_1, t_before);
|
|
191
|
-
t_next(t_text_3);
|
|
192
|
-
t_pop_range(t_old_range_1);
|
|
193
|
-
}
|
|
194
|
-
);
|
|
195
|
-
|
|
196
|
-
t_event(t_button_1, "click", create);
|
|
197
|
-
t_event(t_button_2, "click", createLots);
|
|
198
|
-
t_event(t_button_3, "click", append);
|
|
199
|
-
t_event(t_button_4, "click", partialUpdate);
|
|
200
|
-
t_event(t_button_5, "click", clear);
|
|
201
|
-
t_event(t_button_6, "click", swapRows);
|
|
202
|
-
t_add_fragment(t_fragment_0, $parent, $anchor);
|
|
203
|
-
|
|
204
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import $watch from "../../../../src/render/$watch";
|
|
2
|
-
import { type ServerSlotRender } from "../../../../src/types/ServerSlotRender";
|
|
3
|
-
import t_class from "../../../../src/render/getClasses";
|
|
4
|
-
import t_fmt from "../../../../src/render/formatText";
|
|
5
|
-
|
|
6
|
-
export default function Bench(
|
|
7
|
-
// @ts-ignore
|
|
8
|
-
$props?: Record<PropertyKey, any>,
|
|
9
|
-
// @ts-ignore
|
|
10
|
-
$context?: Record<PropertyKey, any>,
|
|
11
|
-
// @ts-ignore
|
|
12
|
-
$slots?: Record<string, ServerSlotRender>
|
|
13
|
-
) {
|
|
14
|
-
let rowId = 1;
|
|
15
|
-
let $state = $watch({
|
|
16
|
-
data: [],
|
|
17
|
-
selected: null,
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const adjectives = [
|
|
21
|
-
"pretty",
|
|
22
|
-
"large",
|
|
23
|
-
"big",
|
|
24
|
-
"small",
|
|
25
|
-
"tall",
|
|
26
|
-
"short",
|
|
27
|
-
"long",
|
|
28
|
-
"handsome",
|
|
29
|
-
"plain",
|
|
30
|
-
"quaint",
|
|
31
|
-
"clean",
|
|
32
|
-
"elegant",
|
|
33
|
-
"easy",
|
|
34
|
-
"angry",
|
|
35
|
-
"crazy",
|
|
36
|
-
"helpful",
|
|
37
|
-
"mushy",
|
|
38
|
-
"odd",
|
|
39
|
-
"unsightly",
|
|
40
|
-
"adorable",
|
|
41
|
-
"important",
|
|
42
|
-
"inexpensive",
|
|
43
|
-
"cheap",
|
|
44
|
-
"expensive",
|
|
45
|
-
"fancy",
|
|
46
|
-
];
|
|
47
|
-
const colours = ["red", "yellow", "blue", "green", "pink", "brown", "purple", "brown", "white", "black", "orange"];
|
|
48
|
-
const nouns = [
|
|
49
|
-
"table",
|
|
50
|
-
"chair",
|
|
51
|
-
"house",
|
|
52
|
-
"bbq",
|
|
53
|
-
"desk",
|
|
54
|
-
"car",
|
|
55
|
-
"pony",
|
|
56
|
-
"cookie",
|
|
57
|
-
"sandwich",
|
|
58
|
-
"burger",
|
|
59
|
-
"pizza",
|
|
60
|
-
"mouse",
|
|
61
|
-
"keyboard",
|
|
62
|
-
];
|
|
63
|
-
|
|
64
|
-
function append() {
|
|
65
|
-
$state.data = [...$state.data, ...buildData(1000)];
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function clear() {
|
|
69
|
-
$state.data = [];
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function partialUpdate() {
|
|
73
|
-
for (let i = 0; i < $state.data.length; i += 10) {
|
|
74
|
-
const row = $state.data[i];
|
|
75
|
-
row.label = row.label + " !!!";
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function remove(row) {
|
|
80
|
-
const clone = $state.data.slice();
|
|
81
|
-
clone.splice(clone.indexOf(row), 1);
|
|
82
|
-
$state.data = clone;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function create() {
|
|
86
|
-
// TODO: Build this up to 1000:
|
|
87
|
-
$state.data = buildData(10);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function createLots() {
|
|
91
|
-
$state.data = buildData(10000);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function swapRows() {
|
|
95
|
-
if ($state.data.length > 998) {
|
|
96
|
-
const clone = $state.data.slice();
|
|
97
|
-
const tmp = clone[1];
|
|
98
|
-
clone[1] = clone[998];
|
|
99
|
-
clone[998] = tmp;
|
|
100
|
-
$state.data = clone;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function _random(max) {
|
|
105
|
-
return Math.round(Math.random() * 1000) % max;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
class Item {
|
|
109
|
-
id = rowId++;
|
|
110
|
-
label = `${adjectives[_random(adjectives.length)]} ${colours[_random(colours.length)]} ${nouns[_random(nouns.length)]}`;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function buildData(count = 1000) {
|
|
114
|
-
const data = new Array(count);
|
|
115
|
-
for (let i = 0; i < count; i++) {
|
|
116
|
-
data[i] = $watch(new Item());
|
|
117
|
-
}
|
|
118
|
-
return data;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/* User interface */
|
|
122
|
-
let $output = "";
|
|
123
|
-
$output += `<div id="main" class="container"> <div class="jumbotron"> <div class="row"> <div class="col-md-6"> <h1>Torpor (keyed)</h1> </div> <div class="col-md-6"> <div class="row"> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="create">Create 1,000 rows</button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="createlots"> Create 10,000 rows </button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="append"> Append 1,000 rows </button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="update"> Update every 10th row </button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="clear">Clear</button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="swaprows">Swap Rows</button> </div> </div> </div> </div> </div> <table class="table table-hover table-striped test-data"> <tbody> <![>`;
|
|
124
|
-
for (let row of $state.data) {
|
|
125
|
-
$output += `<!^> <tr class="${t_class({ danger: $state.selected === row.id })}"> <td class="col-md-1">${t_fmt(row.id)}</td> <td class="col-md-4"> <a> ${t_fmt(row.label)} </a> </td> <td class="col-md-1"> <a> <span class="glyphicon glyphicon-remove" aria-hidden="true"></span> </a> </td> <td class="col-md-6"></td> </tr> `;
|
|
126
|
-
}
|
|
127
|
-
$output += `<!]><!> </tbody> </table> <span class="preloadicon glyphicon glyphicon-remove" aria-hidden="true"></span> </div>`;
|
|
128
|
-
|
|
129
|
-
return $output;
|
|
130
|
-
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import $run from "../../../../src/render/$run";
|
|
2
|
+
import $watch from "../../../../src/render/$watch";
|
|
3
|
+
import { type ListItem } from "../../../../src/types/ListItem";
|
|
4
|
+
import { type SlotRender } from "../../../../src/types/SlotRender";
|
|
5
|
+
import t_add_fragment from "../../../../src/render/addFragment";
|
|
6
|
+
import t_anchor from "../../../../src/render/nodeAnchor";
|
|
7
|
+
import t_child from "../../../../src/render/nodeChild";
|
|
8
|
+
import t_class from "../../../../src/render/getClasses";
|
|
9
|
+
import t_event from "../../../../src/render/addEvent";
|
|
10
|
+
import t_fmt from "../../../../src/render/formatText";
|
|
11
|
+
import t_fragment from "../../../../src/render/getFragment";
|
|
12
|
+
import t_list_item from "../../../../src/render/newListItem";
|
|
13
|
+
import t_next from "../../../../src/render/nodeNext";
|
|
14
|
+
import t_pop_range from "../../../../src/render/popRange";
|
|
15
|
+
import t_push_range from "../../../../src/render/pushRange";
|
|
16
|
+
import t_range from "../../../../src/render/newRange";
|
|
17
|
+
import t_root from "../../../../src/render/nodeRoot";
|
|
18
|
+
import t_run_list from "../../../../src/render/runList";
|
|
19
|
+
|
|
20
|
+
export default function Bench(
|
|
21
|
+
$parent: ParentNode,
|
|
22
|
+
$anchor: Node | null,
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
$props?: Record<PropertyKey, any>,
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
$context?: Record<PropertyKey, any>,
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
$slots?: Record<string, SlotRender>
|
|
29
|
+
) {
|
|
30
|
+
|
|
31
|
+
let rowId = 1;
|
|
32
|
+
let $state = $watch({
|
|
33
|
+
data: [],
|
|
34
|
+
selected: null,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const adjectives = [
|
|
38
|
+
"pretty",
|
|
39
|
+
"large",
|
|
40
|
+
"big",
|
|
41
|
+
"small",
|
|
42
|
+
"tall",
|
|
43
|
+
"short",
|
|
44
|
+
"long",
|
|
45
|
+
"handsome",
|
|
46
|
+
"plain",
|
|
47
|
+
"quaint",
|
|
48
|
+
"clean",
|
|
49
|
+
"elegant",
|
|
50
|
+
"easy",
|
|
51
|
+
"angry",
|
|
52
|
+
"crazy",
|
|
53
|
+
"helpful",
|
|
54
|
+
"mushy",
|
|
55
|
+
"odd",
|
|
56
|
+
"unsightly",
|
|
57
|
+
"adorable",
|
|
58
|
+
"important",
|
|
59
|
+
"inexpensive",
|
|
60
|
+
"cheap",
|
|
61
|
+
"expensive",
|
|
62
|
+
"fancy",
|
|
63
|
+
];
|
|
64
|
+
const colours = ["red", "yellow", "blue", "green", "pink", "brown", "purple", "brown", "white", "black", "orange"];
|
|
65
|
+
const nouns = [
|
|
66
|
+
"table",
|
|
67
|
+
"chair",
|
|
68
|
+
"house",
|
|
69
|
+
"bbq",
|
|
70
|
+
"desk",
|
|
71
|
+
"car",
|
|
72
|
+
"pony",
|
|
73
|
+
"cookie",
|
|
74
|
+
"sandwich",
|
|
75
|
+
"burger",
|
|
76
|
+
"pizza",
|
|
77
|
+
"mouse",
|
|
78
|
+
"keyboard",
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
function append() {
|
|
82
|
+
$state.data = [...$state.data, ...buildData(1000)];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function clear() {
|
|
86
|
+
$state.data = [];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function partialUpdate() {
|
|
90
|
+
for (let i = 0; i < $state.data.length; i += 10) {
|
|
91
|
+
const row = $state.data[i];
|
|
92
|
+
row.label = row.label + " !!!";
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function remove(row) {
|
|
97
|
+
const clone = $state.data.slice();
|
|
98
|
+
clone.splice(clone.indexOf(row), 1);
|
|
99
|
+
$state.data = clone;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function create() {
|
|
103
|
+
// TODO: Build this up to 1000:
|
|
104
|
+
$state.data = buildData(10);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function createLots() {
|
|
108
|
+
$state.data = buildData(10000);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function swapRows() {
|
|
112
|
+
if ($state.data.length > 998) {
|
|
113
|
+
const clone = $state.data.slice();
|
|
114
|
+
const tmp = clone[1];
|
|
115
|
+
clone[1] = clone[998];
|
|
116
|
+
clone[998] = tmp;
|
|
117
|
+
$state.data = clone;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function _random(max) {
|
|
122
|
+
return Math.round(Math.random() * 1000) % max;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
class Item {
|
|
126
|
+
id = rowId++;
|
|
127
|
+
label = `${adjectives[_random(adjectives.length)]} ${colours[_random(colours.length)]} ${nouns[_random(nouns.length)]}`;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function buildData(count = 1000) {
|
|
131
|
+
const data = new Array(count);
|
|
132
|
+
for (let i = 0; i < count; i++) {
|
|
133
|
+
data[i] = $watch(new Item());
|
|
134
|
+
}
|
|
135
|
+
return data;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* User interface */
|
|
139
|
+
const t_fragments: DocumentFragment[] = [];
|
|
140
|
+
|
|
141
|
+
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, `<div id="main" class="container"> <div class="jumbotron"> <div class="row"> <div class="col-md-6"> <h1>Torpor (keyed)</h1> </div> <div class="col-md-6"> <div class="row"> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="create">Create 1,000 rows</button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="createlots"> Create 10,000 rows </button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="append"> Append 1,000 rows </button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="update"> Update every 10th row </button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="clear">Clear</button> </div> <div class="col-sm-6 smallpad"> <button type="button" class="btn btn-primary btn-block" id="swaprows">Swap Rows</button> </div> </div> </div> </div> </div> <table class="table table-hover table-striped test-data"> <tbody> <!> </tbody> </table> <span class="preloadicon glyphicon glyphicon-remove" aria-hidden="true"></span> </div>`);
|
|
142
|
+
// @ts-ignore
|
|
143
|
+
const t_div_1 = t_root(t_fragment_0) as HTMLDivElement;
|
|
144
|
+
const t_button_1 = t_next(t_child(t_next(t_child(t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_child(t_div_1)))))))))))))) as HTMLElement;
|
|
145
|
+
const t_button_2 = t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_child(t_div_1)))))))))))))))) as HTMLElement;
|
|
146
|
+
const t_button_3 = t_next(t_child(t_next(t_next(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_child(t_div_1)))))))))))))))))) as HTMLElement;
|
|
147
|
+
const t_button_4 = t_next(t_child(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_child(t_div_1)))))))))))))))))))) as HTMLElement;
|
|
148
|
+
const t_button_5 = t_next(t_child(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_child(t_div_1)))))))))))))))))))))) as HTMLElement;
|
|
149
|
+
const t_button_6 = t_next(t_child(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_next(t_next(t_child(t_next(t_child(t_next(t_child(t_div_1)))))))))))))))))))))))) as HTMLElement;
|
|
150
|
+
const t_for_parent_1 = t_next(t_child(t_next(t_next(t_next(t_child(t_div_1)))))) as HTMLElement;
|
|
151
|
+
const t_for_anchor_1 = t_anchor(t_next(t_child(t_for_parent_1))) as HTMLElement;
|
|
152
|
+
|
|
153
|
+
/* @for */
|
|
154
|
+
let t_for_range_1 = t_range();
|
|
155
|
+
t_run_list(
|
|
156
|
+
t_for_range_1,
|
|
157
|
+
t_for_parent_1,
|
|
158
|
+
t_for_anchor_1,
|
|
159
|
+
function createNewItems() {
|
|
160
|
+
let t_new_items: ListItem[] = [];
|
|
161
|
+
for (let row of $state.data) {
|
|
162
|
+
t_new_items.push(t_list_item({ row }, row.id));
|
|
163
|
+
/*t_new_items.push({
|
|
164
|
+
key: row.id,
|
|
165
|
+
data: { row }
|
|
166
|
+
});*/
|
|
167
|
+
}
|
|
168
|
+
return t_new_items;
|
|
169
|
+
},
|
|
170
|
+
function createListItem(t_item, t_before) {
|
|
171
|
+
let t_old_range_1 = t_push_range(t_item, true);
|
|
172
|
+
const t_fragment_1 = t_fragment($parent.ownerDocument!, t_fragments, 1, ` <tr> <td class="col-md-1">#</td> <td class="col-md-4"> <a>#</a> </td> <td class="col-md-1"> <a> <span class="glyphicon glyphicon-remove" aria-hidden="true"></span> </a> </td> <td class="col-md-6"></td> </tr> `);
|
|
173
|
+
// @ts-ignore
|
|
174
|
+
const t_root_1 = t_root(t_fragment_1);
|
|
175
|
+
const t_tr_1 = t_next(t_root_1) as HTMLElement;
|
|
176
|
+
const t_text_1 = t_child(t_next(t_child(t_tr_1)));
|
|
177
|
+
const t_a_1 = t_next(t_child(t_next(t_next(t_next(t_child(t_tr_1)))))) as HTMLElement;
|
|
178
|
+
const t_text_2 = t_child(t_a_1);
|
|
179
|
+
const t_a_2 = t_next(t_child(t_next(t_next(t_next(t_next(t_next(t_child(t_tr_1)))))))) as HTMLElement;
|
|
180
|
+
// @ts-ignore
|
|
181
|
+
const t_text_3 = t_next(t_tr_1);
|
|
182
|
+
$run(function setClasses() {
|
|
183
|
+
t_tr_1.className = t_class({ danger: $state.selected === t_item.data.row.id });
|
|
184
|
+
});
|
|
185
|
+
$run(function setTextContent() {
|
|
186
|
+
t_text_1.textContent = t_fmt(t_item.data.row.id);
|
|
187
|
+
});
|
|
188
|
+
t_event(t_a_1, "click", () => $state.selected = t_item.data.row.id);
|
|
189
|
+
$run(function setTextContent() {
|
|
190
|
+
t_text_2.textContent = ` ${t_fmt(t_item.data.row.label)} `;
|
|
191
|
+
});
|
|
192
|
+
t_event(t_a_2, "click", () => remove(t_item.data.row));
|
|
193
|
+
t_add_fragment(t_fragment_1, t_for_parent_1, t_before);
|
|
194
|
+
t_next(t_text_3);
|
|
195
|
+
t_pop_range(t_old_range_1);
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
|
|
199
|
+
t_event(t_button_1, "click", create);
|
|
200
|
+
t_event(t_button_2, "click", createLots);
|
|
201
|
+
t_event(t_button_3, "click", append);
|
|
202
|
+
t_event(t_button_4, "click", partialUpdate);
|
|
203
|
+
t_event(t_button_5, "click", clear);
|
|
204
|
+
t_event(t_button_6, "click", swapRows);
|
|
205
|
+
t_add_fragment(t_fragment_0, $parent, $anchor);
|
|
206
|
+
t_next(t_div_1);
|
|
207
|
+
|
|
208
|
+
}
|