@cyclone-ui/registry-api 0.0.0-stage → 0.3.33

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 (81) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/LICENSE +187 -0
  3. package/README.md +23 -2
  4. package/dist/client-B1f6qn7V.d.mts +30 -0
  5. package/dist/client-B1f6qn7V.d.mts.map +1 -0
  6. package/dist/client-CdEiR_5f.d.cts +30 -0
  7. package/dist/client-CdEiR_5f.d.cts.map +1 -0
  8. package/dist/client.cjs +1 -0
  9. package/dist/client.d.cts +2 -0
  10. package/dist/client.d.mts +2 -0
  11. package/dist/client.mjs +2 -0
  12. package/dist/client.mjs.map +1 -0
  13. package/dist/context-80NMoklc.d.cts +10 -0
  14. package/dist/context-80NMoklc.d.cts.map +1 -0
  15. package/dist/context-XjFUvK1j.d.mts +10 -0
  16. package/dist/context-XjFUvK1j.d.mts.map +1 -0
  17. package/dist/context.cjs +1 -0
  18. package/dist/context.d.cts +2 -0
  19. package/dist/context.d.mts +2 -0
  20. package/dist/context.mjs +2 -0
  21. package/dist/context.mjs.map +1 -0
  22. package/dist/errors-BntyHNM7.d.cts +7 -0
  23. package/dist/errors-BntyHNM7.d.cts.map +1 -0
  24. package/dist/errors-BntyHNM7.d.mts +7 -0
  25. package/dist/errors-BntyHNM7.d.mts.map +1 -0
  26. package/dist/errors.cjs +1 -0
  27. package/dist/errors.d.cts +2 -0
  28. package/dist/errors.d.mts +2 -0
  29. package/dist/errors.mjs +2 -0
  30. package/dist/errors.mjs.map +1 -0
  31. package/dist/index.cjs +1 -0
  32. package/dist/index.d.cts +6 -0
  33. package/dist/index.d.mts +6 -0
  34. package/dist/index.mjs +1 -0
  35. package/dist/router-B1KmNsNV.d.cts +29 -0
  36. package/dist/router-B1KmNsNV.d.cts.map +1 -0
  37. package/dist/router-CzaRhoPr.d.mts +29 -0
  38. package/dist/router-CzaRhoPr.d.mts.map +1 -0
  39. package/dist/router.cjs +1 -0
  40. package/dist/router.d.cts +2 -0
  41. package/dist/router.d.mts +2 -0
  42. package/dist/router.mjs +2 -0
  43. package/dist/router.mjs.map +1 -0
  44. package/dist/routes/components.cjs +1 -0
  45. package/dist/routes/components.d.cts +22 -0
  46. package/dist/routes/components.d.cts.map +1 -0
  47. package/dist/routes/components.d.mts +22 -0
  48. package/dist/routes/components.d.mts.map +1 -0
  49. package/dist/routes/components.mjs +2 -0
  50. package/dist/routes/components.mjs.map +1 -0
  51. package/dist/trpc.cjs +1 -0
  52. package/dist/trpc.d.cts +8 -0
  53. package/dist/trpc.d.cts.map +1 -0
  54. package/dist/trpc.d.mts +8 -0
  55. package/dist/trpc.d.mts.map +1 -0
  56. package/dist/trpc.mjs +2 -0
  57. package/dist/trpc.mjs.map +1 -0
  58. package/dist/types-Cn4R4SGM.d.cts +47 -0
  59. package/dist/types-Cn4R4SGM.d.cts.map +1 -0
  60. package/dist/types-Cn4R4SGM.d.mts +47 -0
  61. package/dist/types-Cn4R4SGM.d.mts.map +1 -0
  62. package/dist/types.cjs +1 -0
  63. package/dist/types.d.cts +2 -0
  64. package/dist/types.d.mts +2 -0
  65. package/dist/types.mjs +2 -0
  66. package/dist/types.mjs.map +1 -0
  67. package/package.json +147 -3
  68. package/powerlines.config.ts +28 -0
  69. package/project.json +8 -0
  70. package/src/client.ts +34 -0
  71. package/src/context.ts +41 -0
  72. package/src/errors.ts +25 -0
  73. package/src/index.ts +32 -0
  74. package/src/router.ts +27 -0
  75. package/src/routes/components.ts +175 -0
  76. package/src/trpc.ts +31 -0
  77. package/src/types.ts +70 -0
  78. package/test/routes/components.spec.ts +96 -0
  79. package/tsconfig.json +13 -0
  80. package/tsconfig.spec.json +16 -0
  81. package/vitest.config.mts +24 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,52 @@
