tutuca 0.9.98 → 0.9.99
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/README.md +5 -3
- package/dist/tutuca-cli.js +19 -11
- package/dist/tutuca-components.js +2444 -0
- package/dist/tutuca-dev.ext.js +16 -16
- package/dist/tutuca-dev.js +16 -16
- package/dist/tutuca-dev.min.js +2 -2
- package/dist/tutuca-storybook.js +125 -6
- package/package.json +3 -1
- package/skill/tutuca/cli.md +10 -68
- package/skill/tutuca/core.md +25 -74
- package/skill/tutuca/semantics.md +4 -3
- package/skill/tutuca/testing.md +3 -6
package/dist/tutuca-dev.ext.js
CHANGED
|
@@ -95,7 +95,6 @@ import {
|
|
|
95
95
|
util
|
|
96
96
|
} from "chai";
|
|
97
97
|
chai.use(jestMatchers);
|
|
98
|
-
|
|
99
98
|
// src/value.js
|
|
100
99
|
import { is } from "immutable";
|
|
101
100
|
|
|
@@ -3489,7 +3488,6 @@ var RAW_TEXT_ELEMENTS = new Set([
|
|
|
3489
3488
|
"xmp",
|
|
3490
3489
|
"plaintext"
|
|
3491
3490
|
]);
|
|
3492
|
-
var RCDATA_ELEMENTS = new Set(["textarea", "title"]);
|
|
3493
3491
|
var SPECIAL_ELEMENTS = new Set([
|
|
3494
3492
|
"address",
|
|
3495
3493
|
"applet",
|
|
@@ -3604,7 +3602,6 @@ var SCOPE_LIST_ITEM = new Set([...DEFAULT_SCOPE_BOUNDARIES, "ol", "ul"]);
|
|
|
3604
3602
|
var SCOPE_BUTTON = new Set([...DEFAULT_SCOPE_BOUNDARIES, "button"]);
|
|
3605
3603
|
var SCOPE_DEFAULT = DEFAULT_SCOPE_BOUNDARIES;
|
|
3606
3604
|
var SCOPE_TABLE = new Set(["html", "table", "template"]);
|
|
3607
|
-
var SCOPE_SELECT = new Set;
|
|
3608
3605
|
var STANDARD_SVG_CAMEL_ELEMENTS = new Set([
|
|
3609
3606
|
"altGlyph",
|
|
3610
3607
|
"altGlyphDef",
|
|
@@ -3756,7 +3753,6 @@ var FOREIGN_BREAKOUT_TAGS = new Set([
|
|
|
3756
3753
|
"ul",
|
|
3757
3754
|
"var"
|
|
3758
3755
|
]);
|
|
3759
|
-
var MATHML_TEXT_INTEGRATION_POINTS = new Set(["mi", "mo", "mn", "ms", "mtext"]);
|
|
3760
3756
|
var BLOCK_LEVEL_AUTO_CLOSE_P = new Set([
|
|
3761
3757
|
"address",
|
|
3762
3758
|
"article",
|
|
@@ -3799,7 +3795,6 @@ var BLOCK_LEVEL_AUTO_CLOSE_P = new Set([
|
|
|
3799
3795
|
"dd",
|
|
3800
3796
|
"dt"
|
|
3801
3797
|
]);
|
|
3802
|
-
var SELECT_VALID_CHILDREN = new Set(["option", "optgroup", "hr", "script", "template"]);
|
|
3803
3798
|
var SELECT_BREAKOUT_TAGS = new Set(["input", "keygen", "textarea", "select"]);
|
|
3804
3799
|
var MODES = Object.freeze({
|
|
3805
3800
|
inBody: "inBody",
|
|
@@ -8379,20 +8374,23 @@ async function test2(opts = {}) {
|
|
|
8379
8374
|
reportTestReportToConsole(report);
|
|
8380
8375
|
return report;
|
|
8381
8376
|
}
|
|
8377
|
+
function shadowCheckComponent(Comp) {
|
|
8378
|
+
const shadowViews = {};
|
|
8379
|
+
for (const name in Comp.views) {
|
|
8380
|
+
const rawView = Comp.views[name].rawView;
|
|
8381
|
+
const ctx = new LintParseContext;
|
|
8382
|
+
ANode.parse(rawView, ctx);
|
|
8383
|
+
ctx.compile(Comp.scope);
|
|
8384
|
+
shadowViews[name] = { name, ctx, rawView };
|
|
8385
|
+
}
|
|
8386
|
+
const shadowComp = Object.create(Comp);
|
|
8387
|
+
shadowComp.views = shadowViews;
|
|
8388
|
+
return checkComponent(shadowComp).reports;
|
|
8389
|
+
}
|
|
8382
8390
|
function check(app) {
|
|
8383
8391
|
const counts = { error: 0, warn: 0, hint: 0 };
|
|
8384
8392
|
for (const Comp of app.comps.byId.values()) {
|
|
8385
|
-
const
|
|
8386
|
-
for (const name in Comp.views) {
|
|
8387
|
-
const rawView = Comp.views[name].rawView;
|
|
8388
|
-
const ctx = new LintParseContext;
|
|
8389
|
-
ANode.parse(rawView, ctx);
|
|
8390
|
-
ctx.compile(Comp.scope);
|
|
8391
|
-
shadowViews[name] = { name, ctx, rawView };
|
|
8392
|
-
}
|
|
8393
|
-
const shadowComp = Object.create(Comp);
|
|
8394
|
-
shadowComp.views = shadowViews;
|
|
8395
|
-
const { reports } = checkComponent(shadowComp);
|
|
8393
|
+
const reports = shadowCheckComponent(Comp);
|
|
8396
8394
|
if (reports.length === 0)
|
|
8397
8395
|
continue;
|
|
8398
8396
|
console.group(Comp.name);
|
|
@@ -8446,6 +8444,7 @@ export {
|
|
|
8446
8444
|
tutuca,
|
|
8447
8445
|
test2 as test,
|
|
8448
8446
|
suggestionToMessage,
|
|
8447
|
+
shadowCheckComponent,
|
|
8449
8448
|
setIn,
|
|
8450
8449
|
set,
|
|
8451
8450
|
runTests,
|
|
@@ -8490,6 +8489,7 @@ export {
|
|
|
8490
8489
|
getComponentsDocs,
|
|
8491
8490
|
get,
|
|
8492
8491
|
fromJS,
|
|
8492
|
+
expect,
|
|
8493
8493
|
drive,
|
|
8494
8494
|
docComponents,
|
|
8495
8495
|
dispatchPhase,
|
package/dist/tutuca-dev.js
CHANGED
|
@@ -3376,7 +3376,6 @@ function jestMatchers(chai, utils) {
|
|
|
3376
3376
|
|
|
3377
3377
|
// deps/chai.js
|
|
3378
3378
|
use(jestMatchers);
|
|
3379
|
-
|
|
3380
3379
|
// deps/immutable.js
|
|
3381
3380
|
function invariant(condition, error) {
|
|
3382
3381
|
if (!condition)
|
|
@@ -11140,7 +11139,6 @@ var RAW_TEXT_ELEMENTS = new Set([
|
|
|
11140
11139
|
"xmp",
|
|
11141
11140
|
"plaintext"
|
|
11142
11141
|
]);
|
|
11143
|
-
var RCDATA_ELEMENTS = new Set(["textarea", "title"]);
|
|
11144
11142
|
var SPECIAL_ELEMENTS = new Set([
|
|
11145
11143
|
"address",
|
|
11146
11144
|
"applet",
|
|
@@ -11255,7 +11253,6 @@ var SCOPE_LIST_ITEM = new Set([...DEFAULT_SCOPE_BOUNDARIES, "ol", "ul"]);
|
|
|
11255
11253
|
var SCOPE_BUTTON = new Set([...DEFAULT_SCOPE_BOUNDARIES, "button"]);
|
|
11256
11254
|
var SCOPE_DEFAULT = DEFAULT_SCOPE_BOUNDARIES;
|
|
11257
11255
|
var SCOPE_TABLE = new Set(["html", "table", "template"]);
|
|
11258
|
-
var SCOPE_SELECT = new Set;
|
|
11259
11256
|
var STANDARD_SVG_CAMEL_ELEMENTS = new Set([
|
|
11260
11257
|
"altGlyph",
|
|
11261
11258
|
"altGlyphDef",
|
|
@@ -11407,7 +11404,6 @@ var FOREIGN_BREAKOUT_TAGS = new Set([
|
|
|
11407
11404
|
"ul",
|
|
11408
11405
|
"var"
|
|
11409
11406
|
]);
|
|
11410
|
-
var MATHML_TEXT_INTEGRATION_POINTS = new Set(["mi", "mo", "mn", "ms", "mtext"]);
|
|
11411
11407
|
var BLOCK_LEVEL_AUTO_CLOSE_P = new Set([
|
|
11412
11408
|
"address",
|
|
11413
11409
|
"article",
|
|
@@ -11450,7 +11446,6 @@ var BLOCK_LEVEL_AUTO_CLOSE_P = new Set([
|
|
|
11450
11446
|
"dd",
|
|
11451
11447
|
"dt"
|
|
11452
11448
|
]);
|
|
11453
|
-
var SELECT_VALID_CHILDREN = new Set(["option", "optgroup", "hr", "script", "template"]);
|
|
11454
11449
|
var SELECT_BREAKOUT_TAGS = new Set(["input", "keygen", "textarea", "select"]);
|
|
11455
11450
|
var MODES = Object.freeze({
|
|
11456
11451
|
inBody: "inBody",
|
|
@@ -15973,20 +15968,23 @@ async function test3(opts = {}) {
|
|
|
15973
15968
|
reportTestReportToConsole(report);
|
|
15974
15969
|
return report;
|
|
15975
15970
|
}
|
|
15971
|
+
function shadowCheckComponent(Comp) {
|
|
15972
|
+
const shadowViews = {};
|
|
15973
|
+
for (const name in Comp.views) {
|
|
15974
|
+
const rawView = Comp.views[name].rawView;
|
|
15975
|
+
const ctx = new LintParseContext;
|
|
15976
|
+
ANode.parse(rawView, ctx);
|
|
15977
|
+
ctx.compile(Comp.scope);
|
|
15978
|
+
shadowViews[name] = { name, ctx, rawView };
|
|
15979
|
+
}
|
|
15980
|
+
const shadowComp = Object.create(Comp);
|
|
15981
|
+
shadowComp.views = shadowViews;
|
|
15982
|
+
return checkComponent(shadowComp).reports;
|
|
15983
|
+
}
|
|
15976
15984
|
function check(app) {
|
|
15977
15985
|
const counts = { error: 0, warn: 0, hint: 0 };
|
|
15978
15986
|
for (const Comp of app.comps.byId.values()) {
|
|
15979
|
-
const
|
|
15980
|
-
for (const name in Comp.views) {
|
|
15981
|
-
const rawView = Comp.views[name].rawView;
|
|
15982
|
-
const ctx = new LintParseContext;
|
|
15983
|
-
ANode.parse(rawView, ctx);
|
|
15984
|
-
ctx.compile(Comp.scope);
|
|
15985
|
-
shadowViews[name] = { name, ctx, rawView };
|
|
15986
|
-
}
|
|
15987
|
-
const shadowComp = Object.create(Comp);
|
|
15988
|
-
shadowComp.views = shadowViews;
|
|
15989
|
-
const { reports } = checkComponent(shadowComp);
|
|
15987
|
+
const reports = shadowCheckComponent(Comp);
|
|
15990
15988
|
if (reports.length === 0)
|
|
15991
15989
|
continue;
|
|
15992
15990
|
console.group(Comp.name);
|
|
@@ -16040,6 +16038,7 @@ export {
|
|
|
16040
16038
|
tutuca,
|
|
16041
16039
|
test3 as test,
|
|
16042
16040
|
suggestionToMessage,
|
|
16041
|
+
shadowCheckComponent,
|
|
16043
16042
|
setIn$1 as setIn,
|
|
16044
16043
|
set2 as set,
|
|
16045
16044
|
runTests,
|
|
@@ -16084,6 +16083,7 @@ export {
|
|
|
16084
16083
|
getComponentsDocs,
|
|
16085
16084
|
get2 as get,
|
|
16086
16085
|
fromJS,
|
|
16086
|
+
expect,
|
|
16087
16087
|
drive,
|
|
16088
16088
|
docComponents,
|
|
16089
16089
|
dispatchPhase,
|