@speclynx/apidom-ns-json-schema-draft-7 2.11.0 → 2.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/apidom-ns-json-schema-draft-7.browser.js +370 -65
- package/dist/apidom-ns-json-schema-draft-7.browser.min.js +1 -1
- package/package.json +7 -7
- package/src/refractor/plugins/replace-empty-element.cjs +1 -0
- package/src/refractor/plugins/replace-empty-element.mjs +2 -1
|
@@ -495,10 +495,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
495
495
|
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7601);
|
|
496
496
|
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7071);
|
|
497
497
|
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5810);
|
|
498
|
-
/* harmony import */ var
|
|
499
|
-
/* harmony import */ var
|
|
500
|
-
/* harmony import */ var
|
|
501
|
-
/* harmony import */ var
|
|
498
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9686);
|
|
499
|
+
/* harmony import */ var _speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(4673);
|
|
500
|
+
/* harmony import */ var _speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(796);
|
|
501
|
+
/* harmony import */ var _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(6256);
|
|
502
|
+
/* harmony import */ var _elements_LinkDescription_ts__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(6575);
|
|
502
503
|
|
|
503
504
|
|
|
504
505
|
|
|
@@ -543,13 +544,13 @@ const isEmptyElement = element => (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTE
|
|
|
543
544
|
const schema = {
|
|
544
545
|
JSONSchemaDraft7Element: {
|
|
545
546
|
additionalItems(...args) {
|
|
546
|
-
return new
|
|
547
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
547
548
|
},
|
|
548
549
|
items(...args) {
|
|
549
|
-
return new
|
|
550
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
550
551
|
},
|
|
551
552
|
contains(...args) {
|
|
552
|
-
return new
|
|
553
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
553
554
|
},
|
|
554
555
|
required(...args) {
|
|
555
556
|
const element = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__["default"](...args);
|
|
@@ -562,7 +563,7 @@ const schema = {
|
|
|
562
563
|
return element;
|
|
563
564
|
},
|
|
564
565
|
additionalProperties(...args) {
|
|
565
|
-
return new
|
|
566
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
566
567
|
},
|
|
567
568
|
patternProperties(...args) {
|
|
568
569
|
const element = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__["default"](...args);
|
|
@@ -575,7 +576,7 @@ const schema = {
|
|
|
575
576
|
return element;
|
|
576
577
|
},
|
|
577
578
|
propertyNames(...args) {
|
|
578
|
-
return new
|
|
579
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
579
580
|
},
|
|
580
581
|
enum(...args) {
|
|
581
582
|
const element = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__["default"](...args);
|
|
@@ -598,16 +599,16 @@ const schema = {
|
|
|
598
599
|
return element;
|
|
599
600
|
},
|
|
600
601
|
if(...args) {
|
|
601
|
-
return new
|
|
602
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
602
603
|
},
|
|
603
604
|
then(...args) {
|
|
604
|
-
return new
|
|
605
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
605
606
|
},
|
|
606
607
|
else(...args) {
|
|
607
|
-
return new
|
|
608
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
608
609
|
},
|
|
609
610
|
not(...args) {
|
|
610
|
-
return new
|
|
611
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
611
612
|
},
|
|
612
613
|
definitions(...args) {
|
|
613
614
|
const element = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__["default"](...args);
|
|
@@ -627,13 +628,13 @@ const schema = {
|
|
|
627
628
|
},
|
|
628
629
|
LinkDescriptionElement: {
|
|
629
630
|
hrefSchema(...args) {
|
|
630
|
-
return new
|
|
631
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
631
632
|
},
|
|
632
633
|
targetSchema(...args) {
|
|
633
|
-
return new
|
|
634
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
634
635
|
},
|
|
635
636
|
submissionSchema(...args) {
|
|
636
|
-
return new
|
|
637
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
637
638
|
},
|
|
638
639
|
templatePointers(...args) {
|
|
639
640
|
return new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__["default"](...args);
|
|
@@ -645,53 +646,53 @@ const schema = {
|
|
|
645
646
|
return new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__["default"](...args);
|
|
646
647
|
},
|
|
647
648
|
headerSchema(...args) {
|
|
648
|
-
return new
|
|
649
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
649
650
|
}
|
|
650
651
|
},
|
|
651
652
|
'json-schema-properties': {
|
|
652
653
|
'[key: *]': function key(...args) {
|
|
653
|
-
return new
|
|
654
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
654
655
|
}
|
|
655
656
|
},
|
|
656
657
|
'json-schema-patternProperties': {
|
|
657
658
|
'[key: *]': function key(...args) {
|
|
658
|
-
return new
|
|
659
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
659
660
|
}
|
|
660
661
|
},
|
|
661
662
|
'json-schema-dependencies': {
|
|
662
663
|
'[key: *]': function key(...args) {
|
|
663
|
-
return new
|
|
664
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
664
665
|
}
|
|
665
666
|
},
|
|
666
667
|
'json-schema-allOf': {
|
|
667
668
|
'<*>': function asterisk(...args) {
|
|
668
|
-
return new
|
|
669
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
669
670
|
}
|
|
670
671
|
},
|
|
671
672
|
'json-schema-anyOf': {
|
|
672
673
|
'<*>': function asterisk(...args) {
|
|
673
|
-
return new
|
|
674
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
674
675
|
}
|
|
675
676
|
},
|
|
676
677
|
'json-schema-oneOf': {
|
|
677
678
|
'<*>': function asterisk(...args) {
|
|
678
|
-
return new
|
|
679
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
679
680
|
}
|
|
680
681
|
},
|
|
681
682
|
'json-schema-definitions': {
|
|
682
683
|
'[key: *]': function key(...args) {
|
|
683
|
-
return new
|
|
684
|
+
return new _elements_JSONSchema_ts__WEBPACK_IMPORTED_MODULE_9__["default"](...args);
|
|
684
685
|
}
|
|
685
686
|
},
|
|
686
687
|
'json-schema-links': {
|
|
687
688
|
'<*>': function asterisk(...args) {
|
|
688
|
-
return new
|
|
689
|
+
return new _elements_LinkDescription_ts__WEBPACK_IMPORTED_MODULE_10__["default"](...args);
|
|
689
690
|
}
|
|
690
691
|
}
|
|
691
692
|
};
|
|
692
693
|
const findElementFactory = (ancestor, keyName) => {
|
|
693
|
-
const elementType = (0,
|
|
694
|
-
const keyMapping = schema[elementType] || schema[(0,
|
|
694
|
+
const elementType = (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_8__.getNodeType)(ancestor); // @ts-ignore
|
|
695
|
+
const keyMapping = schema[elementType] || schema[(0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_7__["default"])(ancestor.classes.first)];
|
|
695
696
|
return typeof keyMapping === 'undefined' ? undefined : Object.hasOwn(keyMapping, '[key: *]') ? keyMapping['[key: *]'] : keyMapping[keyName];
|
|
696
697
|
};
|
|
697
698
|
|
|
@@ -714,7 +715,7 @@ const plugin = () => () => ({
|
|
|
714
715
|
elementFactory = findElementFactory(parentElement, '<*>');
|
|
715
716
|
} else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isMemberElement)(parentElement)) {
|
|
716
717
|
context = lineage.at(-2);
|
|
717
|
-
elementFactory = findElementFactory(context, (0,
|
|
718
|
+
elementFactory = findElementFactory(context, (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_7__["default"])(parentElement.key));
|
|
718
719
|
}
|
|
719
720
|
|
|
720
721
|
// no element factory found
|
|
@@ -723,6 +724,7 @@ const plugin = () => () => ({
|
|
|
723
724
|
context
|
|
724
725
|
}, undefined, (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(element.meta), (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(element.attributes));
|
|
725
726
|
_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_5__["default"].transfer(element, replacement);
|
|
727
|
+
_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_6__["default"].transfer(element, replacement);
|
|
726
728
|
path.replaceWith(replacement);
|
|
727
729
|
}
|
|
728
730
|
}
|
|
@@ -11902,6 +11904,52 @@ var both = /*#__PURE__*/(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["def
|
|
|
11902
11904
|
|
|
11903
11905
|
/***/ },
|
|
11904
11906
|
|
|
11907
|
+
/***/ 8138
|
|
11908
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
11909
|
+
|
|
11910
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11911
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11912
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11913
|
+
/* harmony export */ });
|
|
11914
|
+
/* harmony import */ var _internal_clone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8575);
|
|
11915
|
+
/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8938);
|
|
11916
|
+
|
|
11917
|
+
|
|
11918
|
+
|
|
11919
|
+
/**
|
|
11920
|
+
* Creates a deep copy of the source that can be used in place of the source
|
|
11921
|
+
* object without retaining any references to it.
|
|
11922
|
+
* The source object may contain (nested) `Array`s and `Object`s,
|
|
11923
|
+
* `Number`s, `String`s, `Boolean`s and `Date`s.
|
|
11924
|
+
* `Function`s are assigned by reference rather than copied.
|
|
11925
|
+
*
|
|
11926
|
+
* Dispatches to a `clone` method if present.
|
|
11927
|
+
*
|
|
11928
|
+
* Note that if the source object has multiple nodes that share a reference,
|
|
11929
|
+
* the returned object will have the same structure, but the references will
|
|
11930
|
+
* be pointed to the location within the cloned value.
|
|
11931
|
+
*
|
|
11932
|
+
* @func
|
|
11933
|
+
* @memberOf R
|
|
11934
|
+
* @since v0.1.0
|
|
11935
|
+
* @category Object
|
|
11936
|
+
* @sig {*} -> {*}
|
|
11937
|
+
* @param {*} value The object or array to clone
|
|
11938
|
+
* @return {*} A deeply cloned copy of `val`
|
|
11939
|
+
* @example
|
|
11940
|
+
*
|
|
11941
|
+
* const objects = [{}, {}, {}];
|
|
11942
|
+
* const objectsClone = R.clone(objects);
|
|
11943
|
+
* objects === objectsClone; //=> false
|
|
11944
|
+
* objects[0] === objectsClone[0]; //=> false
|
|
11945
|
+
*/
|
|
11946
|
+
var clone = /*#__PURE__*/(0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function clone(value) {
|
|
11947
|
+
return value != null && typeof value.clone === 'function' ? value.clone() : (0,_internal_clone_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, true);
|
|
11948
|
+
});
|
|
11949
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clone);
|
|
11950
|
+
|
|
11951
|
+
/***/ },
|
|
11952
|
+
|
|
11905
11953
|
/***/ 8199
|
|
11906
11954
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
11907
11955
|
|
|
@@ -13066,6 +13114,144 @@ function _checkForMethod(methodname, fn) {
|
|
|
13066
13114
|
|
|
13067
13115
|
/***/ },
|
|
13068
13116
|
|
|
13117
|
+
/***/ 8575
|
|
13118
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
13119
|
+
|
|
13120
|
+
__webpack_require__.r(__webpack_exports__);
|
|
13121
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13122
|
+
/* harmony export */ "default": () => (/* binding */ _clone)
|
|
13123
|
+
/* harmony export */ });
|
|
13124
|
+
/* harmony import */ var _cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1254);
|
|
13125
|
+
/* harmony import */ var _type_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(963);
|
|
13126
|
+
|
|
13127
|
+
|
|
13128
|
+
|
|
13129
|
+
/**
|
|
13130
|
+
* Copies an object.
|
|
13131
|
+
*
|
|
13132
|
+
* @private
|
|
13133
|
+
* @param {*} value The value to be copied
|
|
13134
|
+
* @param {Boolean} deep Whether or not to perform deep cloning.
|
|
13135
|
+
* @return {*} The copied value.
|
|
13136
|
+
*/
|
|
13137
|
+
function _clone(value, deep, map) {
|
|
13138
|
+
map || (map = new _ObjectMap());
|
|
13139
|
+
|
|
13140
|
+
// this avoids the slower switch with a quick if decision removing some milliseconds in each run.
|
|
13141
|
+
if (_isPrimitive(value)) {
|
|
13142
|
+
return value;
|
|
13143
|
+
}
|
|
13144
|
+
var copy = function copy(copiedValue) {
|
|
13145
|
+
// Check for circular and same references on the object graph and return its corresponding clone.
|
|
13146
|
+
var cachedCopy = map.get(value);
|
|
13147
|
+
if (cachedCopy) {
|
|
13148
|
+
return cachedCopy;
|
|
13149
|
+
}
|
|
13150
|
+
map.set(value, copiedValue);
|
|
13151
|
+
for (var key in value) {
|
|
13152
|
+
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
|
13153
|
+
copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
|
|
13154
|
+
}
|
|
13155
|
+
}
|
|
13156
|
+
return copiedValue;
|
|
13157
|
+
};
|
|
13158
|
+
switch ((0,_type_js__WEBPACK_IMPORTED_MODULE_1__["default"])(value)) {
|
|
13159
|
+
case 'Object':
|
|
13160
|
+
return copy(Object.create(Object.getPrototypeOf(value)));
|
|
13161
|
+
case 'Array':
|
|
13162
|
+
return copy(Array(value.length));
|
|
13163
|
+
case 'Date':
|
|
13164
|
+
return new Date(value.valueOf());
|
|
13165
|
+
case 'RegExp':
|
|
13166
|
+
return (0,_cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value);
|
|
13167
|
+
case 'Int8Array':
|
|
13168
|
+
case 'Uint8Array':
|
|
13169
|
+
case 'Uint8ClampedArray':
|
|
13170
|
+
case 'Int16Array':
|
|
13171
|
+
case 'Uint16Array':
|
|
13172
|
+
case 'Int32Array':
|
|
13173
|
+
case 'Uint32Array':
|
|
13174
|
+
case 'Float32Array':
|
|
13175
|
+
case 'Float64Array':
|
|
13176
|
+
case 'BigInt64Array':
|
|
13177
|
+
case 'BigUint64Array':
|
|
13178
|
+
return value.slice();
|
|
13179
|
+
default:
|
|
13180
|
+
return value;
|
|
13181
|
+
}
|
|
13182
|
+
}
|
|
13183
|
+
function _isPrimitive(param) {
|
|
13184
|
+
var type = typeof param;
|
|
13185
|
+
return param == null || type != 'object' && type != 'function';
|
|
13186
|
+
}
|
|
13187
|
+
var _ObjectMap = /*#__PURE__*/function () {
|
|
13188
|
+
function _ObjectMap() {
|
|
13189
|
+
this.map = {};
|
|
13190
|
+
this.length = 0;
|
|
13191
|
+
}
|
|
13192
|
+
_ObjectMap.prototype.set = function (key, value) {
|
|
13193
|
+
var hashedKey = this.hash(key);
|
|
13194
|
+
var bucket = this.map[hashedKey];
|
|
13195
|
+
if (!bucket) {
|
|
13196
|
+
this.map[hashedKey] = bucket = [];
|
|
13197
|
+
}
|
|
13198
|
+
bucket.push([key, value]);
|
|
13199
|
+
this.length += 1;
|
|
13200
|
+
};
|
|
13201
|
+
_ObjectMap.prototype.hash = function (key) {
|
|
13202
|
+
var hashedKey = [];
|
|
13203
|
+
for (var value in key) {
|
|
13204
|
+
hashedKey.push(Object.prototype.toString.call(key[value]));
|
|
13205
|
+
}
|
|
13206
|
+
return hashedKey.join();
|
|
13207
|
+
};
|
|
13208
|
+
_ObjectMap.prototype.get = function (key) {
|
|
13209
|
+
/**
|
|
13210
|
+
* depending on the number of objects to be cloned is faster to just iterate over the items in the map just because the hash function is so costly,
|
|
13211
|
+
* on my tests this number is 180, anything above that using the hash function is faster.
|
|
13212
|
+
*/
|
|
13213
|
+
if (this.length <= 180) {
|
|
13214
|
+
for (var p in this.map) {
|
|
13215
|
+
var bucket = this.map[p];
|
|
13216
|
+
for (var i = 0; i < bucket.length; i += 1) {
|
|
13217
|
+
var element = bucket[i];
|
|
13218
|
+
if (element[0] === key) {
|
|
13219
|
+
return element[1];
|
|
13220
|
+
}
|
|
13221
|
+
}
|
|
13222
|
+
}
|
|
13223
|
+
return;
|
|
13224
|
+
}
|
|
13225
|
+
var hashedKey = this.hash(key);
|
|
13226
|
+
var bucket = this.map[hashedKey];
|
|
13227
|
+
if (!bucket) {
|
|
13228
|
+
return;
|
|
13229
|
+
}
|
|
13230
|
+
for (var i = 0; i < bucket.length; i += 1) {
|
|
13231
|
+
var element = bucket[i];
|
|
13232
|
+
if (element[0] === key) {
|
|
13233
|
+
return element[1];
|
|
13234
|
+
}
|
|
13235
|
+
}
|
|
13236
|
+
};
|
|
13237
|
+
return _ObjectMap;
|
|
13238
|
+
}();
|
|
13239
|
+
|
|
13240
|
+
/***/ },
|
|
13241
|
+
|
|
13242
|
+
/***/ 1254
|
|
13243
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
13244
|
+
|
|
13245
|
+
__webpack_require__.r(__webpack_exports__);
|
|
13246
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13247
|
+
/* harmony export */ "default": () => (/* binding */ _cloneRegExp)
|
|
13248
|
+
/* harmony export */ });
|
|
13249
|
+
function _cloneRegExp(pattern) {
|
|
13250
|
+
return new RegExp(pattern.source, pattern.flags ? pattern.flags : (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : '') + (pattern.dotAll ? 's' : ''));
|
|
13251
|
+
}
|
|
13252
|
+
|
|
13253
|
+
/***/ },
|
|
13254
|
+
|
|
13069
13255
|
/***/ 7940
|
|
13070
13256
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
13071
13257
|
|
|
@@ -16401,6 +16587,7 @@ const predicates = {
|
|
|
16401
16587
|
isCommentElement: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isCommentElement,
|
|
16402
16588
|
isParseResultElement: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isParseResultElement,
|
|
16403
16589
|
isSourceMapElement: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isSourceMapElement,
|
|
16590
|
+
hasElementStyle: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.hasElementStyle,
|
|
16404
16591
|
hasElementSourceMap: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.hasElementSourceMap,
|
|
16405
16592
|
includesSymbols: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.includesSymbols,
|
|
16406
16593
|
includesClasses: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.includesClasses
|
|
@@ -16471,7 +16658,19 @@ const resolveSpecification = specification => {
|
|
|
16471
16658
|
if ((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_5__["default"])(val) && (0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])('$ref', val) && (0,ramda__WEBPACK_IMPORTED_MODULE_3__["default"])(ramda_adjunct__WEBPACK_IMPORTED_MODULE_4__["default"], '$ref', val)) {
|
|
16472
16659
|
const $ref = (0,ramda__WEBPACK_IMPORTED_MODULE_2__["default"])(['$ref'], val);
|
|
16473
16660
|
const pointer = (0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_6__["default"])('#/', $ref);
|
|
16474
|
-
|
|
16661
|
+
const resolved = (0,ramda__WEBPACK_IMPORTED_MODULE_2__["default"])(pointer.split('/'), root);
|
|
16662
|
+
// merge extra properties (e.g. alias) from the $ref object into the resolved value
|
|
16663
|
+
const {
|
|
16664
|
+
$ref: _,
|
|
16665
|
+
...rest
|
|
16666
|
+
} = val;
|
|
16667
|
+
if (Object.keys(rest).length > 0 && (0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_5__["default"])(resolved)) {
|
|
16668
|
+
return {
|
|
16669
|
+
...resolved,
|
|
16670
|
+
...rest
|
|
16671
|
+
};
|
|
16672
|
+
}
|
|
16673
|
+
return resolved;
|
|
16475
16674
|
}
|
|
16476
16675
|
if ((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_5__["default"])(val)) {
|
|
16477
16676
|
return traverse(val, root, newPath);
|
|
@@ -17086,20 +17285,22 @@ class ShallowCloneError extends _CloneError_mjs__WEBPACK_IMPORTED_MODULE_0__["de
|
|
|
17086
17285
|
|
|
17087
17286
|
__webpack_require__.r(__webpack_exports__);
|
|
17088
17287
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17089
|
-
/* harmony export */ CloneError: () => (/* reexport safe */
|
|
17090
|
-
/* harmony export */ DeepCloneError: () => (/* reexport safe */
|
|
17091
|
-
/* harmony export */ ShallowCloneError: () => (/* reexport safe */
|
|
17288
|
+
/* harmony export */ CloneError: () => (/* reexport safe */ _errors_CloneError_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]),
|
|
17289
|
+
/* harmony export */ DeepCloneError: () => (/* reexport safe */ _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]),
|
|
17290
|
+
/* harmony export */ ShallowCloneError: () => (/* reexport safe */ _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
|
17092
17291
|
/* harmony export */ cloneDeep: () => (/* binding */ cloneDeep),
|
|
17093
17292
|
/* harmony export */ cloneShallow: () => (/* binding */ cloneShallow)
|
|
17094
17293
|
/* harmony export */ });
|
|
17095
|
-
/* harmony import */ var
|
|
17096
|
-
/* harmony import */ var
|
|
17097
|
-
/* harmony import */ var
|
|
17098
|
-
/* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
17099
|
-
/* harmony import */ var
|
|
17100
|
-
/* harmony import */ var
|
|
17101
|
-
/* harmony import */ var
|
|
17102
|
-
/* harmony import */ var
|
|
17294
|
+
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8138);
|
|
17295
|
+
/* harmony import */ var _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8504);
|
|
17296
|
+
/* harmony import */ var _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6663);
|
|
17297
|
+
/* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8252);
|
|
17298
|
+
/* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5162);
|
|
17299
|
+
/* harmony import */ var _elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5810);
|
|
17300
|
+
/* harmony import */ var _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5018);
|
|
17301
|
+
/* harmony import */ var _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3686);
|
|
17302
|
+
/* harmony import */ var _errors_CloneError_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3772);
|
|
17303
|
+
|
|
17103
17304
|
|
|
17104
17305
|
|
|
17105
17306
|
|
|
@@ -17132,9 +17333,9 @@ const cloneDeepElement = (element, options) => {
|
|
|
17132
17333
|
} = element;
|
|
17133
17334
|
if (Array.isArray(content)) {
|
|
17134
17335
|
copy.content = content.map(el => cloneDeepElement(el, passThroughOptions));
|
|
17135
|
-
} else if ((0,
|
|
17336
|
+
} else if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(content)) {
|
|
17136
17337
|
copy.content = cloneDeepElement(content, passThroughOptions);
|
|
17137
|
-
} else if (content instanceof
|
|
17338
|
+
} else if (content instanceof _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
17138
17339
|
copy.content = cloneDeepKeyValuePair(content, passThroughOptions);
|
|
17139
17340
|
} else {
|
|
17140
17341
|
copy.content = content;
|
|
@@ -17158,7 +17359,7 @@ const cloneDeepKeyValuePair = (kvp, options) => {
|
|
|
17158
17359
|
} = kvp;
|
|
17159
17360
|
const keyCopy = key !== undefined ? cloneDeepElement(key, passThroughOptions) : undefined;
|
|
17160
17361
|
const valueCopy = value !== undefined ? cloneDeepElement(value, passThroughOptions) : undefined;
|
|
17161
|
-
const copy = new
|
|
17362
|
+
const copy = new _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"](keyCopy, valueCopy);
|
|
17162
17363
|
visited.set(kvp, copy);
|
|
17163
17364
|
return copy;
|
|
17164
17365
|
};
|
|
@@ -17174,7 +17375,7 @@ const cloneDeepObjectSlice = (slice, options) => {
|
|
|
17174
17375
|
return visited.get(slice);
|
|
17175
17376
|
}
|
|
17176
17377
|
const items = [...slice].map(element => cloneDeepElement(element, passThroughOptions));
|
|
17177
|
-
const copy = new
|
|
17378
|
+
const copy = new _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"](items);
|
|
17178
17379
|
visited.set(slice, copy);
|
|
17179
17380
|
return copy;
|
|
17180
17381
|
};
|
|
@@ -17185,16 +17386,16 @@ const cloneDeepObjectSlice = (slice, options) => {
|
|
|
17185
17386
|
* @public
|
|
17186
17387
|
*/
|
|
17187
17388
|
const cloneDeep = (value, options = {}) => {
|
|
17188
|
-
if (value instanceof
|
|
17389
|
+
if (value instanceof _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
17189
17390
|
return cloneDeepKeyValuePair(value, options);
|
|
17190
17391
|
}
|
|
17191
|
-
if (value instanceof
|
|
17392
|
+
if (value instanceof _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]) {
|
|
17192
17393
|
return cloneDeepObjectSlice(value, options);
|
|
17193
17394
|
}
|
|
17194
|
-
if ((0,
|
|
17395
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(value)) {
|
|
17195
17396
|
return cloneDeepElement(value, options);
|
|
17196
17397
|
}
|
|
17197
|
-
throw new
|
|
17398
|
+
throw new _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]("Value provided to cloneDeep function couldn't be cloned", {
|
|
17198
17399
|
value
|
|
17199
17400
|
});
|
|
17200
17401
|
};
|
|
@@ -17210,11 +17411,11 @@ const cloneShallowKeyValuePair = keyValuePair => {
|
|
|
17210
17411
|
key,
|
|
17211
17412
|
value
|
|
17212
17413
|
} = keyValuePair;
|
|
17213
|
-
return new
|
|
17414
|
+
return new _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"](key, value);
|
|
17214
17415
|
};
|
|
17215
17416
|
const cloneShallowObjectSlice = objectSlice => {
|
|
17216
17417
|
const items = [...objectSlice];
|
|
17217
|
-
return new
|
|
17418
|
+
return new _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"](items);
|
|
17218
17419
|
};
|
|
17219
17420
|
const cloneShallowElement = element => {
|
|
17220
17421
|
const Ctor = element.constructor;
|
|
@@ -17226,17 +17427,20 @@ const cloneShallowElement = element => {
|
|
|
17226
17427
|
if (!element.isAttributesEmpty) {
|
|
17227
17428
|
copy.attributes = cloneDeep(element.attributes);
|
|
17228
17429
|
}
|
|
17229
|
-
if ((0,
|
|
17230
|
-
|
|
17430
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__.hasElementSourceMap)(element)) {
|
|
17431
|
+
_elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_5__["default"].transfer(element, copy);
|
|
17432
|
+
}
|
|
17433
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__.hasElementStyle)(element)) {
|
|
17434
|
+
copy.style = (0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])(element.style);
|
|
17231
17435
|
}
|
|
17232
17436
|
const {
|
|
17233
17437
|
content
|
|
17234
17438
|
} = element;
|
|
17235
|
-
if ((0,
|
|
17439
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(content)) {
|
|
17236
17440
|
copy.content = cloneShallowElement(content);
|
|
17237
17441
|
} else if (Array.isArray(content)) {
|
|
17238
17442
|
copy.content = [...content];
|
|
17239
|
-
} else if (content instanceof
|
|
17443
|
+
} else if (content instanceof _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
17240
17444
|
copy.content = cloneShallowKeyValuePair(content);
|
|
17241
17445
|
} else {
|
|
17242
17446
|
copy.content = content;
|
|
@@ -17251,16 +17455,16 @@ const cloneShallowElement = element => {
|
|
|
17251
17455
|
* @public
|
|
17252
17456
|
*/
|
|
17253
17457
|
const cloneShallow = value => {
|
|
17254
|
-
if (value instanceof
|
|
17458
|
+
if (value instanceof _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
17255
17459
|
return cloneShallowKeyValuePair(value);
|
|
17256
17460
|
}
|
|
17257
|
-
if (value instanceof
|
|
17461
|
+
if (value instanceof _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]) {
|
|
17258
17462
|
return cloneShallowObjectSlice(value);
|
|
17259
17463
|
}
|
|
17260
|
-
if ((0,
|
|
17464
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(value)) {
|
|
17261
17465
|
return cloneShallowElement(value);
|
|
17262
17466
|
}
|
|
17263
|
-
throw new
|
|
17467
|
+
throw new _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]("Value provided to cloneShallow function couldn't be cloned", {
|
|
17264
17468
|
value
|
|
17265
17469
|
});
|
|
17266
17470
|
};
|
|
@@ -17681,6 +17885,65 @@ function unpackSourceMap(packed) {
|
|
|
17681
17885
|
|
|
17682
17886
|
/***/ },
|
|
17683
17887
|
|
|
17888
|
+
/***/ 9686
|
|
17889
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
17890
|
+
|
|
17891
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17892
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17893
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
17894
|
+
/* harmony export */ });
|
|
17895
|
+
/* harmony import */ var _primitives_ObjectElement_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7071);
|
|
17896
|
+
|
|
17897
|
+
/**
|
|
17898
|
+
* Shape with optional style property.
|
|
17899
|
+
* @public
|
|
17900
|
+
*/
|
|
17901
|
+
/**
|
|
17902
|
+
* StyleElement stores format-specific style information for round-trip preservation.
|
|
17903
|
+
*
|
|
17904
|
+
* The style data is stored as a plain object with format-specific namespaces
|
|
17905
|
+
* (e.g., `yaml`, `json`). This element exists only during serialization/deserialization
|
|
17906
|
+
* (refract format) - in memory, style lives directly on `element.style`.
|
|
17907
|
+
*
|
|
17908
|
+
* Follows the same pattern as SourceMapElement with __mappings__.
|
|
17909
|
+
*
|
|
17910
|
+
* @public
|
|
17911
|
+
*/
|
|
17912
|
+
class StyleElement extends _primitives_ObjectElement_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
17913
|
+
constructor(content, meta, attributes) {
|
|
17914
|
+
super(content, meta, attributes);
|
|
17915
|
+
this.element = '__styles__';
|
|
17916
|
+
}
|
|
17917
|
+
|
|
17918
|
+
/**
|
|
17919
|
+
* Transfers style property from one element to another.
|
|
17920
|
+
*/
|
|
17921
|
+
static transfer(from, to) {
|
|
17922
|
+
to.style = from.style;
|
|
17923
|
+
}
|
|
17924
|
+
|
|
17925
|
+
/**
|
|
17926
|
+
* Creates a StyleElement from an element's style property.
|
|
17927
|
+
* Returns undefined if the element has no style.
|
|
17928
|
+
*/
|
|
17929
|
+
static from(source) {
|
|
17930
|
+
if (!source.style) {
|
|
17931
|
+
return undefined;
|
|
17932
|
+
}
|
|
17933
|
+
return new StyleElement(source.style);
|
|
17934
|
+
}
|
|
17935
|
+
|
|
17936
|
+
/**
|
|
17937
|
+
* Restores the style property on the target element from this StyleElement.
|
|
17938
|
+
*/
|
|
17939
|
+
applyTo(target) {
|
|
17940
|
+
target.style = this.toValue();
|
|
17941
|
+
}
|
|
17942
|
+
}
|
|
17943
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StyleElement);
|
|
17944
|
+
|
|
17945
|
+
/***/ },
|
|
17946
|
+
|
|
17684
17947
|
/***/ 6911
|
|
17685
17948
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
17686
17949
|
|
|
@@ -17743,6 +18006,7 @@ const isSourceMapElement = element => element instanceof _elements_SourceMap_mjs
|
|
|
17743
18006
|
__webpack_require__.r(__webpack_exports__);
|
|
17744
18007
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17745
18008
|
/* harmony export */ hasElementSourceMap: () => (/* binding */ hasElementSourceMap),
|
|
18009
|
+
/* harmony export */ hasElementStyle: () => (/* binding */ hasElementStyle),
|
|
17746
18010
|
/* harmony export */ includesClasses: () => (/* binding */ includesClasses),
|
|
17747
18011
|
/* harmony export */ includesSymbols: () => (/* binding */ includesSymbols),
|
|
17748
18012
|
/* harmony export */ isAnnotationElement: () => (/* reexport safe */ _elements_mjs__WEBPACK_IMPORTED_MODULE_1__.isAnnotationElement),
|
|
@@ -17767,6 +18031,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17767
18031
|
|
|
17768
18032
|
|
|
17769
18033
|
|
|
18034
|
+
/**
|
|
18035
|
+
* Checks if an element has format-specific style information.
|
|
18036
|
+
* @public
|
|
18037
|
+
*/
|
|
18038
|
+
const hasElementStyle = element => {
|
|
18039
|
+
return element.style !== undefined;
|
|
18040
|
+
};
|
|
18041
|
+
|
|
17770
18042
|
/**
|
|
17771
18043
|
* Checks if an element has complete source position information.
|
|
17772
18044
|
* Returns true only if all 6 position properties are numbers.
|
|
@@ -18303,6 +18575,12 @@ class Element {
|
|
|
18303
18575
|
*/
|
|
18304
18576
|
parent;
|
|
18305
18577
|
|
|
18578
|
+
/**
|
|
18579
|
+
* Format-specific style information for round-trip preservation.
|
|
18580
|
+
* Each format owns its own namespace (e.g., `yaml`, `json`).
|
|
18581
|
+
*/
|
|
18582
|
+
style;
|
|
18583
|
+
|
|
18306
18584
|
// ============================================================================
|
|
18307
18585
|
// Source Position (LSP-compatible, TextDocument-compatible, UTF-16 code units)
|
|
18308
18586
|
// web-tree-sitter automatically provides position data in UTF-16 code units.
|
|
@@ -19186,17 +19464,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19186
19464
|
/* harmony export */ CollectionElement: () => (/* reexport safe */ _primitives_CollectionElement_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]),
|
|
19187
19465
|
/* harmony export */ CommentElement: () => (/* reexport safe */ _elements_Comment_mjs__WEBPACK_IMPORTED_MODULE_12__["default"]),
|
|
19188
19466
|
/* harmony export */ Element: () => (/* reexport safe */ _primitives_Element_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]),
|
|
19189
|
-
/* harmony export */ KeyValuePair: () => (/* reexport safe */
|
|
19467
|
+
/* harmony export */ KeyValuePair: () => (/* reexport safe */ _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_17__["default"]),
|
|
19190
19468
|
/* harmony export */ LinkElement: () => (/* reexport safe */ _elements_LinkElement_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]),
|
|
19191
19469
|
/* harmony export */ MemberElement: () => (/* reexport safe */ _primitives_MemberElement_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
|
19192
19470
|
/* harmony export */ NullElement: () => (/* reexport safe */ _primitives_NullElement_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]),
|
|
19193
19471
|
/* harmony export */ NumberElement: () => (/* reexport safe */ _primitives_NumberElement_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]),
|
|
19194
19472
|
/* harmony export */ ObjectElement: () => (/* reexport safe */ _primitives_ObjectElement_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]),
|
|
19195
|
-
/* harmony export */ ObjectSlice: () => (/* reexport safe */
|
|
19473
|
+
/* harmony export */ ObjectSlice: () => (/* reexport safe */ _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_16__["default"]),
|
|
19196
19474
|
/* harmony export */ ParseResultElement: () => (/* reexport safe */ _elements_ParseResult_mjs__WEBPACK_IMPORTED_MODULE_13__["default"]),
|
|
19197
19475
|
/* harmony export */ RefElement: () => (/* reexport safe */ _elements_RefElement_mjs__WEBPACK_IMPORTED_MODULE_10__["default"]),
|
|
19198
19476
|
/* harmony export */ SourceMapElement: () => (/* reexport safe */ _elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_14__["default"]),
|
|
19199
19477
|
/* harmony export */ StringElement: () => (/* reexport safe */ _primitives_StringElement_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]),
|
|
19478
|
+
/* harmony export */ StyleElement: () => (/* reexport safe */ _elements_Style_mjs__WEBPACK_IMPORTED_MODULE_15__["default"]),
|
|
19200
19479
|
/* harmony export */ refract: () => (/* binding */ refract)
|
|
19201
19480
|
/* harmony export */ });
|
|
19202
19481
|
/* harmony import */ var _primitives_Element_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(728);
|
|
@@ -19214,8 +19493,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19214
19493
|
/* harmony import */ var _elements_Comment_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(94);
|
|
19215
19494
|
/* harmony import */ var _elements_ParseResult_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(4823);
|
|
19216
19495
|
/* harmony import */ var _elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(5810);
|
|
19217
|
-
/* harmony import */ var
|
|
19218
|
-
/* harmony import */ var
|
|
19496
|
+
/* harmony import */ var _elements_Style_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(9686);
|
|
19497
|
+
/* harmony import */ var _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(8504);
|
|
19498
|
+
/* harmony import */ var _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(6663);
|
|
19499
|
+
|
|
19219
19500
|
|
|
19220
19501
|
|
|
19221
19502
|
|
|
@@ -19301,6 +19582,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19301
19582
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
19302
19583
|
/* harmony export */ });
|
|
19303
19584
|
/* harmony import */ var _elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5810);
|
|
19585
|
+
/* harmony import */ var _elements_Style_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9686);
|
|
19586
|
+
|
|
19304
19587
|
|
|
19305
19588
|
/**
|
|
19306
19589
|
* Serialized representation of an Element in JSON Refract format.
|
|
@@ -19359,6 +19642,17 @@ class JSONSerialiser {
|
|
|
19359
19642
|
payload.meta.__mappings__ = this.serialise(sourceMap);
|
|
19360
19643
|
}
|
|
19361
19644
|
}
|
|
19645
|
+
|
|
19646
|
+
// Serialize style as __styles__ in meta (skip for StyleElement itself)
|
|
19647
|
+
if (!(element instanceof _elements_Style_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])) {
|
|
19648
|
+
const styleElement = _elements_Style_mjs__WEBPACK_IMPORTED_MODULE_1__["default"].from(element);
|
|
19649
|
+
if (styleElement) {
|
|
19650
|
+
if (!payload.meta) {
|
|
19651
|
+
payload.meta = {};
|
|
19652
|
+
}
|
|
19653
|
+
payload.meta.__styles__ = this.serialise(styleElement);
|
|
19654
|
+
}
|
|
19655
|
+
}
|
|
19362
19656
|
const content = this.serialiseContent(element.content);
|
|
19363
19657
|
if (content !== undefined) {
|
|
19364
19658
|
payload.content = content;
|
|
@@ -19379,15 +19673,18 @@ class JSONSerialiser {
|
|
|
19379
19673
|
element.element = value.element;
|
|
19380
19674
|
}
|
|
19381
19675
|
|
|
19382
|
-
// Extract __mappings__ without mutating input, filter remaining meta
|
|
19676
|
+
// Extract __mappings__ and __styles__ without mutating input, filter remaining meta
|
|
19383
19677
|
let mappingsDoc;
|
|
19678
|
+
let stylesDoc;
|
|
19384
19679
|
let metaToDeserialize = value.meta;
|
|
19385
|
-
if (value.meta?.__mappings__) {
|
|
19680
|
+
if (value.meta?.__mappings__ || value.meta?.__styles__) {
|
|
19386
19681
|
const {
|
|
19387
19682
|
__mappings__,
|
|
19683
|
+
__styles__,
|
|
19388
19684
|
...rest
|
|
19389
19685
|
} = value.meta;
|
|
19390
19686
|
mappingsDoc = __mappings__;
|
|
19687
|
+
stylesDoc = __styles__;
|
|
19391
19688
|
metaToDeserialize = Object.keys(rest).length > 0 ? rest : undefined;
|
|
19392
19689
|
}
|
|
19393
19690
|
if (metaToDeserialize) {
|
|
@@ -19399,6 +19696,12 @@ class JSONSerialiser {
|
|
|
19399
19696
|
const sourceMap = this.deserialise(mappingsDoc);
|
|
19400
19697
|
sourceMap.applyTo(element);
|
|
19401
19698
|
}
|
|
19699
|
+
|
|
19700
|
+
// Restore style from __styles__
|
|
19701
|
+
if (stylesDoc) {
|
|
19702
|
+
const styleElement = this.deserialise(stylesDoc);
|
|
19703
|
+
styleElement.applyTo(element);
|
|
19704
|
+
}
|
|
19402
19705
|
if (value.attributes) {
|
|
19403
19706
|
this.deserialiseObject(value.attributes, element.attributes);
|
|
19404
19707
|
}
|
|
@@ -20228,7 +20531,7 @@ const specification = {
|
|
|
20228
20531
|
fixedFields: {
|
|
20229
20532
|
// core vocabulary
|
|
20230
20533
|
id: {
|
|
20231
|
-
$
|
|
20534
|
+
$ref: '#/visitors/value',
|
|
20232
20535
|
alias: 'idField'
|
|
20233
20536
|
},
|
|
20234
20537
|
$schema: {
|
|
@@ -20507,6 +20810,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20507
20810
|
/* harmony import */ var _speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8400);
|
|
20508
20811
|
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7071);
|
|
20509
20812
|
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5810);
|
|
20813
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9686);
|
|
20510
20814
|
|
|
20511
20815
|
|
|
20512
20816
|
|
|
@@ -20534,6 +20838,7 @@ class Visitor {
|
|
|
20534
20838
|
to.attributes = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(target, source);
|
|
20535
20839
|
}
|
|
20536
20840
|
_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__["default"].transfer(from, to);
|
|
20841
|
+
_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__["default"].transfer(from, to);
|
|
20537
20842
|
}
|
|
20538
20843
|
}
|
|
20539
20844
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Visitor);
|