@makinbakin/sdk 0.0.0-bootstrap.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.
Files changed (114) hide show
  1. package/README.md +107 -0
  2. package/_internal/app/components/agent-avatar.d.ts +11 -0
  3. package/_internal/app/components/agent-filter.d.ts +8 -0
  4. package/_internal/app/components/agent-select.d.ts +15 -0
  5. package/_internal/app/components/agent-status.d.ts +8 -0
  6. package/_internal/app/components/bakin-drawer.d.ts +23 -0
  7. package/_internal/app/components/color-picker.d.ts +7 -0
  8. package/_internal/app/components/empty-state.d.ts +10 -0
  9. package/_internal/app/components/error-banner.d.ts +6 -0
  10. package/_internal/app/components/error-state.d.ts +8 -0
  11. package/_internal/app/components/facet-filter.d.ts +17 -0
  12. package/_internal/app/components/integrated-brainstorm/collapsed-header.d.ts +14 -0
  13. package/_internal/app/components/integrated-brainstorm/empty-state.d.ts +5 -0
  14. package/_internal/app/components/integrated-brainstorm/index.d.ts +3 -0
  15. package/_internal/app/components/integrated-brainstorm/input-row.d.ts +16 -0
  16. package/_internal/app/components/integrated-brainstorm/message-list.d.ts +8 -0
  17. package/_internal/app/components/integrated-brainstorm/thinking-indicator.d.ts +19 -0
  18. package/_internal/app/components/integrated-brainstorm/types.d.ts +61 -0
  19. package/_internal/app/components/integrated-brainstorm/use-auto-grow.d.ts +6 -0
  20. package/_internal/app/components/integrated-brainstorm/use-brainstorm-state.d.ts +21 -0
  21. package/_internal/app/components/markdown-content.d.ts +3 -0
  22. package/_internal/app/components/markdown-editor.d.ts +11 -0
  23. package/_internal/app/components/model-select.d.ts +9 -0
  24. package/_internal/app/components/page-layout.d.ts +9 -0
  25. package/_internal/app/components/plugin-header.d.ts +16 -0
  26. package/_internal/app/components/plugin-settings-renderer.d.ts +9 -0
  27. package/_internal/app/components/sortable-head.d.ts +13 -0
  28. package/_internal/app/components/ui/alert.d.ts +10 -0
  29. package/_internal/app/components/ui/avatar.d.ts +11 -0
  30. package/_internal/app/components/ui/badge.d.ts +7 -0
  31. package/_internal/app/components/ui/button.d.ts +8 -0
  32. package/_internal/app/components/ui/card.d.ts +11 -0
  33. package/_internal/app/components/ui/checkbox.d.ts +3 -0
  34. package/_internal/app/components/ui/collapsible.d.ts +5 -0
  35. package/_internal/app/components/ui/command.d.ts +19 -0
  36. package/_internal/app/components/ui/dialog.d.ts +17 -0
  37. package/_internal/app/components/ui/dropdown-menu.d.ts +29 -0
  38. package/_internal/app/components/ui/form.d.ts +23 -0
  39. package/_internal/app/components/ui/input-group.d.ts +18 -0
  40. package/_internal/app/components/ui/input.d.ts +3 -0
  41. package/_internal/app/components/ui/label.d.ts +3 -0
  42. package/_internal/app/components/ui/popover.d.ts +9 -0
  43. package/_internal/app/components/ui/progress.d.ts +7 -0
  44. package/_internal/app/components/ui/select.d.ts +15 -0
  45. package/_internal/app/components/ui/separator.d.ts +3 -0
  46. package/_internal/app/components/ui/sheet.d.ts +14 -0
  47. package/_internal/app/components/ui/skeleton.d.ts +2 -0
  48. package/_internal/app/components/ui/switch.d.ts +5 -0
  49. package/_internal/app/components/ui/table.d.ts +10 -0
  50. package/_internal/app/components/ui/tabs.d.ts +10 -0
  51. package/_internal/app/components/ui/textarea.d.ts +3 -0
  52. package/_internal/app/components/ui/tooltip.d.ts +6 -0
  53. package/_internal/app/components/underline-tabs.d.ts +15 -0
  54. package/_internal/app/hooks/use-assets.d.ts +25 -0
  55. package/_internal/app/hooks/use-content-store.d.ts +36 -0
  56. package/_internal/app/hooks/use-debug.d.ts +1 -0
  57. package/_internal/app/hooks/use-form-guard.d.ts +5 -0
  58. package/_internal/app/hooks/use-query-state.d.ts +14 -0
  59. package/_internal/app/hooks/use-runtime-status.d.ts +12 -0
  60. package/_internal/app/hooks/use-schedule.d.ts +63 -0
  61. package/_internal/app/hooks/use-search.d.ts +65 -0
  62. package/_internal/app/hooks/use-sidebar.d.ts +4 -0
  63. package/_internal/app/hooks/use-sse.d.ts +1 -0
  64. package/_internal/app/hooks/use-toast.d.ts +16 -0
  65. package/_internal/app/hooks/use-vertical-resize.d.ts +22 -0
  66. package/_internal/app/lib/browser-notify.d.ts +5 -0
  67. package/_internal/app/lib/map-audit-message.d.ts +7 -0
  68. package/_internal/app/lib/utils.d.ts +2 -0
  69. package/_internal/app/types/index.d.ts +126 -0
  70. package/_internal/core/adapters/runtime/capabilities.d.ts +2 -0
  71. package/_internal/core/adapters/runtime/concepts.d.ts +458 -0
  72. package/_internal/core/adapters/runtime/helpers.d.ts +5 -0
  73. package/_internal/core/adapters/runtime/index.d.ts +5 -0
  74. package/_internal/core/adapters/shared.d.ts +37 -0
  75. package/_internal/core/docs/index.d.ts +2 -0
  76. package/_internal/core/docs/metadata.d.ts +92 -0
  77. package/_internal/core/docs/route.d.ts +9 -0
  78. package/_internal/core/format.d.ts +6 -0
  79. package/_internal/core/openapi/errors.d.ts +29 -0
  80. package/_internal/core/openapi/zod-to-openapi.d.ts +14 -0
  81. package/_internal/core/plugin-types.d.ts +849 -0
  82. package/_internal/core/routing/define.d.ts +34 -0
  83. package/_internal/core/routing/dispatcher.d.ts +44 -0
  84. package/_internal/core/routing/index.d.ts +15 -0
  85. package/_internal/core/routing/operation-id.d.ts +9 -0
  86. package/_internal/core/routing/registry.d.ts +52 -0
  87. package/_internal/core/routing/search-route.d.ts +26 -0
  88. package/_internal/core/routing/types.d.ts +123 -0
  89. package/_internal/plugins/team/hooks/use-agent-store.d.ts +49 -0
  90. package/_internal/plugins/team/types.d.ts +131 -0
  91. package/_internal/plugins/workflows/hooks/channel-icon.d.ts +6 -0
  92. package/_internal/plugins/workflows/hooks/use-notification-channels.d.ts +13 -0
  93. package/_internal/plugins/workflows/lib/notification-channel-registry.d.ts +26 -0
  94. package/components/index.d.ts +33 -0
  95. package/components/index.js +39522 -0
  96. package/hooks/index.d.ts +25 -0
  97. package/hooks/index.js +1738 -0
  98. package/hooks/router.d.ts +38 -0
  99. package/index.d.ts +27 -0
  100. package/index.js +13917 -0
  101. package/metadata/index.d.ts +16 -0
  102. package/metadata/index.js +31 -0
  103. package/package.json +88 -0
  104. package/register.d.ts +103 -0
  105. package/routing/index.d.ts +11 -0
  106. package/routing/index.js +13721 -0
  107. package/slots/index.d.ts +55 -0
  108. package/slots/index.js +92 -0
  109. package/types/index.d.ts +840 -0
  110. package/types/index.js +1 -0
  111. package/ui/index.d.ts +34 -0
  112. package/ui/index.js +28713 -0
  113. package/utils/index.d.ts +9 -0
  114. package/utils/index.js +1832 -0
