@iblai/mcp 1.0.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 (62) hide show
  1. package/README.md +199 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +130 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/resources/data-layer.d.ts +8 -0
  7. package/dist/resources/data-layer.d.ts.map +1 -0
  8. package/dist/resources/data-layer.js +181 -0
  9. package/dist/resources/data-layer.js.map +1 -0
  10. package/dist/resources/guides-layout.d.ts +8 -0
  11. package/dist/resources/guides-layout.d.ts.map +1 -0
  12. package/dist/resources/guides-layout.js +235 -0
  13. package/dist/resources/guides-layout.js.map +1 -0
  14. package/dist/resources/guides-rbac.d.ts +8 -0
  15. package/dist/resources/guides-rbac.d.ts.map +1 -0
  16. package/dist/resources/guides-rbac.js +231 -0
  17. package/dist/resources/guides-rbac.js.map +1 -0
  18. package/dist/resources/guides-theme.d.ts +8 -0
  19. package/dist/resources/guides-theme.d.ts.map +1 -0
  20. package/dist/resources/guides-theme.js +183 -0
  21. package/dist/resources/guides-theme.js.map +1 -0
  22. package/dist/resources/index.d.ts +17 -0
  23. package/dist/resources/index.d.ts.map +1 -0
  24. package/dist/resources/index.js +18 -0
  25. package/dist/resources/index.js.map +1 -0
  26. package/dist/resources/packages-overview.d.ts +8 -0
  27. package/dist/resources/packages-overview.d.ts.map +1 -0
  28. package/dist/resources/packages-overview.js +53 -0
  29. package/dist/resources/packages-overview.js.map +1 -0
  30. package/dist/resources/web-containers.d.ts +8 -0
  31. package/dist/resources/web-containers.d.ts.map +1 -0
  32. package/dist/resources/web-containers.js +122 -0
  33. package/dist/resources/web-containers.js.map +1 -0
  34. package/dist/resources/web-utils.d.ts +8 -0
  35. package/dist/resources/web-utils.d.ts.map +1 -0
  36. package/dist/resources/web-utils.js +210 -0
  37. package/dist/resources/web-utils.js.map +1 -0
  38. package/dist/tools/api-query-info.d.ts +16 -0
  39. package/dist/tools/api-query-info.d.ts.map +1 -0
  40. package/dist/tools/api-query-info.js +2398 -0
  41. package/dist/tools/api-query-info.js.map +1 -0
  42. package/dist/tools/component-info.d.ts +16 -0
  43. package/dist/tools/component-info.d.ts.map +1 -0
  44. package/dist/tools/component-info.js +1323 -0
  45. package/dist/tools/component-info.js.map +1 -0
  46. package/dist/tools/hook-info.d.ts +16 -0
  47. package/dist/tools/hook-info.d.ts.map +1 -0
  48. package/dist/tools/hook-info.js +1988 -0
  49. package/dist/tools/hook-info.js.map +1 -0
  50. package/dist/tools/index.d.ts +68 -0
  51. package/dist/tools/index.d.ts.map +1 -0
  52. package/dist/tools/index.js +14 -0
  53. package/dist/tools/index.js.map +1 -0
  54. package/dist/tools/page-template.d.ts +28 -0
  55. package/dist/tools/page-template.d.ts.map +1 -0
  56. package/dist/tools/page-template.js +198 -0
  57. package/dist/tools/page-template.js.map +1 -0
  58. package/dist/tools/provider-setup.d.ts +24 -0
  59. package/dist/tools/provider-setup.d.ts.map +1 -0
  60. package/dist/tools/provider-setup.js +213 -0
  61. package/dist/tools/provider-setup.js.map +1 -0
  62. package/package.json +28 -0
