pollination-react-io 0.0.38 → 0.0.40
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/build/AuthUser/AuthUser.d.ts +1 -1
- package/build/index.esm.js +50 -9
- package/build/index.esm.js.map +1 -1
- package/build/index.js +50 -8
- package/build/index.js.map +1 -1
- package/package.json +1 -2
- package/build/ConditionalWrapper/index.d.ts +0 -5
- package/build/Dropdown/Dropdown.d.ts +0 -27
- package/build/Dropdown/Dropdown.types.d.ts +0 -3
- package/build/FileInput/FileInput.d.ts +0 -4
- package/build/GetHbjson/GetHbjson.d.ts +0 -3
- package/build/GetHbjson/GetHbjson.types.d.ts +0 -3
- package/build/Logo/index.d.ts +0 -2
- package/build/ManageSettings/ManageSettings.d.ts +0 -2
- package/build/ManageSettings/ManageSettings.types.d.ts +0 -3
- package/build/SendHbjson/SendHbjson.d.ts +0 -3
- package/build/SendHbjson/SendHbjson.types.d.ts +0 -3
- package/build/SendHbjson/hbjson.d.ts +0 -282
- package/build/SettingsButton/index.d.ts +0 -11
- package/build/Tooltip/index.d.ts +0 -10
package/build/index.esm.js
CHANGED
|
@@ -1325,8 +1325,8 @@ var xhr = function xhrAdapter(config) {
|
|
|
1325
1325
|
/**
|
|
1326
1326
|
* Helpers.
|
|
1327
1327
|
*/
|
|
1328
|
-
var s$
|
|
1329
|
-
var m$4 = s$
|
|
1328
|
+
var s$4 = 1000;
|
|
1329
|
+
var m$4 = s$4 * 60;
|
|
1330
1330
|
var h$2 = m$4 * 60;
|
|
1331
1331
|
var d$5 = h$2 * 24;
|
|
1332
1332
|
var w$4 = d$5 * 7;
|
|
@@ -1413,7 +1413,7 @@ function parse$1(str) {
|
|
|
1413
1413
|
case 'secs':
|
|
1414
1414
|
case 'sec':
|
|
1415
1415
|
case 's':
|
|
1416
|
-
return n * s$
|
|
1416
|
+
return n * s$4;
|
|
1417
1417
|
case 'milliseconds':
|
|
1418
1418
|
case 'millisecond':
|
|
1419
1419
|
case 'msecs':
|
|
@@ -1444,8 +1444,8 @@ function fmtShort(ms) {
|
|
|
1444
1444
|
if (msAbs >= m$4) {
|
|
1445
1445
|
return Math.round(ms / m$4) + 'm';
|
|
1446
1446
|
}
|
|
1447
|
-
if (msAbs >= s$
|
|
1448
|
-
return Math.round(ms / s$
|
|
1447
|
+
if (msAbs >= s$4) {
|
|
1448
|
+
return Math.round(ms / s$4) + 's';
|
|
1449
1449
|
}
|
|
1450
1450
|
return ms + 'ms';
|
|
1451
1451
|
}
|
|
@@ -1469,8 +1469,8 @@ function fmtLong(ms) {
|
|
|
1469
1469
|
if (msAbs >= m$4) {
|
|
1470
1470
|
return plural(ms, msAbs, m$4, 'minute');
|
|
1471
1471
|
}
|
|
1472
|
-
if (msAbs >= s$
|
|
1473
|
-
return plural(ms, msAbs, s$
|
|
1472
|
+
if (msAbs >= s$4) {
|
|
1473
|
+
return plural(ms, msAbs, s$4, 'second');
|
|
1474
1474
|
}
|
|
1475
1475
|
return ms + ' ms';
|
|
1476
1476
|
}
|
|
@@ -38067,7 +38067,7 @@ function _extends$9() {
|
|
|
38067
38067
|
return _extends$9.apply(this, arguments);
|
|
38068
38068
|
}
|
|
38069
38069
|
|
|
38070
|
-
const Slot=/*#__PURE__*/React.forwardRef(((e,o)=>{const{children:a,...s}=e;return React.Children.toArray(a).some(l$
|
|
38070
|
+
const Slot=/*#__PURE__*/React.forwardRef(((e,o)=>{const{children:a,...s}=e;return React.Children.toArray(a).some(l$5)?/*#__PURE__*/React.createElement(React.Fragment,null,React.Children.map(a,(e=>l$5(e)?/*#__PURE__*/React.createElement(n$5,_extends$9({},s,{ref:o}),e.props.children):e))):/*#__PURE__*/React.createElement(n$5,_extends$9({},s,{ref:o}),a)}));Slot.displayName="Slot";const n$5=/*#__PURE__*/React.forwardRef(((r,n)=>{const{children:l,...a}=r;return React.isValidElement(l)?/*#__PURE__*/React.cloneElement(l,{...o$3(a,l.props),ref:composeRefs(n,l.ref)}):React.Children.count(l)>1?React.Children.only(null):null}));n$5.displayName="SlotClone";const Slottable=({children:e})=>/*#__PURE__*/React.createElement(React.Fragment,null,e);function l$5(e){return React.isValidElement(e)&&e.type===Slottable}function o$3(e,t){const r={...t};for(const n in t){const l=e[n],o=t[n];/^on[A-Z]/.test(n)?r[n]=(...e)=>{null==o||o(...e),null==l||l(...e);}:"style"===n?r[n]={...l,...o}:"className"===n&&(r[n]=[l,o].filter(Boolean).join(" "));}return {...e,...r}}
|
|
38071
38071
|
|
|
38072
38072
|
const Primitive=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce(((o,i)=>({...o,[i]:/*#__PURE__*/React.forwardRef(((o,m)=>{const{asChild:a,...s}=o,n=a?Slot:i;return React.useEffect((()=>{window[Symbol.for("radix-ui")]=!0;}),[]),/*#__PURE__*/React.createElement(n,_extends$9({},s,{ref:m}))}))})),{});
|
|
38073
38073
|
|
|
@@ -38077,6 +38077,8 @@ function useCallbackRef$1(r){const t=React.useRef(r);return React.useEffect((()=
|
|
|
38077
38077
|
|
|
38078
38078
|
function createContextScope(n,o=[]){let r=[];const c=()=>{const t=r.map((t=>/*#__PURE__*/React.createContext(t)));return function(o){const r=(null==o?void 0:o[n])||t;return React.useMemo((()=>({[`__scope${n}`]:{...o,[n]:r}})),[o,r])}};return c.scopeName=n,[function(t,o){const c=/*#__PURE__*/React.createContext(o),u=r.length;function s(t){const{scope:o,children:r,...s}=t,i=(null==o?void 0:o[n][u])||c,a=React.useMemo((()=>s),Object.values(s));return React.createElement(i.Provider,{value:a},r)}return r=[...r,o],s.displayName=t+"Provider",[s,function(r,s){const i=(null==s?void 0:s[n][u])||c,a=React.useContext(i);if(a)return a;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},t$4(c,...o)]}function t$4(...t){const n=t[0];if(1===t.length)return n;const o=()=>{const o=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const r=o.reduce(((e,{useScope:n,scopeName:o})=>({...e,...n(t)[`__scope${o}`]})),{});return React.useMemo((()=>({[`__scope${n.scopeName}`]:r})),[r])}};return o.scopeName=n.scopeName,o}
|
|
38079
38079
|
|
|
38080
|
+
const[c$5,i$4]=createContextScope("Avatar");const[s$3,l$4]=c$5("Avatar");const Avatar=/*#__PURE__*/React.forwardRef(((t,a)=>{const{__scopeAvatar:r,...c}=t,[i,l]=React.useState("idle");return React.createElement(s$3,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:l},/*#__PURE__*/React.createElement(Primitive.span,_extends$9({},c,{ref:a})))}));const AvatarImage=/*#__PURE__*/React.forwardRef(((r,c)=>{const{__scopeAvatar:i,src:s,onLoadingStatusChange:d=(()=>{}),...m}=r,u=l$4("AvatarImage",i),f=function(e){const[t,a]=React.useState("idle");return React.useEffect((()=>{if(!e)return void a("error");let t=!0;const r=new window.Image,o=e=>()=>{t&&a(e);};return a("loading"),r.onload=o("loaded"),r.onerror=o("error"),r.src=e,()=>{t=!1;}}),[e]),t}(s),p=useCallbackRef$1((e=>{d(e),u.onImageLoadingStatusChange(e);}));return useLayoutEffect((()=>{"idle"!==f&&p(f);}),[f,p]),"loaded"===f?/*#__PURE__*/React.createElement(Primitive.img,_extends$9({},m,{ref:c,src:s})):null}));const AvatarFallback=/*#__PURE__*/React.forwardRef(((t,a)=>{const{__scopeAvatar:r,delayMs:c,...i}=t,s=l$4("AvatarFallback",r),[d,m]=React.useState(void 0===c);return React.useEffect((()=>{if(void 0!==c){const e=window.setTimeout((()=>m(!0)),c);return ()=>window.clearTimeout(e)}}),[c]),d&&"loaded"!==s.imageLoadingStatus?/*#__PURE__*/React.createElement(Primitive.span,_extends$9({},i,{ref:a})):null}));const Root$9=Avatar;const Image=AvatarImage;const Fallback=AvatarFallback;
|
|
38081
|
+
|
|
38080
38082
|
function styleInject(css, ref) {
|
|
38081
38083
|
if ( ref === void 0 ) ref = {};
|
|
38082
38084
|
var insertAt = ref.insertAt;
|
|
@@ -38107,6 +38109,45 @@ function styleInject(css, ref) {
|
|
|
38107
38109
|
var css_248z$6 = "@import \"@radix-ui/colors/slate.css\";\n@import \"@radix-ui/colors/slate.css\";\n:root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --font-color: var(--slate12);\n --grey5: var(--slate9);\n --grey3: var(--slate6);\n}\n\n@media (prefers-color-scheme: dark) {\n :root {\n --background: var(--slate11);\n --font-color: var(--slate3);\n }\n}\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\nspan.label {\n font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", Segoe UI Symbol, \"Noto Color Emoji\";\n font-size: clamp(0.75rem, 8vw - 0.85rem, 0.95rem);\n color: var(--slate12);\n}\n\nspan.label-secondary {\n font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", Segoe UI Symbol, \"Noto Color Emoji\";\n font-size: clamp(0.65rem, 8vw - 0.75rem, 0.85rem);\n color: var(--slate10);\n}";
|
|
38108
38110
|
styleInject(css_248z$6);
|
|
38109
38111
|
|
|
38112
|
+
var AuthUser = function (config) {
|
|
38113
|
+
var _a = useAPIClient(config); _a.client; var authUser = _a.authUser; _a.loading;
|
|
38114
|
+
return (React__default.createElement("a", { href: authUser && "https://app.pollination.cloud/".concat(authUser.username), target: '_blank', rel: "noreferrer" },
|
|
38115
|
+
React__default.createElement(Root$9, { style: {
|
|
38116
|
+
display: 'inline-flex',
|
|
38117
|
+
alignItems: 'center',
|
|
38118
|
+
justifyContent: 'center',
|
|
38119
|
+
verticalAlign: 'middle',
|
|
38120
|
+
overflow: 'hidden',
|
|
38121
|
+
userSelect: 'none',
|
|
38122
|
+
width: 45,
|
|
38123
|
+
height: 45,
|
|
38124
|
+
borderRadius: '100%',
|
|
38125
|
+
backgroundColor: 'var(--grey3)',
|
|
38126
|
+
border: '1px solid var(--primary)',
|
|
38127
|
+
backgroundClip: 'padding-box'
|
|
38128
|
+
} },
|
|
38129
|
+
React__default.createElement(Image, { style: {
|
|
38130
|
+
height: '100%',
|
|
38131
|
+
objectFit: 'cover',
|
|
38132
|
+
borderRadius: 'inherit',
|
|
38133
|
+
}, src: authUser && authUser.picture, alt: authUser && authUser.name }),
|
|
38134
|
+
React__default.createElement(Fallback, { style: {
|
|
38135
|
+
width: '100%',
|
|
38136
|
+
height: '100%',
|
|
38137
|
+
display: 'flex',
|
|
38138
|
+
alignItems: 'center',
|
|
38139
|
+
justifyContent: 'center',
|
|
38140
|
+
backgroundColor: 'white',
|
|
38141
|
+
color: 'var(--primary)',
|
|
38142
|
+
fontSize: 15,
|
|
38143
|
+
lineHeight: 1,
|
|
38144
|
+
fontWeight: 500,
|
|
38145
|
+
}, delayMs: 600 }, authUser &&
|
|
38146
|
+
(authUser.name.split(' ').length > 1 ?
|
|
38147
|
+
authUser.name.split(' ').map(function (n) { return n.charAt(0).toUpperCase(); }).join('') :
|
|
38148
|
+
authUser.name.slice(0, 2).toUpperCase())))));
|
|
38149
|
+
};
|
|
38150
|
+
|
|
38110
38151
|
/** @license React v16.13.1
|
|
38111
38152
|
* react-is.production.min.js
|
|
38112
38153
|
*
|
|
@@ -42869,5 +42910,5 @@ var SendResults = function (_a) {
|
|
|
42869
42910
|
toggleHide ? 'Hide Results' : 'Show Results'))));
|
|
42870
42911
|
};
|
|
42871
42912
|
|
|
42872
|
-
export { APIClient, GetGeometry, GetModel, PreviewBakeGeometry, PreviewBakeModel, SendGeometry, SendModel, SendResults, checkDotNet, checkRuby, getHost, sendMessageDotNet, sendMessageRuby, subscribeDotNet, useAPIClient, useGetGeometry, useGetHbjson, useHbjsontoVTK, useManageSettings, useRunCommand, useSendGeometry, useSendHbjson };
|
|
42913
|
+
export { APIClient, AuthUser, GetGeometry, GetModel, PreviewBakeGeometry, PreviewBakeModel, SendGeometry, SendModel, SendResults, checkDotNet, checkRuby, getHost, sendMessageDotNet, sendMessageRuby, subscribeDotNet, useAPIClient, useGetGeometry, useGetHbjson, useHbjsontoVTK, useManageSettings, useRunCommand, useSendGeometry, useSendHbjson };
|
|
42873
42914
|
//# sourceMappingURL=index.esm.js.map
|