Skip to content

feat(vector-style-compiler): literal prop paths for selectors and attr()#121

Merged
braunschweig-pg merged 2 commits into
mainfrom
feature/vector-style-prop-paths
Jun 26, 2026
Merged

feat(vector-style-compiler): literal prop paths for selectors and attr()#121
braunschweig-pg merged 2 commits into
mainfrom
feature/vector-style-prop-paths

Conversation

@pjeweb

@pjeweb pjeweb commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add prop| and env-prop| prefixes so selectors and attr() can read flat feature/env keys such as stroke-width (Simplestyle-style) instead of only nested props.stroke.width paths.
  • Replace naive selector tokenization with a string-aware parser so |js expressions containing ] (for example props['stroke-width']) compile correctly.
  • Register selector property paths in allowedProps and declaration-hash metadata so literal-key selectors participate in style-cache invalidation.
  • Document hyphen-splitting vs literal keys, SCSS quoting gotchas, and the new syntax in the package README.

Test plan

  • pnpm --filter @mapsight/vector-style-compiler test
  • pnpm changeset status --since=origin/main

…tors and attr()

Support prop| and env-prop| for flat GeoJSON keys such as stroke-width, fix selector
tokenization for |js expressions containing brackets, and include selector paths in
allowedProps for cache invalidation.
@changeset-bot

changeset-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 46dd109

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@mapsight/vector-style-compiler Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@braunschweig-pg braunschweig-pg merged commit 2126ff4 into main Jun 26, 2026
20 checks passed
@braunschweig-pg braunschweig-pg deleted the feature/vector-style-prop-paths branch June 26, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants