@vezham/start 0.3.3 → 26.0.0-alpha.6

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 (154) hide show
  1. package/LICENSE +173 -0
  2. package/README.md +2 -0
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +0 -0
  6. package/dist/lib/layouts/app/index.d.ts +15 -0
  7. package/dist/lib/layouts/app/index.d.ts.map +1 -0
  8. package/dist/lib/layouts/app/index.js +44 -0
  9. package/dist/lib/layouts/docs/components.d.ts +4 -0
  10. package/dist/lib/layouts/docs/components.d.ts.map +1 -0
  11. package/dist/lib/layouts/docs/components.js +29 -0
  12. package/dist/lib/layouts/docs/index.d.ts +3 -0
  13. package/dist/lib/layouts/docs/index.d.ts.map +1 -0
  14. package/dist/lib/layouts/docs/index.js +2 -0
  15. package/dist/lib/layouts/docs/layout-components.d.ts +9 -0
  16. package/dist/lib/layouts/docs/layout-components.d.ts.map +1 -0
  17. package/dist/lib/layouts/docs/layout-components.js +81 -0
  18. package/dist/lib/layouts/docs/layouts.d.ts +6 -0
  19. package/dist/lib/layouts/docs/layouts.d.ts.map +1 -0
  20. package/dist/lib/layouts/docs/layouts.js +11 -0
  21. package/dist/lib/layouts/docs/page-actions.d.ts +4 -0
  22. package/dist/lib/layouts/docs/page-actions.d.ts.map +1 -0
  23. package/dist/lib/layouts/docs/page-actions.js +154 -0
  24. package/dist/lib/layouts/docs/page-actions.variants.d.ts +44 -0
  25. package/dist/lib/layouts/docs/page-actions.variants.d.ts.map +1 -0
  26. package/dist/lib/layouts/docs/page-actions.variants.js +17 -0
  27. package/dist/lib/layouts/docs/page-content.d.ts +11 -0
  28. package/dist/lib/layouts/docs/page-content.d.ts.map +1 -0
  29. package/dist/lib/layouts/docs/page-content.js +13 -0
  30. package/dist/lib/layouts/docs/pages.d.ts +57 -0
  31. package/dist/lib/layouts/docs/pages.d.ts.map +1 -0
  32. package/dist/lib/layouts/docs/pages.js +36 -0
  33. package/dist/lib/layouts/docs/types.d.ts +21 -0
  34. package/dist/lib/layouts/docs/types.d.ts.map +1 -0
  35. package/dist/lib/mdx/index.d.ts +26 -0
  36. package/dist/lib/mdx/index.d.ts.map +1 -0
  37. package/dist/lib/mdx/index.js +10 -0
  38. package/dist/lib/pages/docs/openapi/index.d.ts +2 -0
  39. package/dist/lib/pages/docs/openapi/index.d.ts.map +1 -0
  40. package/dist/lib/pages/docs/openapi/index.js +5 -0
  41. package/dist/lib/pages/docs/route/index.d.ts +35 -0
  42. package/dist/lib/pages/docs/route/index.d.ts.map +1 -0
  43. package/dist/lib/pages/docs/route/index.js +59 -0
  44. package/dist/lib/provider/next/config.d.ts +3 -0
  45. package/dist/lib/provider/next/config.d.ts.map +1 -0
  46. package/dist/lib/provider/next/config.js +6 -0
  47. package/dist/lib/provider/next/index.d.ts +3 -0
  48. package/dist/lib/provider/next/index.d.ts.map +1 -0
  49. package/dist/lib/provider/next/index.js +3 -0
  50. package/dist/lib/provider/next/provider.d.ts +3 -0
  51. package/dist/lib/provider/next/provider.d.ts.map +1 -0
  52. package/dist/lib/provider/next/provider.js +24 -0
  53. package/dist/lib/provider/next/root-document.d.ts +3 -0
  54. package/dist/lib/provider/next/root-document.d.ts.map +1 -0
  55. package/dist/lib/provider/next/root-document.js +27 -0
  56. package/dist/lib/provider/shared/config.d.ts +4 -0
  57. package/dist/lib/provider/shared/config.d.ts.map +1 -0
  58. package/dist/lib/provider/shared/config.js +10 -0
  59. package/dist/lib/provider/shared/devtools.d.ts +10 -0
  60. package/dist/lib/provider/shared/devtools.d.ts.map +1 -0
  61. package/dist/lib/provider/shared/devtools.js +24 -0
  62. package/dist/lib/provider/shared/provider.d.ts +13 -0
  63. package/dist/lib/provider/shared/provider.d.ts.map +1 -0
  64. package/dist/lib/provider/shared/provider.js +40 -0
  65. package/{lib/provider/src → dist/lib/provider/shared}/types.d.ts +16 -19
  66. package/dist/lib/provider/shared/types.d.ts.map +1 -0
  67. package/dist/lib/provider/shared/types.js +4 -0
  68. package/dist/lib/provider/tanstack/config.d.ts +4 -0
  69. package/dist/lib/provider/tanstack/config.d.ts.map +1 -0
  70. package/dist/lib/provider/tanstack/config.js +11 -0
  71. package/dist/lib/provider/tanstack/index.d.ts +4 -0
  72. package/dist/lib/provider/tanstack/index.d.ts.map +1 -0
  73. package/dist/lib/provider/tanstack/index.js +4 -0
  74. package/dist/lib/provider/tanstack/provider.d.ts +3 -0
  75. package/dist/lib/provider/tanstack/provider.d.ts.map +1 -0
  76. package/dist/lib/provider/tanstack/provider.js +22 -0
  77. package/dist/lib/provider/tanstack/root-document.d.ts +8 -0
  78. package/dist/lib/provider/tanstack/root-document.d.ts.map +1 -0
  79. package/dist/lib/provider/tanstack/root-document.js +28 -0
  80. package/dist/lib/provider/tanstack-docs/config.d.ts +14 -0
  81. package/dist/lib/provider/tanstack-docs/config.d.ts.map +1 -0
  82. package/dist/lib/provider/tanstack-docs/config.js +39 -0
  83. package/dist/lib/provider/tanstack-docs/i18n.d.ts +4 -0
  84. package/dist/lib/provider/tanstack-docs/i18n.d.ts.map +1 -0
  85. package/dist/lib/provider/tanstack-docs/i18n.js +30 -0
  86. package/dist/lib/provider/tanstack-docs/index.d.ts +5 -0
  87. package/dist/lib/provider/tanstack-docs/index.d.ts.map +1 -0
  88. package/dist/lib/provider/tanstack-docs/index.js +5 -0
  89. package/dist/lib/provider/tanstack-docs/routes.d.ts +13 -0
  90. package/dist/lib/provider/tanstack-docs/routes.d.ts.map +1 -0
  91. package/dist/lib/provider/tanstack-docs/routes.js +23 -0
  92. package/dist/lib/provider/tanstack-docs/search.d.ts +4 -0
  93. package/dist/lib/provider/tanstack-docs/search.d.ts.map +1 -0
  94. package/dist/lib/provider/tanstack-docs/search.js +24 -0
  95. package/dist/lib/provider/vite/config.d.ts +3 -0
  96. package/dist/lib/provider/vite/config.d.ts.map +1 -0
  97. package/dist/lib/provider/vite/config.js +29 -0
  98. package/dist/lib/provider/vite/index.d.ts +4 -0
  99. package/dist/lib/provider/vite/index.d.ts.map +1 -0
  100. package/dist/lib/provider/vite/index.js +4 -0
  101. package/dist/lib/provider/vite/provider.d.ts +3 -0
  102. package/dist/lib/provider/vite/provider.d.ts.map +1 -0
  103. package/dist/lib/provider/vite/provider.js +13 -0
  104. package/dist/lib/router/tanstack/index.d.ts +3 -0
  105. package/dist/lib/router/tanstack/index.d.ts.map +1 -0
  106. package/dist/lib/router/tanstack/index.js +3 -0
  107. package/dist/lib/router/tanstack/root.d.ts +3 -0
  108. package/dist/lib/router/tanstack/root.d.ts.map +1 -0
  109. package/dist/lib/router/tanstack/root.js +22 -0
  110. package/dist/lib/router/tanstack/router.d.ts +3 -0
  111. package/dist/lib/router/tanstack/router.d.ts.map +1 -0
  112. package/dist/lib/router/tanstack/router.js +22 -0
  113. package/dist/lib/runtime/docs/head.d.ts +46 -0
  114. package/dist/lib/runtime/docs/head.d.ts.map +1 -0
  115. package/dist/lib/runtime/docs/head.js +80 -0
  116. package/dist/lib/runtime/docs/i18n.d.ts +33 -0
  117. package/dist/lib/runtime/docs/i18n.d.ts.map +1 -0
  118. package/dist/lib/runtime/docs/i18n.js +41 -0
  119. package/dist/lib/runtime/docs/icons.d.ts +26 -0
  120. package/dist/lib/runtime/docs/icons.d.ts.map +1 -0
  121. package/dist/lib/runtime/docs/icons.js +103 -0
  122. package/dist/lib/runtime/docs/index.d.ts +9 -0
  123. package/dist/lib/runtime/docs/index.d.ts.map +1 -0
  124. package/dist/lib/runtime/docs/index.js +9 -0
  125. package/dist/lib/runtime/docs/openapi.d.ts +41 -0
  126. package/dist/lib/runtime/docs/openapi.d.ts.map +1 -0
  127. package/dist/lib/runtime/docs/openapi.js +40 -0
  128. package/dist/lib/runtime/docs/pages.d.ts +98 -0
  129. package/dist/lib/runtime/docs/pages.d.ts.map +1 -0
  130. package/dist/lib/runtime/docs/pages.js +89 -0
  131. package/dist/lib/runtime/docs/routes.d.ts +17 -0
  132. package/dist/lib/runtime/docs/routes.d.ts.map +1 -0
  133. package/dist/lib/runtime/docs/routes.js +45 -0
  134. package/dist/lib/runtime/docs/runtime.d.ts +185 -0
  135. package/dist/lib/runtime/docs/runtime.d.ts.map +1 -0
  136. package/dist/lib/runtime/docs/runtime.js +55 -0
  137. package/dist/lib/runtime/docs/static.d.ts +16 -0
  138. package/dist/lib/runtime/docs/static.d.ts.map +1 -0
  139. package/dist/lib/runtime/docs/static.js +20 -0
  140. package/dist/lib/story/index.d.ts +2 -0
  141. package/dist/lib/story/index.d.ts.map +1 -0
  142. package/dist/lib/story/index.js +5 -0
  143. package/dist/styles/docs/index.css +2 -0
  144. package/package.json +91 -20
  145. package/C2Q2AJ2U-DTgcxQMB.mjs +0 -33
  146. package/CTUG6TWM-DqDj0HqV.mjs +0 -42
  147. package/PPK4CBG4-Bam-TzhH.mjs +0 -8999
  148. package/index-B5yPbrKI.mjs +0 -2259
  149. package/index-BVFA6t6h.mjs +0 -2213
  150. package/index-CbtQygO9.mjs +0 -55716
  151. package/index.d.ts +0 -1
  152. package/index.mjs +0 -5
  153. package/lib/provider/src/index.d.ts +0 -6
  154. package/style.css +0 -1
