@primeui/license-manager 1.0.0-beta.1 → 1.0.0-rc.2

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 (3) hide show
  1. package/LICENSE.md +38 -55
  2. package/README.md +0 -166
  3. package/package.json +3 -8
package/LICENSE.md CHANGED
@@ -1,62 +1,45 @@
1
- # PrimeUI License Manager — License
1
+ # PrimeUI License
2
2
 
3
- Copyright © 2026 PrimeTek Informatics. All rights reserved.
3
+ This package is part of **PrimeUI**, a family of commercial UI libraries by PrimeTek Informatics.
4
4
 
5
- This package (`@primeui/license-manager`) is proprietary software owned by
6
- PrimeTek Informatics ("PrimeTek"). It is distributed in compiled form via the
7
- public npm registry solely to enable license verification for PrimeUI and
8
- PrimeUI PRO products.
5
+ ## How PrimeUI May Be Used
9
6
 
10
- ## Grant
7
+ PrimeUI may be used under one of two licenses. You choose the one that applies to you based on eligibility.
11
8
 
12
- PrimeTek grants you a non-exclusive, non-transferable, revocable license to
13
- install and use this package as a runtime dependency of your application, for
14
- the sole purpose of verifying license tokens issued by PrimeTek for PrimeUI and
15
- PrimeUI PRO products.
9
+ ### Community License (Free)
10
+
11
+ Free for organizations that meet all of the following criteria:
12
+
13
+ - Less than $1,000,000 USD in annual gross revenue
14
+ - Fewer than 5 developers
15
+ - Fewer than 10 employees
16
+ - Less than $3,000,000 USD in venture capital or outside funding
17
+
18
+ Individuals, students, non-profits, and non-commercial open source projects also qualify.
19
+
20
+ The Community License provides full access to the core libraries and supports up to 4 developers. It requires annual renewal by confirming continued eligibility.
21
+
22
+ ### Commercial License (Paid)
23
+
24
+ For organizations that do not qualify for the Community License.
25
+
26
+ Licensed per developer, perpetual, with one year of updates included. Renewal is optional and extends access to new versions. The Commercial Suite also includes PrimeBlocks, Theme Designer, all PrimeUI Pro components, and Premium Support.
27
+
28
+ ## License Key
29
+
30
+ A valid license key is required to use this software. License verification is performed offline, with no telemetry and no remote connection. A missing, invalid, or expired key may cause the software to display a license notice.
31
+
32
+ ## Full Terms
33
+
34
+ The complete license terms, eligibility details, and renewal information are available at:
35
+
36
+ - Community License: <https://primeui.dev/licenses/community>
37
+ - Commercial License: <https://primeui.dev/licenses/commercial>
16
38
 
17
39
  ## Restrictions
18
40
 
