@draftbit/core 46.8.2-5f263c.2 → 46.8.2-a9cd67.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.
@@ -7,16 +7,31 @@ exports.default = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
9
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
10
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
12
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
10
  class PortalConsumer extends React.Component {
14
- constructor() {
15
- super(...arguments);
16
- _defineProperty(this, "key", void 0);
17
- }
18
11
  async componentDidMount() {
19
12
  this.checkManager();
13
+ // Delay updating to prevent React from going to infinite loop
14
+ await Promise.resolve();
15
+ this.key = this.props.manager.mount(this.props.children);
16
+ }
17
+ componentDidUpdate() {
18
+ this.checkManager();
19
+ this.props.manager.update(this.key, this.props.children);
20
+ }
21
+ componentWillUnmount() {
22
+ this.checkManager();
23
+ this.props.manager.unmount(this.key);
24
+ }
25
+ checkManager() {
26
+ if (!this.props.manager) {
27
+ throw new Error("Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\n\n" + "Please read our getting-started guide and make sure you've followed all the required steps.\n\n" + "https://callstack.github.io/react-native-paper/getting-started.html");
28
+ }
29
+ }
30
+ render() {
31
+ return null;
32
+ }
33
+ }
34
+ exports.default = PortalConsumer;s.checkManager();
20
35
 
21
36
  // Delay updating to prevent React from going to infinite loop
22
37
  await Promise.resolve();
@@ -20,7 +20,7 @@ const SEED_DATA = {
20
20
  required: true,
21
21
  formType: _types.FORM_TYPES.string,
22
22
  propType: _types.PROP_TYPES.STRING,
23
- defaultValue: "## Double click me to edit 👀"
23
+ defaultValue: "### Markdown"
24
24
  }
25
25
  }
26
26
  };
@@ -1,27 +1,24 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
1
  import React from "react";
5
2
  import { View } from "react-native";
6
3
  import { Svg, Path, G } from "react-native-svg";
7
4
  class CircularProgress extends React.Component {
8
5
  constructor() {
9
6
  super(...arguments);
10
- _defineProperty(this, "polarToCartesian", (centerX, centerY, radius, angleInDegrees) => {
7
+ this.polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
11
8
  var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
12
9
  return {
13
10
  x: centerX + radius * Math.cos(angleInRadians),
14
11
  y: centerY + radius * Math.sin(angleInRadians)
15
12
  };
16
- });
17
- _defineProperty(this, "circlePath", (x, y, radius, startAngle, endAngle) => {
13
+ };
14
+ this.circlePath = (x, y, radius, startAngle, endAngle) => {
18
15
  var start = this.polarToCartesian(x, y, radius, endAngle * 0.9999);
19
16
  var end = this.polarToCartesian(x, y, radius, startAngle);
20
17
  var largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
21
18
  var d = ["M", start.x, start.y, "A", radius, radius, 0, largeArcFlag, 0, end.x, end.y];
22
19
  return d.join(" ");
23
- });
24
- _defineProperty(this, "clampFill", fill => Math.min(100, Math.max(0, fill)));
20
+ };
21
+ this.clampFill = fill => Math.min(100, Math.max(0, fill));
25
22
  }
26
23
  render() {
27
24
  const {
@@ -101,4 +98,27 @@ class CircularProgress extends React.Component {
101
98
  }, children(fill)));
102
99
  }
103
100
  }
101
+ export default CircularProgress;eElement(G, {
102
+ rotation: rotation,
103
+ originX: (size + padding) / 2,
104
+ originY: (size + padding) / 2
105
+ }, backgroundColor && /*#__PURE__*/React.createElement(Path, {
106
+ d: backgroundPath,
107
+ stroke: backgroundColor,
108
+ strokeWidth: backgroundWidth || width,
109
+ strokeLinecap: lineCap,
110
+ strokeDasharray: strokeDasharrayBackground,
111
+ fill: "transparent"
112
+ }), fill > 0 && /*#__PURE__*/React.createElement(Path, {
113
+ d: circlePathItem,
114
+ stroke: tintColor,
115
+ strokeWidth: width,
116
+ strokeLinecap: lineCap,
117
+ strokeDasharray: strokeDasharrayTint,
118
+ fill: "transparent"
119
+ }), cap)), children && /*#__PURE__*/React.createElement(View, {
120
+ style: localChildrenContainerStyle
121
+ }, children(fill)));
122
+ }
123
+ }
104
124
  export default CircularProgress;
@@ -14,7 +14,7 @@ export const SEED_DATA = {
14
14
  required: true,
15
15
  formType: FORM_TYPES.string,
16
16
  propType: PROP_TYPES.STRING,
17
- defaultValue: "## Double click me to edit 👀"
17
+ defaultValue: "### Markdown"
18
18
  }
19
19
  }
20
20
  };
@@ -7,7 +7,6 @@ export default function overlay(elevation) {
7
7
  let surfaceColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DarkTheme.colors.surface;
8
8
  if (isAnimatedValue(elevation)) {
9
9
  const inputRange = [0, 1, 2, 3, 8, 24];
10
-
11
10
  // @ts-expect-error: TS doesn't seem to refine the type correctly
12
11
  return elevation.interpolate({
13
12
  inputRange,
@@ -16,7 +15,6 @@ export default function overlay(elevation) {
16
15
  })
17
16
  });
18
17
  }
19
-
20
18
  // @ts-expect-error: TS doesn't seem to refine the type correctly
21
19
  return calculateColor(surfaceColor, elevation);
22
20
  }
@@ -57,4 +55,4 @@ const elevationOverlayTransparency = {
57
55
  22: 15.72,
58
56
  23: 15.84,
59
57
  24: 16
60
- };
58
+ };};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.8.2-5f263c.2+5f263ca",
3
+ "version": "46.8.2-a9cd67.2+a9cd67d",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^46.8.2-5f263c.2+5f263ca",
44
+ "@draftbit/types": "^46.8.2-a9cd67.2+a9cd67d",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.3",
@@ -93,5 +93,5 @@
93
93
  ]
94
94
  ]
95
95
  },
96
- "gitHead": "5f263ca7d9e8409d5fddfecc62993eea1c0d082f"
96
+ "gitHead": "a9cd67da0780ab09858ea7b196badc1c4990f90c"
97
97
  }
@@ -19,7 +19,7 @@ export const SEED_DATA = {
19
19
  required: true,
20
20
  formType: FORM_TYPES.string,
21
21
  propType: PROP_TYPES.STRING,
22
- defaultValue: "## Double click me to edit 👀",
22
+ defaultValue: "### Markdown",
23
23
  },
24
24
  },
25
25
  };
@@ -26,7 +26,7 @@ export const SEED_DATA = {
26
26
  required: true,
27
27
  formType: FORM_TYPES.string,
28
28
  propType: PROP_TYPES.STRING,
29
- defaultValue: "## Double click me to edit 👀",
29
+ defaultValue: "### Markdown",
30
30
  },
31
31
  },
32
32
  };