@likec4/diagram 1.57.0 → 1.58.0
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/adhoc-editor/EditorPanel.d.ts +1 -1
- package/dist/adhoc-editor/ElementsTree.d.ts +1 -1
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +1 -1
- package/dist/adhoc-editor/components/Tree.d.ts +5 -5
- package/dist/adhoc-editor/state/ActorProvider.d.ts +1 -1
- package/dist/adhoc-editor/state/panel.d.ts +1 -1
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +1 -1
- package/dist/base/BaseXYFlow.d.ts +1 -1
- package/dist/base-primitives/Markdown.d.ts +1 -1
- package/dist/base-primitives/NodeHandles.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundActionButton.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundNodeContainer.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundTitle.d.ts +1 -1
- package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeMarkers.d.ts +8 -8
- package/dist/base-primitives/element/ElementActionButtons.d.ts +1 -1
- package/dist/base-primitives/element/ElementData.d.ts +2 -2
- package/dist/base-primitives/element/ElementDetailsButton.d.ts +1 -1
- package/dist/base-primitives/element/ElementShape.d.ts +1 -1
- package/dist/base-primitives/element/ElementTags.d.ts +1 -1
- package/dist/base-primitives/element/ElementTags.js +1 -3
- package/dist/components/ErrorFallback.d.ts +2 -2
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/PortalToContainer.d.ts +1 -1
- package/dist/components/RootContainer.d.ts +1 -1
- package/dist/components/SearchControl.d.ts +2 -2
- package/dist/components/ViewNotFound.d.ts +2 -2
- package/dist/context/CurrentViewModelProvider.d.ts +1 -1
- package/dist/context/DefaultMantineProvider.d.ts +1 -1
- package/dist/context/DiagramEventHandlers.d.ts +1 -1
- package/dist/context/EnsureMantine.d.ts +1 -1
- package/dist/context/FramerMotionConfig.d.ts +3 -3
- package/dist/context/FramerMotionConfig.js +2 -2
- package/dist/context/IconRenderer.d.ts +2 -2
- package/dist/context/IconRenderer.js +32 -12
- package/dist/context/LikeC4ModelContext.d.ts +1 -1
- package/dist/context/ShadowRootContext.d.ts +3 -0
- package/dist/context/ShadowRootContext.js +5 -0
- package/dist/context/TagStylesContext.d.ts +2 -1
- package/dist/context/TagStylesContext.js +5 -7
- package/dist/editor/LikeC4EditorProvider.d.ts +2 -2
- package/dist/editor/actor/actions.d.ts +74 -15
- package/dist/editor/actor/actions.js +91 -25
- package/dist/editor/actor/hotkey.d.ts +1 -1
- package/dist/editor/actor/hotkey.js +7 -0
- package/dist/editor/actor/machine.d.ts +1 -1
- package/dist/editor/actor/machine.js +1 -0
- package/dist/editor/actor/setup.d.ts +10 -3
- package/dist/editor/actor/setup.js +3 -2
- package/dist/editor/actor/state.editor.d.ts +64 -14
- package/dist/editor/actor/state.editor.js +12 -11
- package/dist/editor/actor/state.sync-queue.d.ts +283 -91
- package/dist/editor/actor/state.sync-queue.js +93 -56
- package/dist/editor/actor/types.d.ts +6 -1
- package/dist/editor/actor/types.js +1 -1
- package/dist/editor/useEditorActorLogic.js +14 -2
- package/dist/hooks/useEditorActor.d.ts +5 -0
- package/dist/hooks/useEditorActor.js +3 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/likec4diagram/DiagramUI.d.ts +1 -1
- package/dist/likec4diagram/DiagramXYFlow.js +15 -3
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +1 -1
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +127 -14
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.d.ts +1 -1
- package/dist/likec4diagram/custom/edges/edges.css.d.ts +1 -0
- package/dist/likec4diagram/custom/edges/edges.css.js +5 -1
- package/dist/likec4diagram/custom/nodes/CompoundActions.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +7 -7
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +3 -3
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.d.ts +1 -1
- package/dist/likec4diagram/relationship-popover/components.d.ts +2 -2
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +1 -1
- package/dist/likec4diagram/state/createViewChange.js +1 -0
- package/dist/likec4diagram/state/machine.actions.js +3 -2
- package/dist/likec4diagram/types.d.ts +2 -0
- package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +1 -1
- package/dist/likec4diagram/ui/notation/NotationPanel.d.ts +1 -1
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +4 -2
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +1 -0
- package/dist/navigationpanel/NavigationPanel.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelControls.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelDropdown.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelDropdown.js +2 -2
- package/dist/navigationpanel/_common.d.ts +2 -2
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +1 -1
- package/dist/navigationpanel/controls/DetailsControls.d.ts +1 -1
- package/dist/navigationpanel/controls/LayoutWarning.d.ts +1 -1
- package/dist/navigationpanel/controls/LogoButton.d.ts +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -1
- package/dist/navigationpanel/controls/OpenSource.d.ts +1 -1
- package/dist/navigationpanel/controls/SearchControl.d.ts +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/CenterCamera.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/EditorPanel.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/styles.css.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +1 -1
- package/dist/overlays/Overlays.d.ts +1 -1
- package/dist/overlays/element-details/ElementDetails.d.ts +1 -1
- package/dist/overlays/element-details/ElementDetailsCard.d.ts +1 -1
- package/dist/overlays/element-details/MetadataValue.d.ts +2 -2
- package/dist/overlays/element-details/TabPanelRelationships.d.ts +1 -1
- package/dist/overlays/element-details/TabPanelStructure.d.ts +2 -2
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +1 -1
- package/dist/overlays/relationship-details/SelectEdge.d.ts +1 -1
- package/dist/overlays/relationship-details/custom/ElementActions.d.ts +1 -1
- package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +4 -4
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +1 -1
- package/dist/overlays/relationships-browser/SelectElement.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/ElementActions.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/EmptyNode.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +4 -4
- package/dist/projects-overview/ProjectsOverview.d.ts +1 -1
- package/dist/projects-overview/custom/nodeTypes.d.ts +1 -1
- package/dist/projects-overview/panel/ProjectsOverviewPanel.d.ts +1 -1
- package/dist/search/Search.d.ts +1 -1
- package/dist/search/XStateSearchAdapter.d.ts +1 -1
- package/dist/search/components/ElementsColumn.d.ts +1 -1
- package/dist/search/components/PickView.d.ts +1 -1
- package/dist/search/components/SearchByTags.d.ts +1 -1
- package/dist/search/components/SearchInput.d.ts +1 -1
- package/dist/search/components/ViewsColum.d.ts +3 -3
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/shadowroot/ShadowRoot.d.ts +1 -2
- package/dist/shadowroot/ShadowRoot.js +27 -21
- package/dist/shadowroot/index.d.ts +1 -0
- package/dist/shadowroot/{styles.css.d.ts → styles.d.ts} +3 -2
- package/dist/shadowroot/{styles.css.js → styles.js} +9 -8
- package/dist/styles2.js +1 -1
- package/package.json +27 -28
- package/panda.buildinfo.json +4 -7
- package/styles-min.css +1 -1
- package/styles-xyflow.css +1 -1
- package/styles.css +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MemoExoticComponent } from 'react';
|
|
2
|
-
export declare const LikeC4SearchInput: MemoExoticComponent<() => import("react
|
|
2
|
+
export declare const LikeC4SearchInput: MemoExoticComponent<() => import("react").JSX.Element>;
|
|
@@ -2,12 +2,12 @@ import { LikeC4Model } from '@likec4/core/model';
|
|
|
2
2
|
import { Fqn } from '@likec4/core/types';
|
|
3
3
|
import { ElementProps, UnstyledButtonProps } from '@mantine/core';
|
|
4
4
|
import { MemoExoticComponent } from 'react';
|
|
5
|
-
export declare const NothingFound: () => import("react
|
|
6
|
-
export declare const ViewsColumn: MemoExoticComponent<() => import("react
|
|
5
|
+
export declare const NothingFound: () => import("react").JSX.Element;
|
|
6
|
+
export declare const ViewsColumn: MemoExoticComponent<() => import("react").JSX.Element>;
|
|
7
7
|
export declare function ViewButton({ className, view, loop, search, focusOnElement, currentViewId, ...props }: {
|
|
8
8
|
view: LikeC4Model.View;
|
|
9
9
|
currentViewId: string;
|
|
10
10
|
search: string;
|
|
11
11
|
loop?: boolean;
|
|
12
12
|
focusOnElement?: Fqn;
|
|
13
|
-
} & UnstyledButtonProps & ElementProps<'button'>): import("react
|
|
13
|
+
} & UnstyledButtonProps & ElementProps<'button'>): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SlotRecipeRuntimeFn, SlotRecipeVariantRecord } from '
|
|
1
|
+
import { SlotRecipeRuntimeFn, SlotRecipeVariantRecord } from '../../../styled-system';
|
|
2
2
|
export declare const focusable = "likec4-focusable";
|
|
3
3
|
export declare const emptyBoX: string;
|
|
4
4
|
export declare const buttonsva: SlotRecipeRuntimeFn<"title" | "description" | "icon" | "root" | "descriptionColor", SlotRecipeVariantRecord<"title" | "description" | "icon" | "root" | "descriptionColor">>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export declare function useShadowRoot(): ShadowRoot;
|
|
3
2
|
type ShadowRootProps = HTMLAttributes<HTMLDivElement> & {
|
|
4
3
|
injectFontCss?: boolean | undefined;
|
|
5
4
|
styleNonce?: string | (() => string) | undefined;
|
|
@@ -14,5 +13,5 @@ type ShadowRootProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
14
13
|
*/
|
|
15
14
|
theme?: any;
|
|
16
15
|
};
|
|
17
|
-
export declare function ShadowRoot({ children, theme, injectFontCss, styleNonce, colorScheme: explicitColorScheme, keepAspectRatio, ...props }: ShadowRootProps): import("react
|
|
16
|
+
export declare function ShadowRoot({ children, theme, injectFontCss, styleNonce, colorScheme: explicitColorScheme, keepAspectRatio, ...props }: ShadowRootProps): import("react").JSX.Element;
|
|
18
17
|
export {};
|
|
@@ -3,10 +3,11 @@ import { useCallbackRef } from "../hooks/useCallbackRef.js";
|
|
|
3
3
|
import { DefaultMantineProvider } from "../context/DefaultMantineProvider.js";
|
|
4
4
|
import { FramerMotionConfig } from "../context/FramerMotionConfig.js";
|
|
5
5
|
import { useId } from "../hooks/useId.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { ShadowRootContext } from "../context/ShadowRootContext.js";
|
|
7
|
+
import { appendFontToDocument, createShadowRootStylesheets, shadowRootCSS, useColorScheme } from "./styles.js";
|
|
8
|
+
import { memo, useEffectEvent, useLayoutEffect, useRef, useState } from "react";
|
|
8
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import {
|
|
10
|
+
import { shallowEqual } from "fast-equals";
|
|
10
11
|
import { isDefined } from "remeda";
|
|
11
12
|
import { createPortal } from "react-dom";
|
|
12
13
|
//#region src/shadowroot/ShadowRoot.tsx
|
|
@@ -49,13 +50,12 @@ function useShadowRootStyle(instanceId, keepAspectRatio = false) {
|
|
|
49
50
|
}
|
|
50
51
|
`.trim();
|
|
51
52
|
}
|
|
52
|
-
var ShadowRootContext = createContext(null);
|
|
53
53
|
function ShadowRoot({ children, theme, injectFontCss = true, styleNonce, colorScheme: explicitColorScheme, keepAspectRatio = false, ...props }) {
|
|
54
54
|
const colorScheme = useColorScheme(explicitColorScheme);
|
|
55
55
|
const id = useId();
|
|
56
56
|
const cssstyle = useShadowRootStyle(id, keepAspectRatio);
|
|
57
57
|
const mantineRootRef = useRef(null);
|
|
58
|
-
|
|
58
|
+
useLayoutEffect(() => appendFontToDocument(injectFontCss, styleNonce), []);
|
|
59
59
|
const getRootElement = useCallbackRef(() => mantineRootRef.current ?? void 0);
|
|
60
60
|
const getStyleNonce = useCallbackRef(() => {
|
|
61
61
|
if (isDefined(styleNonce)) {
|
|
@@ -64,9 +64,8 @@ function ShadowRoot({ children, theme, injectFontCss = true, styleNonce, colorSc
|
|
|
64
64
|
}
|
|
65
65
|
return "";
|
|
66
66
|
});
|
|
67
|
-
const [nonce] = useState(getStyleNonce);
|
|
68
67
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(MemoizedStyle, {
|
|
69
|
-
nonce,
|
|
68
|
+
nonce: getStyleNonce(),
|
|
70
69
|
cssstyle
|
|
71
70
|
}), /* @__PURE__ */ jsx(ShadowRootHost, {
|
|
72
71
|
...props,
|
|
@@ -95,7 +94,7 @@ var MemoizedStyle = memo(({ nonce, cssstyle }) => /* @__PURE__ */ jsx("style", {
|
|
|
95
94
|
type: "text/css",
|
|
96
95
|
nonce,
|
|
97
96
|
dangerouslySetInnerHTML: { __html: cssstyle }
|
|
98
|
-
}));
|
|
97
|
+
}), shallowEqual);
|
|
99
98
|
MemoizedStyle.displayName = "MemoizedStyle";
|
|
100
99
|
var ShadowRootHostPortal = ({ children, root }) => {
|
|
101
100
|
return createPortal(children, root, "likec4-shadow-root");
|
|
@@ -103,35 +102,42 @@ var ShadowRootHostPortal = ({ children, root }) => {
|
|
|
103
102
|
var ShadowRootHost = ({ children, ...props }) => {
|
|
104
103
|
const hostRef = useRef(null);
|
|
105
104
|
const [root, setRoot] = useState(null);
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
if (!host) {
|
|
109
|
-
setRoot(null);
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
105
|
+
const styles = shadowRootCSS();
|
|
106
|
+
const updateShadowRoot = useEffectEvent((styles) => {
|
|
112
107
|
setRoot((current) => {
|
|
108
|
+
const host = hostRef.current;
|
|
109
|
+
if (!host) return null;
|
|
110
|
+
if (host.shadowRoot) {
|
|
111
|
+
try {
|
|
112
|
+
if (host.shadowRoot.adoptedStyleSheets?.length !== 1) {
|
|
113
|
+
console.error("Shadow root has unexpected number of style sheets (expected 1, got %d)", host.shadowRoot.adoptedStyleSheets?.length ?? 0);
|
|
114
|
+
return host.shadowRoot;
|
|
115
|
+
}
|
|
116
|
+
host.shadowRoot.adoptedStyleSheets[0].replaceSync(styles);
|
|
117
|
+
} catch (error) {}
|
|
118
|
+
return host.shadowRoot;
|
|
119
|
+
}
|
|
113
120
|
try {
|
|
114
|
-
if (host.shadowRoot) {
|
|
115
|
-
host.shadowRoot.adoptedStyleSheets[0].replaceSync(createShadowRootStyles());
|
|
116
|
-
return host.shadowRoot;
|
|
117
|
-
}
|
|
118
121
|
const shadowRoot = host.attachShadow({
|
|
119
122
|
mode: "open",
|
|
120
123
|
delegatesFocus: false
|
|
121
124
|
});
|
|
122
|
-
shadowRoot.adoptedStyleSheets = createShadowRootStylesheets();
|
|
125
|
+
shadowRoot.adoptedStyleSheets = createShadowRootStylesheets(styles);
|
|
123
126
|
return shadowRoot;
|
|
124
127
|
} catch (error) {
|
|
125
128
|
return current;
|
|
126
129
|
}
|
|
127
130
|
});
|
|
128
|
-
}
|
|
131
|
+
});
|
|
132
|
+
useLayoutEffect(() => {
|
|
133
|
+
updateShadowRoot(styles);
|
|
134
|
+
}, [styles]);
|
|
129
135
|
return /* @__PURE__ */ jsx("div", {
|
|
130
136
|
...props,
|
|
131
137
|
ref: hostRef,
|
|
132
138
|
children: root && /* @__PURE__ */ jsx(ShadowRootHostPortal, {
|
|
133
139
|
root,
|
|
134
|
-
children: /* @__PURE__ */ jsx(ShadowRootContext
|
|
140
|
+
children: /* @__PURE__ */ jsx(ShadowRootContext, {
|
|
135
141
|
value: root,
|
|
136
142
|
children
|
|
137
143
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ShadowRoot } from './ShadowRoot';
|
|
@@ -2,11 +2,12 @@ export declare function scopeStylesToShadowRoot(styles: string): string;
|
|
|
2
2
|
export declare function appendFontToDocument(injectFontCss: boolean, styleNonce?: string | (() => string) | undefined): void;
|
|
3
3
|
/**
|
|
4
4
|
* Creates a CSS string with styles scoped to the shadow root
|
|
5
|
+
* @returns CSS string for the shadow root
|
|
5
6
|
*/
|
|
6
|
-
export declare
|
|
7
|
+
export declare const shadowRootCSS: () => string;
|
|
7
8
|
/**
|
|
8
9
|
* Creates a CSSStyleSheet with styles scoped to the shadow root
|
|
9
10
|
*/
|
|
10
|
-
export declare function createShadowRootStylesheets(): [CSSStyleSheet];
|
|
11
|
+
export declare function createShadowRootStylesheets(csstext: string): [CSSStyleSheet];
|
|
11
12
|
export type ColorScheme = 'light' | 'dark';
|
|
12
13
|
export declare function useColorScheme(explicit?: ColorScheme): ColorScheme;
|
|
@@ -3,9 +3,9 @@ import { useCallbackRef as useCallbackRef$1 } from "../hooks/useCallbackRef.js";
|
|
|
3
3
|
import styles_font_default from "../styles-font2.js";
|
|
4
4
|
import styles_default from "../styles2.js";
|
|
5
5
|
import { useState } from "react";
|
|
6
|
-
import { first, isFunction, isString } from "remeda";
|
|
6
|
+
import { first, isFunction, isString, once } from "remeda";
|
|
7
7
|
import { useColorScheme, useMutationObserverTarget } from "@mantine/hooks";
|
|
8
|
-
//#region src/shadowroot/styles.
|
|
8
|
+
//#region src/shadowroot/styles.ts
|
|
9
9
|
function scopeStylesToShadowRoot(styles) {
|
|
10
10
|
return styles.replaceAll(/:where\(\s*:root\s*,\s*:host\s*\)/g, `:where(.likec4-shadow-root)`).replaceAll(":root", `.likec4-shadow-root`).replaceAll(/(^|[{},;]|\*\/)(\s*)body(?=\s*[{,])/g, "$1$2.likec4-shadow-root");
|
|
11
11
|
}
|
|
@@ -18,22 +18,23 @@ function appendFontToDocument(injectFontCss, styleNonce) {
|
|
|
18
18
|
if (isString(styleNonce)) nonce = styleNonce;
|
|
19
19
|
if (isFunction(styleNonce)) nonce = styleNonce();
|
|
20
20
|
if (nonce) style.setAttribute("nonce", nonce);
|
|
21
|
-
style.appendChild(document.createTextNode(
|
|
21
|
+
style.appendChild(document.createTextNode(styles_font_default));
|
|
22
22
|
document.head.appendChild(style);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Creates a CSS string with styles scoped to the shadow root
|
|
27
|
+
* @returns CSS string for the shadow root
|
|
27
28
|
*/
|
|
28
|
-
|
|
29
|
+
var shadowRootCSS = once(() => {
|
|
29
30
|
return scopeStylesToShadowRoot(styles_default);
|
|
30
|
-
}
|
|
31
|
+
});
|
|
31
32
|
/**
|
|
32
33
|
* Creates a CSSStyleSheet with styles scoped to the shadow root
|
|
33
34
|
*/
|
|
34
|
-
function createShadowRootStylesheets() {
|
|
35
|
+
function createShadowRootStylesheets(csstext) {
|
|
35
36
|
const css = new CSSStyleSheet();
|
|
36
|
-
css.replaceSync(
|
|
37
|
+
css.replaceSync(csstext);
|
|
37
38
|
return [css];
|
|
38
39
|
}
|
|
39
40
|
var getComputedColorScheme = () => {
|
|
@@ -56,4 +57,4 @@ function useColorScheme$1(explicit) {
|
|
|
56
57
|
}
|
|
57
58
|
__name(useColorScheme$1, "useColorScheme");
|
|
58
59
|
//#endregion
|
|
59
|
-
export { appendFontToDocument,
|
|
60
|
+
export { appendFontToDocument, createShadowRootStylesheets, shadowRootCSS, useColorScheme$1 as useColorScheme };
|