@smilodon/core 1.1.9 → 1.2.1
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 +14 -5
- package/dist/index.cjs +540 -940
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +539 -940
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.js +540 -940
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/types/src/components/enhanced-select.d.ts +2 -0
- package/dist/types/src/components/native-select.d.ts +19 -0
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/types/custom-option.d.ts +135 -0
- package/dist/types/src/utils/custom-option-pool.d.ts +78 -0
- package/dist/types/src/utils/option-renderer.d.ts +76 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,10 +69,10 @@ npm install @smilodon/core
|
|
|
69
69
|
|
|
70
70
|
**`@smilodon/core` works directly in all frameworks** as a Web Component - no adapters needed!
|
|
71
71
|
|
|
72
|
-
Simply import and use `<smilodon-select>` in React, Vue,
|
|
72
|
+
Simply import and use `<smilodon-select>` in React, Vue, Svelte, or any framework:
|
|
73
73
|
|
|
74
74
|
```jsx
|
|
75
|
-
// React, Vue, Svelte
|
|
75
|
+
// React, Vue, Svelte - all work the same way
|
|
76
76
|
import '@smilodon/core';
|
|
77
77
|
<smilodon-select ref={selectRef} />
|
|
78
78
|
```
|
|
@@ -81,10 +81,11 @@ import '@smilodon/core';
|
|
|
81
81
|
- **React**: `npm install @smilodon/react` - React hooks and components
|
|
82
82
|
- **Vue**: `npm install @smilodon/vue` - Vue composables and components
|
|
83
83
|
- **Svelte**: `npm install @smilodon/svelte` - Svelte stores and components
|
|
84
|
-
- **Angular**: `npm install @smilodon/angular` - Angular directives and services
|
|
85
84
|
- **Vanilla**: `npm install @smilodon/vanilla` - Vanilla JS helpers
|
|
86
85
|
|
|
87
|
-
These adapters provide framework-native APIs (hooks, composables
|
|
86
|
+
These adapters provide framework-native APIs (hooks, composables) for enhanced developer experience, but are **not required** - the core package works everywhere!
|
|
87
|
+
|
|
88
|
+
**Note:** Angular support has been discontinued as of December 2025.
|
|
88
89
|
|
|
89
90
|
See the [main documentation](https://github.com/navidrezadoost/smilodon#readme) for framework-specific examples.
|
|
90
91
|
|
|
@@ -96,10 +97,17 @@ See the [main documentation](https://github.com/navidrezadoost/smilodon#readme)
|
|
|
96
97
|
- **Sub-millisecond Search**: Fenwick tree indexing for O(log n) queries
|
|
97
98
|
- **60 FPS Scrolling**: Hardware-accelerated virtualization
|
|
98
99
|
|
|
100
|
+
### ✨ Custom Components (NEW in v1.2.0)
|
|
101
|
+
- **Framework Components**: Pass React, Vue, or Svelte components for option rendering
|
|
102
|
+
- **Component Pooling**: Automatic recycling of up to 100 component instances
|
|
103
|
+
- **Lifecycle Management**: Full mount/unmount/update lifecycle control
|
|
104
|
+
- **Mixed Mode**: Use custom components alongside lightweight options
|
|
105
|
+
- **See**: [Custom Option Components Guide](https://github.com/navidrezadoost/smilodon/blob/main/docs/CUSTOM-OPTION-COMPONENTS.md)
|
|
106
|
+
|
|
99
107
|
### 🎯 Production Ready
|
|
100
108
|
- **TypeScript First**: Complete type definitions included
|
|
101
109
|
- **Zero Dependencies**: 6.6 KB gzipped runtime
|
|
102
|
-
- **Framework Agnostic**: Works with React, Vue, Svelte,
|
|
110
|
+
- **Framework Agnostic**: Works with React, Vue, Svelte, or vanilla JS
|
|
103
111
|
- **Accessibility**: WCAG 2.2 AA compliant with ARIA 1.2
|
|
104
112
|
|
|
105
113
|
### 🔒 Enterprise Grade
|
|
@@ -129,6 +137,7 @@ interface SelectItem {
|
|
|
129
137
|
value: any; // Value (can be any type)
|
|
130
138
|
disabled?: boolean; // Disable this option
|
|
131
139
|
group?: string; // Optgroup name
|
|
140
|
+
optionComponent?: CustomOptionFactory; // (v1.2.0+) Custom component for this option
|
|
132
141
|
}
|
|
133
142
|
```
|
|
134
143
|
|