@speclynx/apidom-parser-adapter-json-schema-json-2020-12 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.
|
@@ -11258,6 +11258,53 @@ var both = /*#__PURE__*/(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["def
|
|
|
11258
11258
|
|
|
11259
11259
|
/***/ },
|
|
11260
11260
|
|
|
11261
|
+
/***/ 8138
|
|
11262
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
11263
|
+
|
|
11264
|
+
"use strict";
|
|
11265
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11266
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11267
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11268
|
+
/* harmony export */ });
|
|
11269
|
+
/* harmony import */ var _internal_clone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8575);
|
|
11270
|
+
/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8938);
|
|
11271
|
+
|
|
11272
|
+
|
|
11273
|
+
|
|
11274
|
+
/**
|
|
11275
|
+
* Creates a deep copy of the source that can be used in place of the source
|
|
11276
|
+
* object without retaining any references to it.
|
|
11277
|
+
* The source object may contain (nested) `Array`s and `Object`s,
|
|
11278
|
+
* `Number`s, `String`s, `Boolean`s and `Date`s.
|
|
11279
|
+
* `Function`s are assigned by reference rather than copied.
|
|
11280
|
+
*
|
|
11281
|
+
* Dispatches to a `clone` method if present.
|
|
11282
|
+
*
|
|
11283
|
+
* Note that if the source object has multiple nodes that share a reference,
|
|
11284
|
+
* the returned object will have the same structure, but the references will
|
|
11285
|
+
* be pointed to the location within the cloned value.
|
|
11286
|
+
*
|
|
11287
|
+
* @func
|
|
11288
|
+
* @memberOf R
|
|
11289
|
+
* @since v0.1.0
|
|
11290
|
+
* @category Object
|
|
11291
|
+
* @sig {*} -> {*}
|
|
11292
|
+
* @param {*} value The object or array to clone
|
|
11293
|
+
* @return {*} A deeply cloned copy of `val`
|
|
11294
|
+
* @example
|
|
11295
|
+
*
|
|
11296
|
+
* const objects = [{}, {}, {}];
|
|
11297
|
+
* const objectsClone = R.clone(objects);
|
|
11298
|
+
* objects === objectsClone; //=> false
|
|
11299
|
+
* objects[0] === objectsClone[0]; //=> false
|
|
11300
|
+
*/
|
|
11301
|
+
var clone = /*#__PURE__*/(0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function clone(value) {
|
|
11302
|
+
return value != null && typeof value.clone === 'function' ? value.clone() : (0,_internal_clone_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, true);
|
|
11303
|
+
});
|
|
11304
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clone);
|
|
11305
|
+
|
|
11306
|
+
/***/ },
|
|
11307
|
+
|
|
11261
11308
|
/***/ 8199
|
|
11262
11309
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
11263
11310
|
|
|
@@ -12446,6 +12493,146 @@ function _checkForMethod(methodname, fn) {
|
|
|
12446
12493
|
|
|
12447
12494
|
/***/ },
|
|
12448
12495
|
|
|
12496
|
+
/***/ 8575
|
|
12497
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
12498
|
+
|
|
12499
|
+
"use strict";
|
|
12500
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12501
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12502
|
+
/* harmony export */ "default": () => (/* binding */ _clone)
|
|
12503
|
+
/* harmony export */ });
|
|
12504
|
+
/* harmony import */ var _cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1254);
|
|
12505
|
+
/* harmony import */ var _type_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(963);
|
|
12506
|
+
|
|
12507
|
+
|
|
12508
|
+
|
|
12509
|
+
/**
|
|
12510
|
+
* Copies an object.
|
|
12511
|
+
*
|
|
12512
|
+
* @private
|
|
12513
|
+
* @param {*} value The value to be copied
|
|
12514
|
+
* @param {Boolean} deep Whether or not to perform deep cloning.
|
|
12515
|
+
* @return {*} The copied value.
|
|
12516
|
+
*/
|
|
12517
|
+
function _clone(value, deep, map) {
|
|
12518
|
+
map || (map = new _ObjectMap());
|
|
12519
|
+
|
|
12520
|
+
// this avoids the slower switch with a quick if decision removing some milliseconds in each run.
|
|
12521
|
+
if (_isPrimitive(value)) {
|
|
12522
|
+
return value;
|
|
12523
|
+
}
|
|
12524
|
+
var copy = function copy(copiedValue) {
|
|
12525
|
+
// Check for circular and same references on the object graph and return its corresponding clone.
|
|
12526
|
+
var cachedCopy = map.get(value);
|
|
12527
|
+
if (cachedCopy) {
|
|
12528
|
+
return cachedCopy;
|
|
12529
|
+
}
|
|
12530
|
+
map.set(value, copiedValue);
|
|
12531
|
+
for (var key in value) {
|
|
12532
|
+
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
|
12533
|
+
copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
|
|
12534
|
+
}
|
|
12535
|
+
}
|
|
12536
|
+
return copiedValue;
|
|
12537
|
+
};
|
|
12538
|
+
switch ((0,_type_js__WEBPACK_IMPORTED_MODULE_1__["default"])(value)) {
|
|
12539
|
+
case 'Object':
|
|
12540
|
+
return copy(Object.create(Object.getPrototypeOf(value)));
|
|
12541
|
+
case 'Array':
|
|
12542
|
+
return copy(Array(value.length));
|
|
12543
|
+
case 'Date':
|
|
12544
|
+
return new Date(value.valueOf());
|
|
12545
|
+
case 'RegExp':
|
|
12546
|
+
return (0,_cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value);
|
|
12547
|
+
case 'Int8Array':
|
|
12548
|
+
case 'Uint8Array':
|
|
12549
|
+
case 'Uint8ClampedArray':
|
|
12550
|
+
case 'Int16Array':
|
|
12551
|
+
case 'Uint16Array':
|
|
12552
|
+
case 'Int32Array':
|
|
12553
|
+
case 'Uint32Array':
|
|
12554
|
+
case 'Float32Array':
|
|
12555
|
+
case 'Float64Array':
|
|
12556
|
+
case 'BigInt64Array':
|
|
12557
|
+
case 'BigUint64Array':
|
|
12558
|
+
return value.slice();
|
|
12559
|
+
default:
|
|
12560
|
+
return value;
|
|
12561
|
+
}
|
|
12562
|
+
}
|
|
12563
|
+
function _isPrimitive(param) {
|
|
12564
|
+
var type = typeof param;
|
|
12565
|
+
return param == null || type != 'object' && type != 'function';
|
|
12566
|
+
}
|
|
12567
|
+
var _ObjectMap = /*#__PURE__*/function () {
|
|
12568
|
+
function _ObjectMap() {
|
|
12569
|
+
this.map = {};
|
|
12570
|
+
this.length = 0;
|
|
12571
|
+
}
|
|
12572
|
+
_ObjectMap.prototype.set = function (key, value) {
|
|
12573
|
+
var hashedKey = this.hash(key);
|
|
12574
|
+
var bucket = this.map[hashedKey];
|
|
12575
|
+
if (!bucket) {
|
|
12576
|
+
this.map[hashedKey] = bucket = [];
|
|
12577
|
+
}
|
|
12578
|
+
bucket.push([key, value]);
|
|
12579
|
+
this.length += 1;
|
|
12580
|
+
};
|
|
12581
|
+
_ObjectMap.prototype.hash = function (key) {
|
|
12582
|
+
var hashedKey = [];
|
|
12583
|
+
for (var value in key) {
|
|
12584
|
+
hashedKey.push(Object.prototype.toString.call(key[value]));
|
|
12585
|
+
}
|
|
12586
|
+
return hashedKey.join();
|
|
12587
|
+
};
|
|
12588
|
+
_ObjectMap.prototype.get = function (key) {
|
|
12589
|
+
/**
|
|
12590
|
+
* 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,
|
|
12591
|
+
* on my tests this number is 180, anything above that using the hash function is faster.
|
|
12592
|
+
*/
|
|
12593
|
+
if (this.length <= 180) {
|
|
12594
|
+
for (var p in this.map) {
|
|
12595
|
+
var bucket = this.map[p];
|
|
12596
|
+
for (var i = 0; i < bucket.length; i += 1) {
|
|
12597
|
+
var element = bucket[i];
|
|
12598
|
+
if (element[0] === key) {
|
|
12599
|
+
return element[1];
|
|
12600
|
+
}
|
|
12601
|
+
}
|
|
12602
|
+
}
|
|
12603
|
+
return;
|
|
12604
|
+
}
|
|
12605
|
+
var hashedKey = this.hash(key);
|
|
12606
|
+
var bucket = this.map[hashedKey];
|
|
12607
|
+
if (!bucket) {
|
|
12608
|
+
return;
|
|
12609
|
+
}
|
|
12610
|
+
for (var i = 0; i < bucket.length; i += 1) {
|
|
12611
|
+
var element = bucket[i];
|
|
12612
|
+
if (element[0] === key) {
|
|
12613
|
+
return element[1];
|
|
12614
|
+
}
|
|
12615
|
+
}
|
|
12616
|
+
};
|
|
12617
|
+
return _ObjectMap;
|
|
12618
|
+
}();
|
|
12619
|
+
|
|
12620
|
+
/***/ },
|
|
12621
|
+
|
|
12622
|
+
/***/ 1254
|
|
12623
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
12624
|
+
|
|
12625
|
+
"use strict";
|
|
12626
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12627
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12628
|
+
/* harmony export */ "default": () => (/* binding */ _cloneRegExp)
|
|
12629
|
+
/* harmony export */ });
|
|
12630
|
+
function _cloneRegExp(pattern) {
|
|
12631
|
+
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' : ''));
|
|
12632
|
+
}
|
|
12633
|
+
|
|
12634
|
+
/***/ },
|
|
12635
|
+
|
|
12449
12636
|
/***/ 7940
|
|
12450
12637
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
12451
12638
|
|
|
@@ -19931,6 +20118,7 @@ const predicates = {
|
|
|
19931
20118
|
isCommentElement: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isCommentElement,
|
|
19932
20119
|
isParseResultElement: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isParseResultElement,
|
|
19933
20120
|
isSourceMapElement: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isSourceMapElement,
|
|
20121
|
+
hasElementStyle: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.hasElementStyle,
|
|
19934
20122
|
hasElementSourceMap: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.hasElementSourceMap,
|
|
19935
20123
|
includesSymbols: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.includesSymbols,
|
|
19936
20124
|
includesClasses: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.includesClasses
|
|
@@ -20002,7 +20190,19 @@ const resolveSpecification = specification => {
|
|
|
20002
20190
|
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)) {
|
|
20003
20191
|
const $ref = (0,ramda__WEBPACK_IMPORTED_MODULE_2__["default"])(['$ref'], val);
|
|
20004
20192
|
const pointer = (0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_6__["default"])('#/', $ref);
|
|
20005
|
-
|
|
20193
|
+
const resolved = (0,ramda__WEBPACK_IMPORTED_MODULE_2__["default"])(pointer.split('/'), root);
|
|
20194
|
+
// merge extra properties (e.g. alias) from the $ref object into the resolved value
|
|
20195
|
+
const {
|
|
20196
|
+
$ref: _,
|
|
20197
|
+
...rest
|
|
20198
|
+
} = val;
|
|
20199
|
+
if (Object.keys(rest).length > 0 && (0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_5__["default"])(resolved)) {
|
|
20200
|
+
return {
|
|
20201
|
+
...resolved,
|
|
20202
|
+
...rest
|
|
20203
|
+
};
|
|
20204
|
+
}
|
|
20205
|
+
return resolved;
|
|
20006
20206
|
}
|
|
20007
20207
|
if ((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_5__["default"])(val)) {
|
|
20008
20208
|
return traverse(val, root, newPath);
|
|
@@ -20625,20 +20825,22 @@ class ShallowCloneError extends _CloneError_mjs__WEBPACK_IMPORTED_MODULE_0__["de
|
|
|
20625
20825
|
"use strict";
|
|
20626
20826
|
__webpack_require__.r(__webpack_exports__);
|
|
20627
20827
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20628
|
-
/* harmony export */ CloneError: () => (/* reexport safe */
|
|
20629
|
-
/* harmony export */ DeepCloneError: () => (/* reexport safe */
|
|
20630
|
-
/* harmony export */ ShallowCloneError: () => (/* reexport safe */
|
|
20828
|
+
/* harmony export */ CloneError: () => (/* reexport safe */ _errors_CloneError_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]),
|
|
20829
|
+
/* harmony export */ DeepCloneError: () => (/* reexport safe */ _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]),
|
|
20830
|
+
/* harmony export */ ShallowCloneError: () => (/* reexport safe */ _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
|
20631
20831
|
/* harmony export */ cloneDeep: () => (/* binding */ cloneDeep),
|
|
20632
20832
|
/* harmony export */ cloneShallow: () => (/* binding */ cloneShallow)
|
|
20633
20833
|
/* harmony export */ });
|
|
20634
|
-
/* harmony import */ var
|
|
20635
|
-
/* harmony import */ var
|
|
20636
|
-
/* harmony import */ var
|
|
20637
|
-
/* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
20638
|
-
/* harmony import */ var
|
|
20639
|
-
/* harmony import */ var
|
|
20640
|
-
/* harmony import */ var
|
|
20641
|
-
/* harmony import */ var
|
|
20834
|
+
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8138);
|
|
20835
|
+
/* harmony import */ var _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8504);
|
|
20836
|
+
/* harmony import */ var _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6663);
|
|
20837
|
+
/* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8252);
|
|
20838
|
+
/* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5162);
|
|
20839
|
+
/* harmony import */ var _elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5810);
|
|
20840
|
+
/* harmony import */ var _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5018);
|
|
20841
|
+
/* harmony import */ var _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3686);
|
|
20842
|
+
/* harmony import */ var _errors_CloneError_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3772);
|
|
20843
|
+
|
|
20642
20844
|
|
|
20643
20845
|
|
|
20644
20846
|
|
|
@@ -20671,9 +20873,9 @@ const cloneDeepElement = (element, options) => {
|
|
|
20671
20873
|
} = element;
|
|
20672
20874
|
if (Array.isArray(content)) {
|
|
20673
20875
|
copy.content = content.map(el => cloneDeepElement(el, passThroughOptions));
|
|
20674
|
-
} else if ((0,
|
|
20876
|
+
} else if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(content)) {
|
|
20675
20877
|
copy.content = cloneDeepElement(content, passThroughOptions);
|
|
20676
|
-
} else if (content instanceof
|
|
20878
|
+
} else if (content instanceof _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
20677
20879
|
copy.content = cloneDeepKeyValuePair(content, passThroughOptions);
|
|
20678
20880
|
} else {
|
|
20679
20881
|
copy.content = content;
|
|
@@ -20697,7 +20899,7 @@ const cloneDeepKeyValuePair = (kvp, options) => {
|
|
|
20697
20899
|
} = kvp;
|
|
20698
20900
|
const keyCopy = key !== undefined ? cloneDeepElement(key, passThroughOptions) : undefined;
|
|
20699
20901
|
const valueCopy = value !== undefined ? cloneDeepElement(value, passThroughOptions) : undefined;
|
|
20700
|
-
const copy = new
|
|
20902
|
+
const copy = new _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"](keyCopy, valueCopy);
|
|
20701
20903
|
visited.set(kvp, copy);
|
|
20702
20904
|
return copy;
|
|
20703
20905
|
};
|
|
@@ -20713,7 +20915,7 @@ const cloneDeepObjectSlice = (slice, options) => {
|
|
|
20713
20915
|
return visited.get(slice);
|
|
20714
20916
|
}
|
|
20715
20917
|
const items = [...slice].map(element => cloneDeepElement(element, passThroughOptions));
|
|
20716
|
-
const copy = new
|
|
20918
|
+
const copy = new _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"](items);
|
|
20717
20919
|
visited.set(slice, copy);
|
|
20718
20920
|
return copy;
|
|
20719
20921
|
};
|
|
@@ -20724,16 +20926,16 @@ const cloneDeepObjectSlice = (slice, options) => {
|
|
|
20724
20926
|
* @public
|
|
20725
20927
|
*/
|
|
20726
20928
|
const cloneDeep = (value, options = {}) => {
|
|
20727
|
-
if (value instanceof
|
|
20929
|
+
if (value instanceof _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
20728
20930
|
return cloneDeepKeyValuePair(value, options);
|
|
20729
20931
|
}
|
|
20730
|
-
if (value instanceof
|
|
20932
|
+
if (value instanceof _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]) {
|
|
20731
20933
|
return cloneDeepObjectSlice(value, options);
|
|
20732
20934
|
}
|
|
20733
|
-
if ((0,
|
|
20935
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(value)) {
|
|
20734
20936
|
return cloneDeepElement(value, options);
|
|
20735
20937
|
}
|
|
20736
|
-
throw new
|
|
20938
|
+
throw new _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]("Value provided to cloneDeep function couldn't be cloned", {
|
|
20737
20939
|
value
|
|
20738
20940
|
});
|
|
20739
20941
|
};
|
|
@@ -20749,11 +20951,11 @@ const cloneShallowKeyValuePair = keyValuePair => {
|
|
|
20749
20951
|
key,
|
|
20750
20952
|
value
|
|
20751
20953
|
} = keyValuePair;
|
|
20752
|
-
return new
|
|
20954
|
+
return new _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"](key, value);
|
|
20753
20955
|
};
|
|
20754
20956
|
const cloneShallowObjectSlice = objectSlice => {
|
|
20755
20957
|
const items = [...objectSlice];
|
|
20756
|
-
return new
|
|
20958
|
+
return new _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"](items);
|
|
20757
20959
|
};
|
|
20758
20960
|
const cloneShallowElement = element => {
|
|
20759
20961
|
const Ctor = element.constructor;
|
|
@@ -20765,17 +20967,20 @@ const cloneShallowElement = element => {
|
|
|
20765
20967
|
if (!element.isAttributesEmpty) {
|
|
20766
20968
|
copy.attributes = cloneDeep(element.attributes);
|
|
20767
20969
|
}
|
|
20768
|
-
if ((0,
|
|
20769
|
-
|
|
20970
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__.hasElementSourceMap)(element)) {
|
|
20971
|
+
_elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_5__["default"].transfer(element, copy);
|
|
20972
|
+
}
|
|
20973
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__.hasElementStyle)(element)) {
|
|
20974
|
+
copy.style = (0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])(element.style);
|
|
20770
20975
|
}
|
|
20771
20976
|
const {
|
|
20772
20977
|
content
|
|
20773
20978
|
} = element;
|
|
20774
|
-
if ((0,
|
|
20979
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(content)) {
|
|
20775
20980
|
copy.content = cloneShallowElement(content);
|
|
20776
20981
|
} else if (Array.isArray(content)) {
|
|
20777
20982
|
copy.content = [...content];
|
|
20778
|
-
} else if (content instanceof
|
|
20983
|
+
} else if (content instanceof _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
20779
20984
|
copy.content = cloneShallowKeyValuePair(content);
|
|
20780
20985
|
} else {
|
|
20781
20986
|
copy.content = content;
|
|
@@ -20790,16 +20995,16 @@ const cloneShallowElement = element => {
|
|
|
20790
20995
|
* @public
|
|
20791
20996
|
*/
|
|
20792
20997
|
const cloneShallow = value => {
|
|
20793
|
-
if (value instanceof
|
|
20998
|
+
if (value instanceof _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
20794
20999
|
return cloneShallowKeyValuePair(value);
|
|
20795
21000
|
}
|
|
20796
|
-
if (value instanceof
|
|
21001
|
+
if (value instanceof _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]) {
|
|
20797
21002
|
return cloneShallowObjectSlice(value);
|
|
20798
21003
|
}
|
|
20799
|
-
if ((0,
|
|
21004
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(value)) {
|
|
20800
21005
|
return cloneShallowElement(value);
|
|
20801
21006
|
}
|
|
20802
|
-
throw new
|
|
21007
|
+
throw new _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]("Value provided to cloneShallow function couldn't be cloned", {
|
|
20803
21008
|
value
|
|
20804
21009
|
});
|
|
20805
21010
|
};
|
|
@@ -21226,6 +21431,66 @@ function unpackSourceMap(packed) {
|
|
|
21226
21431
|
|
|
21227
21432
|
/***/ },
|
|
21228
21433
|
|
|
21434
|
+
/***/ 9686
|
|
21435
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
21436
|
+
|
|
21437
|
+
"use strict";
|
|
21438
|
+
__webpack_require__.r(__webpack_exports__);
|
|
21439
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21440
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
21441
|
+
/* harmony export */ });
|
|
21442
|
+
/* harmony import */ var _primitives_ObjectElement_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7071);
|
|
21443
|
+
|
|
21444
|
+
/**
|
|
21445
|
+
* Shape with optional style property.
|
|
21446
|
+
* @public
|
|
21447
|
+
*/
|
|
21448
|
+
/**
|
|
21449
|
+
* StyleElement stores format-specific style information for round-trip preservation.
|
|
21450
|
+
*
|
|
21451
|
+
* The style data is stored as a plain object with format-specific namespaces
|
|
21452
|
+
* (e.g., `yaml`, `json`). This element exists only during serialization/deserialization
|
|
21453
|
+
* (refract format) - in memory, style lives directly on `element.style`.
|
|
21454
|
+
*
|
|
21455
|
+
* Follows the same pattern as SourceMapElement with __mappings__.
|
|
21456
|
+
*
|
|
21457
|
+
* @public
|
|
21458
|
+
*/
|
|
21459
|
+
class StyleElement extends _primitives_ObjectElement_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
21460
|
+
constructor(content, meta, attributes) {
|
|
21461
|
+
super(content, meta, attributes);
|
|
21462
|
+
this.element = '__styles__';
|
|
21463
|
+
}
|
|
21464
|
+
|
|
21465
|
+
/**
|
|
21466
|
+
* Transfers style property from one element to another.
|
|
21467
|
+
*/
|
|
21468
|
+
static transfer(from, to) {
|
|
21469
|
+
to.style = from.style;
|
|
21470
|
+
}
|
|
21471
|
+
|
|
21472
|
+
/**
|
|
21473
|
+
* Creates a StyleElement from an element's style property.
|
|
21474
|
+
* Returns undefined if the element has no style.
|
|
21475
|
+
*/
|
|
21476
|
+
static from(source) {
|
|
21477
|
+
if (!source.style) {
|
|
21478
|
+
return undefined;
|
|
21479
|
+
}
|
|
21480
|
+
return new StyleElement(source.style);
|
|
21481
|
+
}
|
|
21482
|
+
|
|
21483
|
+
/**
|
|
21484
|
+
* Restores the style property on the target element from this StyleElement.
|
|
21485
|
+
*/
|
|
21486
|
+
applyTo(target) {
|
|
21487
|
+
target.style = this.toValue();
|
|
21488
|
+
}
|
|
21489
|
+
}
|
|
21490
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StyleElement);
|
|
21491
|
+
|
|
21492
|
+
/***/ },
|
|
21493
|
+
|
|
21229
21494
|
/***/ 6911
|
|
21230
21495
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
21231
21496
|
|
|
@@ -21290,6 +21555,7 @@ const isSourceMapElement = element => element instanceof _elements_SourceMap_mjs
|
|
|
21290
21555
|
__webpack_require__.r(__webpack_exports__);
|
|
21291
21556
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21292
21557
|
/* harmony export */ hasElementSourceMap: () => (/* binding */ hasElementSourceMap),
|
|
21558
|
+
/* harmony export */ hasElementStyle: () => (/* binding */ hasElementStyle),
|
|
21293
21559
|
/* harmony export */ includesClasses: () => (/* binding */ includesClasses),
|
|
21294
21560
|
/* harmony export */ includesSymbols: () => (/* binding */ includesSymbols),
|
|
21295
21561
|
/* harmony export */ isAnnotationElement: () => (/* reexport safe */ _elements_mjs__WEBPACK_IMPORTED_MODULE_1__.isAnnotationElement),
|
|
@@ -21314,6 +21580,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21314
21580
|
|
|
21315
21581
|
|
|
21316
21582
|
|
|
21583
|
+
/**
|
|
21584
|
+
* Checks if an element has format-specific style information.
|
|
21585
|
+
* @public
|
|
21586
|
+
*/
|
|
21587
|
+
const hasElementStyle = element => {
|
|
21588
|
+
return element.style !== undefined;
|
|
21589
|
+
};
|
|
21590
|
+
|
|
21317
21591
|
/**
|
|
21318
21592
|
* Checks if an element has complete source position information.
|
|
21319
21593
|
* Returns true only if all 6 position properties are numbers.
|
|
@@ -21855,6 +22129,12 @@ class Element {
|
|
|
21855
22129
|
*/
|
|
21856
22130
|
parent;
|
|
21857
22131
|
|
|
22132
|
+
/**
|
|
22133
|
+
* Format-specific style information for round-trip preservation.
|
|
22134
|
+
* Each format owns its own namespace (e.g., `yaml`, `json`).
|
|
22135
|
+
*/
|
|
22136
|
+
style;
|
|
22137
|
+
|
|
21858
22138
|
// ============================================================================
|
|
21859
22139
|
// Source Position (LSP-compatible, TextDocument-compatible, UTF-16 code units)
|
|
21860
22140
|
// web-tree-sitter automatically provides position data in UTF-16 code units.
|
|
@@ -22744,17 +23024,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
22744
23024
|
/* harmony export */ CollectionElement: () => (/* reexport safe */ _primitives_CollectionElement_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]),
|
|
22745
23025
|
/* harmony export */ CommentElement: () => (/* reexport safe */ _elements_Comment_mjs__WEBPACK_IMPORTED_MODULE_12__["default"]),
|
|
22746
23026
|
/* harmony export */ Element: () => (/* reexport safe */ _primitives_Element_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]),
|
|
22747
|
-
/* harmony export */ KeyValuePair: () => (/* reexport safe */
|
|
23027
|
+
/* harmony export */ KeyValuePair: () => (/* reexport safe */ _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_17__["default"]),
|
|
22748
23028
|
/* harmony export */ LinkElement: () => (/* reexport safe */ _elements_LinkElement_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]),
|
|
22749
23029
|
/* harmony export */ MemberElement: () => (/* reexport safe */ _primitives_MemberElement_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
|
22750
23030
|
/* harmony export */ NullElement: () => (/* reexport safe */ _primitives_NullElement_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]),
|
|
22751
23031
|
/* harmony export */ NumberElement: () => (/* reexport safe */ _primitives_NumberElement_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]),
|
|
22752
23032
|
/* harmony export */ ObjectElement: () => (/* reexport safe */ _primitives_ObjectElement_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]),
|
|
22753
|
-
/* harmony export */ ObjectSlice: () => (/* reexport safe */
|
|
23033
|
+
/* harmony export */ ObjectSlice: () => (/* reexport safe */ _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_16__["default"]),
|
|
22754
23034
|
/* harmony export */ ParseResultElement: () => (/* reexport safe */ _elements_ParseResult_mjs__WEBPACK_IMPORTED_MODULE_13__["default"]),
|
|
22755
23035
|
/* harmony export */ RefElement: () => (/* reexport safe */ _elements_RefElement_mjs__WEBPACK_IMPORTED_MODULE_10__["default"]),
|
|
22756
23036
|
/* harmony export */ SourceMapElement: () => (/* reexport safe */ _elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_14__["default"]),
|
|
22757
23037
|
/* harmony export */ StringElement: () => (/* reexport safe */ _primitives_StringElement_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]),
|
|
23038
|
+
/* harmony export */ StyleElement: () => (/* reexport safe */ _elements_Style_mjs__WEBPACK_IMPORTED_MODULE_15__["default"]),
|
|
22758
23039
|
/* harmony export */ refract: () => (/* binding */ refract)
|
|
22759
23040
|
/* harmony export */ });
|
|
22760
23041
|
/* harmony import */ var _primitives_Element_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(728);
|
|
@@ -22772,8 +23053,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
22772
23053
|
/* harmony import */ var _elements_Comment_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(94);
|
|
22773
23054
|
/* harmony import */ var _elements_ParseResult_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(4823);
|
|
22774
23055
|
/* harmony import */ var _elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(5810);
|
|
22775
|
-
/* harmony import */ var
|
|
22776
|
-
/* harmony import */ var
|
|
23056
|
+
/* harmony import */ var _elements_Style_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(9686);
|
|
23057
|
+
/* harmony import */ var _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(8504);
|
|
23058
|
+
/* harmony import */ var _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(6663);
|
|
23059
|
+
|
|
22777
23060
|
|
|
22778
23061
|
|
|
22779
23062
|
|
|
@@ -22860,6 +23143,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
22860
23143
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
22861
23144
|
/* harmony export */ });
|
|
22862
23145
|
/* harmony import */ var _elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5810);
|
|
23146
|
+
/* harmony import */ var _elements_Style_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9686);
|
|
23147
|
+
|
|
22863
23148
|
|
|
22864
23149
|
/**
|
|
22865
23150
|
* Serialized representation of an Element in JSON Refract format.
|
|
@@ -22918,6 +23203,17 @@ class JSONSerialiser {
|
|
|
22918
23203
|
payload.meta.__mappings__ = this.serialise(sourceMap);
|
|
22919
23204
|
}
|
|
22920
23205
|
}
|
|
23206
|
+
|
|
23207
|
+
// Serialize style as __styles__ in meta (skip for StyleElement itself)
|
|
23208
|
+
if (!(element instanceof _elements_Style_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])) {
|
|
23209
|
+
const styleElement = _elements_Style_mjs__WEBPACK_IMPORTED_MODULE_1__["default"].from(element);
|
|
23210
|
+
if (styleElement) {
|
|
23211
|
+
if (!payload.meta) {
|
|
23212
|
+
payload.meta = {};
|
|
23213
|
+
}
|
|
23214
|
+
payload.meta.__styles__ = this.serialise(styleElement);
|
|
23215
|
+
}
|
|
23216
|
+
}
|
|
22921
23217
|
const content = this.serialiseContent(element.content);
|
|
22922
23218
|
if (content !== undefined) {
|
|
22923
23219
|
payload.content = content;
|
|
@@ -22938,15 +23234,18 @@ class JSONSerialiser {
|
|
|
22938
23234
|
element.element = value.element;
|
|
22939
23235
|
}
|
|
22940
23236
|
|
|
22941
|
-
// Extract __mappings__ without mutating input, filter remaining meta
|
|
23237
|
+
// Extract __mappings__ and __styles__ without mutating input, filter remaining meta
|
|
22942
23238
|
let mappingsDoc;
|
|
23239
|
+
let stylesDoc;
|
|
22943
23240
|
let metaToDeserialize = value.meta;
|
|
22944
|
-
if (value.meta?.__mappings__) {
|
|
23241
|
+
if (value.meta?.__mappings__ || value.meta?.__styles__) {
|
|
22945
23242
|
const {
|
|
22946
23243
|
__mappings__,
|
|
23244
|
+
__styles__,
|
|
22947
23245
|
...rest
|
|
22948
23246
|
} = value.meta;
|
|
22949
23247
|
mappingsDoc = __mappings__;
|
|
23248
|
+
stylesDoc = __styles__;
|
|
22950
23249
|
metaToDeserialize = Object.keys(rest).length > 0 ? rest : undefined;
|
|
22951
23250
|
}
|
|
22952
23251
|
if (metaToDeserialize) {
|
|
@@ -22958,6 +23257,12 @@ class JSONSerialiser {
|
|
|
22958
23257
|
const sourceMap = this.deserialise(mappingsDoc);
|
|
22959
23258
|
sourceMap.applyTo(element);
|
|
22960
23259
|
}
|
|
23260
|
+
|
|
23261
|
+
// Restore style from __styles__
|
|
23262
|
+
if (stylesDoc) {
|
|
23263
|
+
const styleElement = this.deserialise(stylesDoc);
|
|
23264
|
+
styleElement.applyTo(element);
|
|
23265
|
+
}
|
|
22961
23266
|
if (value.attributes) {
|
|
22962
23267
|
this.deserialiseObject(value.attributes, element.attributes);
|
|
22963
23268
|
}
|
|
@@ -25120,7 +25425,7 @@ const specification = {
|
|
|
25120
25425
|
fixedFields: {
|
|
25121
25426
|
// core vocabulary
|
|
25122
25427
|
id: {
|
|
25123
|
-
$
|
|
25428
|
+
$ref: '#/visitors/value',
|
|
25124
25429
|
alias: 'idField'
|
|
25125
25430
|
},
|
|
25126
25431
|
$schema: {
|
|
@@ -25402,6 +25707,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25402
25707
|
/* harmony import */ var _speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8400);
|
|
25403
25708
|
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7071);
|
|
25404
25709
|
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5810);
|
|
25710
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9686);
|
|
25405
25711
|
|
|
25406
25712
|
|
|
25407
25713
|
|
|
@@ -25429,6 +25735,7 @@ class Visitor {
|
|
|
25429
25735
|
to.attributes = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(target, source);
|
|
25430
25736
|
}
|
|
25431
25737
|
_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__["default"].transfer(from, to);
|
|
25738
|
+
_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__["default"].transfer(from, to);
|
|
25432
25739
|
}
|
|
25433
25740
|
}
|
|
25434
25741
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Visitor);
|
|
@@ -27326,16 +27633,21 @@ const detect = async (source, {
|
|
|
27326
27633
|
*/
|
|
27327
27634
|
const parse = async (source, {
|
|
27328
27635
|
sourceMap = false,
|
|
27636
|
+
style = false,
|
|
27329
27637
|
strict = false
|
|
27330
27638
|
} = {}) => {
|
|
27331
27639
|
if (strict && sourceMap) {
|
|
27332
27640
|
throw new _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_1__["default"]('Cannot use sourceMap with strict parsing. Strict parsing does not support source maps.');
|
|
27333
27641
|
}
|
|
27642
|
+
if (strict && style) {
|
|
27643
|
+
throw new _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_1__["default"]('Cannot use style with strict parsing. Strict parsing does not support style preservation.');
|
|
27644
|
+
}
|
|
27334
27645
|
if (strict) {
|
|
27335
27646
|
return _native_index_mjs__WEBPACK_IMPORTED_MODULE_2__.parse(source);
|
|
27336
27647
|
}
|
|
27337
27648
|
return _tree_sitter_index_mjs__WEBPACK_IMPORTED_MODULE_3__.parse(source, {
|
|
27338
|
-
sourceMap
|
|
27649
|
+
sourceMap,
|
|
27650
|
+
style
|
|
27339
27651
|
});
|
|
27340
27652
|
};
|
|
27341
27653
|
|
|
@@ -27466,12 +27778,14 @@ const detect = async source => {
|
|
|
27466
27778
|
* @public
|
|
27467
27779
|
*/
|
|
27468
27780
|
const parse = async (source, {
|
|
27469
|
-
sourceMap = false
|
|
27781
|
+
sourceMap = false,
|
|
27782
|
+
style = false
|
|
27470
27783
|
} = {}) => {
|
|
27471
27784
|
const cst = await (0,_lexical_analysis_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(source);
|
|
27472
27785
|
try {
|
|
27473
27786
|
return (0,_syntactic_analysis_index_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(cst, {
|
|
27474
|
-
sourceMap
|
|
27787
|
+
sourceMap,
|
|
27788
|
+
style
|
|
27475
27789
|
});
|
|
27476
27790
|
} finally {
|
|
27477
27791
|
cst.delete();
|
|
@@ -27574,6 +27888,24 @@ const maybeAddSourceMap = (info, element, ctx) => {
|
|
|
27574
27888
|
element.endCharacter = info.endPosition.column;
|
|
27575
27889
|
element.endOffset = info.endIndex;
|
|
27576
27890
|
};
|
|
27891
|
+
|
|
27892
|
+
// build json style object for an element
|
|
27893
|
+
const buildJsonStyle = (ctx, extras) => {
|
|
27894
|
+
const jsonStyle = {
|
|
27895
|
+
indent: ctx.indent
|
|
27896
|
+
};
|
|
27897
|
+
if (extras) Object.assign(jsonStyle, extras);
|
|
27898
|
+
return {
|
|
27899
|
+
json: jsonStyle
|
|
27900
|
+
};
|
|
27901
|
+
};
|
|
27902
|
+
|
|
27903
|
+
// detect indent from an object's first pair child position
|
|
27904
|
+
// called during transformChildren when we encounter the first pair
|
|
27905
|
+
const detectIndent = (objectColumn, firstPairColumn) => {
|
|
27906
|
+
const diff = firstPairColumn - objectColumn;
|
|
27907
|
+
return diff > 0 ? diff : 2;
|
|
27908
|
+
};
|
|
27577
27909
|
const transform = (cursor, transformerMap, ctx) => {
|
|
27578
27910
|
const info = getCursorInfo(cursor);
|
|
27579
27911
|
|
|
@@ -27637,11 +27969,27 @@ const createTransformers = transformerMap => ({
|
|
|
27637
27969
|
const element = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_7__["default"]();
|
|
27638
27970
|
maybeAddSourceMap(info, element, ctx);
|
|
27639
27971
|
|
|
27972
|
+
// Detect indent from first pair if style is enabled and not yet detected
|
|
27973
|
+
if (ctx.style && ctx.indent === 0) {
|
|
27974
|
+
if (cursor.gotoFirstChild()) {
|
|
27975
|
+
do {
|
|
27976
|
+
if (cursor.nodeType === 'pair') {
|
|
27977
|
+
ctx.indent = detectIndent(info.startPosition.column, cursor.startPosition.column);
|
|
27978
|
+
break;
|
|
27979
|
+
}
|
|
27980
|
+
} while (cursor.gotoNextSibling());
|
|
27981
|
+
cursor.gotoParent();
|
|
27982
|
+
}
|
|
27983
|
+
}
|
|
27984
|
+
|
|
27640
27985
|
// Transform children (pairs)
|
|
27641
27986
|
const children = transformChildren(cursor, transformerMap, ctx);
|
|
27642
27987
|
for (const child of children) {
|
|
27643
27988
|
element.push(child);
|
|
27644
27989
|
}
|
|
27990
|
+
if (ctx.style) {
|
|
27991
|
+
element.style = buildJsonStyle(ctx);
|
|
27992
|
+
}
|
|
27645
27993
|
return element;
|
|
27646
27994
|
},
|
|
27647
27995
|
array(cursor, ctx) {
|
|
@@ -27654,6 +28002,9 @@ const createTransformers = transformerMap => ({
|
|
|
27654
28002
|
for (const child of children) {
|
|
27655
28003
|
element.push(child);
|
|
27656
28004
|
}
|
|
28005
|
+
if (ctx.style) {
|
|
28006
|
+
element.style = buildJsonStyle(ctx);
|
|
28007
|
+
}
|
|
27657
28008
|
return element;
|
|
27658
28009
|
},
|
|
27659
28010
|
pair(cursor, ctx) {
|
|
@@ -27695,30 +28046,47 @@ const createTransformers = transformerMap => ({
|
|
|
27695
28046
|
});
|
|
27696
28047
|
}
|
|
27697
28048
|
}
|
|
28049
|
+
if (ctx.style) {
|
|
28050
|
+
element.style = buildJsonStyle(ctx);
|
|
28051
|
+
}
|
|
27698
28052
|
maybeAddSourceMap(info, element, ctx);
|
|
27699
28053
|
return element;
|
|
27700
28054
|
},
|
|
27701
28055
|
number(cursor, ctx) {
|
|
27702
28056
|
const info = getCursorInfo(cursor);
|
|
27703
28057
|
const element = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__["default"](Number(info.text));
|
|
28058
|
+
if (ctx.style) {
|
|
28059
|
+
element.style = buildJsonStyle(ctx, {
|
|
28060
|
+
rawContent: info.text
|
|
28061
|
+
});
|
|
28062
|
+
}
|
|
27704
28063
|
maybeAddSourceMap(info, element, ctx);
|
|
27705
28064
|
return element;
|
|
27706
28065
|
},
|
|
27707
28066
|
null(cursor, ctx) {
|
|
27708
28067
|
const info = getCursorInfo(cursor);
|
|
27709
28068
|
const element = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__["default"]();
|
|
28069
|
+
if (ctx.style) {
|
|
28070
|
+
element.style = buildJsonStyle(ctx);
|
|
28071
|
+
}
|
|
27710
28072
|
maybeAddSourceMap(info, element, ctx);
|
|
27711
28073
|
return element;
|
|
27712
28074
|
},
|
|
27713
28075
|
true(cursor, ctx) {
|
|
27714
28076
|
const info = getCursorInfo(cursor);
|
|
27715
28077
|
const element = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__["default"](true);
|
|
28078
|
+
if (ctx.style) {
|
|
28079
|
+
element.style = buildJsonStyle(ctx);
|
|
28080
|
+
}
|
|
27716
28081
|
maybeAddSourceMap(info, element, ctx);
|
|
27717
28082
|
return element;
|
|
27718
28083
|
},
|
|
27719
28084
|
false(cursor, ctx) {
|
|
27720
28085
|
const info = getCursorInfo(cursor);
|
|
27721
28086
|
const element = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__["default"](false);
|
|
28087
|
+
if (ctx.style) {
|
|
28088
|
+
element.style = buildJsonStyle(ctx);
|
|
28089
|
+
}
|
|
27722
28090
|
maybeAddSourceMap(info, element, ctx);
|
|
27723
28091
|
return element;
|
|
27724
28092
|
},
|
|
@@ -27749,11 +28117,14 @@ Object.assign(transformers, createTransformers(transformers));
|
|
|
27749
28117
|
* @public
|
|
27750
28118
|
*/
|
|
27751
28119
|
const analyze = (cst, {
|
|
27752
|
-
sourceMap = false
|
|
28120
|
+
sourceMap = false,
|
|
28121
|
+
style = false
|
|
27753
28122
|
} = {}) => {
|
|
27754
28123
|
const cursor = cst.walk();
|
|
27755
28124
|
const ctx = {
|
|
27756
28125
|
sourceMap,
|
|
28126
|
+
style,
|
|
28127
|
+
indent: 0,
|
|
27757
28128
|
annotations: []
|
|
27758
28129
|
};
|
|
27759
28130
|
const result = transform(cursor, transformers, ctx);
|