@vc-shell/vc-app-skill 2.0.0-alpha.32 → 2.0.0-alpha.33-pr220.455e322

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.
Files changed (195) hide show
  1. package/CHANGELOG.md +59 -47
  2. package/README.md +18 -12
  3. package/package.json +4 -4
  4. package/runtime/VERSION +1 -1
  5. package/runtime/agents/api-analyzer.md +31 -16
  6. package/runtime/agents/blade-enhancer.md +15 -9
  7. package/runtime/agents/details-blade-generator.md +47 -31
  8. package/runtime/agents/list-blade-generator.md +21 -37
  9. package/runtime/agents/locales-generator.md +3 -0
  10. package/runtime/agents/migration-agent.md +94 -0
  11. package/runtime/agents/module-analyzer.md +2 -0
  12. package/runtime/agents/module-assembler.md +15 -0
  13. package/runtime/agents/promote-agent.md +15 -4
  14. package/runtime/agents/type-checker.md +11 -0
  15. package/runtime/knowledge/docs/_BUILD_HASH.md +1 -1
  16. package/runtime/knowledge/docs/core/api/platform.docs.md +30 -30
  17. package/runtime/knowledge/docs/core/blade-navigation/blade-nav-composables.docs.md +41 -41
  18. package/runtime/knowledge/docs/core/composables/bladeContext/index.docs.md +12 -10
  19. package/runtime/knowledge/docs/core/composables/useApiClient/useApiClient.docs.md +11 -14
  20. package/runtime/knowledge/docs/core/composables/useAppBarMobileButtons/useAppBarMobileButtons.docs.md +35 -35
  21. package/runtime/knowledge/docs/core/composables/useAppBarWidget/useAppBarWidget.docs.md +35 -35
  22. package/runtime/knowledge/docs/core/composables/useAppInsights/useAppInsights.docs.md +15 -15
  23. package/runtime/knowledge/docs/core/composables/useAssets/useAssets.docs.md +21 -18
  24. package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +31 -27
  25. package/runtime/knowledge/docs/core/composables/useAsync/useAsync.docs.md +90 -61
  26. package/runtime/knowledge/docs/core/composables/useBeforeUnload/useBeforeUnload.docs.md +19 -18
  27. package/runtime/knowledge/docs/core/composables/useBlade/useBlade.docs.md +89 -68
  28. package/runtime/knowledge/docs/core/composables/useBladeForm/useBladeForm.docs.md +75 -19
  29. package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +15 -15
  30. package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +74 -78
  31. package/runtime/knowledge/docs/core/composables/useBreadcrumbs/useBreadcrumbs.docs.md +11 -11
  32. package/runtime/knowledge/docs/core/composables/useConnectionStatus/useConnectionStatus.docs.md +27 -15
  33. package/runtime/knowledge/docs/core/composables/useDashboard/useDashboard.docs.md +30 -30
  34. package/runtime/knowledge/docs/core/composables/useDynamicProperties/useDynamicProperties.docs.md +34 -36
  35. package/runtime/knowledge/docs/core/composables/useErrorHandler/useErrorHandler.docs.md +44 -23
  36. package/runtime/knowledge/docs/core/composables/useFunctions/useFunctions.docs.md +14 -11
  37. package/runtime/knowledge/docs/core/composables/useKeyboardNavigation/useKeyboardNavigation.docs.md +47 -38
  38. package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +37 -28
  39. package/runtime/knowledge/docs/core/composables/useLoading/useLoading.docs.md +23 -17
  40. package/runtime/knowledge/docs/core/composables/useMenuExpanded/index.docs.md +10 -10
  41. package/runtime/knowledge/docs/core/composables/useMenuService/useMenuService.docs.md +42 -42
  42. package/runtime/knowledge/docs/core/composables/useModificationTracker/useModificationTracker.docs.md +22 -12
  43. package/runtime/knowledge/docs/core/composables/useNotifications/useNotifications.docs.md +33 -41
  44. package/runtime/knowledge/docs/core/composables/usePermissions/usePermissions.docs.md +16 -16
  45. package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +32 -24
  46. package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +32 -11
  47. package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +24 -15
  48. package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +7 -7
  49. package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +32 -24
  50. package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +21 -17
  51. package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +24 -24
  52. package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +28 -31
  53. package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +43 -24
  54. package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +68 -48
  55. package/runtime/knowledge/docs/core/composables/useWebVitals/useWebVitals.docs.md +19 -19
  56. package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +42 -47
  57. package/runtime/knowledge/docs/core/directives/autofocus/autofocus.docs.md +10 -4
  58. package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +35 -20
  59. package/runtime/knowledge/docs/core/notifications/notifications.docs.md +36 -35
  60. package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +38 -38
  61. package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +107 -91
  62. package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +10 -10
  63. package/runtime/knowledge/docs/core/plugins/i18n/i18n.docs.md +21 -23
  64. package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +98 -90
  65. package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +10 -16
  66. package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +9 -9
  67. package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +65 -22
  68. package/runtime/knowledge/docs/core/services/services.docs.md +19 -22
  69. package/runtime/knowledge/docs/core/types/types.docs.md +40 -40
  70. package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +27 -27
  71. package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +23 -23
  72. package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +22 -25
  73. package/runtime/knowledge/docs/core/utilities/utilities.docs.md +64 -64
  74. package/runtime/knowledge/docs/injection-keys.docs.md +52 -51
  75. package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +9 -9
  76. package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +23 -43
  77. package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +102 -0
  78. package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +5 -5
  79. package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +8 -7
  80. package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +7 -7
  81. package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +8 -7
  82. package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +29 -13
  83. package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +13 -16
  84. package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +1 -7
  85. package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +5 -5
  86. package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +1 -1
  87. package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +1 -1
  88. package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +17 -9
  89. package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +12 -18
  90. package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +34 -65
  91. package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +16 -26
  92. package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +2 -2
  93. package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +7 -9
  94. package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +30 -40
  95. package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +26 -19
  96. package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +15 -12
  97. package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +15 -26
  98. package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +21 -19
  99. package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +83 -67
  100. package/runtime/knowledge/docs/ui/components/atoms/vc-card/vc-card.docs.md +104 -59
  101. package/runtime/knowledge/docs/ui/components/atoms/vc-col/vc-col.docs.md +28 -11
  102. package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +20 -17
  103. package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +26 -17
  104. package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +30 -32
  105. package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +25 -48
  106. package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +29 -24
  107. package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +23 -15
  108. package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +22 -13
  109. package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +33 -18
  110. package/runtime/knowledge/docs/ui/components/atoms/vc-row/vc-row.docs.md +56 -15
  111. package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +28 -15
  112. package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +40 -20
  113. package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +25 -14
  114. package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +40 -14
  115. package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +54 -42
  116. package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +17 -17
  117. package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +21 -21
  118. package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +23 -10
  119. package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +59 -44
  120. package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +23 -20
  121. package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +96 -64
  122. package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +26 -35
  123. package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +69 -22
  124. package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +58 -72
  125. package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +91 -85
  126. package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md +38 -42
  127. package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +60 -72
  128. package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +65 -26
  129. package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +46 -49
  130. package/runtime/knowledge/docs/ui/components/molecules/vc-form/vc-form.docs.md +35 -64
  131. package/runtime/knowledge/docs/ui/components/molecules/vc-image-tile/vc-image-tile.docs.md +38 -41
  132. package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +115 -130
  133. package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +53 -87
  134. package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +56 -63
  135. package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +29 -24
  136. package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +32 -28
  137. package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +63 -64
  138. package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +28 -26
  139. package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +59 -19
  140. package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +25 -34
  141. package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +42 -32
  142. package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +78 -82
  143. package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +25 -15
  144. package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +59 -63
  145. package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +57 -69
  146. package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +58 -57
  147. package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +49 -26
  148. package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +82 -28
  149. package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +120 -75
  150. package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +30 -44
  151. package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +536 -365
  152. package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +35 -52
  153. package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +33 -62
  154. package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +17 -23
  155. package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +109 -68
  156. package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +82 -44
  157. package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +8 -8
  158. package/runtime/knowledge/docs/ui/composables/useDataTablePagination.docs.md +164 -0
  159. package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +34 -26
  160. package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +48 -40
  161. package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +30 -17
  162. package/runtime/knowledge/docs/ui/types/ui-types.docs.md +40 -29
  163. package/runtime/knowledge/examples/offers-module.md +15 -13
  164. package/runtime/knowledge/examples/team-module.md +82 -119
  165. package/runtime/knowledge/examples/videos-module.md +44 -17
  166. package/runtime/knowledge/index.md +22 -0
  167. package/runtime/knowledge/migration-prompts/blade-form-migration.md +255 -0
  168. package/runtime/knowledge/migration-prompts/blade-props-migration.md +194 -0
  169. package/runtime/knowledge/migration-prompts/datatable-migration.md +801 -0
  170. package/runtime/knowledge/migration-prompts/icon-migration.md +97 -0
  171. package/runtime/knowledge/migration-prompts/manual-migration-audit.md +117 -0
  172. package/runtime/knowledge/migration-prompts/notifications-migration.md +223 -0
  173. package/runtime/knowledge/migration-prompts/nswag-migration.md +244 -0
  174. package/runtime/knowledge/migration-prompts/use-assets-migration.md +164 -0
  175. package/runtime/knowledge/migration-prompts/use-data-table-pagination-migration.md +176 -0
  176. package/runtime/knowledge/migration-prompts/widgets-migration.md +178 -0
  177. package/runtime/knowledge/patterns/assets-management.md +20 -20
  178. package/runtime/knowledge/patterns/blade-navigation.md +7 -14
  179. package/runtime/knowledge/patterns/blade-widget.md +19 -17
  180. package/runtime/knowledge/patterns/child-blade-flow.md +19 -7
  181. package/runtime/knowledge/patterns/composable-details.md +20 -50
  182. package/runtime/knowledge/patterns/composable-list.md +43 -31
  183. package/runtime/knowledge/patterns/dashboard-widget.md +14 -16
  184. package/runtime/knowledge/patterns/datatable-pattern.md +521 -0
  185. package/runtime/knowledge/patterns/details-blade-pattern.md +78 -116
  186. package/runtime/knowledge/patterns/extension-points-usage.md +53 -44
  187. package/runtime/knowledge/patterns/form-validation.md +28 -64
  188. package/runtime/knowledge/patterns/list-blade-pattern.md +33 -21
  189. package/runtime/knowledge/patterns/module-structure.md +7 -1
  190. package/runtime/knowledge/patterns/multilanguage-fields.md +8 -14
  191. package/runtime/knowledge/patterns/notification-template.md +21 -14
  192. package/runtime/knowledge/patterns/signalr-notifications.md +30 -32
  193. package/runtime/knowledge/patterns/toolbar-pattern.md +18 -20
  194. package/runtime/vc-app.md +354 -49
  195. package/runtime/knowledge/docs/core/constants/constants.docs.md +0 -185
