quickbase-js 0.1.0-beta.10

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 (165) hide show
  1. package/CHANGELOG.md +211 -0
  2. package/LICENSE +21 -0
  3. package/README.md +179 -0
  4. package/api-examples.md +49 -0
  5. package/build-common.js +131 -0
  6. package/build-esm.js +71 -0
  7. package/build-umd.js +69 -0
  8. package/dist/esm/quickbase.d.ts +8081 -0
  9. package/dist/esm/quickbase.js +7928 -0
  10. package/dist/esm/quickbase.js.map +1 -0
  11. package/dist/esm/quickbase.min.js +2 -0
  12. package/dist/esm/quickbase.min.js.map +1 -0
  13. package/dist/umd/quickbase.umd.js +8504 -0
  14. package/dist/umd/quickbase.umd.js.map +1 -0
  15. package/dist/umd/quickbase.umd.min.js +2 -0
  16. package/dist/umd/quickbase.umd.min.js.map +1 -0
  17. package/docs/.vitepress/cache/deps/@theme_index.js +275 -0
  18. package/docs/.vitepress/cache/deps/@theme_index.js.map +7 -0
  19. package/docs/.vitepress/cache/deps/_metadata.json +40 -0
  20. package/docs/.vitepress/cache/deps/chunk-5A67QEFC.js +12542 -0
  21. package/docs/.vitepress/cache/deps/chunk-5A67QEFC.js.map +7 -0
  22. package/docs/.vitepress/cache/deps/chunk-7D4P4MMP.js +9719 -0
  23. package/docs/.vitepress/cache/deps/chunk-7D4P4MMP.js.map +7 -0
  24. package/docs/.vitepress/cache/deps/package.json +3 -0
  25. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +4504 -0
  26. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +7 -0
  27. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +583 -0
  28. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +7 -0
  29. package/docs/.vitepress/cache/deps/vue.js +343 -0
  30. package/docs/.vitepress/cache/deps/vue.js.map +7 -0
  31. package/docs/.vitepress/config.mts +26 -0
  32. package/docs/api-examples.md +49 -0
  33. package/docs/index.md +59 -0
  34. package/docs/markdown-examples.md +85 -0
  35. package/docs-data/api-docs.json +4143 -0
  36. package/examples/quicbase-jsCDN.html +36 -0
  37. package/examples/react.js +48 -0
  38. package/examples/vanillajs.html +47 -0
  39. package/index.md +25 -0
  40. package/markdown-examples.md +85 -0
  41. package/open-api/fix-spec-main.ts +133 -0
  42. package/open-api/generate-unified-interface.ts +104 -0
  43. package/open-api/generateDocsJson.ts +24 -0
  44. package/open-api/output/quickbase-fixed.json +11191 -0
  45. package/open-api/post-process-generated.ts +226 -0
  46. package/open-api/regenerate-client.ts +117 -0
  47. package/open-api/schema/enhance-general.ts +111 -0
  48. package/open-api/schema/fix-arrays.ts +68 -0
  49. package/open-api/schema/tags/apps.ts +90 -0
  50. package/open-api/schema/tags/fields.ts +471 -0
  51. package/open-api/schema/tags/groups.ts +51 -0
  52. package/open-api/schema/tags/index.ts +66 -0
  53. package/open-api/schema/tags/records.ts +115 -0
  54. package/open-api/schema/tags/tables.ts +211 -0
  55. package/open-api/schema/tags/users.ts +47 -0
  56. package/open-api/types/spec.ts +42 -0
  57. package/open-api/utils/common.ts +29 -0
  58. package/open-api/utils/generateJsDoc.ts +74 -0
  59. package/open-api/utils/infer-schema.ts +40 -0
  60. package/open-api/utils/naming.ts +10 -0
  61. package/open-api/utils/sharedUtils.ts +352 -0
  62. package/package.json +96 -0
  63. package/playwright.config.ts +37 -0
  64. package/rollup.config.js +114 -0
  65. package/specs/QuickBase_RESTful_API_2025-03-04T06_22_39.725Z.json +46878 -0
  66. package/specs/split/apps.json +1315 -0
  67. package/specs/split/auth.json +191 -0
  68. package/specs/split/fields.json +3869 -0
  69. package/specs/split/records.json +754 -0
  70. package/specs/split/reports.json +619 -0
  71. package/specs/split/tables.json +1605 -0
  72. package/src/RateLimitError.ts +12 -0
  73. package/src/ThrottleBucket.ts +41 -0
  74. package/src/authorizationStrategy.ts +283 -0
  75. package/src/generated-unified/QuickbaseClient.ts +1135 -0
  76. package/src/generated-unified/missing-types-report.json +3 -0
  77. package/src/index.ts +1 -0
  78. package/src/invokeMethod.ts +245 -0
  79. package/src/quickbaseClient.ts +194 -0
  80. package/src/rateLimiter.ts +25 -0
  81. package/src/tokenCache.ts +35 -0
  82. package/src/utils.ts +50 -0
  83. package/tests/playwright/qb/auth/cacheSwitching.test.ts +159 -0
  84. package/tests/playwright/qb/auth/fetchTempToken401.test.ts +219 -0
  85. package/tests/playwright/qb/auth/getAppWithTempToken.test.ts +162 -0
  86. package/tests/playwright/qb/auth/getAppWithUserToken.test.ts +153 -0
  87. package/tests/playwright/qb/auth/getTempToken.test.ts +152 -0
  88. package/tests/playwright/qb/auth/tempTokenPrefetch.test.ts +179 -0
  89. package/tests/playwright/qb/auth/tempTokenRenewal.test.ts +133 -0
  90. package/tests/setup.ts +53 -0
  91. package/tests/vitest/qb/apps/copyApp.test.ts +76 -0
  92. package/tests/vitest/qb/apps/createApp.test.ts +64 -0
  93. package/tests/vitest/qb/apps/deleteApp.test.ts +76 -0
  94. package/tests/vitest/qb/apps/getApp.test.ts +44 -0
  95. package/tests/vitest/qb/apps/getAppEvents.test.ts +67 -0
  96. package/tests/vitest/qb/apps/updateApp.test.ts +58 -0
  97. package/tests/vitest/qb/auth/mockQuickbaseServer.ts +60 -0
  98. package/tests/vitest/qb/auth/retryUserToken401.test.ts +73 -0
  99. package/tests/vitest/qb/auth/ssoTokenIntegrationWithServer.test.ts +65 -0
  100. package/tests/vitest/qb/fields/createField.test.ts +77 -0
  101. package/tests/vitest/qb/fields/deleteFields.test.ts +83 -0
  102. package/tests/vitest/qb/fields/getField.test.ts +85 -0
  103. package/tests/vitest/qb/fields/getFieldUsage.test.ts +82 -0
  104. package/tests/vitest/qb/fields/getFields.test.ts +232 -0
  105. package/tests/vitest/qb/fields/getFieldsUsage.test.ts +77 -0
  106. package/tests/vitest/qb/fields/updateField.test.ts +93 -0
  107. package/tests/vitest/qb/formulas/runFormula.test.ts +96 -0
  108. package/tests/vitest/qb/index.ts +29 -0
  109. package/tests/vitest/qb/records/deleteRecords.test.ts +110 -0
  110. package/tests/vitest/qb/records/runQuery.test.ts +146 -0
  111. package/tests/vitest/qb/records/upsert.test.ts +102 -0
  112. package/tests/vitest/qb/tables/createRelationship.test.ts +102 -0
  113. package/tests/vitest/qb/tables/createTable.test.ts +55 -0
  114. package/tests/vitest/qb/tables/deleteRelationship.test.ts +143 -0
  115. package/tests/vitest/qb/tables/deleteTable.test.ts +50 -0
  116. package/tests/vitest/qb/tables/getAppTables.test.ts +46 -0
  117. package/tests/vitest/qb/tables/getRelationships.test.ts +80 -0
  118. package/tests/vitest/qb/tables/getTable.test.ts +26 -0
  119. package/tests/vitest/qb/tables/updateRelationship.test.ts +250 -0
  120. package/tests/vitest/qb/tables/updateTable.test.ts +48 -0
  121. package/tests/vitest/unit/ThrottleBucket.test.ts +95 -0
  122. package/tests/vitest/unit/apps/copyApp.test.ts +581 -0
  123. package/tests/vitest/unit/apps/createApp.test.ts +186 -0
  124. package/tests/vitest/unit/apps/deleteApp.test.ts +216 -0
  125. package/tests/vitest/unit/apps/getApp.test.ts +128 -0
  126. package/tests/vitest/unit/apps/getAppEvents.test.ts +193 -0
  127. package/tests/vitest/unit/apps/updateApp.test.ts +412 -0
  128. package/tests/vitest/unit/auth/fetchTempToken401.test.ts +63 -0
  129. package/tests/vitest/unit/auth/getTempToken.test.ts +119 -0
  130. package/tests/vitest/unit/auth/retryTempToken401.test.ts +95 -0
  131. package/tests/vitest/unit/auth/retryTempTokenMaxRetries.test.ts +206 -0
  132. package/tests/vitest/unit/auth/retryUserToken401.test.ts +69 -0
  133. package/tests/vitest/unit/auth/ssoTokenRefresh.test.ts +325 -0
  134. package/tests/vitest/unit/fields/createField.test.ts +451 -0
  135. package/tests/vitest/unit/fields/deleteFields.test.ts +141 -0
  136. package/tests/vitest/unit/fields/getField.test.ts +189 -0
  137. package/tests/vitest/unit/fields/getFieldUsage.test.ts +180 -0
  138. package/tests/vitest/unit/fields/getFields.test.ts +122 -0
  139. package/tests/vitest/unit/fields/getFieldsUsage.test.ts +160 -0
  140. package/tests/vitest/unit/fields/updateField.test.ts +285 -0
  141. package/tests/vitest/unit/formulas/runFormula.test.ts +205 -0
  142. package/tests/vitest/unit/index.ts +34 -0
  143. package/tests/vitest/unit/quickbaseClientHttpMethods.test.ts +139 -0
  144. package/tests/vitest/unit/rateLimit.test.ts +191 -0
  145. package/tests/vitest/unit/records/deleteRecords.test.ts +112 -0
  146. package/tests/vitest/unit/records/runQuery.test.ts +102 -0
  147. package/tests/vitest/unit/records/upsert.test.ts +234 -0
  148. package/tests/vitest/unit/tables/createRelationship.test.ts +212 -0
  149. package/tests/vitest/unit/tables/createTable.test.ts +70 -0
  150. package/tests/vitest/unit/tables/deleteRelationship.test.ts +97 -0
  151. package/tests/vitest/unit/tables/deleteTable.test.ts +77 -0
  152. package/tests/vitest/unit/tables/getAppTables.test.ts +85 -0
  153. package/tests/vitest/unit/tables/getRelationships.test.ts +259 -0
  154. package/tests/vitest/unit/tables/getTable.test.ts +233 -0
  155. package/tests/vitest/unit/tables/updateRelationship.test.ts +307 -0
  156. package/tests/vitest/unit/tables/updateTable.test.ts +80 -0
  157. package/tests/vitest/unit/tokenLifespan.test.ts +204 -0
  158. package/tests/vitest/unit/umd.test.ts +8 -0
  159. package/tools/log-gen.ts +251 -0
  160. package/tools/log-gen.yaml +4777 -0
  161. package/tools/openapi-jars/openapi-generator-cli-7.12.0.jar +0 -0
  162. package/tsconfig.build.json +17 -0
  163. package/tsconfig.json +32 -0
  164. package/versionrc.json +9 -0
  165. package/vitest.config.ts +27 -0
