tutuca 0.9.9 → 0.9.10

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.
@@ -5114,7 +5114,11 @@ function shallowCopy(from) {
5114
5114
  ...from
5115
5115
  };
5116
5116
  }
5117
+ var merge$1 = (collection, ...sources) => mergeWithSources(collection, sources);
5118
+ var mergeWith$1 = (merger, collection, ...sources) => mergeWithSources(collection, sources, merger);
5117
5119
  var mergeDeepWithSources = (collection, sources, merger) => mergeWithSources(collection, sources, deepMergerWith(merger));
5120
+ var mergeDeep$1 = (collection, ...sources) => mergeDeepWithSources(collection, sources);
5121
+ var mergeDeepWith$1 = (merger, collection, ...sources) => mergeDeepWithSources(collection, sources, merger);
5118
5122
  function mergeWithSources(collection, sources, merger) {
5119
5123
  if (!isDataStructure(collection)) {
5120
5124
  throw new TypeError(`Cannot merge into non-data-structure value: ${collection}`);
@@ -6402,6 +6406,10 @@ class OrderedSetImpl extends SetImpl {
6402
6406
  OrderedSet.isOrderedSet = isOrderedSet;
6403
6407
  var makeOrderedSet = (map, ownerID) => new OrderedSetImpl(map, ownerID);
6404
6408
  var emptyOrderedSet = () => makeOrderedSet(emptyOrderedMap());
6409
+ var PairSorting = {
6410
+ LeftThenRight: -1,
6411
+ RightThenLeft: 1
6412
+ };
6405
6413
  function throwOnInvalidDefaultValues(defaultValues) {
6406
6414
  if (isRecord(defaultValues)) {
6407
6415
  throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");
@@ -6735,6 +6743,11 @@ class RangeImpl extends IndexedSeqImpl {
6735
6743
  this.prototype[Symbol.iterator] = this.prototype.values;
6736
6744
  }
6737
6745
  }
6746
+ var Repeat = (value, times) => {
6747
+ const size = times === undefined ? Infinity : Math.max(0, times);
6748
+ return new RepeatImpl(value, size);
6749
+ };
6750
+
6738
6751
  class RepeatImpl extends IndexedSeqImpl {
6739
6752
  constructor(value, size) {
6740
6753
  super();
@@ -6821,6 +6834,28 @@ class RepeatImpl extends IndexedSeqImpl {
6821
6834
  this.prototype[Symbol.iterator] = this.prototype.values;
6822
6835
  }
6823
6836
  }
6837
+ var fromJS = (value, converter) => fromJSWith([], converter ?? defaultConverter, value, "", converter?.length > 2 ? [] : undefined, {
6838
+ "": value
6839
+ });
6840
+ function fromJSWith(stack, converter, value, key, keyPath, parentValue) {
6841
+ if (typeof value !== "string" && !isImmutable(value) && (isArrayLike(value) || hasIterator(value) || isPlainObject(value))) {
6842
+ if (stack.includes(value)) {
6843
+ throw new TypeError("Cannot convert circular structure to Immutable");
6844
+ }
6845
+ stack.push(value);
6846
+ if (keyPath && key !== "") {
6847
+ keyPath.push(key);
6848
+ }
6849
+ const converted = converter.call(parentValue, key, Seq(value).map((v, k) => fromJSWith(stack, converter, v, k, keyPath, value)), keyPath && keyPath.slice());
6850
+ stack.pop();
6851
+ if (keyPath) {
6852
+ keyPath.pop();
6853
+ }
6854
+ return converted;
6855
+ }
6856
+ return value;
6857
+ }
6858
+ var defaultConverter = (k, v) => isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet();
6824
6859
  var asValues = (collection) => isKeyed(collection) ? collection.valueSeq() : collection;
6825
6860
  function initCollectionConversions() {
6826
6861
  CollectionImpl.prototype.toMap = function toMap() {
@@ -6876,7 +6911,12 @@ function initCollectionConversions() {
6876
6911
  return OrderedSet(sortFactory(this, comparator, mapper));
6877
6912
  };
6878
6913
  }
6914
+ var version$1 = "7.0.0";
6915
+ var pkg = {
6916
+ version: version$1
6917
+ };
6879
6918
  initCollectionConversions();
6919
+ var { version } = pkg;
6880
6920
 
6881
6921
  // src/oo.js
6882
6922
  var BAD_VALUE = Symbol("BadValue");
@@ -8154,18 +8194,47 @@ class LintParseContext extends ParseContext {
8154
8194
  }
8155
8195
  }
8156
8196
  export {
8197
+ version,
8198
+ updateIn$1 as updateIn,
8199
+ update$1 as update,
8157
8200
  tutuca,
8201
+ setIn$1 as setIn,
8202
+ set,
8158
8203
  seqInfoByClass,
8204
+ removeIn,
8205
+ remove,
8206
+ mergeWith$1 as mergeWith,
8207
+ mergeDeepWith$1 as mergeDeepWith,
8208
+ mergeDeep$1 as mergeDeep,
8209
+ merge$1 as merge,
8159
8210
  macro,
8211
+ isValueObject,
8212
+ isStack,
8213
+ isSet,
8214
+ isSeq,
8215
+ isRecord,
8216
+ isPlainObject,
8217
+ isOrderedSet,
8160
8218
  isOrderedMap,
8219
+ isOrdered,
8161
8220
  isOrderedMap as isOMap,
8162
8221
  isMap,
8163
8222
  isList,
8164
8223
  isKeyed,
8165
8224
  isIndexed,
8225
+ isImmutable,
8166
8226
  isMap as isIMap,
8227
+ isCollection,
8228
+ isAssociative,
8229
+ is,
8167
8230
  injectCss,
8168
8231
  html,
8232
+ hash,
8233
+ hasIn$1 as hasIn,
8234
+ has,
8235
+ getIn$1 as getIn,
8236
+ get,
8237
+ fromJS,
8169
8238
  fieldsByClass,
8170
8239
  css,
8171
8240
  component,
@@ -8177,10 +8246,19 @@ export {
8177
8246
  UNKNOWN_HANDLER_ARG_NAME,
8178
8247
  UNKNOWN_EVENT_MODIFIER,
8179
8248
  UNKNOWN_COMPONENT_NAME,
8249
+ Stack2 as Stack,
8250
+ Set2 as Set,
8251
+ Seq,
8252
+ Repeat,
8180
8253
  Record,
8254
+ Range,
8181
8255
  RENDER_IT_OUTSIDE_OF_LOOP,
8182
8256
  ParseContext,
8257
+ PairSorting,
8258
+ OrderedSet,
8259
+ OrderedMap,
8183
8260
  OrderedMap as OMap,
8261
+ Map2 as Map,
8184
8262
  List,
8185
8263
  LintParseContext,
8186
8264
  LintContext,
@@ -8195,5 +8273,6 @@ export {
8195
8273
  INPUT_HANDLER_FOR_INPUT_HANDLER_METHOD,
8196
8274
  Map2 as IMap,
8197
8275
  FIELD_VAL_NOT_DEFINED,
8276
+ Collection,
8198
8277
  COMPUTED_VAL_NOT_DEFINED
8199
8278
  };