@common-stack/components-pro 3.0.1-alpha.0 → 3.0.2-alpha.2

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.
Files changed (44) hide show
  1. package/lib/index.js +2 -12
  2. package/lib/index.js.map +1 -1
  3. package/lib/index.native.js +1 -8
  4. package/lib/index.native.js.map +1 -1
  5. package/lib/slot-fill/__tests__/filler-slot.test.js +8 -33
  6. package/lib/slot-fill/__tests__/filler-slot.test.js.map +1 -1
  7. package/lib/slot-fill/__tests__/slot-features.test.js +81 -106
  8. package/lib/slot-fill/__tests__/slot-features.test.js.map +1 -1
  9. package/lib/slot-fill/base/context.js +3 -30
  10. package/lib/slot-fill/base/context.js.map +1 -1
  11. package/lib/slot-fill/base/fill.js +10 -35
  12. package/lib/slot-fill/base/fill.js.map +1 -1
  13. package/lib/slot-fill/base/provider.js +7 -32
  14. package/lib/slot-fill/base/provider.js.map +1 -1
  15. package/lib/slot-fill/base/slot.js +11 -36
  16. package/lib/slot-fill/base/slot.js.map +1 -1
  17. package/lib/slot-fill/base/use-slot.js +6 -13
  18. package/lib/slot-fill/base/use-slot.js.map +1 -1
  19. package/lib/slot-fill/bubbles-virtually/fill.js +11 -17
  20. package/lib/slot-fill/bubbles-virtually/fill.js.map +1 -1
  21. package/lib/slot-fill/bubbles-virtually/slot-fill-context.js +8 -13
  22. package/lib/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  23. package/lib/slot-fill/bubbles-virtually/slot-fill-provider.js +19 -48
  24. package/lib/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  25. package/lib/slot-fill/bubbles-virtually/slot.js +9 -37
  26. package/lib/slot-fill/bubbles-virtually/slot.js.map +1 -1
  27. package/lib/slot-fill/bubbles-virtually/use-slot-fills.js +6 -12
  28. package/lib/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
  29. package/lib/slot-fill/bubbles-virtually/use-slot.js +10 -16
  30. package/lib/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  31. package/lib/slot-fill/index.js +24 -57
  32. package/lib/slot-fill/index.js.map +1 -1
  33. package/lib/slot-fill/index.native.js +10 -42
  34. package/lib/slot-fill/index.native.js.map +1 -1
  35. package/lib/slot-fill/interfaces/index.js +1 -2
  36. package/lib/slot-fill/utils/index.js +3 -19
  37. package/lib/slot-fill/utils/index.js.map +1 -1
  38. package/lib/slot-fill/utils/isEmptyElement.js +1 -5
  39. package/lib/slot-fill/utils/isEmptyElement.js.map +1 -1
  40. package/lib/slot-fill/utils/removeUniversalPortals.js +1 -5
  41. package/lib/slot-fill/utils/removeUniversalPortals.js.map +1 -1
  42. package/lib/slot-fill/utils/replaceServerFills.js +2 -29
  43. package/lib/slot-fill/utils/replaceServerFills.js.map +1 -1
  44. package/package.json +3 -2
@@ -1,27 +1,3 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
1
  var __rest = (this && this.__rest) || function (s, e) {
26
2
  var t = {};
27
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -33,49 +9,39 @@ var __rest = (this && this.__rest) || function (s, e) {
33
9
  }
34
10
  return t;
35
11
  };
