@darajs/core 1.26.1 → 1.26.3
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/dist/auth/origin-security.d.ts +12 -0
- package/dist/auth/origin-security.d.ts.map +1 -0
- package/dist/auth/origin-security.js +13 -0
- package/dist/auth/origin-security.js.map +1 -0
- package/dist/{dara_core-1.26.1-py3-none-any.whl → dara_core-1.26.3-py3-none-any.whl} +0 -0
- package/dist/shared/root/insecure-origin-banner.d.ts +3 -0
- package/dist/shared/root/insecure-origin-banner.d.ts.map +1 -0
- package/dist/shared/root/insecure-origin-banner.js +46 -0
- package/dist/shared/root/insecure-origin-banner.js.map +1 -0
- package/dist/shared/root/unauthenticated-root.d.ts.map +1 -1
- package/dist/shared/root/unauthenticated-root.js +2 -1
- package/dist/shared/root/unauthenticated-root.js.map +1 -1
- package/dist/umd/dara.core.umd.cjs +74 -7
- package/package.json +9 -9
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface LocationLike {
|
|
2
|
+
host?: string;
|
|
3
|
+
hostname: string;
|
|
4
|
+
pathname?: string;
|
|
5
|
+
}
|
|
6
|
+
interface SecurityContextLike {
|
|
7
|
+
isSecureContext: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function shouldWarnAboutInsecureAuthContext(securityContext: SecurityContextLike): boolean;
|
|
10
|
+
export declare function getAuthOriginRecommendation(location: LocationLike): string;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=origin-security.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"origin-security.d.ts","sourceRoot":"","sources":["../../js/auth/origin-security.ts"],"names":[],"mappings":"AAAA,UAAU,YAAY;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,mBAAmB;IACzB,eAAe,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,kCAAkC,CAAC,eAAe,EAAE,mBAAmB,GAAG,OAAO,CAEhG;AAED,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAU1E"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function shouldWarnAboutInsecureAuthContext(securityContext) {
|
|
2
|
+
return !securityContext.isSecureContext;
|
|
3
|
+
}
|
|
4
|
+
export function getAuthOriginRecommendation(location) {
|
|
5
|
+
const host = location.host || location.hostname;
|
|
6
|
+
const pathname = location.pathname || '';
|
|
7
|
+
if (location.hostname.toLowerCase() === '0.0.0.0') {
|
|
8
|
+
const localhostHost = host.replace(/^0\.0\.0\.0/i, 'localhost');
|
|
9
|
+
return `http://${localhostHost}${pathname}`;
|
|
10
|
+
}
|
|
11
|
+
return `https://${host}${pathname}`;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=origin-security.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"origin-security.js","sourceRoot":"","sources":["../../js/auth/origin-security.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,kCAAkC,CAAC,eAAoC;IACnF,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,QAAsB;IAC9D,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,QAAQ,CAAC;IAChD,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,IAAI,EAAE,CAAC;IAEzC,IAAI,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,SAAS,EAAE,CAAC;QAChD,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;QAChE,OAAO,UAAU,aAAa,GAAG,QAAQ,EAAE,CAAC;IAChD,CAAC;IAED,OAAO,WAAW,IAAI,GAAG,QAAQ,EAAE,CAAC;AACxC,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insecure-origin-banner.d.ts","sourceRoot":"","sources":["../../../js/shared/root/insecure-origin-banner.tsx"],"names":[],"mappings":"AAuCA,iBAAS,oBAAoB,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CAsBlD;AAED,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { transparentize } from 'polished';
|
|
3
|
+
import { createPortal } from 'react-dom';
|
|
4
|
+
import styled from '@darajs/styled-components';
|
|
5
|
+
import { getAuthOriginRecommendation, shouldWarnAboutInsecureAuthContext } from '../../auth/origin-security';
|
|
6
|
+
const Banner = styled.div `
|
|
7
|
+
position: fixed;
|
|
8
|
+
z-index: 2147483647;
|
|
9
|
+
top: 0;
|
|
10
|
+
right: 0;
|
|
11
|
+
left: 0;
|
|
12
|
+
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
width: 100%;
|
|
15
|
+
padding: 0.75rem 1rem;
|
|
16
|
+
|
|
17
|
+
font-size: 0.875rem;
|
|
18
|
+
line-height: 1.4;
|
|
19
|
+
color: ${(props) => props.theme.colors.error};
|
|
20
|
+
text-align: center;
|
|
21
|
+
letter-spacing: 0.01em;
|
|
22
|
+
|
|
23
|
+
background-color: ${(props) => transparentize(0.9, props.theme.colors.error)};
|
|
24
|
+
border-bottom: 1px solid ${(props) => transparentize(0.7, props.theme.colors.error)};
|
|
25
|
+
`;
|
|
26
|
+
const InlineCode = styled.code `
|
|
27
|
+
font-family: monospace;
|
|
28
|
+
font-size: inherit;
|
|
29
|
+
word-break: break-word;
|
|
30
|
+
overflow-wrap: anywhere;
|
|
31
|
+
`;
|
|
32
|
+
const RecommendationLink = styled.a `
|
|
33
|
+
color: inherit;
|
|
34
|
+
`;
|
|
35
|
+
function InsecureOriginBanner() {
|
|
36
|
+
if (typeof window === 'undefined' || typeof document === 'undefined') {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
if (!shouldWarnAboutInsecureAuthContext(window)) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
const recommendedOrigin = getAuthOriginRecommendation(window.location);
|
|
43
|
+
return createPortal(_jsxs(Banner, { role: "alert", children: ["This app is running on ", _jsx(InlineCode, { children: window.location.origin }), " which may prevent core Dara features from working reliably. Open it at", ' ', _jsx(RecommendationLink, { href: recommendedOrigin, children: _jsx(InlineCode, { children: recommendedOrigin }) }), "."] }), document.body);
|
|
44
|
+
}
|
|
45
|
+
export default InsecureOriginBanner;
|
|
46
|
+
//# sourceMappingURL=insecure-origin-banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insecure-origin-banner.js","sourceRoot":"","sources":["../../../js/shared/root/insecure-origin-banner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,OAAO,EAAE,2BAA2B,EAAE,kCAAkC,EAAE,MAAM,wBAAwB,CAAC;AAEzG,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;aAaZ,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;;;wBAIxB,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;+BACjD,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;CACtF,CAAC;AAEF,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAA;;;;;CAK7B,CAAC;AAEF,MAAM,kBAAkB,GAAG,MAAM,CAAC,CAAC,CAAA;;CAElC,CAAC;AAEF,SAAS,oBAAoB;IACzB,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,IAAI,CAAC,kCAAkC,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,iBAAiB,GAAG,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAEvE,OAAO,YAAY,CACf,MAAC,MAAM,IAAC,IAAI,EAAC,OAAO,wCACO,KAAC,UAAU,cAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAc,6EAC7B,GAAG,EAC9C,KAAC,kBAAkB,IAAC,IAAI,EAAE,iBAAiB,YACvC,KAAC,UAAU,cAAE,iBAAiB,GAAc,GAC3B,SAEhB,EACT,QAAQ,CAAC,IAAI,CAChB,CAAC;AACN,CAAC;AAED,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unauthenticated-root.d.ts","sourceRoot":"","sources":["../../../js/shared/root/unauthenticated-root.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unauthenticated-root.d.ts","sourceRoot":"","sources":["../../../js/shared/root/unauthenticated-root.tsx"],"names":[],"mappings":"AA6BA;;;GAGG;AACH,iBAAS,mBAAmB,IAAI,GAAG,CAAC,OAAO,CAuC1C;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -10,6 +10,7 @@ import { useVariable } from '../interactivity';
|
|
|
10
10
|
import { PathParamSync, RouteMatchSync } from '../interactivity/persistence';
|
|
11
11
|
import { resolveTheme } from '../utils';
|
|
12
12
|
import useUrlSync from '../utils/use-url-sync';
|
|
13
|
+
import InsecureOriginBanner from './insecure-origin-banner';
|
|
13
14
|
function StyleRoot(props) {
|
|
14
15
|
const config = useConfig();
|
|
15
16
|
const [mainTheme] = useVariable(config.theme.main);
|
|
@@ -43,7 +44,7 @@ function UnauthenticatedRoot() {
|
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
}, [navigation.state]);
|
|
46
|
-
return (_jsx(PathParamSync, { children: _jsx(RouteMatchSync, { children: _jsx(RecoilURLSync, Object.assign({}, syncOptions, { children:
|
|
47
|
+
return (_jsx(PathParamSync, { children: _jsx(RouteMatchSync, { children: _jsx(RecoilURLSync, Object.assign({}, syncOptions, { children: _jsxs(StyleRoot, { children: [_jsx(InsecureOriginBanner, {}), _jsx(Outlet, {})] }) })) }) }));
|
|
47
48
|
}
|
|
48
49
|
export default UnauthenticatedRoot;
|
|
49
50
|
//# sourceMappingURL=unauthenticated-root.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unauthenticated-root.js","sourceRoot":"","sources":["../../../js/shared/root/unauthenticated-root.tsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAkB,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,UAAU,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"unauthenticated-root.js","sourceRoot":"","sources":["../../../js/shared/root/unauthen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
font-size: ${(props) => props.size ? `${props.size}rem` : "1rem"};
|
|
33489
33490
|
text-overflow: ellipsis;
|
|
33490
33491
|
white-space: nowrap;
|
|
33491
|
-
font-size: ${(props) => props.size ? `${props.size}rem` : "1rem"};
|
|
33492
33492
|
`;
|
|
33493
33493
|
const SelectedItem = styled.div`
|
|
33494
33494
|
overflow: hidden;
|
|
@@ -39231,7 +39231,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
39231
39231
|
var _a;
|
|
39232
39232
|
return areEqual(prevProps, nextProps) && !(((_a = nextProps.data) === null || _a === void 0 ? void 0 : _a.headerGroups) || []).some((headerGroup) => ((headerGroup === null || headerGroup === void 0 ? void 0 : headerGroup.headers) || []).some((header) => header.isResizing));
|
|
39233
39233
|
};
|
|
39234
|
-
const RenderRow = React__namespace.memo(({ data: { width, currentEditCell, headerGroups, rows, prepareRow, getItem, totalColumnsWidth, onClickRow, throttledClickRow, backgroundColor, mappedColumns, rowHeight }, index: index2, style: renderRowStyle }) => {
|
|
39234
|
+
const RenderRow = React__namespace.memo(({ data: { width, currentEditCell, headerGroups, rows, prepareRow, getItem, totalColumnsWidth, onClickRow, throttledClickRow, backgroundColor, mappedColumns, rowHeight, rowDataIdColumn }, index: index2, style: renderRowStyle }) => {
|
|
39235
39235
|
let row = rows[index2];
|
|
39236
39236
|
if (getItem) {
|
|
39237
39237
|
const value = getItem(index2);
|
|
@@ -39263,7 +39263,19 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
39263
39263
|
}
|
|
39264
39264
|
};
|
|
39265
39265
|
const _a = row.getRowProps({ style: renderRowStyle }), { style: rowStyle } = _a, restRow = __rest$2(_a, ["style"]);
|
|
39266
|
-
|
|
39266
|
+
let cols;
|
|
39267
|
+
if (!rowDataIdColumn) {
|
|
39268
|
+
cols = [];
|
|
39269
|
+
} else if (Array.isArray(rowDataIdColumn)) {
|
|
39270
|
+
cols = rowDataIdColumn;
|
|
39271
|
+
} else {
|
|
39272
|
+
cols = [rowDataIdColumn];
|
|
39273
|
+
}
|
|
39274
|
+
const rowDataId = row.original && cols.length > 0 ? cols.map((col) => {
|
|
39275
|
+
var _a2;
|
|
39276
|
+
return String((_a2 = row.original[col]) !== null && _a2 !== void 0 ? _a2 : "");
|
|
39277
|
+
}).join("_") : void 0;
|
|
39278
|
+
return React$1.createElement(Row, Object.assign({}, restRow, { key: `row-${index2}`, "data-row-id": rowDataId, onClick, onClickRow, style: Object.assign(Object.assign({}, rowStyle), {
|
|
39267
39279
|
// The first row is the header row which is not controlled by this rowHeight prop so it needs to be part of the calculation.
|
|
39268
39280
|
top: index2 === 0 ? DEFAULT_ROW_HEIGHT : index2 * rowHeight + DEFAULT_ROW_HEIGHT,
|
|
39269
39281
|
width: totalColumnsWidth > width ? totalColumnsWidth : "100%"
|
|
@@ -39501,7 +39513,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
39501
39513
|
EDIT_INPUT: EditInputCell,
|
|
39502
39514
|
EDIT_SELECT: EditSelectCell
|
|
39503
39515
|
};
|
|
39504
|
-
const createItemData$1 = memoizeOne$1((width, currentEditCell, headerGroups, rows, prepareRow, getItem, totalColumnsWidth, onClickRow, throttledClickRow, backgroundColor, mappedColumns, rowHeight) => ({
|
|
39516
|
+
const createItemData$1 = memoizeOne$1((width, currentEditCell, headerGroups, rows, prepareRow, getItem, totalColumnsWidth, onClickRow, throttledClickRow, backgroundColor, mappedColumns, rowHeight, rowDataIdColumn) => ({
|
|
39505
39517
|
backgroundColor,
|
|
39506
39518
|
currentEditCell,
|
|
39507
39519
|
getItem,
|
|
@@ -39511,11 +39523,12 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
39511
39523
|
prepareRow,
|
|
39512
39524
|
rows,
|
|
39513
39525
|
rowHeight,
|
|
39526
|
+
rowDataIdColumn,
|
|
39514
39527
|
throttledClickRow,
|
|
39515
39528
|
totalColumnsWidth,
|
|
39516
39529
|
width
|
|
39517
39530
|
}));
|
|
39518
|
-
const Table = React$1.forwardRef(({ allowHiding, actions, backgroundColor, className, columns, data: data2, getItem, initialSort = [], itemCount, maxRows, onAction, onChange: onChange2, onClickRow, onItemsRendered, onFilter, onSort, rowHeight, showTableOptions, style, tableOptionsStyle }, ref) => {
|
|
39531
|
+
const Table = React$1.forwardRef(({ allowHiding, actions, backgroundColor, className, columns, data: data2, getItem, initialSort = [], itemCount, maxRows, onAction, onChange: onChange2, onClickRow, onItemsRendered, rowDataIdColumn, onFilter, onSort, rowHeight, showTableOptions, style, tableOptionsStyle }, ref) => {
|
|
39519
39532
|
const [currentSortBy, setCurrentSortBy] = React$1.useState(initialSort);
|
|
39520
39533
|
const tableRowHeight = rowHeight || DEFAULT_ROW_HEIGHT;
|
|
39521
39534
|
React$1.useEffect(
|
|
@@ -39628,7 +39641,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
39628
39641
|
useDeepCompare([tableProps, totalColumnsWidth, headerGroups])
|
|
39629
39642
|
);
|
|
39630
39643
|
return jsxRuntimeExports.jsx(Wrapper$2, Object.assign({}, getTableProps(), { "$hasMaxRows": !!maxRows, className: `${className} ${hasFixedColumns ? "sticky" : ""}`, style: Object.assign({ height: maxRows ? (Math.min(rows.length, maxRows) + 1) * tableRowHeight : "100%" }, style), children: jsxRuntimeExports.jsx(AutoSizer, { children: ({ height, width }) => {
|
|
39631
|
-
return jsxRuntimeExports.jsx(StyledFixedSizeList, { height, innerElementType: renderTable, itemCount: itemCount || rows.length, itemData: createItemData$1(width, currentEditCell, headerGroups, rows, prepareRow, getItem, totalColumnsWidth, onClickRow, throttledClickRow, backgroundColor, mappedColumns, tableRowHeight), itemSize: tableRowHeight, onItemsRendered, style: {
|
|
39644
|
+
return jsxRuntimeExports.jsx(StyledFixedSizeList, { height, innerElementType: renderTable, itemCount: itemCount || rows.length, itemData: createItemData$1(width, currentEditCell, headerGroups, rows, prepareRow, getItem, totalColumnsWidth, onClickRow, throttledClickRow, backgroundColor, mappedColumns, tableRowHeight, rowDataIdColumn), itemSize: tableRowHeight, onItemsRendered, style: {
|
|
39632
39645
|
overflowX: width < totalColumnsWidth ? "auto" : "hidden",
|
|
39633
39646
|
overflowY: height < (rows.length + 1) * tableRowHeight ? "auto" : "hidden"
|
|
39634
39647
|
}, width, children: RenderRow }, "table-list");
|
|
@@ -75818,6 +75831,60 @@ body,
|
|
|
75818
75831
|
font-size: ${(props) => props.theme.font.size};
|
|
75819
75832
|
}
|
|
75820
75833
|
`;
|
|
75834
|
+
function shouldWarnAboutInsecureAuthContext(securityContext) {
|
|
75835
|
+
return !securityContext.isSecureContext;
|
|
75836
|
+
}
|
|
75837
|
+
function getAuthOriginRecommendation(location2) {
|
|
75838
|
+
const host = location2.host || location2.hostname;
|
|
75839
|
+
const pathname = location2.pathname || "";
|
|
75840
|
+
if (location2.hostname.toLowerCase() === "0.0.0.0") {
|
|
75841
|
+
const localhostHost = host.replace(/^0\.0\.0\.0/i, "localhost");
|
|
75842
|
+
return `http://${localhostHost}${pathname}`;
|
|
75843
|
+
}
|
|
75844
|
+
return `https://${host}${pathname}`;
|
|
75845
|
+
}
|
|
75846
|
+
const Banner = styled.div`
|
|
75847
|
+
position: fixed;
|
|
75848
|
+
z-index: 2147483647;
|
|
75849
|
+
top: 0;
|
|
75850
|
+
right: 0;
|
|
75851
|
+
left: 0;
|
|
75852
|
+
|
|
75853
|
+
box-sizing: border-box;
|
|
75854
|
+
width: 100%;
|
|
75855
|
+
padding: 0.75rem 1rem;
|
|
75856
|
+
|
|
75857
|
+
font-size: 0.875rem;
|
|
75858
|
+
line-height: 1.4;
|
|
75859
|
+
color: ${(props) => props.theme.colors.error};
|
|
75860
|
+
text-align: center;
|
|
75861
|
+
letter-spacing: 0.01em;
|
|
75862
|
+
|
|
75863
|
+
background-color: ${(props) => curriedTransparentize$1(0.9, props.theme.colors.error)};
|
|
75864
|
+
border-bottom: 1px solid ${(props) => curriedTransparentize$1(0.7, props.theme.colors.error)};
|
|
75865
|
+
`;
|
|
75866
|
+
const InlineCode = styled.code`
|
|
75867
|
+
font-family: monospace;
|
|
75868
|
+
font-size: inherit;
|
|
75869
|
+
word-break: break-word;
|
|
75870
|
+
overflow-wrap: anywhere;
|
|
75871
|
+
`;
|
|
75872
|
+
const RecommendationLink = styled.a`
|
|
75873
|
+
color: inherit;
|
|
75874
|
+
`;
|
|
75875
|
+
function InsecureOriginBanner() {
|
|
75876
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
75877
|
+
return null;
|
|
75878
|
+
}
|
|
75879
|
+
if (!shouldWarnAboutInsecureAuthContext(window)) {
|
|
75880
|
+
return null;
|
|
75881
|
+
}
|
|
75882
|
+
const recommendedOrigin = getAuthOriginRecommendation(window.location);
|
|
75883
|
+
return ReactDOM.createPortal(
|
|
75884
|
+
/* @__PURE__ */ React.createElement(Banner, { role: "alert" }, "This app is running on ", /* @__PURE__ */ React.createElement(InlineCode, null, window.location.origin), " which may prevent core Dara features from working reliably. Open it at", " ", /* @__PURE__ */ React.createElement(RecommendationLink, { href: recommendedOrigin }, /* @__PURE__ */ React.createElement(InlineCode, null, recommendedOrigin)), "."),
|
|
75885
|
+
document.body
|
|
75886
|
+
);
|
|
75887
|
+
}
|
|
75821
75888
|
function StyleRoot(props) {
|
|
75822
75889
|
const config2 = useConfig();
|
|
75823
75890
|
const [mainTheme] = useVariable(config2.theme.main);
|
|
@@ -75845,7 +75912,7 @@ body,
|
|
|
75845
75912
|
}
|
|
75846
75913
|
}
|
|
75847
75914
|
}, [navigation.state]);
|
|
75848
|
-
return /* @__PURE__ */ React.createElement(PathParamSync, null, /* @__PURE__ */ React.createElement(RouteMatchSync, null, /* @__PURE__ */ React.createElement(RecoilSync_index_3, { ...syncOptions }, /* @__PURE__ */ React.createElement(StyleRoot, null, /* @__PURE__ */ React.createElement(Outlet, null)))));
|
|
75915
|
+
return /* @__PURE__ */ React.createElement(PathParamSync, null, /* @__PURE__ */ React.createElement(RouteMatchSync, null, /* @__PURE__ */ React.createElement(RecoilSync_index_3, { ...syncOptions }, /* @__PURE__ */ React.createElement(StyleRoot, null, /* @__PURE__ */ React.createElement(InsecureOriginBanner, null), /* @__PURE__ */ React.createElement(Outlet, null)))));
|
|
75849
75916
|
}
|
|
75850
75917
|
function shouldHoldPromise(route) {
|
|
75851
75918
|
return !route.fallback;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darajs/core",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.3",
|
|
4
4
|
"description": "Dara Framework core",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"@babel/preset-env": "^7.23.0",
|
|
40
40
|
"@babel/preset-react": "^7.22.15",
|
|
41
41
|
"@babel/preset-typescript": "^7.23.0",
|
|
42
|
-
"@darajs/eslint-config": "1.26.
|
|
43
|
-
"@darajs/prettier-config": "1.26.
|
|
44
|
-
"@darajs/stylelint-config": "1.26.
|
|
42
|
+
"@darajs/eslint-config": "1.26.3",
|
|
43
|
+
"@darajs/prettier-config": "1.26.3",
|
|
44
|
+
"@darajs/stylelint-config": "1.26.3",
|
|
45
45
|
"@rollup/plugin-inject": "^4.0.4",
|
|
46
46
|
"@testing-library/dom": "^9.3.0",
|
|
47
47
|
"@testing-library/jest-dom": "^6.0.0",
|
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
"whatwg-fetch": "^3.6.20"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@darajs/styled-components": "1.26.
|
|
79
|
-
"@darajs/ui-components": "1.26.
|
|
80
|
-
"@darajs/ui-notifications": "1.26.
|
|
81
|
-
"@darajs/ui-utils": "1.26.
|
|
78
|
+
"@darajs/styled-components": "1.26.3",
|
|
79
|
+
"@darajs/ui-components": "1.26.3",
|
|
80
|
+
"@darajs/ui-notifications": "1.26.3",
|
|
81
|
+
"@darajs/ui-utils": "1.26.3",
|
|
82
82
|
"@fortawesome/fontawesome-free": "~6.4.0",
|
|
83
83
|
"@microsoft/fetch-event-source": "^2.0.1",
|
|
84
84
|
"@recoiljs/refine": "^0.1.1",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"engines": {
|
|
119
119
|
"node": ">=20.19.0"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "e5aa4ed5e571bab428e48cb18d9599a7caec0b7c"
|
|
122
122
|
}
|