@diplodoc/client 3.1.12 → 3.3.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.
@@ -14733,6 +14733,127 @@ function transform({
14733
14733
  //# sourceMappingURL=index.js.map
14734
14734
 
14735
14735
 
14736
+ /***/ }),
14737
+
14738
+ /***/ 81397:
14739
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
14740
+
14741
+ "use strict";
14742
+
14743
+ var __defProp = Object.defineProperty;
14744
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
14745
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14746
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
14747
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14748
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
14749
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14750
+ var __spreadValues = (a, b) => {
14751
+ for (var prop in b || (b = {}))
14752
+ if (__hasOwnProp.call(b, prop))
14753
+ __defNormalProp(a, prop, b[prop]);
14754
+ if (__getOwnPropSymbols)
14755
+ for (var prop of __getOwnPropSymbols(b)) {
14756
+ if (__propIsEnum.call(b, prop))
14757
+ __defNormalProp(a, prop, b[prop]);
14758
+ }
14759
+ return a;
14760
+ };
14761
+ var __export = (target, all) => {
14762
+ for (var name in all)
14763
+ __defProp(target, name, { get: all[name], enumerable: true });
14764
+ };
14765
+ var __copyProps = (to, from, except, desc) => {
14766
+ if (from && typeof from === "object" || typeof from === "function") {
14767
+ for (let key of __getOwnPropNames(from))
14768
+ if (!__hasOwnProp.call(to, key) && key !== except)
14769
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14770
+ }
14771
+ return to;
14772
+ };
14773
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14774
+
14775
+ // src/react/index.ts
14776
+ var react_exports = {};
14777
+ __export(react_exports, {
14778
+ TabsRuntime: () => TabsRuntime,
14779
+ useDiplodocTabs: () => useDiplodocTabs
14780
+ });
14781
+ module.exports = __toCommonJS(react_exports);
14782
+
14783
+ // src/react/useDiplodocTabs.ts
14784
+ var import_react = __webpack_require__(96540);
14785
+
14786
+ // src/common.ts
14787
+ var GLOBAL_SYMBOL = Symbol.for("diplodocTabs");
14788
+
14789
+ // src/react/useDiplodocTabs.ts
14790
+ function useDiplodocTabs(callback = void 0) {
14791
+ if (callback !== void 0) {
14792
+ const selectTabHandle = (0, import_react.useCallback)(
14793
+ ({ tab, currentTabId }) => {
14794
+ callback(tab, currentTabId);
14795
+ },
14796
+ [callback]
14797
+ );
14798
+ (0, import_react.useEffect)(() => window[GLOBAL_SYMBOL].onSelectTab(selectTabHandle), [selectTabHandle]);
14799
+ }
14800
+ return {
14801
+ selectTabById: (0, import_react.useCallback)(
14802
+ (tabId, options) => window[GLOBAL_SYMBOL].selectTabById(tabId, options),
14803
+ []
14804
+ ),
14805
+ selectTab: (0, import_react.useCallback)((tab) => window[GLOBAL_SYMBOL].selectTab(tab), []),
14806
+ configure: (0, import_react.useCallback)(
14807
+ (options) => window[GLOBAL_SYMBOL].configure(options),
14808
+ []
14809
+ ),
14810
+ restoreTabs: (0, import_react.useCallback)(
14811
+ (tabsHistory) => window[GLOBAL_SYMBOL].restoreTabs(tabsHistory),
14812
+ []
14813
+ ),
14814
+ onPageChanged: (0, import_react.useCallback)(() => window[GLOBAL_SYMBOL].onPageChanged(), []),
14815
+ getTabsFromLocalStorage: (0, import_react.useCallback)(
14816
+ () => window[GLOBAL_SYMBOL].getTabsFromLocalStorage(),
14817
+ []
14818
+ ),
14819
+ getTabsFromSearchQuery: (0, import_react.useCallback)(
14820
+ () => window[GLOBAL_SYMBOL].getTabsFromSearchQuery(),
14821
+ []
14822
+ ),
14823
+ getCurrentPageTabHistory: (0, import_react.useCallback)(
14824
+ (tabsHistory) => window[GLOBAL_SYMBOL].getCurrentPageTabHistory(tabsHistory),
14825
+ []
14826
+ ),
14827
+ updateLocalStorageWithTabs: (0, import_react.useCallback)(
14828
+ (tabsHistory) => window[GLOBAL_SYMBOL].updateLocalStorageWithTabs(tabsHistory),
14829
+ []
14830
+ ),
14831
+ updateQueryParamWithTabs: (0, import_react.useCallback)(
14832
+ (tabsHistory) => window[GLOBAL_SYMBOL].updateQueryParamWithTabs(tabsHistory),
14833
+ []
14834
+ )
14835
+ };
14836
+ }
14837
+
14838
+ // src/react/TabsRuntime.ts
14839
+ var import_react2 = __webpack_require__(96540);
14840
+ function TabsRuntime(props = {}) {
14841
+ if (typeof window === "undefined") {
14842
+ return null;
14843
+ }
14844
+ const tabs = useDiplodocTabs();
14845
+ (0, import_react2.useEffect)(() => {
14846
+ tabs.configure(__spreadValues({}, props));
14847
+ }, [props, tabs]);
14848
+ (0, import_react2.useEffect)(() => {
14849
+ tabs.onPageChanged();
14850
+ tabs.restoreTabs(__spreadValues(__spreadValues({}, tabs.getTabsFromLocalStorage()), tabs.getTabsFromSearchQuery()));
14851
+ }, [props.router]);
14852
+ return null;
14853
+ }
14854
+ //# sourceMappingURL=index.js.map
14855
+
14856
+
14736
14857
  /***/ }),
14737
14858
 
14738
14859
  /***/ 20553:
@@ -18162,7 +18283,9 @@ const index = (md, { lang, notesAutotitle, path: optPath, log }) => {
18162
18283
  while (i < tokens.length) {
18163
18284
  const match = matchOpenToken(tokens, i);
18164
18285
  if (match) {
18165
- const closeTokenIdx = findCloseTokenIdx(tokens, i + 4, path, log);
18286
+ // Skip paragraph_close for open token (+1) and paragraph_open for close token (+1)
18287
+ // This is minimal useless content length
18288
+ const closeTokenIdx = findCloseTokenIdx(tokens, i + 2, path, log);
18166
18289
  if (!closeTokenIdx) {
18167
18290
  i += 3;
18168
18291
  continue;
@@ -19613,7 +19736,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
19613
19736
  return (mod && mod.__esModule) ? mod : { "default": mod };
19614
19737
  };
19615
19738
  Object.defineProperty(exports, "__esModule", ({ value: true }));
19616
- exports.defaultOptions = exports.defaultParseOptions = void 0;
19739
+ exports.sanitize = exports.defaultOptions = exports.defaultParseOptions = void 0;
19617
19740
  const sanitize_html_1 = __importDefault(__webpack_require__(74728));
19618
19741
  // @ts-ignore
19619
19742
  const cssfilter_1 = __importDefault(__webpack_require__(56018));
@@ -20169,6 +20292,7 @@ function sanitize(html, options, additionalOptions) {
20169
20292
  const modifiedHtml = needToSanitizeStyles ? sanitizeStyles(html, sanitizeOptions) : html;
20170
20293
  return (0, sanitize_html_1.default)(modifiedHtml, sanitizeOptions);
20171
20294
  }
20295
+ exports.sanitize = sanitize;
20172
20296
  exports["default"] = sanitize;
20173
20297
  //# sourceMappingURL=sanitize.js.map
20174
20298