@@ -0,0 +1,343 @@
1
+ import {
2
+ BaseTransition,
3
+ BaseTransitionPropsValidators,
4
+ Comment,
5
+ DeprecationTypes,
6
+ EffectScope,
7
+ ErrorCodes,
8
+ ErrorTypeStrings,
9
+ Fragment,
10
+ KeepAlive,
11
+ ReactiveEffect,
12
+ Static,
13
+ Suspense,
14
+ Teleport,
15
+ Text,
16
+ TrackOpTypes,
17
+ Transition,
18
+ TransitionGroup,
19
+ TriggerOpTypes,
20
+ VueElement,
21
+ assertNumber,
22
+ callWithAsyncErrorHandling,
23
+ callWithErrorHandling,
24
+ camelize,
25
+ capitalize,
26
+ cloneVNode,
27
+ compatUtils,
28
+ compile,
29
+ computed,
30
+ createApp,
31
+ createBaseVNode,
32
+ createBlock,
33
+ createCommentVNode,
34
+ createElementBlock,
35
+ createHydrationRenderer,
36
+ createPropsRestProxy,
37
+ createRenderer,
38
+ createSSRApp,
39
+ createSlots,
40
+ createStaticVNode,
41
+ createTextVNode,
42
+ createVNode,
43
+ customRef,
44
+ defineAsyncComponent,
45
+ defineComponent,
46
+ defineCustomElement,
47
+ defineEmits,
48
+ defineExpose,
49
+ defineModel,
50
+ defineOptions,
51
+ defineProps,
52
+ defineSSRCustomElement,
53
+ defineSlots,
54
+ devtools,
55
+ effect,
56
+ effectScope,
57
+ getCurrentInstance,
58
+ getCurrentScope,
59
+ getCurrentWatcher,
60
+ getTransitionRawChildren,
61
+ guardReactiveProps,
62
+ h,
63
+ handleError,
64
+ hasInjectionContext,
65
+ hydrate,
66
+ hydrateOnIdle,
67
+ hydrateOnInteraction,
68
+ hydrateOnMediaQuery,
69
+ hydrateOnVisible,
70
+ initCustomFormatter,
71
+ initDirectivesForSSR,
72
+ inject,
73
+ isMemoSame,
74
+ isProxy,
75
+ isReactive,
76
+ isReadonly,
77
+ isRef,
78
+ isRuntimeOnly,
79
+ isShallow,
80
+ isVNode,
81
+ markRaw,
82
+ mergeDefaults,
83
+ mergeModels,
84
+ mergeProps,
85
+ nextTick,
86
+ normalizeClass,
87
+ normalizeProps,
88
+ normalizeStyle,
89
+ onActivated,
90
+ onBeforeMount,
91
+ onBeforeUnmount,
92
+ onBeforeUpdate,
93
+ onDeactivated,
94
+ onErrorCaptured,
95
+ onMounted,
96
+ onRenderTracked,
97
+ onRenderTriggered,
98
+ onScopeDispose,
99
+ onServerPrefetch,
100
+ onUnmounted,
101
+ onUpdated,
102
+ onWatcherCleanup,
103
+ openBlock,
104
+ popScopeId,
105
+ provide,
106
+ proxyRefs,
107
+ pushScopeId,
108
+ queuePostFlushCb,
109
+ reactive,
110
+ readonly,
111
+ ref,
112
+ registerRuntimeCompiler,
113
+ render,
114
+ renderList,
115
+ renderSlot,
116
+ resolveComponent,
117
+ resolveDirective,
118
+ resolveDynamicComponent,
119
+ resolveFilter,
120
+ resolveTransitionHooks,
121
+ setBlockTracking,
122
+ setDevtoolsHook,
123
+ setTransitionHooks,
124
+ shallowReactive,
125
+ shallowReadonly,
126
+ shallowRef,
127
+ ssrContextKey,
128
+ ssrUtils,
129
+ stop,
130
+ toDisplayString,
131
+ toHandlerKey,
132
+ toHandlers,
133
+ toRaw,
134
+ toRef,
135
+ toRefs,
136
+ toValue,
137
+ transformVNodeArgs,
138
+ triggerRef,
139
+ unref,
140
+ useAttrs,
141
+ useCssModule,
142
+ useCssVars,
143
+ useHost,
144
+ useId,
145
+ useModel,
146
+ useSSRContext,
147
+ useShadowRoot,
148
+ useSlots,
149
+ useTemplateRef,
150
+ useTransitionState,
151
+ vModelCheckbox,
152
+ vModelDynamic,
153
+ vModelRadio,
154
+ vModelSelect,
155
+ vModelText,
156
+ vShow,
157
+ version,
158
+ warn,
159
+ watch,
160
+ watchEffect,
161
+ watchPostEffect,
162
+ watchSyncEffect,
163
+ withAsyncContext,
164
+ withCtx,
165
+ withDefaults,
166
+ withDirectives,
167
+ withKeys,
168
+ withMemo,
169
+ withModifiers,
170
+ withScopeId
171
+ } from "./chunk-5A67QEFC.js";
172
+ export {
173
+ BaseTransition,
174
+ BaseTransitionPropsValidators,
175
+ Comment,
176
+ DeprecationTypes,
177
+ EffectScope,
178
+ ErrorCodes,
179
+ ErrorTypeStrings,
180
+ Fragment,
181
+ KeepAlive,
182
+ ReactiveEffect,
183
+ Static,
184
+ Suspense,
185
+ Teleport,
186
+ Text,
187
+ TrackOpTypes,
188
+ Transition,
189
+ TransitionGroup,
190
+ TriggerOpTypes,
191
+ VueElement,
192
+ assertNumber,
193
+ callWithAsyncErrorHandling,
194
+ callWithErrorHandling,
195
+ camelize,
196
+ capitalize,
197
+ cloneVNode,
198
+ compatUtils,
199
+ compile,
200
+ computed,
201
+ createApp,
202
+ createBlock,
203
+ createCommentVNode,
204
+ createElementBlock,
205
+ createBaseVNode as createElementVNode,
206
+ createHydrationRenderer,
207
+ createPropsRestProxy,
208
+ createRenderer,
209
+ createSSRApp,
210
+ createSlots,
211
+ createStaticVNode,
212
+ createTextVNode,
213
+ createVNode,
214
+ customRef,
215
+ defineAsyncComponent,
216
+ defineComponent,
217
+ defineCustomElement,
218
+ defineEmits,
219
+ defineExpose,
220
+ defineModel,
221
+ defineOptions,
222
+ defineProps,
223
+ defineSSRCustomElement,
224
+ defineSlots,
225
+ devtools,
226
+ effect,
227
+ effectScope,
228
+ getCurrentInstance,
229
+ getCurrentScope,
230
+ getCurrentWatcher,
231
+ getTransitionRawChildren,
232
+ guardReactiveProps,
233
+ h,
234
+ handleError,
235
+ hasInjectionContext,
236
+ hydrate,
237
+ hydrateOnIdle,
238
+ hydrateOnInteraction,
239
+ hydrateOnMediaQuery,
240
+ hydrateOnVisible,
241
+ initCustomFormatter,
242
+ initDirectivesForSSR,
243
+ inject,
244
+ isMemoSame,
245
+ isProxy,
246
+ isReactive,
247
+ isReadonly,
248
+ isRef,
249
+ isRuntimeOnly,
250
+ isShallow,
251
+ isVNode,
252
+ markRaw,
253
+ mergeDefaults,
254
+ mergeModels,
255
+ mergeProps,
256
+ nextTick,
257
+ normalizeClass,
258
+ normalizeProps,
259
+ normalizeStyle,
260
+ onActivated,
261
+ onBeforeMount,
262
+ onBeforeUnmount,
263
+ onBeforeUpdate,
264
+ onDeactivated,
265
+ onErrorCaptured,
266
+ onMounted,
267
+ onRenderTracked,
268
+ onRenderTriggered,
269
+ onScopeDispose,
270
+ onServerPrefetch,
271
+ onUnmounted,
272
+ onUpdated,
273
+ onWatcherCleanup,
274
+ openBlock,
275
+ popScopeId,
276
+ provide,
277
+ proxyRefs,
278
+ pushScopeId,
279
+ queuePostFlushCb,
280
+ reactive,
281
+ readonly,
282
+ ref,
283
+ registerRuntimeCompiler,
284
+ render,
285
+ renderList,
286
+ renderSlot,
287
+ resolveComponent,
288
+ resolveDirective,
289
+ resolveDynamicComponent,
290
+ resolveFilter,
291
+ resolveTransitionHooks,
292
+ setBlockTracking,
293
+ setDevtoolsHook,
294
+ setTransitionHooks,
295
+ shallowReactive,
296
+ shallowReadonly,
297
+ shallowRef,
298
+ ssrContextKey,
299
+ ssrUtils,
300
+ stop,
301
+ toDisplayString,
302
+ toHandlerKey,
303
+ toHandlers,
304
+ toRaw,
305
+ toRef,
306
+ toRefs,
307
+ toValue,
308
+ transformVNodeArgs,
309
+ triggerRef,
310
+ unref,
311
+ useAttrs,
312
+ useCssModule,
313
+ useCssVars,
314
+ useHost,
315
+ useId,
316
+ useModel,
317
+ useSSRContext,
318
+ useShadowRoot,
319
+ useSlots,
320
+ useTemplateRef,
321
+ useTransitionState,
322
+ vModelCheckbox,
323
+ vModelDynamic,
324
+ vModelRadio,
325
+ vModelSelect,
326
+ vModelText,
327
+ vShow,
328
+ version,
329
+ warn,
330
+ watch,
331
+ watchEffect,
332
+ watchPostEffect,
333
+ watchSyncEffect,
334
+ withAsyncContext,
335
+ withCtx,
336
+ withDefaults,
337
+ withDirectives,
338
+ withKeys,
339
+ withMemo,
340
+ withModifiers,
341
+ withScopeId
342
+ };
343
+ //# sourceMappingURL=vue.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,26 @@
1
+ // docs/.vitepress/config.mjs
2
+ import { defineConfig } from "vitepress";
3
+ import apiDocs from "../../docs-data/api-docs.json";
4
+
5
+ export default defineConfig({
6
+ title: "quickbase-js",
7
+ description: "Documentation for quickbase-js library",
8
+ base: "/", // Adjust to your repo name
9
+ themeConfig: {
10
+ nav: [
11
+ {
12
+ text: "GitHub",
13
+ link: "https://github.com/DrewBradfordXYZ/quickbase-js/tree/main",
14
+ },
15
+ ],
16
+ sidebar: [
17
+ {
18
+ text: "API Methods",
19
+ items: apiDocs.map((method) => ({
20
+ text: method.name,
21
+ link: `#${method.name}`,
22
+ })),
23
+ },
24
+ ],
25
+ },
26
+ });
@@ -0,0 +1,49 @@
1
+ ---
2
+ outline: deep
3
+ ---
4
+
5
+ # Runtime API Examples
6
+
7
+ This page demonstrates usage of some of the runtime APIs provided by VitePress.
8
+
9
+ The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:
10
+
11
+ ```md
12
+ <script setup>
13
+ import { useData } from 'vitepress'
14
+
15
+ const { theme, page, frontmatter } = useData()
16
+ </script>
17
+
18
+ ## Results
19
+
20
+ ### Theme Data
21
+ <pre>{{ theme }}</pre>
22
+
23
+ ### Page Data
24
+ <pre>{{ page }}</pre>
25
+
26
+ ### Page Frontmatter
27
+ <pre>{{ frontmatter }}</pre>
28
+ ```
29
+
30
+ <script setup>
31
+ import { useData } from 'vitepress'
32
+
33
+ const { site, theme, page, frontmatter } = useData()
34
+ </script>
35
+
36
+ ## Results
37
+
38
+ ### Theme Data
39
+ <pre>{{ theme }}</pre>
40
+
41
+ ### Page Data
42
+ <pre>{{ page }}</pre>
43
+
44
+ ### Page Frontmatter
45
+ <pre>{{ frontmatter }}</pre>
46
+
47
+ ## More
48
+
49
+ Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).
package/docs/index.md ADDED
@@ -0,0 +1,59 @@
1
+ <!-- docs/index.md -->
2
+
3
+ <script setup>
4
+ import { ref } from 'vue';
5
+ import apiDocs from '../docs-data/api-docs.json'; // ESM import from project root
6
+
7
+ const methods = ref(apiDocs);
8
+ </script>
9
+
10
+ Documentation of the available API methods. For full project details and features, see the [GitHub repository](https://github.com/DrewBradfordXYZ/quickbase-js).
11
+
12
+ <div v-for="method in methods" :key="method.name" :id="method.name" class="method-card">
13
+ <h2>{{ method.name }}</h2>
14
+ <code>{{ method.method }} {{ method.path }}</code>
15
+ <p>{{ method.summary }}</p>
16
+ <p>
17
+ <a :href="method.docLink" target="_blank" rel="noopener noreferrer">{{ method.docLink }}</a>
18
+ </p>
19
+ <h3 v-if="method.parameters.length">Parameters</h3>
20
+ <ul v-if="method.parameters.length">
21
+ <li v-for="param in method.parameters" :key="param.name">
22
+ <code class="prop-bubble">{{ param.name }}</code> ({{ param.type }}, {{ param.required ? 'required' : 'optional' }}): {{ param.description || 'No description' }}
23
+ <ul v-if="param.properties && param.properties.length">
24
+ <li v-for="prop in param.properties" :key="prop.name">
25
+ <code class="prop-bubble">{{ prop.name }}</code> ({{ prop.type }}, {{ prop.required ? 'required' : 'optional' }}): {{ prop.jsdoc || 'No description' }}
26
+ </li>
27
+ </ul>
28
+ </li>
29
+ </ul>
30
+ <h3>Returns</h3>
31
+ <p><code>{{ method.returns }}</code></p>
32
+ <ul v-if="method.returnTypeDetails && method.returnTypeDetails.length">
33
+ <li v-for="prop in method.returnTypeDetails" :key="prop.name">
34
+ <code class="prop-bubble">{{ prop.name }}</code> ({{ prop.type }}, {{ prop.required ? 'required' : 'optional' }}): {{ prop.jsdoc || 'No description' }}
35
+ <ul v-if="prop.properties && prop.properties.length">
36
+ <li v-for="subProp in prop.properties" :key="subProp.name">
37
+ <code class="prop-bubble">{{ subProp.name }}</code> ({{ subProp.type }}, {{ subProp.required ? 'required' : 'optional' }}): {{ subProp.jsdoc || 'No description' }}
38
+ </li>
39
+ </ul>
40
+ </li>
41
+ </ul>
42
+ </div>
43
+
44
+ <style>
45
+ .method-card {
46
+ border: 1px solid #ddd;
47
+ padding: 16px;
48
+ margin-bottom: 16px;
49
+ border-radius: 4px;
50
+ }
51
+ .prop-bubble {
52
+ background-color: #f6f8fa;
53
+ padding: 2px 6px;
54
+ border-radius: 3px;
55
+ font-family: monospace;
56
+ font-size: 0.9em;
57
+ color: #24292e;
58
+ }
59
+ </style>
@@ -0,0 +1,85 @@
1
+ # Markdown Extension Examples
2
+
3
+ This page demonstrates some of the built-in markdown extensions provided by VitePress.
4
+
5
+ ## Syntax Highlighting
6
+
7
+ VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting:
8
+
9
+ **Input**
10
+
11
+ ````md
12
+ ```js{4}
13
+ export default {
14
+ data () {
15
+ return {
16
+ msg: 'Highlighted!'
17
+ }
18
+ }
19
+ }
20
+ ```
21
+ ````
22
+
23
+ **Output**
24
+
25
+ ```js{4}
26
+ export default {
27
+ data () {
28
+ return {
29
+ msg: 'Highlighted!'
30
+ }
31
+ }
32
+ }
33
+ ```
34
+
35
+ ## Custom Containers
36
+
37
+ **Input**
38
+
39
+ ```md
40
+ ::: info
41
+ This is an info box.
42
+ :::
43
+
44
+ ::: tip
45
+ This is a tip.
46
+ :::
47
+
48
+ ::: warning
49
+ This is a warning.
50
+ :::
51
+
52
+ ::: danger
53
+ This is a dangerous warning.
54
+ :::
55
+
56
+ ::: details
57
+ This is a details block.
58
+ :::
59
+ ```
60
+
61
+ **Output**
62
+
63
+ ::: info
64
+ This is an info box.
65
+ :::
66
+
67
+ ::: tip
68
+ This is a tip.
69
+ :::
70
+
71
+ ::: warning
72
+ This is a warning.
73
+ :::
74
+
75
+ ::: danger
76
+ This is a dangerous warning.
77
+ :::
78
+
79
+ ::: details
80
+ This is a details block.
81
+ :::
82
+
83
+ ## More
84
+
85
+ Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).