@squide/firefly 17.0.3 → 17.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @squide/firefly
2
2
 
3
+ ## 17.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#616](https://github.com/workleap/wl-squide/pull/616) [`be245cd`](https://github.com/workleap/wl-squide/commit/be245cd2141e9dc59fb328052ccbb8cd93e4937e) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Added `runtime.getNavigationItemsByMenu()` plus the matching `useRuntimeNavigationItemsByMenu` (`@squide/react-router`) and `useNavigationItemsByMenu` (`@squide/firefly`) hooks. The new APIs return the full navigation registry as a `Map<string, NavigationItem[]>` grouped by menu id. The returned map is a fresh, mutation-safe copy and is reference-stable across calls/renders until the registry changes (registration, deferred completion, or clear).
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`be245cd`](https://github.com/workleap/wl-squide/commit/be245cd2141e9dc59fb328052ccbb8cd93e4937e)]:
12
+ - @squide/core@7.1.0
13
+ - @squide/react-router@8.2.0
14
+
15
+ ## 17.0.4
16
+
17
+ ### Patch Changes
18
+
19
+ - [#608](https://github.com/workleap/wl-squide/pull/608) [`9161c5d`](https://github.com/workleap/wl-squide/commit/9161c5d9bbcaacd5a5b07aa676e2d0febb4b0520) Thanks [@alexasselin008](https://github.com/alexasselin008)! - Fixed `registerPublicRoute` to propagate the public visibility to nested children. Children with an explicit visibility option are preserved.
20
+
21
+ - Updated dependencies [[`9161c5d`](https://github.com/workleap/wl-squide/commit/9161c5d9bbcaacd5a5b07aa676e2d0febb4b0520)]:
22
+ - @squide/react-router@8.1.22
23
+
3
24
  ## 17.0.3
4
25
 
5
26
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -18,6 +18,7 @@ export * from "./useDeferredRegistrations.ts";
18
18
  export * from "./useIsActiveRouteProtected.ts";
19
19
  export * from "./useIsBootstrapping.ts";
20
20
  export * from "./useNavigationItems.ts";
21
+ export * from "./useNavigationItemsByMenu.ts";
21
22
  export * from "./useProtectedDataHandler.ts";
22
23
  export * from "./useProtectedDataQueries.ts";
23
24
  export * from "./usePublicDataHandler.ts";
package/dist/index.js CHANGED
@@ -13,6 +13,7 @@ export * from "./useDeferredRegistrations.js";
13
13
  export * from "./useIsActiveRouteProtected.js";
14
14
  export * from "./useIsBootstrapping.js";
15
15
  export * from "./useNavigationItems.js";
16
+ export * from "./useNavigationItemsByMenu.js";
16
17
  export * from "./useProtectedDataHandler.js";
17
18
  export * from "./useProtectedDataQueries.js";
18
19
  export * from "./usePublicDataHandler.js";
@@ -51,6 +52,7 @@ export * from "./initializeFirefly.js";
51
52
 
52
53
 
53
54
 
55
+
54
56
 
55
57
 
56
58
  export { EnvironmentVariablesPlugin, EnvironmentVariablesPluginName, getEnvironmentVariablesPlugin, useEnvironmentVariable, useEnvironmentVariables } from "@squide/env-vars";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["export * from \"@squide/core\";\nexport {\n EnvironmentVariablesPlugin,\n EnvironmentVariablesPluginName,\n getEnvironmentVariablesPlugin,\n useEnvironmentVariable,\n useEnvironmentVariables,\n type EnvironmentVariableKey,\n type EnvironmentVariables,\n type EnvironmentVariablesPluginOptions\n} from \"@squide/env-vars\";\nexport {\n createLocalStorageLaunchDarklyClient,\n FeatureFlagSetSnapshot,\n getFeatureFlag,\n getLaunchDarklyPlugin,\n InMemoryLaunchDarklyClient,\n isEditableLaunchDarklyClient,\n LaunchDarklyClientNotifier,\n LaunchDarklyClientTransaction,\n LaunchDarklyPlugin,\n LaunchDarklyPluginName,\n LocalStorageLaunchDarklyClient,\n useFeatureFlag,\n useFeatureFlags,\n useLaunchDarklyClient,\n type CommitTransactionFunction,\n type EditableLaunchDarklyClient,\n type FeatureFlagKey,\n type FeatureFlags,\n type FeatureFlagSetSnapshotChangedListener,\n type InMemoryLaunchDarklyClientOptions,\n type LaunchDarklyClientListener,\n type LocalStorageLaunchDarklyClientOptions,\n type SetFeatureFlagOptions,\n type UndoTransactionFunction\n} from \"@squide/launch-darkly\";\nexport {\n getMswPlugin,\n MswPlugin,\n MswPluginName,\n MswState,\n type MswPluginOptions,\n type MswPluginRegisterRequestHandlersOptions,\n type MswReadyListener,\n type MswStateOptions\n} from \"@squide/msw\";\nexport * from \"@squide/react-router\";\n\nexport type { FireflyPlugin } from \"./FireflyPlugin.ts\";\nexport * from \"./FireflyProvider.tsx\";\nexport * from \"./FireflyRuntime.tsx\";\n\nexport * from \"./AppRouter.tsx\";\nexport {\n ActiveRouteIsProtectedEvent,\n ActiveRouteIsPublicEvent,\n ApplicationBoostrappedEvent,\n DeferredRegistrationsUpdatedEvent,\n ModulesReadyEvent,\n ModulesRegisteredEvent,\n MswReadyEvent,\n ProtectedDataReadyEvent,\n ProtectedDataUpdatedEvent,\n PublicDataReadyEvent,\n PublicDataUpdatedEvent\n} from \"./AppRouterReducer.ts\";\n\nexport * from \"./AppRouterStore.ts\";\nexport * from \"./GlobalDataQueriesError.ts\";\nexport * from \"./useCanFetchProtectedData.ts\";\nexport * from \"./useCanFetchPublicData.ts\";\nexport * from \"./useCanRegisterDeferredRegistrations.ts\";\nexport * from \"./useCanUpdateDeferredRegistrations.ts\";\nexport * from \"./useDeferredRegistrations.ts\";\nexport * from \"./useIsActiveRouteProtected.ts\";\nexport * from \"./useIsBootstrapping.ts\";\nexport * from \"./useNavigationItems.ts\";\nexport * from \"./useProtectedDataHandler.ts\";\nexport * from \"./useProtectedDataQueries.ts\";\nexport * from \"./usePublicDataHandler.ts\";\nexport * from \"./usePublicDataQueries.ts\";\nexport * from \"./useRegisterDeferredRegistrations.ts\";\nexport * from \"./useStrictRegistrationMode.ts\";\nexport * from \"./useUpdateDeferredRegistrations.ts\";\n\nexport * from \"./initializeFirefly.ts\";\n\n"],"names":["EnvironmentVariablesPlugin","EnvironmentVariablesPluginName","getEnvironmentVariablesPlugin","useEnvironmentVariable","useEnvironmentVariables","createLocalStorageLaunchDarklyClient","FeatureFlagSetSnapshot","getFeatureFlag","getLaunchDarklyPlugin","InMemoryLaunchDarklyClient","isEditableLaunchDarklyClient","LaunchDarklyClientNotifier","LaunchDarklyClientTransaction","LaunchDarklyPlugin","LaunchDarklyPluginName","LocalStorageLaunchDarklyClient","useFeatureFlag","useFeatureFlags","useLaunchDarklyClient","getMswPlugin","MswPlugin","MswPluginName","MswState","ActiveRouteIsProtectedEvent","ActiveRouteIsPublicEvent","ApplicationBoostrappedEvent","DeferredRegistrationsUpdatedEvent","ModulesReadyEvent","ModulesRegisteredEvent","MswReadyEvent","ProtectedDataReadyEvent","ProtectedDataUpdatedEvent","PublicDataReadyEvent","PublicDataUpdatedEvent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAA6B;AAUH;AA0BK;AAUV;AACgB;AAGC;AACD;AAEL;AAaD;AAEK;AACQ;AACE;AACH;AACc;AACF;AACT;AACC;AACP;AACA;AACK;AACA;AACH;AACA;AACY;AACP;AACK;AAEb"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["export * from \"@squide/core\";\nexport {\n EnvironmentVariablesPlugin,\n EnvironmentVariablesPluginName,\n getEnvironmentVariablesPlugin,\n useEnvironmentVariable,\n useEnvironmentVariables,\n type EnvironmentVariableKey,\n type EnvironmentVariables,\n type EnvironmentVariablesPluginOptions\n} from \"@squide/env-vars\";\nexport {\n createLocalStorageLaunchDarklyClient,\n FeatureFlagSetSnapshot,\n getFeatureFlag,\n getLaunchDarklyPlugin,\n InMemoryLaunchDarklyClient,\n isEditableLaunchDarklyClient,\n LaunchDarklyClientNotifier,\n LaunchDarklyClientTransaction,\n LaunchDarklyPlugin,\n LaunchDarklyPluginName,\n LocalStorageLaunchDarklyClient,\n useFeatureFlag,\n useFeatureFlags,\n useLaunchDarklyClient,\n type CommitTransactionFunction,\n type EditableLaunchDarklyClient,\n type FeatureFlagKey,\n type FeatureFlags,\n type FeatureFlagSetSnapshotChangedListener,\n type InMemoryLaunchDarklyClientOptions,\n type LaunchDarklyClientListener,\n type LocalStorageLaunchDarklyClientOptions,\n type SetFeatureFlagOptions,\n type UndoTransactionFunction\n} from \"@squide/launch-darkly\";\nexport {\n getMswPlugin,\n MswPlugin,\n MswPluginName,\n MswState,\n type MswPluginOptions,\n type MswPluginRegisterRequestHandlersOptions,\n type MswReadyListener,\n type MswStateOptions\n} from \"@squide/msw\";\nexport * from \"@squide/react-router\";\n\nexport type { FireflyPlugin } from \"./FireflyPlugin.ts\";\nexport * from \"./FireflyProvider.tsx\";\nexport * from \"./FireflyRuntime.tsx\";\n\nexport * from \"./AppRouter.tsx\";\nexport {\n ActiveRouteIsProtectedEvent,\n ActiveRouteIsPublicEvent,\n ApplicationBoostrappedEvent,\n DeferredRegistrationsUpdatedEvent,\n ModulesReadyEvent,\n ModulesRegisteredEvent,\n MswReadyEvent,\n ProtectedDataReadyEvent,\n ProtectedDataUpdatedEvent,\n PublicDataReadyEvent,\n PublicDataUpdatedEvent\n} from \"./AppRouterReducer.ts\";\n\nexport * from \"./AppRouterStore.ts\";\nexport * from \"./GlobalDataQueriesError.ts\";\nexport * from \"./useCanFetchProtectedData.ts\";\nexport * from \"./useCanFetchPublicData.ts\";\nexport * from \"./useCanRegisterDeferredRegistrations.ts\";\nexport * from \"./useCanUpdateDeferredRegistrations.ts\";\nexport * from \"./useDeferredRegistrations.ts\";\nexport * from \"./useIsActiveRouteProtected.ts\";\nexport * from \"./useIsBootstrapping.ts\";\nexport * from \"./useNavigationItems.ts\";\nexport * from \"./useNavigationItemsByMenu.ts\";\nexport * from \"./useProtectedDataHandler.ts\";\nexport * from \"./useProtectedDataQueries.ts\";\nexport * from \"./usePublicDataHandler.ts\";\nexport * from \"./usePublicDataQueries.ts\";\nexport * from \"./useRegisterDeferredRegistrations.ts\";\nexport * from \"./useStrictRegistrationMode.ts\";\nexport * from \"./useUpdateDeferredRegistrations.ts\";\n\nexport * from \"./initializeFirefly.ts\";\n\n"],"names":["EnvironmentVariablesPlugin","EnvironmentVariablesPluginName","getEnvironmentVariablesPlugin","useEnvironmentVariable","useEnvironmentVariables","createLocalStorageLaunchDarklyClient","FeatureFlagSetSnapshot","getFeatureFlag","getLaunchDarklyPlugin","InMemoryLaunchDarklyClient","isEditableLaunchDarklyClient","LaunchDarklyClientNotifier","LaunchDarklyClientTransaction","LaunchDarklyPlugin","LaunchDarklyPluginName","LocalStorageLaunchDarklyClient","useFeatureFlag","useFeatureFlags","useLaunchDarklyClient","getMswPlugin","MswPlugin","MswPluginName","MswState","ActiveRouteIsProtectedEvent","ActiveRouteIsPublicEvent","ApplicationBoostrappedEvent","DeferredRegistrationsUpdatedEvent","ModulesReadyEvent","ModulesRegisteredEvent","MswReadyEvent","ProtectedDataReadyEvent","ProtectedDataUpdatedEvent","PublicDataReadyEvent","PublicDataUpdatedEvent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA6B;AAUH;AA0BK;AAUV;AACgB;AAGC;AACD;AAEL;AAaD;AAEK;AACQ;AACE;AACH;AACc;AACF;AACT;AACC;AACP;AACA;AACM;AACD;AACA;AACH;AACA;AACY;AACP;AACK;AAEb"}
@@ -0,0 +1 @@
1
+ export declare function useNavigationItemsByMenu(): Map<string, import("@squide/react-router").RootNavigationItem[]>;
@@ -0,0 +1,17 @@
1
+ import { useRuntimeNavigationItemsByMenu } from "@squide/react-router";
2
+ import { useAppRouterState } from "./AppRouterContext.js";
3
+
4
+
5
+
6
+
7
+
8
+ function useNavigationItemsByMenu() {
9
+ // See useNavigationItems.ts for the rationale behind subscribing to the AppRouter state — it ensures
10
+ // a re-render when deferred registrations update the registry.
11
+ useAppRouterState();
12
+ return useRuntimeNavigationItemsByMenu();
13
+ }
14
+
15
+ export { useNavigationItemsByMenu };
16
+
17
+ //# sourceMappingURL=useNavigationItemsByMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNavigationItemsByMenu.js","sources":["../src/useNavigationItemsByMenu.ts"],"sourcesContent":["import { useRuntimeNavigationItemsByMenu } from \"@squide/react-router\";\nimport { useAppRouterState } from \"./AppRouterContext.ts\";\n\nexport function useNavigationItemsByMenu() {\n // See useNavigationItems.ts for the rationale behind subscribing to the AppRouter state — it ensures\n // a re-render when deferred registrations update the registry.\n useAppRouterState();\n\n return useRuntimeNavigationItemsByMenu();\n}\n"],"names":["useRuntimeNavigationItemsByMenu","useAppRouterState","useNavigationItemsByMenu"],"mappings":";;;;;AAAuE;AACb;AAEnD,SAASE,wBAAwBA;IACpC,qGAAqG;IACrG,+DAA+D;IAC/DD,iBAAiBA;IAEjB,OAAOD,+BAA+BA;AAC1C"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@squide/firefly",
3
3
  "author": "Workleap",
4
- "version": "17.0.3",
4
+ "version": "17.1.0",
5
5
  "description": "Squide bundle for the firefly technology stack.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -49,11 +49,11 @@
49
49
  "@workleap-telemetry/core": "^2.0.2",
50
50
  "@workleap/logging": "^1.3.8",
51
51
  "uuid": "^14.0.0",
52
- "@squide/core": "^7.0.1",
52
+ "@squide/core": "^7.1.0",
53
53
  "@squide/env-vars": "^1.4.22",
54
54
  "@squide/launch-darkly": "^1.0.15",
55
55
  "@squide/msw": "^4.0.20",
56
- "@squide/react-router": "^8.1.21"
56
+ "@squide/react-router": "^8.2.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@eslint/js": "9.39.2",
package/src/index.ts CHANGED
@@ -76,6 +76,7 @@ export * from "./useDeferredRegistrations.ts";
76
76
  export * from "./useIsActiveRouteProtected.ts";
77
77
  export * from "./useIsBootstrapping.ts";
78
78
  export * from "./useNavigationItems.ts";
79
+ export * from "./useNavigationItemsByMenu.ts";
79
80
  export * from "./useProtectedDataHandler.ts";
80
81
  export * from "./useProtectedDataQueries.ts";
81
82
  export * from "./usePublicDataHandler.ts";
@@ -0,0 +1,10 @@
1
+ import { useRuntimeNavigationItemsByMenu } from "@squide/react-router";
2
+ import { useAppRouterState } from "./AppRouterContext.ts";
3
+
4
+ export function useNavigationItemsByMenu() {
5
+ // See useNavigationItems.ts for the rationale behind subscribing to the AppRouter state — it ensures
6
+ // a re-render when deferred registrations update the registry.
7
+ useAppRouterState();
8
+
9
+ return useRuntimeNavigationItemsByMenu();
10
+ }