@kirana-style/astro 0.3.4 → 0.3.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,103 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.6](https://github.com/kirana-style/kirana/compare/v0.3.5...v0.3.6) (2026-10-31)
4
+
5
+
6
+ ### Features
7
+
8
+ * a contextual target may name a class ([#206](https://github.com/kirana-style/kirana/pull/206)) ([e71ff55](https://github.com/kirana-style/kirana/commit/e71ff551e41d0b645c7e00e238b736ab0a54a090))
9
+ * diagnostics print as oxc's graphical report, with the source ([#207](https://github.com/kirana-style/kirana/pull/207)) ([cbbdbe5](https://github.com/kirana-style/kirana/commit/cbbdbe5224e31739681576e1d29133122881d764))
10
+ * fallback() reads a token, then another, then a value ([#211](https://github.com/kirana-style/kirana/pull/211)) ([6e72f71](https://github.com/kirana-style/kirana/commit/6e72f71274ae0f98fb0fddcb3b2674a10a8d8e90))
11
+ * layers.tiers puts each ladder tier in a sub-layer of kirana.atoms ([#172](https://github.com/kirana-style/kirana/pull/172)) ([8bca0d5](https://github.com/kirana-style/kirana/commit/8bca0d55fe9edff698e4de10dcca2c2d4ee61093))
12
+ * migrate stylex writes styles as stylex read them ([#193](https://github.com/kirana-style/kirana/pull/193)) ([88a3a42](https://github.com/kirana-style/kirana/commit/88a3a42df4b38cf024e57caf620c05ad82da54ff))
13
+ * migrate tailwind reads a design system's conditions and handles ([#204](https://github.com/kirana-style/kirana/pull/204)) ([d753322](https://github.com/kirana-style/kirana/commit/d753322d29c272b1175278d30e480c29094ce40f))
14
+ * relation-read-on-anchor, a state read on its own anchor ([#186](https://github.com/kirana-style/kirana/pull/186)) ([3676f00](https://github.com/kirana-style/kirana/commit/3676f000aeaaf00e0aed681e5050390cadc23db1))
15
+ * the language server in a browser page, as project.language ([#184](https://github.com/kirana-style/kirana/pull/184)) ([c2d1bec](https://github.com/kirana-style/kirana/commit/c2d1bec0388bf3e430bdb92eb51b80d739b31c20))
16
+ * ui flattens each design axis, or keeps every design ([#209](https://github.com/kirana-style/kirana/pull/209)) ([2559372](https://github.com/kirana-style/kirana/commit/2559372d569c8000daf2eb2ebe6cb5df1bcb4e0c))
17
+ * ui init and ui preset take --pointer and --rtl ([#202](https://github.com/kirana-style/kirana/pull/202)) ([19859f8](https://github.com/kirana-style/kirana/commit/19859f8eb7fd41e5d7b5ada395af7c0522bc5e5f))
18
+
19
+
20
+ ### Bug fixes
21
+
22
+ * a dev page that loaded an older stylesheet gets the current one ([#187](https://github.com/kirana-style/kirana/pull/187)) ([8ba8538](https://github.com/kirana-style/kirana/commit/8ba853804b1a71f8a47f99babd0c6ad0babe19f7))
23
+ * a host reads the package root's config from a folder without one ([#183](https://github.com/kirana-style/kirana/pull/183)) ([47fa994](https://github.com/kirana-style/kirana/commit/47fa994a47339532272485cce2a4105b6704e49b))
24
+ * a key or spread decided at runtime is reported where it is written ([#208](https://github.com/kirana-style/kirana/pull/208)) ([2594a25](https://github.com/kirana-style/kirana/commit/2594a255a0f6242c8693fbc86b4e63638ab8fcb9))
25
+ * a listed library's components read sx, so it is not reported ([#196](https://github.com/kirana-style/kirana/pull/196)) ([16cc0d4](https://github.com/kirana-style/kirana/commit/16cc0d4fbd38a1e8c99309d38a2049740d45efea))
26
+ * a long editor or dev session no longer grows its memory with every edit ([#175](https://github.com/kirana-style/kirana/pull/175)) ([76e8a41](https://github.com/kirana-style/kirana/commit/76e8a412e0e0d3d1fa1d67ccb1004fd02988d073))
27
+ * a watch build forgets the tokens a rebuild no longer names ([#180](https://github.com/kirana-style/kirana/pull/180)) ([91bbc81](https://github.com/kirana-style/kirana/commit/91bbc8181f624b53186db9a64f78701e76640e41))
28
+ * an optional relation anchored without its readers is not reported ([#181](https://github.com/kirana-style/kirana/pull/181)) ([4acdcf7](https://github.com/kirana-style/kirana/commit/4acdcf76259e425797b912ae088669f85ad359d4))
29
+ * base-ui's accordion item, header and panel have closed ([#185](https://github.com/kirana-style/kirana/pull/185)) ([a33889f](https://github.com/kirana-style/kirana/commit/a33889ff0799cc7b6e57b8b7596dd518f738b923))
30
+ * removing both logical axes clears a component's physical box ([#200](https://github.com/kirana-style/kirana/pull/200)) ([9b61d15](https://github.com/kirana-style/kirana/commit/9b61d15b397e30f63476c14d11d5e6c2da9e9dee))
31
+ * tailwind migration keeps line heights, images and single layers ([#201](https://github.com/kirana-style/kirana/pull/201)) ([a34017c](https://github.com/kirana-style/kirana/commit/a34017cea2ffb6b2560df960d97adfed6e330e4e))
32
+ * the utility grammar hints import scales as its default export ([#182](https://github.com/kirana-style/kirana/pull/182)) ([22fca2b](https://github.com/kirana-style/kirana/commit/22fca2b7e39e78b2f9b921a11a25bd64828d1e69))
33
+
34
+
35
+ ### Performance
36
+
37
+ * a build that writes no source maps does not build them ([#176](https://github.com/kirana-style/kirana/pull/176)) ([4d8da10](https://github.com/kirana-style/kirana/commit/4d8da1039e915762767b7399604bf577c48ac44d))
38
+ * a dense build without source maps renames chunks in one pass ([#189](https://github.com/kirana-style/kirana/pull/189)) ([4ab17c5](https://github.com/kirana-style/kirana/commit/4ab17c5b31dd693c840868018eaec6e8c9d3a049))
39
+ * a style reused from another value is not copied ([#192](https://github.com/kirana-style/kirana/pull/192)) ([a79d1bd](https://github.com/kirana-style/kirana/commit/a79d1bdb95ab1c45fbeaae776f360fe25495f927))
40
+ * check places a file's diagnostics without walking it for each one ([#194](https://github.com/kirana-style/kirana/pull/194)) ([a21f5d7](https://github.com/kirana-style/kirana/commit/a21f5d70873485c99d622c0110ac3696dafe5a20))
41
+ * declarations compile without parsing longhands or copying plans ([#188](https://github.com/kirana-style/kirana/pull/188)) ([cd39382](https://github.com/kirana-style/kirana/commit/cd393829e0b92c7c41a75ad0bf68b77c89d9812d))
42
+ * esbuild, bun, webpack, next and parcel compile modules in parallel ([#195](https://github.com/kirana-style/kirana/pull/195)) ([7961d2e](https://github.com/kirana-style/kirana/commit/7961d2e9df3d7c023680f420485501a012653cc7))
43
+ * formatting diagnostics no longer walks the source for each one ([#190](https://github.com/kirana-style/kirana/pull/190)) ([700bea8](https://github.com/kirana-style/kirana/commit/700bea8d93387a268822b98da2e78045dc02bef1))
44
+ * merging styles and naming their classes copies and allocates less ([#178](https://github.com/kirana-style/kirana/pull/178)) ([f9fb902](https://github.com/kirana-style/kirana/commit/f9fb902591a08955495a0ff1138255a536b5cb75))
45
+ * styles compile and stylesheets are written with less repeated work ([#174](https://github.com/kirana-style/kirana/pull/174)) ([085984a](https://github.com/kirana-style/kirana/commit/085984a0c94f05a6122cfb50d31e79361c6cb693))
46
+ * the stylesheet is written from atoms kept in its order ([#179](https://github.com/kirana-style/kirana/pull/179)) ([428dda4](https://github.com/kirana-style/kirana/commit/428dda4e3b44e0417293ea4f1d89f6f8fbb1a09a))
47
+ * the stylesheet writes each key's values in order, which compresses better ([#191](https://github.com/kirana-style/kirana/pull/191)) ([4465ca5](https://github.com/kirana-style/kirana/commit/4465ca53f4b178e0674f820a975b76fb2d793441))
48
+
49
+
50
+ ### Documentation
51
+
52
+ * counts from their sources, two readmes, four more checks ([#203](https://github.com/kirana-style/kirana/pull/203)) ([3855e4c](https://github.com/kirana-style/kirana/commit/3855e4c4c6d7d6a10872994d5b3c0232060ffde6))
53
+ * every page says what the code does, and two more checks hold it ([#199](https://github.com/kirana-style/kirana/pull/199)) ([6615452](https://github.com/kirana-style/kirana/commit/661545274459072480780f25326018586bcf37d8))
54
+ * take the benchmarks of kirana 0.3.5 from kirana-lab ([#177](https://github.com/kirana-style/kirana/pull/177)) ([0920e23](https://github.com/kirana-style/kirana/commit/0920e23fc9614474bce7702a1f8bfe8c3b3b30bd))
55
+ * the agent skills say what shipped since 0.3.0 ([#197](https://github.com/kirana-style/kirana/pull/197)) ([8cfc693](https://github.com/kirana-style/kirana/commit/8cfc6938f0808fe2d6e977e5414826544219a4dc))
56
+
57
+ ## [0.3.5](https://github.com/kirana-style/kirana/compare/v0.3.4...v0.3.5) (2026-10-28)
58
+
59
+
60
+ ### Features
61
+
62
+ * a part that anchors a relation can read its own kind beside it ([#163](https://github.com/kirana-style/kirana/pull/163)) ([71131ad](https://github.com/kirana-style/kirana/commit/71131adc72d053b547879b1ebaddbc4f22b012bc))
63
+ * add @kirana-style/compiler-browser, the engine in a browser page ([#155](https://github.com/kirana-style/kirana/pull/155)) ([566f300](https://github.com/kirana-style/kirana/commit/566f300bfe33f94f4c51399f1b199b0ae3915b64))
64
+ * angular parts merge sx through partSx beside SxDirective ([#167](https://github.com/kirana-style/kirana/pull/167)) ([0138926](https://github.com/kirana-style/kirana/commit/0138926c8249b337682b84f64d1587fb3e2d1740))
65
+ * font items, imported by ui add and installed by a preset ([#168](https://github.com/kirana-style/kirana/pull/168)) ([e6dc629](https://github.com/kirana-style/kirana/commit/e6dc62989b81038a6110eb731ccf4fc0b8325c12))
66
+ * own() claims an attribute for one component's style ([#169](https://github.com/kirana-style/kirana/pull/169)) ([52f6e52](https://github.com/kirana-style/kirana/commit/52f6e52bb3840521e3fc86ac6b1017aed6a6b8bb))
67
+ * style helpers evaluate object.entries, fromEntries and map ([#160](https://github.com/kirana-style/kirana/pull/160)) ([05421b8](https://github.com/kirana-style/kirana/commit/05421b8cccff73fdc0cf57aa288a2606b200eafd))
68
+
69
+
70
+ ### Bug fixes
71
+
72
+ * a relation read compiles in a module that does not import kirana ([#159](https://github.com/kirana-style/kirana/pull/159)) ([cb073a4](https://github.com/kirana-style/kirana/commit/cb073a4aa5f1c5039ed2182a18118d8123d11851))
73
+ * an import no style reads is not reported unresolved or cyclic ([#148](https://github.com/kirana-style/kirana/pull/148)) ([40eff25](https://github.com/kirana-style/kirana/commit/40eff2516620feade8130c8a2cf74b3d1b45fd06))
74
+ * an import of a file created during a watch session resolves ([#164](https://github.com/kirana-style/kirana/pull/164)) ([afdb700](https://github.com/kirana-style/kirana/commit/afdb7007c9908f7c3f3036e6eaec9cb0d2ac197f))
75
+ * angular and ember peer @kirana-style/vite at the release's version ([#157](https://github.com/kirana-style/kirana/pull/157)) ([09d71db](https://github.com/kirana-style/kirana/commit/09d71db1124dc722e54fbcfee70f3a511cfceea4))
76
+ * props() and keyframes() are typed as they compile ([#158](https://github.com/kirana-style/kirana/pull/158)) ([b797caa](https://github.com/kirana-style/kirana/commit/b797caa8f040ffc0e0dccfb513b76ef0517e407b))
77
+ * removing a whole box removes its logical sides too ([#171](https://github.com/kirana-style/kirana/pull/171)) ([f838ff1](https://github.com/kirana-style/kirana/commit/f838ff1de7c7b31c0c576fcda3394fc27abd5cd5))
78
+ * ui init gives a javascript next.js app its tsconfig and typescript ([#149](https://github.com/kirana-style/kirana/pull/149)) ([6eee0fd](https://github.com/kirana-style/kirana/commit/6eee0fdda35deca7ad66721ff12b3791bfba228c))
79
+
80
+
81
+ ### Performance
82
+
83
+ * a dev server and a watch build reuse unchanged transforms ([#170](https://github.com/kirana-style/kirana/pull/170)) ([3eac1cf](https://github.com/kirana-style/kirana/commit/3eac1cfb6a730fae900d6c81ed86b9b5833baf22))
84
+ * a style written out in full compiles once a session ([#166](https://github.com/kirana-style/kirana/pull/166)) ([ec84bd3](https://github.com/kirana-style/kirana/commit/ec84bd35af1068fbfe0a6aa52972b70ed2eff05f))
85
+ * dense names build the renaming's source map only when the build writes maps ([#161](https://github.com/kirana-style/kirana/pull/161)) ([a655efd](https://github.com/kirana-style/kirana/commit/a655efd0632b97c86190cca95c5ce7b73dd38a88))
86
+ * reading a preset's tokens no longer walks the whole preset ([#165](https://github.com/kirana-style/kirana/pull/165)) ([b92775d](https://github.com/kirana-style/kirana/commit/b92775d74d96b8f4b357616937ddc7921ac1c73a))
87
+ * the engine loader looks up the c library once per process ([#156](https://github.com/kirana-style/kirana/pull/156)) ([344a932](https://github.com/kirana-style/kirana/commit/344a932ed212900c6cdeb980d135d5c248fd93c2))
88
+ * the stylesheet is written from one atom index, not every module's atoms ([#162](https://github.com/kirana-style/kirana/pull/162)) ([6718147](https://github.com/kirana-style/kirana/commit/6718147b0bb444f3d63403047c726d31e823a517))
89
+
90
+
91
+ ### Documentation
92
+
93
+ * take the benchmarks of kirana 0.3.4 from kirana-lab ([#153](https://github.com/kirana-style/kirana/pull/153)) ([f093aa7](https://github.com/kirana-style/kirana/commit/f093aa7a693e38fcc8d252f9e797c775e2321ca1))
94
+ * the roadmap lists the products planned beside the compiler ([#154](https://github.com/kirana-style/kirana/pull/154)) ([7806842](https://github.com/kirana-style/kirana/commit/7806842cbd7ebf67efa98131f3343891351df01c))
95
+
96
+
97
+ ### Dependencies
98
+
99
+ * bump the minor-and-patch group with 4 updates ([#151](https://github.com/kirana-style/kirana/pull/151)) ([4bb63be](https://github.com/kirana-style/kirana/commit/4bb63be11279c059c28f33e120b6fc36af06da02))
100
+
3
101
  ## [0.3.4](https://github.com/kirana-style/kirana/compare/v0.3.3...v0.3.4) (2026-10-27)
4
102
 
5
103
 
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # @kirana-style/astro
2
+
3
+ The Astro integration for Kirana ([11-integrations](../../../../spec/11-integrations.md)).
4
+
5
+ ```js
6
+ // astro.config.mjs
7
+ import kirana from "@kirana-style/astro"
8
+ import { defineConfig } from "astro/config"
9
+
10
+ export default defineConfig({ integrations: [kirana()] })
11
+ ```
12
+
13
+ ```astro
14
+ ---
15
+ // the layout's frontmatter
16
+ import "@kirana-style/core/stylesheet.css"
17
+ ---
18
+ ```
19
+
20
+ What it does:
21
+
22
+ - **Compile.** It adds `@kirana-style/vite`, which compiles `.astro` components as they are read,
23
+ before Astro does: styles declared in the frontmatter, `sx` on elements, merged with the element's
24
+ own `class` and `style`.
25
+ - **Build.** Astro inlines small stylesheets into its pages and links larger ones by a name it records
26
+ before the stylesheet is finished. Once every page is written, the integration fills the stylesheet
27
+ in place, renames it by its content hash and replaces the old name in every page, chunk and
28
+ manifest.
29
+
30
+ Options are `@kirana-style/vite`'s, except `renameStylesheet`, which the integration does itself. For
31
+ `astro check`, add `/// <reference types="@kirana-style/core/astro" />` to `src/env.d.ts`.
32
+
33
+ The guide: [kirana.style/docs/frameworks/astro](https://kirana.style/docs/frameworks/astro).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kirana-style/astro",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "Kirana for Astro: the integration that compiles .astro components and finishes the stylesheet.",
5
5
  "license": "MIT",
6
6
  "author": "The Kirana authors",
@@ -25,9 +25,9 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@kirana-style/compiler": "0.3.4",
29
- "@kirana-style/core": "0.3.4",
30
- "@kirana-style/vite": "0.3.4"
28
+ "@kirana-style/compiler": "0.3.6",
29
+ "@kirana-style/core": "0.3.6",
30
+ "@kirana-style/vite": "0.3.6"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "astro": ">=5.0.0"
package/src/index.js CHANGED
@@ -5,12 +5,10 @@ import { renameAsset } from "@kirana-style/compiler/host";
5
5
  import vite from "@kirana-style/vite";
6
6
  // src/index.ts
7
7
  /**
8
- * The Astro integration (KRN-INT-004): `@kirana-style/vite` for Astro's Vite, which compiles `.astro`
9
- * components as they are read (`design-notes/sfc-masking.md`), plus the one step Astro needs after
10
- * its build. Astro links each page's stylesheet — or inlines a small one — by the name and content it
11
- * recorded before the bundle was finished, so the Vite plugin fills the stylesheet in place, and once
12
- * Astro has written every page this integration renames the file by its real content and rewrites
13
- * every reference to it.
8
+ * The Astro integration (KRN-INT-004): `@kirana-style/vite`, which compiles `.astro` components as
9
+ * they are read (`design-notes/sfc-masking.md`), plus one step after the build. Astro links or inlines
10
+ * each page's stylesheet by the name it recorded before the bundle was finished, so the stylesheet is
11
+ * filled in place and renamed by its real content once every page is written.
14
12
  */
15
13
  /** Files whose text can name the stylesheet: pages, server chunks, manifests, other stylesheets. */
16
14
  const TEXT = /\.(?:html|m?js|json|css)$/;