yapp 4.0.119 → 4.0.121
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/example.js +6969 -9844
- package/lib/div/gutter.js +49 -60
- package/lib/div/lineNumbers.js +44 -55
- package/lib/div/overlay.js +50 -61
- package/lib/div/syntax.js +44 -55
- package/lib/example/div/sizeable/left.js +32 -32
- package/lib/example/div/sizeable/middle.js +32 -32
- package/lib/example/div/sizeable/right.js +32 -32
- package/lib/example/div/sizeable/top.js +32 -32
- package/lib/example/input.js +6 -6
- package/lib/example/subHeading.js +6 -6
- package/lib/example/textarea/bnf.js +29 -29
- package/lib/example/textarea/lexicalEntries.js +29 -29
- package/lib/example/textarea/parseTree.js +29 -29
- package/lib/example/textarea/tokens.js +29 -29
- package/lib/example/textarea.js +6 -6
- package/lib/example/view/javascript.js +31 -31
- package/lib/example/view/json.js +31 -31
- package/lib/example/view/plainText.js +31 -31
- package/lib/example/view/xml.js +31 -31
- package/lib/example/view.js +64 -75
- package/lib/example/yapp.js +31 -31
- package/lib/example.js +6 -6
- package/lib/index.js +6 -6
- package/lib/lexer/javascript.js +41 -41
- package/lib/lexer/json.js +41 -41
- package/lib/lexer/plainText.js +41 -41
- package/lib/lexer/xml.js +41 -41
- package/lib/parser/javascript.js +33 -33
- package/lib/parser/json.js +31 -31
- package/lib/parser/plainText.js +31 -31
- package/lib/parser/xml.js +31 -31
- package/lib/plugin/javascript.js +46 -57
- package/lib/plugin/json.js +46 -57
- package/lib/plugin/plainText.js +46 -57
- package/lib/plugin/xml.js +46 -57
- package/lib/plugin.js +5 -5
- package/lib/prettyPrinter.js +53 -64
- package/lib/processor/javascript.js +35 -35
- package/lib/processor/json.js +27 -27
- package/lib/processor/plainText.js +27 -27
- package/lib/processor/xml.js +33 -33
- package/lib/processor.js +9 -9
- package/lib/renderYappStyles.js +6 -6
- package/lib/richTextarea.js +41 -41
- package/lib/style/syntax.js +6 -6
- package/lib/token/significant/argument.js +28 -28
- package/lib/token/significant/attribute.js +28 -28
- package/lib/token/significant/comment.js +28 -28
- package/lib/token/significant/error.js +28 -28
- package/lib/token/significant/jsx/attributeName.js +28 -28
- package/lib/token/significant/jsx/tagName.js +28 -28
- package/lib/token/significant/name.js +28 -28
- package/lib/token/significant/string.js +29 -29
- package/lib/token/significant/variable.js +28 -28
- package/lib/utilities/plugin.js +6 -6
- package/lib/yapp.js +49 -60
- package/package.json +6 -6
|
@@ -8,20 +8,20 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return JavaScriptView;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
var _view = /*#__PURE__*/
|
|
12
|
-
var _javascript = /*#__PURE__*/
|
|
13
|
-
function
|
|
11
|
+
var _view = /*#__PURE__*/ _interop_require_default(require("../view"));
|
|
12
|
+
var _javascript = /*#__PURE__*/ _interop_require_default(require("../../plugin/javascript"));
|
|
13
|
+
function _assert_this_initialized(self) {
|
|
14
14
|
if (self === void 0) {
|
|
15
15
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
16
|
}
|
|
17
17
|
return self;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function _class_call_check(instance, Constructor) {
|
|
20
20
|
if (!(instance instanceof Constructor)) {
|
|
21
21
|
throw new TypeError("Cannot call a class as a function");
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function _define_property(obj, key, value) {
|
|
25
25
|
if (key in obj) {
|
|
26
26
|
Object.defineProperty(obj, key, {
|
|
27
27
|
value: value,
|
|
@@ -34,11 +34,11 @@ function _defineProperty(obj, key, value) {
|
|
|
34
34
|
}
|
|
35
35
|
return obj;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
37
|
+
function _get_prototype_of(o) {
|
|
38
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
39
39
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
40
40
|
};
|
|
41
|
-
return
|
|
41
|
+
return _get_prototype_of(o);
|
|
42
42
|
}
|
|
43
43
|
function _inherits(subClass, superClass) {
|
|
44
44
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -51,31 +51,31 @@ function _inherits(subClass, superClass) {
|
|
|
51
51
|
configurable: true
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
if (superClass)
|
|
54
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function _interop_require_default(obj) {
|
|
57
57
|
return obj && obj.__esModule ? obj : {
|
|
58
58
|
default: obj
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
if (call && (
|
|
61
|
+
function _possible_constructor_return(self, call) {
|
|
62
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
63
63
|
return call;
|
|
64
64
|
}
|
|
65
|
-
return
|
|
65
|
+
return _assert_this_initialized(self);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
67
|
+
function _set_prototype_of(o, p) {
|
|
68
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
69
69
|
o.__proto__ = p;
|
|
70
70
|
return o;
|
|
71
71
|
};
|
|
72
|
-
return
|
|
72
|
+
return _set_prototype_of(o, p);
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
function _type_of(obj) {
|
|
75
75
|
"@swc/helpers - typeof";
|
|
76
76
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
77
|
-
}
|
|
78
|
-
function
|
|
77
|
+
}
|
|
78
|
+
function _is_native_reflect_construct() {
|
|
79
79
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
80
80
|
if (Reflect.construct.sham) return false;
|
|
81
81
|
if (typeof Proxy === "function") return true;
|
|
@@ -86,34 +86,34 @@ function _isNativeReflectConstruct() {
|
|
|
86
86
|
return false;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
var hasNativeReflectConstruct =
|
|
89
|
+
function _create_super(Derived) {
|
|
90
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
91
91
|
return function _createSuperInternal() {
|
|
92
|
-
var Super =
|
|
92
|
+
var Super = _get_prototype_of(Derived), result;
|
|
93
93
|
if (hasNativeReflectConstruct) {
|
|
94
|
-
var NewTarget =
|
|
94
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
95
95
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
96
96
|
} else {
|
|
97
97
|
result = Super.apply(this, arguments);
|
|
98
98
|
}
|
|
99
|
-
return
|
|
99
|
+
return _possible_constructor_return(this, result);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
var JavaScriptView = /*#__PURE__*/ function(View) {
|
|
103
103
|
_inherits(JavaScriptView, View);
|
|
104
|
-
var _super =
|
|
104
|
+
var _super = _create_super(JavaScriptView);
|
|
105
105
|
function JavaScriptView() {
|
|
106
|
-
|
|
106
|
+
_class_call_check(this, JavaScriptView);
|
|
107
107
|
return _super.apply(this, arguments);
|
|
108
108
|
}
|
|
109
109
|
return JavaScriptView;
|
|
110
110
|
}(_view.default);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
_define_property(JavaScriptView, "Plugin", _javascript.default);
|
|
112
|
+
_define_property(JavaScriptView, "firaCode", true);
|
|
113
|
+
_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`;');
|
|
114
|
+
_define_property(JavaScriptView, "defaultProperties", {
|
|
115
115
|
className: "javascript"
|
|
116
116
|
});
|
|
117
117
|
;
|
|
118
118
|
|
|
119
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvamF2YXNjcmlwdC5qcyIsIjw8anN4LWNvbmZpZy1wcmFnbWEuanM+PiJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IFZpZXcgZnJvbSBcIi4uL3ZpZXdcIjtcblxuaW1wb3J0IEphdmFTY3JpcHRQbHVnaW4gZnJvbSBcIi4uLy4uL3BsdWdpbi9qYXZhc2NyaXB0XCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIEphdmFTY3JpcHRWaWV3IGV4dGVuZHMgVmlldyB7XG4gIHN0YXRpYyBQbHVnaW4gPSBKYXZhU2NyaXB0UGx1Z2luO1xuXG4gIHN0YXRpYyBmaXJhQ29kZSA9IHRydWU7XG5cbiAgc3RhdGljIGluaXRpYWxDb250ZW50ID0gYFwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgXCJqdXh0YXBvc2VcIjtcblxuaW1wb3J0IHdpdGhTdHlsZSBmcm9tIFwiZWFzeS13aXRoLXN0eWxlXCI7IC8vL1xuXG5pbXBvcnQgeyBCb2R5IH0gZnJvbSBcImVhc3lcIjtcblxuZnVuY3Rpb24gc2ltcGxlQXBwbGljYXRpb24oc2VsZWN0b3IpIHtcbiAgY29uc3QgYm9keSA9IG5ldyBCb2R5KHNlbGVjdG9yKTtcblxuICBib2R5Lm1vdW50KFxuXG4gICAgPHA+XG4gICAgICBBIHNpbXBsZSBhcHBsaWNhdGlvbi5cbiAgICA8L3A+
|
|
119
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvamF2YXNjcmlwdC5qcyIsIjw8anN4LWNvbmZpZy1wcmFnbWEuanM+P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dWdpbiIsImZpcmFDb2RlIiwiaW5pdGlhbENvbnRlbnQiLCJkZWZhdWx0UHJvcGVydGllcyIsImNsYXNzTmFtZSJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7ZUFNcUJBOzs7MkRBSko7aUVBRVk7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVkLElBQUEsQUFBTUEsK0JBQU47Y0FBTUE7K0JBQUFBO2FBQUFBO2dDQUFBQTs7O1dBQUFBO0VBQXVCQyxhQUFJO0FBQzlDLGlCQURtQkQsZ0JBQ1pFLFVBQVNDLG1CQUFnQjtBQUVoQyxpQkFIbUJILGdCQUdaSSxZQUFXLElBQUk7QUFFdEIsaUJBTG1CSixnQkFLWkssa0JBQWtCO0FBMEJ6QixpQkEvQm1CTCxnQkErQlpNLHFCQUFvQjtJQUN6QkMsV0FBVztBQUNiIn0=
|
package/lib/example/view/json.js
CHANGED
|
@@ -8,20 +8,20 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return JSONView;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
var _view = /*#__PURE__*/
|
|
12
|
-
var _json = /*#__PURE__*/
|
|
13
|
-
function
|
|
11
|
+
var _view = /*#__PURE__*/ _interop_require_default(require("../view"));
|
|
12
|
+
var _json = /*#__PURE__*/ _interop_require_default(require("../../plugin/json"));
|
|
13
|
+
function _assert_this_initialized(self) {
|
|
14
14
|
if (self === void 0) {
|
|
15
15
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
16
|
}
|
|
17
17
|
return self;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function _class_call_check(instance, Constructor) {
|
|
20
20
|
if (!(instance instanceof Constructor)) {
|
|
21
21
|
throw new TypeError("Cannot call a class as a function");
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function _define_property(obj, key, value) {
|
|
25
25
|
if (key in obj) {
|
|
26
26
|
Object.defineProperty(obj, key, {
|
|
27
27
|
value: value,
|
|
@@ -34,11 +34,11 @@ function _defineProperty(obj, key, value) {
|
|
|
34
34
|
}
|
|
35
35
|
return obj;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
37
|
+
function _get_prototype_of(o) {
|
|
38
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
39
39
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
40
40
|
};
|
|
41
|
-
return
|
|
41
|
+
return _get_prototype_of(o);
|
|
42
42
|
}
|
|
43
43
|
function _inherits(subClass, superClass) {
|
|
44
44
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -51,31 +51,31 @@ function _inherits(subClass, superClass) {
|
|
|
51
51
|
configurable: true
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
if (superClass)
|
|
54
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function _interop_require_default(obj) {
|
|
57
57
|
return obj && obj.__esModule ? obj : {
|
|
58
58
|
default: obj
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
if (call && (
|
|
61
|
+
function _possible_constructor_return(self, call) {
|
|
62
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
63
63
|
return call;
|
|
64
64
|
}
|
|
65
|
-
return
|
|
65
|
+
return _assert_this_initialized(self);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
67
|
+
function _set_prototype_of(o, p) {
|
|
68
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
69
69
|
o.__proto__ = p;
|
|
70
70
|
return o;
|
|
71
71
|
};
|
|
72
|
-
return
|
|
72
|
+
return _set_prototype_of(o, p);
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
function _type_of(obj) {
|
|
75
75
|
"@swc/helpers - typeof";
|
|
76
76
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
77
|
-
}
|
|
78
|
-
function
|
|
77
|
+
}
|
|
78
|
+
function _is_native_reflect_construct() {
|
|
79
79
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
80
80
|
if (Reflect.construct.sham) return false;
|
|
81
81
|
if (typeof Proxy === "function") return true;
|
|
@@ -86,34 +86,34 @@ function _isNativeReflectConstruct() {
|
|
|
86
86
|
return false;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
var hasNativeReflectConstruct =
|
|
89
|
+
function _create_super(Derived) {
|
|
90
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
91
91
|
return function _createSuperInternal() {
|
|
92
|
-
var Super =
|
|
92
|
+
var Super = _get_prototype_of(Derived), result;
|
|
93
93
|
if (hasNativeReflectConstruct) {
|
|
94
|
-
var NewTarget =
|
|
94
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
95
95
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
96
96
|
} else {
|
|
97
97
|
result = Super.apply(this, arguments);
|
|
98
98
|
}
|
|
99
|
-
return
|
|
99
|
+
return _possible_constructor_return(this, result);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
var JSONView = /*#__PURE__*/ function(View) {
|
|
103
103
|
_inherits(JSONView, View);
|
|
104
|
-
var _super =
|
|
104
|
+
var _super = _create_super(JSONView);
|
|
105
105
|
function JSONView() {
|
|
106
|
-
|
|
106
|
+
_class_call_check(this, JSONView);
|
|
107
107
|
return _super.apply(this, arguments);
|
|
108
108
|
}
|
|
109
109
|
return JSONView;
|
|
110
110
|
}(_view.default);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
_define_property(JSONView, "Plugin", _json.default);
|
|
112
|
+
_define_property(JSONView, "firaCode", true);
|
|
113
|
+
_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}');
|
|
114
|
+
_define_property(JSONView, "defaultProperties", {
|
|
115
115
|
className: "json"
|
|
116
116
|
});
|
|
117
117
|
;
|
|
118
118
|
|
|
119
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvanNvbi5qcyIsIjw8anN4LWNvbmZpZy1wcmFnbWEuanM+
|
|
119
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvanNvbi5qcyIsIjw8anN4LWNvbmZpZy1wcmFnbWEuanM+PiJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IFZpZXcgZnJvbSBcIi4uL3ZpZXdcIjtcblxuaW1wb3J0IEpTT05QbHVnaW4gZnJvbSBcIi4uLy4uL3BsdWdpbi9qc29uXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIEpTT05WaWV3IGV4dGVuZHMgVmlldyB7XG4gIHN0YXRpYyBQbHVnaW4gPSBKU09OUGx1Z2luO1xuXG4gIHN0YXRpYyBmaXJhQ29kZSA9IHRydWU7XG5cbiAgc3RhdGljIGluaXRpYWxDb250ZW50ID0gYHsgIFxuICBcInR5cGVcIjogXCJib29rXCIsXG4gIFwidGl0bGVcIjogXCJMb29rIHRvIFdpbmR3YXJkXCIsXG4gIFwiYXV0aG9yXCI6IFwiTG9vayB0byBXaW5kd2FyZFwiLFxuICBcInN0b3Jlc1wiIDog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_view = /*#__PURE__*/ _interop_require_default(require("../view"));
|
|
12
|
+
var _plainText = /*#__PURE__*/ _interop_require_default(require("../../plugin/plainText"));
|
|
13
|
+
function _assert_this_initialized(self) {
|
|
14
14
|
if (self === void 0) {
|
|
15
15
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
16
|
}
|
|
17
17
|
return self;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function _class_call_check(instance, Constructor) {
|
|
20
20
|
if (!(instance instanceof Constructor)) {
|
|
21
21
|
throw new TypeError("Cannot call a class as a function");
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function _define_property(obj, key, value) {
|
|
25
25
|
if (key in obj) {
|
|
26
26
|
Object.defineProperty(obj, key, {
|
|
27
27
|
value: value,
|
|
@@ -34,11 +34,11 @@ function _defineProperty(obj, key, value) {
|
|
|
34
34
|
}
|
|
35
35
|
return obj;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
37
|
+
function _get_prototype_of(o) {
|
|
38
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
39
39
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
40
40
|
};
|
|
41
|
-
return
|
|
41
|
+
return _get_prototype_of(o);
|
|
42
42
|
}
|
|
43
43
|
function _inherits(subClass, superClass) {
|
|
44
44
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -51,31 +51,31 @@ function _inherits(subClass, superClass) {
|
|
|
51
51
|
configurable: true
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
if (superClass)
|
|
54
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function _interop_require_default(obj) {
|
|
57
57
|
return obj && obj.__esModule ? obj : {
|
|
58
58
|
default: obj
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
if (call && (
|
|
61
|
+
function _possible_constructor_return(self, call) {
|
|
62
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
63
63
|
return call;
|
|
64
64
|
}
|
|
65
|
-
return
|
|
65
|
+
return _assert_this_initialized(self);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
67
|
+
function _set_prototype_of(o, p) {
|
|
68
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
69
69
|
o.__proto__ = p;
|
|
70
70
|
return o;
|
|
71
71
|
};
|
|
72
|
-
return
|
|
72
|
+
return _set_prototype_of(o, p);
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
function _type_of(obj) {
|
|
75
75
|
"@swc/helpers - typeof";
|
|
76
76
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
77
|
-
}
|
|
78
|
-
function
|
|
77
|
+
}
|
|
78
|
+
function _is_native_reflect_construct() {
|
|
79
79
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
80
80
|
if (Reflect.construct.sham) return false;
|
|
81
81
|
if (typeof Proxy === "function") return true;
|
|
@@ -86,34 +86,34 @@ function _isNativeReflectConstruct() {
|
|
|
86
86
|
return false;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
var hasNativeReflectConstruct =
|
|
89
|
+
function _create_super(Derived) {
|
|
90
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
91
91
|
return function _createSuperInternal() {
|
|
92
|
-
var Super =
|
|
92
|
+
var Super = _get_prototype_of(Derived), result;
|
|
93
93
|
if (hasNativeReflectConstruct) {
|
|
94
|
-
var NewTarget =
|
|
94
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
95
95
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
96
96
|
} else {
|
|
97
97
|
result = Super.apply(this, arguments);
|
|
98
98
|
}
|
|
99
|
-
return
|
|
99
|
+
return _possible_constructor_return(this, result);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
var PlainTextView = /*#__PURE__*/ function(View) {
|
|
103
103
|
_inherits(PlainTextView, View);
|
|
104
|
-
var _super =
|
|
104
|
+
var _super = _create_super(PlainTextView);
|
|
105
105
|
function PlainTextView() {
|
|
106
|
-
|
|
106
|
+
_class_call_check(this, PlainTextView);
|
|
107
107
|
return _super.apply(this, arguments);
|
|
108
108
|
}
|
|
109
109
|
return PlainTextView;
|
|
110
110
|
}(_view.default);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
_define_property(PlainTextView, "Plugin", _plainText.default);
|
|
112
|
+
_define_property(PlainTextView, "firaCode", true);
|
|
113
|
+
_define_property(PlainTextView, "initialContent", "Some plain text...");
|
|
114
|
+
_define_property(PlainTextView, "defaultProperties", {
|
|
115
115
|
className: "plain-text"
|
|
116
116
|
});
|
|
117
117
|
;
|
|
118
118
|
|
|
119
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvcGxhaW5UZXh0LmpzIiwiPDxqc3gtY29uZmlnLXByYWdtYS5qcz4+
|
|
119
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvcGxhaW5UZXh0LmpzIiwiPDxqc3gtY29uZmlnLXByYWdtYS5qcz4+Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgVmlldyBmcm9tIFwiLi4vdmlld1wiO1xuXG5pbXBvcnQgUGxhaW5UZXh0UGx1Z2luIGZyb20gXCIuLi8uLi9wbHVnaW4vcGxhaW5UZXh0XCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFBsYWluVGV4dFZpZXcgZXh0ZW5kcyB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E__*/
|
|
12
|
-
var _xml = /*#__PURE__*/
|
|
13
|
-
function
|
|
11
|
+
var _view = /*#__PURE__*/ _interop_require_default(require("../view"));
|
|
12
|
+
var _xml = /*#__PURE__*/ _interop_require_default(require("../../plugin/xml"));
|
|
13
|
+
function _assert_this_initialized(self) {
|
|
14
14
|
if (self === void 0) {
|
|
15
15
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
16
|
}
|
|
17
17
|
return self;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function _class_call_check(instance, Constructor) {
|
|
20
20
|
if (!(instance instanceof Constructor)) {
|
|
21
21
|
throw new TypeError("Cannot call a class as a function");
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function _define_property(obj, key, value) {
|
|
25
25
|
if (key in obj) {
|
|
26
26
|
Object.defineProperty(obj, key, {
|
|
27
27
|
value: value,
|
|
@@ -34,11 +34,11 @@ function _defineProperty(obj, key, value) {
|
|
|
34
34
|
}
|
|
35
35
|
return obj;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
37
|
+
function _get_prototype_of(o) {
|
|
38
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
39
39
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
40
40
|
};
|
|
41
|
-
return
|
|
41
|
+
return _get_prototype_of(o);
|
|
42
42
|
}
|
|
43
43
|
function _inherits(subClass, superClass) {
|
|
44
44
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -51,31 +51,31 @@ function _inherits(subClass, superClass) {
|
|
|
51
51
|
configurable: true
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
if (superClass)
|
|
54
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function _interop_require_default(obj) {
|
|
57
57
|
return obj && obj.__esModule ? obj : {
|
|
58
58
|
default: obj
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
if (call && (
|
|
61
|
+
function _possible_constructor_return(self, call) {
|
|
62
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
63
63
|
return call;
|
|
64
64
|
}
|
|
65
|
-
return
|
|
65
|
+
return _assert_this_initialized(self);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
67
|
+
function _set_prototype_of(o, p) {
|
|
68
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
69
69
|
o.__proto__ = p;
|
|
70
70
|
return o;
|
|
71
71
|
};
|
|
72
|
-
return
|
|
72
|
+
return _set_prototype_of(o, p);
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
function _type_of(obj) {
|
|
75
75
|
"@swc/helpers - typeof";
|
|
76
76
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
77
|
-
}
|
|
78
|
-
function
|
|
77
|
+
}
|
|
78
|
+
function _is_native_reflect_construct() {
|
|
79
79
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
80
80
|
if (Reflect.construct.sham) return false;
|
|
81
81
|
if (typeof Proxy === "function") return true;
|
|
@@ -86,34 +86,34 @@ function _isNativeReflectConstruct() {
|
|
|
86
86
|
return false;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
var hasNativeReflectConstruct =
|
|
89
|
+
function _create_super(Derived) {
|
|
90
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
91
91
|
return function _createSuperInternal() {
|
|
92
|
-
var Super =
|
|
92
|
+
var Super = _get_prototype_of(Derived), result;
|
|
93
93
|
if (hasNativeReflectConstruct) {
|
|
94
|
-
var NewTarget =
|
|
94
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
95
95
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
96
96
|
} else {
|
|
97
97
|
result = Super.apply(this, arguments);
|
|
98
98
|
}
|
|
99
|
-
return
|
|
99
|
+
return _possible_constructor_return(this, result);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
var XMLView = /*#__PURE__*/ function(View) {
|
|
103
103
|
_inherits(XMLView, View);
|
|
104
|
-
var _super =
|
|
104
|
+
var _super = _create_super(XMLView);
|
|
105
105
|
function XMLView() {
|
|
106
|
-
|
|
106
|
+
_class_call_check(this, XMLView);
|
|
107
107
|
return _super.apply(this, arguments);
|
|
108
108
|
}
|
|
109
109
|
return XMLView;
|
|
110
110
|
}(_view.default);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
_define_property(XMLView, "Plugin", _xml.default);
|
|
112
|
+
_define_property(XMLView, "firaCode", false);
|
|
113
|
+
_define_property(XMLView, "initialContent", '<?xml version="1.0" encoding="UTF-8"?>\n<!-- Look to Windward by Iain M. Banks -->\n<book>\n <name>\n Look to Windward\n </name>\n <author>\n Iain M. Banks\n </author>\n <language>\n English\n </language>\n <genre>\n Science fiction\n </genre>\n</book>');
|
|
114
|
+
_define_property(XMLView, "defaultProperties", {
|
|
115
115
|
className: "xml"
|
|
116
116
|
});
|
|
117
117
|
;
|
|
118
118
|
|
|
119
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcveG1sLmpzIiwiPDxqc3gtY29uZmlnLXByYWdtYS5qcz4+Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgVmlldyBmcm9tIFwiLi4vdmlld1wiO1xuXG5pbXBvcnQgWE1MUGx1Z2luIGZyb20gXCIuLi8uLi9wbHVnaW4veG1sXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFhNTFZpZXcgZXh0ZW5kcyBWaWV3IHtcbiAgc3RhdGljIFBsdWdpbiA9IFh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