19
- You may not:
20
-
21
- 1. Modify, adapt, translate, or create derivative works of this package, in
22
- source or compiled form, including bundled copies in your own published
23
- packages.
24
- 2. Reverse engineer, decompile, disassemble, or otherwise attempt to derive the
25
- source code of, or to circumvent, the license verification mechanism — except
26
- to the limited extent applicable law expressly permits despite this
27
- restriction.
28
- 3. Forge, tamper with, replay across customers, or otherwise misuse license
29
- tokens or signing keys.
30
- 4. Sublicense, sell, rent, lease, lend, or otherwise redistribute this package
31
- as a standalone product or as part of a competing license-management
32
- offering.
33
- 5. Remove or alter any copyright, trademark, or proprietary notices contained
34
- in the package or its accompanying files.
35
-
36
- ## Ownership
37
-
38
- This package, including all intellectual property rights in it, remains the
39
- exclusive property of PrimeTek. No rights are granted to you by implication,
40
- estoppel, or otherwise except as expressly set out in this license.
41
-
42
- ## Open Source Components
43
-
44
- This package depends on third-party open source software, including
45
- [`@noble/ed25519`](https://github.com/paulmillr/noble-ed25519) (MIT). Those
46
- dependencies are governed by their own license terms, which are unaffected by
47
- this license.
48
-
49
- ## No Warranty
50
-
51
- THIS PACKAGE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
52
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
53
- FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL
54
- PRIMETEK BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN
55
- ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
56
- WITH THIS PACKAGE OR THE USE OR OTHER DEALINGS IN IT.
57
-
58
- ## Termination
59
-
60
- This license terminates automatically if you breach any of its terms. On
61
- termination you must cease all use of the package and remove it from your
62
- systems and distributions.
41
+ This software is distributed as a compiled package. You may not reverse-engineer, decompile, or extract its source code, redistribute it as a component library or development tool, or remove its license mechanisms. Redistributing the software so that third parties can develop with it requires a separate OEM License. See the full terms for details.
42
+
43
+ ---
44
+
45
+ © 2026 PrimeTek Informatics. All rights reserved.
package/README.md CHANGED
@@ -1,167 +1 @@
1
1
  # @primeui/license-manager
2
-
3
- Offline license verifier for PrimeUI and PrimeUI PRO. Framework-agnostic — no Vue / React / Angular / Lit peer dependencies.
4
-
5
- License keys are configured **once** at app bootstrap into a process-global registry. Every PrimeUI library and PrimeUI PRO component then reads from the same registry — no `licenseKey` prop on individual components, no second installer to wrap.
6
-
7
- ## App authors
8
-
9
- If you use a Prime UI library (PrimeVue, PrimeReact, PrimeNG, PrimeFaces), pass your PrimeUI license token through that library's existing installer as a single string — it forwards it into this registry for you. You don't import this package directly in that case.
10
-
11
- ```ts
12
- // PrimeVue
13
- app.use(PrimeVue, { theme: { ... }, license: 'PrimeUI-Commercial-key...' });
14
-
15
- // PrimeReact
16
- <PrimeReactProvider value={{ theme: { ... }, license: 'PrimeUI-Commercial-key...' }}>
17
-
18
- // PrimeNG
19
- providePrimeNG({ theme: { ... }, license: 'PrimeUI-Commercial-key...' });
20
- ```
21
-
22
- A Commercial or OEM PrimeUI license covers every PRO component via the bundle rule, so this single string is enough for most apps.
23
-
24
- If you're mixing standalone PRO buys, or using PRO components without a host Prime library, register the keys yourself before any licensed component mounts:
25
-
26
- ```ts
27
- import { registerLicense } from '@primeui/license-manager';
28
-
29
- registerLicense({
30
- primeui: 'PrimeUI-Commercial-key...',
31
- texteditor: 'PrimeUI-PRO-TextEditor-key...',
32
- scheduler: 'PrimeUI-PRO-Scheduler-key...'
33
- });
34
- ```
35
-
36
- Standalone PRO buyers configure the specific PRO key without a `primeui` key:
37
-
38
- ```ts
39
- registerLicense({ texteditor: 'PrimeUI-PRO-TextEditor-key...' });
40
- ```
41
-
42
- ## PrimeUI PRO component authors
43
-
44
- Inside your component, call `verifyLicense()` at mount time and surface a watermark when invalid.
45
-
46
- ```ts
47
- import { verifyLicense } from '@primeui/license-manager';
48
- import { RELEASE_DATE } from './release-date';
49
-
50
- onMounted(async () => {
51
- const result = await verifyLicense('texteditor', { releaseDate: RELEASE_DATE });
52
- if (!result.valid) console.warn(`[PrimeUI TextEditor] ${result.message}`);
53
- licenseResult.value = result;
54
- });
55
- ```
56
-
57
- Verification is async (Ed25519 via WebCrypto). Do it on client mount, not during SSR render — license status is a UI concern, not a server-render concern, and threading async work into SSR is fragile.
58
-
59
- ## Prime library authors (PrimeVue / PrimeReact / PrimeNG integration)
60
-
61
- Add `license?: string` to your installer's config and forward it to `registerLicense({ primeui: ... })` from the install hook. The user passes one token; you wire it into the registry.
62
-
63
- ```ts
64
- // Sketch — inside PrimeVue's install hook
65
- import { registerLicense } from '@primeui/license-manager';
66
-
67
- export const PrimeVue = {
68
- install(app, options) {
69
- if (options?.license) registerLicense({ primeui: options.license });
70
- // ... rest of PrimeVue setup
71
- }
72
- };
73
- ```
74
-
75
- For a host-scoped service (rather than the global registry), use `createLicenseService` directly:
76
-
77
- ```ts
78
- import { createLicenseService } from '@primeui/license-manager';
79
-
80
- const service = createLicenseService({ primeui: options.license });
81
- // stash in PrimeVue's own provide/inject so consumers can read it via usePrimeVue().license
82
- ```
83
-
84
- ## Short names → product identifiers
85
-
86
- The `keys` object accepts these short names:
87
-
88
- | Short name | Product identifier | Covers |
89
- | ------------- | -------------------------- | -------------------------------------------- |
90
- | `primeui` | `primeui` | PrimeNG / PrimeVue / PrimeReact / PrimeFaces |
91
- | `texteditor` | `primeui-pro:text-editor` | PRO Text Editor |
92
- | `scheduler` | `primeui-pro:scheduler` | PRO Scheduler |
93
- | `charts` | `primeui-pro:charts` | PRO Charts |
94
- | `diagram` | `primeui-pro:diagram` | PRO Diagram |
95
- | `pdfviewer` | `primeui-pro:pdf-viewer` | PRO PDF Viewer |
96
- | `taskboard` | `primeui-pro:task-board` | PRO Task Board |
97
- | `datagrid` | `primeui-pro:datagrid` | PRO DataGrid |
98
- | `ganttchart` | `primeui-pro:gantt-chart` | PRO Gantt |
99
- | `filemanager` | `primeui-pro:file-manager` | PRO File Manager |
100
-
101
- The registry first looks up the specific short name. If that key is missing (or returns `wrong-product`), it falls back to `keys.primeui` for any PRO component request. The verifier then accepts that token if its `tier` is `'commercial'`. Community PrimeUI tokens never validate PRO requests.
102
-
103
- ## License Tier + Type
104
-
105
- Each signed `primeui` token carries two claims:
106
-
107
- - `tier` — the SKU: `community` (free) or `commercial` (paid).
108
- - `type` — the usage model: `dev` (standard) or `oem` (redistribution).
109
-
110
- PRO tokens omit `tier` and carry `type: 'dev'` or `type: 'oem'`.
111
-
112
- | Tier | Type | Behavior |
113
- | ------------ | ----- | ------------------------------------------------------------------------------------------ |
114
- | `community` | `dev` | Free, eligibility-gated. Annual re-confirmation. Time-bound (wall-clock grace). |
115
- | `commercial` | `dev` | Paid perpetual. Library keeps working forever; only versions released after `exp` blocked. |
116
- | `commercial` | `oem` | Paid annual redistribution license. Time-bound (wall-clock grace). |
117
-
118
- Any token with `tier === 'commercial'` unlocks the PRO bundle rule. Community does not.
119
-
120
- ## Result
121
-
122
- ```ts
123
- interface VerifyResult {
124
- valid: boolean; // true when status is 'active' or 'grace'
125
- status: 'active' | 'grace' | 'expired' | 'invalid' | 'wrong-product' | 'tampered' | 'unconfigured' | 'missing';
126
- daysUntilExpiry?: number;
127
- payload?: LicensePayload;
128
- }
129
- ```
130
-
131
- | status | meaning |
132
- | --------------- | -------------------------------------------------------------------- |
133
- | `active` | Verified, not yet expired |
134
- | `grace` | Expired but within the 30-day grace period — library still works |
135
- | `expired` | Past the grace period (or version released after `exp`) — red banner |
136
- | `wrong-product` | Signed token doesn't cover the requested product |
137
- | `tampered` | Signature check failed |
138
- | `invalid` | Malformed token |
139
- | `missing` | No key configured for this product (and no `primeui` fallback) |
140
- | `unconfigured` | `registerLicense` was never called |
141
-
142
- `grace` is a 30-day window after expiry — library remains functional, caller should surface a warning.
143
-
144
- ## SSR
145
-
146
- Module-scoped state is the correct primitive for license keys (build-time config, not request-time). Under SSR:
147
-
148
- - The host's installer re-runs per request and calls `registerLicense` again — idempotent with the same keys.
149
- - PRO components defer the `verifyLicense` call to client-side mount (`onMounted` / `useEffect` / `ngOnInit`), not the SSR render pass. No watermark is rendered server-side; it appears after hydration if invalid.
150
-
151
- ## Low-level `verify()`
152
-
153
- If you're verifying a single token without the registry:
154
-
155
- ```ts
156
- import { verify } from '@primeui/license-manager';
157
-
158
- const result = await verify(token, { product: 'primeui-pro:scheduler', releaseDate: '2026-04-23' });
159
- ```
160
-
161
- ## Keygen (internal, not for consumers)
162
-
163
- ```
164
- pnpm --filter @primeui/license-manager keygen
165
- ```
166
-
167
- Paste `PRIVATE_KEY` into the store server env, embed `PUBLIC_KEY` in `src/constants.ts`, then publish.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primeui/license-manager",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-rc.2",
4
4
  "author": "PrimeTek Informatics",
5
5
  "description": "Offline license verifier for PrimeUI and PrimeUI PRO",
6
6
  "keywords": [
@@ -12,13 +12,8 @@
12
12
  "primeui"
13
13
  ],
14
14
  "license": "SEE LICENSE IN LICENSE.md",
15
- "repository": {
16
- "type": "git",
17
- "url": "git+https://github.com/primefaces/primeuix.git",
18
- "directory": "packages/license-manager"
19
- },
20
15
  "bugs": {
21
- "url": "https://github.com/primefaces/primeuix/issues"
16
+ "url": "https://support.primeui.dev"
22
17
  },
23
18
  "main": "./dist/index.mjs",
24
19
  "module": "./dist/index.mjs",
@@ -37,7 +32,7 @@
37
32
  "files": [
38
33
  "dist",
39
34
  "README.md",
40
- "LICENSE"
35
+ "LICENSE.md"
41
36
  ],
42
37
  "dependencies": {
43
38
  "@noble/ed25519": "^2.3.0"