@dfosco/storyboard-core 2.3.0 → 2.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfosco/storyboard-core",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -550,11 +550,11 @@
550
550
  display: flex;
551
551
  flex-direction: column;
552
552
  gap: var(--base-size-8);
553
+ }
553
554
 
554
- & .listItem:only-child {
555
- border: 1px solid var(--borderColor-muted, #30363d);
556
- border-radius: var(--base-size-6);
557
- }
555
+ .protoGroup > .listItem {
556
+ border: 1px solid var(--borderColor-muted, #30363d);
557
+ border-radius: var(--base-size-6);
558
558
  }
559
559
 
560
560
  .folderGroup {
@@ -644,7 +644,7 @@
644
644
 
645
645
  .protoHeader[aria-expanded="true"] .cardBody {
646
646
  background-color: var(--bgColor-muted);
647
- border-radius: var(--base-size-8);
647
+ border-radius: var(--base-size-6);
648
648
  }
649
649
 
650
650
  .cardBody {
@@ -653,7 +653,7 @@
653
653
 
654
654
  .cardBody:hover {
655
655
  background-color: var(--bgColor-muted);
656
- border-radius: var(--base-size-8);
656
+ border-radius: var(--base-size-6);
657
657
  }
658
658
 
659
659
  .protoName {
@@ -736,7 +736,6 @@
736
736
  flex-direction: column;
737
737
  }
738
738
 
739
- .folderGroup .listItem,
740
739
  .flowItem {
741
740
  border: 1px solid var(--borderColor-muted);
742
741
  padding: 0;
@@ -750,14 +749,12 @@
750
749
  border-top-left-radius: var(--base-size-6);
751
750
  border-top-right-radius: var(--base-size-6);
752
751
  }
753
-
754
- .folderGroup .listItem:last-child,
752
+
755
753
  .flowItem:last-child {
756
754
  border-bottom-left-radius: var(--base-size-6);
757
755
  border-bottom-right-radius: var(--base-size-6);
758
756
  }
759
757
 
760
- .folderGroup .listItem:only-child,
761
758
  .flowItem:only-child {
762
759
  border-radius: var(--base-size-6);
763
760
  }
package/src/viewfinder.js CHANGED
@@ -101,7 +101,7 @@ export function buildPrototypeIndex(knownRoutes = []) {
101
101
  icon: meta.icon || null,
102
102
  team: meta.team || null,
103
103
  tags: meta.tags || null,
104
- hideFlows: meta.hideFlows || false,
104
+ hideFlows: meta.hideFlows ?? raw?.hideFlows ?? false,
105
105
  folder: raw?.folder || null,
106
106
  flows: [],
107
107
  }
@@ -183,6 +183,20 @@ describe('buildPrototypeIndex', () => {
183
183
  expect(proto.hideFlows).toBe(false)
184
184
  })
185
185
 
186
+ it('reads hideFlows from top-level prototype metadata (outside meta key)', () => {
187
+ init({
188
+ flows: { 'TopLevel/only-flow': { meta: { title: 'Only Flow' } } },
189
+ objects: {},
190
+ records: {},
191
+ prototypes: {
192
+ TopLevel: { meta: { title: 'Top Level' }, hideFlows: true },
193
+ },
194
+ })
195
+ const { prototypes } = buildPrototypeIndex([])
196
+ const proto = prototypes.find(p => p.dirName === 'TopLevel')
197
+ expect(proto.hideFlows).toBe(true)
198
+ })
199
+
186
200
  it('groups prototypes into folders when folder field is set', () => {
187
201
  init({
188
202
  flows: {