1
+ ![Cyclone UI's logo banner](https://public.storm-cdn.com/cyclone-ui/media/banner-1280x320-dark.gif)
2
+
3
+ # Changelog for Cyclone UI - Registry API
4
+
5
+ ## [0.3.33](https://github.com/storm-software/cyclone-ui/releases/tag/registry-api%400.3.33) (10/29/2026)
6
+
7
+ ### Bug Fixes
8
+
9
+ - **monorepo:** Update workspace packages' dependencies and release `registry-api` package ([8b016c26b](https://github.com/storm-software/cyclone-ui/commit/8b016c26b))
10
+
11
+ ## [0.3.27](https://github.com/storm-software/cyclone-ui/releases/tag/registry-api%400.3.27) (10/23/2026)
12
+
13
+ ### Documentation
14
+
15
+ - **monorepo:** Added `sourcebook` skills and partially generated docs for design system ([0dbff145](https://github.com/storm-software/cyclone-ui/commit/0dbff145))
16
+
17
+ ## [0.3.12](https://github.com/storm-software/cyclone-ui/releases/tag/registry-api%400.3.12) (10/11/2026)
18
+
19
+ ### Bug Fixes
20
+
21
+ - **monorepo:** Update component descriptions and added design sync with Claude Design ([35ece709](https://github.com/storm-software/cyclone-ui/commit/35ece709))
22
+
23
+ ## [0.3.8](https://github.com/storm-software/cyclone-ui/releases/tag/registry-api%400.3.8) (10/05/2026)
24
+
25
+ ### Bug Fixes
26
+
27
+ - **monorepo:** Resolve release workflow warnings ([e0f2b332](https://github.com/storm-software/cyclone-ui/commit/e0f2b332))
28
+
29
+ ### Features
30
+
31
+ - **page:** Added Page component for base layout ([0bc9835e](https://github.com/storm-software/cyclone-ui/commit/0bc9835e))
32
+
33
+ ## [0.3.6](https://github.com/storm-software/cyclone-ui/releases/tag/registry-api%400.3.6) (10/03/2026)
34
+
35
+ ### Features
36
+
37
+ - **monorepo:** Update to Tamagui v3 and added Storm Sans font ([57dd719f](https://github.com/storm-software/cyclone-ui/commit/57dd719f))
38
+
39
+ ## 0.3.0 (2024-06-19)
40
+
41
+ ### 🚀 Features
42
+
43
+ - **form:** Added the `useForm` hook to generate an API object
44
+ ([a499b30](https://github.com/storm-software/cyclone-ui/commit/a499b30))
45
+
46
+ ## 0.2.0 (2024-06-15)
47
+
48
+ ### 🚀 Features
49
+
50
+ - **pagination:** Added the Pagination, NextButton, and PreviousButton
51
+ components
52
+ ([93085f4](https://github.com/storm-software/cyclone-ui/commit/93085f4))
package/LICENSE ADDED
@@ -0,0 +1,187 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the
13
+ copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other
16
+ entities that control, are controlled by, or are under common control with
17
+ that entity. For the purposes of this definition, "control" means (i) the
18
+ power, direct or indirect, to cause the direction or management of such
19
+ entity, whether by contract or otherwise, or (ii) ownership of fifty percent
20
+ (50%) or more of the outstanding shares, or (iii) beneficial ownership of
21
+ such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
24
+ permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation source, and
28
+ configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical transformation or
31
+ translation of a Source form, including but not limited to compiled object
32
+ code, generated documentation, and conversions to other media types.
33
+
34
+ "Work" shall mean the work of authorship, whether in Source or Object form,
35
+ made available under the License, as indicated by a copyright notice that is
36
+ included in or attached to the work (an example is provided in the Appendix
37
+ below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object form,
40
+ that is based on (or derived from) the Work and for which the editorial
41
+ revisions, annotations, elaborations, or other modifications represent, as a
42
+ whole, an original work of authorship. For the purposes of this License,
43
+ Derivative Works shall not include works that remain separable from, or
44
+ merely link (or bind by name) to the interfaces of, the Work and Derivative
45
+ Works thereof.
46
+
47
+ "Contribution" shall mean any work of authorship, including the original
48
+ version of the Work and any modifications or additions to that Work or
49
+ Derivative Works thereof, that is intentionally submitted to Licensor for
50
+ inclusion in the Work by the copyright owner or by an individual or Legal
51
+ Entity authorized to submit on behalf of the copyright owner. For the
52
+ purposes of this definition, "submitted" means any form of electronic,
53
+ verbal, or written communication sent to the Licensor or its representatives,
54
+ including but not limited to communication on electronic mailing lists,
55
+ source code control systems, and issue tracking systems that are managed by,
56
+ or on behalf of, the Licensor for the purpose of discussing and improving the
57
+ Work, but excluding communication that is conspicuously marked or otherwise
58
+ designated in writing by the copyright owner as "Not a Contribution."
59
+
60
+ "Contributor" shall mean Licensor and any individual or Legal Entity on
61
+ behalf of whom a Contribution has been received by Licensor and subsequently
62
+ incorporated within the Work.
63
+
64
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
65
+ License, each Contributor hereby grants to You a perpetual, worldwide,
66
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
67
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
68
+ sublicense, and distribute the Work and such Derivative Works in Source or
69
+ Object form.
70
+
71
+ 3. Grant of Patent License. Subject to the terms and conditions of this License,
72
+ each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
73
+ no-charge, royalty-free, irrevocable (except as stated in this section)
74
+ patent license to make, have made, use, offer to sell, sell, import, and
75
+ otherwise transfer the Work, where such license applies only to those patent
76
+ claims licensable by such Contributor that are necessarily infringed by their
77
+ Contribution(s) alone or by combination of their Contribution(s) with the
78
+ Work to which such Contribution(s) was submitted. If You institute patent
79
+ litigation against any entity (including a cross-claim or counterclaim in a
80
+ lawsuit) alleging that the Work or a Contribution incorporated within the
81
+ Work constitutes direct or contributory patent infringement, then any patent
82
+ licenses granted to You under this License for that Work shall terminate as
83
+ of the date such litigation is filed.
84
+
85
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
86
+ Derivative Works thereof in any medium, with or without modifications, and in
87
+ Source or Object form, provided that You meet the following conditions:
88
+
89
+ (a) You must give any other recipients of the Work or Derivative Works a copy
90
+ of this License; and
91
+
92
+ (b) You must cause any modified files to carry prominent notices stating that
93
+ You changed the files; and
94
+
95
+ (c) You must retain, in the Source form of any Derivative Works that You
96
+ distribute, all copyright, patent, trademark, and attribution notices from
97
+ the Source form of the Work, excluding those notices that do not pertain to
98
+ any part of the Derivative Works; and
99
+
100
+ (d) If the Work includes a "NOTICE" text file as part of its distribution,
101
+ then any Derivative Works that You distribute must include a readable copy of
102
+ the attribution notices contained within such NOTICE file, excluding those
103
+ notices that do not pertain to any part of the Derivative Works, in at least
104
+ one of the following places: within a NOTICE text file distributed as part of
105
+ the Derivative Works; within the Source form or documentation, if provided
106
+ along with the Derivative Works; or, within a display generated by the
107
+ Derivative Works, if and wherever such third-party notices normally appear.
108
+ The contents of the NOTICE file are for informational purposes only and do
109
+ not modify the License. You may add Your own attribution notices within
110
+ Derivative Works that You distribute, alongside or as an addendum to the
111
+ NOTICE text from the Work, provided that such additional attribution notices
112
+ cannot be construed as modifying the License.
113
+
114
+ You may add Your own copyright statement to Your modifications and may
115
+ provide additional or different license terms and conditions for use,
116
+ reproduction, or distribution of Your modifications, or for any such
117
+ Derivative Works as a whole, provided Your use, reproduction, and
118
+ distribution of the Work otherwise complies with the conditions stated in
119
+ this License.
120
+
121
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
122
+ Contribution intentionally submitted for inclusion in the Work by You to the
123
+ Licensor shall be under the terms and conditions of this License, without any
124
+ additional terms or conditions. Notwithstanding the above, nothing herein
125
+ shall supersede or modify the terms of any separate license agreement you may
126
+ have executed with Licensor regarding such Contributions.
127
+
128
+ 6. Trademarks. This License does not grant permission to use the trade names,
129
+ trademarks, service marks, or product names of the Licensor, except as
130
+ required for reasonable and customary use in describing the origin of the
131
+ Work and reproducing the content of the NOTICE file.
132
+
133
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
134
+ writing, Licensor provides the Work (and each Contributor provides its
135
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
136
+ KIND, either express or implied, including, without limitation, any
137
+ warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or
138
+ FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining
139
+ the appropriateness of using or redistributing the Work and assume any risks
140
+ associated with Your exercise of permissions under this License.
141
+
142
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
143
+ tort (including negligence), contract, or otherwise, unless required by
144
+ applicable law (such as deliberate and grossly negligent acts) or agreed to
145
+ in writing, shall any Contributor be liable to You for damages, including any
146
+ direct, indirect, special, incidental, or consequential damages of any
147
+ character arising as a result of this License or out of the use or inability
148
+ to use the Work (including but not limited to damages for loss of goodwill,
149
+ work stoppage, computer failure or malfunction, or any and all other
150
+ commercial damages or losses), even if such Contributor has been advised of
151
+ the possibility of such damages.
152
+
153
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
154
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
155
+ acceptance of support, warranty, indemnity, or other liability obligations
156
+ and/or rights consistent with this License. However, in accepting such
157
+ obligations, You may act only on Your own behalf and on Your sole
158
+ responsibility, not on behalf of any other Contributor, and only if You agree
159
+ to indemnify, defend, and hold each Contributor harmless for any liability
160
+ incurred by, or claims asserted against, such Contributor by reason of your
161
+ accepting any such warranty or additional liability.
162
+
163
+ END OF TERMS AND CONDITIONS
164
+
165
+ APPENDIX: How to apply the Apache License to your work.
166
+
167
+ To apply the Apache License to your work, attach the following
168
+ boilerplate notice, with the fields enclosed by brackets "[]"
169
+ replaced with your own identifying information. (Don't include
170
+ the brackets!) The text should be enclosed in the appropriate
171
+ comment syntax for the file format. We also recommend that a
172
+ file or class name and description of purpose be included on the
173
+ same "printed page" as the copyright notice for easier
174
+ identification within third-party archives.
175
+
176
+ Copyright [yyyy] [name of copyright owner]
177
+
178
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
179
+ this file except in compliance with the License. You may obtain a copy of the
180
+ License at
181
+
182
+ http://www.apache.org/licenses/LICENSE-2.0
183
+
184
+ Unless required by applicable law or agreed to in writing, software distributed
185
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
186
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
187
+ specific language governing permissions and limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,24 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/cyclone-ui/media/banner-1280x427-dark.gif">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/cyclone-ui/media/banner-1280x427-light.gif">
5
+ <img src="https://public.storm-cdn.com/cyclone-ui/media/banner-1280x427-dark.gif" width="100%" alt="Powerlines" />
6
+ </picture>
7
+ </div>
8
+ <br />
2
9
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
10
+ <div align="center">
11
+ <b>
12
+ <a href="https://stormsoftware.com" target="_blank">Website</a> •
13
+ <a href="https://github.com/storm-software/cyclone-ui" target="_blank">GitHub</a> •
14
+ <a href="https://discord.gg/MQ6YVzakM5">Discord</a> • <a href="https://stormstack.github.io/stormstack/" target="_blank">Docs</a> • <a href="https://stormsoftware.com/contact" target="_blank">Contact</a> •
15
+ <a href="https://github.com/storm-software/cyclone-ui/issues/new?assignees=&labels=bug&template=bug-report.yml&title=Bug Report%3A+">Report a Bug</a>
16
+ </b>
17
+ </div>
18
+
19
+ <br />
20
+ <br />
21
+
22
+ # Cyclone UI - Registry API (Internal)
23
+
24
+ A package containing the shared TRPC router code used by the Cyclone Registry. **This is an internal package used to connect to the Cyclone UI registry API. Please avoid using it directly - it will be updated with breaking changes without warning.**
@@ -0,0 +1,30 @@
1
+ import { a as ComponentSummary, t as ComponentDetails } from "./types-Cn4R4SGM.mjs";
2
+ import { t as Context } from "./context-XjFUvK1j.mjs";
3
+ declare const DEFAULT_REGISTRY_URL = "https://registry.cyclone-ui.com/api";
4
+ type RegistryClient = ReturnType<typeof createRegistryClient>;
5
+ declare function createRegistryClient(url?: string): import("@trpc/client").TRPCClient<import("@trpc/server").TRPCBuiltRouter<{
6
+ ctx: Context;
7
+ meta: object;
8
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
9
+ transformer: false;
10
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
11
+ components: import("@trpc/server").TRPCBuiltRouter<{
12
+ ctx: Context;
13
+ meta: object;
14
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
15
+ transformer: false;
16
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
17
+ list: import("@trpc/server").TRPCQueryProcedure<{
18
+ input: void;
19
+ output: ComponentSummary[];
20
+ meta: object;
21
+ }>;
22
+ get: import("@trpc/server").TRPCQueryProcedure<{
23
+ input: string;
24
+ output: ComponentDetails;
25
+ meta: object;
26
+ }>;
27
+ }>>;
28
+ }>>>;
29
+ export { RegistryClient as n, createRegistryClient as r, DEFAULT_REGISTRY_URL as t };
30
+ //# sourceMappingURL=client-B1f6qn7V.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-B1f6qn7V.d.mts","names":["_$__context0.Context","_$__types0.ComponentSummary","_$__types0.ComponentDetails"],"sources":["../src/client.ts"],"mappings":""}
@@ -0,0 +1,30 @@
1
+ import { a as ComponentSummary, t as ComponentDetails } from "./types-Cn4R4SGM.cjs";
2
+ import { t as Context } from "./context-80NMoklc.cjs";
3
+ declare const DEFAULT_REGISTRY_URL = "https://registry.cyclone-ui.com/api";
4
+ type RegistryClient = ReturnType<typeof createRegistryClient>;
5
+ declare function createRegistryClient(url?: string): import("@trpc/client").TRPCClient<import("@trpc/server").TRPCBuiltRouter<{
6
+ ctx: Context;
7
+ meta: object;
8
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
9
+ transformer: false;
10
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
11
+ components: import("@trpc/server").TRPCBuiltRouter<{
12
+ ctx: Context;
13
+ meta: object;
14
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
15
+ transformer: false;
16
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
17
+ list: import("@trpc/server").TRPCQueryProcedure<{
18
+ input: void;
19
+ output: ComponentSummary[];
20
+ meta: object;
21
+ }>;
22
+ get: import("@trpc/server").TRPCQueryProcedure<{
23
+ input: string;
24
+ output: ComponentDetails;
25
+ meta: object;
26
+ }>;
27
+ }>>;
28
+ }>>>;
29
+ export { RegistryClient as n, createRegistryClient as r, DEFAULT_REGISTRY_URL as t };
30
+ //# sourceMappingURL=client-CdEiR_5f.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-CdEiR_5f.d.cts","names":["_$__context0.Context","_$__types0.ComponentSummary","_$__types0.ComponentDetails"],"sources":["../src/client.ts"],"mappings":";;cAqBa;KAED,iBAAiB,kBAAkB;iBAE/B,qBAAqB,sCAA0B,kCAAA;E,KAA/CA"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@trpc/client");const t=`https://registry.cyclone-ui.com/api`;function n(n=t){return(0,e.createTRPCClient)({links:[(0,e.httpBatchLink)({url:n})]})}exports.DEFAULT_REGISTRY_URL=t,exports.createRegistryClient=n;
@@ -0,0 +1,2 @@
1
+ import { n as RegistryClient, r as createRegistryClient, t as DEFAULT_REGISTRY_URL } from "./client-CdEiR_5f.cjs";
2
+ export { DEFAULT_REGISTRY_URL, RegistryClient, createRegistryClient };
@@ -0,0 +1,2 @@
1
+ import { n as RegistryClient, r as createRegistryClient, t as DEFAULT_REGISTRY_URL } from "./client-B1f6qn7V.mjs";
2
+ export { DEFAULT_REGISTRY_URL, RegistryClient, createRegistryClient };
@@ -0,0 +1,2 @@
1
+ import{createTRPCClient as e,httpBatchLink as t}from"@trpc/client";const n=`https://registry.cyclone-ui.com/api`;function r(r=n){return e({links:[t({url:r})]})}export{n as DEFAULT_REGISTRY_URL,r as createRegistryClient};
2
+ //# sourceMappingURL=client.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.mjs","names":["DEFAULT_REGISTRY_URL","createRegistryClient","createTRPCClient","httpBatchLink"],"sources":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { o as Env } from "./types-Cn4R4SGM.cjs";
2
+ import { FetchCreateContextFnOptions } from "@trpc/server/adapters/fetch";
3
+ type Context = FetchCreateContextFnOptions & {
4
+ version: string | undefined;
5
+ storage: Env["STORAGE_BUCKET"];
6
+ };
7
+ type CreateContext = (env: Env) => (options: FetchCreateContextFnOptions) => Context;
8
+ declare const createContext: CreateContext;
9
+ export { CreateContext as n, createContext as r, Context as t };
10
+ //# sourceMappingURL=context-80NMoklc.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-80NMoklc.d.cts","names":[],"sources":["../src/context.ts"],"mappings":";;KAsBY,UAAU;EACpB;EACA,SAAS;;KAGC,iBACV,KAAK,SACD,SAAS,gCAAgC;cAElC,eAAe"}
@@ -0,0 +1,10 @@
1
+ import { o as Env } from "./types-Cn4R4SGM.mjs";
2
+ import { FetchCreateContextFnOptions } from "@trpc/server/adapters/fetch";
3
+ type Context = FetchCreateContextFnOptions & {
4
+ version: string | undefined;
5
+ storage: Env["STORAGE_BUCKET"];
6
+ };
7
+ type CreateContext = (env: Env) => (options: FetchCreateContextFnOptions) => Context;
8
+ declare const createContext: CreateContext;
9
+ export { CreateContext as n, createContext as r, Context as t };
10
+ //# sourceMappingURL=context-XjFUvK1j.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-XjFUvK1j.d.mts","names":[],"sources":["../src/context.ts"],"mappings":""}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./types.cjs"),t=t=>n=>{let r=n.req.headers.get(e.HttpHeaders.Version);return{...n,version:r?String(r):void 0,storage:t.STORAGE_BUCKET}};exports.createContext=t;
@@ -0,0 +1,2 @@
1
+ import { n as CreateContext, r as createContext, t as Context } from "./context-80NMoklc.cjs";
2
+ export { Context, CreateContext, createContext };
@@ -0,0 +1,2 @@
1
+ import { n as CreateContext, r as createContext, t as Context } from "./context-XjFUvK1j.mjs";
2
+ export { Context, CreateContext, createContext };
@@ -0,0 +1,2 @@
1
+ import{HttpHeaders as e}from"./types.mjs";const t=t=>n=>{let r=n.req.headers.get(e.Version);return{...n,version:r?String(r):void 0,storage:t.STORAGE_BUCKET}};export{t as createContext};
2
+ //# sourceMappingURL=context.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.mjs","names":["createContext","version","options","HttpHeaders","env"],"sources":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ declare const CycloneRegistryErrorCode: {
2
+ readonly not_found: "not_found";
3
+ readonly metadata_not_found: "metadata_not_found";
4
+ };
5
+ type CycloneRegistryErrorCode = (typeof CycloneRegistryErrorCode)[keyof typeof CycloneRegistryErrorCode];
6
+ export { CycloneRegistryErrorCode as t };
7
+ //# sourceMappingURL=errors-BntyHNM7.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors-BntyHNM7.d.cts","names":[],"sources":["../src/errors.ts"],"mappings":"A,cAkBa;;;;KAKD,mCACF,uCAAuC"}
@@ -0,0 +1,7 @@
1
+ declare const CycloneRegistryErrorCode: {
2
+ readonly not_found: "not_found";
3
+ readonly metadata_not_found: "metadata_not_found";
4
+ };
5
+ type CycloneRegistryErrorCode = (typeof CycloneRegistryErrorCode)[keyof typeof CycloneRegistryErrorCode];
6
+ export { CycloneRegistryErrorCode as t };
7
+ //# sourceMappingURL=errors-BntyHNM7.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors-BntyHNM7.d.mts","names":[],"sources":["../src/errors.ts"],"mappings":""}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e={not_found:`not_found`,metadata_not_found:`metadata_not_found`};exports.CycloneRegistryErrorCode=e;
@@ -0,0 +1,2 @@
1
+ import { t as CycloneRegistryErrorCode } from "./errors-BntyHNM7.cjs";
2
+ export { CycloneRegistryErrorCode };
@@ -0,0 +1,2 @@
1
+ import { t as CycloneRegistryErrorCode } from "./errors-BntyHNM7.mjs";
2
+ export { CycloneRegistryErrorCode };
@@ -0,0 +1,2 @@
1
+ const e={not_found:`not_found`,metadata_not_found:`metadata_not_found`};export{e as CycloneRegistryErrorCode};
2
+ //# sourceMappingURL=errors.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.mjs","names":["CycloneRegistryErrorCode"],"sources":[],"mappings":""}
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./types.cjs"),t=require("./router.cjs"),n=require("./client.cjs"),r=require("./context.cjs"),i=require("./errors.cjs");exports.ComponentPlatform=e.ComponentPlatform,exports.CycloneRegistryErrorCode=i.CycloneRegistryErrorCode,exports.DEFAULT_REGISTRY_URL=n.DEFAULT_REGISTRY_URL,exports.HttpHeaders=e.HttpHeaders,exports.createContext=r.createContext,exports.createRegistryClient=n.createRegistryClient,exports.router=t.router;
@@ -0,0 +1,6 @@
1
+ import { a as ComponentSummary, c as RegistryStorage, i as ComponentPlatform, n as ComponentFile, o as Env, r as ComponentMeta, s as HttpHeaders, t as ComponentDetails } from "./types-Cn4R4SGM.cjs";
2
+ import { n as CreateContext, r as createContext, t as Context } from "./context-80NMoklc.cjs";
3
+ import { n as RegistryClient, r as createRegistryClient, t as DEFAULT_REGISTRY_URL } from "./client-CdEiR_5f.cjs";
4
+ import { t as CycloneRegistryErrorCode } from "./errors-BntyHNM7.cjs";
5
+ import { n as router, t as Router } from "./router-B1KmNsNV.cjs";
6
+ export { ComponentDetails, ComponentFile, ComponentMeta, ComponentPlatform, ComponentSummary, Context, CreateContext, CycloneRegistryErrorCode, DEFAULT_REGISTRY_URL, Env, HttpHeaders, RegistryClient, RegistryStorage, Router, createContext, createRegistryClient, router };
@@ -0,0 +1,6 @@
1
+ import { a as ComponentSummary, c as RegistryStorage, i as ComponentPlatform, n as ComponentFile, o as Env, r as ComponentMeta, s as HttpHeaders, t as ComponentDetails } from "./types-Cn4R4SGM.mjs";
2
+ import { n as CreateContext, r as createContext, t as Context } from "./context-XjFUvK1j.mjs";
3
+ import { n as RegistryClient, r as createRegistryClient, t as DEFAULT_REGISTRY_URL } from "./client-B1f6qn7V.mjs";
4
+ import { t as CycloneRegistryErrorCode } from "./errors-BntyHNM7.mjs";
5
+ import { n as router, t as Router } from "./router-CzaRhoPr.mjs";
6
+ export { ComponentDetails, ComponentFile, ComponentMeta, ComponentPlatform, ComponentSummary, Context, CreateContext, CycloneRegistryErrorCode, DEFAULT_REGISTRY_URL, Env, HttpHeaders, RegistryClient, RegistryStorage, Router, createContext, createRegistryClient, router };
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ import{ComponentPlatform as e,HttpHeaders as t}from"./types.mjs";import{router as n}from"./router.mjs";import{DEFAULT_REGISTRY_URL as r,createRegistryClient as i}from"./client.mjs";import{createContext as a}from"./context.mjs";import{CycloneRegistryErrorCode as o}from"./errors.mjs";export{e as ComponentPlatform,o as CycloneRegistryErrorCode,r as DEFAULT_REGISTRY_URL,t as HttpHeaders,a as createContext,i as createRegistryClient,n as router};
@@ -0,0 +1,29 @@
1
+ import { a as ComponentSummary, t as ComponentDetails } from "./types-Cn4R4SGM.cjs";
2
+ import { t as Context } from "./context-80NMoklc.cjs";
3
+ declare const router: import("@trpc/server").TRPCBuiltRouter<{
4
+ ctx: Context;
5
+ meta: object;
6
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
7
+ transformer: false;
8
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
9
+ components: import("@trpc/server").TRPCBuiltRouter<{
10
+ ctx: Context;
11
+ meta: object;
12
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
13
+ transformer: false;
14
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
15
+ list: import("@trpc/server").TRPCQueryProcedure<{
16
+ input: void;
17
+ output: ComponentSummary[];
18
+ meta: object;
19
+ }>;
20
+ get: import("@trpc/server").TRPCQueryProcedure<{
21
+ input: string;
22
+ output: ComponentDetails;
23
+ meta: object;
24
+ }>;
25
+ }>>;
26
+ }>>;
27
+ type Router = typeof router;
28
+ export { router as n, Router as t };
29
+ //# sourceMappingURL=router-B1KmNsNV.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router-B1KmNsNV.d.cts","names":["_$__context0.Context","_$__types0.ComponentSummary","_$__types0.ComponentDetails"],"sources":["../src/router.ts"],"mappings":";;cAqBa,+BAAM;E,KAANA;;;;;;;;;;;;;;;;;;;;;;;KAKD,gBAAgB"}
@@ -0,0 +1,29 @@
1
+ import { a as ComponentSummary, t as ComponentDetails } from "./types-Cn4R4SGM.mjs";
2
+ import { t as Context } from "./context-XjFUvK1j.mjs";
3
+ declare const router: import("@trpc/server").TRPCBuiltRouter<{
4
+ ctx: Context;
5
+ meta: object;
6
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
7
+ transformer: false;
8
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
9
+ components: import("@trpc/server").TRPCBuiltRouter<{
10
+ ctx: Context;
11
+ meta: object;
12
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
13
+ transformer: false;
14
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
15
+ list: import("@trpc/server").TRPCQueryProcedure<{
16
+ input: void;
17
+ output: ComponentSummary[];
18
+ meta: object;
19
+ }>;
20
+ get: import("@trpc/server").TRPCQueryProcedure<{
21
+ input: string;
22
+ output: ComponentDetails;
23
+ meta: object;
24
+ }>;
25
+ }>>;
26
+ }>>;
27
+ type Router = typeof router;
28
+ export { router as n, Router as t };
29
+ //# sourceMappingURL=router-CzaRhoPr.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router-CzaRhoPr.d.mts","names":["_$__context0.Context","_$__types0.ComponentSummary","_$__types0.ComponentDetails"],"sources":["../src/router.ts"],"mappings":""}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./trpc.cjs"),t=require("./routes/components.cjs"),n=e.createRouter({components:t.componentsRouter});exports.router=n;
@@ -0,0 +1,2 @@
1
+ import { n as router, t as Router } from "./router-B1KmNsNV.cjs";
2
+ export { Router, router };
@@ -0,0 +1,2 @@
1
+ import { n as router, t as Router } from "./router-CzaRhoPr.mjs";
2
+ export { Router, router };
@@ -0,0 +1,2 @@
1
+ import{createRouter as e}from"./trpc.mjs";import{componentsRouter as t}from"./routes/components.mjs";const n=e({components:t});export{n as router};
2
+ //# sourceMappingURL=router.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.mjs","names":["router","createRouter","componentsRouter"],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../trpc.cjs");let t=require("zod");const n=`registry/components/`;async function r(e,t){let n=[],r;do{let i=await e.list({prefix:t,cursor:r});n.push(...i.objects),r=i.truncated?i.cursor:void 0}while(r);return n}function i(e){let t=e.key.slice(20).split(`/`).filter(Boolean);if(t.length<2||t.at(-1)!==`meta.json`)return null;let r=t[0],i=t.slice(1,-1).join(`/`);return{componentName:r,prefix:`${n}${r}/${i?`${i}/`:``}`,metaObject:e}}function a(e){return[...e.map(i).filter(e=>!!e)].sort((e,t)=>t.metaObject.uploaded.getTime()-e.metaObject.uploaded.getTime()).filter((e,t,n)=>n.findIndex(t=>t.componentName===e.componentName)===t)}const o=e.createRouter({list:e.publicProcedure.query(async({ctx:e})=>{let t=a(await r(e.storage,n));return(await Promise.all(t.map(async t=>{let n=await e.storage.get(t.metaObject.key);if(!n)return null;let r=await n.json();return{name:r.name||t.componentName,version:r.version,release:r.release,description:r.description,tags:r.tags,updatedOn:t.metaObject.uploaded}}))).filter(Boolean)}),get:e.publicProcedure.input(t.z.string()).query(async({input:e,ctx:t})=>{let i=e.replace(/^@cyclone-ui\//,``),o=`${n}${i}/`,s=await r(t.storage,o),c=a(s)[0];if(!c)throw Error(`Component \"${e}\" was not found`);let l=(await Promise.all(s.filter(e=>e.key.startsWith(c.prefix)).map(async e=>t.storage.get(e.key).then(t=>({name:e.key.slice(c.prefix.length),content:t,updatedOn:e.uploaded}))))).filter(Boolean),u=l.find(e=>e.name===`meta.json`);if(!u||!u.content)throw Error(`Metadata file not found`);let d=await u.content.json(),f=l.filter(e=>e.name!==`meta.json`&&e.content),p=await Promise.all(f.filter(e=>e.name!==`meta.json`&&e.content).map(async e=>Promise.resolve(e.content.text())));return{...d,files:f.map((e,t)=>({...e,content:p[t]}))}})});exports.componentsRouter=o;
@@ -0,0 +1,22 @@
1
+ import { a as ComponentSummary, t as ComponentDetails } from "../types-Cn4R4SGM.cjs";
2
+ import { t as Context } from "../context-80NMoklc.cjs";
3
+ import "../index.cjs";
4
+ declare const componentsRouter: import("@trpc/server").TRPCBuiltRouter<{
5
+ ctx: Context;
6
+ meta: object;
7
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
8
+ transformer: false;
9
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
10
+ list: import("@trpc/server").TRPCQueryProcedure<{
11
+ input: void;
12
+ output: ComponentSummary[];
13
+ meta: object;
14
+ }>;
15
+ get: import("@trpc/server").TRPCQueryProcedure<{
16
+ input: string;
17
+ output: ComponentDetails;
18
+ meta: object;
19
+ }>;
20
+ }>>;
21
+ export { componentsRouter };
22
+ //# sourceMappingURL=components.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.d.cts","names":["_$__0.Context"],"sources":["../../src/routes/components.ts"],"mappings":";;;cA6Fa,yCAAgB;E,KAAhBA"}
@@ -0,0 +1,22 @@
1
+ import { a as ComponentSummary, t as ComponentDetails } from "../types-Cn4R4SGM.mjs";
2
+ import { t as Context } from "../context-XjFUvK1j.mjs";
3
+ import "../index.mjs";
4
+ declare const componentsRouter: import("@trpc/server").TRPCBuiltRouter<{
5
+ ctx: Context;
6
+ meta: object;
7
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
8
+ transformer: false;
9
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
10
+ list: import("@trpc/server").TRPCQueryProcedure<{
11
+ input: void;
12
+ output: ComponentSummary[];
13
+ meta: object;
14
+ }>;
15
+ get: import("@trpc/server").TRPCQueryProcedure<{
16
+ input: string;
17
+ output: ComponentDetails;
18
+ meta: object;
19
+ }>;
20
+ }>>;
21
+ export { componentsRouter };
22
+ //# sourceMappingURL=components.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.d.mts","names":["_$__0.Context"],"sources":["../../src/routes/components.ts"],"mappings":""}