@tldiagram/core-ui 2.0.2 → 2.0.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.
@@ -7,6 +7,7 @@ export interface ViewEditorDemoOptions {
7
7
  disableOnboarding?: boolean;
8
8
  hideFocusView?: boolean;
9
9
  hideExpandExtras?: boolean;
10
+ defaultHiddenLayerTags?: string[];
10
11
  }
11
12
  export declare const DEMO_VIEW_EDITOR_OPTIONS: Omit<ViewEditorDemoOptions, 'revealProgress'>;
12
13
  interface UseDemoRevealViewportArgs {
package/dist/index.js CHANGED
@@ -13481,7 +13481,8 @@ const o2 = {
13481
13481
  hideFlowControls: !0,
13482
13482
  disableOnboarding: !0,
13483
13483
  hideFocusView: !0,
13484
- hideExpandExtras: !0
13484
+ hideExpandExtras: !0,
13485
+ defaultHiddenLayerTags: ["view_layers:admin", "view_layers:ops"]
13485
13486
  };
13486
13487
  function zx({
13487
13488
  demoOptions: e,
@@ -13730,7 +13731,7 @@ function Bx({
13730
13731
  }).catch(() => {
13731
13732
  });
13732
13733
  }, []);
13733
- const [qt, tn] = $([]), [$t, bn] = $([]), Ct = ae([]);
13734
+ const [qt, tn] = $([]), [$t, bn] = $(() => (e == null ? void 0 : e.defaultHiddenLayerTags) ?? []), Ct = ae([]);
13734
13735
  Ct.current = $t;
13735
13736
  const [pn, Ft] = $(null), [Wt, Xt] = $(null), yo = U((w, V) => {
13736
13737
  Ft(w), Xt(w ? V ?? null : null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tldiagram/core-ui",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,6 +8,7 @@ export interface ViewEditorDemoOptions {
8
8
  disableOnboarding?: boolean
9
9
  hideFocusView?: boolean
10
10
  hideExpandExtras?: boolean
11
+ defaultHiddenLayerTags?: string[]
11
12
  }
12
13
 
13
14
  export const DEMO_VIEW_EDITOR_OPTIONS: Omit<ViewEditorDemoOptions, 'revealProgress'> = {
@@ -16,6 +17,7 @@ export const DEMO_VIEW_EDITOR_OPTIONS: Omit<ViewEditorDemoOptions, 'revealProgre
16
17
  disableOnboarding: true,
17
18
  hideFocusView: true,
18
19
  hideExpandExtras: true,
20
+ defaultHiddenLayerTags: ['view_layers:admin', 'view_layers:ops'],
19
21
  }
20
22
 
21
23
 
@@ -375,7 +375,7 @@ function ViewEditorInner({
375
375
  }, [])
376
376
 
377
377
  const [layers, setLayers] = useState<import('../../types').ViewLayer[]>([])
378
- const [hiddenLayerTags, setHiddenLayerTags] = useState<string[]>([])
378
+ const [hiddenLayerTags, setHiddenLayerTags] = useState<string[]>(() => demoOptions?.defaultHiddenLayerTags ?? [])
379
379
  const hiddenLayerTagsRef = useRef<string[]>([])
380
380
  hiddenLayerTagsRef.current = hiddenLayerTags
381
381
  const [hoveredLayerTags, setHoveredLayerTags] = useState<string[] | null>(null)