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

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
package/lib/index.js CHANGED
@@ -1,13 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.replaceServerFills = exports.removeUniversalPortals = exports.__experimentalUseSlot = exports.SlotFillProvider = exports.Fill = exports.Slot = exports.createSlotFill = void 0;
4
- var slot_fill_1 = require("./slot-fill");
5
- Object.defineProperty(exports, "createSlotFill", { enumerable: true, get: function () { return slot_fill_1.createSlotFill; } });
6
- Object.defineProperty(exports, "Slot", { enumerable: true, get: function () { return slot_fill_1.Slot; } });
7
- Object.defineProperty(exports, "Fill", { enumerable: true, get: function () { return slot_fill_1.Fill; } });
8
- Object.defineProperty(exports, "SlotFillProvider", { enumerable: true, get: function () { return slot_fill_1.Provider; } });
9
- Object.defineProperty(exports, "__experimentalUseSlot", { enumerable: true, get: function () { return slot_fill_1.useSlot; } });
10
- var utils_1 = require("./slot-fill/utils");
11
- Object.defineProperty(exports, "removeUniversalPortals", { enumerable: true, get: function () { return utils_1.removeUniversalPortals; } });
12
- Object.defineProperty(exports, "replaceServerFills", { enumerable: true, get: function () { return utils_1.replaceServerFills; } });
1
+ export { createSlotFill, Slot, Fill, Provider as SlotFillProvider, useSlot as __experimentalUseSlot, } from './slot-fill';
2
+ export { removeUniversalPortals, replaceServerFills, } from './slot-fill/utils';
13
3
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAMqB;AALpB,2GAAA,cAAc,OAAA;AACd,iGAAA,IAAI,OAAA;AACJ,iGAAA,IAAI,OAAA;AACJ,6GAAA,QAAQ,OAAoB;AAC5B,kHAAA,OAAO,OAAyB;AAGjC,2CAG2B;AAF1B,+GAAA,sBAAsB,OAAA;AACtB,2GAAA,kBAAkB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,cAAc,EACd,IAAI,EACJ,IAAI,EACJ,QAAQ,IAAI,gBAAgB,EAC5B,OAAO,IAAI,qBAAqB,GAChC,MAAM,aAAa,CAAC;AAErB,OAAO,EACN,sBAAsB,EACtB,kBAAkB,GAClB,MAAM,mBAAmB,CAAC"}
@@ -1,9 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SlotFillProvider = exports.Fill = exports.Slot = exports.createSlotFill = void 0;
4
- var slot_fill_1 = require("./slot-fill");
5
- Object.defineProperty(exports, "createSlotFill", { enumerable: true, get: function () { return slot_fill_1.createSlotFill; } });
6
- Object.defineProperty(exports, "Slot", { enumerable: true, get: function () { return slot_fill_1.Slot; } });
7
- Object.defineProperty(exports, "Fill", { enumerable: true, get: function () { return slot_fill_1.Fill; } });
8
- Object.defineProperty(exports, "SlotFillProvider", { enumerable: true, get: function () { return slot_fill_1.Provider; } });
1
+ export { createSlotFill, Slot, Fill, Provider as SlotFillProvider, } from './slot-fill';
9
2
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":";;;AAAA,yCAKqB;AAJpB,2GAAA,cAAc,OAAA;AACd,iGAAA,IAAI,OAAA;AACJ,iGAAA,IAAI,OAAA;AACJ,6GAAA,QAAQ,OAAoB"}
1
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,cAAc,EACd,IAAI,EACJ,IAAI,EACJ,QAAQ,IAAI,gBAAgB,GAC5B,MAAM,aAAa,CAAC"}
@@ -1,35 +1,10 @@
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
1
  /* tslint:disable */
27
- const React = __importStar(require("react"));
28
- const ReactTestRenderer = __importStar(require("react-test-renderer"));
29
- const __1 = require("../");
2
+ import * as React from 'react';
3
+ import * as ReactTestRenderer from 'react-test-renderer';
4
+ import { Slot, Fill } from '../';
30
5
  // import Provider from '../context';