package/LICENSE ADDED
@@ -0,0 +1,173 @@
1
+ SPDX-License-Identifier: BUSL-1.1
2
+
3
+ Business Source License 1.1
4
+
5
+ License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
6
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
7
+
8
+ ---
9
+
10
+ Parameters
11
+
12
+ Licensor: Vezham Technologies Private Limited
13
+
14
+ Licensed Work: The source code and packages in this repository (“the Licensed Work”).
15
+ The Licensed Work is (c) 2025–present Vezham Technologies Private Limited
16
+
17
+ Release Tag: The applicable release tag or commit identifier (for example, “v1.0.0”)
18
+ published by the Licensor for this version of the Licensed Work.
19
+ Users must cross-check the tag or commit identifier to verify
20
+ the release version and applicable Change Date.
21
+
22
+ Additional Use Grant: 1. You may make non-production use of the Licensed Work.
23
+
24
+ 2. You may make production use of the Licensed Work, provided
25
+ your use does not include offering the Licensed Work, or any
26
+ derivative thereof, to third parties on a hosted, embedded,
27
+ or managed basis in order to compete with the Licensor’s
28
+ commercial offerings based on the Licensed Work, or offerings
29
+ that provide substantially similar functionality.
30
+
31
+ For purposes of this license:
32
+
33
+ A “competitive offering” is a Product that is offered to third
34
+ parties on a paid basis, including through paid support,
35
+ consulting, managed service arrangements, or similar commercial
36
+ relationships, that significantly overlaps with the capabilities
37
+ or functionality of the Licensor’s commercial offerings based on
38
+ the Licensed Work.
39
+
40
+ If your Product is not a competitive offering when you first
41
+ make it generally available, it will not become a competitive
42
+ offering solely because the Licensor releases a new version of the
43
+ Licensed Work with additional features or capabilities. Products
44
+ that are not provided on a paid basis are not competitive offerings.
45
+
46
+ “Product” means any software or service that is (a) offered to end
47
+ users for deployment in their own environments (self-managed), or
48
+ (b) offered as a hosted, cloud, or managed service by you or on
49
+ your behalf.
50
+
51
+ “Embedded” means including the source code or executable code of
52
+ the Licensed Work in a competitive offering. “Embedded” also means
53
+ packaging or distributing the competitive offering in a way that
54
+ requires the Licensed Work to be accessed, invoked, or downloaded
55
+ for the competitive offering to function.
56
+
57
+ Hosting or using the Licensed Work internally within your own
58
+ organization, including your affiliates under common control,
59
+ is not considered a competitive offering.
60
+
61
+ 3. Educational institutions and legally recognised non-profit
62
+ organizations may use the Licensed Work in a production
63
+ environment without restriction, provided such use is not
64
+ for commercial profit.
65
+
66
+ For binding interpretive guidance on using Vezham products under
67
+ the Business Source License, please visit our licensing FAQ:
68
+ https://trust.vezham.com/legal/license-faq
69
+
70
+ Change Date: Four (4) years from the date the Licensed Work is first publicly
71
+ released under the specified Release Tag
72
+
73
+ Change License: GNU Affero General Public License v3.0 (AGPL-3.0-or-later)
74
+ The full text of the Change License is available at:
75
+ https://www.gnu.org/licenses/agpl-3.0.html
76
+
77
+ For information about commercial licensing or alternative arrangements,
78
+ please contact the Licensor at: https://vezham.com
79
+ or email: license@vezham.com
80
+
81
+ For formal legal notices or IP-related correspondence,
82
+ please contact: licensor@vezham.com
83
+
84
+ ---
85
+
86
+ Notice
87
+
88
+ The Business Source License (this document, or the "License") is not an Open
89
+ Source license. However, the Licensed Work will eventually be made available
90
+ under an Open Source License, as stated in this License.
91
+
92
+ For more information on the use of the Business Source License generally,
93
+ please visit the Adopting and Developing Business Source License FAQ at:
94
+ https://mariadb.com/bsl-faq-adopting
95
+
96
+ ---
97
+
98
+ Business Source License 1.1
99
+
100
+ ---
101
+
102
+ Terms
103
+
104
+ The Licensor hereby grants you the right to copy, modify, create derivative
105
+ works, redistribute, and make non-production use of the Licensed Work.
106
+ The Licensor may make an Additional Use Grant, above, permitting limited
107
+ production use.
108
+
109
+ Effective on the Change Date, or the fourth anniversary of the first publicly
110
+ available distribution of a specific version of the Licensed Work under this
111
+ License, whichever comes first, the Licensor hereby grants you rights under
112
+ the terms of the Change License, and the rights granted in the paragraph
113
+ above terminate.
114
+
115
+ If your use of the Licensed Work does not comply with the requirements
116
+ currently in effect as described in this License, you must purchase a
117
+ commercial license from the Licensor, its affiliated entities, or authorized
118
+ resellers, or you must refrain from using the Licensed Work.
119
+
120
+ All copies of the original and modified Licensed Work, and derivative works
121
+ of the Licensed Work, are subject to this License. This License applies
122
+ separately for each version of the Licensed Work, and the Change Date may
123
+ vary for each version of the Licensed Work released by the Licensor.
124
+
125
+ You must conspicuously display this License on each original or modified copy
126
+ of the Licensed Work. If you receive the Licensed Work in original or modified
127
+ form from a third party, the terms and conditions set forth in this License
128
+ apply to your use of that work.
129
+
130
+ Any use of the Licensed Work in violation of this License will automatically
131
+ terminate your rights under this License for the current and all other versions
132
+ of the Licensed Work.
133
+
134
+ This License does not grant you any right in any trademark or logo of the
135
+ Licensor or its affiliates (provided that you may use a trademark or logo of
136
+ the Licensor as expressly required by this License).
137
+
138
+ ---
139
+
140
+ Disclaimer
141
+
142
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
143
+ AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
144
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
145
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
146
+ TITLE.
147
+
148
+ -----------------------------------------------------------------------------
149
+
150
+ MariaDB hereby grants you permission to use this License’s text to license your
151
+ works, and to refer to it using the trademark "Business Source License", as long
152
+ as you comply with the Covenants of Licensor below.
153
+
154
+ Covenants of Licensor
155
+
156
+ In consideration of the right to use this License’s text and the "Business
157
+ Source License" name and trademark, Licensor covenants to MariaDB, and to all
158
+ other recipients of the licensed work to be provided by Licensor:
159
+
160
+ 1. To specify as the Change License the GPL Version 3.0 or any later version,
161
+ or a license that is compatible with GPL Version 3.0 or a later version,
162
+ where "compatible" means that software provided under the Change License can
163
+ be included in a program with software provided under GPL Version 3.0 or a
164
+ later version. Licensor may specify additional Change Licenses without
165
+ limitation.
166
+
167
+ 2. To either: (a) specify an additional grant of rights to use that does not
168
+ impose any additional restriction on the right granted in this License, as
169
+ the Additional Use Grant; or (b) insert the text "None".
170
+
171
+ 3. To specify a Change Date.
172
+
173
+ 4. Not to modify this License in any other way.
package/README.md CHANGED
@@ -1 +1,3 @@
1
1
  # @vezham/start
