Skip to content

Commit 91e8c94

Browse files
committed
docs: update READMEs and changeset for v0.2.0 release
- Update main README with v0.2.0 features and examples - Update packages/core/README.md (already accurate) - Fix duplicate header in packages/plugins/README.md - Update changeset test counts (432 tests, 56 modal tests) - Add script tag and ESM usage examples - Update roadmap and project status
1 parent 2fc279c commit 91e8c94

File tree

3 files changed

+102
-51
lines changed

3 files changed

+102
-51
lines changed

.changeset/phase-2-presentation-layer.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ Seamless integration with existing display condition plugins:
6767
- **Excellent Compression**: CSS-in-JS with CSS variables maintains small footprint
6868

6969
## 🧪 Testing
70-
- **427 tests passing** (unit, integration, browser tests)
71-
- **Modal Plugin**: 50+ tests for core functionality, forms, keyboard nav, accessibility
72-
- **Inline Plugin**: 24+ tests for DOM insertion, dismissal, persistence
73-
- **Form Validation**: 35+ tests for all field types and edge cases
74-
- **Integration Tests**: 10+ tests for plugin interactions
75-
- **Browser Tests**: 5+ tests with Playwright for real browser behavior
70+
- **432 tests passing** (unit, integration, browser tests)
71+
- **Modal Plugin**: 56 tests for core functionality, forms, keyboard nav, accessibility
72+
- **Inline Plugin**: 24 tests for DOM insertion, dismissal, persistence
73+
- **Form Validation**: 35 tests for all field types and edge cases
74+
- **Integration Tests**: 10 tests for plugin interactions
75+
- **Exit Intent**: 21 tests with timing and sensitivity validation
7676

7777
## 📚 Documentation
7878
- **Modal Plugin Reference**: Complete API docs with examples

README.md

Lines changed: 95 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,61 +4,96 @@
44

