@launchdarkly/toolbar 2.1.1 → 2.1.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/cdn/toolbar.min.js +71 -71
- package/dist/core/styles/constants.d.ts +17 -2
- package/dist/core/styles/index.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/js/96.js +1 -1
- package/dist/react.cjs +1 -1
- package/package.json +10 -10
|
@@ -16,14 +16,29 @@ export declare const TOOLBAR_CLASS_PREFIX = "ldtb_";
|
|
|
16
16
|
export declare const TOOLBAR_STYLE_MARKER = "/* LD_TOOLBAR_STYLES */";
|
|
17
17
|
/**
|
|
18
18
|
* CSS variable prefixes used by LaunchDarkly design systems.
|
|
19
|
-
*
|
|
19
|
+
* NOTE: This is used only for copying tokens INTO the Shadow DOM (not for interception).
|
|
20
|
+
* We intentionally do NOT intercept styles just because they contain --lp- tokens,
|
|
21
|
+
* as host applications may also use LaunchPad and their styles must not be affected.
|
|
20
22
|
*/
|
|
21
23
|
export declare const LAUNCHPAD_TOKEN_PREFIXES: readonly ["--lp-"];
|
|
22
24
|
/**
|
|
23
25
|
* Checks if CSS content belongs to the toolbar based on known markers.
|
|
24
26
|
* This is used for reliable style interception without false positives.
|
|
25
27
|
*
|
|
28
|
+
* IMPORTANT: This function intentionally does NOT check for --lp- tokens.
|
|
29
|
+
* Host applications that also use LaunchPad would have their styles incorrectly
|
|
30
|
+
* intercepted if we matched on --lp- prefix, breaking components like react-select.
|
|
31
|
+
*
|
|
26
32
|
* @param content - CSS content to check
|
|
27
|
-
* @returns true if the content is toolbar CSS
|
|
33
|
+
* @returns true if the content is toolbar CSS that should be MOVED to Shadow DOM
|
|
28
34
|
*/
|
|
29
35
|
export declare function isToolbarStyleContent(content: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Checks if CSS content contains LaunchPad design tokens that the toolbar needs.
|
|
38
|
+
* These styles should be COPIED to Shadow DOM but NOT removed from document.head,
|
|
39
|
+
* because host applications may also use these tokens.
|
|
40
|
+
*
|
|
41
|
+
* @param content - CSS content to check
|
|
42
|
+
* @returns true if the content should be copied (but not moved) to Shadow DOM
|
|
43
|
+
*/
|
|
44
|
+
export declare function shouldCopyToShadowDom(content: string): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { TOOLBAR_CLASS_PREFIX, TOOLBAR_STYLE_MARKER, LAUNCHPAD_TOKEN_PREFIXES, isToolbarStyleContent, } from './constants';
|
|
1
|
+
export { TOOLBAR_CLASS_PREFIX, TOOLBAR_STYLE_MARKER, LAUNCHPAD_TOKEN_PREFIXES, isToolbarStyleContent, shouldCopyToShadowDom, } from './constants';
|
|
2
2
|
export { injectStylesIntoShadowRoot, createStyleInterceptor, cacheToolbarStyle, getCachedToolbarStyles, clearToolbarStyleCache, } from './shadowDomStyles';
|
package/dist/index.cjs
CHANGED
package/dist/js/96.js
CHANGED
package/dist/react.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@launchdarkly/toolbar",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.3",
|
|
5
5
|
"description": "A framework-agnostic developer toolbar for interacting with LaunchDarkly during development",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"launchdarkly",
|
|
@@ -108,24 +108,24 @@
|
|
|
108
108
|
"@codemirror/lint": "^6.9.3",
|
|
109
109
|
"@codemirror/state": "^6.5.4",
|
|
110
110
|
"@codemirror/view": "^6.39.11",
|
|
111
|
-
"@launchdarkly/observability": "^0.
|
|
112
|
-
"@launchdarkly/session-replay": "^0.
|
|
111
|
+
"@launchdarkly/observability": "^1.0.0",
|
|
112
|
+
"@launchdarkly/session-replay": "^1.0.0",
|
|
113
113
|
"@launchpad-ui/components": "^0.17.9",
|
|
114
114
|
"@launchpad-ui/tokens": "^0.15.1",
|
|
115
115
|
"@lezer/highlight": "1.2.1",
|
|
116
116
|
"@react-aria/focus": "^3.21.3",
|
|
117
117
|
"@react-stately/flags": "^3.1.2",
|
|
118
|
-
"@rsbuild/core": "^1.7.
|
|
118
|
+
"@rsbuild/core": "^1.7.3",
|
|
119
119
|
"@rsbuild/plugin-react": "^1.4.3",
|
|
120
120
|
"@rslib/core": "^0.19.3",
|
|
121
|
-
"@storybook/addon-docs": "^10.2.
|
|
121
|
+
"@storybook/addon-docs": "^10.2.5",
|
|
122
122
|
"@storybook/addon-essentials": "^9.0.0-alpha.12",
|
|
123
123
|
"@storybook/addon-interactions": "^9.0.0-alpha.10",
|
|
124
124
|
"@storybook/addon-links": "^10.2.1",
|
|
125
125
|
"@storybook/addon-onboarding": "^10.1.10",
|
|
126
126
|
"@storybook/blocks": "^9.0.0-alpha.17",
|
|
127
|
-
"@storybook/react": "^10.2.
|
|
128
|
-
"@storybook/react-vite": "^10.2.
|
|
127
|
+
"@storybook/react": "^10.2.4",
|
|
128
|
+
"@storybook/react-vite": "^10.2.3",
|
|
129
129
|
"@storybook/test": "^9.0.0-alpha.2",
|
|
130
130
|
"@tanstack/react-virtual": "^3.13.18",
|
|
131
131
|
"@testing-library/jest-dom": "^6.9.1",
|
|
@@ -137,14 +137,14 @@
|
|
|
137
137
|
"@vanilla-extract/vite-plugin": "^5.1.4",
|
|
138
138
|
"@vanilla-extract/webpack-plugin": "^2.3.25",
|
|
139
139
|
"@vitest/coverage-v8": "4.0.16",
|
|
140
|
-
"css-loader": "^7.1.
|
|
140
|
+
"css-loader": "^7.1.3",
|
|
141
141
|
"jsdom": "^27.4.0",
|
|
142
142
|
"launchdarkly-js-client-sdk": "^3.9.0",
|
|
143
|
-
"motion": "^12.
|
|
143
|
+
"motion": "^12.29.2",
|
|
144
144
|
"oxlint": "^1.41.0",
|
|
145
145
|
"react": "^19.2.4",
|
|
146
146
|
"react-dom": "^19.2.4",
|
|
147
|
-
"storybook": "^10.2.
|
|
147
|
+
"storybook": "^10.2.4",
|
|
148
148
|
"storybook-addon-rslib": "^3.2.2",
|
|
149
149
|
"storybook-react-rsbuild": "^3.2.2",
|
|
150
150
|
"typescript": "^5.9.3",
|