yapp 5.1.294 → 5.1.296
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/.aiignore +12 -0
- package/.swcrc +4 -3
- package/example.js +7037 -12028
- package/lib/colours.js +26 -26
- package/lib/constants.js +9 -9
- package/lib/customEventTypes.js +2 -2
- package/lib/defaults.js +8 -8
- package/lib/div/gutter.js +49 -253
- package/lib/div/lineNumbers.js +42 -197
- package/lib/div/pretty.js +55 -257
- package/lib/div/syntax.js +78 -253
- package/lib/example/constants.js +2 -2
- package/lib/example/view/div/sizeable/left.js +12 -104
- package/lib/example/view/div/sizeable/middle.js +12 -104
- package/lib/example/view/div/sizeable/right.js +12 -104
- package/lib/example/view/div/sizeable/top.js +12 -104
- package/lib/example/view/input.js +11 -23
- package/lib/example/view/javascript.js +32 -86
- package/lib/example/view/json.js +20 -87
- package/lib/example/view/plainText.js +9 -87
- package/lib/example/view/subHeading.js +13 -23
- package/lib/example/view/textarea/bnf.js +21 -124
- package/lib/example/view/textarea/lexicalEntries.js +21 -124
- package/lib/example/view/textarea/parseTree.js +27 -130
- package/lib/example/view/textarea/tokens.js +40 -143
- package/lib/example/view/textarea.js +15 -23
- package/lib/example/view/xml.js +24 -87
- package/lib/example/view.js +85 -258
- package/lib/example/yapp.js +8 -86
- package/lib/example.js +11 -11
- package/lib/index.js +10 -10
- package/lib/languages.js +5 -5
- package/lib/lexer/javascript.js +21 -121
- package/lib/lexer/json.js +21 -121
- package/lib/lexer/plainText.js +21 -121
- package/lib/lexer/xml.js +21 -121
- package/lib/mixins/style.js +27 -27
- package/lib/parser/javascript.js +276 -115
- package/lib/parser/json.js +30 -110
- package/lib/parser/plainText.js +14 -110
- package/lib/parser/xml.js +55 -111
- package/lib/plugin/javascript.js +13 -156
- package/lib/plugin/json.js +13 -156
- package/lib/plugin/plainText.js +13 -156
- package/lib/plugin/xml.js +13 -156
- package/lib/plugin.js +41 -98
- package/lib/prettyPrinter.js +81 -273
- package/lib/processor/javascript.js +64 -153
- package/lib/processor/json.js +17 -105
- package/lib/processor/plainText.js +8 -96
- package/lib/processor/xml.js +32 -120
- package/lib/processor.js +53 -103
- package/lib/renderYappStyles.js +6 -6
- package/lib/richTextarea.js +66 -182
- package/lib/scheme/colour.js +17 -17
- package/lib/scheme/syntax/default.js +6 -6
- package/lib/scheme/syntax/javaScript.js +6 -6
- package/lib/scheme/syntax/json.js +3 -3
- package/lib/scheme/syntax/xml.js +4 -4
- package/lib/style/firaCode.js +18 -7
- package/lib/style/syntax/default.js +33 -5
- package/lib/style/syntax/javaScript.js +14 -4
- package/lib/style/syntax/json.js +8 -4
- package/lib/style/syntax/xml.js +10 -4
- package/lib/style/syntax.js +17 -7
- package/lib/style/yapp.js +70 -5
- package/lib/styles.js +3 -3
- package/lib/token/significant/argument.js +7 -91
- package/lib/token/significant/attribute.js +7 -91
- package/lib/token/significant/comment.js +7 -91
- package/lib/token/significant/error.js +7 -91
- package/lib/token/significant/jsx/attributeName.js +7 -91
- package/lib/token/significant/jsx/tagName.js +7 -91
- package/lib/token/significant/name.js +7 -91
- package/lib/token/significant/string.js +7 -91
- package/lib/token/significant/variable.js +7 -91
- package/lib/tokenTypes.js +9 -9
- package/lib/utilities/configuration.js +4 -6
- package/lib/utilities/content.js +10 -10
- package/lib/utilities/css.js +5 -5
- package/lib/utilities/element.js +5 -5
- package/lib/utilities/plugin.js +10 -11
- package/lib/utilities/rules.js +6 -6
- package/lib/utilities/scrollbar.js +7 -7
- package/lib/utilities/tokens.js +4 -4
- package/lib/yapp.js +115 -337
- package/package.json +3 -3
|
@@ -8,115 +8,23 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return _default;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function _assert_this_initialized(self) {
|
|
14
|
-
if (self === void 0) {
|
|
15
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
|
-
}
|
|
17
|
-
return self;
|
|
18
|
-
}
|
|
19
|
-
function _call_super(_this, derived, args) {
|
|
20
|
-
derived = _get_prototype_of(derived);
|
|
21
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
22
|
-
}
|
|
23
|
-
function _class_call_check(instance, Constructor) {
|
|
24
|
-
if (!(instance instanceof Constructor)) {
|
|
25
|
-
throw new TypeError("Cannot call a class as a function");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function _define_property(obj, key, value) {
|
|
29
|
-
if (key in obj) {
|
|
30
|
-
Object.defineProperty(obj, key, {
|
|
31
|
-
value: value,
|
|
32
|
-
enumerable: true,
|
|
33
|
-
configurable: true,
|
|
34
|
-
writable: true
|
|
35
|
-
});
|
|
36
|
-
} else {
|
|
37
|
-
obj[key] = value;
|
|
38
|
-
}
|
|
39
|
-
return obj;
|
|
40
|
-
}
|
|
41
|
-
function _get_prototype_of(o) {
|
|
42
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
43
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
44
|
-
};
|
|
45
|
-
return _get_prototype_of(o);
|
|
46
|
-
}
|
|
47
|
-
function _inherits(subClass, superClass) {
|
|
48
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
49
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
50
|
-
}
|
|
51
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
52
|
-
constructor: {
|
|
53
|
-
value: subClass,
|
|
54
|
-
writable: true,
|
|
55
|
-
configurable: true
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
59
|
-
}
|
|
11
|
+
const _easywithstyle = /*#__PURE__*/ _interop_require_default(require("easy-with-style"));
|
|
12
|
+
const _easylayout = require("easy-layout");
|
|
60
13
|
function _interop_require_default(obj) {
|
|
61
14
|
return obj && obj.__esModule ? obj : {
|
|
62
15
|
default: obj
|
|
63
16
|
};
|
|
64
17
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
return _assert_this_initialized(self);
|
|
70
|
-
}
|
|
71
|
-
function _set_prototype_of(o, p) {
|
|
72
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
73
|
-
o.__proto__ = p;
|
|
74
|
-
return o;
|
|
18
|
+
class RightSizeableDiv extends _easylayout.SizeableDiv {
|
|
19
|
+
static defaultProperties = {
|
|
20
|
+
className: "right"
|
|
75
21
|
};
|
|
76
|
-
return _set_prototype_of(o, p);
|
|
77
|
-
}
|
|
78
|
-
function _tagged_template_literal(strings, raw) {
|
|
79
|
-
if (!raw) {
|
|
80
|
-
raw = strings.slice(0);
|
|
81
|
-
}
|
|
82
|
-
return Object.freeze(Object.defineProperties(strings, {
|
|
83
|
-
raw: {
|
|
84
|
-
value: Object.freeze(raw)
|
|
85
|
-
}
|
|
86
|
-
}));
|
|
87
|
-
}
|
|
88
|
-
function _type_of(obj) {
|
|
89
|
-
"@swc/helpers - typeof";
|
|
90
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
91
|
-
}
|
|
92
|
-
function _is_native_reflect_construct() {
|
|
93
|
-
try {
|
|
94
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
95
|
-
} catch (_) {}
|
|
96
|
-
return (_is_native_reflect_construct = function() {
|
|
97
|
-
return !!result;
|
|
98
|
-
})();
|
|
99
22
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
};
|
|
107
|
-
return data;
|
|
108
|
-
}
|
|
109
|
-
var RightSizeableDiv = /*#__PURE__*/ function(SizeableDiv) {
|
|
110
|
-
_inherits(RightSizeableDiv, SizeableDiv);
|
|
111
|
-
function RightSizeableDiv() {
|
|
112
|
-
_class_call_check(this, RightSizeableDiv);
|
|
113
|
-
return _call_super(this, RightSizeableDiv, arguments);
|
|
114
|
-
}
|
|
115
|
-
return RightSizeableDiv;
|
|
116
|
-
}(_easylayout.SizeableDiv);
|
|
117
|
-
_define_property(RightSizeableDiv, "defaultProperties", {
|
|
118
|
-
className: "right"
|
|
119
|
-
});
|
|
120
|
-
var _default = (0, _easywithstyle.default)(RightSizeableDiv)(_templateObject());
|
|
23
|
+
const _default = (0, _easywithstyle.default)(RightSizeableDiv)`
|
|
24
|
+
|
|
25
|
+
height: 24rem;
|
|
26
|
+
min-height: 12rem;
|
|
27
|
+
|
|
28
|
+
`;
|
|
121
29
|
|
|
122
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvZGl2L3NpemVhYmxlL3JpZ2h0LmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgd2l0aFN0eWxlIGZyb20gXCJlYXN5LXdpdGgtc3R5bGVcIjsgIC8vL1xuXG5pbXBvcnQgeyBTaXplYWJsZURpdiB9IGZyb20gXCJlYXN5LWxheW91dFwiO1xuXG5jbGFzcyBSaWdodFNpemVhYmxlRGl2IGV4dGVuZHMgU2l6ZWFibGVEaXYge1xuICBzdGF0aWMgZGVmYXVsdFByb3BlcnRpZXMgPSB7XG4gICAgY2xhc3NOYW1lOiBcInJpZ2h0XCJcbiAgfTtcbn1cblxuZXhwb3J0IGRlZmF1bHQgd2l0aFN0eWxlKFJpZ2h0U2l6ZWFibGVEaXYpYFxuXG4gIGhlaWdodDogMjRyZW07XG4gIG1pbi1oZWlnaHQ6IDEycmVtO1xuICBcbmA7XG4iXSwibmFtZXMiOlsiUmlnaHRTaXplYWJsZURpdiIsIlNpemVhYmxlRGl2IiwiZGVmYXVsdFByb3BlcnRpZXMiLCJjbGFzc05hbWUiLCJ3aXRoU3R5bGUiXSwibWFwcGluZ3MiOiJBQUFBOzs7OytCQVlBOzs7ZUFBQTs7O3NFQVZzQjs0QkFFTTs7Ozs7O0FBRTVCLE1BQU1BLHlCQUF5QkMsdUJBQVc7SUFDeEMsT0FBT0Msb0JBQW9CO1FBQ3pCQyxXQUFXO0lBQ2IsRUFBRTtBQUNKO01BRUEsV0FBZUMsSUFBQUEsc0JBQVMsRUFBQ0osaUJBQWlCLENBQUM7Ozs7O0FBSzNDLENBQUMifQ==
|
|
@@ -8,115 +8,23 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return _default;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function _assert_this_initialized(self) {
|
|
14
|
-
if (self === void 0) {
|
|
15
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
|
-
}
|
|
17
|
-
return self;
|
|
18
|
-
}
|
|
19
|
-
function _call_super(_this, derived, args) {
|
|
20
|
-
derived = _get_prototype_of(derived);
|
|
21
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
22
|
-
}
|
|
23
|
-
function _class_call_check(instance, Constructor) {
|
|
24
|
-
if (!(instance instanceof Constructor)) {
|
|
25
|
-
throw new TypeError("Cannot call a class as a function");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function _define_property(obj, key, value) {
|
|
29
|
-
if (key in obj) {
|
|
30
|
-
Object.defineProperty(obj, key, {
|
|
31
|
-
value: value,
|
|
32
|
-
enumerable: true,
|
|
33
|
-
configurable: true,
|
|
34
|
-
writable: true
|
|
35
|
-
});
|
|
36
|
-
} else {
|
|
37
|
-
obj[key] = value;
|
|
38
|
-
}
|
|
39
|
-
return obj;
|
|
40
|
-
}
|
|
41
|
-
function _get_prototype_of(o) {
|
|
42
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
43
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
44
|
-
};
|
|
45
|
-
return _get_prototype_of(o);
|
|
46
|
-
}
|
|
47
|
-
function _inherits(subClass, superClass) {
|
|
48
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
49
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
50
|
-
}
|
|
51
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
52
|
-
constructor: {
|
|
53
|
-
value: subClass,
|
|
54
|
-
writable: true,
|
|
55
|
-
configurable: true
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
59
|
-
}
|
|
11
|
+
const _easywithstyle = /*#__PURE__*/ _interop_require_default(require("easy-with-style"));
|
|
12
|
+
const _easylayout = require("easy-layout");
|
|
60
13
|
function _interop_require_default(obj) {
|
|
61
14
|
return obj && obj.__esModule ? obj : {
|
|
62
15
|
default: obj
|
|
63
16
|
};
|
|
64
17
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
return _assert_this_initialized(self);
|
|
70
|
-
}
|
|
71
|
-
function _set_prototype_of(o, p) {
|
|
72
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
73
|
-
o.__proto__ = p;
|
|
74
|
-
return o;
|
|
18
|
+
class TopSizeableDiv extends _easylayout.SizeableDiv {
|
|
19
|
+
static defaultProperties = {
|
|
20
|
+
className: "top"
|
|
75
21
|
};
|
|
76
|
-
return _set_prototype_of(o, p);
|
|
77
|
-
}
|
|
78
|
-
function _tagged_template_literal(strings, raw) {
|
|
79
|
-
if (!raw) {
|
|
80
|
-
raw = strings.slice(0);
|
|
81
|
-
}
|
|
82
|
-
return Object.freeze(Object.defineProperties(strings, {
|
|
83
|
-
raw: {
|
|
84
|
-
value: Object.freeze(raw)
|
|
85
|
-
}
|
|
86
|
-
}));
|
|
87
|
-
}
|
|
88
|
-
function _type_of(obj) {
|
|
89
|
-
"@swc/helpers - typeof";
|
|
90
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
91
|
-
}
|
|
92
|
-
function _is_native_reflect_construct() {
|
|
93
|
-
try {
|
|
94
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
95
|
-
} catch (_) {}
|
|
96
|
-
return (_is_native_reflect_construct = function() {
|
|
97
|
-
return !!result;
|
|
98
|
-
})();
|
|
99
22
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
};
|
|
107
|
-
return data;
|
|
108
|
-
}
|
|
109
|
-
var TopSizeableDiv = /*#__PURE__*/ function(SizeableDiv) {
|
|
110
|
-
_inherits(TopSizeableDiv, SizeableDiv);
|
|
111
|
-
function TopSizeableDiv() {
|
|
112
|
-
_class_call_check(this, TopSizeableDiv);
|
|
113
|
-
return _call_super(this, TopSizeableDiv, arguments);
|
|
114
|
-
}
|
|
115
|
-
return TopSizeableDiv;
|
|
116
|
-
}(_easylayout.SizeableDiv);
|
|
117
|
-
_define_property(TopSizeableDiv, "defaultProperties", {
|
|
118
|
-
className: "top"
|
|
119
|
-
});
|
|
120
|
-
var _default = (0, _easywithstyle.default)(TopSizeableDiv)(_templateObject());
|
|
23
|
+
const _default = (0, _easywithstyle.default)(TopSizeableDiv)`
|
|
24
|
+
|
|
25
|
+
height: 64rem;
|
|
26
|
+
min-height: 12rem;
|
|
27
|
+
|
|
28
|
+
`;
|
|
121
29
|
|
|
122
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvZGl2L3NpemVhYmxlL3RvcC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IHdpdGhTdHlsZSBmcm9tIFwiZWFzeS13aXRoLXN0eWxlXCI7ICAvLy9cblxuaW1wb3J0IHsgU2l6ZWFibGVEaXYgfSBmcm9tIFwiZWFzeS1sYXlvdXRcIjtcblxuY2xhc3MgVG9wU2l6ZWFibGVEaXYgZXh0ZW5kcyBTaXplYWJsZURpdiB7XG4gIHN0YXRpYyBkZWZhdWx0UHJvcGVydGllcyA9IHtcbiAgICBjbGFzc05hbWU6IFwidG9wXCJcbiAgfTtcbn1cblxuZXhwb3J0IGRlZmF1bHQgd2l0aFN0eWxlKFRvcFNpemVhYmxlRGl2KWBcblxuICBoZWlnaHQ6IDY0cmVtO1xuICBtaW4taGVpZ2h0OiAxMnJlbTtcbiAgXG5gO1xuIl0sIm5hbWVzIjpbIlRvcFNpemVhYmxlRGl2IiwiU2l6ZWFibGVEaXYiLCJkZWZhdWx0UHJvcGVydGllcyIsImNsYXNzTmFtZSIsIndpdGhTdHlsZSJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7K0JBWUE7OztlQUFBOzs7c0VBVnNCOzRCQUVNOzs7Ozs7QUFFNUIsTUFBTUEsdUJBQXVCQyx1QkFBVztJQUN0QyxPQUFPQyxvQkFBb0I7UUFDekJDLFdBQVc7SUFDYixFQUFFO0FBQ0o7TUFFQSxXQUFlQyxJQUFBQSxzQkFBUyxFQUFDSixlQUFlLENBQUM7Ozs7O0FBS3pDLENBQUMifQ==
|
|
@@ -8,32 +8,20 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return _default;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const _easywithstyle = /*#__PURE__*/ _interop_require_default(require("easy-with-style"));
|
|
12
|
+
const _easy = require("easy");
|
|
13
13
|
function _interop_require_default(obj) {
|
|
14
14
|
return obj && obj.__esModule ? obj : {
|
|
15
15
|
default: obj
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
function _templateObject() {
|
|
29
|
-
var data = _tagged_template_literal([
|
|
30
|
-
"\n\n border: 1px solid darkgrey;\n padding: 0.25rem;\n font-size: 1.2rem;\n font-family: monospace;\n\n"
|
|
31
|
-
]);
|
|
32
|
-
_templateObject = function _templateObject() {
|
|
33
|
-
return data;
|
|
34
|
-
};
|
|
35
|
-
return data;
|
|
36
|
-
}
|
|
37
|
-
var _default = (0, _easywithstyle.default)(_easy.Input)(_templateObject());
|
|
18
|
+
const _default = (0, _easywithstyle.default)(_easy.Input)`
|
|
19
|
+
|
|
20
|
+
border: 1px solid darkgrey;
|
|
21
|
+
padding: 0.25rem;
|
|
22
|
+
font-size: 1.2rem;
|
|
23
|
+
font-family: monospace;
|
|
24
|
+
|
|
25
|
+
`;
|
|
38
26
|
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvaW5wdXQuanMiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmltcG9ydCB3aXRoU3R5bGUgZnJvbSBcImVhc3ktd2l0aC1zdHlsZVwiOyAgLy8vXG5cbmltcG9ydCB7IElucHV0IH0gZnJvbSBcImVhc3lcIjtcblxuZXhwb3J0IGRlZmF1bHQgd2l0aFN0eWxlKElucHV0KWBcblxuICBib3JkZXI6IDFweCBzb2xpZCBkYXJrZ3JleTtcbiAgcGFkZGluZzogMC4yNXJlbTtcbiAgZm9udC1zaXplOiAxLjJyZW07XG4gIGZvbnQtZmFtaWx5OiBtb25vc3BhY2U7XG5cbmA7XG4iXSwibmFtZXMiOlsid2l0aFN0eWxlIiwiSW5wdXQiXSwibWFwcGluZ3MiOiJBQUFBOzs7OytCQU1BOzs7ZUFBQTs7O3NFQUpzQjtzQkFFQTs7Ozs7O01BRXRCLFdBQWVBLElBQUFBLHNCQUFTLEVBQUNDLFdBQUssQ0FBQyxDQUFDOzs7Ozs7O0FBT2hDLENBQUMifQ==
|
|
@@ -8,98 +8,44 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return JavaScriptView;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function _assert_this_initialized(self) {
|
|
14
|
-
if (self === void 0) {
|
|
15
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
|
-
}
|
|
17
|
-
return self;
|
|
18
|
-
}
|
|
19
|
-
function _call_super(_this, derived, args) {
|
|
20
|
-
derived = _get_prototype_of(derived);
|
|
21
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
22
|
-
}
|
|
23
|
-
function _class_call_check(instance, Constructor) {
|
|
24
|
-
if (!(instance instanceof Constructor)) {
|
|
25
|
-
throw new TypeError("Cannot call a class as a function");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function _define_property(obj, key, value) {
|
|
29
|
-
if (key in obj) {
|
|
30
|
-
Object.defineProperty(obj, key, {
|
|
31
|
-
value: value,
|
|
32
|
-
enumerable: true,
|
|
33
|
-
configurable: true,
|
|
34
|
-
writable: true
|
|
35
|
-
});
|
|
36
|
-
} else {
|
|
37
|
-
obj[key] = value;
|
|
38
|
-
}
|
|
39
|
-
return obj;
|
|
40
|
-
}
|
|
41
|
-
function _get_prototype_of(o) {
|
|
42
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
43
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
44
|
-
};
|
|
45
|
-
return _get_prototype_of(o);
|
|
46
|
-
}
|
|
47
|
-
function _inherits(subClass, superClass) {
|
|
48
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
49
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
50
|
-
}
|
|
51
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
52
|
-
constructor: {
|
|
53
|
-
value: subClass,
|
|
54
|
-
writable: true,
|
|
55
|
-
configurable: true
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
59
|
-
}
|
|
11
|
+
const _view = /*#__PURE__*/ _interop_require_default(require("../view"));
|
|
12
|
+
const _javascript = /*#__PURE__*/ _interop_require_default(require("../../plugin/javascript"));
|
|
60
13
|
function _interop_require_default(obj) {
|
|
61
14
|
return obj && obj.__esModule ? obj : {
|
|
62
15
|
default: obj
|
|
63
16
|
};
|
|
64
17
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
18
|
+
class JavaScriptView extends _view.default {
|
|
19
|
+
static Plugin = _javascript.default;
|
|
20
|
+
static firaCode = true;
|
|
21
|
+
static initialContent = `"use strict";
|
|
22
|
+
|
|
23
|
+
import "juxtapose";
|
|
24
|
+
|
|
25
|
+
import withStyle from "easy-with-style"; ///
|
|
26
|
+
|
|
27
|
+
import { Body } from "easy";
|
|
28
|
+
|
|
29
|
+
function simpleApplication(selector) {
|
|
30
|
+
const body = new Body(selector);
|
|
31
|
+
|
|
32
|
+
body.mount(
|
|
33
|
+
|
|
34
|
+
<p>
|
|
35
|
+
A simple application.
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
);
|
|
70
39
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
40
|
+
|
|
41
|
+
export default withStyle(simpleApplication)\`
|
|
42
|
+
|
|
43
|
+
color: #333;
|
|
44
|
+
|
|
45
|
+
\`;`;
|
|
46
|
+
static defaultProperties = {
|
|
47
|
+
className: "javascript"
|
|
75
48
|
};
|
|
76
|
-
return _set_prototype_of(o, p);
|
|
77
|
-
}
|
|
78
|
-
function _type_of(obj) {
|
|
79
|
-
"@swc/helpers - typeof";
|
|
80
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
81
49
|
}
|
|
82
|
-
function _is_native_reflect_construct() {
|
|
83
|
-
try {
|
|
84
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
85
|
-
} catch (_) {}
|
|
86
|
-
return (_is_native_reflect_construct = function() {
|
|
87
|
-
return !!result;
|
|
88
|
-
})();
|
|
89
|
-
}
|
|
90
|
-
var JavaScriptView = /*#__PURE__*/ function(View) {
|
|
91
|
-
_inherits(JavaScriptView, View);
|
|
92
|
-
function JavaScriptView() {
|
|
93
|
-
_class_call_check(this, JavaScriptView);
|
|
94
|
-
return _call_super(this, JavaScriptView, arguments);
|
|
95
|
-
}
|
|
96
|
-
return JavaScriptView;
|
|
97
|
-
}(_view.default);
|
|
98
|
-
_define_property(JavaScriptView, "Plugin", _javascript.default);
|
|
99
|
-
_define_property(JavaScriptView, "firaCode", true);
|
|
100
|
-
_define_property(JavaScriptView, "initialContent", '"use strict";\n\nimport "juxtapose";\n\nimport withStyle from "easy-with-style"; ///\n\nimport { Body } from "easy";\n\nfunction simpleApplication(selector) {\n const body = new Body(selector);\n\n body.mount(\n\n <p>\n A simple application.\n </p>\n\n );\n}\n\nexport default withStyle(simpleApplication)`\n\n color: #333;\n\n`;');
|
|
101
|
-
_define_property(JavaScriptView, "defaultProperties", {
|
|
102
|
-
className: "javascript"
|
|
103
|
-
});
|
|
104
50
|
|
|
105
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzI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BdUJDLGFBQUk7SUFDOUMsT0FBT0MsU0FBU0MsbUJBQWdCLENBQUM7SUFFakMsT0FBT0MsV0FBVyxLQUFLO0lBRXZCLE9BQU9DLGlCQUFpQixDQUFDOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0F3QnhCLENBQUMsQ0FBQztJQUVILE9BQU9DLG9CQUFvQjtRQUN6QkMsV0FBVztJQUNiLEVBQUU7QUFDSiJ9
|
package/lib/example/view/json.js
CHANGED
|
@@ -8,98 +8,31 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return JSONView;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function _assert_this_initialized(self) {
|
|
14
|
-
if (self === void 0) {
|
|
15
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
|
-
}
|
|
17
|
-
return self;
|
|
18
|
-
}
|
|
19
|
-
function _call_super(_this, derived, args) {
|
|
20
|
-
derived = _get_prototype_of(derived);
|
|
21
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
22
|
-
}
|
|
23
|
-
function _class_call_check(instance, Constructor) {
|
|
24
|
-
if (!(instance instanceof Constructor)) {
|
|
25
|
-
throw new TypeError("Cannot call a class as a function");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function _define_property(obj, key, value) {
|
|
29
|
-
if (key in obj) {
|
|
30
|
-
Object.defineProperty(obj, key, {
|
|
31
|
-
value: value,
|
|
32
|
-
enumerable: true,
|
|
33
|
-
configurable: true,
|
|
34
|
-
writable: true
|
|
35
|
-
});
|
|
36
|
-
} else {
|
|
37
|
-
obj[key] = value;
|
|
38
|
-
}
|
|
39
|
-
return obj;
|
|
40
|
-
}
|
|
41
|
-
function _get_prototype_of(o) {
|
|
42
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
43
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
44
|
-
};
|
|
45
|
-
return _get_prototype_of(o);
|
|
46
|
-
}
|
|
47
|
-
function _inherits(subClass, superClass) {
|
|
48
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
49
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
50
|
-
}
|
|
51
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
52
|
-
constructor: {
|
|
53
|
-
value: subClass,
|
|
54
|
-
writable: true,
|
|
55
|
-
configurable: true
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
59
|
-
}
|
|
11
|
+
const _view = /*#__PURE__*/ _interop_require_default(require("../view"));
|
|
12
|
+
const _json = /*#__PURE__*/ _interop_require_default(require("../../plugin/json"));
|
|
60
13
|
function _interop_require_default(obj) {
|
|
61
14
|
return obj && obj.__esModule ? obj : {
|
|
62
15
|
default: obj
|
|
63
16
|
};
|
|
64
17
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
18
|
+
class JSONView extends _view.default {
|
|
19
|
+
static Plugin = _json.default;
|
|
20
|
+
static firaCode = true;
|
|
21
|
+
static initialContent = `{
|
|
22
|
+
"type": "book",
|
|
23
|
+
"title": "Look to Windward",
|
|
24
|
+
"author": "Look to Windward",
|
|
25
|
+
"stores" : [{
|
|
26
|
+
"identifier": 123
|
|
27
|
+
}],
|
|
28
|
+
"details" : {
|
|
29
|
+
"in-print": true,
|
|
30
|
+
"stock-count": 123
|
|
31
|
+
}
|
|
32
|
+
}`;
|
|
33
|
+
static defaultProperties = {
|
|
34
|
+
className: "json"
|
|
75
35
|
};
|
|
76
|
-
return _set_prototype_of(o, p);
|
|
77
36
|
}
|
|
78
|
-
function _type_of(obj) {
|
|
79
|
-
"@swc/helpers - typeof";
|
|
80
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
81
|
-
}
|
|
82
|
-
function _is_native_reflect_construct() {
|
|
83
|
-
try {
|
|
84
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
85
|
-
} catch (_) {}
|
|
86
|
-
return (_is_native_reflect_construct = function() {
|
|
87
|
-
return !!result;
|
|
88
|
-
})();
|
|
89
|
-
}
|
|
90
|
-
var JSONView = /*#__PURE__*/ function(View) {
|
|
91
|
-
_inherits(JSONView, View);
|
|
92
|
-
function JSONView() {
|
|
93
|
-
_class_call_check(this, JSONView);
|
|
94
|
-
return _call_super(this, JSONView, arguments);
|
|
95
|
-
}
|
|
96
|
-
return JSONView;
|
|
97
|
-
}(_view.default);
|
|
98
|
-
_define_property(JSONView, "Plugin", _json.default);
|
|
99
|
-
_define_property(JSONView, "firaCode", true);
|
|
100
|
-
_define_property(JSONView, "initialContent", '{ \n "type": "book",\n "title": "Look to Windward",\n "author": "Look to Windward",\n "stores" : [{\n "identifier": 123\n }],\n "details" : {\n "in-print": true,\n "stock-count": 123\n }\n}');
|
|
101
|
-
_define_property(JSONView, "defaultProperties", {
|
|
102
|
-
className: "json"
|
|
103
|
-
});
|
|
104
37
|
|
|
105
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvanNvbi5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IFZpZXcgZnJvbSBcIi4uL3ZpZXdcIjtcblxuaW1wb3J0IEpTT05QbHVnaW4gZnJvbSBcIi4uLy4uL3BsdWdpbi9qc29uXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIEpTT05WaWV3IGV4dGVu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