2
+
3
+ App providers, routing, and framework adapters.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAA"}
package/dist/index.js ADDED
File without changes
@@ -0,0 +1,15 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export type AppShellProps = {
3
+ children: ReactNode;
4
+ contentClassName?: string;
5
+ footer?: ReactNode;
6
+ footerClassName?: string;
7
+ header?: ReactNode;
8
+ headerClassName?: string;
9
+ mainClassName?: string;
10
+ sidebar?: ReactNode;
11
+ sidebarClassName?: string;
12
+ } & Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
13
+ export declare const AppShell: ({ children, className, contentClassName, footer, footerClassName, header, headerClassName, mainClassName, sidebar, sidebarClassName, ...props }: AppShellProps) => import("react").JSX.Element;
14
+ export declare const AppLayout: ({ children, className, contentClassName, footer, footerClassName, header, headerClassName, mainClassName, sidebar, sidebarClassName, ...props }: AppShellProps) => import("react").JSX.Element;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/app/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMhE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,SAAS,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAA;AAErD,eAAO,MAAM,QAAQ,GAAI,iJAYtB,aAAa,gCAiDf,CAAA;AAED,eAAO,MAAM,SAAS,oJAnDnB,aAAa,gCAmDiB,CAAA"}
@@ -0,0 +1,44 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ //#region src/lib/layouts/app/index.tsx
3
+ var cx = (...classNames) => {
4
+ return classNames.filter(Boolean).join(" ");
5
+ };
6
+ var AppShell = ({ children, className, contentClassName, footer, footerClassName, header, headerClassName, mainClassName, sidebar, sidebarClassName, ...props }) => {
7
+ return /* @__PURE__ */ jsx("div", {
8
+ "data-slot": "app-shell",
9
+ className: cx("bg-background text-foreground min-h-svh", className),
10
+ ...props,
11
+ children: /* @__PURE__ */ jsxs("div", {
12
+ "data-slot": "app-shell-frame",
13
+ className: "flex min-h-svh",
14
+ children: [sidebar ? /* @__PURE__ */ jsx("aside", {
15
+ "data-slot": "app-sidebar",
16
+ className: cx("bg-background hidden w-64 shrink-0 border-r md:block", sidebarClassName),
17
+ children: sidebar
18
+ }) : null, /* @__PURE__ */ jsxs("div", {
19
+ "data-slot": "app-main",
20
+ className: cx("flex min-w-0 flex-1 flex-col", mainClassName),
21
+ children: [
22
+ header ? /* @__PURE__ */ jsx("header", {
23
+ "data-slot": "app-header",
24
+ className: cx("bg-background shrink-0 border-b", headerClassName),
25
+ children: header
26
+ }) : null,
27
+ /* @__PURE__ */ jsx("main", {
28
+ "data-slot": "app-content",
29
+ className: cx("min-w-0 flex-1", contentClassName),
30
+ children
31
+ }),
32
+ footer ? /* @__PURE__ */ jsx("footer", {
33
+ "data-slot": "app-footer",
34
+ className: cx("bg-background shrink-0 border-t", footerClassName),
35
+ children: footer
36
+ }) : null
37
+ ]
38
+ })]
39
+ })
40
+ });
41
+ };
42
+ var AppLayout = AppShell;
43
+ //#endregion
44
+ export { AppLayout, AppShell };
@@ -0,0 +1,4 @@
1
+ import { DocsLayoutProps, DocsPageProps } from './types';
2
+ export declare const DocsLayout: ({ shell, ...props }: DocsLayoutProps) => import("react").JSX.Element;
3
+ export declare const DocsPage: ({ full, shell, toc, ...props }: DocsPageProps) => import("react").JSX.Element;
4
+ //# sourceMappingURL=components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/components.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7D,eAAO,MAAM,UAAU,GAAI,qBAA8B,eAAe,gCAGvE,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,gCAKtB,aAAa,gCA2Bf,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { layouts } from "./layouts.js";
2
+ import { DocsPageContent } from "./page-content.js";
3
+ import { getPageComponents } from "./pages.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/lib/layouts/docs/components.tsx
6
+ var DocsLayout = ({ shell = "docs", ...props }) => {
7
+ const Layout = layouts[shell];
8
+ return /* @__PURE__ */ jsx(Layout, { ...props });
9
+ };
10
+ var DocsPage = ({ full, shell = "docs", toc, ...props }) => {
11
+ const { Page, Body, Description, Title } = getPageComponents(shell);
12
+ const content = full ? /* @__PURE__ */ jsx(Body, { children: props.children }) : /* @__PURE__ */ jsx(DocsPageContent, {
13
+ ...props,
14
+ Body,
15
+ Description,
16
+ Title
17
+ });
18
+ if (shell === "home") return /* @__PURE__ */ jsx("article", {
19
+ className: `mx-auto flex w-full min-w-0 flex-col gap-4 px-6 py-10 ${full ? "max-w-7xl" : "max-w-4xl"}`,
20
+ children: content
21
+ });
22
+ return /* @__PURE__ */ jsx(Page, {
23
+ full,
24
+ toc,
25
+ children: content
26
+ });
27
+ };
28
+ //#endregion
29
+ export { DocsLayout, DocsPage };
@@ -0,0 +1,3 @@
1
+ export { DocsLayout, DocsLayout as DocsLayoutShell, DocsPage, DocsPage as DocsPageShell } from './components';
2
+ export type { DocsLayoutProps, DocsPageProps, DocsShell } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,IAAI,eAAe,EAC7B,QAAQ,EACR,QAAQ,IAAI,aAAa,EAC1B,MAAM,cAAc,CAAA;AACrB,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { DocsLayout, DocsPage } from "./components.js";
2
+ export { DocsLayout, DocsLayout as DocsLayoutShell, DocsPage, DocsPage as DocsPageShell };
@@ -0,0 +1,9 @@
1
+ import { DocsLayoutProps } from './types';
2
+ type Props = Omit<DocsLayoutProps, 'shell'>;
3
+ export declare const HomeDocsLayout: (props: Props) => import("react").JSX.Element;
4
+ export declare const GlassDocsLayout: (props: Props) => import("react").JSX.Element;
5
+ export declare const FluxDocsLayout: (props: Props) => import("react").JSX.Element;
6
+ export declare const NotebookDocsLayout: (props: Props) => import("react").JSX.Element;
7
+ export declare const StandardDocsLayout: (props: Props) => import("react").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=layout-components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-components.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/layout-components.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,KAAK,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAA;AAuB3C,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,gCAG1C,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,KAAK,gCAO3C,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,gCAU1C,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,KAAK,gCAc9C,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,KAAK,gCAuB9C,CAAA"}
@@ -0,0 +1,81 @@
1
+ import { createElement } from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { DocsLayout } from "@vezham/docs-react/layouts/docs";
4
+ import { DocsLayout as DocsLayout$1 } from "@vezham/docs-react/layouts/flux";
5
+ import { GlassLayout } from "@vezham/docs-react/layouts/glass";
6
+ import { HomeLayout } from "@vezham/docs-react/layouts/home";
7
+ import { DocsLayout as DocsLayout$2 } from "@vezham/docs-react/layouts/notebook";
8
+ //#region src/lib/layouts/docs/layout-components.tsx
9
+ var getLayoutInputs = (props) => {
10
+ const { tree, nav, links, githubUrl, i18n, themeSwitch, searchToggle, tabMode, ...layoutProps } = props;
11
+ return {
12
+ children: props.children,
13
+ tree,
14
+ base: {
15
+ nav,
16
+ links,
17
+ githubUrl,
18
+ i18n,
19
+ themeSwitch,
20
+ searchToggle
21
+ },
22
+ layoutProps,
23
+ tabMode
24
+ };
25
+ };
26
+ var HomeDocsLayout = (props) => {
27
+ const { base, children } = getLayoutInputs(props);
28
+ return /* @__PURE__ */ jsx(HomeLayout, {
29
+ ...base,
30
+ children
31
+ });
32
+ };
33
+ var GlassDocsLayout = (props) => {
34
+ const { base, children, tree } = getLayoutInputs(props);
35
+ return /* @__PURE__ */ jsx(GlassLayout, {
36
+ ...base,
37
+ tree,
38
+ tabs: { transform: (option) => option },
39
+ children
40
+ });
41
+ };
42
+ var FluxDocsLayout = (props) => {
43
+ const { base, children, tree } = getLayoutInputs(props);
44
+ return /* @__PURE__ */ jsx(DocsLayout$1, {
45
+ ...base,
46
+ tree,
47
+ containerProps: { className: "[&>[data-layout-main]]:w-full" },
48
+ children
49
+ });
50
+ };
51
+ var NotebookDocsLayout = (props) => {
52
+ const { base, children, layoutProps, tabMode, tree } = getLayoutInputs(props);
53
+ const notebookTabMode = tabMode === "top" ? "navbar" : tabMode === "auto" ? "sidebar" : tabMode;
54
+ return /* @__PURE__ */ jsx(DocsLayout$2, {
55
+ ...base,
56
+ ...layoutProps,
57
+ tree,
58
+ tabMode: notebookTabMode,
59
+ children
60
+ });
61
+ };
62
+ var StandardDocsLayout = (props) => {
63
+ const { base, children, layoutProps, tabMode, tree } = getLayoutInputs(props);
64
+ const { sidebar, ...docsLayoutProps } = layoutProps;
65
+ const { banner, footer, ...sidebarProps } = sidebar ?? {};
66
+ const docsTabMode = tabMode === "navbar" ? "top" : tabMode === "sidebar" ? "auto" : tabMode;
67
+ return /* @__PURE__ */ jsx(DocsLayout, {
68
+ ...base,
69
+ ...docsLayoutProps,
70
+ sidebar: sidebar && {
71
+ ...sidebarProps,
72
+ banner: typeof banner === "function" ? createElement(banner) : banner,
73
+ footer: typeof footer === "function" ? createElement(footer) : footer
74
+ },
75
+ tree,
76
+ tabMode: docsTabMode,
77
+ children
78
+ });
79
+ };
80
+ //#endregion
81
+ export { FluxDocsLayout, GlassDocsLayout, HomeDocsLayout, NotebookDocsLayout, StandardDocsLayout };
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ import { DocsLayoutProps, DocsShell } from './types';
3
+ type Props = Omit<DocsLayoutProps, 'shell'>;
4
+ export declare const layouts: Record<DocsShell, (props: Props) => ReactNode>;
5
+ export {};
6
+ //# sourceMappingURL=layouts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layouts.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/layouts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAStC,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEzD,KAAK,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAA;AAE3C,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAMlE,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { FluxDocsLayout, GlassDocsLayout, HomeDocsLayout, NotebookDocsLayout, StandardDocsLayout } from "./layout-components.js";
2
+ //#region src/lib/layouts/docs/layouts.ts
3
+ var layouts = {
4
+ docs: StandardDocsLayout,
5
+ flux: FluxDocsLayout,
6
+ glass: GlassDocsLayout,
7
+ home: HomeDocsLayout,
8
+ notebook: NotebookDocsLayout
9
+ };
10
+ //#endregion
11
+ export { layouts };
@@ -0,0 +1,4 @@
1
+ export declare const PageActions: ({ markdownUrl }: {
2
+ markdownUrl: string;
3
+ }) => import("react").JSX.Element;
4
+ //# sourceMappingURL=page-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-actions.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/page-actions.tsx"],"names":[],"mappings":"AAyEA,eAAO,MAAM,WAAW,GAAI,iBAAiB;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,gCAgHnE,CAAA"}
@@ -0,0 +1,154 @@
1
+ import { pageActionsVariants } from "./page-actions.variants.js";
2
+ import { useEffect, useRef, useState } from "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { Button, ButtonGroup, Dropdown } from "@vezham/react-v3";
5
+ import { writeClipboardText } from "@vezham/docs-react/utils/clipboard";
6
+ import { AltArrowDown, ChatRound, ClipboardCheck, CodeFile, Copy, Cursor, FileText, SquareArrowUp } from "@vezham/icons-react";
7
+ //#region src/lib/layouts/docs/page-actions.tsx
8
+ var styles = pageActionsVariants();
9
+ var getPageActions = (markdownUrl) => {
10
+ const prompt = `Read ${typeof window === "undefined" ? markdownUrl : new URL(markdownUrl, window.location.origin).href}, I want to ask questions about this page.`;
11
+ return [
12
+ {
13
+ id: "markdown",
14
+ title: "View as Markdown",
15
+ description: "View page as Markdown format",
16
+ href: markdownUrl,
17
+ icon: FileText
18
+ },
19
+ {
20
+ id: "cursor",
21
+ title: "Add to Cursor",
22
+ description: "Install MCP Server on Cursor",
23
+ href: "cursor://anysphere.cursor-deeplink/mcp/install?name=vezham-react&config=eyJjb21tYW5kIjoibnB4IC15IEBoZXJvdWkvcmVhY3QtbWNwQGxhdGVzdCJ9",
24
+ icon: Cursor
25
+ },
26
+ {
27
+ id: "vscode",
28
+ title: "Add to VS Code",
29
+ description: "Install MCP Server on VS Code",
30
+ href: "vscode:mcp/install?%7B%22name%22%3A%22vezham-react%22%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40vezham%2Freact-mcp%40latest%22%5D%7D",
31
+ icon: CodeFile
32
+ },
33
+ {
34
+ id: "chatgpt",
35
+ title: "Open in ChatGPT",
36
+ description: "Ask questions about this page",
37
+ href: `https://chatgpt.com/?${new URLSearchParams({
38
+ hints: "search",
39
+ q: prompt
40
+ })}`,
41
+ icon: ChatRound
42
+ },
43
+ {
44
+ id: "claude",
45
+ title: "Open in Claude",
46
+ description: "Ask questions about this page",
47
+ href: `https://claude.ai/new?${new URLSearchParams({ q: prompt })}`,
48
+ icon: ChatRound
49
+ }
50
+ ];
51
+ };
52
+ var PageActions = ({ markdownUrl }) => {
53
+ const [copiedAction, setCopiedAction] = useState();
54
+ const [isLoading, setLoading] = useState();
55
+ const [isOpen, setOpen] = useState(false);
56
+ const [error, setError] = useState();
57
+ const copiedTimer = useRef(void 0);
58
+ useEffect(() => () => clearTimeout(copiedTimer.current), []);
59
+ const actions = getPageActions(markdownUrl);
60
+ const copy = async (action) => {
61
+ setLoading(action);
62
+ setError(void 0);
63
+ try {
64
+ let text;
65
+ if (action === "markdown") {
66
+ const response = await fetch(markdownUrl);
67
+ if (!response.ok) throw new Error("Unable to load Markdown");
68
+ text = await response.text();
69
+ } else text = `Use this documentation page as context when helping me: ${new URL(markdownUrl, window.location.origin).href}`;
70
+ await writeClipboardText(text);
71
+ clearTimeout(copiedTimer.current);
72
+ setCopiedAction(action);
73
+ copiedTimer.current = setTimeout(() => setCopiedAction(void 0), 2e3);
74
+ } catch {
75
+ setError("Unable to copy. Please try again.");
76
+ } finally {
77
+ setLoading(void 0);
78
+ }
79
+ };
80
+ return /* @__PURE__ */ jsxs("div", {
81
+ className: styles.root(),
82
+ children: [
83
+ /* @__PURE__ */ jsxs(Button, {
84
+ isDisabled: Boolean(isLoading),
85
+ size: "md",
86
+ variant: "tertiary",
87
+ onPress: () => copy("prompt"),
88
+ children: [copiedAction === "prompt" ? /* @__PURE__ */ jsx(ClipboardCheck, { size: 16 }) : /* @__PURE__ */ jsx(ChatRound, { size: 16 }), copiedAction === "prompt" ? "Copied" : "Copy Prompt"]
89
+ }),
90
+ /* @__PURE__ */ jsxs(ButtonGroup, {
91
+ size: "md",
92
+ variant: "tertiary",
93
+ children: [/* @__PURE__ */ jsxs(Button, {
94
+ isDisabled: Boolean(isLoading),
95
+ onPress: () => copy("markdown"),
96
+ children: [copiedAction === "markdown" ? /* @__PURE__ */ jsx(ClipboardCheck, { size: 16 }) : /* @__PURE__ */ jsx(Copy, { size: 16 }), copiedAction === "markdown" ? "Copied" : "Copy Markdown"]
97
+ }), /* @__PURE__ */ jsxs(Dropdown, {
98
+ isOpen,
99
+ onOpenChange: setOpen,
100
+ children: [/* @__PURE__ */ jsxs(Button, {
101
+ "aria-label": "More page actions",
102
+ isIconOnly: true,
103
+ size: "md",
104
+ variant: "tertiary",
105
+ children: [/* @__PURE__ */ jsx(ButtonGroup.Separator, {}), /* @__PURE__ */ jsx(AltArrowDown, {
106
+ size: 14,
107
+ className: styles.chevron({ open: isOpen })
108
+ })]
109
+ }), /* @__PURE__ */ jsx(Dropdown.Popover, {
110
+ placement: "bottom end",
111
+ children: /* @__PURE__ */ jsx(Dropdown.Menu, {
112
+ "aria-label": "Page actions",
113
+ children: actions.map((action) => {
114
+ const Icon = action.icon;
115
+ const isAI = action.id === "chatgpt" || action.id === "claude";
116
+ return /* @__PURE__ */ jsxs(Dropdown.Item, {
117
+ href: action.href,
118
+ id: action.id,
119
+ rel: "noreferrer noopener",
120
+ target: "_blank",
121
+ textValue: action.title,
122
+ children: [
123
+ /* @__PURE__ */ jsx(Icon, {
124
+ size: 16,
125
+ className: styles.icon()
126
+ }),
127
+ /* @__PURE__ */ jsxs("span", {
128
+ className: styles.itemContent(),
129
+ children: [/* @__PURE__ */ jsx("span", { children: action.title }), /* @__PURE__ */ jsx("span", {
130
+ className: styles.description(),
131
+ children: action.description
132
+ })]
133
+ }),
134
+ isAI && /* @__PURE__ */ jsx(SquareArrowUp, {
135
+ size: 14,
136
+ className: styles.externalIcon()
137
+ })
138
+ ]
139
+ }, action.id);
140
+ })
141
+ })
142
+ })]
143
+ })]
144
+ }),
145
+ error && /* @__PURE__ */ jsx("p", {
146
+ role: "alert",
147
+ className: styles.error(),
148
+ children: error
149
+ })
150
+ ]
151
+ });
152
+ };
153
+ //#endregion
154
+ export { PageActions };
@@ -0,0 +1,44 @@
1
+ export declare const pageActionsVariants: import('tailwind-variants').TVReturnType<{
2
+ open: {
3
+ true: {
4
+ chevron: string;
5
+ };
6
+ };
7
+ }, {
8
+ root: string;
9
+ chevron: string;
10
+ icon: string;
11
+ itemContent: string;
12
+ description: string;
13
+ externalIcon: string;
14
+ error: string;
15
+ }, undefined, {
16
+ open: {
17
+ true: {
18
+ chevron: string;
19
+ };
20
+ };
21
+ }, {
22
+ root: string;
23
+ chevron: string;
24
+ icon: string;
25
+ itemContent: string;
26
+ description: string;
27
+ externalIcon: string;
28
+ error: string;
29
+ }, import('tailwind-variants').TVReturnTypeLike<{
30
+ open: {
31
+ true: {
32
+ chevron: string;
33
+ };
34
+ };
35
+ }, {
36
+ root: string;
37
+ chevron: string;
38
+ icon: string;
39
+ itemContent: string;
40
+ description: string;
41
+ externalIcon: string;
42
+ error: string;
43
+ }>>;
44
+ //# sourceMappingURL=page-actions.variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-actions.variants.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/page-actions.variants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAY9B,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { tv } from "@vezham/react-v3";
2
+ //#region src/lib/layouts/docs/page-actions.variants.ts
3
+ var pageActionsVariants = tv({
4
+ slots: {
5
+ root: "flex flex-wrap items-center justify-end gap-2",
6
+ chevron: "text-muted transition-transform",
7
+ icon: "mt-0.5 shrink-0",
8
+ itemContent: "flex min-w-0 flex-1 flex-col",
9
+ description: "text-muted text-xs",
10
+ externalIcon: "text-muted",
11
+ error: "text-danger w-full text-sm"
12
+ },
13
+ variants: { open: { true: { chevron: "rotate-180" } } },
14
+ defaultVariants: { open: false }
15
+ });
16
+ //#endregion
17
+ export { pageActionsVariants };