npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@design.estate/dees-wcctools

v3.8.0

Published

A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.

Downloads

1,765

Readme

Fix Properties Panel Element Detection (COMPLETED)

To fix the element detection issue, reread CLAUDE.md first.

Problem Analysis

The properties panel has timing issues detecting rendered elements because:

  1. Elements are rendered asynchronously via lit's render() in the dashboard
  2. Properties panel tries to find elements immediately without waiting for render completion
  3. Element search only looks at direct children, missing nested/shadow DOM elements

Implementation Plan

1. Add proper synchronization ✅

  • Add a delay or await render completion before element detection
  • Use MutationObserver or lit's updateComplete promises

2. Improve element search algorithm ✅

  • Search recursively through all descendants, not just direct children
  • Handle shadow DOM boundaries properly
  • Support elements wrapped in containers

3. Add retry mechanism ✅

  • If element not found, retry after a delay
  • Add maximum retry attempts to prevent infinite loops
  • Clear error state when element is eventually found

Code Changes Required

  1. Modify wcc-properties.ts createProperties() method ✅
  2. Add element search utility function ✅
  3. Improve error handling and user feedback ✅

Demo Wrapper Implementation (COMPLETED)

Created DeesDemoWrapper Component

  • Location: ts_demotools/demotools.ts
  • Allows wrapping demo elements with post-render functionality
  • Provides runAfterRender callback that receives ALL slotted elements as HTMLCollection
  • Uses display: contents to not affect layout
  • Handles timing automatically with 50ms delay after firstUpdated
  • Supports both sync and async callbacks
  • Exports available at @design.estate/dees-wcctools/demotools (lowercase)

Documentation Update (COMPLETED)

Updated readme.md with:

  • Comprehensive overview with feature highlights
  • Quick start guide with code examples
  • Detailed feature documentation
  • Advanced demo tools usage
  • Best practices and guidelines
  • API reference
  • Browser support information
  • Complete examples for all major features

Enhanced DemoWrapper (COMPLETED)

Modified runAfterRender callback:

  • Now receives the wrapper element itself instead of just children
  • Provides full DOM API access (querySelector, querySelectorAll, etc.)
  • querySelector works on slotted content (light DOM children)
  • Access children via wrapper.children property
  • Updated documentation with correct import path (lowercase 'demotools')
  • Examples show how to use querySelector for powerful element selection
  • Added clarifying comment about querySelector working on slotted content

Fixed Properties Panel Compatibility:

  • Made element search generic - works with any container elements
  • Searches both light DOM and shadow DOM recursively
  • Improved error handling to prevent breaking the update cycle
  • Errors in one property don't prevent others from rendering
  • Detection continues working even after errors occur
  • Maintains compatibility with all element structures

Test Elements Created (COMPLETED)

Created comprehensive test elements:

  1. test-noprops - Element with no @property decorators
  2. test-complextypes - Element with arrays, objects, dates, and complex nested data
  3. test-withwrapper - Element that uses dees-demowrapper in its demo
  4. test-edgecases - Element with edge cases (null, undefined, NaN, Infinity, circular refs)
  5. test-nested - Element with deeply nested structure to test recursive search

These test various scenarios:

  • Properties panel handling of elements without properties
  • Complex data type display and editing
  • Element detection inside dees-demowrapper
  • Error handling for problematic values
  • Deep nesting and shadow DOM traversal

Fixed Demo Value Overwriting (COMPLETED)

Issue:

Properties panel was overwriting values set by demo functions

Solution:

  1. Changed from attribute binding (value=) to property binding (.value=)
  2. This prevents browser from firing input events during initialization
  3. Added proper number parsing for number inputs
  4. Increased initial wait to 200ms for demo wrappers to complete
  5. Simplified select element handling to use property binding

Async Demo Support (IN PROGRESS)

Tasks

  • [ ] Allow dashboard-selected items to return Promise-based TemplateResults
  • [ ] Await async demos/pages before rendering them into the viewport
  • [ ] Add regression test covering async demo usage
  • [ ] Document async demo pattern in README and verify with pnpm scripts