Roberto Redradix
d97565f84d
build(core,cli): mark prettier package as a devDependency
2023-10-03 13:21:05 +02:00
Roberto Redradix
423c930ff7
build(cli): remove unused dependecy leftover
2023-10-03 13:15:52 +02:00
Roberto Redradix
c3bc509a3f
build: bump version to 0.1.2
...
npm version tag handling is weird. v0.1.1 was published as `beta` instead of `latest`.
A new version is required for republishing.
2023-10-02 14:29:42 +02:00
Roberto Redradix
3fe662dac8
build: bump version to 0.1.1
2023-10-02 14:25:57 +02:00
Roberto Redradix
e20a2affed
build: update package.json metadata
2023-10-02 14:25:22 +02:00
Roberto Redradix
26c9c983b8
build: bump version to 0.1.0
2023-10-02 13:24:58 +02:00
Roberto Redradix
25b08f6373
docs: update documentation with a start guide
2023-10-02 13:24:28 +02:00
Roberto Redradix
3cd0c13224
fix(core): export user configuration type declarations
2023-10-02 13:22:01 +02:00
Roberto Redradix
1cc6b9feec
build: bump version to 0.1.0-beta.1
2023-09-28 18:31:03 +02:00
Roberto Redradix
f197a8075d
fix(cli): parse URL with extra search params
2023-09-26 17:42:46 +02:00
Roberto Redradix
59dcbfef60
chore(cli): fail in a more elegant way
2023-09-26 17:35:40 +02:00
Roberto Redradix
fe7691e6d1
feat(cli): allow to inspect Penpot URLs
2023-09-26 17:33:45 +02:00
Roberto Redradix
5cc7be703d
feat(demo): provide a demo Penpot file
2023-09-25 15:07:06 +02:00
Roberto Redradix
9d76f9b0e4
feat(demos): share the Penpot file ID
2023-09-25 15:07:06 +02:00
Roberto Redradix
f988d73655
feat(core): sort assets reproducibly by name
2023-09-25 15:07:06 +02:00
Roberto Redradix
5392f8a4e0
build: bump version to 0.1.0-beta.0
2023-09-15 19:14:45 +02:00
Roberto Redradix
122c5b6071
docs: license under Apache License, Version 2.0
2023-09-15 19:14:42 +02:00
Roberto Redradix
7927ed8f98
build(core,cli): build TypeScript before packing
2023-09-15 19:00:55 +02:00
Roberto Redradix
f5d3badde2
chore(demo): update generated files
2023-09-15 18:51:38 +02:00
Roberto Redradix
8a39949ed0
feat!(core): follow W3C draft design tokens format spec for colors and typographies in JSON output
...
Draft spec (24 July 2023): https://tr.designtokens.org/format/
Deprecate JSON output for page components, since the spec is not flexible enough for arbitrary properties.
2023-09-15 18:51:35 +02:00
Roberto Redradix
ba9886beb4
feat(demo): split demos per output format
...
Adds a SCSS-specific demo
2023-09-15 18:12:15 +02:00
Roberto Redradix
ec3e1b52e9
chore(demo): update generated files
2023-09-13 13:06:37 +02:00
Roberto Redradix
660f2b9ae9
refactor(core): decouple name scoping logic from API adapters
...
Introduce the concept of transformer functions. A transformer function will receive an assets as an input and will output the same kind of asset.
Scoping class names in CSS was a transformation applied to typography and page components assets when the output is CSS.
Decoupling this transformation from the rest of the adapter results in cleaner API inbound adapters, without any project-specific logic, so now they can be co-located close to the PenpotClient code.
2023-09-13 11:35:18 +02:00
Roberto Redradix
07977124da
chore(demo): update generated files
2023-09-12 18:20:19 +02:00
Roberto Redradix
1681cefb05
refactor(core): add better semantics with wrapper internal types
...
Additionally, throw runtime internal errors when TypeScript assumptions are not fulfilled.
2023-09-12 18:19:10 +02:00
Roberto Redradix
2b3381fa97
feat!(core): use 8-digit hexadecimal RGBA colors
...
The 8-digit hexadecimal RGBA syntax is a more standard way to represent colors than the rgba() color function, which is CSS-specific.
The 8-digit hex notation is valid CSS as of the CSS Level 4 spec: https://www.w3.org/TR/css-color-4/#hex-notation
Additionally, the CSS rgba() comma-separated color function is considered *legacy color syntax* as per the CSS Level 4 spec: https://www.w3.org/TR/css-color-4/#legacy-color-syntax
Sass has built-in support for CSS Level 4 color notations: https://sass-lang.com/documentation/values/colors/
The 8-digit hexadecimal RGBA is a drop-in replacement for rgba() values in both CSS and SCSS, so this is functionally compatible if the file is used directly.
BREAKING CHANGE: drops CSS rgba() values in all output formats. It's a soft breaking change for CSS and SCSS outputs, but a hard one for JSON.
2023-09-12 13:28:09 +02:00
Roberto Redradix
f7275f8e30
refactor(core): move all re-export declaration to the end of the files
2023-09-11 18:45:28 +02:00
Roberto Redradix
173472aa36
chore(demo): update generated files
2023-09-11 18:45:28 +02:00
Roberto Redradix
1fcb0e0860
feat(core): describe typography requirements and Google Fonts implementation aid
2023-09-11 18:45:28 +02:00
Roberto Redradix
562e1d77e3
chore(demo): import SCSS files
2023-09-07 18:07:59 +02:00
Roberto Redradix
af856a642e
refactor(core): separate file writting logic from output adapters
2023-09-07 17:26:22 +02:00
Roberto Redradix
f33dc7a9b8
feat(core): allow to export SCSS files
2023-09-07 16:59:03 +02:00
Roberto Redradix
c035375084
chore(demo): update assets and HTML
2023-09-07 16:58:39 +02:00
Roberto Redradix
9a39da7a65
refactor(core): delegate CSS tokenization and serialization to the outputter
2023-09-07 16:58:39 +02:00
Roberto Redradix
b76d4d57ef
refactor(core): serialize each CSS variable at a time
2023-09-07 10:50:33 +02:00
Roberto Redradix
70c3d9a665
refactor(core): sort config types
2023-09-05 17:56:42 +02:00
Roberto Redradix
abe6e54f4a
chore(demo): update with JSON outputs
2023-09-05 14:43:33 +02:00
Roberto Redradix
98597dbf4c
feat!(core): allow to export JSON files
...
BREAKING CHANGE: CSS variables (color) are no longer lowercase. Since CSS custom property names are case sensitive, this would break existing consumers.
2023-09-05 14:40:00 +02:00
Roberto Redradix
1fd8a579de
chore(core): remove unused type imports
2023-09-05 12:08:32 +02:00
Roberto Redradix
bef9cd65ef
refactor(core): remove PenpotExportFile cumbersome abstraction
2023-09-05 12:03:54 +02:00
Roberto Redradix
924d5bec7b
refactor(core): colocate schemas, types and validators
2023-09-04 18:49:12 +02:00
Roberto Redradix
f7b972e032
chore(core): disallow empty arrays in user config
2023-09-04 17:42:36 +02:00
Roberto Redradix
83ba6f93d5
refactor(core): validate user config in a more expressive way
...
zod unions are exclusive, so the UserConfig type couldn't be kept as a union either for having at least a colors, typographies or pages output.
This check has been moved to a runtime zod refine custom validation.
2023-09-04 17:42:34 +02:00
Roberto Redradix
bf6f6a723a
test(core): add tests for CSS ident tokens
2023-09-04 13:41:32 +02:00
Roberto Redradix
e35186eae9
refactor!: split penpot-export into cli and core modules
2023-09-01 17:43:45 +02:00
Roberto Redradix
e13d644805
refactor!(cli): rename pentpot-css-export to penpot-export
2023-09-01 17:43:45 +02:00
Roberto Redradix
ec802a35d0
feat!(cli): output CSS colors with alpha channel
2023-09-01 17:43:45 +02:00
Roberto Redradix
41303b0a51
docs(demo): document environment variables
2023-09-01 17:43:45 +02:00
Roberto Redradix
7f43fc1d98
refactor(cli): extract adapters and a CSS outputter
2023-09-01 17:43:45 +02:00
Roberto Redradix
66f0b48fa4
refactor(cli): difference API and internal types
...
Take the opportunity to merge PentpotApiPage and PenpotApiObject into PenpotApiContainer to follow more closely the Penpot data model
2023-09-01 17:43:45 +02:00