@@ -3,6 +3,7 @@
3
3
  Wraps an asynchronous function with reactive `loading` state, reactive `error` state, and automatic error notifications. This is the standard way to handle API calls, saves, deletes, and other async operations throughout VC-Shell applications.
4
4
 
5
5
  When the returned `action` is called, `useAsync` automatically:
6
+
6
7
  1. Sets `loading` to `true` and clears any previous `error`
7
8
  2. Executes your async function
8
9
  3. On failure: parses the error into a `DisplayableError`, stores it in `error`, logs it, optionally shows a toast notification, and re-throws
@@ -23,7 +24,11 @@ import { OrderClient } from "@api/orders";
23
24
 
24
25
  const { getApiClient } = useApiClient(OrderClient);
25
26
 
26
- const { loading, error, action: loadOrder } = useAsync<string>(async (id) => {
27
+ const {
28
+ loading,
29
+ error,
30
+ action: loadOrder,
31
+ } = useAsync<string>(async (id) => {
27
32
  const client = await getApiClient();
28
33
  return await client.getOrderById(id);
29
34
  });
@@ -44,41 +49,38 @@ import { useAsync } from "@vc-shell/framework";
44
49
 
45
50
  ### Parameters
46
51
 
47
- | Parameter | Type | Required | Description |
48
- |---------------|---------------------------------|----------|--------------------------------------------------|
49
- | `innerAction` | `AsyncAction<Payload, Result>` | Yes | The async function to wrap |
50
- | `options` | `UseAsyncOptions` | No | Configuration for notifications |
52
+ | Parameter | Type | Required | Description |
53
+ | ------------- | ------------------------------ | -------- | ------------------------------- |
54
+ | `innerAction` | `AsyncAction<Payload, Result>` | Yes | The async function to wrap |
55
+ | `options` | `UseAsyncOptions` | No | Configuration for notifications |
51
56
 
52
57
  #### Type Aliases
53
58
 
54
59
  ```typescript
55
- type AsyncAction<Payload = void, Result = void> = (
56
- payload?: Payload,
57
- ...rest: any[]
58
- ) => Promise<Result>;
60
+ type AsyncAction<Payload = void, Result = void> = (payload?: Payload, ...rest: any[]) => Promise<Result>;
59
61
  ```
60
62
 
61
63
  #### UseAsyncOptions
62
64
 
63
- | Option | Type | Default | Description |
64
- |-----------------|-----------|---------|------------------------------------------------------|
65
- | `notify` | `boolean` | `true` | Show an error toast notification on failure |
65
+ | Option | Type | Default | Description |
66
+ | --------------- | --------- | ------- | -------------------------------------------------------- |
67
+ | `notify` | `boolean` | `true` | Show an error toast notification on failure |
66
68
  | `notifyTimeout` | `number` | `8000` | Duration in milliseconds before the toast auto-dismisses |
67
69
 
68
70
  ### Returns: `UseAsyncReturn<Payload, Result>`
69
71
 
70
- | Property | Type | Description |
71
- |-----------|---------------------------------------------|-------------------------------------------------------------------|
72
- | `loading` | `DeepReadonly<Ref<boolean>>` | Reactive loading state -- `true` while the action is executing |
73
- | `error` | `DeepReadonly<Ref<DisplayableError \| null>>` | Reactive error -- set on failure, cleared on next invocation |
74
- | `action` | `AsyncAction<Payload, Result>` | Wrapped function with the same signature as `innerAction` |
72
+ | Property | Type | Description |
73
+ | --------- | --------------------------------------------- | -------------------------------------------------------------- |
74
+ | `loading` | `DeepReadonly<Ref<boolean>>` | Reactive loading state -- `true` while the action is executing |
75
+ | `error` | `DeepReadonly<Ref<DisplayableError \| null>>` | Reactive error -- set on failure, cleared on next invocation |
76
+ | `action` | `AsyncAction<Payload, Result>` | Wrapped function with the same signature as `innerAction` |
75
77
 
76
78
  ### Type Parameters
77
79
 
78
- | Name | Default | Description |
79
- |-----------|---------|--------------------------------------------------------|
80
- | `Payload` | `void` | Type of the first argument passed to `action` |
81
- | `Result` | `void` | Return type of the async operation |
80
+ | Name | Default | Description |
81
+ | --------- | ------- | --------------------------------------------- |
82
+ | `Payload` | `void` | Type of the first argument passed to `action` |
83
+ | `Result` | `void` | Return type of the async operation |
82
84
 
83
85
  ---
84
86
 
@@ -117,12 +119,10 @@ await loadProduct("prod-42");
117
119
  When the inner function returns a value, it becomes the resolved value of `action`:
118
120
 
119
121
  ```typescript
120
- const { action: validateSeller } = useAsync<Seller, ValidationFailure[]>(
121
- async (seller) => {
122
- const client = await getApiClient();
123
- return await client.validateSeller(seller);
124
- },
125
- );
122
+ const { action: validateSeller } = useAsync<Seller, ValidationFailure[]>(async (seller) => {
123
+ const client = await getApiClient();
124
+ return await client.validateSeller(seller);
125
+ });
126
126
 
127
127
  const failures = await validateSeller(sellerData);
128
128
  // failures is typed as ValidationFailure[]
@@ -134,14 +134,25 @@ The `error` ref contains a parsed `DisplayableError` after a failure. It is auto
134
134
 
135
135
  ```vue
136
136
  <template>
137
- <VcAlert v-if="error" variant="error">
137
+ <VcAlert
138
+ v-if="error"
139
+ variant="error"
140
+ >
138
141
  {{ error.message }}
139
142
  </VcAlert>
140
- <VcButton :loading="loading" @click="save">Save</VcButton>
143
+ <VcButton
144
+ :loading="loading"
145
+ @click="save"
146
+ >Save</VcButton
147
+ >
141
148
  </template>
142
149
 
143
150
  <script setup lang="ts">
144
- const { loading, error, action: save } = useAsync(async () => {
151
+ const {
152
+ loading,
153
+ error,
154
+ action: save,
155
+ } = useAsync(async () => {
145
156
  await saveOrder(order.value);
146
157
  });
147
158
  </script>
@@ -153,18 +164,30 @@ By default, `useAsync` shows a toast notification on failure. The notification i
153
164
 
154
165
  ```typescript
155
166
  // Default: shows toast on error
156
- const { action: save } = useAsync(async () => { /* ... */ });
167
+ const { action: save } = useAsync(async () => {
168
+ /* ... */
169
+ });
157
170
 
158
171
  // Explicit: custom timeout
159
- const { action: save } = useAsync(async () => { /* ... */ }, {
160
- notify: true,
161
- notifyTimeout: 5000,
162
- });
172
+ const { action: save } = useAsync(
173
+ async () => {
174
+ /* ... */
175
+ },
176
+ {
177
+ notify: true,
178
+ notifyTimeout: 5000,
179
+ },
180
+ );
163
181
 
164
182
  // Silent: no toast notification
165
- const { action: silentRefresh } = useAsync(async () => { /* ... */ }, {
166
- notify: false,
167
- });
183
+ const { action: silentRefresh } = useAsync(
184
+ async () => {
185
+ /* ... */
186
+ },
187
+ {
188
+ notify: false,
189
+ },
190
+ );
168
191
  ```
169
192
 
170
193
  ### Combining with useApiClient
@@ -190,9 +213,15 @@ const { action: search, loading } = useAsync<SearchQuery>(async (query) => {
190
213
  When a blade has multiple async operations, combine their loading states into one:
191
214
 
192
215
  ```typescript
193
- const { action: load, loading: loadLoading } = useAsync<string>(async (id) => { /* ... */ });
194
- const { action: save, loading: saveLoading } = useAsync<Product>(async (p) => { /* ... */ });
195
- const { action: remove, loading: deleteLoading } = useAsync<string>(async (id) => { /* ... */ });
216
+ const { action: load, loading: loadLoading } = useAsync<string>(async (id) => {
217
+ /* ... */
218
+ });
219
+ const { action: save, loading: saveLoading } = useAsync<Product>(async (p) => {
220
+ /* ... */
221
+ });
222
+ const { action: remove, loading: deleteLoading } = useAsync<string>(async (id) => {
223
+ /* ... */
224
+ });
196
225
 
197
226
  // Single reactive boolean: true if ANY operation is running
198
227
  const loading = useLoading(loadLoading, saveLoading, deleteLoading);
@@ -220,19 +249,15 @@ export function useFulfillmentCenter() {
220
249
  details.value = await client.getFulfillmentCenterById(id!);
221
250
  });
222
251
 
223
- const { action: save, loading: saveLoading } = useAsync<FulfillmentCenter>(
224
- async (data) => {
225
- const client = await getApiClient();
226
- await client.updateFulfillmentCenter({ fulfillmentCenter: data });
227
- },
228
- );
252
+ const { action: save, loading: saveLoading } = useAsync<FulfillmentCenter>(async (data) => {
253
+ const client = await getApiClient();
254
+ await client.updateFulfillmentCenter({ fulfillmentCenter: data });
255
+ });
229
256
 
230
- const { action: remove, loading: deleteLoading } = useAsync<string>(
231
- async (id) => {
232
- const client = await getApiClient();
233
- await client.deleteFulfillmentCenter([id!]);
234
- },
235
- );
257
+ const { action: remove, loading: deleteLoading } = useAsync<string>(async (id) => {
258
+ const client = await getApiClient();
259
+ await client.deleteFulfillmentCenter([id!]);
260
+ });
236
261
 
237
262
  return {
238
263
  details,
@@ -341,14 +366,18 @@ async function onSave() {
341
366
  ```typescript
342
367
  // BAD -- creates a new loading ref each call, template never sees it
343
368
  async function loadData() {
344
- const { action, loading } = useAsync(async () => { /* ... */ });
369
+ const { action, loading } = useAsync(async () => {
370
+ /* ... */
371
+ });
345
372
  await action();
346
373
  }
347
374
  ```
348
375
 
349
376
  ```typescript
350
377
  // GOOD -- create at setup time, call the action later
351
- const { action: loadData, loading } = useAsync(async () => { /* ... */ });
378
+ const { action: loadData, loading } = useAsync(async () => {
379
+ /* ... */
380
+ });
352
381
 
353
382
  onMounted(() => loadData());
354
383
  ```
@@ -381,9 +410,9 @@ const { action: save, loading: saveLoading } = useAsync(async () => saveData());
381
410
 
382
411
  ## Related
383
412
 
384
- | Resource | Description |
385
- |----------|-------------|
386
- | [`useApiClient`](../useApiClient/) | Provides typed API client instances to pass into `useAsync` |
387
- | [`useLoading`](../useLoading/) | Combines multiple `loading` refs into a single boolean |
388
- | [`useModificationTracker`](../useModificationTracker/) | Tracks dirty state for forms -- often used alongside `useAsync` for save operations |
389
- | [`notification`](../../../shared/components/notifications/) | The toast notification system used by `useAsync` for error display |
413
+ | Resource | Description |
414
+ | ----------------------------------------------------------- | ----------------------------------------------------------------------------------- |
415
+ | [`useApiClient`](../useApiClient/) | Provides typed API client instances to pass into `useAsync` |
416
+ | [`useLoading`](../useLoading/) | Combines multiple `loading` refs into a single boolean |
417
+ | [`useModificationTracker`](../useModificationTracker/) | Tracks dirty state for forms -- often used alongside `useAsync` for save operations |
418
+ | [`notification`](../../../shared/components/notifications/) | The toast notification system used by `useAsync` for error display |
@@ -12,12 +12,12 @@ Prevents the browser tab from closing when unsaved changes exist by hooking into
12
12
 
13
13
  ```vue
14
14
  <script setup lang="ts">
15
- import { useBeforeUnload } from '@vc-shell/framework';
16
- import { ref, computed } from 'vue';
15
+ import { useBeforeUnload } from "@vc-shell/framework";
16
+ import { ref, computed } from "vue";
17
17
 
18
18
  // Suppose your blade has a form with a "dirty" flag
19
- const originalName = ref('Widget A');
20
- const currentName = ref('Widget A');
19
+ const originalName = ref("Widget A");
20
+ const currentName = ref("Widget A");
21
21
 
22
22
  const isModified = computed(() => originalName.value !== currentName.value);
23
23
 
@@ -27,7 +27,10 @@ useBeforeUnload(isModified);
27
27
 
28
28
  <template>
29
29
  <VcBlade title="Edit Widget">
30
- <VcInput v-model="currentName" label="Name" />
30
+ <VcInput
31
+ v-model="currentName"
32
+ label="Name"
33
+ />
31
34
  <VcButton @click="save">Save</VcButton>
32
35
  </VcBlade>
33
36
  </template>
@@ -37,14 +40,14 @@ useBeforeUnload(isModified);
37
40
 
38
41
  ### Parameters
39
42
 
40
- | Parameter | Type | Required | Description |
41
- |---|---|---|---|
42
- | `modified` | `ComputedRef<boolean>` | Yes | When `true`, the browser shows a leave-confirmation dialog on tab close or refresh |
43
+ | Parameter | Type | Required | Description |
44
+ | ---------- | ---------------------- | -------- | ---------------------------------------------------------------------------------- |
45
+ | `modified` | `ComputedRef<boolean>` | Yes | When `true`, the browser shows a leave-confirmation dialog on tab close or refresh |
43
46
 
44
47
  ### Returns
45
48
 
46
- | Property | Type | Description |
47
- |---|---|---|
49
+ | Property | Type | Description |
50
+ | ---------- | ---------------------- | ----------------------------------------------------------------------- |
48
51
  | `modified` | `ComputedRef<boolean>` | Pass-through of the input ref, useful for chaining or template bindings |
49
52
 
50
53
  ## How It Works
@@ -57,13 +60,13 @@ Because the listener is added in `onBeforeMount` (not `setup`), it avoids attach
57
60
 
58
61
  ```vue
59
62
  <script setup lang="ts">
60
- import { useBeforeUnload } from '@vc-shell/framework';
61
- import { ref, computed, watch } from 'vue';
63
+ import { useBeforeUnload } from "@vc-shell/framework";
64
+ import { ref, computed, watch } from "vue";
62
65
 
63
66
  const props = defineProps<{ productId: string }>();
64
67
 
65
- const product = ref({ name: '', price: 0 });
66
- const snapshot = ref({ name: '', price: 0 });
68
+ const product = ref({ name: "", price: 0 });
69
+ const snapshot = ref({ name: "", price: 0 });
67
70
 
68
71
  // Load data and take a snapshot of the original state
69
72
  async function load() {
@@ -73,9 +76,7 @@ async function load() {
73
76
  }
74
77
 
75
78
  // Deep-compare current vs. snapshot
76
- const isModified = computed(() =>
77
- JSON.stringify(product.value) !== JSON.stringify(snapshot.value),
78
- );
79
+ const isModified = computed(() => JSON.stringify(product.value) !== JSON.stringify(snapshot.value));
79
80
 
80
81
  // Guard the browser tab
81
82
  useBeforeUnload(isModified);
@@ -84,7 +85,7 @@ useBeforeUnload(isModified);
84
85
  defineExpose({
85
86
  onBeforeClose: () => {
86
87
  if (isModified.value) {
87
- return confirm('You have unsaved changes. Discard?');
88
+ return confirm("You have unsaved changes. Discard?");
88
89
  }
89
90
  return true;
90
91
  },
@@ -44,7 +44,9 @@ openBlade({ name: "OrderDetails", param: "order-123" });
44
44
  import { useBlade } from "@vc-shell/framework";
45
45
 
46
46
  // Typed options — no manual casting needed
47
- interface BladeOptions { sellerProduct?: SellerProduct }
47
+ interface BladeOptions {
48
+ sellerProduct?: SellerProduct;
49
+ }
48
50
  const { param, options, callParent } = useBlade<BladeOptions>();
49
51
 
50
52
  console.log(options.value?.sellerProduct); // typed as SellerProduct | undefined
@@ -70,7 +72,10 @@ const blade = useBlade();
70
72
  `useBlade<TOptions>()` accepts an optional generic to type the `options` computed ref:
71
73
 
72
74
  ```typescript
73
- interface MyOptions { productId: string; mode: "edit" | "create" }
75
+ interface MyOptions {
76
+ productId: string;
77
+ mode: "edit" | "create";
78
+ }
74
79
  const { options } = useBlade<MyOptions>();
75
80
  // options.value is MyOptions | undefined — no manual casting needed
76
81
  ```
@@ -83,68 +88,68 @@ Without the generic, `options.value` defaults to `Record<string, unknown> | unde
83
88
 
84
89
  These are reactive `ComputedRef` values that reflect the current blade's state. Accessing them outside blade context throws a runtime error.
85
90
 
86
- | Property | Type | Description |
87
- |------------|-------------------------------------------------------|---------------------------------------------------------|
88
- | `id` | `ComputedRef<string>` | The current blade's unique ID within the blade stack |
89
- | `param` | `ComputedRef<string \| undefined>` | Route parameter passed when the blade was opened |
90
- | `options` | `ComputedRef<TOptions \| undefined>` | Additional options object passed to the blade. Type is `Record<string, unknown>` by default; provide a generic to get a typed ref: `useBlade<MyOptions>()` |
91
- | `query` | `ComputedRef<Record<string, string> \| undefined>` | URL query parameters scoped to this blade |
92
- | `closable` | `ComputedRef<boolean>` | `true` when this blade has a parent (i.e., can be closed) |
93
- | `expanded` | `ComputedRef<boolean>` | `true` when this blade is the active (rightmost) blade |
94
- | `name` | `ComputedRef<string>` | The blade's registered component name |
91
+ | Property | Type | Description |
92
+ | ---------- | -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
93
+ | `id` | `ComputedRef<string>` | The current blade's unique ID within the blade stack |
94
+ | `param` | `ComputedRef<string \| undefined>` | Route parameter passed when the blade was opened |
95
+ | `options` | `ComputedRef<TOptions \| undefined>` | Additional options object passed to the blade. Type is `Record<string, unknown>` by default; provide a generic to get a typed ref: `useBlade<MyOptions>()` |
96
+ | `query` | `ComputedRef<Record<string, string> \| undefined>` | URL query parameters scoped to this blade |
97
+ | `closable` | `ComputedRef<boolean>` | `true` when this blade has a parent (i.e., can be closed) |
98
+ | `expanded` | `ComputedRef<boolean>` | `true` when this blade is the active (rightmost) blade |
99
+ | `name` | `ComputedRef<string>` | The blade's registered component name |
95
100
 
96
101
  #### Navigation Methods (work everywhere)
97
102
 
98
- | Method | Signature | Description |
99
- |-------------|------------------------------------------------------------------|--------------------------------------------------------|
103
+ | Method | Signature | Description |
104
+ | ----------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
100
105
  | `openBlade` | `(event: BladeOpenEvent & { isWorkspace?: boolean }) => Promise<void>` | Open a blade as a child of the current blade, or as a workspace root if `isWorkspace: true` |
101
106
 
102
107
  #### Action Methods (blade context required)
103
108
 
104
- | Method | Signature | Description |
105
- |-----------------|-----------------------------------------|----------------------------------------------------|
106
- | `closeSelf` | `() => Promise<boolean>` | Close the current blade. Returns `true` if a guard prevented closure. Respects `onBeforeClose` guards. |
107
- | `closeChildren` | `() => Promise<void>` | Close all child blades of the current blade |
108
- | `replaceWith` | `(event: BladeOpenEvent) => Promise<void>` | Replace the current blade with a different one in the same position (destroys the old blade) |
109
+ | Method | Signature | Description |
110
+ | --------------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |
111
+ | `closeSelf` | `() => Promise<boolean>` | Close the current blade. Returns `true` if a guard prevented closure. Respects `onBeforeClose` guards. |
112
+ | `closeChildren` | `() => Promise<void>` | Close all child blades of the current blade |
113
+ | `replaceWith` | `(event: BladeOpenEvent) => Promise<void>` | Replace the current blade with a different one in the same position (destroys the old blade) |
109
114
  | `coverWith` | `(event: BladeOpenEvent) => Promise<void>` | Cover the current blade — hides it and opens a new blade on top. Closing the new blade reveals the hidden one. |
110
115
 
111
116
  #### Communication Methods (blade context required)
112
117
 
113
- | Method | Signature | Description |
114
- |---------------------|----------------------------------------------------------------|----------------------------------------------------------------|
115
- | `callParent` | `<T = unknown>(method: string, args?: unknown) => Promise<T>` | Invoke a method exposed by the parent blade |
116
- | `exposeToChildren` | `(methods: Record<string, (...args: unknown[]) => unknown>) => void` | Expose methods that child blades can call via `callParent` |
118
+ | Method | Signature | Description |
119
+ | ------------------ | -------------------------------------------------------------------- | ---------------------------------------------------------- |
120
+ | `callParent` | `<T = unknown>(method: string, args?: unknown) => Promise<T>` | Invoke a method exposed by the parent blade |
121
+ | `exposeToChildren` | `(methods: Record<string, (...args: unknown[]) => unknown>) => void` | Expose methods that child blades can call via `callParent` |
117
122
 
118
123
  #### Guards and Errors (blade context required)
119
124
 
120
- | Method | Signature | Description |
121
- |-----------------|----------------------------------------------|-----------------------------------------------------|
122
- | `onBeforeClose` | `(guard: () => Promise<boolean>) => void` | Register a guard that can prevent blade closure |
123
- | `setError` | `(error: unknown) => void` | Display an error banner on the blade |
124
- | `clearError` | `() => void` | Clear the blade error banner |
125
+ | Method | Signature | Description |
126
+ | --------------- | ----------------------------------------- | ----------------------------------------------- |
127
+ | `onBeforeClose` | `(guard: () => Promise<boolean>) => void` | Register a guard that can prevent blade closure |
128
+ | `setError` | `(error: unknown) => void` | Display an error banner on the blade |
129
+ | `clearError` | `() => void` | Clear the blade error banner |
125
130
 
126
131
  #### Banner Management (blade context required)
127
132
 
128
- | Method | Signature | Description |
129
- |----------------|--------------------------------------------------------------|----------------------------------------------------------------|
130
- | `addBanner` | `(options: Omit<IBladeBanner, "id" \| "_system">) => string` | Add a custom banner to the blade. Returns the banner's unique ID. |
131
- | `removeBanner` | `(id: string) => void` | Remove a specific banner by its ID |
133
+ | Method | Signature | Description |
134
+ | -------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------- |
135
+ | `addBanner` | `(options: Omit<IBladeBanner, "id" \| "_system">) => string` | Add a custom banner to the blade. Returns the banner's unique ID. |
136
+ | `removeBanner` | `(id: string) => void` | Remove a specific banner by its ID |
132
137
  | `clearBanners` | `() => void` | Remove all custom banners (system error/modified banners are preserved) |
133
138
 
134
139
  #### Lifecycle Hooks (blade context required)
135
140
 
136
- | Method | Signature | Description |
137
- |-----------------|-----------------------------------|----------------------------------------------------------|
138
- | `onActivated` | `(callback: () => void) => void` | Register a callback fired when this blade becomes the active (rightmost) blade. Only fires on transitions, not on initial mount. |
139
- | `onDeactivated` | `(callback: () => void) => void` | Register a callback fired when this blade loses active status (another blade opens on top). |
141
+ | Method | Signature | Description |
142
+ | --------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
143
+ | `onActivated` | `(callback: () => void) => void` | Register a callback fired when this blade becomes the active (rightmost) blade. Only fires on transitions, not on initial mount. |
144
+ | `onDeactivated` | `(callback: () => void) => void` | Register a callback fired when this blade loses active status (another blade opens on top). |
140
145
 
141
146
  > **Note:** Each hook can only be registered once per `useBlade()` call. A second registration logs a warning and is ignored. Use `onMounted` for initial-mount logic — `onActivated` only fires on subsequent activations.
142
147
 
143
148
  #### Deprecated
144
149
 
145
- | Method | Signature | Description |
146
- |--------------------|---------------------------------------------------------|-------------------------------------|
147
- | `provideBladeData` | `(data: MaybeRef<Record<string, unknown>>) => void` | **Deprecated.** Use `defineBladeContext()` instead. |
150
+ | Method | Signature | Description |
151
+ | ------------------ | --------------------------------------------------- | --------------------------------------------------- |
152
+ | `provideBladeData` | `(data: MaybeRef<Record<string, unknown>>) => void` | **Deprecated.** Use `defineBladeContext()` instead. |
148
153
 
149
154
  ### BladeOpenEvent
150
155
 
@@ -186,8 +191,12 @@ openBlade({
186
191
  name: "FulfillmentCenterDetails",
187
192
  param: centerId,
188
193
  options: { mode: "edit" },
189
- onOpen() { selectedItemId.value = centerId; },
190
- onClose() { selectedItemId.value = undefined; },
194
+ onOpen() {
195
+ selectedItemId.value = centerId;
196
+ },
197
+ onClose() {
198
+ selectedItemId.value = undefined;
199
+ },
191
200
  });
192
201
 
193
202
  // Open as workspace (replaces entire blade stack)
@@ -317,6 +326,7 @@ async function onSave() {
317
326
  ```
318
327
 
319
328
  > **Tip:** `callParent` is generic. If the parent method returns a value, you can type it:
329
+ >
320
330
  > ```typescript
321
331
  > const count = await callParent<number>("getOffersCount");
322
332
  > ```
@@ -419,11 +429,7 @@ addBanner({
419
429
  // Banner with custom render function
420
430
  addBanner({
421
431
  variant: "info",
422
- render: () => h("span", [
423
- "Data synced from ",
424
- h("b", "Warehouse A"),
425
- " at 14:32",
426
- ]),
432
+ render: () => h("span", ["Data synced from ", h("b", "Warehouse A"), " at 14:32"]),
427
433
  });
428
434
 
429
435
  // Remove a specific banner
@@ -438,14 +444,14 @@ clearBanners();
438
444
 
439
445
  The options object passed to `addBanner`:
440
446
 
441
- | Property | Type | Default | Description |
442
- |---------------|-----------------------------------|----------|----------------------------------------------------|
443
- | `variant` | `"danger" \| "warning" \| "info" \| "success"` | required | Color scheme and default icon |
444
- | `message` | `string` | -- | Plain text message |
445
- | `render` | `() => VNode` | -- | Custom render function (takes priority over message) |
446
- | `dismissible` | `boolean` | `false` | Show a close button to dismiss the banner |
447
- | `icon` | `string` | -- | Override the default variant icon (lucide icon name) |
448
- | `action` | `{ label: string; handler: () => void }` | -- | Action button displayed on the right side |
447
+ | Property | Type | Default | Description |
448
+ | ------------- | ---------------------------------------------- | -------- | ---------------------------------------------------- |
449
+ | `variant` | `"danger" \| "warning" \| "info" \| "success"` | required | Color scheme and default icon |
450
+ | `message` | `string` | -- | Plain text message |
451
+ | `render` | `() => VNode` | -- | Custom render function (takes priority over message) |
452
+ | `dismissible` | `boolean` | `false` | Show a close button to dismiss the banner |
453
+ | `icon` | `string` | -- | Override the default variant icon (lucide icon name) |
454
+ | `action` | `{ label: string; handler: () => void }` | -- | Action button displayed on the right side |
449
455
 
450
456
  > **Note:** `addBanner` returns a unique string ID. Use it with `removeBanner(id)` to programmatically remove a specific banner. `clearBanners()` removes all custom banners but preserves system banners (error and unsaved changes).
451
457
 
@@ -489,6 +495,7 @@ const isLoading = computed(() => ctx.value.loading as boolean);
489
495
  ```
490
496
 
491
497
  > **When to use which:**
498
+ >
492
499
  > - `defineBladeContext` / `injectBladeContext` -- for sharing data with **child widgets and nested components** within the same blade's component tree (via provide/inject).
493
500
  > - `callParent` / `exposeToChildren` -- for **cross-blade communication** between parent and child blades in the blade stack.
494
501
 
@@ -514,8 +521,12 @@ function onRowClick(event: { data: { id?: string } }) {
514
521
  openBlade({
515
522
  name: "ProductDetails",
516
523
  param: event.data.id,
517
- onOpen() { selectedItemId.value = event.data.id; },
518
- onClose() { selectedItemId.value = undefined; },
524
+ onOpen() {
525
+ selectedItemId.value = event.data.id;
526
+ },
527
+ onClose() {
528
+ selectedItemId.value = undefined;
529
+ },
519
530
  });
520
531
  }
521
532
 
@@ -577,7 +588,9 @@ const item = ref<Order>();
577
588
 
578
589
  defineBladeContext({ item }); // share with widgets
579
590
 
580
- async function reload() { await loadOrder(props.param!); }
591
+ async function reload() {
592
+ await loadOrder(props.param!);
593
+ }
581
594
  exposeToChildren({ reload }); // child ShipmentDetails can callParent("reload")
582
595
 
583
596
  function openShipment(id: string) {
@@ -651,7 +664,9 @@ openBlade({ name: "OrderDetails", param: orderId });
651
664
  ```vue
652
665
  <!-- BAD -- child calls callParent("reload") but parent never exposed it -->
653
666
  <script setup lang="ts">
654
- async function reload() { /* ... */ }
667
+ async function reload() {
668
+ /* ... */
669
+ }
655
670
  // Missing: exposeToChildren({ reload })
656
671
  // or: defineExpose({ reload })
657
672
  </script>
@@ -660,7 +675,9 @@ async function reload() { /* ... */ }
660
675
  ```vue
661
676
  <!-- GOOD -- explicitly expose methods for children -->
662
677
  <script setup lang="ts">
663
- async function reload() { /* ... */ }
678
+ async function reload() {
679
+ /* ... */
680
+ }
664
681
  exposeToChildren({ reload });
665
682
  // Also expose title for breadcrumbs
666
683
  defineExpose({ reload, title });
@@ -709,12 +726,16 @@ defineBladeContext({ item, loading });
709
726
 
710
727
  ```typescript
711
728
  // BAD -- accesses the ComputedRef object, not the value
712
- if (param) { /* always truthy -- it's a ComputedRef object */ }
729
+ if (param) {
730
+ /* always truthy -- it's a ComputedRef object */
731
+ }
713
732
  ```
714
733
 
715
734
  ```typescript
716
735
  // GOOD -- access the reactive value
717
- if (param.value) { /* correct -- checks the actual string */ }
736
+ if (param.value) {
737
+ /* correct -- checks the actual string */
738
+ }
718
739
  ```
719
740
 
720
741
  ---
@@ -730,11 +751,11 @@ if (param.value) { /* correct -- checks the actual string */ }
730
751
 
731
752
  ## Related
732
753
 
733
- | Resource | Description |
734
- |----------|-------------|
735
- | [`defineBladeContext` / `injectBladeContext`](../useBladeContext.docs.md) | Share reactive blade data with descendant widgets |
736
- | [`useBladeRegistry`](../useBladeRegistry/) | Look up registered blade components by name |
737
- | [`VcBlade`](../../../ui/components/organisms/vc-blade/) | The blade UI shell component (header, toolbar, content area) |
738
- | [`VcBladeNavigation`](../../../shared/components/blade-navigation/) | The container component that renders the blade stack |
739
- | [`useToolbar`](../../../shared/composables/useToolbar/) | Dynamic toolbar management for blades |
740
- | [`usePopup`](../../../shared/composables/usePopup/) | Confirmation dialogs, commonly used in close guards |
754
+ | Resource | Description |
755
+ | ------------------------------------------------------------------------- | ------------------------------------------------------------ |
756
+ | [`defineBladeContext` / `injectBladeContext`](../useBladeContext.docs.md) | Share reactive blade data with descendant widgets |
757
+ | [`useBladeRegistry`](../useBladeRegistry/) | Look up registered blade components by name |
758
+ | [`VcBlade`](../../../ui/components/organisms/vc-blade/) | The blade UI shell component (header, toolbar, content area) |
759
+ | [`VcBladeNavigation`](../../../shared/components/blade-navigation/) | The container component that renders the blade stack |
760
+ | [`useToolbar`](../../../shared/composables/useToolbar/) | Dynamic toolbar management for blades |
761
+ | [`usePopup`](../../../shared/composables/usePopup/) | Confirmation dialogs, commonly used in close guards |