31
- const index_1 = require("../index");
32
- require("jest");
6
+ import { SlotFillProvider as Provider } from '../index';
7
+ import 'jest';
33
8
  describe('Slot with filter', () => {
34
9
  it("calls the functions passed as the Slot's fillProps in the Fill", () => {
35
10
  const onClose = jest.fn();
@@ -50,17 +25,17 @@ describe('Slot with filter', () => {
50
25
  render() {
51
26
  return (React.createElement("li", null,
52
27
  this.state.showing &&
53
- React.createElement(__1.Fill, { name: "modal" },
28
+ React.createElement(Fill, { name: "modal" },
54
29
  "Showing ",
55
30
  this.props.item,
56
31
  React.createElement("button", { onClick: this.handlHideModal }, "Hide")),
57
32
  this.props.item));
58
33
  }
59
34
  }
60
- const tree = ReactTestRenderer.create(React.createElement(index_1.SlotFillProvider, null,
35
+ const tree = ReactTestRenderer.create(React.createElement(Provider, null,
61
36
  React.createElement(List, { items: ["one", "two", "three"] }),
62
37
  React.createElement("div", { className: "modal" },
63
- React.createElement(__1.Slot, { name: "modal" })))).toJSON();
38
+ React.createElement(Slot, { name: "modal" })))).toJSON();
64
39
  expect(tree).toMatchSnapshot();
65
40
  });
66
41
  });
@@ -1 +1 @@
1
- {"version":3,"file":"filler-slot.test.js","sourceRoot":"","sources":["../../../src/slot-fill/__tests__/filler-slot.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oBAAoB;AACpB,6CAA+B;AAE/B,uEAAyD;AACzD,2BAA8B;AAC9B,qCAAqC;AACrC,oCAAwD;AACxD,gBAAc;AAEd,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;QACxE,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAE1B,MAAM,IAAI,GAAG,CAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YACxB,OAAO,CACH,gCACK,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,oBAAC,QAAQ,IAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,GAAI,CAAC,CACxD,CACR,CAAA;QACL,CAAC,CAAA;QAED,MAAM,QA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BAAC,QAAQ;YACL,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,GAAI;YACxC,6BAAK,SAAS,EAAC,OAAO;gBAClB,oBAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,CACnB,CACC,CACd,CAAC,MAAM,EAAE,CAAC;QAEX,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AAEL,CAAC,CAAC,CAAC"}
@@ -1,35 +1,10 @@
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
1
  /* tslint:disable */
27
- const React = __importStar(require("react"));
28
- const react_1 = require("@testing-library/react");
29
- const __1 = require("../");
30
- const react_2 = require("react");
31
- require("jest");
32
- class Filler extends react_2.Component {
2
+ import * as React from 'react';
3
+ import { render, fireEvent } from '@testing-library/react';
4
+ import { Slot, Fill, Provider } from '../';
5
+ import { Component } from 'react';
6
+ import 'jest';
7
+ class Filler extends Component {
33
8
  constructor(props) {
34
9
  super(props);
35
10
  this.state = {
@@ -39,114 +14,114 @@ class Filler extends react_2.Component {
39
14
  render() {
40
15
  return [
41
16
  React.createElement("button", { key: "1", type: "button", onClick: () => this.setState({ num: this.state.num + 1 }) }),
42
- React.createElement(__1.Fill, { name: this.props.name, key: "2" }, this.props.text || this.state.num.toString()),
17
+ React.createElement(Fill, { name: this.props.name, key: "2" }, this.props.text || this.state.num.toString()),
43
18
  ];
44
19
  }
45
20
  }
46
21
  describe('Slot', () => {
47
22
  it('should render empty Fills', () => {
48
- const { container } = (0, react_1.render)(React.createElement(__1.Provider, null,
23
+ const { container } = render(React.createElement(Provider, null,
49
24
  React.createElement("div", null,
50
- React.createElement(__1.Slot, { name: "chicken" })),
51
- React.createElement(__1.Fill, { name: "chicken" })));
25
+ React.createElement(Slot, { name: "chicken" })),
26
+ React.createElement(Fill, { name: "chicken" })));
52
27
  expect(container).toMatchSnapshot();
53
28
  });
54
29
  it('should render a string Fill', () => {
55
- const { container } = (0, react_1.render)(React.createElement(__1.Provider, null,
30
+ const { container } = render(React.createElement(Provider, null,
56
31
  React.createElement("div", null,
57
- React.createElement(__1.Slot, { name: "chicken" })),
58
- React.createElement(__1.Fill, { name: "chicken" }, "content")));
32
+ React.createElement(Slot, { name: "chicken" })),
33
+ React.createElement(Fill, { name: "chicken" }, "content")));
59
34
  expect(container).toMatchSnapshot();
60
35
  });
61
36
  it('should render a Fill containing an element', () => {
62
- const { container } = (0, react_1.render)(React.createElement(__1.Provider, null,
37
+ const { container } = render(React.createElement(Provider, null,
63
38
  React.createElement("div", null,
64
- React.createElement(__1.Slot, { name: "chicken" })),
65
- React.createElement(__1.Fill, { name: "chicken" },
39
+ React.createElement(Slot, { name: "chicken" })),
40
+ React.createElement(Fill, { name: "chicken" },
66
41
  React.createElement("span", null))));
67
42
  expect(container).toMatchSnapshot();
68
43
  });
69
44
  it('should render a Fill containing an array', () => {
70
- const { container } = (0, react_1.render)(React.createElement(__1.Provider, null,
45
+ const { container } = render(React.createElement(Provider, null,
71
46
  React.createElement("div", null,
72
- React.createElement(__1.Slot, { name: "chicken" })),
73
- React.createElement(__1.Fill, { name: "chicken" }, [React.createElement("span", { key: "1" }), React.createElement("div", { key: "2" }), 'text'])));
47
+ React.createElement(Slot, { name: "chicken" })),
48
+ React.createElement(Fill, { name: "chicken" }, [React.createElement("span", { key: "1" }), React.createElement("div", { key: "2" }), 'text'])));
74
49
  expect(container).toMatchSnapshot();
75
50
  });
76
51
  it("calls the functions passed as the Slot's fillProps in the Fill", () => {
77
52
  const onClose = jest.fn();
78
- const { getByText } = (0, react_1.render)(React.createElement(__1.Provider, null,
79
- React.createElement(__1.Slot, { name: "chicken", fillProps: { onClose } }),
80
- React.createElement(__1.Fill, { name: "chicken" }, (props) => {
53
+ const { getByText } = render(React.createElement(Provider, null,
54
+ React.createElement(Slot, { name: "chicken", fillProps: { onClose } }),
55
+ React.createElement(Fill, { name: "chicken" }, (props) => {
81
56
  return React.createElement("button", { onClick: props.onClose }, " Click me");
82
57
  })));
83
- react_1.fireEvent.click(getByText('Click me'));
58
+ fireEvent.click(getByText('Click me'));
84
59
  expect(onClose).toHaveBeenCalledTimes(1);
85
60
  });
86
61
  it('should render empty Fills without HTML wrapper when render props used', () => {
87
- const { container } = (0, react_1.render)(React.createElement(__1.Provider, null,
62
+ const { container } = render(React.createElement(Provider, null,
88
63
  React.createElement("div", null,
89
- React.createElement(__1.Slot, { name: "chicken" }, (fills) => ([...fills].length ? React.createElement("blockquote", null, fills) : null))),
90
- React.createElement(__1.Fill, { name: "chicken" })));
64
+ React.createElement(Slot, { name: "chicken" }, (fills) => ([...fills].length ? React.createElement("blockquote", null, fills) : null))),
65
+ React.createElement(Fill, { name: "chicken" })));
91
66
  expect(container).toMatchSnapshot();
92
67
  });
93
68
  it('should render a string Fill with HTML wrapper when render props used', () => {
94
- const { container } = (0, react_1.render)(React.createElement(__1.Provider, null,
69
+ const { container } = render(React.createElement(Provider, null,
95
70
  React.createElement("div", null,
96
- React.createElement(__1.Slot, { name: "chicken" }, (fills) => fills && React.createElement("blockquote", null, fills))),
97
- React.createElement(__1.Fill, { name: "chicken" }, "content")));
71
+ React.createElement(Slot, { name: "chicken" }, (fills) => fills && React.createElement("blockquote", null, fills))),
72
+ React.createElement(Fill, { name: "chicken" }, "content")));
98
73
  expect(container).toMatchSnapshot();
99
74
  });
100
75
  it('should re-render Slot when not bubbling virtually', () => {
101
- const { container, getByRole } = (0, react_1.render)(React.createElement(__1.Provider, null,
76
+ const { container, getByRole } = render(React.createElement(Provider, null,
102
77
  React.createElement("div", null,
103
- React.createElement(__1.Slot, { name: "egg" })),
78
+ React.createElement(Slot, { name: "egg" })),
104
79
  React.createElement(Filler, { name: "egg" })));
105
80
  expect(container).toMatchSnapshot();
106
- react_1.fireEvent.click(getByRole('button'));
81
+ fireEvent.click(getByRole('button'));
107
82
  expect(container).toMatchSnapshot();
108
83
  });
109
84
  it('should render in expected order when fills always mounted', () => {
110
- const { container, rerender } = (0, react_1.render)(React.createElement(__1.Provider, null,
85
+ const { container, rerender } = render(React.createElement(Provider, null,
111
86
  React.createElement("div", { key: "slot" },
112
- React.createElement(__1.Slot, { name: "egg" }))));
113
- rerender(React.createElement(__1.Provider, null,
87
+ React.createElement(Slot, { name: "egg" }))));
88
+ rerender(React.createElement(Provider, null,
114
89
  React.createElement("div", { key: "slot" },
115
- React.createElement(__1.Slot, { name: "egg" })),
90
+ React.createElement(Slot, { name: "egg" })),
116
91
  React.createElement(Filler, { name: "egg", key: "first", text: "first" }),
117
92
  React.createElement(Filler, { name: "egg", key: "second", text: "second" })));
118
- rerender(React.createElement(__1.Provider, null,
93
+ rerender(React.createElement(Provider, null,
119
94
  React.createElement("div", { key: "slot" },
120
- React.createElement(__1.Slot, { name: "egg" })),
121
- React.createElement(__1.Fill, { name: "egg", key: "first" }),
122
- React.createElement(__1.Fill, { name: "egg", key: "second" }, "second"),
123
- React.createElement(__1.Fill, { name: "egg", key: "third" }, "third")));
124
- rerender(React.createElement(__1.Provider, null,
95
+ React.createElement(Slot, { name: "egg" })),
96
+ React.createElement(Fill, { name: "egg", key: "first" }),
97
+ React.createElement(Fill, { name: "egg", key: "second" }, "second"),
98
+ React.createElement(Fill, { name: "egg", key: "third" }, "third")));
99
+ rerender(React.createElement(Provider, null,
125
100
  React.createElement("div", { key: "slot" },
126
- React.createElement(__1.Slot, { name: "egg" })),
127
- React.createElement(__1.Fill, { name: "egg", key: "first" }, "first (rerendered)"),
128
- React.createElement(__1.Fill, { name: "egg", key: "second" }, "second"),
129
- React.createElement(__1.Fill, { name: "egg", key: "third" }, "third"),
130
- React.createElement(__1.Fill, { name: "egg", key: "fourth" }, "fourth (new)")));
101
+ React.createElement(Slot, { name: "egg" })),
102
+ React.createElement(Fill, { name: "egg", key: "first" }, "first (rerendered)"),
103
+ React.createElement(Fill, { name: "egg", key: "second" }, "second"),
104
+ React.createElement(Fill, { name: "egg", key: "third" }, "third"),
105
+ React.createElement(Fill, { name: "egg", key: "fourth" }, "fourth (new)")));
131
106
  expect(container).toMatchSnapshot();
132
107
  });
133
108
  it('should render in expected order when fills unmounted', () => {
134
- const { container, rerender } = (0, react_1.render)(React.createElement(__1.Provider, null,
109
+ const { container, rerender } = render(React.createElement(Provider, null,
135
110
  React.createElement("div", { key: "slot" },
136
- React.createElement(__1.Slot, { name: "egg" }))));
137
- rerender(React.createElement(__1.Provider, null,
111
+ React.createElement(Slot, { name: "egg" }))));
112
+ rerender(React.createElement(Provider, null,
138
113
  React.createElement("div", { key: "slot" },
139
- React.createElement(__1.Slot, { name: "egg" })),
114
+ React.createElement(Slot, { name: "egg" })),
140
115
  React.createElement(Filler, { name: "egg", key: "first", text: "first" }),
141
116
  React.createElement(Filler, { name: "egg", key: "second", text: "second" })));
142
- rerender(React.createElement(__1.Provider, null,
117
+ rerender(React.createElement(Provider, null,
143
118
  React.createElement("div", { key: "slot" },
144
- React.createElement(__1.Slot, { name: "egg" })),
119
+ React.createElement(Slot, { name: "egg" })),
145
120
  React.createElement(Filler, { name: "egg", key: "second", text: "second" }),
146
121
  React.createElement(Filler, { name: "egg", key: "third", text: "third" })));
147
- rerender(React.createElement(__1.Provider, null,
122
+ rerender(React.createElement(Provider, null,
148
123
  React.createElement("div", { key: "slot" },
149
- React.createElement(__1.Slot, { name: "egg" })),
124
+ React.createElement(Slot, { name: "egg" })),
150
125
  React.createElement(Filler, { name: "egg", key: "first", text: "first (rerendered)" }),
151
126
  React.createElement(Filler, { name: "egg", key: "second", text: "second" }),
152
127
  React.createElement(Filler, { name: "egg", key: "third", text: "third" }),
@@ -154,50 +129,50 @@ describe('Slot', () => {
154
129
  expect(container).toMatchSnapshot();
155
130
  });
156
131
  it('should warn without a Provider', () => {
157
- const { container } = (0, react_1.render)(React.createElement(React.Fragment, null,
132
+ const { container } = render(React.createElement(React.Fragment, null,
158
133
  React.createElement("div", null,
159
- React.createElement(__1.Slot, { name: "chicken", bubblesVirtually: true })),
160
- React.createElement(__1.Fill, { name: "chicken" })));
134
+ React.createElement(Slot, { name: "chicken", bubblesVirtually: true })),
135
+ React.createElement(Fill, { name: "chicken" })));
161
136
  expect(container).toMatchSnapshot();
162
137
  // expect(console).toHaveWarned();
163
138
  });
164
139
  describe.each([false, true])('bubblesVirtually %p', (bubblesVirtually) => {
165
140
  it('should subsume another slot by the same name', () => {
166
- const { container, rerender } = (0, react_1.render)(React.createElement(__1.Provider, null,
141
+ const { container, rerender } = render(React.createElement(Provider, null,
167
142
  React.createElement("div", { "data-position": "first" },
168
- React.createElement(__1.Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
143
+ React.createElement(Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
169
144
  React.createElement("div", { "data-position": "second" }),
170
- React.createElement(__1.Fill, { name: "egg" }, "Content")));
171
- rerender(React.createElement(__1.Provider, null,
145
+ React.createElement(Fill, { name: "egg" }, "Content")));
146
+ rerender(React.createElement(Provider, null,
172
147
  React.createElement("div", { "data-position": "first" },
173
- React.createElement(__1.Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
148
+ React.createElement(Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
174
149
  React.createElement("div", { "data-position": "second" },
175
- React.createElement(__1.Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
176
- React.createElement(__1.Fill, { name: "egg" }, "Content")));
150
+ React.createElement(Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
151
+ React.createElement(Fill, { name: "egg" }, "Content")));
177
152
  expect(container).toMatchSnapshot();
178
- rerender(React.createElement(__1.Provider, null,
153
+ rerender(React.createElement(Provider, null,
179
154
  React.createElement("div", { "data-position": "first" }),
180
155
  React.createElement("div", { "data-position": "second" },
181
- React.createElement(__1.Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
182
- React.createElement(__1.Fill, { name: "egg" }, "Content")));
156
+ React.createElement(Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
157
+ React.createElement(Fill, { name: "egg" }, "Content")));
183
158
  expect(container).toMatchSnapshot();
184
159
  });
185
160
  it('should unmount two slots with the same name', () => {
186
- const { rerender, container } = (0, react_1.render)(React.createElement(__1.Provider, null,
161
+ const { rerender, container } = render(React.createElement(Provider, null,
187
162
  React.createElement("div", { "data-position": "first" },
188
- React.createElement(__1.Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
163
+ React.createElement(Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
189
164
  React.createElement("div", { "data-position": "second" },
190
- React.createElement(__1.Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
191
- React.createElement(__1.Fill, { name: "egg" }, "Content")));
192
- rerender(React.createElement(__1.Provider, null,
165
+ React.createElement(Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
166
+ React.createElement(Fill, { name: "egg" }, "Content")));
167
+ rerender(React.createElement(Provider, null,
193
168
  React.createElement("div", { "data-position": "first" },
194
- React.createElement(__1.Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
169
+ React.createElement(Slot, { name: "egg", bubblesVirtually: bubblesVirtually })),
195
170
  React.createElement("div", { "data-position": "second" }),
196
- React.createElement(__1.Fill, { name: "egg" }, "Content")));
197
- rerender(React.createElement(__1.Provider, null,
171
+ React.createElement(Fill, { name: "egg" }, "Content")));
172
+ rerender(React.createElement(Provider, null,
198
173
  React.createElement("div", { "data-position": "first" }),
199
174
  React.createElement("div", { "data-position": "second" }),
200
- React.createElement(__1.Fill, { name: "egg" }, "Content")));
175
+ React.createElement(Fill, { name: "egg" }, "Content")));
201
176
  expect(container).toMatchSnapshot();
202
177
  });
203
178
  });
@@ -206,23 +181,23 @@ describe('Slot', () => {
206
181
  describe('Slot with logic', () => {
207
182
  it('should render a string Fill with HTML wrapper when render props used', () => {
208
183
  const Fill1 = (props) => {
209
- return (React.createElement(__1.Fill, { name: "chicken", fillId: "id1" }, (props) => {
184
+ return (React.createElement(Fill, { name: "chicken", fillId: "id1" }, (props) => {
210
185
  return 'content';
211
186
  }));
212
187
  };
213
188
  const Fill2 = (props) => {
214
- return (React.createElement(__1.Fill, { name: "chicken", fillId: "id2" }, (props) => {
189
+ return (React.createElement(Fill, { name: "chicken", fillId: "id2" }, (props) => {
215
190
  console.log('--filler--props', props);
216
191
  return 'content1';
217
192
  }));
218
193
  };
219
194
  const Slot1 = (props) => {
220
- return (React.createElement(__1.Slot, { name: "chicken", fillProps: { selected: 'one' } }, (fills) => {
195
+ return (React.createElement(Slot, { name: "chicken", fillProps: { selected: 'one' } }, (fills) => {
221
196
  console.log('---files', fills);
222
197
  return fills && React.createElement("blockquote", null, "Test");
223
198
  }));
224
199
  };
225
- const { container } = (0, react_1.render)(React.createElement(__1.Provider, null,
200
+ const { container } = render(React.createElement(Provider, null,
226
201
  React.createElement("div", null,
227
202
  React.createElement(Slot1, null)),
228
203
  React.createElement(Fill1, null),
@@ -1 +1 @@
1
- {"version":3,"file":"slot-features.test.js","sourceRoot":"","sources":["../../../src/slot-fill/__tests__/slot-features.test.tsx"],"names":[],"mappings":";;;;;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AAK,CAAC,CAAC;gBACtC,OAAO,UAAU,CAAC;YACtB,CAAC,CACE,CACV,CAAC;QACN,CAAC,CAAC;QAEF,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,EAAE;YACpB,OAAO,CACH,oBAAC,QAAI,IAAC,IAAI,EAAC,SAAS,EAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,IAC9C,CAAC,KAAK,EAAE,EAAE;gBACP,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;gBAC/B,OAAO,KAAK,IAAI,+CAA6B,CAAC;YAClD,CAAC,CACE,CACV,CAAC;QACN,CAAC,CAAC;QACF,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,cAAM,EACxB,oBAAC,YAAQ;YACL;gBACI,oBAAC,KAAK,OAAG,CACP;YACN,oBAAC,KAAK,OAAG;YACT,oBAAC,KAAK,OAAG,CACF,CACd,CAAC;QACF,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"slot-features.test.js","sourceRoot":"","sources":["../../../src/slot-fill/__tests__/slot-features.test.tsx"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,MAAM,CAAC;AAEd,MAAM,MAAO,SAAQ,SAAmB;IACpC,YAAY,KAAK;QACb,KAAK,CAAC,KAAK,CAAC,CAAC;QAEb,IAAI,CAAC,KAAK,GAAG;YACT,GAAG,EAAE,CAAC;SACT,CAAC;IACN,CAAC;IACM,MAAM;QACT,OAAO;YACH,gCA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E,CACV,CAAC;QACN,CAAC,CAAC;QACF,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CACxB,oBAAC,QAAQ;YACL;gBACI,oBAAC,KAAK,OAAG,CACP;YACN,oBAAC,KAAK,OAAG;YACT,oBAAC,KAAK,OAAG,CACF,CACd,CAAC;QACF,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -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.Provider = exports.Consumer = void 0;
27
- const React = __importStar(require("react"));
1
+ import * as React from 'react';
28
2
  const SlotFillContext = React.createContext({
29
3
  registerSlot: () => { },
30
4
  unregisterSlot: () => { },
@@ -36,7 +10,6 @@ const SlotFillContext = React.createContext({
36
10
  subscribe: () => { },
37
11
  });
38
12
  const { Provider, Consumer } = SlotFillContext;
39
- exports.Provider = Provider;
40
- exports.Consumer = Consumer;
41
- exports.default = SlotFillContext;
13
+ export { Consumer, Provider };
14
+ export default SlotFillContext;
42
15
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/slot-fill/base/context.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAG/B,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CAAkB;IAC3D,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;IACtB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;IACtB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAQ;IAC1B,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;IACpB,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;IACrB,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;CACpB,CAAC,CAAC;AACH,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,eAAe,CAAC;AAC5B,4BAAQ;AAAlB,4BAAQ;AACjB,kBAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/slot-fill/base/context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CAAkB;IAC3D,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;IACtB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;IACtB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAQ;IAC1B,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;IACpB,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;IACrB,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;CACpB,CAAC,CAAC;AACH,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,eAAe,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AAC9B,eAAe,eAAe,CAAC"}
@@ -1,34 +1,9 @@
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
- const react_1 = __importStar(require("react"));
27
- const react_dom_1 = require("react-dom");
28
- const context_1 = require("./context");
29
- const use_slot_1 = require("./use-slot");
1
+ import React, { useRef } from 'react';
2
+ import { createPortal } from 'react-dom';
3
+ import { Consumer } from './context';
4
+ import { useSlot } from './use-slot';
30
5
  const FillComponent = ({ name, children, registerFill, unregisterFill, serverMode }) => {
31
- const slot = (0, use_slot_1.useSlot)(name);
6
+ const slot = useSlot(name);
32
7
  let useLayoutEffect;
33
8
  if (serverMode) {
34
9
  useLayoutEffect = (args) => { };
@@ -38,9 +13,9 @@ const FillComponent = ({ name, children, registerFill, unregisterFill, serverMod
38
13
  return null;
39
14
  }
40
15
  else {
41
- useLayoutEffect = react_1.default.useLayoutEffect;
16
+ useLayoutEffect = React.useLayoutEffect;
42
17
  }
43
- const ref = (0, react_1.useRef)({
18
+ const ref = useRef({
44
19
  name,
45
20
  children,
46
21
  });
@@ -80,11 +55,11 @@ const FillComponent = ({ name, children, registerFill, unregisterFill, serverMod
80
55
  if (typeof children === 'function') {
81
56
  children = children(slot.props.fillProps);
82
57
  }
83
- return (0, react_dom_1.createPortal)(children, slot.node);
58
+ return createPortal(children, slot.node);
84
59
  };
85
60
  const Fill = (props) => {
86
61
  const serverMode = (typeof window === 'undefined');
87
- return (react_1.default.createElement(context_1.Consumer, null, ({ registerFill, unregisterFill }) => (react_1.default.createElement(FillComponent, Object.assign({}, props, { registerFill: registerFill, unregisterFill: unregisterFill, serverMode: serverMode })))));
62
+ return (React.createElement(Consumer, null, ({ registerFill, unregisterFill }) => (React.createElement(FillComponent, Object.assign({}, props, { registerFill: registerFill, unregisterFill: unregisterFill, serverMode: serverMode })))));
88
63
  };
89
- exports.default = Fill;
64
+ export default Fill;
90
65
  //# sourceMappingURL=fill.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fill.js","sourceRoot":"","sources":["../../../src/slot-fill/base/fill.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAC1C,yCAAyC;AACzC,uCAAqC;AAErC,yCAAqC;AAKrC,MAAM,aAAa,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAyB,EAAE,EAAE;IAC1G,MAAM,IAAI,GAAG,IAAA,kBAAO,EAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,eAAe,CAAC;IAEpB,IAAI,UAAU,EAAE;QACZ,eAAe,GAAG,CAAC,IAAI,EAAE,EAAE,GAAE,CAAC,CAAC;QA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