tutuca 0.9.72 → 0.9.75
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/dist/tutuca-dev.ext.js +189 -389
- package/dist/tutuca-dev.js +82 -0
- package/dist/tutuca-dev.min.js +2 -2
- package/dist/tutuca-extra.ext.js +101 -194
- package/dist/tutuca.ext.js +101 -10
- package/package.json +3 -2
- package/skill/tutuca-source/tutuca.ext.js +101 -10
package/dist/tutuca-dev.ext.js
CHANGED
|
@@ -1,159 +1,5 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
function __accessProp(key) {
|
|
5
|
-
return this[key];
|
|
6
|
-
}
|
|
7
|
-
var __reExport = (target, mod, secondTarget) => {
|
|
8
|
-
var keys = __getOwnPropNames(mod);
|
|
9
|
-
for (let key of keys)
|
|
10
|
-
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
11
|
-
__defProp(target, key, {
|
|
12
|
-
get: __accessProp.bind(mod, key),
|
|
13
|
-
enumerable: true
|
|
14
|
-
});
|
|
15
|
-
if (secondTarget) {
|
|
16
|
-
for (let key of keys)
|
|
17
|
-
if (!__hasOwnProp.call(secondTarget, key) && key !== "default")
|
|
18
|
-
__defProp(secondTarget, key, {
|
|
19
|
-
get: __accessProp.bind(mod, key),
|
|
20
|
-
enumerable: true
|
|
21
|
-
});
|
|
22
|
-
return secondTarget;
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
var __returnValue = (v) => v;
|
|
26
|
-
function __exportSetter(name, newValue) {
|
|
27
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
-
}
|
|
29
|
-
var __export = (target, all) => {
|
|
30
|
-
for (var name in all)
|
|
31
|
-
__defProp(target, name, {
|
|
32
|
-
get: all[name],
|
|
33
|
-
enumerable: true,
|
|
34
|
-
configurable: true,
|
|
35
|
-
set: __exportSetter.bind(all, name)
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
|
|
39
1
|
// dev.js
|
|
40
|
-
|
|
41
|
-
__export(exports_dev, {
|
|
42
|
-
tutuca: () => tutuca,
|
|
43
|
-
test: () => test3,
|
|
44
|
-
suggestionToMessage: () => suggestionToMessage,
|
|
45
|
-
runTests: () => runTests,
|
|
46
|
-
reportTestReportToConsole: () => reportTestReportToConsole,
|
|
47
|
-
makeCollector: () => makeCollector,
|
|
48
|
-
macro: () => macro,
|
|
49
|
-
lintIdToMessage: () => lintIdToMessage,
|
|
50
|
-
isOMap: () => isOrderedMap,
|
|
51
|
-
isIMap: () => isMap,
|
|
52
|
-
injectCss: () => injectCss,
|
|
53
|
-
html: () => html,
|
|
54
|
-
getComponentsDocs: () => getComponentsDocs,
|
|
55
|
-
docComponents: () => docComponents,
|
|
56
|
-
css: () => css,
|
|
57
|
-
component: () => component,
|
|
58
|
-
compileClassesToStyleText: () => compileClassesToStyleText,
|
|
59
|
-
compileClassesToStyle: () => compileClassesToStyle,
|
|
60
|
-
collectIterBindings: () => collectIterBindings2,
|
|
61
|
-
checkComponent: () => checkComponent,
|
|
62
|
-
check: () => check2,
|
|
63
|
-
UNSUPPORTED_EXPR_SYNTAX: () => UNSUPPORTED_EXPR_SYNTAX,
|
|
64
|
-
UNKNOWN_X_OP: () => UNKNOWN_X_OP,
|
|
65
|
-
UNKNOWN_X_ATTR: () => UNKNOWN_X_ATTR,
|
|
66
|
-
UNKNOWN_REQUEST_NAME: () => UNKNOWN_REQUEST_NAME,
|
|
67
|
-
UNKNOWN_MACRO_ARG: () => UNKNOWN_MACRO_ARG,
|
|
68
|
-
UNKNOWN_HANDLER_ARG_NAME: () => UNKNOWN_HANDLER_ARG_NAME,
|
|
69
|
-
UNKNOWN_EVENT_MODIFIER: () => UNKNOWN_EVENT_MODIFIER,
|
|
70
|
-
UNKNOWN_DIRECTIVE: () => UNKNOWN_DIRECTIVE,
|
|
71
|
-
UNKNOWN_COMPONENT_SPEC_KEY: () => UNKNOWN_COMPONENT_SPEC_KEY,
|
|
72
|
-
UNKNOWN_COMPONENT_NAME: () => UNKNOWN_COMPONENT_NAME,
|
|
73
|
-
TestResult: () => TestResult,
|
|
74
|
-
TestReport: () => TestReport,
|
|
75
|
-
TestIndex: () => TestIndex,
|
|
76
|
-
Test: () => Test,
|
|
77
|
-
SEQ_INFO: () => SEQ_INFO,
|
|
78
|
-
RenderedSection: () => RenderedSection,
|
|
79
|
-
RenderedExample: () => RenderedExample,
|
|
80
|
-
RenderBatch: () => RenderBatch,
|
|
81
|
-
RENDER_IT_OUTSIDE_OF_LOOP: () => RENDER_IT_OUTSIDE_OF_LOOP,
|
|
82
|
-
REDUNDANT_TEMPLATE_STRING: () => REDUNDANT_TEMPLATE_STRING,
|
|
83
|
-
ParseContext: () => ParseContext,
|
|
84
|
-
PLACEHOLDERLESS_TEMPLATE_STRING: () => PLACEHOLDERLESS_TEMPLATE_STRING,
|
|
85
|
-
OMap: () => OrderedMap2,
|
|
86
|
-
ModuleTests: () => ModuleTests,
|
|
87
|
-
ModuleTestReport: () => ModuleTestReport,
|
|
88
|
-
ModuleInfo: () => ModuleInfo,
|
|
89
|
-
METHOD_VAL_NOT_DEFINED: () => METHOD_VAL_NOT_DEFINED,
|
|
90
|
-
METHOD_VAL_IS_FIELD: () => METHOD_VAL_IS_FIELD,
|
|
91
|
-
MAYBE_DROP_AT_PREFIX: () => MAYBE_DROP_AT_PREFIX,
|
|
92
|
-
MAYBE_ADD_AT_PREFIX: () => MAYBE_ADD_AT_PREFIX,
|
|
93
|
-
LintReport: () => LintReport,
|
|
94
|
-
LintParseContext: () => LintParseContext,
|
|
95
|
-
LintFinding: () => LintFinding,
|
|
96
|
-
LintContext: () => LintContext,
|
|
97
|
-
LintComponentResult: () => LintComponentResult,
|
|
98
|
-
LintClassCollectorCtx: () => LintClassCollectorCtx,
|
|
99
|
-
KList: () => KList,
|
|
100
|
-
ISet: () => Set2,
|
|
101
|
-
INPUT_HANDLER_NOT_REFERENCED: () => INPUT_HANDLER_NOT_REFERENCED,
|
|
102
|
-
INPUT_HANDLER_NOT_IMPLEMENTED: () => INPUT_HANDLER_NOT_IMPLEMENTED,
|
|
103
|
-
INPUT_HANDLER_METHOD_NOT_IMPLEMENTED: () => INPUT_HANDLER_METHOD_NOT_IMPLEMENTED,
|
|
104
|
-
INPUT_HANDLER_METHOD_FOR_INPUT_HANDLER: () => INPUT_HANDLER_METHOD_FOR_INPUT_HANDLER,
|
|
105
|
-
INPUT_HANDLER_FOR_INPUT_HANDLER_METHOD: () => INPUT_HANDLER_FOR_INPUT_HANDLER_METHOD,
|
|
106
|
-
IMap: () => Map2,
|
|
107
|
-
IF_NO_BRANCH_SET: () => IF_NO_BRANCH_SET,
|
|
108
|
-
FIELD_VAL_NOT_DEFINED: () => FIELD_VAL_NOT_DEFINED,
|
|
109
|
-
FIELD_VAL_IS_METHOD: () => FIELD_VAL_IS_METHOD,
|
|
110
|
-
FIELD_CLASS: () => FIELD_CLASS,
|
|
111
|
-
ExampleIndex: () => ExampleIndex,
|
|
112
|
-
DescribeResult: () => DescribeResult,
|
|
113
|
-
Describe: () => Describe,
|
|
114
|
-
DYN_VAL_NOT_DEFINED: () => DYN_VAL_NOT_DEFINED,
|
|
115
|
-
DYN_ALIAS_NOT_REFERENCED: () => DYN_ALIAS_NOT_REFERENCED,
|
|
116
|
-
DUPLICATE_ATTR_DEFINITION: () => DUPLICATE_ATTR_DEFINITION,
|
|
117
|
-
ComponentSummary: () => ComponentSummary,
|
|
118
|
-
ComponentList: () => ComponentList,
|
|
119
|
-
ComponentDocs: () => ComponentDocs,
|
|
120
|
-
COMP_FIELD_BAD_SHAPE: () => COMP_FIELD_BAD_SHAPE,
|
|
121
|
-
BAD_VALUE: () => BAD_VALUE,
|
|
122
|
-
ALT_HANDLER_NOT_REFERENCED: () => ALT_HANDLER_NOT_REFERENCED,
|
|
123
|
-
ALT_HANDLER_NOT_DEFINED: () => ALT_HANDLER_NOT_DEFINED
|
|
124
|
-
});
|
|
125
|
-
import { expect } from "chai";
|
|
126
|
-
|
|
127
|
-
// src/anode.js
|
|
128
|
-
var exports_anode = {};
|
|
129
|
-
__export(exports_anode, {
|
|
130
|
-
compileModifiers: () => compileModifiers,
|
|
131
|
-
WrapperNode: () => WrapperNode,
|
|
132
|
-
View: () => View,
|
|
133
|
-
TextNode: () => TextNode,
|
|
134
|
-
SlotNode: () => SlotNode,
|
|
135
|
-
ShowNode: () => ShowNode,
|
|
136
|
-
ScopeNode: () => ScopeNode,
|
|
137
|
-
RenderTextNode: () => RenderTextNode,
|
|
138
|
-
RenderOnceNode: () => RenderOnceNode,
|
|
139
|
-
RenderNode: () => RenderNode,
|
|
140
|
-
RenderItNode: () => RenderItNode,
|
|
141
|
-
RenderEachNode: () => RenderEachNode,
|
|
142
|
-
PushViewNameNode: () => PushViewNameNode,
|
|
143
|
-
ParseContext: () => ParseContext,
|
|
144
|
-
NodeEvents: () => NodeEvents,
|
|
145
|
-
MacroNode: () => MacroNode,
|
|
146
|
-
Macro: () => Macro,
|
|
147
|
-
MOD_WRAPPERS_BY_EVENT: () => MOD_WRAPPERS_BY_EVENT,
|
|
148
|
-
IterInfo: () => IterInfo,
|
|
149
|
-
HideNode: () => HideNode,
|
|
150
|
-
FragmentNode: () => FragmentNode,
|
|
151
|
-
EachNode: () => EachNode,
|
|
152
|
-
DomNode: () => DomNode,
|
|
153
|
-
CommentNode: () => CommentNode,
|
|
154
|
-
BaseNode: () => BaseNode,
|
|
155
|
-
ANode: () => ANode
|
|
156
|
-
});
|
|
2
|
+
import { expect, use } from "chai";
|
|
157
3
|
|
|
158
4
|
// src/value.js
|
|
159
5
|
import { is } from "immutable";
|
|
@@ -2455,12 +2301,88 @@ function compileModifiers(eventName, names) {
|
|
|
2455
2301
|
};
|
|
2456
2302
|
}
|
|
2457
2303
|
|
|
2304
|
+
// src/chai-jest.js
|
|
2305
|
+
function jestMatchers(chai, utils) {
|
|
2306
|
+
const A = chai.Assertion;
|
|
2307
|
+
const m = (name, fn) => A.addMethod(name, fn);
|
|
2308
|
+
m("toBe", function(expected) {
|
|
2309
|
+
this.assert(Object.is(this._obj, expected), "expected #{this} to be #{exp}", "expected #{this} not to be #{exp}", expected, this._obj);
|
|
2310
|
+
});
|
|
2311
|
+
m("toEqual", function(expected) {
|
|
2312
|
+
this.assert(utils.eql(this._obj, expected), "expected #{this} to deeply equal #{exp}", "expected #{this} not to deeply equal #{exp}", expected, this._obj, true);
|
|
2313
|
+
});
|
|
2314
|
+
m("toBeTruthy", function() {
|
|
2315
|
+
this.assert(Boolean(this._obj), "expected #{this} to be truthy", "expected #{this} not to be truthy");
|
|
2316
|
+
});
|
|
2317
|
+
m("toBeFalsy", function() {
|
|
2318
|
+
this.assert(!this._obj, "expected #{this} to be falsy", "expected #{this} not to be falsy");
|
|
2319
|
+
});
|
|
2320
|
+
m("toBeNull", function() {
|
|
2321
|
+
this.assert(this._obj === null, "expected #{this} to be null", "expected #{this} not to be null");
|
|
2322
|
+
});
|
|
2323
|
+
m("toBeUndefined", function() {
|
|
2324
|
+
this.assert(this._obj === undefined, "expected #{this} to be undefined", "expected #{this} not to be undefined");
|
|
2325
|
+
});
|
|
2326
|
+
m("toBeDefined", function() {
|
|
2327
|
+
this.assert(this._obj !== undefined, "expected #{this} to be defined", "expected #{this} to be undefined");
|
|
2328
|
+
});
|
|
2329
|
+
m("toBeNaN", function() {
|
|
2330
|
+
this.assert(Number.isNaN(this._obj), "expected #{this} to be NaN", "expected #{this} not to be NaN");
|
|
2331
|
+
});
|
|
2332
|
+
const compare = (name, op, word) => m(name, function(expected) {
|
|
2333
|
+
this.assert(op(this._obj, expected), `expected #{this} to be ${word} #{exp}`, `expected #{this} not to be ${word} #{exp}`, expected);
|
|
2334
|
+
});
|
|
2335
|
+
compare("toBeGreaterThan", (a, b) => a > b, "greater than");
|
|
2336
|
+
compare("toBeGreaterThanOrEqual", (a, b) => a >= b, "greater than or equal to");
|
|
2337
|
+
compare("toBeLessThan", (a, b) => a < b, "less than");
|
|
2338
|
+
compare("toBeLessThanOrEqual", (a, b) => a <= b, "less than or equal to");
|
|
2339
|
+
m("toBeCloseTo", function(expected, numDigits = 2) {
|
|
2340
|
+
const pass = Math.abs(expected - this._obj) < 10 ** -numDigits / 2;
|
|
2341
|
+
this.assert(pass, `expected #{this} to be close to #{exp} (${numDigits} digits)`, `expected #{this} not to be close to #{exp} (${numDigits} digits)`, expected);
|
|
2342
|
+
});
|
|
2343
|
+
m("toContain", function(item) {
|
|
2344
|
+
const obj = this._obj;
|
|
2345
|
+
const ok = typeof obj === "string" ? obj.includes(item) : Array.from(obj).includes(item);
|
|
2346
|
+
this.assert(ok, "expected #{this} to contain #{exp}", "expected #{this} not to contain #{exp}", item);
|
|
2347
|
+
});
|
|
2348
|
+
m("toHaveLength", function(length) {
|
|
2349
|
+
const actual = this._obj == null ? undefined : this._obj.length;
|
|
2350
|
+
this.assert(actual === length, "expected #{this} to have length #{exp}", "expected #{this} not to have length #{exp}", length, actual);
|
|
2351
|
+
});
|
|
2352
|
+
m("toMatch", function(expected) {
|
|
2353
|
+
const obj = this._obj;
|
|
2354
|
+
const ok = expected instanceof RegExp ? expected.test(obj) : String(obj).includes(expected);
|
|
2355
|
+
this.assert(ok, "expected #{this} to match #{exp}", "expected #{this} not to match #{exp}", expected);
|
|
2356
|
+
});
|
|
2357
|
+
m("toHaveProperty", function(path, ...rest) {
|
|
2358
|
+
const keys = Array.isArray(path) ? path : String(path).split(".");
|
|
2359
|
+
let cur = this._obj;
|
|
2360
|
+
let found = true;
|
|
2361
|
+
for (const k of keys) {
|
|
2362
|
+
if (cur != null && k in Object(cur))
|
|
2363
|
+
cur = cur[k];
|
|
2364
|
+
else {
|
|
2365
|
+
found = false;
|
|
2366
|
+
break;
|
|
2367
|
+
}
|
|
2368
|
+
}
|
|
2369
|
+
const pass = found && (rest.length === 0 || utils.eql(cur, rest[0]));
|
|
2370
|
+
this.assert(pass, "expected #{this} to have property #{exp}", "expected #{this} not to have property #{exp}", path);
|
|
2371
|
+
});
|
|
2372
|
+
m("toBeInstanceOf", function(ctor) {
|
|
2373
|
+
this.assert(this._obj instanceof ctor, "expected #{this} to be an instance of #{exp}", "expected #{this} not to be an instance of #{exp}", ctor.name ?? ctor);
|
|
2374
|
+
});
|
|
2375
|
+
m("toThrow", function(expected) {
|
|
2376
|
+
const a = new chai.Assertion(this._obj);
|
|
2377
|
+
if (utils.flag(this, "negate")) {
|
|
2378
|
+
expected === undefined ? a.to.not.throw() : a.to.not.throw(expected);
|
|
2379
|
+
} else {
|
|
2380
|
+
expected === undefined ? a.to.throw() : a.to.throw(expected);
|
|
2381
|
+
}
|
|
2382
|
+
});
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2458
2385
|
// src/util/parsectx.js
|
|
2459
|
-
var exports_parsectx = {};
|
|
2460
|
-
__export(exports_parsectx, {
|
|
2461
|
-
collectAppClassesInSet: () => collectAppClassesInSet,
|
|
2462
|
-
ParseCtxClassSetCollector: () => ParseCtxClassSetCollector
|
|
2463
|
-
});
|
|
2464
2386
|
class ParseCtxClassSetCollector extends ParseContext {
|
|
2465
2387
|
constructor(...args) {
|
|
2466
2388
|
super(...args);
|
|
@@ -2516,58 +2438,6 @@ class ParseCtxClassSetCollector extends ParseContext {
|
|
|
2516
2438
|
return false;
|
|
2517
2439
|
}
|
|
2518
2440
|
}
|
|
2519
|
-
function collectAppClassesInSet(app) {
|
|
2520
|
-
const classes = new Set;
|
|
2521
|
-
for (const Comp of app.comps.byId.values()) {
|
|
2522
|
-
for (const key in Comp.views) {
|
|
2523
|
-
const view = Comp.views[key];
|
|
2524
|
-
for (const name of view.ctx.classes) {
|
|
2525
|
-
classes.add(name);
|
|
2526
|
-
}
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
return classes;
|
|
2530
|
-
}
|
|
2531
|
-
|
|
2532
|
-
// tools/core/lint-check.js
|
|
2533
|
-
var exports_lint_check = {};
|
|
2534
|
-
__export(exports_lint_check, {
|
|
2535
|
-
checkComponent: () => checkComponent,
|
|
2536
|
-
UNSUPPORTED_EXPR_SYNTAX: () => UNSUPPORTED_EXPR_SYNTAX,
|
|
2537
|
-
UNKNOWN_X_OP: () => UNKNOWN_X_OP,
|
|
2538
|
-
UNKNOWN_X_ATTR: () => UNKNOWN_X_ATTR,
|
|
2539
|
-
UNKNOWN_REQUEST_NAME: () => UNKNOWN_REQUEST_NAME,
|
|
2540
|
-
UNKNOWN_MACRO_ARG: () => UNKNOWN_MACRO_ARG,
|
|
2541
|
-
UNKNOWN_HANDLER_ARG_NAME: () => UNKNOWN_HANDLER_ARG_NAME,
|
|
2542
|
-
UNKNOWN_EVENT_MODIFIER: () => UNKNOWN_EVENT_MODIFIER,
|
|
2543
|
-
UNKNOWN_DIRECTIVE: () => UNKNOWN_DIRECTIVE,
|
|
2544
|
-
UNKNOWN_COMPONENT_SPEC_KEY: () => UNKNOWN_COMPONENT_SPEC_KEY,
|
|
2545
|
-
UNKNOWN_COMPONENT_NAME: () => UNKNOWN_COMPONENT_NAME,
|
|
2546
|
-
RENDER_IT_OUTSIDE_OF_LOOP: () => RENDER_IT_OUTSIDE_OF_LOOP,
|
|
2547
|
-
REDUNDANT_TEMPLATE_STRING: () => REDUNDANT_TEMPLATE_STRING,
|
|
2548
|
-
PLACEHOLDERLESS_TEMPLATE_STRING: () => PLACEHOLDERLESS_TEMPLATE_STRING,
|
|
2549
|
-
METHOD_VAL_NOT_DEFINED: () => METHOD_VAL_NOT_DEFINED,
|
|
2550
|
-
METHOD_VAL_IS_FIELD: () => METHOD_VAL_IS_FIELD,
|
|
2551
|
-
MAYBE_DROP_AT_PREFIX: () => MAYBE_DROP_AT_PREFIX,
|
|
2552
|
-
MAYBE_ADD_AT_PREFIX: () => MAYBE_ADD_AT_PREFIX,
|
|
2553
|
-
LintParseContext: () => LintParseContext,
|
|
2554
|
-
LintContext: () => LintContext,
|
|
2555
|
-
INPUT_HANDLER_NOT_REFERENCED: () => INPUT_HANDLER_NOT_REFERENCED,
|
|
2556
|
-
INPUT_HANDLER_NOT_IMPLEMENTED: () => INPUT_HANDLER_NOT_IMPLEMENTED,
|
|
2557
|
-
INPUT_HANDLER_METHOD_NOT_IMPLEMENTED: () => INPUT_HANDLER_METHOD_NOT_IMPLEMENTED,
|
|
2558
|
-
INPUT_HANDLER_METHOD_FOR_INPUT_HANDLER: () => INPUT_HANDLER_METHOD_FOR_INPUT_HANDLER,
|
|
2559
|
-
INPUT_HANDLER_FOR_INPUT_HANDLER_METHOD: () => INPUT_HANDLER_FOR_INPUT_HANDLER_METHOD,
|
|
2560
|
-
IF_NO_BRANCH_SET: () => IF_NO_BRANCH_SET,
|
|
2561
|
-
FIELD_VAL_NOT_DEFINED: () => FIELD_VAL_NOT_DEFINED,
|
|
2562
|
-
FIELD_VAL_IS_METHOD: () => FIELD_VAL_IS_METHOD,
|
|
2563
|
-
DYN_VAL_NOT_DEFINED: () => DYN_VAL_NOT_DEFINED,
|
|
2564
|
-
DYN_ALIAS_NOT_REFERENCED: () => DYN_ALIAS_NOT_REFERENCED,
|
|
2565
|
-
DUPLICATE_ATTR_DEFINITION: () => DUPLICATE_ATTR_DEFINITION,
|
|
2566
|
-
COMP_FIELD_BAD_SHAPE: () => COMP_FIELD_BAD_SHAPE,
|
|
2567
|
-
BAD_VALUE: () => BAD_VALUE,
|
|
2568
|
-
ALT_HANDLER_NOT_REFERENCED: () => ALT_HANDLER_NOT_REFERENCED,
|
|
2569
|
-
ALT_HANDLER_NOT_DEFINED: () => ALT_HANDLER_NOT_DEFINED
|
|
2570
|
-
});
|
|
2571
2441
|
|
|
2572
2442
|
// tools/core/html-tokenizer.js
|
|
2573
2443
|
var CharCodes = {
|
|
@@ -5507,32 +5377,7 @@ class LintParseContext extends ParseContext {
|
|
|
5507
5377
|
}
|
|
5508
5378
|
}
|
|
5509
5379
|
|
|
5510
|
-
// tools/core/test.js
|
|
5511
|
-
var exports_test = {};
|
|
5512
|
-
__export(exports_test, {
|
|
5513
|
-
runTests: () => runTests
|
|
5514
|
-
});
|
|
5515
|
-
|
|
5516
5380
|
// tools/core/results.js
|
|
5517
|
-
var exports_results = {};
|
|
5518
|
-
__export(exports_results, {
|
|
5519
|
-
TestResult: () => TestResult,
|
|
5520
|
-
TestReport: () => TestReport,
|
|
5521
|
-
RenderedSection: () => RenderedSection,
|
|
5522
|
-
RenderedExample: () => RenderedExample,
|
|
5523
|
-
RenderBatch: () => RenderBatch,
|
|
5524
|
-
ModuleTestReport: () => ModuleTestReport,
|
|
5525
|
-
ModuleInfo: () => ModuleInfo,
|
|
5526
|
-
LintReport: () => LintReport,
|
|
5527
|
-
LintFinding: () => LintFinding,
|
|
5528
|
-
LintComponentResult: () => LintComponentResult,
|
|
5529
|
-
ExampleIndex: () => ExampleIndex,
|
|
5530
|
-
DescribeResult: () => DescribeResult,
|
|
5531
|
-
ComponentSummary: () => ComponentSummary,
|
|
5532
|
-
ComponentList: () => ComponentList,
|
|
5533
|
-
ComponentDocs: () => ComponentDocs
|
|
5534
|
-
});
|
|
5535
|
-
|
|
5536
5381
|
class ModuleInfo {
|
|
5537
5382
|
constructor({ path = null, present = new Set, counts = {}, warnings = [] }) {
|
|
5538
5383
|
this.path = path;
|
|
@@ -5683,15 +5528,6 @@ class TestReport {
|
|
|
5683
5528
|
}
|
|
5684
5529
|
|
|
5685
5530
|
// tools/core/tests.js
|
|
5686
|
-
var exports_tests = {};
|
|
5687
|
-
__export(exports_tests, {
|
|
5688
|
-
makeCollector: () => makeCollector,
|
|
5689
|
-
TestIndex: () => TestIndex,
|
|
5690
|
-
Test: () => Test,
|
|
5691
|
-
ModuleTests: () => ModuleTests,
|
|
5692
|
-
Describe: () => Describe
|
|
5693
|
-
});
|
|
5694
|
-
|
|
5695
5531
|
class Describe {
|
|
5696
5532
|
constructor({ title, componentName = null, parent = null }) {
|
|
5697
5533
|
this.title = title;
|
|
@@ -5918,10 +5754,6 @@ async function runTests({
|
|
|
5918
5754
|
}
|
|
5919
5755
|
|
|
5920
5756
|
// tools/core/test-console.js
|
|
5921
|
-
var exports_test_console = {};
|
|
5922
|
-
__export(exports_test_console, {
|
|
5923
|
-
reportTestReportToConsole: () => reportTestReportToConsole
|
|
5924
|
-
});
|
|
5925
5757
|
var PASS = "color: #0a0; font-weight: bold";
|
|
5926
5758
|
var FAIL = "color: #c00; font-weight: bold";
|
|
5927
5759
|
var SKIP = "color: #888";
|
|
@@ -5977,11 +5809,6 @@ function reportTestReportToConsole(report) {
|
|
|
5977
5809
|
}
|
|
5978
5810
|
|
|
5979
5811
|
// tools/format/lint.js
|
|
5980
|
-
var exports_lint = {};
|
|
5981
|
-
__export(exports_lint, {
|
|
5982
|
-
suggestionToMessage: () => suggestionToMessage,
|
|
5983
|
-
lintIdToMessage: () => lintIdToMessage
|
|
5984
|
-
});
|
|
5985
5812
|
var UNSUPPORTED_EXPR_LABEL = {
|
|
5986
5813
|
"legacy-template": "string template",
|
|
5987
5814
|
ternary: "ternary expression",
|
|
@@ -6217,47 +6044,7 @@ function htmlActionPhrase(action, tag, parent) {
|
|
|
6217
6044
|
}
|
|
6218
6045
|
}
|
|
6219
6046
|
|
|
6220
|
-
// extra.js
|
|
6221
|
-
var exports_extra = {};
|
|
6222
|
-
__export(exports_extra, {
|
|
6223
|
-
tutuca: () => tutuca,
|
|
6224
|
-
test: () => test,
|
|
6225
|
-
macro: () => macro,
|
|
6226
|
-
isOMap: () => isOrderedMap,
|
|
6227
|
-
isIMap: () => isMap,
|
|
6228
|
-
injectCss: () => injectCss,
|
|
6229
|
-
html: () => html,
|
|
6230
|
-
css: () => css,
|
|
6231
|
-
component: () => component,
|
|
6232
|
-
compileClassesToStyleText: () => compileClassesToStyleText,
|
|
6233
|
-
compileClassesToStyle: () => compileClassesToStyle,
|
|
6234
|
-
collectIterBindings: () => collectIterBindings,
|
|
6235
|
-
check: () => check,
|
|
6236
|
-
SEQ_INFO: () => SEQ_INFO,
|
|
6237
|
-
ParseContext: () => ParseContext,
|
|
6238
|
-
OMap: () => OrderedMap2,
|
|
6239
|
-
KList: () => KList,
|
|
6240
|
-
ISet: () => Set2,
|
|
6241
|
-
IMap: () => Map2,
|
|
6242
|
-
FIELD_CLASS: () => FIELD_CLASS
|
|
6243
|
-
});
|
|
6244
|
-
|
|
6245
|
-
// src/app.js
|
|
6246
|
-
var exports_app = {};
|
|
6247
|
-
__export(exports_app, {
|
|
6248
|
-
injectCss: () => injectCss,
|
|
6249
|
-
App: () => App
|
|
6250
|
-
});
|
|
6251
|
-
|
|
6252
6047
|
// src/components.js
|
|
6253
|
-
var exports_components = {};
|
|
6254
|
-
__export(exports_components, {
|
|
6255
|
-
DynamicAlias: () => DynamicAlias,
|
|
6256
|
-
Dynamic: () => Dynamic,
|
|
6257
|
-
Components: () => Components,
|
|
6258
|
-
ComponentStack: () => ComponentStack,
|
|
6259
|
-
Component: () => Component
|
|
6260
|
-
});
|
|
6261
6048
|
class Components {
|
|
6262
6049
|
constructor() {
|
|
6263
6050
|
this.getComponentSymbol = Symbol("getComponent");
|
|
@@ -7186,34 +6973,9 @@ class DragInfo {
|
|
|
7186
6973
|
}
|
|
7187
6974
|
|
|
7188
6975
|
// extra/klist.js
|
|
7189
|
-
var exports_klist = {};
|
|
7190
|
-
__export(exports_klist, {
|
|
7191
|
-
KList: () => KList,
|
|
7192
|
-
FieldKList: () => FieldKList
|
|
7193
|
-
});
|
|
7194
6976
|
import { Map as IMap2, List as List2 } from "immutable";
|
|
7195
6977
|
|
|
7196
6978
|
// src/oo.js
|
|
7197
|
-
var exports_oo = {};
|
|
7198
|
-
__export(exports_oo, {
|
|
7199
|
-
getTypeName: () => getTypeName,
|
|
7200
|
-
fieldsByTypeName: () => fieldsByTypeName,
|
|
7201
|
-
extendProtoForKeyed: () => extendProtoForKeyed,
|
|
7202
|
-
component: () => component,
|
|
7203
|
-
classFromData: () => classFromData,
|
|
7204
|
-
FieldString: () => FieldString,
|
|
7205
|
-
FieldSet: () => FieldSet,
|
|
7206
|
-
FieldOMap: () => FieldOMap,
|
|
7207
|
-
FieldMap: () => FieldMap,
|
|
7208
|
-
FieldList: () => FieldList,
|
|
7209
|
-
FieldInt: () => FieldInt,
|
|
7210
|
-
FieldFloat: () => FieldFloat,
|
|
7211
|
-
FieldComp: () => FieldComp,
|
|
7212
|
-
FieldBool: () => FieldBool,
|
|
7213
|
-
FieldAny: () => FieldAny,
|
|
7214
|
-
Field: () => Field,
|
|
7215
|
-
FIELD_CLASS: () => FIELD_CLASS
|
|
7216
|
-
});
|
|
7217
6979
|
import { Map as IMap, Set as ISet, List, OrderedMap, Record } from "immutable";
|
|
7218
6980
|
var BAD_VALUE2 = Symbol("BadValue");
|
|
7219
6981
|
var nullCoercer = (v) => v;
|
|
@@ -7597,15 +7359,6 @@ function classFromData(name, { fields = {}, methods, statics }) {
|
|
|
7597
7359
|
var component = (opts) => new Component(classFromData(opts.name, opts), opts);
|
|
7598
7360
|
|
|
7599
7361
|
// src/renderer.js
|
|
7600
|
-
var exports_renderer = {};
|
|
7601
|
-
__export(exports_renderer, {
|
|
7602
|
-
unpackLoopResult: () => unpackLoopResult,
|
|
7603
|
-
normalizeRange: () => normalizeRange,
|
|
7604
|
-
getSeqInfo: () => getSeqInfo,
|
|
7605
|
-
SEQ_INFO: () => SEQ_INFO,
|
|
7606
|
-
Renderer: () => Renderer,
|
|
7607
|
-
DATASET_ATTRS: () => DATASET_ATTRS
|
|
7608
|
-
});
|
|
7609
7362
|
import { isIndexed, isKeyed } from "immutable";
|
|
7610
7363
|
|
|
7611
7364
|
// src/cache.js
|
|
@@ -7924,48 +7677,62 @@ KList.prototype[SEQ_INFO] = (seq, visit) => {
|
|
|
7924
7677
|
visit(k, seq.items.get(k), "data-sk");
|
|
7925
7678
|
};
|
|
7926
7679
|
// index.js
|
|
7927
|
-
var exports_tutuca = {};
|
|
7928
|
-
__export(exports_tutuca, {
|
|
7929
|
-
tutuca: () => tutuca,
|
|
7930
|
-
test: () => test,
|
|
7931
|
-
macro: () => macro,
|
|
7932
|
-
isOMap: () => isOrderedMap,
|
|
7933
|
-
isIMap: () => isMap,
|
|
7934
|
-
injectCss: () => injectCss,
|
|
7935
|
-
html: () => html,
|
|
7936
|
-
css: () => css,
|
|
7937
|
-
component: () => component,
|
|
7938
|
-
collectIterBindings: () => collectIterBindings,
|
|
7939
|
-
check: () => check,
|
|
7940
|
-
SEQ_INFO: () => SEQ_INFO,
|
|
7941
|
-
ParseContext: () => ParseContext,
|
|
7942
|
-
OMap: () => OrderedMap2,
|
|
7943
|
-
ISet: () => Set2,
|
|
7944
|
-
IMap: () => Map2,
|
|
7945
|
-
FIELD_CLASS: () => FIELD_CLASS
|
|
7946
|
-
});
|
|
7947
|
-
__reExport(exports_tutuca, immutable);
|
|
7948
|
-
import"immutable";
|
|
7949
7680
|
import {
|
|
7950
|
-
|
|
7951
|
-
|
|
7681
|
+
Collection,
|
|
7682
|
+
List as List3,
|
|
7952
7683
|
Map as Map2,
|
|
7953
7684
|
OrderedMap as OrderedMap2,
|
|
7954
|
-
|
|
7685
|
+
OrderedSet,
|
|
7686
|
+
PairSorting,
|
|
7687
|
+
Range,
|
|
7688
|
+
Record as Record2,
|
|
7689
|
+
Repeat,
|
|
7690
|
+
Seq,
|
|
7691
|
+
Set as Set2,
|
|
7692
|
+
Stack as Stack2,
|
|
7693
|
+
fromJS,
|
|
7694
|
+
get,
|
|
7695
|
+
getIn,
|
|
7696
|
+
has,
|
|
7697
|
+
hasIn,
|
|
7698
|
+
hash,
|
|
7699
|
+
is as is2,
|
|
7700
|
+
isAssociative,
|
|
7701
|
+
isCollection,
|
|
7702
|
+
isImmutable,
|
|
7703
|
+
isIndexed as isIndexed2,
|
|
7704
|
+
isKeyed as isKeyed2,
|
|
7705
|
+
isList,
|
|
7706
|
+
isMap,
|
|
7707
|
+
isOrdered,
|
|
7708
|
+
isOrderedMap,
|
|
7709
|
+
isOrderedSet,
|
|
7710
|
+
isPlainObject,
|
|
7711
|
+
isRecord,
|
|
7712
|
+
isSeq,
|
|
7713
|
+
isSet,
|
|
7714
|
+
isStack,
|
|
7715
|
+
isValueObject,
|
|
7716
|
+
merge,
|
|
7717
|
+
mergeDeep,
|
|
7718
|
+
mergeDeepWith,
|
|
7719
|
+
mergeWith,
|
|
7720
|
+
remove,
|
|
7721
|
+
removeIn,
|
|
7722
|
+
set,
|
|
7723
|
+
setIn,
|
|
7724
|
+
update,
|
|
7725
|
+
updateIn,
|
|
7726
|
+
version,
|
|
7727
|
+
isMap as isMap2,
|
|
7728
|
+
isOrderedMap as isOrderedMap2,
|
|
7729
|
+
Map as Map3,
|
|
7730
|
+
OrderedMap as OrderedMap3,
|
|
7731
|
+
Set as Set3
|
|
7955
7732
|
} from "immutable";
|
|
7956
7733
|
var css = String.raw;
|
|
7957
7734
|
var html = String.raw;
|
|
7958
7735
|
var macro = (defaults, rawView) => new Macro(defaults, rawView);
|
|
7959
|
-
function check(_app) {
|
|
7960
|
-
return { error: 0, warn: 0, hint: 0, dummyCheck: true };
|
|
7961
|
-
}
|
|
7962
|
-
async function test(_opts) {
|
|
7963
|
-
return null;
|
|
7964
|
-
}
|
|
7965
|
-
function collectIterBindings() {
|
|
7966
|
-
console.warn("collectIterBindings is a no-op in the core tutuca build; use the tutuca-dev build for a functional implementation");
|
|
7967
|
-
return [];
|
|
7968
|
-
}
|
|
7969
7736
|
function tutuca(nodeOrSelector) {
|
|
7970
7737
|
const rootNode = typeof nodeOrSelector === "string" ? document.querySelector(nodeOrSelector) : nodeOrSelector;
|
|
7971
7738
|
const comps = new Components;
|
|
@@ -7974,7 +7741,6 @@ function tutuca(nodeOrSelector) {
|
|
|
7974
7741
|
}
|
|
7975
7742
|
|
|
7976
7743
|
// extra.js
|
|
7977
|
-
__reExport(exports_extra, exports_tutuca);
|
|
7978
7744
|
async function compileClassesToStyle(app, compileClasses, styleId = "margaui-css") {
|
|
7979
7745
|
const t1 = performance.now();
|
|
7980
7746
|
const css2 = await compileClassesToStyleText(app, compileClasses);
|
|
@@ -7995,16 +7761,7 @@ async function compileClassesToStyleText(app, compileClasses, Ctx = ParseCtxClas
|
|
|
7995
7761
|
}
|
|
7996
7762
|
return await compileClasses(Array.from(classes));
|
|
7997
7763
|
}
|
|
7998
|
-
|
|
7999
|
-
// dev.js
|
|
8000
|
-
__reExport(exports_dev, exports_extra);
|
|
8001
|
-
|
|
8002
7764
|
// tools/core/docs.js
|
|
8003
|
-
var exports_docs = {};
|
|
8004
|
-
__export(exports_docs, {
|
|
8005
|
-
getComponentsDocs: () => getComponentsDocs,
|
|
8006
|
-
docComponents: () => docComponents
|
|
8007
|
-
});
|
|
8008
7765
|
function getSignature(name, fn) {
|
|
8009
7766
|
const s = fn.toString();
|
|
8010
7767
|
const m = s.match(/^(?:\w+|function\s*\w*)\s*\(([^)]*)\)/);
|
|
@@ -8175,10 +7932,6 @@ function docComponents(normalized, { name = null } = {}) {
|
|
|
8175
7932
|
return new ComponentDocs({ items: getComponentsDocs(picked) });
|
|
8176
7933
|
}
|
|
8177
7934
|
// src/util/testing.js
|
|
8178
|
-
var exports_testing = {};
|
|
8179
|
-
__export(exports_testing, {
|
|
8180
|
-
collectIterBindings: () => collectIterBindings2
|
|
8181
|
-
});
|
|
8182
7935
|
var filterAlwaysTrue2 = () => true;
|
|
8183
7936
|
var nullLoopWith2 = (seq) => ({ iterData: { seq } });
|
|
8184
7937
|
var plainArrayIter = (seq, visit, start, end) => {
|
|
@@ -8213,7 +7966,7 @@ function resolveAlter(Comp, name) {
|
|
|
8213
7966
|
}
|
|
8214
7967
|
return fn;
|
|
8215
7968
|
}
|
|
8216
|
-
function
|
|
7969
|
+
function collectIterBindings(Comp, compInstance, seq, opts = {}) {
|
|
8217
7970
|
const whenFn = resolveAlter(Comp, opts.when) ?? filterAlwaysTrue2;
|
|
8218
7971
|
const loopWithFn = resolveAlter(Comp, opts.loopWith) ?? nullLoopWith2;
|
|
8219
7972
|
const enrichFn = resolveAlter(Comp, opts.enrichWith);
|
|
@@ -8233,12 +7986,13 @@ function collectIterBindings2(Comp, compInstance, seq, opts = {}) {
|
|
|
8233
7986
|
}
|
|
8234
7987
|
|
|
8235
7988
|
// dev.js
|
|
8236
|
-
|
|
7989
|
+
use(jestMatchers);
|
|
7990
|
+
async function test2(opts = {}) {
|
|
8237
7991
|
const report = await runTests({ expect, ...opts });
|
|
8238
7992
|
reportTestReportToConsole(report);
|
|
8239
7993
|
return report;
|
|
8240
7994
|
}
|
|
8241
|
-
function
|
|
7995
|
+
function check(app) {
|
|
8242
7996
|
const counts = { error: 0, warn: 0, hint: 0 };
|
|
8243
7997
|
for (const Comp of app.comps.byId.values()) {
|
|
8244
7998
|
const shadowViews = {};
|
|
@@ -8299,27 +8053,61 @@ class LintClassCollectorCtx extends ParseCtxClassSetCollector {
|
|
|
8299
8053
|
}
|
|
8300
8054
|
}
|
|
8301
8055
|
export {
|
|
8056
|
+
version,
|
|
8057
|
+
updateIn,
|
|
8058
|
+
update,
|
|
8302
8059
|
tutuca,
|
|
8303
|
-
|
|
8060
|
+
test2 as test,
|
|
8304
8061
|
suggestionToMessage,
|
|
8062
|
+
setIn,
|
|
8063
|
+
set,
|
|
8305
8064
|
runTests,
|
|
8306
8065
|
reportTestReportToConsole,
|
|
8066
|
+
removeIn,
|
|
8067
|
+
remove,
|
|
8068
|
+
mergeWith,
|
|
8069
|
+
mergeDeepWith,
|
|
8070
|
+
mergeDeep,
|
|
8071
|
+
merge,
|
|
8307
8072
|
makeCollector,
|
|
8308
8073
|
macro,
|
|
8309
8074
|
lintIdToMessage,
|
|
8310
|
-
|
|
8311
|
-
|
|
8075
|
+
isValueObject,
|
|
8076
|
+
isStack,
|
|
8077
|
+
isSet,
|
|
8078
|
+
isSeq,
|
|
8079
|
+
isRecord,
|
|
8080
|
+
isPlainObject,
|
|
8081
|
+
isOrderedSet,
|
|
8082
|
+
isOrderedMap,
|
|
8083
|
+
isOrdered,
|
|
8084
|
+
isOrderedMap2 as isOMap,
|
|
8085
|
+
isMap,
|
|
8086
|
+
isList,
|
|
8087
|
+
isKeyed2 as isKeyed,
|
|
8088
|
+
isIndexed2 as isIndexed,
|
|
8089
|
+
isImmutable,
|
|
8090
|
+
isMap2 as isIMap,
|
|
8091
|
+
isCollection,
|
|
8092
|
+
isAssociative,
|
|
8093
|
+
is2 as is,
|
|
8312
8094
|
injectCss,
|
|
8313
8095
|
html,
|
|
8096
|
+
hash,
|
|
8097
|
+
hasIn,
|
|
8098
|
+
has,
|
|
8099
|
+
getIn,
|
|
8314
8100
|
getComponentsDocs,
|
|
8101
|
+
get,
|
|
8102
|
+
fromJS,
|
|
8315
8103
|
docComponents,
|
|
8316
8104
|
css,
|
|
8317
8105
|
component,
|
|
8318
8106
|
compileClassesToStyleText,
|
|
8319
8107
|
compileClassesToStyle,
|
|
8320
|
-
|
|
8108
|
+
collectIterBindings,
|
|
8321
8109
|
checkComponent,
|
|
8322
|
-
|
|
8110
|
+
check,
|
|
8323
8111
|
UNSUPPORTED_EXPR_SYNTAX,
|
|
8324
8112
|
UNKNOWN_X_OP,
|
|
8325
8113
|
UNKNOWN_X_ATTR,
|
|
@@ -8334,22 +8122,33 @@ export {
|
|
|
8334
8122
|
TestReport,
|
|
8335
8123
|
TestIndex,
|
|
8336
8124
|
Test,
|
|
8125
|
+
Stack2 as Stack,
|
|
8126
|
+
Set2 as Set,
|
|
8127
|
+
Seq,
|
|
8337
8128
|
SEQ_INFO,
|
|
8129
|
+
Repeat,
|
|
8338
8130
|
RenderedSection,
|
|
8339
8131
|
RenderedExample,
|
|
8340
8132
|
RenderBatch,
|
|
8133
|
+
Record2 as Record,
|
|
8134
|
+
Range,
|
|
8341
8135
|
RENDER_IT_OUTSIDE_OF_LOOP,
|
|
8342
8136
|
REDUNDANT_TEMPLATE_STRING,
|
|
8343
8137
|
ParseContext,
|
|
8138
|
+
PairSorting,
|
|
8344
8139
|
PLACEHOLDERLESS_TEMPLATE_STRING,
|
|
8345
|
-
|
|
8140
|
+
OrderedSet,
|
|
8141
|
+
OrderedMap2 as OrderedMap,
|
|
8142
|
+
OrderedMap3 as OMap,
|
|
8346
8143
|
ModuleTests,
|
|
8347
8144
|
ModuleTestReport,
|
|
8348
8145
|
ModuleInfo,
|
|
8146
|
+
Map2 as Map,
|
|
8349
8147
|
METHOD_VAL_NOT_DEFINED,
|
|
8350
8148
|
METHOD_VAL_IS_FIELD,
|
|
8351
8149
|
MAYBE_DROP_AT_PREFIX,
|
|
8352
8150
|
MAYBE_ADD_AT_PREFIX,
|
|
8151
|
+
List3 as List,
|
|
8353
8152
|
LintReport,
|
|
8354
8153
|
LintParseContext,
|
|
8355
8154
|
LintFinding,
|
|
@@ -8357,13 +8156,13 @@ export {
|
|
|
8357
8156
|
LintComponentResult,
|
|
8358
8157
|
LintClassCollectorCtx,
|
|
8359
8158
|
KList,
|
|
8360
|
-
|
|
8159
|
+
Set3 as ISet,
|
|
8361
8160
|
INPUT_HANDLER_NOT_REFERENCED,
|
|
8362
8161
|
INPUT_HANDLER_NOT_IMPLEMENTED,
|
|
8363
8162
|
INPUT_HANDLER_METHOD_NOT_IMPLEMENTED,
|
|
8364
8163
|
INPUT_HANDLER_METHOD_FOR_INPUT_HANDLER,
|
|
8365
8164
|
INPUT_HANDLER_FOR_INPUT_HANDLER_METHOD,
|
|
8366
|
-
|
|
8165
|
+
Map3 as IMap,
|
|
8367
8166
|
IF_NO_BRANCH_SET,
|
|
8368
8167
|
FIELD_VAL_NOT_DEFINED,
|
|
8369
8168
|
FIELD_VAL_IS_METHOD,
|
|
@@ -8377,6 +8176,7 @@ export {
|
|
|
8377
8176
|
ComponentSummary,
|
|
8378
8177
|
ComponentList,
|
|
8379
8178
|
ComponentDocs,
|
|
8179
|
+
Collection,
|
|
8380
8180
|
COMP_FIELD_BAD_SHAPE,
|
|
8381
8181
|
BAD_VALUE,
|
|
8382
8182
|
ALT_HANDLER_NOT_REFERENCED,
|