55
**A lightweight, explainable client-side experience runtime built on [@lytics/sdk-kit](https://github.com/lytics/sdk-kit)**
66

7-
Experience SDK decides if/when/why experiences (banners, modals, tooltips) should render. Every decision comes with structured reasons, making debugging and testing effortless.
7+
Experience SDK enables marketers and developers to create personalized experiences (modals, banners, inline content) with powerful targeting and explainability. Every decision comes with structured reasons, making debugging and testing effortless.
88

99
## Features
1010

1111
- 🔍 **Explainability-First** - Every decision includes structured reasons
1212
- 🧩 **Plugin-Based** - Built on @lytics/sdk-kit's powerful plugin system
13-
- 📦 **Script Tag Ready** - Works without build tools
13+
- 🎨 **Presentation Plugins** - Modal, banner, and inline content rendering
14+
- 📝 **Built-in Forms** - Email capture, surveys, feedback with validation
15+
- 🎯 **Smart Triggers** - Exit intent, scroll depth, time delay, page visits
16+
- 📦 **Script Tag Ready** - Works without build tools (marketers love it!)
17+
- 💅 **CSS Variables** - Easy theming with CSS custom properties
1418
- 🎯 **Type-Safe** - Full TypeScript support
15-
- 🪶 **Lightweight** - < 15KB gzipped
19+
- 🪶 **Lightweight** - ~26KB gzipped with all plugins (13.4KB core)
1620
- 🔧 **Developer-Friendly** - Built for inspection and debugging
1721

1822
## Quick Start
1923

20-
### Script Tag
24+
### Script Tag (For Marketers)
2125

2226
```html
23-
<script src="https://sdk.prosdevlab.com/experience-sdk.min.js"></script>
27+
<script src="https://cdn.jsdelivr.net/npm/@prosdevlab/experience-sdk@latest/dist/experience-sdk.global.js"></script>
2428
<script>
2529
// Initialize
2630
experiences.init({ debug: true });
2731
28-
// Register an experience
29-
experiences.register('welcome-banner', {
30-
type: 'banner',
32+
// Exit intent modal with email capture
33+
experiences.register('exit-intent-modal', {
34+
type: 'modal',
35+
content: {
36+
title: '🚀 Wait! Before You Go...',
37+
message: 'Join 10,000+ subscribers for exclusive content',
38+
form: {
39+
fields: [
40+
{ name: 'email', type: 'email', label: 'Email', required: true }
41+
],
42+
submitButton: { text: 'Subscribe', variant: 'primary' }
43+
}
44+
},
3145
targeting: {
32-
url: { contains: '/' },
33-
frequency: { max: 1, per: 'session' }
46+
url: { contains: '/pricing' }
3447
},
35-
content: {
36-
title: 'Welcome!',
37-
message: 'Thanks for visiting.'
48+
display: {
49+
trigger: 'exitIntent',
50+
frequency: { max: 1, per: 'session' }
3851
}
3952
});
4053
41-
// Evaluate (shows if rules match)
42-
const decision = experiences.evaluate();
43-
44-
// See why
45-
console.log(decision.reasons);
46-
// ['✅ URL contains "/"', '✅ Not shown this session (0/1)']
54+
// Listen for form submissions
55+
experiences.on('experiences:modal:form:submit', (event) => {
56+
console.log('Email submitted:', event.formData.email);
57+
// Send to your API, analytics, etc.
58+
});
4759
</script>
4860
```
4961

50-
### npm
62+
### npm (For Developers)
5163

5264
```bash
53-
npm install @prosdevlab/experience-sdk
65+
npm install @prosdevlab/experience-sdk @prosdevlab/experience-sdk-plugins
5466
```
5567

5668
```typescript
57-
import experiences from '@prosdevlab/experience-sdk';
69+
import { createInstance } from '@prosdevlab/experience-sdk';
70+
import { modalPlugin, inlinePlugin, bannerPlugin } from '@prosdevlab/experience-sdk-plugins';
71+
72+
const sdk = createInstance({ debug: true });
73+
74+
// Use plugins
75+
sdk.use(modalPlugin);
76+
sdk.use(inlinePlugin);
77+
sdk.use(bannerPlugin);
78+
79+
// Register experiences
80+
sdk.register('feature-tip', {
81+
type: 'inline',
82+
content: {
83+
selector: '#feature-section',
84+
position: 'after',
85+
message: '<div>💡 New: Check out our analytics dashboard!</div>'
86+
},
87+
display: {
88+
trigger: 'scrollDepth',
89+
triggerData: { threshold: 50 }
90+
}
91+
});
5892

59-
experiences.init({ debug: true });
60-
experiences.register('welcome', { ... });
61-
const decision = experiences.evaluate();
93+
// Listen to events
94+
sdk.on('experiences:shown', (event) => {
95+
analytics.track('Experience Shown', { id: event.experienceId });
96+
});
6297
```
6398

6499
### Event-Driven Architecture
@@ -90,18 +125,38 @@ See the [Events Reference](https://your-docs-url/api/events) for comprehensive d
90125

91126
## Documentation
92127

93-
See [notes/IMPLEMENTATION_PLAN.md](notes/IMPLEMENTATION_PLAN.md) for detailed implementation guide.
128+
- **[Plugin Reference](https://prosdevlab.github.io/experience-sdk/reference/plugins)** - Modal, Banner, Inline plugins
129+
- **[Theming Guide](https://prosdevlab.github.io/experience-sdk/guides/theming)** - CSS variables customization
130+
- **[Playground](https://experience-sdk-playground.vercel.app)** - Live demos and use cases
94131

95132
## Project Status
96133

97-
🚧 **v0.1.0 in development** - Foundation phase
98-
99-
- [ ] Core runtime with explainability
100-
- [ ] Storage plugin (frequency capping)
101-
- [ ] Debug plugin (event emission)
102-
- [ ] Banner plugin (delivery)
103-
- [ ] Demo site
104-
- [ ] UMD bundle
134+
**v0.2.0** - Presentation Layer Complete
135+
136+
**Core Runtime:**
137+
- ✅ Explainability-first evaluation engine
138+
- ✅ Plugin system (sdk-kit)
139+
- ✅ Event-driven architecture
140+
- ✅ Hybrid API (singleton + instance)
141+
142+
**Display Condition Plugins:**
143+
- ✅ Exit Intent - Detect users about to leave
144+
- ✅ Scroll Depth - Trigger at scroll thresholds
145+
- ✅ Time Delay - Time-based triggers
146+
- ✅ Page Visits - Session/total visit tracking
147+
- ✅ Frequency Capping - Impression limits
148+
149+
**Presentation Plugins:**
150+
- ✅ Modal - Announcements, promotions, forms
151+
- ✅ Banner - Top/bottom dismissible messages
152+
- ✅ Inline - Embed content in page DOM
153+
154+
**Features:**
155+
- ✅ Built-in form support (validation, submission)
156+
- ✅ CSS variable theming
157+
- ✅ TypeScript support
158+
- ✅ 432 tests passing
159+
-~26KB gzipped (all plugins)
105160

106161
## Development
107162

@@ -149,13 +204,13 @@ Built on [@lytics/sdk-kit](https://github.com/lytics/sdk-kit), Experience SDK sh
149204

150205
## Roadmap
151206

152-
- **Phase 0 (v0.1.0)**: Foundation - Runtime + 3 plugins + demo
153-
- **Phase 1 (v0.2.0)**: Chrome Extension - DevTools integration
154-
- **Phase 2 (v0.3.0)**: Advanced plugins - More experience types
155-
- **Phase 3 (v0.4.0)**: Developer tools - Playground & testing
156-
- **Phase 4 (v1.0.0)**: Production-ready
207+
- **Phase 0 (v0.1.0)**: Foundation - Core runtime, display condition plugins, banner plugin
208+
- **Phase 1 (v0.2.0)**: Presentation Layer - Modal & inline plugins with forms
209+
- 🚧 **Phase 2 (v0.3.0)**: Developer Experience - Chrome DevTools extension
210+
- 🚧 **Phase 3 (v0.4.0)**: Advanced Features - Tooltip plugin, multi-instance support
211+
- 🚧 **Phase 4 (v1.0.0)**: Production Ready - Performance optimizations, advanced targeting
157212

158-
See [notes/vision-and-roadmap.md](notes/vision-and-roadmap.md) for full roadmap.
213+
See the [full roadmap](notes/vision-and-roadmap.md) for details.
159214

160215
## License
161216

packages/plugins/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
Official plugins for [Experience SDK](https://github.com/prosdevlab/experience-sdk).
44

5-
# @prosdevlab/experience-sdk-plugins
6-
7-
Official plugins for [Experience SDK](https://github.com/prosdevlab/experience-sdk).
8-
9-
**Size:** 78.31 KB uncompressed, 12.7 KB gzipped
5+
**Size:** 12.7 KB gzipped (all plugins)
106

117
## Included Plugins
128

0 commit comments

Comments
 (0)