@mhmo91/schmancy 0.10.3 → 0.10.4

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
@@ -11,31 +11,24 @@ registered. No bundler, no bare specifiers, no npm install.
11
11
 
12
12
  ```html
13
13
  <script type="module">
14
- import { theme, state, area } from 'https://esm.sh/@mhmo91/schmancy/agent';
14
+ import 'https://esm.sh/@mhmo91/schmancy/agent';
15
15
  </script>
16
16
  <schmancy-theme root scheme="dark">
17
17
  <schmancy-surface type="solid" fill="all">
18
18
  <schmancy-button>Hi</schmancy-button>
19
- <schmancy-skill></schmancy-skill>
20
19
  </schmancy-surface>
21
20
  </schmancy-theme>
22
21
  ```
23
22
 
24
- The `<schmancy-skill>` tag installs `window.schmancy` for runtime discovery:
23
+ The same entry re-exports the full library surface for in-page script
24
+ code (`theme`, `area`, `state`, `show`, `lazy`, every directive, every
25
+ service, `SchmancyElement`). Import from the same URL.
25
26
 
26
- - `window.schmancy.help()`full manifest (CEM v1 shape).
27
- - `window.schmancy.help('schmancy-button')` one tag's attributes, events, slots, CSS parts.
28
- - `window.schmancy.tokens()` build-time-extracted list of `--schmancy-*` theme tokens.
29
- - `window.schmancy.registeredTags()` — every `<schmancy-*>` tag the bundle registered, sorted.
30
- - `window.schmancy.manifestUrl` Blob URL; `fetch()` it for the same data.
31
- - `window.schmancy.a11yAudit()` — walks the live DOM and reports ARIA / shadow-root / form-association status per instance.
32
- - `window.schmancy.platformPrimitive('schmancy-dialog')` — map to the native element a component wraps (present when the component's JSDoc has `@platform`).
33
- - `window.schmancy.capabilities()` — runtime feature probe (`popover`, `declarativeShadowDom`, `scopedRegistries`, `trustedTypes`, `cssRegisteredProperties`, `elementInternalsAria`, `formAssociated`, `adoptedStyleSheets`). Agents use this to adapt to the sandbox they're in rather than the one they expect.
34
-
35
- Every enum-typed attribute carries a `values` array — e.g. `schmancy-button`'s `variant` ships `["elevated", "filled", "filled tonal", "tonal", "outlined", "text"]` so agents never have to parse `"'filled' | 'tonal' | ..."` strings.
36
-
37
- The manifest is also emitted as a sibling file at `@mhmo91/schmancy/agent/manifest`
38
- for tooling that prefers reading JSON from disk.
27
+ For introspectionevery tag's attributes, events, slots, CSS parts,
28
+ plus the enum `values` array on every typed attribute (so agents don't
29
+ have to parse `"'filled' | 'tonal' | ..."` strings) read the static
30
+ manifest at `@mhmo91/schmancy/agent/manifest`. It's a JSON file, shape
31
+ follows Custom Elements Manifest v1.
39
32
 
40
33
  ## Install
41
34
 
@@ -50,13 +43,21 @@ import { magnetic, cursorGlow, gravity } from '@mhmo91/schmancy/directives'
50
43
 
51
44
  ## Use with Claude Code
52
45
 
53
- Schmancy ships a Claude Code plugin. In any Claude Code session, run:
46
+ Schmancy ships a Claude Code plugin (manifest at `.claude-plugin/plugin.json`,
47
+ skill source under `skills/schmancy/`). The npm tarball includes both, so
48
+ after `npm install @mhmo91/schmancy`, point Claude at the package directory
49
+ when launching:
54
50
 
55
51
  ```
56
- /plugin install https://github.com/samwaai/schmancy
52
+ claude --plugin-dir node_modules/@mhmo91/schmancy
57
53
  ```
58
54
 
59
- Claude now knows every Schmancy component, foundation pattern, and convention in your project. The skill activates automatically when you work on schmancy code — no CLAUDE.md edits, no symlinks.
55
+ Set a shell alias / `.envrc` so every session in the project picks it up.
56
+ After editing plugin files, run `/reload-plugins` inside the session.
57
+
58
+ Claude now knows every Schmancy component, foundation pattern, and
59
+ convention; the skill activates automatically when you work on schmancy
60
+ code — no CLAUDE.md edits, no symlinks.
60
61
 
61
62
  ## Quick Start
62
63
 
@@ -1,19 +1,6 @@
1
1
  {
2
2
  "version": "experimental",
3
3
  "tags": [
4
- {
5
- "name": "schmancy-skill",
6
- "path": "./src/agent/schmancy-skill.ts",
7
- "description": "Self-describing runtime helper. Drop `<schmancy-skill></schmancy-skill>`\nonce on a page and `window.schmancy.help('schmancy-button')` returns the\nmachine-readable entry for any tag. Renders nothing.",
8
- "properties": [
9
- {
10
- "name": "disconnectedSignal",
11
- "description": "AbortSignal that fires when the element disconnects.",
12
- "type": "AbortSignal",
13
- "default": "\"signal\""
14
- }
15
- ]
16
- },
17
4
  {
18
5
  "name": "schmancy-area",
19
6
  "path": "./src/area/area.component.ts",