@sky.ui.pro/react 0.0.1

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.
package/LICENSE.md ADDED
@@ -0,0 +1,212 @@
1
+ # Sky UI Pro Commercial License
2
+
3
+ Version 1.0
4
+ Effective Date: 2026-06-24
5
+
6
+ This Commercial License governs the use of the Pro version of Sky UI, including
7
+ the packages published as `@sky.ui.pro/core`, `@sky.ui.pro/react`,
8
+ `@sky.ui.pro/vue`, their source code, compiled code, documentation, examples,
9
+ and related materials.
10
+
11
+ By installing, copying, accessing, or using Sky UI Pro, you agree to this
12
+ Commercial License.
13
+
14
+ ## 1. Definitions
15
+
16
+ "Licensor" means Desai Software.
17
+
18
+ "Customer" means the person, company, or organization that has purchased or
19
+ received a valid license to use Sky UI Pro.
20
+
21
+ "Software" means the Sky UI Pro component library, including source code,
22
+ compiled code, package files, documentation, examples, and updates.
23
+
24
+ "Subscription" means an active paid plan purchased from Licensor through
25
+ Razorpay or another approved payment method.
26
+
27
+ "Authorized Users" means Customer's employees, contractors, or team members
28
+ who are allowed to access and use the Software on Customer's behalf.
29
+
30
+ "Project" means a website, application, SaaS product, internal tool, or other
31
+ software product built by Customer using the Software.
32
+
33
+ ## 2. License Grant
34
+
35
+ Subject to an active Subscription and compliance with this Commercial License,
36
+ Licensor grants Customer a limited, non-exclusive, non-transferable,
37
+ non-sublicensable license to:
38
+
39
+ 1. install and use the Software;
40
+ 2. import and use the Software in Customer's Projects;
41
+ 3. bundle compiled output of the Software as part of Customer's Projects;
42
+ 4. use the Software in development, testing, staging, production, and CI/CD
43
+ environments;
44
+ 5. allow Authorized Users to use the Software on Customer's behalf.
45
+
46
+ ## 3. Permitted Usage
47
+
48
+ Customer may use Sky UI Pro to build commercial and non-commercial Projects.
49
+
50
+ Customer may deploy Projects that include bundled output from Sky UI Pro to
51
+ end users, provided that end users cannot extract, install, or reuse Sky UI Pro
52
+ as a standalone component library.
53
+
54
+ Customer may use the Software for client work only if Customer's Subscription
55
+ allows agency, freelance, or client-project usage.
56
+
57
+ ## 4. Restrictions
58
+
59
+ Customer may not:
60
+
61
+ 1. sell, resell, rent, lease, sublicense, redistribute, publish, or publicly
62
+ share the Software as a standalone package;
63
+ 2. upload the Software to a public npm registry, public GitHub repository,
64
+ public CDN, file-sharing service, torrent, or any other public distribution
65
+ channel;
66
+ 3. share private registry tokens, GitHub access, license keys, or package
67
+ access with unauthorized users;
68
+ 4. remove or modify copyright notices, license notices, or proprietary notices;
69
+ 5. use the Software to create a directly competing component library,
70
+ template marketplace, UI kit, design system package, or component generator;
71
+ 6. reverse engineer, decompile, or disassemble the Software except where
72
+ applicable law expressly prohibits this restriction;
73
+ 7. bypass, disable, tamper with, or remove license validation, access control,
74
+ telemetry used for license enforcement, or subscription checks;
75
+ 8. use the Software after Subscription cancellation, expiration, chargeback,
76
+ refund, or failed payment, except as expressly allowed in writing by Licensor.
77
+
78
+ ## 5. Subscription and Payment
79
+
80
+ Access to Sky UI Pro requires an active paid Subscription unless Licensor has
81
+ granted written permission otherwise.
82
+
83
+ If payment fails, is refunded, disputed, charged back, cancelled, or expires,
84
+ Licensor may suspend or revoke access to the Software.
85
+
86
+ Customer is responsible for keeping billing information accurate and up to date.
87
+
88
+ ## 6. License Keys and Access Tokens
89
+
90
+ License keys, private registry tokens, GitHub tokens, activation codes, and
91
+ download credentials are confidential.
92
+
93
+ Customer must not expose these credentials in public repositories, frontend
94
+ bundles, public logs, support tickets, screenshots, or shared documents.
95
+
96
+ Customer is responsible for all activity performed using Customer's credentials.
97
+
98
+ If a credential is leaked, Customer must notify Licensor and rotate the
99
+ credential as soon as reasonably possible.
100
+
101
+ ## 7. Contractors and Team Members
102
+
103
+ Customer may allow contractors, freelancers, employees, and team members to
104
+ use the Software only for Customer's permitted Projects.
105
+
106
+ Customer is responsible for ensuring that all Authorized Users comply with
107
+ this Commercial License.
108
+
109
+ When an Authorized User no longer works on Customer's Projects, Customer must
110
+ remove that user's access.
111
+
112
+ ## 8. Updates
113
+
114
+ During an active Subscription, Customer may receive updates, bug fixes, and new
115
+ versions of the Software if Licensor makes them available.
116
+
117
+ Licensor may modify, improve, deprecate, or remove features in future versions.
118
+
119
+ This license does not guarantee any specific update schedule, roadmap, support
120
+ level, or feature availability unless separately agreed in writing.
121
+
122
+ ## 9. Other Sky UI Packages and Third-Party Dependencies
123
+
124
+ The Software may depend on free-tier Sky UI packages (`@sky.ui/core`,
125
+ `@sky.ui/react`, `@sky.ui/vue`, and related packages). Those packages are
126
+ proprietary and governed by the Sky UI Free EULA, not an open-source license.
127
+
128
+ The Software may also include or depend on third-party open-source packages.
129
+ Those third-party packages are licensed under their own license terms.
130
+
131
+ This Commercial License applies only to Licensor's proprietary Sky UI Pro
132
+ Software and does not change the license terms of other Sky UI packages or
133
+ third-party dependencies.
134
+
135
+ ## 10. Ownership
136
+
137
+ Licensor retains all rights, title, and interest in and to the Software,
138
+ including copyrights, trademarks, trade secrets, and other intellectual
139
+ property rights.
140
+
141
+ No ownership rights are transferred to Customer.
142
+
143
+ All rights not expressly granted in this Commercial License are reserved by
144
+ Licensor.
145
+
146
+ ## 11. Feedback
147
+
148
+ If Customer provides ideas, feedback, suggestions, bug reports, or feature
149
+ requests, Licensor may use them without restriction and without obligation to
150
+ pay Customer.
151
+
152
+ ## 12. Termination
153
+
154
+ This license terminates automatically if Customer violates this Commercial
155
+ License or no longer has an active Subscription.
156
+
157
+ Upon termination, Customer must stop installing, copying, updating, and using
158
+ the Software.
159
+
160
+ Customer may continue to operate already-deployed Projects only if:
161
+
162
+ 1. the Software is not exposed as a reusable standalone library;
163
+ 2. Customer does not continue development using the Software;
164
+ 3. Customer has not violated the redistribution, sublicensing, or bypass
165
+ restrictions in this license.
166
+
167
+ Licensor may require Customer to remove the Software from active Projects if
168
+ Customer materially breaches this license.
169
+
170
+ ## 13. No Warranty
171
+
172
+ THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTIES OF ANY
173
+ KIND, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE.
174
+
175
+ LICENSOR DISCLAIMS ALL WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A
176
+ PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT, SECURITY, RELIABILITY, AND
177
+ AVAILABILITY.
178
+
179
+ ## 14. Limitation of Liability
180
+
181
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, LICENSOR WILL NOT BE LIABLE FOR ANY
182
+ INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES,
183
+ INCLUDING LOSS OF PROFITS, REVENUE, DATA, GOODWILL, OR BUSINESS OPPORTUNITY.
184
+
185
+ LICENSOR'S TOTAL LIABILITY ARISING OUT OF OR RELATING TO THE SOFTWARE WILL NOT
186
+ EXCEED THE AMOUNT PAID BY CUSTOMER FOR THE SOFTWARE DURING THE THREE MONTHS
187
+ BEFORE THE CLAIM AROSE.
188
+
189
+ ## 15. Indemnity
190
+
191
+ Customer agrees to indemnify and hold Licensor harmless from claims, damages,
192
+ losses, liabilities, costs, and expenses arising from:
193
+
194
+ 1. Customer's breach of this Commercial License;
195
+ 2. Customer's unauthorized redistribution of the Software;
196
+ 3. Customer's Projects;
197
+ 4. Customer's misuse of license keys, tokens, or package access.
198
+
199
+ ## 16. Governing Law
200
+
201
+ This Commercial License is governed by the laws of India, without regard to
202
+ conflict-of-law rules.
203
+
204
+ Any disputes will be resolved in the courts located in Gujarat, India, unless
205
+ applicable law requires otherwise.
206
+
207
+ ## 17. Contact
208
+
209
+ For licensing questions, contact:
210
+
211
+ Desai Software
212
+ https://gitlab.com/sky_ui/sky-ui/-/issues
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @sky.ui.pro/react
2
+
3
+ Pro-tier React wrappers for Sky UI. Includes advanced components such as data tables, flow editors, and rich inputs.
4
+
5
+ Requires an active Sky UI Pro subscription.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npx sky.ui.pro login
11
+ npm install @sky.ui.pro/react @sky.ui.pro/core @sky.ui/core @sky.ui/react
12
+ ```
13
+
14
+ For CI/CD, set `SKY_UI_AUTH_TOKEN` before `npm ci`. See [`@sky.ui.pro/core`](https://www.npmjs.com/package/@sky.ui.pro/core) for token details.
15
+
16
+ ## Quick start
17
+
18
+ ```jsx
19
+ import { SkyTable } from '@sky.ui.pro/react';
20
+
21
+ export function App() {
22
+ return <SkyTable />;
23
+ }
24
+ ```
25
+
26
+ ## Auto-import
27
+
28
+ Use `@sky.ui.pro/react/auto-import` resolvers with `unplugin-react-components`, combined with your existing `@sky.ui/react` Vite or Webpack setup.
29
+
30
+ See the [`@sky.ui/react` README](https://www.npmjs.com/package/@sky.ui/react) for plugin configuration — import Pro components from `@sky.ui.pro/react` in manual imports or extend your resolver configuration for Pro tags.
31
+
32
+ ## Manual imports
33
+
34
+ ```jsx
35
+ import { SkyTable, SkyFlow } from '@sky.ui.pro/react';
36
+ ```
37
+
38
+ ## Related packages
39
+
40
+ | Package | Description |
41
+ |---------|-------------|
42
+ | [`@sky.ui.pro/core`](https://www.npmjs.com/package/@sky.ui.pro/core) | Pro Lit components (required) |
43
+ | [`@sky.ui/react`](https://www.npmjs.com/package/@sky.ui/react) | Free-tier React wrappers |
44
+
45
+ ## License
46
+
47
+ [Sky UI Pro Commercial License](./LICENSE.md) — requires an active Sky UI Pro subscription.
@@ -0,0 +1,2 @@
1
+ /** Placeholder until postinstall hydrates the full package from the private registry. */
2
+ export default {};
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@sky.ui.pro/react",
3
+ "version": "0.0.1",
4
+ "description": "Sky UI Pro React wrappers — installs full package via postinstall (online license).",
5
+ "type": "module",
6
+ "license": "SEE LICENSE IN LICENSE.md",
7
+ "main": "./dist/stub/index.js",
8
+ "exports": {
9
+ ".": "./dist/stub/index.js"
10
+ },
11
+ "files": [
12
+ "scripts/postinstall.mjs",
13
+ "dist/stub",
14
+ "README.md",
15
+ "LICENSE.md"
16
+ ],
17
+ "scripts": {
18
+ "postinstall": "node ./scripts/postinstall.mjs"
19
+ },
20
+ "dependencies": {
21
+ "tar": "^7.4.3"
22
+ },
23
+ "peerDependencies": {
24
+ "@sky.ui/core": "^0.0.1",
25
+ "@sky.ui/react": "^0.0.1",
26
+ "@sky.ui.pro/core": "^0.0.1"
27
+ },
28
+ "skyUiPro": {
29
+ "apiBase": "https://library.sky-ui.com",
30
+ "artifactRegistry": "gitlab"
31
+ },
32
+ "publishConfig": {
33
+ "access": "public",
34
+ "registry": "https://registry.npmjs.org/"
35
+ }
36
+ }
@@ -0,0 +1,190 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Downloads the full @sky.ui.pro/* artifact from the Sky UI npm proxy (GitLab upstream).
4
+ * Install flow matches HeroUI Pro: cache restore → else license-checked download; failed auth
5
+ * does not remove artifacts already on disk.
6
+ */
7
+ import { createWriteStream } from "node:fs";
8
+ import { access, cp, mkdir, mkdtemp, readdir, readFile, rm } from "node:fs/promises";
9
+ import { homedir, tmpdir } from "node:os";
10
+ import { dirname, join } from "node:path";
11
+ import { fileURLToPath } from "node:url";
12
+ import { pipeline } from "node:stream/promises";
13
+ import { extract } from "tar";
14
+
15
+ const scriptDir = dirname(fileURLToPath(import.meta.url));
16
+ const pkgRoot = join(scriptDir, "..");
17
+ const SKY_UI_HOME = join(homedir(), ".sky.ui");
18
+ const LEGACY_SKY_UI_HOME = join(homedir(), ".sky-ui");
19
+ const cacheRoot = join(SKY_UI_HOME, "cache");
20
+ const legacyCacheRoot = join(LEGACY_SKY_UI_HOME, "cache");
21
+
22
+ async function exists(p) {
23
+ try {
24
+ await access(p);
25
+ return true;
26
+ } catch {
27
+ return false;
28
+ }
29
+ }
30
+
31
+ async function readJson(p) {
32
+ return JSON.parse(await readFile(p, "utf8"));
33
+ }
34
+
35
+ function packageSlug(name) {
36
+ return name.replace(/^@/, "").replace("/", "-");
37
+ }
38
+
39
+ function cacheVersionDir(root, slug, version) {
40
+ return join(root, slug, version);
41
+ }
42
+
43
+ async function copyDirectoryContents(src, dest) {
44
+ await mkdir(dest, { recursive: true });
45
+ for (const entry of await readdir(src, { withFileTypes: true })) {
46
+ await cp(join(src, entry.name), join(dest, entry.name), { recursive: true, force: true });
47
+ }
48
+ }
49
+
50
+ /** Drop cached versions other than the one being installed (HeroUI cache policy). */
51
+ async function enforceCachePolicy(slug, version) {
52
+ const slugDir = join(cacheRoot, slug);
53
+ if (!(await exists(slugDir))) return;
54
+ for (const entry of await readdir(slugDir, { withFileTypes: true })) {
55
+ if (entry.name === version || entry.name === ".gitignore") continue;
56
+ await rm(join(slugDir, entry.name), { recursive: true, force: true });
57
+ }
58
+ }
59
+
60
+ async function restoreFromCache(slug, version, target) {
61
+ for (const root of [cacheRoot, legacyCacheRoot]) {
62
+ const src = cacheVersionDir(root, slug, version);
63
+ if (!(await exists(src))) continue;
64
+ const entries = await readdir(src);
65
+ if (entries.length === 0) continue;
66
+ await copyDirectoryContents(src, target);
67
+ return true;
68
+ }
69
+ return false;
70
+ }
71
+
72
+ async function saveToCache(slug, version, source) {
73
+ const dest = cacheVersionDir(cacheRoot, slug, version);
74
+ await rm(dest, { recursive: true, force: true });
75
+ await mkdir(dest, { recursive: true });
76
+ await copyDirectoryContents(source, dest);
77
+ }
78
+
79
+ async function resolveToken() {
80
+ const envCi = process.env.SKY_UI_AUTH_TOKEN?.trim();
81
+ if (envCi) return envCi;
82
+ const envPersonal = process.env.SKY_UI_PERSONAL_TOKEN?.trim();
83
+ if (envPersonal) return envPersonal;
84
+ for (const credPath of [
85
+ join(SKY_UI_HOME, "credentials.json"),
86
+ join(LEGACY_SKY_UI_HOME, "credentials.json"),
87
+ ]) {
88
+ if (!(await exists(credPath))) continue;
89
+ const creds = JSON.parse(await readFile(credPath, "utf8"));
90
+ if (typeof creds.personalToken === "string" && creds.personalToken.trim()) {
91
+ return creds.personalToken.trim();
92
+ }
93
+ if (typeof creds.authToken === "string" && creds.authToken.trim()) {
94
+ return creds.authToken.trim();
95
+ }
96
+ }
97
+ return null;
98
+ }
99
+
100
+ function resolveApiBase(pkg) {
101
+ const fromEnv = process.env.SKY_UI_API_URL?.trim();
102
+ if (fromEnv) return fromEnv.replace(/\/api\/?$/, "").replace(/\/$/, "");
103
+ const fromPkg = pkg?.skyUiPro?.apiBase?.trim();
104
+ if (fromPkg) return fromPkg.replace(/\/$/, "");
105
+ return "https://library.sky-ui.com";
106
+ }
107
+
108
+ function tarballUrl(apiBase, name, version) {
109
+ const base = apiBase.replace(/\/$/, "");
110
+ const scopePath = name.replace("/", "%2f");
111
+ return `${base}/npm/${scopePath}/-/${name}-${version}.tgz`;
112
+ }
113
+
114
+ function printMissingToken(name) {
115
+ console.warn(`
116
+ [@sky.ui.pro] Missing install token — ${name} was not downloaded.
117
+
118
+ Local dev:
119
+ npx sky.ui.pro login
120
+ or export SKY_UI_PERSONAL_TOKEN=sk_pt_…
121
+
122
+ CI / pipelines:
123
+ export SKY_UI_AUTH_TOKEN=sk_ci_…
124
+
125
+ Then re-run: npm install ${name}
126
+ Docs: https://library.sky-ui.com/docs/getting-started
127
+ `);
128
+ }
129
+
130
+ async function installFromTarball(tgzPath, slug, version) {
131
+ const stagingDir = await mkdtemp(join(tmpdir(), `sky.ui.pro-${slug}-${version}-`));
132
+ try {
133
+ await extract({ file: tgzPath, cwd: stagingDir, strip: 1 });
134
+ await copyDirectoryContents(stagingDir, pkgRoot);
135
+ await saveToCache(slug, version, stagingDir);
136
+ } finally {
137
+ await rm(stagingDir, { recursive: true, force: true });
138
+ }
139
+ }
140
+
141
+ async function main() {
142
+ if (process.env.SKY_UI_PRO_SKIP_POSTINSTALL === "1") return;
143
+
144
+ const pkg = await readJson(join(pkgRoot, "package.json"));
145
+ const { name, version } = pkg;
146
+ if (!name?.startsWith("@sky.ui.pro/") || !version) {
147
+ console.warn("[@sky.ui.pro] postinstall: invalid package.json name/version");
148
+ return;
149
+ }
150
+
151
+ const slug = packageSlug(name);
152
+ await enforceCachePolicy(slug, version);
153
+
154
+ if (await restoreFromCache(slug, version, pkgRoot)) {
155
+ console.log(`[@sky.ui.pro] Restored ${name}@${version} from cache.`);
156
+ return;
157
+ }
158
+
159
+ const token = await resolveToken();
160
+ if (!token) {
161
+ printMissingToken(name);
162
+ if (process.env.SKY_UI_PRO_STRICT === "1" || process.env.SKY_UI_AUTH_TOKEN) {
163
+ process.exit(1);
164
+ }
165
+ return;
166
+ }
167
+
168
+ const url = tarballUrl(resolveApiBase(pkg), name, version);
169
+ const res = await fetch(url, {
170
+ headers: { Authorization: `Bearer ${token}`, Accept: "application/octet-stream" },
171
+ });
172
+
173
+ if (!res.ok) {
174
+ const body = await res.text().catch(() => "");
175
+ console.error(`[@sky.ui.pro] Download failed (${res.status}) ${url}`);
176
+ if (body) console.error(body.slice(0, 500));
177
+ process.exit(1);
178
+ }
179
+
180
+ await mkdir(cacheRoot, { recursive: true });
181
+ const tgzPath = join(cacheRoot, `${slug}-${version}.tgz`);
182
+ await pipeline(res.body, createWriteStream(tgzPath));
183
+ await installFromTarball(tgzPath, slug, version);
184
+ console.log(`[@sky.ui.pro] Installed ${name}@${version}`);
185
+ }
186
+
187
+ main().catch((err) => {
188
+ console.error("[@sky.ui.pro] postinstall error:", err instanceof Error ? err.message : err);
189
+ process.exit(1);
190
+ });