@@ -0,0 +1,38 @@
1
+ /**
2
+ * `NavigateOptions` accepts `{ scroll?: boolean }` for call-site
3
+ * readability; TanStack preserves scroll by default, so the flag is
4
+ * accepted-and-ignored.
5
+ */
6
+ interface Router {
7
+ push: (url: string, _opts?: {
8
+ scroll?: boolean;
9
+ }) => void;
10
+ replace: (url: string, _opts?: {
11
+ scroll?: boolean;
12
+ }) => void;
13
+ back: () => void;
14
+ forward: () => void;
15
+ refresh: () => void;
16
+ /** No-op — TanStack prefetches on intent via `defaultPreload`. */
17
+ prefetch: (_url: string) => void;
18
+ }
19
+ /**
20
+ * `useRouter()` over TanStack Router. Accepts plain URL strings and
21
+ * bypasses TanStack's typed-path safety on purpose — plugin authors
22
+ * pass paths as strings through slots.
23
+ */
24
+ export declare function useRouter(): Router;
25
+ /** Current pathname (`/tasks`, `/team/abc-123`, ...). */
26
+ export declare function usePathname(): string;
27
+ /**
28
+ * Parsed query-string as a plain `URLSearchParams` — use `.get()`,
29
+ * `.has()`, `.getAll()`, iteration, etc.
30
+ */
31
+ export declare function useSearchParams(): URLSearchParams;
32
+ /**
33
+ * Route params for the current leaf. Uses TanStack's `strict: false` mode
34
+ * so components rendered inside a slot (not directly via the route tree)
35
+ * still get usable params from the currently-matched route.
36
+ */
37
+ export declare function useParams<T extends Record<string, string> = Record<string, string>>(): T;
38
+ export {};
package/index.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ /**
2
+ * `@bakin/sdk` — plugin author SDK.
3
+ *
4
+ * The main entry re-exports types + the single-call `registerPlugin` helper
5
+ * so plugin authors can write `import { registerPlugin } from '@makinbakin/sdk'`
6
+ * without having to remember which sub-path it lives at. UI primitives,
7
+ * hooks, and components stay on sub-paths (`/ui`, `/hooks`, `/components`,
8
+ * `/slots`) to keep the top-level namespace from exploding.
9
+ *
10
+ * Sub-paths:
11
+ * - `@bakin/sdk/ui` — shadcn UI primitives (Button, Card, Dialog, ...)
12
+ * - `@bakin/sdk/hooks` — React hooks (useAgent, useSSE, useSearch, ...)
13
+ * - `@bakin/sdk/components` — shared components (PluginHeader, FacetFilter, ...)
14
+ * - `@bakin/sdk/slots` — Slot + registerSlot primitive
15
+ * - `@bakin/sdk/types` — full type re-exports
16
+ * - `@bakin/sdk/metadata` — docs-aware contract helpers
17
+ *
18
+ * Plugin authors: at build time, mark `@bakin/sdk`, `@bakin/sdk/*`, and
19
+ * `react`/`react-dom` as externals. At runtime the browser's import map
20
+ * (emitted by Bakin) resolves those to the host's bundled copies so there
21
+ * is a single React instance and a single SDK.
22
+ */
23
+ export * from './types/index';
24
+ export { registerPlugin, unregisterPlugin, registerPluginCleanup, getRegistryVersion, subscribeRegistry, getAllNavItems, getNavItemsSnapshot, getPluginNavItems, getPluginRoute, getPluginRoutes, } from './register';
25
+ export type { ClientRouteEntry, MatchedPluginRoute, NavItem, PluginRegistration } from './register';
26
+ export { defineRoute, defineCoreRoute, definePlugin } from './routing/index';
27
+ export type { APIRoute, HttpStatus, RouteContext, PluginContextLite, CoreContext, BodySpec, ResponseSpec, ParsedInput, } from './routing/index';