@algorisys/zen-ui-vanilla 13.10.1 → 13.11.0
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/AGENTS.md +2 -2
- package/dist/_core/index.d.ts +1 -0
- package/dist/_core/messages-all.d.ts +5 -0
- package/dist/_core/messages.d.ts +5 -0
- package/dist/_core/planning-gesture.d.ts +31 -0
- package/dist/_core/planning.d.ts +71 -9
- package/dist/components/data-table/data-table.d.ts.map +1 -1
- package/dist/components/event-calendar/event-calendar-item.d.ts.map +1 -1
- package/dist/components/event-calendar/event-calendar-model.d.ts +6 -0
- package/dist/components/event-calendar/event-calendar-model.d.ts.map +1 -1
- package/dist/components/planning-calendar/planning-calendar.d.ts +61 -3
- package/dist/components/planning-calendar/planning-calendar.d.ts.map +1 -1
- package/dist/components/rich-text/rich-text.d.ts +5 -7
- package/dist/components/rich-text/rich-text.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index108.js +12 -4
- package/dist/index108.js.map +1 -1
- package/dist/index112.js +244 -144
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +6 -6
- package/dist/index114.js +1 -1
- package/dist/index115.js +1 -1
- package/dist/index116.js +1 -1
- package/dist/index118.js +2 -2
- package/dist/index120.js +2 -2
- package/dist/index168.js +1 -1
- package/dist/index175.js +1 -1
- package/dist/index187.js +1 -1
- package/dist/index191.js +1 -1
- package/dist/index194.js +2 -2
- package/dist/index199.js +1 -1
- package/dist/index211.js +5 -0
- package/dist/index211.js.map +1 -1
- package/dist/index230.js +107 -75
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +95 -7
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +7 -48
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +45 -37
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +38 -149
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +138 -177
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +190 -90
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +90 -444
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +436 -98
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +106 -2
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +2 -18804
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +18798 -117
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +122 -13
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +13 -3012
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +3006 -123
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +125 -140
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +138 -93
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +91 -104
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +95 -111
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +127 -4
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +5 -34
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +34 -9
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +10 -7
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +6 -15
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +15 -11
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +11 -3
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +7 -0
- package/dist/index256.js.map +1 -0
- package/dist/index99.js.map +1 -1
- package/dist/previews/analytic-chart.jpg +0 -0
- package/dist/previews/code-editor.jpg +0 -0
- package/dist/previews/countdown.jpg +0 -0
- package/dist/previews/loading.jpg +0 -0
- package/dist/previews/map.jpg +0 -0
- package/dist/previews/skeleton.jpg +0 -0
- package/dist/previews/tile.jpg +0 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/skills/zen-ui/SKILL.md +1 -1
- package/skills/zen-ui/references/api/event-calendar-event-calendar.md +1 -0
- package/skills/zen-ui/references/api/index.md +1 -1
- package/skills/zen-ui/references/api/locale.md +5 -0
- package/skills/zen-ui/references/api/planning-calendar.md +30 -1
- package/skills/zen-ui/references/api/rich-text.md +1 -1
- package/skills/zen-ui/references/api/scan-input.md +1 -1
- package/skills/zen-ui/references/catalogue.md +2 -2
package/dist/index248.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index248.js","sources":["../../../node_modules/.bun/state-local@1.0.7/node_modules/state-local/lib/es/state-local.js"],"sourcesContent":["function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n}\n\nfunction curry(fn) {\n return function curried() {\n var _this = this;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len3 = arguments.length, nextArgs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n nextArgs[_key3] = arguments[_key3];\n }\n\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nfunction isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nfunction isEmpty(obj) {\n return !Object.keys(obj).length;\n}\n\nfunction isFunction(value) {\n return typeof value === 'function';\n}\n\nfunction hasOwnProperty(object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\n\nfunction validateChanges(initial, changes) {\n if (!isObject(changes)) errorHandler('changeType');\n if (Object.keys(changes).some(function (field) {\n return !hasOwnProperty(initial, field);\n })) errorHandler('changeField');\n return changes;\n}\n\nfunction validateSelector(selector) {\n if (!isFunction(selector)) errorHandler('selectorType');\n}\n\nfunction validateHandler(handler) {\n if (!(isFunction(handler) || isObject(handler))) errorHandler('handlerType');\n if (isObject(handler) && Object.values(handler).some(function (_handler) {\n return !isFunction(_handler);\n })) errorHandler('handlersType');\n}\n\nfunction validateInitial(initial) {\n if (!initial) errorHandler('initialIsRequired');\n if (!isObject(initial)) errorHandler('initialType');\n if (isEmpty(initial)) errorHandler('initialContent');\n}\n\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\n\nvar errorMessages = {\n initialIsRequired: 'initial state is required',\n initialType: 'initial state should be an object',\n initialContent: 'initial state shouldn\\'t be an empty object',\n handlerType: 'handler should be an object or a function',\n handlersType: 'all handlers should be a functions',\n selectorType: 'selector should be a function',\n changeType: 'provided value of changes should be an object',\n changeField: 'it seams you want to change a field in the state which is not specified in the \"initial\" state',\n \"default\": 'an unknown error accured in `state-local` package'\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n changes: validateChanges,\n selector: validateSelector,\n handler: validateHandler,\n initial: validateInitial\n};\n\nfunction create(initial) {\n var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n validators.initial(initial);\n validators.handler(handler);\n var state = {\n current: initial\n };\n var didUpdate = curry(didStateUpdate)(state, handler);\n var update = curry(updateState)(state);\n var validate = curry(validators.changes)(initial);\n var getChanges = curry(extractChanges)(state);\n\n function getState() {\n var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) {\n return state;\n };\n validators.selector(selector);\n return selector(state.current);\n }\n\n function setState(causedChanges) {\n compose(didUpdate, update, validate, getChanges)(causedChanges);\n }\n\n return [getState, setState];\n}\n\nfunction extractChanges(state, causedChanges) {\n return isFunction(causedChanges) ? causedChanges(state.current) : causedChanges;\n}\n\nfunction updateState(state, changes) {\n state.current = _objectSpread2(_objectSpread2({}, state.current), changes);\n return changes;\n}\n\nfunction didStateUpdate(state, handler, changes) {\n isFunction(handler) ? handler(state.current) : Object.keys(changes).forEach(function (field) {\n var _handler$field;\n\n return (_handler$field = handler[field]) === null || _handler$field === void 0 ? void 0 : _handler$field.call(handler, state.current[field]);\n });\n return changes;\n}\n\nvar index = {\n create: create\n};\n\nexport default index;\n"],"names":["_defineProperty","obj","key","value","ownKeys","object","enumerableOnly","keys","symbols","sym","_objectSpread2","target","i","source","compose","_len","fns","_key","x","y","f","curry","fn","curried","_this","_len2","args","_key2","_len3","nextArgs","_key3","isObject","isEmpty","isFunction","hasOwnProperty","property","validateChanges","initial","changes","errorHandler","field","validateSelector","selector","validateHandler","handler","_handler","validateInitial","throwError","errorMessages","type","validators","create","state","didUpdate","didStateUpdate","update","updateState","validate","getChanges","extractChanges","getState","setState","causedChanges","_handler$field","index"],"mappings":"AAAA,SAASA,EAAgBC,GAAKC,GAAKC,GAAO;AACxC,SAAID,KAAOD,IACT,OAAO,eAAeA,GAAKC,GAAK;AAAA,IAC9B,OAAOC;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,UAAU;AAAA,EAChB,CAAK,IAEDF,EAAIC,CAAG,IAAIC,GAGNF;AACT;AAEA,SAASG,EAAQC,GAAQC,GAAgB;AACvC,MAAIC,IAAO,OAAO,KAAKF,CAA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,EAASC,GAAe;AAC/B,IAAAhD,EAAQuC,GAAWE,GAAQE,GAAUC,CAAU,EAAEI,CAAa;AAAA,EAChE;AAEA,SAAO,CAACF,GAAUC,CAAQ;AAC5B;AAEA,SAASF,EAAeP,GAAOU,GAAe;AAC5C,SAAO7B,EAAW6B,CAAa,IAAIA,EAAcV,EAAM,OAAO,IAAIU;AACpE;AAEA,SAASN,EAAYJ,GAAOd,GAAS;AACnC,SAAAc,EAAM,UAAU1C,EAAeA,EAAe,CAAA,GAAI0C,EAAM,OAAO,GAAGd,CAAO,GAClEA;AACT;AAEA,SAASgB,EAAeF,GAAOR,GAASN,GAAS;AAC/C,SAAAL,EAAWW,CAAO,IAAIA,EAAQQ,EAAM,OAAO,IAAI,OAAO,KAAKd,CAAO,EAAE,QAAQ,SAAUE,GAAO;AAC3F,QAAIuB;AAEJ,YAAQA,IAAiBnB,EAAQJ,CAAK,OAAO,QAAQuB,MAAmB,SAAS,SAASA,EAAe,KAAKnB,GAASQ,EAAM,QAAQZ,CAAK,CAAC;AAAA,EAC7I,CAAC,GACMF;AACT;AAEG,IAAC0B,IAAQ;AAAA,EACV,QAAQb;AACV;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index248.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js"],"sourcesContent":["function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nfunction _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nfunction _defineProperty(e, r, t) {\n return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: true,\n configurable: true,\n writable: true\n }) : e[r] = t, e;\n}\nfunction _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = true,\n o = false;\n try {\n if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = true, n = r;\n } finally {\n try {\n if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), true).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = _objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(e);\n for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nfunction _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nfunction _slicedToArray(r, e) {\n return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r);\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n var i = _toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n }\n}\n\nexport { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _defineProperty as defineProperty, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _slicedToArray as slicedToArray, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _unsupportedIterableToArray as unsupportedIterableToArray };\n"],"names":["_arrayLikeToArray","a","n","_arrayWithHoles","_defineProperty","e","r","t","_toPropertyKey","_iterableToArrayLimit","l","u","f","o","_nonIterableRest","ownKeys","_objectSpread2","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","_slicedToArray","_unsupportedIterableToArray","_toPrimitive"],"mappings":"AAAA,SAASA,EAAkB,GAAGC,GAAG;AAC/B,GAASA,KAAR,QAAaA,IAAI,EAAE,YAAYA,IAAI,EAAE;AACtC,WAAS,IAAI,GAAGC,IAAI,MAAMD,CAAC,GAAG,IAAIA,GAAG,IAAK,CAAAC,EAAE,CAAC,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","x_google_ignoreList":[0]}
|
package/dist/index249.js
CHANGED
|
@@ -1,9 +1,132 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
function O(e, t, n) {
|
|
2
|
+
return t in e ? Object.defineProperty(e, t, {
|
|
3
|
+
value: n,
|
|
4
|
+
enumerable: !0,
|
|
5
|
+
configurable: !0,
|
|
6
|
+
writable: !0
|
|
7
|
+
}) : e[t] = n, e;
|
|
8
|
+
}
|
|
9
|
+
function g(e, t) {
|
|
10
|
+
var n = Object.keys(e);
|
|
11
|
+
if (Object.getOwnPropertySymbols) {
|
|
12
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
13
|
+
t && (r = r.filter(function(i) {
|
|
14
|
+
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
15
|
+
})), n.push.apply(n, r);
|
|
4
16
|
}
|
|
17
|
+
return n;
|
|
18
|
+
}
|
|
19
|
+
function v(e) {
|
|
20
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
21
|
+
var n = arguments[t] != null ? arguments[t] : {};
|
|
22
|
+
t % 2 ? g(Object(n), !0).forEach(function(r) {
|
|
23
|
+
O(e, r, n[r]);
|
|
24
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : g(Object(n)).forEach(function(r) {
|
|
25
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return e;
|
|
29
|
+
}
|
|
30
|
+
function y() {
|
|
31
|
+
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
32
|
+
t[n] = arguments[n];
|
|
33
|
+
return function(r) {
|
|
34
|
+
return t.reduceRight(function(i, a) {
|
|
35
|
+
return a(i);
|
|
36
|
+
}, r);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function c(e) {
|
|
40
|
+
return function t() {
|
|
41
|
+
for (var n = this, r = arguments.length, i = new Array(r), a = 0; a < r; a++)
|
|
42
|
+
i[a] = arguments[a];
|
|
43
|
+
return i.length >= e.length ? e.apply(this, i) : function() {
|
|
44
|
+
for (var f = arguments.length, s = new Array(f), o = 0; o < f; o++)
|
|
45
|
+
s[o] = arguments[o];
|
|
46
|
+
return t.apply(n, [].concat(i, s));
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function h(e) {
|
|
51
|
+
return {}.toString.call(e).includes("Object");
|
|
52
|
+
}
|
|
53
|
+
function m(e) {
|
|
54
|
+
return !Object.keys(e).length;
|
|
55
|
+
}
|
|
56
|
+
function l(e) {
|
|
57
|
+
return typeof e == "function";
|
|
58
|
+
}
|
|
59
|
+
function j(e, t) {
|
|
60
|
+
return Object.prototype.hasOwnProperty.call(e, t);
|
|
61
|
+
}
|
|
62
|
+
function w(e, t) {
|
|
63
|
+
return h(t) || u("changeType"), Object.keys(t).some(function(n) {
|
|
64
|
+
return !j(e, n);
|
|
65
|
+
}) && u("changeField"), t;
|
|
66
|
+
}
|
|
67
|
+
function P(e) {
|
|
68
|
+
l(e) || u("selectorType");
|
|
69
|
+
}
|
|
70
|
+
function T(e) {
|
|
71
|
+
l(e) || h(e) || u("handlerType"), h(e) && Object.values(e).some(function(t) {
|
|
72
|
+
return !l(t);
|
|
73
|
+
}) && u("handlersType");
|
|
74
|
+
}
|
|
75
|
+
function S(e) {
|
|
76
|
+
e || u("initialIsRequired"), h(e) || u("initialType"), m(e) && u("initialContent");
|
|
77
|
+
}
|
|
78
|
+
function E(e, t) {
|
|
79
|
+
throw new Error(e[t] || e.default);
|
|
80
|
+
}
|
|
81
|
+
var D = {
|
|
82
|
+
initialIsRequired: "initial state is required",
|
|
83
|
+
initialType: "initial state should be an object",
|
|
84
|
+
initialContent: "initial state shouldn't be an empty object",
|
|
85
|
+
handlerType: "handler should be an object or a function",
|
|
86
|
+
handlersType: "all handlers should be a functions",
|
|
87
|
+
selectorType: "selector should be a function",
|
|
88
|
+
changeType: "provided value of changes should be an object",
|
|
89
|
+
changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
|
|
90
|
+
default: "an unknown error accured in `state-local` package"
|
|
91
|
+
}, u = c(E)(D), p = {
|
|
92
|
+
changes: w,
|
|
93
|
+
selector: P,
|
|
94
|
+
handler: T,
|
|
95
|
+
initial: S
|
|
96
|
+
};
|
|
97
|
+
function q(e) {
|
|
98
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
99
|
+
p.initial(e), p.handler(t);
|
|
100
|
+
var n = {
|
|
101
|
+
current: e
|
|
102
|
+
}, r = c(I)(n, t), i = c(F)(n), a = c(p.changes)(e), f = c(C)(n);
|
|
103
|
+
function s() {
|
|
104
|
+
var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(b) {
|
|
105
|
+
return b;
|
|
106
|
+
};
|
|
107
|
+
return p.selector(d), d(n.current);
|
|
108
|
+
}
|
|
109
|
+
function o(d) {
|
|
110
|
+
y(r, i, a, f)(d);
|
|
111
|
+
}
|
|
112
|
+
return [s, o];
|
|
113
|
+
}
|
|
114
|
+
function C(e, t) {
|
|
115
|
+
return l(t) ? t(e.current) : t;
|
|
116
|
+
}
|
|
117
|
+
function F(e, t) {
|
|
118
|
+
return e.current = v(v({}, e.current), t), t;
|
|
119
|
+
}
|
|
120
|
+
function I(e, t, n) {
|
|
121
|
+
return l(t) ? t(e.current) : Object.keys(n).forEach(function(r) {
|
|
122
|
+
var i;
|
|
123
|
+
return (i = t[r]) === null || i === void 0 ? void 0 : i.call(t, e.current[r]);
|
|
124
|
+
}), n;
|
|
125
|
+
}
|
|
126
|
+
var R = {
|
|
127
|
+
create: q
|
|
5
128
|
};
|
|
6
129
|
export {
|
|
7
|
-
|
|
130
|
+
R as default
|
|
8
131
|
};
|
|
9
132
|
//# sourceMappingURL=index249.js.map
|
package/dist/index249.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index249.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/config/index.js"],"sourcesContent":["var config = {\n paths: {\n vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs'\n }\n};\n\nexport { config as default };\n"],"names":["config"],"mappings":"AAAG,IAACA,IAAS;AAAA,EACX,OAAO;AAAA,IACL,IAAI;AAAA,EACR;AACA;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index249.js","sources":["../../../node_modules/.bun/state-local@1.0.7/node_modules/state-local/lib/es/state-local.js"],"sourcesContent":["function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n}\n\nfunction curry(fn) {\n return function curried() {\n var _this = this;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len3 = arguments.length, nextArgs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n nextArgs[_key3] = arguments[_key3];\n }\n\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nfunction isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nfunction isEmpty(obj) {\n return !Object.keys(obj).length;\n}\n\nfunction isFunction(value) {\n return typeof value === 'function';\n}\n\nfunction hasOwnProperty(object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\n\nfunction validateChanges(initial, changes) {\n if (!isObject(changes)) errorHandler('changeType');\n if (Object.keys(changes).some(function (field) {\n return !hasOwnProperty(initial, field);\n })) errorHandler('changeField');\n return changes;\n}\n\nfunction validateSelector(selector) {\n if (!isFunction(selector)) errorHandler('selectorType');\n}\n\nfunction validateHandler(handler) {\n if (!(isFunction(handler) || isObject(handler))) errorHandler('handlerType');\n if (isObject(handler) && Object.values(handler).some(function (_handler) {\n return !isFunction(_handler);\n })) errorHandler('handlersType');\n}\n\nfunction validateInitial(initial) {\n if (!initial) errorHandler('initialIsRequired');\n if (!isObject(initial)) errorHandler('initialType');\n if (isEmpty(initial)) errorHandler('initialContent');\n}\n\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\n\nvar errorMessages = {\n initialIsRequired: 'initial state is required',\n initialType: 'initial state should be an object',\n initialContent: 'initial state shouldn\\'t be an empty object',\n handlerType: 'handler should be an object or a function',\n handlersType: 'all handlers should be a functions',\n selectorType: 'selector should be a function',\n changeType: 'provided value of changes should be an object',\n changeField: 'it seams you want to change a field in the state which is not specified in the \"initial\" state',\n \"default\": 'an unknown error accured in `state-local` package'\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n changes: validateChanges,\n selector: validateSelector,\n handler: validateHandler,\n initial: validateInitial\n};\n\nfunction create(initial) {\n var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n validators.initial(initial);\n validators.handler(handler);\n var state = {\n current: initial\n };\n var didUpdate = curry(didStateUpdate)(state, handler);\n var update = curry(updateState)(state);\n var validate = curry(validators.changes)(initial);\n var getChanges = curry(extractChanges)(state);\n\n function getState() {\n var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) {\n return state;\n };\n validators.selector(selector);\n return selector(state.current);\n }\n\n function setState(causedChanges) {\n compose(didUpdate, update, validate, getChanges)(causedChanges);\n }\n\n return [getState, setState];\n}\n\nfunction extractChanges(state, causedChanges) {\n return isFunction(causedChanges) ? causedChanges(state.current) : causedChanges;\n}\n\nfunction updateState(state, changes) {\n state.current = _objectSpread2(_objectSpread2({}, state.current), changes);\n return changes;\n}\n\nfunction didStateUpdate(state, handler, changes) {\n isFunction(handler) ? handler(state.current) : Object.keys(changes).forEach(function (field) {\n var _handler$field;\n\n return (_handler$field = handler[field]) === null || _handler$field === void 0 ? void 0 : _handler$field.call(handler, state.current[field]);\n });\n return changes;\n}\n\nvar index = {\n create: create\n};\n\nexport default index;\n"],"names":["_defineProperty","obj","key","value","ownKeys","object","enumerableOnly","keys","symbols","sym","_objectSpread2","target","i","source","compose","_len","fns","_key","x","y","f","curry","fn","curried","_this","_len2","args","_key2","_len3","nextArgs","_key3","isObject","isEmpty","isFunction","hasOwnProperty","property","validateChanges","initial","changes","errorHandler","field","validateSelector","selector","validateHandler","handler","_handler","validateInitial","throwError","errorMessages","type","validators","create","state","didUpdate","didStateUpdate","update","updateState","validate","getChanges","extractChanges","getState","setState","causedChanges","_handler$field","index"],"mappings":"AAAA,SAASA,EAAgBC,GAAKC,GAAKC,GAAO;AACxC,SAAID,KAAOD,IACT,OAAO,eAAeA,GAAKC,GAAK;AAAA,IAC9B,OAAOC;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,UAAU;AAAA,EAChB,CAAK,IAEDF,EAAIC,CA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;AAAA,IACT;AACA,WAAAF,EAAW,SAASR,CAAQ,GACrBA,EAASU,EAAM,OAAO;AAAA,EAC/B;AAEA,WAASS,EAASC,GAAe;AAC/B,IAAAhD,EAAQuC,GAAWE,GAAQE,GAAUC,CAAU,EAAEI,CAAa;AAAA,EAChE;AAEA,SAAO,CAACF,GAAUC,CAAQ;AAC5B;AAEA,SAASF,EAAeP,GAAOU,GAAe;AAC5C,SAAO7B,EAAW6B,CAAa,IAAIA,EAAcV,EAAM,OAAO,IAAIU;AACpE;AAEA,SAASN,EAAYJ,GAAOd,GAAS;AACnC,SAAAc,EAAM,UAAU1C,EAAeA,EAAe,CAAA,GAAI0C,EAAM,OAAO,GAAGd,CAAO,GAClEA;AACT;AAEA,SAASgB,EAAeF,GAAOR,GAASN,GAAS;AAC/C,SAAAL,EAAWW,CAAO,IAAIA,EAAQQ,EAAM,OAAO,IAAI,OAAO,KAAKd,CAAO,EAAE,QAAQ,SAAUE,GAAO;AAC3F,QAAIuB;AAEJ,YAAQA,IAAiBnB,EAAQJ,CAAK,OAAO,QAAQuB,MAAmB,SAAS,SAASA,EAAe,KAAKnB,GAASQ,EAAM,QAAQZ,CAAK,CAAC;AAAA,EAC7I,CAAC,GACMF;AACT;AAEG,IAAC0B,IAAQ;AAAA,EACV,QAAQb;AACV;","x_google_ignoreList":[0]}
|
package/dist/index250.js
CHANGED
|
@@ -1,38 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
paths: {
|
|
6
|
-
vs: o.urls.monacoBase
|
|
7
|
-
}
|
|
8
|
-
}) : o;
|
|
9
|
-
}
|
|
10
|
-
function c() {
|
|
11
|
-
console.warn(r.deprecation);
|
|
12
|
-
}
|
|
13
|
-
function u(o, e) {
|
|
14
|
-
throw new Error(o[e] || o.default);
|
|
15
|
-
}
|
|
16
|
-
var r = {
|
|
17
|
-
configIsRequired: "the configuration object is required",
|
|
18
|
-
configType: "the configuration object should be an object",
|
|
19
|
-
default: "an unknown error accured in `@monaco-editor/loader` package",
|
|
20
|
-
deprecation: `Deprecation warning!
|
|
21
|
-
You are using deprecated way of configuration.
|
|
22
|
-
|
|
23
|
-
Instead of using
|
|
24
|
-
monaco.config({ urls: { monacoBase: '...' } })
|
|
25
|
-
use
|
|
26
|
-
monaco.config({ paths: { vs: '...' } })
|
|
27
|
-
|
|
28
|
-
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
29
|
-
`
|
|
30
|
-
}, n = a(u)(r), d = {
|
|
31
|
-
config: i
|
|
1
|
+
var t = {
|
|
2
|
+
paths: {
|
|
3
|
+
vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"
|
|
4
|
+
}
|
|
32
5
|
};
|
|
33
6
|
export {
|
|
34
|
-
|
|
35
|
-
n as errorHandler,
|
|
36
|
-
r as errorMessages
|
|
7
|
+
t as default
|
|
37
8
|
};
|
|
38
9
|
//# sourceMappingURL=index250.js.map
|
package/dist/index250.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index250.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/
|
|
1
|
+
{"version":3,"file":"index250.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/config/index.js"],"sourcesContent":["var config = {\n paths: {\n vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs'\n }\n};\n\nexport { config as default };\n"],"names":["config"],"mappings":"AAAG,IAACA,IAAS;AAAA,EACX,OAAO;AAAA,IACL,IAAI;AAAA,EACR;AACA;","x_google_ignoreList":[0]}
|
package/dist/index251.js
CHANGED
|
@@ -1,13 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
};
|
|
1
|
+
import a from "./index255.js";
|
|
2
|
+
import t from "./index256.js";
|
|
3
|
+
function i(o) {
|
|
4
|
+
return o || n("configIsRequired"), t(o) || n("configType"), o.urls ? (c(), {
|
|
5
|
+
paths: {
|
|
6
|
+
vs: o.urls.monacoBase
|
|
7
|
+
}
|
|
8
|
+
}) : o;
|
|
9
|
+
}
|
|
10
|
+
function c() {
|
|
11
|
+
console.warn(r.deprecation);
|
|
12
|
+
}
|
|
13
|
+
function u(o, e) {
|
|
14
|
+
throw new Error(o[e] || o.default);
|
|
15
|
+
}
|
|
16
|
+
var r = {
|
|
17
|
+
configIsRequired: "the configuration object is required",
|
|
18
|
+
configType: "the configuration object should be an object",
|
|
19
|
+
default: "an unknown error accured in `@monaco-editor/loader` package",
|
|
20
|
+
deprecation: `Deprecation warning!
|
|
21
|
+
You are using deprecated way of configuration.
|
|
22
|
+
|
|
23
|
+
Instead of using
|
|
24
|
+
monaco.config({ urls: { monacoBase: '...' } })
|
|
25
|
+
use
|
|
26
|
+
monaco.config({ paths: { vs: '...' } })
|
|
27
|
+
|
|
28
|
+
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
29
|
+
`
|
|
30
|
+
}, n = a(u)(r), d = {
|
|
31
|
+
config: i
|
|
9
32
|
};
|
|
10
33
|
export {
|
|
11
|
-
|
|
34
|
+
d as default,
|
|
35
|
+
n as errorHandler,
|
|
36
|
+
r as errorMessages
|
|
12
37
|
};
|
|
13
38
|
//# sourceMappingURL=index251.js.map
|
package/dist/index251.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index251.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/
|
|
1
|
+
{"version":3,"file":"index251.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/validators/index.js"],"sourcesContent":["import curry from '../utils/curry.js';\nimport isObject from '../utils/isObject.js';\n\n/**\n * validates the configuration object and informs about deprecation\n * @param {Object} config - the configuration object \n * @return {Object} config - the validated configuration object\n */\nfunction validateConfig(config) {\n if (!config) errorHandler('configIsRequired');\n if (!isObject(config)) errorHandler('configType');\n if (config.urls) {\n informAboutDeprecation();\n return {\n paths: {\n vs: config.urls.monacoBase\n }\n };\n }\n return config;\n}\n\n/**\n * logs deprecation message\n */\nfunction informAboutDeprecation() {\n console.warn(errorMessages.deprecation);\n}\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\nvar errorMessages = {\n configIsRequired: 'the configuration object is required',\n configType: 'the configuration object should be an object',\n \"default\": 'an unknown error accured in `@monaco-editor/loader` package',\n deprecation: \"Deprecation warning!\\n You are using deprecated way of configuration.\\n\\n Instead of using\\n monaco.config({ urls: { monacoBase: '...' } })\\n use\\n monaco.config({ paths: { vs: '...' } })\\n\\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\\n \"\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n config: validateConfig\n};\n\nexport { validators as default, errorHandler, errorMessages };\n"],"names":["validateConfig","config","errorHandler","isObject","informAboutDeprecation","errorMessages","throwError","type","curry","validators"],"mappings":";;AAQA,SAASA,EAAeC,GAAQ;AAG9B,SAFKA,KAAQC,EAAa,kBAAkB,GACvCC,EAASF,CAAM,KAAGC,EAAa,YAAY,GAC5CD,EAAO,QACTG,EAAsB,GACf;AAAA,IACL,OAAO;AAAA,MACL,IAAIH,EAAO,KAAK;AAAA,IACxB;AAAA,EACA,KAESA;AACT;AAKA,SAASG,IAAyB;AAChC,UAAQ,KAAKC,EAAc,WAAW;AACxC;AACA,SAASC,EAAWD,GAAeE,GAAM;AACvC,QAAM,IAAI,MAAMF,EAAcE,CAAI,KAAKF,EAAc,OAAU;AACjE;AACG,IAACA,IAAgB;AAAA,EAClB,kBAAkB;AAAA,EAClB,YAAY;AAAA,EACZ,SAAW;AAAA,EACX,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACf,GACIH,IAAeM,EAAMF,CAAU,EAAED,CAAa,GAC9CI,IAAa;AAAA,EACf,QAAQT;AACV;","x_google_ignoreList":[0]}
|
package/dist/index252.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var c = function() {
|
|
2
|
+
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
3
|
+
n[r] = arguments[r];
|
|
4
|
+
return function(u) {
|
|
5
|
+
return n.reduceRight(function(e, o) {
|
|
6
|
+
return o(e);
|
|
7
|
+
}, u);
|
|
8
|
+
};
|
|
9
|
+
};
|
|
7
10
|
export {
|
|
8
|
-
|
|
11
|
+
c as default
|
|
9
12
|
};
|
|
10
13
|
//# sourceMappingURL=index252.js.map
|
package/dist/index252.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index252.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/utils/
|
|
1
|
+
{"version":3,"file":"index252.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/utils/compose.js"],"sourcesContent":["var compose = function compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n};\n\nexport { compose as default };\n"],"names":["compose","_len","fns","_key","x","y","f"],"mappings":"AAAG,IAACA,IAAU,WAAmB;AAC/B,WAASC,IAAO,UAAU,QAAQC,IAAM,IAAI,MAAMD,CAAI,GAAGE,IAAO,GAAGA,IAAOF,GAAME;AAC9E,IAAAD,EAAIC,CAAI,IAAI,UAAUA,CAAI;AAE5B,SAAO,SAAUC,GAAG;AAClB,WAAOF,EAAI,YAAY,SAAUG,GAAGC,GAAG;AACrC,aAAOA,EAAED,CAAC;AAAA,IACZ,GAAGD,CAAC;AAAA,EACN;AACF;","x_google_ignoreList":[0]}
|
package/dist/index253.js
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var a = !1, e = new Promise(function(c, t) {
|
|
7
|
-
n.then(function(r) {
|
|
8
|
-
return a ? t(l) : c(r);
|
|
9
|
-
}), n.catch(t);
|
|
10
|
-
});
|
|
11
|
-
return e.cancel = function() {
|
|
12
|
-
return a = !0;
|
|
13
|
-
}, e;
|
|
1
|
+
import { objectSpread2 as i } from "./index248.js";
|
|
2
|
+
function a(t, f) {
|
|
3
|
+
return Object.keys(f).forEach(function(n) {
|
|
4
|
+
f[n] instanceof Object && t[n] && Object.assign(f[n], a(t[n], f[n]));
|
|
5
|
+
}), i(i({}, t), f);
|
|
14
6
|
}
|
|
15
7
|
export {
|
|
16
|
-
|
|
17
|
-
u as default
|
|
8
|
+
a as default
|
|
18
9
|
};
|
|
19
10
|
//# sourceMappingURL=index253.js.map
|
package/dist/index253.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index253.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/utils/
|
|
1
|
+
{"version":3,"file":"index253.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js"],"sourcesContent":["import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';\n\nfunction merge(target, source) {\n Object.keys(source).forEach(function (key) {\n if (source[key] instanceof Object) {\n if (target[key]) {\n Object.assign(source[key], merge(target[key], source[key]));\n }\n }\n });\n return _objectSpread2(_objectSpread2({}, target), source);\n}\n\nexport { merge as default };\n"],"names":["merge","target","source","key","_objectSpread2"],"mappings":";AAEA,SAASA,EAAMC,GAAQC,GAAQ;AAC7B,gBAAO,KAAKA,CAAM,EAAE,QAAQ,SAAUC,GAAK;AACzC,IAAID,EAAOC,CAAG,aAAa,UACrBF,EAAOE,CAAG,KACZ,OAAO,OAAOD,EAAOC,CAAG,GAAGH,EAAMC,EAAOE,CAAG,GAAGD,EAAOC,CAAG,CAAC,CAAC;AAAA,EAGhE,CAAC,GACMC,EAAeA,EAAe,CAAA,GAAIH,CAAM,GAAGC,CAAM;AAC1D;","x_google_ignoreList":[0]}
|
package/dist/index254.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return
|
|
9
|
-
};
|
|
10
|
-
};
|
|
1
|
+
var l = {
|
|
2
|
+
type: "cancelation",
|
|
3
|
+
msg: "operation is manually canceled"
|
|
4
|
+
};
|
|
5
|
+
function u(n) {
|
|
6
|
+
var a = !1, e = new Promise(function(c, t) {
|
|
7
|
+
n.then(function(r) {
|
|
8
|
+
return a ? t(l) : c(r);
|
|
9
|
+
}), n.catch(t);
|
|
10
|
+
});
|
|
11
|
+
return e.cancel = function() {
|
|
12
|
+
return a = !0;
|
|
13
|
+
}, e;
|
|
11
14
|
}
|
|
12
15
|
export {
|
|
13
|
-
|
|
16
|
+
l as CANCELATION_MESSAGE,
|
|
17
|
+
u as default
|
|
14
18
|
};
|
|
15
19
|
//# sourceMappingURL=index254.js.map
|
package/dist/index254.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index254.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/utils/
|
|
1
|
+
{"version":3,"file":"index254.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js"],"sourcesContent":["// The source (has been changed) is https://github.com/facebook/react/issues/5465#issuecomment-157888325\n\nvar CANCELATION_MESSAGE = {\n type: 'cancelation',\n msg: 'operation is manually canceled'\n};\nfunction makeCancelable(promise) {\n var hasCanceled_ = false;\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise.then(function (val) {\n return hasCanceled_ ? reject(CANCELATION_MESSAGE) : resolve(val);\n });\n promise[\"catch\"](reject);\n });\n return wrappedPromise.cancel = function () {\n return hasCanceled_ = true;\n }, wrappedPromise;\n}\n\nexport { CANCELATION_MESSAGE, makeCancelable as default };\n"],"names":["CANCELATION_MESSAGE","makeCancelable","promise","hasCanceled_","wrappedPromise","resolve","reject","val"],"mappings":"AAEG,IAACA,IAAsB;AAAA,EACxB,MAAM;AAAA,EACN,KAAK;AACP;AACA,SAASC,EAAeC,GAAS;AAC/B,MAAIC,IAAe,IACfC,IAAiB,IAAI,QAAQ,SAAUC,GAASC,GAAQ;AAC1D,IAAAJ,EAAQ,KAAK,SAAUK,GAAK;AAC1B,aAAOJ,IAAeG,EAAON,CAAmB,IAAIK,EAAQE,CAAG;AAAA,IACjE,CAAC,GACDL,EAAQ,MAASI,CAAM;AAAA,EACzB,CAAC;AACD,SAAOF,EAAe,SAAS,WAAY;AACzC,WAAOD,IAAe;AAAA,EACxB,GAAGC;AACL;","x_google_ignoreList":[0]}
|
package/dist/index255.js
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
function
|
|
2
|
-
return
|
|
1
|
+
function o(u) {
|
|
2
|
+
return function h() {
|
|
3
|
+
for (var i = this, a = arguments.length, r = new Array(a), t = 0; t < a; t++)
|
|
4
|
+
r[t] = arguments[t];
|
|
5
|
+
return r.length >= u.length ? u.apply(this, r) : function() {
|
|
6
|
+
for (var c = arguments.length, e = new Array(c), n = 0; n < c; n++)
|
|
7
|
+
e[n] = arguments[n];
|
|
8
|
+
return h.apply(i, [].concat(r, e));
|
|
9
|
+
};
|
|
10
|
+
};
|
|
3
11
|
}
|
|
4
12
|
export {
|
|
5
|
-
|
|
13
|
+
o as default
|
|
6
14
|
};
|
|
7
15
|
//# sourceMappingURL=index255.js.map
|
package/dist/index255.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index255.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/utils/
|
|
1
|
+
{"version":3,"file":"index255.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/utils/curry.js"],"sourcesContent":["function curry(fn) {\n return function curried() {\n var _this = this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len2 = arguments.length, nextArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n nextArgs[_key2] = arguments[_key2];\n }\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nexport { curry as default };\n"],"names":["curry","fn","curried","_this","_len","args","_key","_len2","nextArgs","_key2"],"mappings":"AAAA,SAASA,EAAMC,GAAI;AACjB,SAAO,SAASC,IAAU;AAExB,aADIC,IAAQ,MACHC,IAAO,UAAU,QAAQC,IAAO,IAAI,MAAMD,CAAI,GAAGE,IAAO,GAAGA,IAAOF,GAAME;AAC/E,MAAAD,EAAKC,CAAI,IAAI,UAAUA,CAAI;AAE7B,WAAOD,EAAK,UAAUJ,EAAG,SAASA,EAAG,MAAM,MAAMI,CAAI,IAAI,WAAY;AACnE,eAASE,IAAQ,UAAU,QAAQC,IAAW,IAAI,MAAMD,CAAK,GAAGE,IAAQ,GAAGA,IAAQF,GAAOE;AACxF,QAAAD,EAASC,CAAK,IAAI,UAAUA,CAAK;AAEnC,aAAOP,EAAQ,MAAMC,GAAO,CAAA,EAAG,OAAOE,GAAMG,CAAQ,CAAC;AAAA,IACvD;AAAA,EACF;AACF;","x_google_ignoreList":[0]}
|
package/dist/index256.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index256.js","sources":["../../../node_modules/.bun/@monaco-editor+loader@1.7.0/node_modules/@monaco-editor/loader/lib/es/utils/isObject.js"],"sourcesContent":["function isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nexport { isObject as default };\n"],"names":["isObject","value"],"mappings":"AAAA,SAASA,EAASC,GAAO;AACvB,SAAO,CAAA,EAAG,SAAS,KAAKA,CAAK,EAAE,SAAS,QAAQ;AAClD;","x_google_ignoreList":[0]}
|
package/dist/index99.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index99.js","sources":["../src/components/rich-text/rich-text.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { cn } from \"../../lib/cn\";\nimport { Disposer, type ZenComponent } from \"../../lib/component\";\nimport { useLocale } from \"../locale/locale\";\n\n/**\n * RichText — WYSIWYG editor wrapping `jodit` (an OPTIONAL peer dependency).\n * Lazy-loaded so it never weighs on consumers who don't edit rich text.\n * Install `jodit` to use it, and import its CSS once in your app:\n * `import \"jodit/es2021/jodit.min.css\"`.\n *\n * const rt = RichText({ value: html, onChange: setHtml, placeholder: \"Write…\" });\n * document.body.append(rt.el);\n *\n * `onChange` fires on blur (Jodit's recommended commit point — its per-keystroke\n * event is noisy and can fight controlled state).\n *\n * The React binding reaches for `jodit-pro-react`; Jodit's own package is plain\n * vanilla JS (it IS a framework-agnostic editor), so this binding drives it\n * directly and `config` keeps the same meaning. Public API matches React:\n * `value` / `onChange` / `placeholder` / `config` / `onImageUpload` / `math` /\n * `class`.\n *\n * If Jodit is absent the dynamic import rejects — React catches that in an error\n * boundary and renders an install hint; there is no boundary here and a rejected\n * `import()` would otherwise escape past the caller, so it is caught and the same\n * hint is rendered. jodit is NOT bundled: the `import(\"jodit\")` is a real dynamic\n * import so a consumer who never renders RichText never pays for it.\n */\nexport interface RichTextProps {\n value?: string;\n onChange?: (html: string) => void;\n placeholder?: string;\n /** raw Jodit config, merged over the defaults */\n config?: Record<string, any>;\n /**\n * Handle an inserted image and return the URL to embed.\n *\n * Without it, Jodit inlines the file as a base64 data URI — which works,\n * and quietly puts a two-megabyte string inside the HTML you then store in a\n * database and send back on every read. Supply this and the editor embeds a\n * URL instead; uploading is yours, for the same reason UploadCollection does\n * not own its transport. Whether uploads go through it is decided at\n * construction, like `config`; the LATEST function passed through `update()`\n * is the one called.\n */\n onImageUpload?: (file: File) => Promise<string>;\n /**\n * Render `$…$` and `$$…$$` as maths, using KaTeX, in a preview beneath the\n * editor.\n *\n * `katex` is an OPTIONAL peer dependency, loaded only when this is on, so an\n * app with no equations never downloads it. Import its stylesheet once in your\n * app (`import \"katex/dist/katex.min.css\"`) — KaTeX's markup is unreadable\n * without it. Rendering happens on the OUTPUT (see `renderMath`) rather than\n * inside the editor: the author writes and edits the TeX source, which is the\n * only form that survives a round trip through storage.\n */\n math?: boolean;\n class?: string;\n}\n\n/**\n * Render `$…$` and `$$…$$` in an HTML string as maths.\n *\n * Separate from the editor and exported, because the same string has to render\n * the same way everywhere it appears — the editor's preview, the page that shows\n * the content, a printed report. A component that rendered maths only inside\n * itself would leave the others showing raw TeX.\n *\n * Returns the input unchanged if `katex` is not installed — an equation that\n * shows as `$x^2$` is legible; a thrown error is not.\n */\nexport const renderMath = async (html: string): Promise<string> => {\n let katex: any;\n try {\n katex = await import(\"katex\");\n } catch {\n return html;\n }\n const render = (tex: string, display: boolean) => {\n try {\n return (katex.default ?? katex).renderToString(tex, {\n displayMode: display,\n throwOnError: false,\n });\n } catch {\n /* A malformed equation renders as its source rather than taking the\n surrounding document with it. */\n return display ? `$$${tex}$$` : `$${tex}$`;\n }\n };\n return html\n .replace(/\\$\\$([^$]+)\\$\\$/g, (_m, tex: string) => render(tex, true))\n .replace(/\\$([^$\\n]+)\\$/g, (_m, tex: string) => render(tex, false));\n};\n\nconst LOADING_CLASS = \"zen-text-sm zen-text-zen-muted-fg\";\nconst FALLBACK_CLASS =\n \"zen-rounded-zen-md zen-border zen-border-zen-border zen-bg-zen-muted zen-p-4 zen-text-sm zen-text-zen-muted-fg\";\n\nexport function RichText(props: RichTextProps = {}): ZenComponent<RichTextProps> {\n let current: RichTextProps = { ...props };\n const loc = useLocale();\n const disposer = new Disposer();\n\n const el = document.createElement(\"div\");\n el.className = cn(current.class);\n\n // Loading placeholder — replaced once the import settles one way or the other.\n const status = document.createElement(\"div\");\n status.className = LOADING_CLASS;\n status.textContent = loc.t(\"richText.loadingEditor\");\n el.append(status);\n\n // Jodit takes ownership of `mount` and writes its own `display` onto it, so the\n // node must already exist before Jodit.make runs and must never be re-rendered\n // by us afterwards. It stays detached until the editor is ready.\n const mount = document.createElement(\"div\");\n\n let editor: any = null;\n let destroyed = false;\n\n // Config is read once at construction — same as React, where `config` is passed\n // once per mount by JoditEditor. Rebuilding on every change would blow away the\n // editor's state, so later `config` / `placeholder` changes are deliberately\n // ignored (the value below is captured now).\n const editorConfig = {\n readonly: false,\n placeholder: current.placeholder ?? \"\",\n // Jodit's beforeInitHook fetches `<basePath>config.js` when\n // loadExternalConfig is on (its default), so every RichText mount fired a\n // request for a file zen-ui does not ship and never will — a guaranteed 404\n // in the console of any app using it. Nothing reads the response; turning it\n // off removes a failed request per mount and nothing else. A caller who DOES\n // host a jodit config can turn it back on through `config`, since theirs is\n // spread after this.\n loadExternalConfig: false,\n /*\n * Jodit's own default is neither base64 nor a working upload (its `url` is\n * empty), so match React: inline as base64 unless the caller takes the file.\n * With a handler, the file goes wherever the caller sends it and only the\n * URL is embedded. `customUploadFunction` is Jodit's hook for replacing the\n * transport; it answers in Jodit's own response shape, so Jodit's default\n * success handler does the inserting for every entry point (toolbar, drop,\n * paste).\n *\n * `url` is never requested — the custom function replaces the request — but\n * it must not be empty: Jodit binds drop and paste on the editor only when\n * `url` (or base64) is set, so with \"\" an image dropped into the text went\n * nowhere and only the toolbar's Upload tab reached the handler (measured).\n */\n ...(current.onImageUpload\n ? {\n uploader: {\n insertImageAsBase64URI: false,\n url: \"onImageUpload\",\n customUploadFunction: async (request: unknown) => {\n const files =\n request instanceof FormData\n ? [...request.values()].filter((v): v is File => v instanceof File)\n : [];\n try {\n const urls: string[] = [];\n const isImages: boolean[] = [];\n for (const file of files) {\n const url = await current.onImageUpload?.(file);\n if (!url) continue;\n urls.push(url);\n isImages.push(!file.type || file.type.startsWith(\"image/\"));\n }\n return { success: true, time: \"\", data: { baseurl: \"\", files: urls, isImages, messages: [] } };\n } catch (error) {\n return {\n success: false,\n time: \"\",\n data: { baseurl: \"\", files: [], messages: [error instanceof Error ? error.message : String(error)] },\n };\n }\n },\n },\n }\n : { uploader: { insertImageAsBase64URI: true } }),\n ...current.config,\n };\n\n const value = () => current.value ?? \"\";\n\n const showFallback = () => {\n if (destroyed) return;\n status.className = FALLBACK_CLASS;\n status.textContent = \"\";\n const strong = document.createElement(\"strong\");\n strong.className = \"zen-font-medium zen-text-zen-foreground\";\n strong.textContent = \"RichText needs an optional peer dependency.\"; // i18n-ignore (a developer notice: install instructions)\n const code = document.createElement(\"code\");\n code.textContent = \"jodit\"; // i18n-ignore (a package name)\n status.append(strong, document.createTextNode(\" Install \"), code, document.createTextNode(\" to use this component.\"));\n };\n\n // The dynamic import resolves on a later microtask, by which point the caller\n // has appended `el`, so Jodit.make measures against a node that is in the DOM.\n void (async () => {\n let mod: any;\n try {\n mod = await import(\"jodit\");\n /* The bare entry registers only 22 of Jodit's 68 plugins: no paste,\n clipboard, source, fullsize, justify, indent, search… React's\n jodit-pro build has all of them, so this loads the rest. Without\n `paste`, a pasted image never reached onImageUpload and fell through\n to the browser's own base64 insert. */\n await import(\"jodit/esm/plugins/all.js\");\n } catch {\n showFallback();\n return;\n }\n if (destroyed) return;\n const Jodit = mod?.Jodit ?? mod?.default?.Jodit;\n if (typeof Jodit?.make !== \"function\") {\n showFallback();\n return;\n }\n /* The mount goes INTO the document before Jodit.make, not after. Jodit\n inserts its container beside the element it is given, and a detached\n element has nowhere to insert it: making the editor first and swapping\n the mount in afterwards (as this did, and as the previous\n `status.remove(); el.append(mount)` did) left /rich-text an empty box,\n with no error for any check to catch. In the placeholder's place, so it\n stays ahead of the maths preview when there is one. */\n status.replaceWith(mount);\n try {\n editor = Jodit.make(mount, editorConfig);\n } catch {\n mount.replaceWith(status);\n showFallback();\n return;\n }\n editor.value = value();\n editor.events.on(\"blur\", () => current.onChange?.(editor.value));\n })();\n\n disposer.add(() => {\n editor?.destruct?.();\n editor = null;\n });\n\n /*\n * The editor holds TeX SOURCE — `$x^2$` — because that is the only form that\n * survives a round trip through storage and back into an editor. The rendered\n * form goes in a preview beneath it, so an author can see what they wrote\n * without the editor mangling KaTeX's markup on the next keystroke. Built only\n * while `math` is on, so without it RichText renders exactly what it always did.\n */\n let preview: { figure: HTMLElement; body: HTMLElement } | null = null;\n let mathSeq = 0;\n const syncMath = () => {\n if (!current.math) {\n mathSeq += 1;\n preview?.figure.remove();\n preview = null;\n return;\n }\n if (!preview) {\n const figure = document.createElement(\"figure\");\n figure.className =\n \"zen-mt-2 zen-m-0 zen-rounded-zen-md zen-border zen-border-zen-border zen-bg-zen-muted zen-p-3\";\n const caption = document.createElement(\"figcaption\");\n caption.className = \"zen-mb-1 zen-text-xs zen-font-medium zen-text-zen-muted-fg\";\n caption.textContent = loc.t(\"richText.preview\");\n const body = document.createElement(\"div\");\n body.className = \"zen-text-sm zen-text-zen-foreground\";\n figure.append(caption, body);\n preview = { figure, body };\n el.append(figure);\n }\n const seq = ++mathSeq;\n const target = preview.body;\n void renderMath(value()).then((html) => {\n // Overtaken by a newer value (or math turned off): drop the stale render.\n if (seq !== mathSeq || destroyed) return;\n // The HTML is the author's own, already in the editor above; KaTeX output\n // is markup by definition. Sanitise upstream if the author is not trusted.\n target.innerHTML = html;\n });\n };\n syncMath();\n\n return {\n el,\n update(next) {\n current = { ...current, ...next };\n if (\"class\" in next) el.className = cn(current.class);\n // Controlled-value sync. Only push when it genuinely differs, or every\n // keystroke round-trips through the editor and the caret jumps to the end.\n if (\"value\" in next && editor && editor.value !== value()) {\n editor.value = value();\n }\n if (\"value\" in next || \"math\" in next) syncMath();\n },\n destroy() {\n destroyed = true;\n disposer.dispose();\n el.remove();\n },\n };\n}\n"],"names":["renderMath","html","katex","render","tex","display","_m","LOADING_CLASS","FALLBACK_CLASS","RichText","props","current","loc","useLocale","disposer","Disposer","el","cn","status","mount","editor","destroyed","editorConfig","request","files","v","urls","isImages","file","url","error","value","showFallback","strong","code","mod","Jodit","preview","mathSeq","syncMath","figure","caption","body","seq","target","next"],"mappings":";;;AAyEO,MAAMA,IAAa,OAAOC,MAAkC;AACjE,MAAIC;AACJ,MAAI;AACF,IAAAA,IAAQ,MAAM,OAAO,OAAO;AAAA,EAC9B,QAAQ;AACN,WAAOD;AAAA,EACT;AACA,QAAME,IAAS,CAACC,GAAaC,MAAqB;AAChD,QAAI;AACF,cAAQH,EAAM,WAAWA,GAAO,eAAeE,GAAK;AAAA,QAClD,aAAaC;AAAA,QACb,cAAc;AAAA,MAAA,CACf;AAAA,IACH,QAAQ;AAGN,aAAOA,IAAU,KAAKD,CAAG,OAAO,IAAIA,CAAG;AAAA,IACzC;AAAA,EACF;AACA,SAAOH,EACJ,QAAQ,oBAAoB,CAACK,GAAIF,MAAgBD,EAAOC,GAAK,EAAI,CAAC,EAClE,QAAQ,kBAAkB,CAACE,GAAIF,MAAgBD,EAAOC,GAAK,EAAK,CAAC;AACtE,GAEMG,IAAgB,qCAChBC,IACJ;AAEK,SAASC,EAASC,IAAuB,IAAiC;AAC/E,MAAIC,IAAyB,EAAE,GAAGD,EAAA;AAClC,QAAME,IAAMC,EAAA,GACNC,IAAW,IAAIC,EAAA,GAEfC,IAAK,SAAS,cAAc,KAAK;AACvC,EAAAA,EAAG,YAAYC,EAAGN,EAAQ,KAAK;AAG/B,QAAMO,IAAS,SAAS,cAAc,KAAK;AAC3C,EAAAA,EAAO,YAAYX,GACnBW,EAAO,cAAcN,EAAI,EAAE,wBAAwB,GACnDI,EAAG,OAAOE,CAAM;AAKhB,QAAMC,IAAQ,SAAS,cAAc,KAAK;AAE1C,MAAIC,IAAc,MACdC,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SAAS,cAAc,YAAY;AACnD,MAAAA,EAAQ,YAAY,8DACpBA,EAAQ,cAAc7B,EAAI,EAAE,kBAAkB;AAC9C,YAAM8B,IAAO,SAAS,cAAc,KAAK;AACzC,MAAAA,EAAK,YAAY,uCACjBF,EAAO,OAAOC,GAASC,CAAI,GAC3BL,IAAU,EAAE,QAAAG,GAAQ,MAAAE,EAAA,GACpB1B,EAAG,OAAOwB,CAAM;AAAA,IAClB;AACA,UAAMG,IAAM,EAAEL,GACRM,IAASP,EAAQ;AACvB,IAAKrC,EAAW+B,EAAA,CAAO,EAAE,KAAK,CAAC9B,MAAS;AAEtC,MAAI0C,MAAQL,KAAWjB,MAGvBuB,EAAO,YAAY3C;AAAA,IACrB,CAAC;AAAA,EACH;AACA,SAAAsC,EAAA,GAEO;AAAA,IACL,IAAAvB;AAAA,IACA,OAAO6B,GAAM;AACX,MAAAlC,IAAU,EAAE,GAAGA,GAAS,GAAGkC,EAAA,GACvB,WAAWA,MAAM7B,EAAG,YAAYC,EAAGN,EAAQ,KAAK,IAGhD,WAAWkC,KAAQzB,KAAUA,EAAO,UAAUW,QAChDX,EAAO,QAAQW,EAAA,KAEb,WAAWc,KAAQ,UAAUA,MAAMN,EAAA;AAAA,IACzC;AAAA,IACA,UAAU;AACR,MAAAlB,IAAY,IACZP,EAAS,QAAA,GACTE,EAAG,OAAA;AAAA,IACL;AAAA,EAAA;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"index99.js","sources":["../src/components/rich-text/rich-text.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { cn } from \"../../lib/cn\";\nimport { Disposer, type ZenComponent } from \"../../lib/component\";\nimport { useLocale } from \"../locale/locale\";\n\n/**\n * RichText — WYSIWYG editor wrapping `jodit` (an OPTIONAL peer dependency).\n * Lazy-loaded so it never weighs on consumers who don't edit rich text.\n * Install `jodit` to use it, and import its CSS once in your app:\n * `import \"jodit/es2021/jodit.min.css\"`.\n *\n * const rt = RichText({ value: html, onChange: setHtml, placeholder: \"Write…\" });\n * document.body.append(rt.el);\n *\n * `onChange` fires on blur (Jodit's recommended commit point — its per-keystroke\n * event is noisy and can fight controlled state).\n *\n * Jodit's own package is plain vanilla JS (it IS a framework-agnostic editor),\n * so this binding drives it directly, as React and Solid do, and `config` keeps the same meaning. Public API matches React:\n * `value` / `onChange` / `placeholder` / `config` / `onImageUpload` / `math` /\n * `class`.\n *\n * If Jodit is absent the dynamic import rejects; a rejected `import()` would\n * otherwise escape past the caller, so it is caught and an install hint is\n * rendered, as in React and Solid. jodit is NOT bundled: the `import(\"jodit\")` is a real dynamic\n * import so a consumer who never renders RichText never pays for it.\n */\nexport interface RichTextProps {\n value?: string;\n onChange?: (html: string) => void;\n placeholder?: string;\n /** raw Jodit config, merged over the defaults */\n config?: Record<string, any>;\n /**\n * Handle an inserted image and return the URL to embed.\n *\n * Without it, Jodit inlines the file as a base64 data URI — which works,\n * and quietly puts a two-megabyte string inside the HTML you then store in a\n * database and send back on every read. Supply this and the editor embeds a\n * URL instead; uploading is yours, for the same reason UploadCollection does\n * not own its transport. Whether uploads go through it is decided at\n * construction, like `config`; the LATEST function passed through `update()`\n * is the one called.\n */\n onImageUpload?: (file: File) => Promise<string>;\n /**\n * Render `$…$` and `$$…$$` as maths, using KaTeX, in a preview beneath the\n * editor.\n *\n * `katex` is an OPTIONAL peer dependency, loaded only when this is on, so an\n * app with no equations never downloads it. Import its stylesheet once in your\n * app (`import \"katex/dist/katex.min.css\"`) — KaTeX's markup is unreadable\n * without it. Rendering happens on the OUTPUT (see `renderMath`) rather than\n * inside the editor: the author writes and edits the TeX source, which is the\n * only form that survives a round trip through storage.\n */\n math?: boolean;\n class?: string;\n}\n\n/**\n * Render `$…$` and `$$…$$` in an HTML string as maths.\n *\n * Separate from the editor and exported, because the same string has to render\n * the same way everywhere it appears — the editor's preview, the page that shows\n * the content, a printed report. A component that rendered maths only inside\n * itself would leave the others showing raw TeX.\n *\n * Returns the input unchanged if `katex` is not installed — an equation that\n * shows as `$x^2$` is legible; a thrown error is not.\n */\nexport const renderMath = async (html: string): Promise<string> => {\n let katex: any;\n try {\n katex = await import(\"katex\");\n } catch {\n return html;\n }\n const render = (tex: string, display: boolean) => {\n try {\n return (katex.default ?? katex).renderToString(tex, {\n displayMode: display,\n throwOnError: false,\n });\n } catch {\n /* A malformed equation renders as its source rather than taking the\n surrounding document with it. */\n return display ? `$$${tex}$$` : `$${tex}$`;\n }\n };\n return html\n .replace(/\\$\\$([^$]+)\\$\\$/g, (_m, tex: string) => render(tex, true))\n .replace(/\\$([^$\\n]+)\\$/g, (_m, tex: string) => render(tex, false));\n};\n\nconst LOADING_CLASS = \"zen-text-sm zen-text-zen-muted-fg\";\nconst FALLBACK_CLASS =\n \"zen-rounded-zen-md zen-border zen-border-zen-border zen-bg-zen-muted zen-p-4 zen-text-sm zen-text-zen-muted-fg\";\n\nexport function RichText(props: RichTextProps = {}): ZenComponent<RichTextProps> {\n let current: RichTextProps = { ...props };\n const loc = useLocale();\n const disposer = new Disposer();\n\n const el = document.createElement(\"div\");\n el.className = cn(current.class);\n\n // Loading placeholder — replaced once the import settles one way or the other.\n const status = document.createElement(\"div\");\n status.className = LOADING_CLASS;\n status.textContent = loc.t(\"richText.loadingEditor\");\n el.append(status);\n\n // Jodit takes ownership of `mount` and writes its own `display` onto it, so the\n // node must already exist before Jodit.make runs and must never be re-rendered\n // by us afterwards. It stays detached until the editor is ready.\n const mount = document.createElement(\"div\");\n\n let editor: any = null;\n let destroyed = false;\n\n // Config is read once at construction — same as React, where `config` is passed\n // once per mount by JoditEditor. Rebuilding on every change would blow away the\n // editor's state, so later `config` / `placeholder` changes are deliberately\n // ignored (the value below is captured now).\n const editorConfig = {\n readonly: false,\n placeholder: current.placeholder ?? \"\",\n // Jodit's beforeInitHook fetches `<basePath>config.js` when\n // loadExternalConfig is on (its default), so every RichText mount fired a\n // request for a file zen-ui does not ship and never will — a guaranteed 404\n // in the console of any app using it. Nothing reads the response; turning it\n // off removes a failed request per mount and nothing else. A caller who DOES\n // host a jodit config can turn it back on through `config`, since theirs is\n // spread after this.\n loadExternalConfig: false,\n /*\n * Jodit's own default is neither base64 nor a working upload (its `url` is\n * empty), so match React: inline as base64 unless the caller takes the file.\n * With a handler, the file goes wherever the caller sends it and only the\n * URL is embedded. `customUploadFunction` is Jodit's hook for replacing the\n * transport; it answers in Jodit's own response shape, so Jodit's default\n * success handler does the inserting for every entry point (toolbar, drop,\n * paste).\n *\n * `url` is never requested — the custom function replaces the request — but\n * it must not be empty: Jodit binds drop and paste on the editor only when\n * `url` (or base64) is set, so with \"\" an image dropped into the text went\n * nowhere and only the toolbar's Upload tab reached the handler (measured).\n */\n ...(current.onImageUpload\n ? {\n uploader: {\n insertImageAsBase64URI: false,\n url: \"onImageUpload\",\n customUploadFunction: async (request: unknown) => {\n const files =\n request instanceof FormData\n ? [...request.values()].filter((v): v is File => v instanceof File)\n : [];\n try {\n const urls: string[] = [];\n const isImages: boolean[] = [];\n for (const file of files) {\n const url = await current.onImageUpload?.(file);\n if (!url) continue;\n urls.push(url);\n isImages.push(!file.type || file.type.startsWith(\"image/\"));\n }\n return { success: true, time: \"\", data: { baseurl: \"\", files: urls, isImages, messages: [] } };\n } catch (error) {\n return {\n success: false,\n time: \"\",\n data: { baseurl: \"\", files: [], messages: [error instanceof Error ? error.message : String(error)] },\n };\n }\n },\n },\n }\n : { uploader: { insertImageAsBase64URI: true } }),\n ...current.config,\n };\n\n const value = () => current.value ?? \"\";\n\n const showFallback = () => {\n if (destroyed) return;\n status.className = FALLBACK_CLASS;\n status.textContent = \"\";\n const strong = document.createElement(\"strong\");\n strong.className = \"zen-font-medium zen-text-zen-foreground\";\n strong.textContent = \"RichText needs an optional peer dependency.\"; // i18n-ignore (a developer notice: install instructions)\n const code = document.createElement(\"code\");\n code.textContent = \"jodit\"; // i18n-ignore (a package name)\n status.append(strong, document.createTextNode(\" Install \"), code, document.createTextNode(\" to use this component.\"));\n };\n\n // The dynamic import resolves on a later microtask, by which point the caller\n // has appended `el`, so Jodit.make measures against a node that is in the DOM.\n void (async () => {\n let mod: any;\n try {\n mod = await import(\"jodit\");\n /* The bare entry registers only 22 of Jodit's 68 plugins: no paste,\n clipboard, source, fullsize, justify, indent, search… so this loads\n the rest. Without\n `paste`, a pasted image never reached onImageUpload and fell through\n to the browser's own base64 insert. */\n await import(\"jodit/esm/plugins/all.js\");\n } catch {\n showFallback();\n return;\n }\n if (destroyed) return;\n const Jodit = mod?.Jodit ?? mod?.default?.Jodit;\n if (typeof Jodit?.make !== \"function\") {\n showFallback();\n return;\n }\n /* The mount goes INTO the document before Jodit.make, not after. Jodit\n inserts its container beside the element it is given, and a detached\n element has nowhere to insert it: making the editor first and swapping\n the mount in afterwards (as this did, and as the previous\n `status.remove(); el.append(mount)` did) left /rich-text an empty box,\n with no error for any check to catch. In the placeholder's place, so it\n stays ahead of the maths preview when there is one. */\n status.replaceWith(mount);\n try {\n editor = Jodit.make(mount, editorConfig);\n } catch {\n mount.replaceWith(status);\n showFallback();\n return;\n }\n editor.value = value();\n editor.events.on(\"blur\", () => current.onChange?.(editor.value));\n })();\n\n disposer.add(() => {\n editor?.destruct?.();\n editor = null;\n });\n\n /*\n * The editor holds TeX SOURCE — `$x^2$` — because that is the only form that\n * survives a round trip through storage and back into an editor. The rendered\n * form goes in a preview beneath it, so an author can see what they wrote\n * without the editor mangling KaTeX's markup on the next keystroke. Built only\n * while `math` is on, so without it RichText renders exactly what it always did.\n */\n let preview: { figure: HTMLElement; body: HTMLElement } | null = null;\n let mathSeq = 0;\n const syncMath = () => {\n if (!current.math) {\n mathSeq += 1;\n preview?.figure.remove();\n preview = null;\n return;\n }\n if (!preview) {\n const figure = document.createElement(\"figure\");\n figure.className =\n \"zen-mt-2 zen-m-0 zen-rounded-zen-md zen-border zen-border-zen-border zen-bg-zen-muted zen-p-3\";\n const caption = document.createElement(\"figcaption\");\n caption.className = \"zen-mb-1 zen-text-xs zen-font-medium zen-text-zen-muted-fg\";\n caption.textContent = loc.t(\"richText.preview\");\n const body = document.createElement(\"div\");\n body.className = \"zen-text-sm zen-text-zen-foreground\";\n figure.append(caption, body);\n preview = { figure, body };\n el.append(figure);\n }\n const seq = ++mathSeq;\n const target = preview.body;\n void renderMath(value()).then((html) => {\n // Overtaken by a newer value (or math turned off): drop the stale render.\n if (seq !== mathSeq || destroyed) return;\n // The HTML is the author's own, already in the editor above; KaTeX output\n // is markup by definition. Sanitise upstream if the author is not trusted.\n target.innerHTML = html;\n });\n };\n syncMath();\n\n return {\n el,\n update(next) {\n current = { ...current, ...next };\n if (\"class\" in next) el.className = cn(current.class);\n // Controlled-value sync. Only push when it genuinely differs, or every\n // keystroke round-trips through the editor and the caret jumps to the end.\n if (\"value\" in next && editor && editor.value !== value()) {\n editor.value = value();\n }\n if (\"value\" in next || \"math\" in next) syncMath();\n },\n destroy() {\n destroyed = true;\n disposer.dispose();\n el.remove();\n },\n };\n}\n"],"names":["renderMath","html","katex","render","tex","display","_m","LOADING_CLASS","FALLBACK_CLASS","RichText","props","current","loc","useLocale","disposer","Disposer","el","cn","status","mount","editor","destroyed","editorConfig","request","files","v","urls","isImages","file","url","error","value","showFallback","strong","code","mod","Jodit","preview","mathSeq","syncMath","figure","caption","body","seq","target","next"],"mappings":";;;AAuEO,MAAMA,IAAa,OAAOC,MAAkC;AACjE,MAAIC;AACJ,MAAI;AACF,IAAAA,IAAQ,MAAM,OAAO,OAAO;AAAA,EAC9B,QAAQ;AACN,WAAOD;AAAA,EACT;AACA,QAAME,IAAS,CAACC,GAAaC,MAAqB;AAChD,QAAI;AACF,cAAQH,EAAM,WAAWA,GAAO,eAAeE,GAAK;AAAA,QAClD,aAAaC;AAAA,QACb,cAAc;AAAA,MAAA,CACf;AAAA,IACH,QAAQ;AAGN,aAAOA,IAAU,KAAKD,CAAG,OAAO,IAAIA,CAAG;AAAA,IACzC;AAAA,EACF;AACA,SAAOH,EACJ,QAAQ,oBAAoB,CAACK,GAAIF,MAAgBD,EAAOC,GAAK,EA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AEb,WAAWc,KAAQ,UAAUA,MAAMN,EAAA;AAAA,IACzC;AAAA,IACA,UAAU;AACR,MAAAlB,IAAY,IACZP,EAAS,QAAA,GACTE,EAAG,OAAA;AAAA,IACL;AAAA,EAAA;AAEJ;"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/previews/map.jpg
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/previews/tile.jpg
CHANGED
|
Binary file
|