@rojaostudio/ds-core 1.1.0-next.0 → 1.1.0-next.10
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 +11 -0
- package/README.md +7 -4
- package/dist/{chunk-CFCKPKAF.js → chunk-LP6UA4EW.js} +575 -170
- package/dist/{chunk-3QTDO2HW.js → chunk-PV6GFEAM.js} +1 -2
- package/dist/generate.d.ts +116 -8
- package/dist/generate.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/recipes.d.ts +5 -1
- package/dist/recipes.js +1 -1
- package/dist/themes.js +1 -1
- package/figma/export-brand.js +58 -0
- package/package.json +4 -3
package/LICENSE
CHANGED
|
@@ -19,3 +19,14 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Arquivos gerados
|
|
26
|
+
|
|
27
|
+
Os arquivos que esta ferramenta escreve no seu projeto (o tema CSS e o bloco
|
|
28
|
+
entre os marcadores <!-- rojao-ds:start --> e <!-- rojao-ds:end --> em
|
|
29
|
+
CLAUDE.md, AGENTS.md ou .cursorrules) são de quem usa a ferramenta. Você pode
|
|
30
|
+
usá-los, alterá-los e distribuí-los como quiser, sem obrigação de manter aviso
|
|
31
|
+
de licença ou atribuição. A licença MIT acima vale para o código da ferramenta,
|
|
32
|
+
não para o que ela gera.
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ npm i @rojaostudio/ds-core
|
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
|
-
import {
|
|
12
|
+
import { generateRdsTheme, emitRdsCss, emitClaudeMd } from '@rojaostudio/ds-core/generate';
|
|
13
13
|
|
|
14
14
|
const brand = {
|
|
15
15
|
name: 'acme',
|
|
@@ -19,10 +19,13 @@ const brand = {
|
|
|
19
19
|
fonts: { body: 'inter' },
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
emitClaudeMd(brand);
|
|
22
|
+
emitRdsCss(generateRdsTheme(brand)); // rds-theme.css — import it AFTER @rojaostudio/ds/styles/rds.css
|
|
23
|
+
emitClaudeMd(brand); // the same brand as rules for Claude Code, Cursor or AGENTS.md
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
Or, without writing code: `npx rojao-ds init` (the [`rojao-ds`](https://www.npmjs.com/package/rojao-ds) CLI)
|
|
27
|
+
writes both files into your project.
|
|
28
|
+
|
|
26
29
|
One color goes in. What comes out is an OKLCH scale with an adaptive contrast floor, semantic
|
|
27
30
|
roles for surface, text, border and brand, and the full light/dark pair — verified against
|
|
28
31
|
WCAG AA on all three surfaces, by test, on every build.
|
|
@@ -41,7 +44,7 @@ Components, styles and the React Native target live in
|
|
|
41
44
|
|
|
42
45
|
| Entry | What's in it |
|
|
43
46
|
|---|---|
|
|
44
|
-
| `@rojaostudio/ds-core/generate` | `
|
|
47
|
+
| `@rojaostudio/ds-core/generate` | `generateRdsTheme`, `rdsThemeFromTable`, `emitRdsCss`, `emitClaudeMd`, `generateTheme`/`emitCss` (1.x), `buildScale`, `contrastRatio` |
|
|
45
48
|
| `@rojaostudio/ds-core/tokens` | `primitives` — the raw palettes and scales |
|
|
46
49
|
| `@rojaostudio/ds-core/recipes` | the reference brand definition |
|
|
47
50
|
| `@rojaostudio/ds-core/themes` | the preset catalogue: a starting palette per niche |
|