Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
1d27b63
update angular package publishing
darula-hpp Feb 10, 2026
50fe932
update changelog
darula-hpp Feb 10, 2026
7e45d97
add Contributing guide
darula-hpp Feb 10, 2026
8f76e26
docs: Revise README for clarity . (#30)
darula-hpp Feb 11, 2026
1aecd56
re add package-lock for ci
darula-hpp Feb 11, 2026
b8d8f6b
Regenerate lockfile
darula-hpp Feb 11, 2026
a3a89c8
Merge branch 'main' into dev
darula-hpp Feb 11, 2026
cdb567e
Feature/docs site/om (#33)
darula-hpp Feb 12, 2026
44dbe97
Merge branch 'main' into dev
darula-hpp Feb 12, 2026
9d787eb
docs: add stars count
darula-hpp Feb 13, 2026
05300a6
Merge branch 'dev' of github.com:darula-hpp/shimmer-from-structure in…
darula-hpp Feb 13, 2026
05ee04c
Merge branch 'main' into dev
darula-hpp Feb 13, 2026
bf51e35
Add documentation link to README
darula-hpp Feb 14, 2026
9bc7629
Fix documentation formatting in README.md
darula-hpp Feb 14, 2026
b160a1e
docs: add shimmer demo on landing
darula-hpp Feb 17, 2026
223f24f
docs:fix non visible text color
darula-hpp Feb 17, 2026
6a5b595
Merge branch 'dev' of github.com:darula-hpp/shimmer-from-structure in…
darula-hpp Feb 17, 2026
d96915b
fix import
darula-hpp Feb 17, 2026
6d43941
Merge branch 'main' into dev
darula-hpp Feb 17, 2026
f8bab90
bug: fix issues where br tag wasnt shimmered (#42)
darula-hpp Feb 21, 2026
46f5c09
Fix: resolve React 18 crash and bump version to 2.3.3 (#45)
darula-hpp Feb 25, 2026
b95a6f2
Merge branch 'main' into dev
darula-hpp Feb 25, 2026
7b519f4
Fix svelte version fix (#49)
darula-hpp Mar 3, 2026
93a2ed2
bump svelte version and update changelog
darula-hpp Mar 3, 2026
b898f95
Merge branch 'main' into dev
darula-hpp Mar 3, 2026
16cb8e5
refactor(react): gracefully handle errors in measureElements
darula-hpp Mar 3, 2026
daa030c
chore: update changelog
darula-hpp Mar 3, 2026
5c76584
Merge branch 'main' into dev
darula-hpp Mar 3, 2026
b06e2d9
refactor:(vue) gracefully handle errors in measureElements
darula-hpp Mar 11, 2026
1fce3f7
refactor(core) Move tests to tests folder
darula-hpp Mar 11, 2026
7ce17b6
refactor(vue) Move tests to test folder
darula-hpp Mar 11, 2026
d9a7044
refactor(vue) Move tests to test folder
darula-hpp Mar 11, 2026
e590437
refactor(svelte): move tests to test folder
darula-hpp Mar 11, 2026
c7d6c25
refactor(solid) move tests to tests folder
darula-hpp Mar 11, 2026
7eae876
refactor(react) move tests to dedicated folder
darula-hpp Mar 11, 2026
98121f2
refactor(angular) move tests to tests folder
darula-hpp Mar 11, 2026
cfe179c
Feat/add html attributes (#56)
darula-hpp Mar 15, 2026
20ab089
Merge branch 'main' into dev
darula-hpp Mar 15, 2026
cbff2b4
(react) isolate workspace react from package react
darula-hpp Mar 15, 2026
ce88794
(docs) add shimmer ignore
darula-hpp Mar 15, 2026
23ab83c
Merge branch 'main' into dev
darula-hpp Mar 15, 2026
bd20fdf
bug(react): Fix issue where react internals are bundled
darula-hpp Mar 16, 2026
12e24c6
Merge branch 'dev' of github.com:darula-hpp/shimmer-from-structure in…
darula-hpp Mar 16, 2026
1700f43
Merge branch 'main' into dev
darula-hpp Mar 16, 2026
a96f30f
fix: resolve CommonJS/ESM module resolution in Vite SSR environments
darula-hpp Mar 21, 2026
9feb8f6
fix: resolve CommonJS/ESM module resolution in Vite SSR environments
darula-hpp Mar 21, 2026
a2ba5c7
Merge branch 'main' into dev
darula-hpp Mar 21, 2026
a7d1bc1
(docs) - Update docs with HTML attributes examples and api
darula-hpp Mar 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.4.2] - 2026-03-21

### Fixed

- **Build: CommonJS/ESM Module Resolution**: Fixed "Named export not found" errors when importing from `@shimmer-from-structure/core` in Vite SSR environments.
- Changed build output from UMD to proper CommonJS format with `.cjs` extension
- Added `"type": "module"` to all package.json files for explicit ESM declaration
- Updated package exports to correctly map `require` to `.cjs` and `import` to `.esm.js`
- Ensures Vite's SSR module runner correctly resolves ES module imports instead of falling back to CommonJS
- Affects all framework adapters: React, Vue, Svelte, Solid, and Angular

## [2.4.1] - 2026-03-16

### Fixed
Expand Down
184 changes: 184 additions & 0 deletions docs/app/docs/api/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,190 @@ bootstrapApplication(AppComponent, {
</li>
</ul>

<h2>HTML Attribute Controls</h2>

<p>
Control shimmer behavior at the element level using HTML data attributes. These attributes
provide fine-grained control over which elements are measured and how they are rendered
during the loading state.
</p>

<table>
<thead>
<tr>
<th>Attribute</th>
<th>Description</th>
<th>Use Case</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>data-shimmer-ignore</code>
</td>
<td>
Excludes the element and all its descendants from shimmer measurement and rendering.
Elements with this attribute remain visible during loading (text and media are not
hidden).
</td>
<td>
Live indicators, badges, static labels, or any content that should remain visible
during loading
</td>
</tr>
<tr>
<td>
<code>data-shimmer-no-children</code>
</td>
<td>
Treats the element as a single shimmer block. The library does not recurse into its
children and uses the element's own bounding rect for the overlay.
</td>
<td>
Complex nested structures where you want a single unified shimmer block instead of
multiple child blocks
</td>
</tr>
</tbody>
</table>

<h3>Example Usage</h3>

<CodeTabs
tabs={[
{
id: 'react',
label: 'React',
content: (
<pre>
<code>{`<Shimmer loading={loading}>
<div className="card">
{/* This badge stays visible during loading */}
<span className="badge" data-shimmer-ignore>
LIVE
</span>

<h2>Card Title</h2>
<p>Card content that will be shimmered</p>

{/* This entire row becomes one shimmer block */}
<div className="metric-row" data-shimmer-no-children>
<span>Views: 1,234</span>
<span>Likes: 567</span>
<span>Shares: 89</span>
</div>
</div>
</Shimmer>`}</code>
</pre>
),
},
{
id: 'vue',
label: 'Vue',
content: (
<pre>
<code>{`<Shimmer :loading="loading">
<div class="card">
<!-- This badge stays visible during loading -->
<span class="badge" data-shimmer-ignore>
LIVE
</span>

<h2>Card Title</h2>
<p>Card content that will be shimmered</p>

<!-- This entire row becomes one shimmer block -->
<div class="metric-row" data-shimmer-no-children>
<span>Views: {{ views }}</span>
<span>Likes: {{ likes }}</span>
<span>Shares: {{ shares }}</span>
</div>
</div>
</Shimmer>`}</code>
</pre>
),
},
{
id: 'svelte',
label: 'Svelte',
content: (
<pre>
<code>{`<Shimmer loading={loading}>
<div class="card">
<!-- This badge stays visible during loading -->
<span class="badge" data-shimmer-ignore>
LIVE
</span>

<h2>Card Title</h2>
<p>Card content that will be shimmered</p>

<!-- This entire row becomes one shimmer block -->
<div class="metric-row" data-shimmer-no-children>
<span>Views: {views}</span>
<span>Likes: {likes}</span>
<span>Shares: {shares}</span>
</div>
</div>
</Shimmer>`}</code>
</pre>
),
},
{
id: 'solid',
label: 'Solid',
content: (
<pre>
<code>{`<Shimmer loading={loading()}>
<div class="card">
{/* This badge stays visible during loading */}
<span class="badge" data-shimmer-ignore>
LIVE
</span>

<h2>Card Title</h2>
<p>Card content that will be shimmered</p>

{/* This entire row becomes one shimmer block */}
<div class="metric-row" data-shimmer-no-children>
<span>Views: {views()}</span>
<span>Likes: {likes()}</span>
<span>Shares: {shares()}</span>
</div>
</div>
</Shimmer>`}</code>
</pre>
),
},
{
id: 'angular',
label: 'Angular',
content: (
<pre>
<code>{`<shimmer [loading]="loading()">
<div class="card">
<!-- This badge stays visible during loading -->
<span class="badge" data-shimmer-ignore>
LIVE
</span>

<h2>Card Title</h2>
<p>Card content that will be shimmered</p>

<!-- This entire row becomes one shimmer block -->
<div class="metric-row" data-shimmer-no-children>
<span>Views: {{ views() }}</span>
<span>Likes: {{ likes() }}</span>
<span>Shares: {{ shares() }}</span>
</div>
</div>
</shimmer>`}</code>
</pre>
),
},
]}
/>

<h2>TypeScript Support</h2>

<p>All packages include full TypeScript definitions. Import types as needed:</p>
Expand Down
18 changes: 18 additions & 0 deletions docs/app/docs/best-practices/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,24 @@ export default function BestPractices() {
maintain consistency and avoid repeating props.
</p>

<h3>6. Use HTML Attribute Controls for Fine-Grained Control</h3>
<p>
Use <code>data-shimmer-ignore</code> and <code>data-shimmer-no-children</code> attributes
to control shimmer behavior at the element level:
</p>
<ul>
<li>
<strong>data-shimmer-ignore:</strong> Keep elements visible during loading (e.g., "LIVE"
badges, status indicators, static labels). The element and all its children are excluded
from shimmer measurement and remain visible.
</li>
<li>
<strong>data-shimmer-no-children:</strong> Treat complex nested structures as a single
shimmer block instead of creating multiple child blocks (e.g., metric rows with multiple
values, compact stat cards).
</li>
</ul>

<hr className="my-8" />

<h2>Framework-Specific Details</h2>
Expand Down
Loading
Loading