@cratis/components 3.0.0 → 3.1.0

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/README.md CHANGED
@@ -50,7 +50,7 @@ The other **peer dependencies** you provide are `react` / `react-dom` (**19+**),
50
50
  and `tsyringe`; you typically already have these in a Cratis app. `pixi.js`,
51
51
  `framer-motion`, `allotment` and `react-icons` remain regular dependencies and are
52
52
  installed for you. The styled `@primeuix/themes` presets are optional and only needed
53
- if you opt into a licensed preset (see [Styling](#styling)).
53
+ if you opt into a preset (see [Styling](#styling)).
54
54
 
55
55
  ### Stylesheets
56
56
 
@@ -60,12 +60,76 @@ entry point, in this order:
60
60
  ```ts
61
61
  import '@cratis/components/tokens'; // the --cratis-* token layer
62
62
  import '@cratis/components/styles'; // every component stylesheet, in one file
63
- import '@cratis/components/theme'; // optional — the license-free baseline look
63
+ import '@cratis/components/theme'; // optional — the Cratis baseline look (MIT CSS)
64
64
  ```
65
65
 
66
66
  `./styles` also vendors `allotment/dist/style.css`, which `DataPage` needs for its
67
67
  split view, so you do not have to import that yourself.
68
68
 
69
+ ## Licensing
70
+
71
+ **As of 3.0.0 this library builds on PrimeReact 11, which is no longer MIT.** PrimeReact 10
72
+ was; PrimeReact 11 is part of PrimeTek's commercial **PrimeUI** family, and so are the
73
+ packages it brings with it.
74
+
75
+ | Package | v10 | v11 |
76
+ |---|---|---|
77
+ | `primereact` | MIT | PrimeUI commercial |
78
+ | `primeicons` | MIT (7.x) | PrimeUI commercial (8.x) |
79
+ | `@primereact/core`, `@primereact/headless` | — | PrimeUI commercial |
80
+ | `@primeuix/themes`, `@primeuix/styled` | — | PrimeUI commercial |
81
+
82
+ `@cratis/components` itself remains **MIT**. The change is in what it depends on, and it is
83
+ yours to satisfy: PrimeReact is a peer dependency, so you install it and its license terms
84
+ apply to you directly.
85
+
86
+ ### A key is required regardless of how you style
87
+
88
+ PrimeReact 11 verifies a license key when `PrimeReactProvider` mounts. The check is not
89
+ conditional on `unstyled`, on whether a theme preset is applied, or on `NODE_ENV` — so
90
+ every styling setup in [Styling](#styling) reaches it. Without a valid key you get a
91
+ console warning and a fixed *"Invalid PrimeUI License"* banner, in development **and**
92
+ production.
93
+
94
+ Supply your key through the provider:
95
+
96
+ ```tsx
97
+ <CratisComponentsProvider value={{ license: '…' }}>
98
+ ```
99
+
100
+ `@cratis/components/theme` is Cratis-authored MIT CSS that embeds no PrimeTek values, so
101
+ that **stylesheet** carries no PrimeTek terms — but rendering it still means running
102
+ PrimeReact 11, which needs a key.
103
+
104
+ ### Which license you need
105
+
106
+ - **[Community License](https://primeui.dev/licenses/community)** — free. Covers
107
+ individuals, students, non-profits and non-commercial open source outright. For an
108
+ organization it requires *all* of: under $1M USD annual gross revenue, fewer than 5
109
+ developers, fewer than 10 employees, and under $3M USD in outside funding. Supports up to
110
+ 4 developers and is renewed annually by confirming continued eligibility.
111
+ - **[Commercial License](https://primeui.dev/licenses/commercial)** — for everyone else.
112
+ Per developer, perpetual, with one year of updates.
113
+
114
+ ### If you redistribute
115
+
116
+ PrimeReact 11's terms state: *"You may not … redistribute it as a component library or
117
+ development tool … Redistributing the software so that third parties can develop with it
118
+ requires a separate OEM License."*
119
+
120
+ If you are building an application, that clause is not aimed at you. If you are publishing
121
+ a library or tool that others build with, read it and check your position with PrimeTek.
122
+
123
+ ### Staying on MIT
124
+
125
+ If a commercial dependency is not acceptable, **`@cratis/components` 2.x stays on
126
+ PrimeReact 10 and is fully MIT.** It is not getting new features, but it is the supported
127
+ way to remain MIT-only.
128
+
129
+ > Nothing here is legal advice, and this summary may lag PrimeTek's terms. The
130
+ > authoritative text is the `LICENSE.md` inside the `primereact` package and the pages
131
+ > linked above.
132
+
69
133
  ## Usage
70
134
 
71
135
  ### Importing Components
@@ -108,7 +172,7 @@ Components:
108
172
 
109
173
  Stylesheets:
110
174
 
111
- - `@cratis/components/theme` — the **Cratis baseline theme** (light + dark, no PrimeUI license); import it and add `class="cratis-theme"` to skin every component from the token layer
175
+ - `@cratis/components/theme` — the **Cratis baseline theme** (light + dark, Cratis-authored MIT CSS, no `@primeuix/themes` dependency); import it and add `class="cratis-theme"` to skin every component from the token layer
112
176
  - `@cratis/components/styles` — **required**: every component stylesheet, the Tailwind utilities used inside the package, and the `allotment` rules `DataPage` needs, in one file
113
177
  - `@cratis/components/tokens` — **required**: the `--cratis-*` CSS variable tokens every component reads from
114
178
 
@@ -120,26 +184,30 @@ much control you want, and the other layers stay invisible.
120
184
 
121
185
  > **Tip — see each setup live:** every Storybook story includes a **Styling**
122
186
  > toolbar (paintbrush icon) that flips between the modes demonstrating the
123
- > setups below: *Aura Dark* and *Aura Light* (a licensed `@primeuix/themes`
124
- > preset), *Cratis baseline theme* (light and dark, no license), *Unstyled
187
+ > setups below: *Aura Dark* and *Aura Light* (an `@primeuix/themes`
188
+ > preset), *Cratis baseline theme* (light and dark), *Unstyled
125
189
  > (bare structure)*, and *Unstyled + Tailwind pt*. Open any story (`yarn dev`)
126
190
  > and switch modes to see the same component under each setup.
127
191
 
128
192
  ### TL;DR — choose a styling setup
129
193
 
130
- | Setup | When | Effort | License | What you write |
194
+ > **A PrimeUI license key is required for every row below** see [Licensing](#licensing).
195
+ > The styling choice changes how it looks and whether you additionally pull in
196
+ > `@primeuix/themes`; it does not change whether you need a key.
197
+
198
+ | Setup | When | Effort | Extra dependency | What you write |
131
199
  |---|---|---|---|---|
132
- | **Cratis baseline theme** | You want a polished default look with no license. | Lowest | None | `unstyled` + `import '@cratis/components/theme'` + `class="cratis-theme"` |
133
- | **A styled `@primeuix/themes` preset** | You want a prebuilt design system to tweak from. | Low | PrimeUI key | `value={{ theme: { preset } }}` on the provider |
134
- | **A custom palette over a preset** | You want the preset's structure but your own colors. | Low | PrimeUI key | A preset + CSS variable overrides |
200
+ | **Cratis baseline theme** | You want a polished default look without adding a theme package. | Lowest | None | `unstyled` + `import '@cratis/components/theme'` + `class="cratis-theme"` |
201
+ | **A styled `@primeuix/themes` preset** | You want a prebuilt design system to tweak from. | Low | `@primeuix/themes` | `value={{ theme: { preset } }}` on the provider |
202
+ | **A custom palette over a preset** | You want the preset's structure but your own colors. | Low | `@primeuix/themes` | A preset + CSS variable overrides |
135
203
  | **Fully unstyled** | You're integrating into a tightly controlled design system. | Highest | None | `unstyled: true` + a `pt` preset in CSS or Tailwind |
136
204
 
137
205
  > **Why you need a theme, a baseline stylesheet, or a `pt` preset**
138
206
  >
139
207
  > PrimeReact 11 is **unstyled-first**: the primitives render structural markup
140
208
  > with no built-in visuals. A look comes from one of three sources — a
141
- > `@primeuix/themes` preset (token-based, license-gated), the Cratis baseline
142
- > theme (`@cratis/components/theme`, no license), or your own `pt`/CSS. Load
209
+ > `@primeuix/themes` preset (token-based), the Cratis baseline
210
+ > theme (`@cratis/components/theme`), or your own `pt`/CSS. Load
143
211
  > none of them and the components render as their raw HTML primitives.
144
212
  >
145
213
  > The `--cratis-*` token layer is an **additive Cratis-scoped tint** for
@@ -212,11 +280,12 @@ Omit `theme` entirely to stay unstyled-first — ship only structure plus the
212
280
  `--cratis-*` tokens and bring your own visuals (see the pass-through / `pt`
213
281
  options below).
214
282
 
215
- ### Use the Cratis baseline theme (no license)
283
+ ### Use the Cratis baseline theme
216
284
 
217
- Want a polished default look **without a PrimeUI license**? Ship the components
218
- unstyled and import the Cratis baseline theme — a token-based stylesheet that
219
- styles every component from the `--cratis-*` layer:
285
+ Want a polished default look **without adding `@primeuix/themes`**? Ship the
286
+ components unstyled and import the Cratis baseline theme — Cratis-authored MIT
287
+ CSS that styles every component from the `--cratis-*` layer. (You still need a
288
+ PrimeUI key to run PrimeReact itself — see [Licensing](#licensing).)
220
289
 
221
290
  ```tsx
222
291
  import 'primeicons/primeicons.css';
@@ -1,3 +1,4 @@
1
+ export * from './DataTableCore';
1
2
  export * from './DataTableForQuery';
2
3
  export * from './DataTableForObservableQuery';
3
4
  export * from './Column';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../DataTables/index.ts"],"names":[],"mappings":"AAGA,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../DataTables/index.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC"}
@@ -1,3 +1,4 @@
1
+ export { DataTableCore } from './DataTableCore.js';
1
2
  export { DataTableForQuery } from './DataTableForQuery.js';
2
3
  export { DataTableForObservableQuery } from './DataTableForObservableQuery.js';
3
4
  export { Column } from './Column.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../DataTables/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;AACA"}
1
+ {"version":3,"file":"index.js","sources":["../../../DataTables/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAAA;AACA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/components",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "",
5
5
  "author": "Cratis",
6
6
  "license": "MIT",