package/README.md ADDED
@@ -0,0 +1,199 @@
1
+ # IBL Frontend MCP Server
2
+
3
+ An MCP (Model Context Protocol) server that provides comprehensive documentation and guidance for working with the IBL frontend packages.
4
+
5
+ ## Overview
6
+
7
+ This MCP server helps AI assistants understand and work with:
8
+
9
+ - **@iblai/web-containers**: Shared React components built on Radix UI
10
+ - **@iblai/web-utils**: Authentication utilities, context providers, and hooks
11
+ - **@iblai/data-layer**: Redux store and RTK Query APIs
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ cd packages/mcp-server
17
+ pnpm install
18
+ pnpm build
19
+ ```
20
+
21
+ ## Quick Start
22
+
23
+ ```bash
24
+ # 1. Build the MCP server
25
+ cd packages/mcp-server
26
+ pnpm build
27
+
28
+ # 2. Restart Claude Code (exit and re-enter your session)
29
+ # The server is already configured in .claude/settings.json
30
+ ```
31
+
32
+ That's it! Claude will now have access to IBL-specific tools and documentation.
33
+
34
+ ## Configuration
35
+
36
+ The MCP server is pre-configured in `.claude/settings.json`:
37
+
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "ibl-web-frontend": {
42
+ "type": "stdio",
43
+ "command": "node",
44
+ "args": ["packages/mcp-server/dist/index.js"]
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ No additional setup required - just build and restart Claude Code.
51
+
52
+ ## Project Structure
53
+
54
+ ```
55
+ packages/mcp-server/
56
+ ├── src/
57
+ │ ├── index.ts # Main server entry point
58
+ │ ├── resources/ # Documentation resources
59
+ │ │ ├── index.ts # Resource exports
60
+ │ │ ├── packages-overview.ts
61
+ │ │ ├── web-containers.ts
62
+ │ │ ├── web-utils.ts
63
+ │ │ ├── data-layer.ts
64
+ │ │ ├── guides-layout.ts
65
+ │ │ ├── guides-rbac.ts
66
+ │ │ └── guides-theme.ts
67
+ │ └── tools/ # MCP tools
68
+ │ ├── index.ts # Tool exports
69
+ │ ├── component-info.ts
70
+ │ ├── hook-info.ts
71
+ │ ├── provider-setup.ts
72
+ │ ├── api-query-info.ts
73
+ │ └── page-template.ts
74
+ └── dist/ # Compiled output
75
+ ```
76
+
77
+ ## Available Resources
78
+
79
+ The server provides the following documentation resources:
80
+
81
+ | Resource URI | Description |
82
+ |--------------|-------------|
83
+ | `ibl://packages/overview` | Overview of all IBL frontend packages |
84
+ | `ibl://packages/web-containers` | UI components documentation |
85
+ | `ibl://packages/web-utils` | Providers and hooks documentation |
86
+ | `ibl://packages/data-layer` | Redux and RTK Query documentation |
87
+ | `ibl://guides/layout` | Layout rules and patterns |
88
+ | `ibl://guides/rbac` | RBAC (Role-Based Access Control) patterns |
89
+ | `ibl://guides/theme` | Theme configuration |
90
+
91
+ ## Available Tools
92
+
93
+ ### get_component_info
94
+
95
+ Get detailed information about a UI component.
96
+
97
+ ```
98
+ Component name: Button, Card, Dialog, Profile, NotificationDropdown, Input, Select, Tabs, etc.
99
+ ```
100
+
101
+ ### get_hook_info
102
+
103
+ Get detailed information about a React hook.
104
+
105
+ ```
106
+ Hook name: useAdvancedChat, useMentorSettings, useGetMentorsQuery, useTenantMetadata, etc.
107
+ ```
108
+
109
+ ### get_provider_setup
110
+
111
+ Get the correct provider setup for an app type.
112
+
113
+ ```
114
+ App type: mentor, skills, auth, custom
115
+ Features: chat, analytics, notifications, rbac
116
+ ```
117
+
118
+ ### get_api_query_info
119
+
120
+ Get information about an RTK Query API endpoint.
121
+
122
+ ```
123
+ Query name: useGetMentorsQuery, useGetUserMetadataQuery, usePlatformUserGroupsQuery, etc.
124
+ ```
125
+
126
+ ### create_page_template
127
+
128
+ Generate a template for a new page following IBL patterns.
129
+
130
+ ```
131
+ Page name: Dashboard, Settings, etc.
132
+ Features: auth-required, rbac, analytics, sidebar, data-fetching
133
+ App type: mentor, skills
134
+ ```
135
+
136
+ ## Development
137
+
138
+ ```bash
139
+ # Watch mode
140
+ pnpm dev
141
+
142
+ # Build
143
+ pnpm build
144
+
145
+ # Run server directly
146
+ pnpm start
147
+ ```
148
+
149
+ ## Key Concepts
150
+
151
+ ### Provider Hierarchy
152
+
153
+ Apps must use providers in this order:
154
+
155
+ **Skills App:**
156
+ ```
157
+ StoreProvider → AuthProvider → TenantProvider → ClientLayout
158
+ ```
159
+
160
+ **Mentor App:**
161
+ ```
162
+ StoreProvider → AuthProvider → TenantProvider → MentorProvider → AppProvider
163
+ ```
164
+
165
+ ### Package Imports
166
+
167
+ ```typescript
168
+ // Data Layer
169
+ import { useGetMentorsQuery, mentorReducer } from '@iblai/data-layer';
170
+
171
+ // Web Containers
172
+ import { Button, Card, Dialog } from '@iblai/web-containers';
173
+
174
+ // Web Utils
175
+ import { AuthProvider, useAdvancedChat } from '@iblai/web-utils';
176
+ ```
177
+
178
+ ### RBAC Pattern
179
+
180
+ ```typescript
181
+ import { WithPermissions } from '@/hoc/withPermissions';
182
+
183
+ <WithPermissions rbacResource={`/platforms/${tenant}/#can_view_analytics`}>
184
+ {({ hasPermission }) => hasPermission && <AnalyticsButton />}
185
+ </WithPermissions>
186
+ ```
187
+
188
+ ## Adding New Resources
189
+
190
+ 1. Create a new file in `src/resources/` (e.g., `my-resource.ts`)
191
+ 2. Export the resource object with `uri`, `name`, `description`, `mimeType`, and `content`
192
+ 3. Import and add it to `src/resources/index.ts`
193
+
194
+ ## Adding New Tools
195
+
196
+ 1. Create a new file in `src/tools/` (e.g., `my-tool.ts`)
197
+ 2. Export the tool definition and handler function
198
+ 3. Import and add it to `src/tools/index.ts`
199
+ 4. Add the case handler in `src/index.ts`
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,130 @@
1
+ #!/usr/bin/env node
2
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
+ import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
5
+ // Import resources
6
+ import { RESOURCES } from './resources/index.js';
7
+ // Import tools
8
+ import { TOOLS, getComponentInfo, getHookInfo, getProviderSetup, getApiQueryInfo, createPageTemplate, } from './tools/index.js';
9
+ // ============================================================================
10
+ // IBL FRONTEND MCP SERVER
11
+ // ============================================================================
12
+ // This MCP server provides comprehensive documentation and guidance for
13
+ // working with the IBL frontend packages: web-containers, web-utils, data-layer
14
+ // ============================================================================
15
+ const server = new Server({
16
+ name: 'ibl-frontend-mcp',
17
+ version: '1.0.0',
18
+ }, {
19
+ capabilities: {
20
+ resources: {},
21
+ tools: {},
22
+ },
23
+ });
24
+ // ============================================================================
25
+ // RESOURCE HANDLERS
26
+ // ============================================================================
27
+ server.setRequestHandler(ListResourcesRequestSchema, async () => {
28
+ return {
29
+ resources: Object.entries(RESOURCES).map(([uri, resource]) => ({
30
+ uri,
31
+ name: resource.name,
32
+ description: resource.description,
33
+ mimeType: resource.mimeType,
34
+ })),
35
+ };
36
+ });
37
+ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
38
+ const uri = request.params.uri;
39
+ const resource = RESOURCES[uri];
40
+ if (!resource) {
41
+ throw new Error(`Resource not found: ${uri}`);
42
+ }
43
+ return {
44
+ contents: [
45
+ {
46
+ uri,
47
+ mimeType: resource.mimeType,
48
+ text: resource.content,
49
+ },
50
+ ],
51
+ };
52
+ });
53
+ // ============================================================================
54
+ // TOOL HANDLERS
55
+ // ============================================================================
56
+ server.setRequestHandler(ListToolsRequestSchema, async () => {
57
+ return { tools: TOOLS };
58
+ });
59
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
60
+ const { name, arguments: args } = request.params;
61
+ switch (name) {
62
+ case 'get_component_info': {
63
+ const componentName = args.componentName;
64
+ return {
65
+ content: [
66
+ {
67
+ type: 'text',
68
+ text: getComponentInfo(componentName),
69
+ },
70
+ ],
71
+ };
72
+ }
73
+ case 'get_hook_info': {
74
+ const hookName = args.hookName;
75
+ return {
76
+ content: [
77
+ {
78
+ type: 'text',
79
+ text: getHookInfo(hookName),
80
+ },
81
+ ],
82
+ };
83
+ }
84
+ case 'get_provider_setup': {
85
+ const { appType, features } = args;
86
+ return {
87
+ content: [
88
+ {
89
+ type: 'text',
90
+ text: getProviderSetup(appType, features || []),
91
+ },
92
+ ],
93
+ };
94
+ }
95
+ case 'get_api_query_info': {
96
+ const queryName = args.queryName;
97
+ return {
98
+ content: [
99
+ {
100
+ type: 'text',
101
+ text: getApiQueryInfo(queryName),
102
+ },
103
+ ],
104
+ };
105
+ }
106
+ case 'create_page_template': {
107
+ const { pageName, features, appType } = args;
108
+ return {
109
+ content: [
110
+ {
111
+ type: 'text',
112
+ text: createPageTemplate(pageName, appType, features || []),
113
+ },
114
+ ],
115
+ };
116
+ }
117
+ default:
118
+ throw new Error(`Unknown tool: ${name}`);
119
+ }
120
+ });
121
+ // ============================================================================
122
+ // SERVER STARTUP
123
+ // ============================================================================
124
+ async function main() {
125
+ const transport = new StdioServerTransport();
126
+ await server.connect(transport);
127
+ console.error('IBL Frontend MCP Server running on stdio');
128
+ }
129
+ main().catch(console.error);
130
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAE5C,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,eAAe;AACf,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,+EAA+E;AAC/E,0BAA0B;AAC1B,+EAA+E;AAC/E,wEAAwE;AACxE,gFAAgF;AAChF,+EAA+E;AAE/E,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB;IACE,IAAI,EAAE,kBAAkB;IACxB,OAAO,EAAE,OAAO;CACjB,EACD;IACE,YAAY,EAAE;QACZ,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,EAAE;KACV;CACF,CACF,CAAC;AAEF,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E,MAAM,CAAC,iBAAiB,CAAC,0BAA0B,EAAE,KAAK,IAAI,EAAE;IAC9D,OAAO;QACL,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,QAAQ,CAA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E,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;AAC5D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const dataLayer: {
2
+ uri: string;
3
+ name: string;
4
+ description: string;
5
+ mimeType: string;
6
+ content: string;
7
+ };
8
+ //# sourceMappingURL=data-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-layer.d.ts","sourceRoot":"","sources":["../../src/resources/data-layer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;CAmLrB,CAAC"}
@@ -0,0 +1,181 @@
1
+ export const dataLayer = {
2
+ uri: 'ibl://packages/data-layer',
3
+ name: 'Data Layer Package',
4
+ description: 'Redux store and RTK Query APIs',
5
+ mimeType: 'text/markdown',
6
+ content: `# @iblai/data-layer
7
+
8
+ Redux Toolkit state management with RTK Query for API interactions.
9
+
10
+ ## Store Setup
11
+
12
+ \`\`\`typescript
13
+ import { configureStore } from '@reduxjs/toolkit';
14
+ import { mentorReducer, mentorMiddleware } from '@iblai/data-layer';
15
+ // or
16
+ import { skillsReducer, skillsMiddleware } from '@iblai/data-layer';
17
+
18
+ export const store = configureStore({
19
+ reducer: {
20
+ ...mentorReducer, // Includes all RTK Query reducers
21
+ // your custom reducers
22
+ rbac: rbacReducer,
23
+ modals: modalsReducer,
24
+ },
25
+ middleware: (getDefaultMiddleware) =>
26
+ getDefaultMiddleware().concat(...mentorMiddleware),
27
+ });
28
+ \`\`\`
29
+
30
+ ## API Slices Overview
31
+
32
+ The data-layer provides 37+ RTK Query API slices:
33
+
34
+ ### Mentor Management
35
+ \`\`\`typescript
36
+ import {
37
+ useGetMentorsQuery,
38
+ useGetMentorDetailsQuery,
39
+ useGetMentorSettingsQuery,
40
+ useCreateMentorMutation,
41
+ useEditMentorMutation,
42
+ useDeleteMentorMutation,
43
+ useForkMentorMutation,
44
+ useUpdateMentorVisibilityStatusMutation,
45
+ } from '@iblai/data-layer';
46
+
47
+ // Get all mentors for a tenant
48
+ const { data: mentors } = useGetMentorsQuery({ org: tenantKey });
49
+
50
+ // Get mentor settings
51
+ const { data: settings } = useGetMentorSettingsQuery({
52
+ org: tenantKey,
53
+ mentorId,
54
+ username,
55
+ });
56
+ \`\`\`
57
+
58
+ ### User Management
59
+ \`\`\`typescript
60
+ import {
61
+ useGetUserMetadataQuery,
62
+ useUpdateUserMetadataMutation,
63
+ useUpdateUserAccountMutation,
64
+ } from '@iblai/data-layer';
65
+
66
+ const { data: user } = useGetUserMetadataQuery({
67
+ params: { username },
68
+ });
69
+ \`\`\`
70
+
71
+ ### Platform Administration
72
+ \`\`\`typescript
73
+ import {
74
+ useGetPlatformUsersQuery,
75
+ useGetPlatformUserGroupsQuery,
76
+ useGetPlatformUserGroupDetailsQuery,
77
+ useInviteUserMutation,
78
+ useUpdatePlatformUserRoleWithPoliciesMutation,
79
+ } from '@iblai/data-layer';
80
+
81
+ // Get users with pagination
82
+ const { data: users } = useGetPlatformUsersQuery({
83
+ platformKey: tenantKey,
84
+ page: 1,
85
+ pageSize: 25,
86
+ });
87
+ \`\`\`
88
+
89
+ ### Tenant Management
90
+ \`\`\`typescript
91
+ import {
92
+ useGetTenantMetadataQuery,
93
+ useUpdateTenantMetadataMutation,
94
+ useGetUserTenantsQuery,
95
+ } from '@iblai/data-layer';
96
+
97
+ const { data: metadata } = useGetTenantMetadataQuery({ org: tenantKey });
98
+ \`\`\`
99
+
100
+ ### Chat & Messages
101
+ \`\`\`typescript
102
+ import {
103
+ useGetPinnedMessagesQuery,
104
+ useGetRecentMessageQuery,
105
+ useUpdateMessageFeedbackMutation,
106
+ } from '@iblai/data-layer';
107
+ \`\`\`
108
+
109
+ ### Skills & Catalog
110
+ \`\`\`typescript
111
+ import {
112
+ useGetReportedSkillsQuery,
113
+ useGetDesiredSkillsQuery,
114
+ useGetCatalogSearchQuery,
115
+ useGetPersonalizedSearchQuery,
116
+ } from '@iblai/data-layer';
117
+ \`\`\`
118
+
119
+ ### MCP (Model Context Protocol)
120
+ \`\`\`typescript
121
+ import {
122
+ useGetMCPServersQuery,
123
+ useCreateMCPServerMutation,
124
+ useGetConnectedServicesQuery,
125
+ useStartOAuthFlowMutation,
126
+ } from '@iblai/data-layer';
127
+ \`\`\`
128
+
129
+ ### Analytics
130
+ \`\`\`typescript
131
+ import {
132
+ useGetAnalyticsOverviewQuery,
133
+ useGetAnalyticsUsersQuery,
134
+ useGetAnalyticsReportsQuery,
135
+ } from '@iblai/data-layer';
136
+ \`\`\`
137
+
138
+ ## Cache Tags
139
+
140
+ RTK Query uses tags for cache invalidation:
141
+
142
+ \`\`\`typescript
143
+ // After creating a mentor, related queries are invalidated
144
+ const [createMentor] = useCreateMentorMutation();
145
+ await createMentor(data);
146
+ // Queries with 'mentors' tag automatically refetch
147
+
148
+ // Manual invalidation
149
+ dispatch(mentorApi.util.invalidateTags(['mentors']));
150
+ \`\`\`
151
+
152
+ ## Lazy Queries
153
+
154
+ For conditional/on-demand data fetching:
155
+
156
+ \`\`\`typescript
157
+ import { useLazyGetMentorDetailsQuery } from '@iblai/data-layer';
158
+
159
+ const [trigger, { data, isLoading }] = useLazyGetMentorDetailsQuery();
160
+
161
+ // Trigger when needed
162
+ useEffect(() => {
163
+ if (mentorId) {
164
+ trigger({ org: tenantKey, mentorId });
165
+ }
166
+ }, [mentorId]);
167
+ \`\`\`
168
+
169
+ ## Initialization
170
+
171
+ \`\`\`typescript
172
+ import { initializeDataLayer } from '@iblai/data-layer';
173
+
174
+ // In your app initialization
175
+ initializeDataLayer({
176
+ storageService: localStorage, // or AsyncStorage for React Native
177
+ });
178
+ \`\`\`
179
+ `,
180
+ };
181
+ //# sourceMappingURL=data-layer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-layer.js","sourceRoot":"","sources":["../../src/resources/data-layer.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,GAAG,EAAE,2BAA2B;IAChC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,gCAAgC;IAC7C,QAAQ,EAAE,eAAe;IACzB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6KV;CACA,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const guidesLayout: {
2
+ uri: string;
3
+ name: string;
4
+ description: string;
5
+ mimeType: string;
6
+ content: string;
7
+ };
8
+ //# sourceMappingURL=guides-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guides-layout.d.ts","sourceRoot":"","sources":["../../src/resources/guides-layout.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;CAyOxB,CAAC"}