36
- var __importDefault = (this && this.__importDefault) || function (mod) {
37
- return (mod && mod.__esModule) ? mod : { "default": mod };
38
- };
39
- Object.defineProperty(exports, "__esModule", { value: true });
40
- exports.useSlot = exports.SlotFillProvider = exports.createSlotFill = exports.Provider = exports.Slot = exports.Fill = exports.useSlotFills = void 0;
41
- const react_1 = __importStar(require("react"));
42
- const fill_1 = __importDefault(require("./base/fill"));
43
- const slot_1 = __importDefault(require("./base/slot"));
44
- const fill_2 = __importDefault(require("./bubbles-virtually/fill"));
45
- const slot_2 = __importDefault(require("./bubbles-virtually/slot"));
46
- const slot_fill_provider_1 = __importDefault(require("./bubbles-virtually/slot-fill-provider"));
47
- const provider_1 = __importDefault(require("./base/provider"));
48
- exports.SlotFillProvider = provider_1.default;
49
- const use_slot_1 = __importDefault(require("./bubbles-virtually/use-slot"));
50
- exports.useSlot = use_slot_1.default;
51
- var use_slot_fills_1 = require("./bubbles-virtually/use-slot-fills");
52
- Object.defineProperty(exports, "useSlotFills", { enumerable: true, get: function () { return __importDefault(use_slot_fills_1).default; } });
53
- function Fill(props) {
12
+ import React, { forwardRef } from 'react';
13
+ import BaseFill from './base/fill';
14
+ import BaseSlot from './base/slot';
15
+ import BubblesVirtuallyFill from './bubbles-virtually/fill';
16
+ import BubblesVirtuallySlot from './bubbles-virtually/slot';
17
+ import BubblesVirtuallySlotFillProvider from './bubbles-virtually/slot-fill-provider';
18
+ import SlotFillProvider from './base/provider';
19
+ import useSlot from './bubbles-virtually/use-slot';
20
+ export { default as useSlotFills } from './bubbles-virtually/use-slot-fills';
21
+ export function Fill(props) {
54
22
  // We're adding both Fills here so they can register themselves before
55
23
  // their respective slot has been registered. Only the Fill that has a slot
56
24
  // will render. The other one will return null.
57
- return (react_1.default.createElement(react_1.default.Fragment, null,
58
- react_1.default.createElement(fill_1.default, Object.assign({}, props)),
59
- react_1.default.createElement(fill_2.default, Object.assign({}, props))));
25
+ return (React.createElement(React.Fragment, null,
26
+ React.createElement(BaseFill, Object.assign({}, props)),
27
+ React.createElement(BubblesVirtuallyFill, Object.assign({}, props))));
60
28
  }
61
- exports.Fill = Fill;
62
- exports.Slot = (0, react_1.forwardRef)((_a, ref) => {
29
+ export const Slot = forwardRef((_a, ref) => {
63
30
  var { bubblesVirtually } = _a, props = __rest(_a, ["bubblesVirtually"]);
64
31
  if (bubblesVirtually) {
65
- return react_1.default.createElement(slot_2.default, Object.assign({}, props, { ref: ref }));
32
+ return React.createElement(BubblesVirtuallySlot, Object.assign({}, props, { ref: ref }));
66
33
  }
67
- return react_1.default.createElement(slot_1.default, Object.assign({}, props));
34
+ return React.createElement(BaseSlot, Object.assign({}, props));
68
35
  });
69
- function Provider(_a) {
36
+ export function Provider(_a) {
70
37
  var { children } = _a, props = __rest(_a, ["children"]);
71
- return (react_1.default.createElement(provider_1.default, Object.assign({}, props),
72
- react_1.default.createElement(slot_fill_provider_1.default, null, children)));
38
+ return (React.createElement(SlotFillProvider, Object.assign({}, props),
39
+ React.createElement(BubblesVirtuallySlotFillProvider, null, children)));
73
40
  }
74
- exports.Provider = Provider;
75
- function createSlotFill(name) {
76
- const FillComponent = (props) => react_1.default.createElement(Fill, Object.assign({ name: name }, props));
41
+ export function createSlotFill(name) {
42
+ const FillComponent = (props) => React.createElement(Fill, Object.assign({ name: name }, props));
77
43
  FillComponent.displayName = name + 'Fill';
78
- const SlotComponent = (props) => react_1.default.createElement(exports.Slot, Object.assign({ name: name }, props));
44
+ const SlotComponent = (props) => React.createElement(Slot, Object.assign({ name: name }, props));
79
45
  SlotComponent.displayName = name + 'Slot';
80
46
  SlotComponent.__unstableName = name;
81
47
  return {
@@ -83,5 +49,6 @@ function createSlotFill(name) {
83
49
  Slot: SlotComponent,
84
50
  };
85
51
  }
86
- exports.createSlotFill = createSlotFill;
52
+ export { SlotFillProvider };
53
+ export { useSlot };
87
54
  //# sour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AwB,EAAnB,KAAK,cAA5B,oBAA8B,CAAF;IAC1D,IAAI,gBAAgB,EAAE;QACpB,OAAO,oBAAC,oBAAoB,oBAAK,KAAK,IAAE,GAAG,EAAE,GAAG,IAAI,CAAC;KACtD;IACD,OAAO,oBAAC,QAAQ,oBAAK,KAAK,EAAI,CAAC;AACjC,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,QAAQ,CAAC,EAAsB;QAAtB,EAAE,QAAQ,OAAY,EAAP,KAAK,cAApB,YAAsB,CAAF;IAC3C,OAAO,CACL,oBAAC,gBAAgB,oBAAK,KAAK;QACzB,oBAAC,gCAAgC,QAC9B,QAAQ,CACwB,CAClB,CACpB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc,CAAkC,IAAY;IAC1E,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE,CAAC,oBAAC,IAAI,kBAAC,IAAI,EAAE,IAAI,IAAM,KAAK,EAAI,CAAC;IACrF,aAAa,CAAC,WAAW,GAAG,IAAI,GAAG,MAAM,CAAC;IAE1C,MAAM,aAAa,GAAG,CAAC,KAAuB,EAAE,EAAE,CAAC,oBAAC,IAAI,kBAAC,IAAI,EAAE,IAAI,IAAM,KAAK,EAAI,CAAC;IACnF,aAAa,CAAC,WAAW,GAAG,IAAI,GAAG,MAAM,CAAC;IAC1C,aAAa,CAAC,cAAc,GAAG,IAAI,CAAC;IAEpC,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,aAAa;KACpB,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -1,45 +1,14 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.createSlotFill = exports.Slot = exports.Provider = exports.Fill = void 0;
30
- const React = __importStar(require("react"));
31
- const lodash_1 = require("lodash");
32
- const slot_1 = __importDefault(require("./base/slot"));
33
- const fill_1 = __importDefault(require("./base/fill"));
34
- exports.Fill = fill_1.default;
35
- const provider_1 = __importDefault(require("./base/provider"));
36
- exports.Provider = provider_1.default;
37
- function Slot(props) {
38
- return React.createElement(slot_1.default, Object.assign({}, (0, lodash_1.omit)(props, 'bubblesVirtually')));
1
+ import * as React from 'react';
2
+ import { omit } from 'lodash';
3
+ import BaseSlot from './base/slot';
4
+ import Fill from './base/fill';
5
+ import Provider from './base/provider';
6
+ export { Fill, Provider };
7
+ export function Slot(props) {
8
+ return React.createElement(BaseSlot, Object.assign({}, omit(props, 'bubblesVirtually')));
39
9
  }
40
- exports.Slot = Slot;
41
- function createSlotFill(name) {
42
- const FillComponent = (props) => React.createElement(fill_1.default, Object.assign({ name: name }, props));
10
+ export function createSlotFill(name) {
11
+ const FillComponent = (props) => React.createElement(Fill, Object.assign({ name: name }, props));
43
12
  FillComponent.displayName = name + 'Fill';
44
13
  const SlotComponent = (props) => React.createElement(Slot, Object.assign({ name: name }, props));
45
14
  SlotComponent.displayName = name + 'Slot';
@@ -48,5 +17,4 @@ function createSlotFill(name) {
48
17
  Slot: SlotComponent,
49
18
  };
50
19
  }
51
- exports.createSlotFill = createSlotFill;
52
20
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../src/slot-fill/index.native.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,mCAA8B;AAC9B,uDAAmC;AACnC,uDAA+B;AAItB,eAJF,cAAI,CAIE;AAHb,+DAAuC;AAGxB,mBAHR,kBAAQ,CAGQ;AAEvB,SAAgB,IAAI,CAAC,KAAiB;IAClC,OAAO,oBAAC,cAAQ,oBAAM,IAAA,aAAI,EAAC,KAAK,EAAE,kBAAkB,CAAC,EAAI,CAAC;AAC9D,CAAC;AAFD,oBAEC;AAED,SAAgB,cAAc,CAAC,IAAI;IAC/B,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAC,cAAI,kBAAC,IAAI,EAAE,IAAI,IAAM,KAAK,EAAI,CAAC;IACjE,aAAa,CAAC,WAAW,GAAG,IAAI,GAAG,MAAM,CAAC;IAE1C,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAC,IAAI,kBAAC,IAAI,EAAE,IAAI,IAAM,KAAK,EAAI,CAAC;IACjE,aAAa,CAAC,WAAW,GAAG,IAAI,GAAG,MAAM,CAAC;IAE1C,OAAO;QACH,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,aAAa;KACtB,CAAA;AACL,CAAC;AAXD,wCAWC"}
1
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../src/slot-fill/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAGvC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAE1B,MAAM,UAAU,IAAI,CAAC,KAAiB;IAClC,OAAO,oBAAC,QAAQ,oBAAM,IAAI,CAAC,KAAK,EAAE,kBAAkB,CAAC,EAAI,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAI;IAC/B,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAC,IAAI,kBAAC,IAAI,EAAE,IAAI,IAAM,KAAK,EAAI,CAAC;IACjE,aAAa,CAAC,WAAW,GAAG,IAAI,GAAG,MAAM,CAAC;IAE1C,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAC,IAAI,kBAAC,IAAI,EAAE,IAAI,IAAM,KAAK,EAAI,CAAC;IACjE,aAAa,CAAC,WAAW,GAAG,IAAI,GAAG,MAAM,CAAC;IAE1C,OAAO;QACH,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,aAAa;KACtB,CAAA;AACL,CAAC"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=index.js.map
@@ -1,20 +1,4 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./isEmptyElement"), exports);
18
- __exportStar(require("./removeUniversalPortals"), exports);
19
- __exportStar(require("./replaceServerFills"), exports);
1
+ export * from './isEmptyElement';
2
+ export * from './removeUniversalPortals';
3
+ export * from './replaceServerFills';
20
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slot-fill/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,2DAAyC;AACzC,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slot-fill/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC"}
@@ -1,13 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isEmptyElement = void 0;
4
1
  /**
5
2
  * Checks if the provided element to check.
6
3
  *
7
4
  * @param element React Component to check.
8
5
  * @returns True when an element is considered empty.
9
6
  */
10
- const isEmptyElement = (element) => {
7
+ export const isEmptyElement = (element) => {
11
8
  if (typeof element === 'number') {
12
9
  return false;
13
10
  }
@@ -16,5 +13,4 @@ const isEmptyElement = (element) => {
16
13
  }
17
14
  return !element;
18
15
  };
19
- exports.isEmptyElement = isEmptyElement;
20
16
  //# sourceMappingURL=isEmptyElement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isEmptyElement.js","sourceRoot":"","sources":["../../../src/slot-fill/utils/isEmptyElement.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AAEI,MAAM,cAAc,GAAG,CAAE,OAAO,EAAG,EAAE;IAC3C,IAAK,OAAO,OAAO,KAAK,QAAQ,EAAG;QAClC,OAAO,KAAK,CAAC;KACb;IAED,IAAK,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE,CAAA,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAE,OAAO,CAAE,EAAG;QACzE,OAAO,CAAE,OAAO,CAAC,MAAM,CAAC;KACxB;IAED,OAAO,CAAE,OAAO,CAAC;AAClB,CAAC,CAAC;AAVW,QAAA,cAAc,kBAUzB"}
1
+ {"version":3,"file":"isEmptyElement.js","sourceRoot":"","sources":["../../../src/slot-fill/utils/isEmptyElement.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAE,OAAO,EAAG,EAAE;IAC3C,IAAK,OAAO,OAAO,KAAK,QAAQ,EAAG;QAClC,OAAO,KAAK,CAAC;KACb;IAED,IAAK,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE,CAAA,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAE,OAAO,CAAE,EAAG;QACzE,OAAO,CAAE,OAAO,CAAC,MAAM,CAAC;KACxB;IAED,OAAO,CAAE,OAAO,CAAC;AAClB,CAAC,CAAC"}
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.removeUniversalPortals = void 0;
4
1
  /*
5
2
  * Removes all universal portals from the DOM.
6
3
  */
7
- const removeUniversalPortals = (fills) => {
4
+ export const removeUniversalPortals = (fills) => {
8
5
  if (typeof document !== 'undefined') {
9
6
  fills.forEach((name) => {
10
7
  document.querySelectorAll(`[data-slot-name=slot-${name}]`).forEach((node) => {
@@ -13,5 +10,4 @@ const removeUniversalPortals = (fills) => {
13
10
  });
14
11
  }
15
12
  };
16
- exports.removeUniversalPortals = removeUniversalPortals;
17
13
  //# sourceMappingURL=removeUniversalPortals.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"removeUniversalPortals.js","sourceRoot":"","sources":["../../../src/slot-fill/utils/removeUniversalPortals.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACI,MAAM,sBAAsB,GAAG,CAAC,KAAe,EAAE,EAAE;IACzD,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,QAAQ,CAAC,gBAAgB,CAAC,wBAAwB,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC1E,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;KACL;AACF,CAAC,CAAA;AARY,QAAA,sBAAsB,0BAQlC"}
1
+ {"version":3,"file":"removeUniversalPortals.js","sourceRoot":"","sources":["../../../src/slot-fill/utils/removeUniversalPortals.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAe,EAAE,EAAE;IACzD,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,QAAQ,CAAC,gBAAgB,CAAC,wBAAwB,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC1E,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;KACL;AACF,CAAC,CAAA"}
@@ -1,30 +1,4 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.replaceServerFills = void 0;
27
- const cheerio = __importStar(require("cheerio"));
1
+ import * as cheerio from "cheerio";
28
2
  /**
29
3
  * Replace the wrapped dom element with `[data-slot-name]` to its children,
30
4
  * setting attrib [data-slot-name] same as parent.
@@ -33,7 +7,7 @@ const cheerio = __importStar(require("cheerio"));
33
7
  * @param fills fill names.
34
8
  * @returns The replaced html content string.
35
9
  */
36
- const replaceServerFills = (htmlContent, fills) => {
10
+ export const replaceServerFills = (htmlContent, fills) => {
37
11
  const $ = cheerio.load(htmlContent);
38
12
  let newContent = htmlContent;
39
13
  fills.forEach((name) => {
@@ -48,5 +22,4 @@ const replaceServerFills = (htmlContent, fills) => {
48
22
  });
49
23
  return newContent;
50
24
  };
51
- exports.replaceServerFills = replaceServerFills;
52
25
  //# sourceMappingURL=replaceServerFills.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"replaceServerFills.js","sourceRoot":"","sources":["../../../src/slot-fill/utils/replaceServerFills.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AACnC;;;;;;;GAOG;AACI,MAAM,kBAAkB,GAAG,CAAC,WAAmB,EAAE,KAAe,EAAE,EAAE;IACzE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACpC,IAAI,UAAU,GAAG,WAAW,CAAC;IAE7B,KAAK,CAAC,OAAO,CAAC,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CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;gBAC7B,KAAyB,CAAC,OAAO,CAAC,gBAAgB,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC;YACxE,CAAC,CAAC,CAAC;YACH,MAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;YACrC,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common-stack/components-pro",
3
- "version": "3.0.1-alpha.0",
3
+ "version": "3.0.2-alpha.2",
4
4
  "description": "browser plugin for git",
5
5
  "homepage": "https://github.com/cdmbase/fullstack-pro#readme",
6
6
  "bugs": {
@@ -13,6 +13,7 @@
13
13
  "license": "MIT",
14
14
  "author": "CDMBase LLC",
15
15
  "main": "lib/index.js",
16
+ "module": "lib/index.js",
16
17
  "react-native": "lib/index.native.js",
17
18
  "typings": "lib/index.d.ts",
18
19
  "scripts": {
@@ -52,7 +53,7 @@
52
53
  "publishConfig": {
53
54
  "access": "public"
54
55
  },
55
- "gitHead": "2c5be38e54fcffe218106da86a39bf5c253e504d",
56
+ "gitHead": "c093e43584e807c9dc823e6d78deaaa51b739d9f",
56
57
  "typescript": {
57
58
  "definition": "lib/index.d.ts"
58
59
  }