uni-types 1.9.0 → 1.10.0
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 +152 -1
- package/dist/index.cjs +14 -0
- package/dist/index.d.cts +21176 -14736
- package/dist/index.d.mts +21176 -14736
- package/dist/index.mjs +12 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ A comprehensive collection of type helpers for TypeScript development
|
|
|
18
18
|
|
|
19
19
|
## Features
|
|
20
20
|
|
|
21
|
-
- 🎯 **
|
|
21
|
+
- 🎯 **2000+ Type Utilities** - Comprehensive type helpers for every use case
|
|
22
22
|
- 🔒 **Type Safe** - Full TypeScript support with strict type checking
|
|
23
23
|
- 📦 **Zero Dependencies** - Lightweight and tree-shakeable
|
|
24
24
|
- 🚀 **TypeScript 5.x** - Built with the latest TypeScript features
|
|
@@ -1298,6 +1298,157 @@ type Result = If<true, 'success', 'error'> // 'success'
|
|
|
1298
1298
|
| `Channel<T>`, `BufferedChannel<T>`, `ChannelConfig<T>` | Channel types |
|
|
1299
1299
|
| `CombineLatest<T>`, `Zip<T>`, `ForkJoinResult<T>` | Combinators |
|
|
1300
1300
|
|
|
1301
|
+
### Ultimate Type Utilities *(v1.10.0)*
|
|
1302
|
+
|
|
1303
|
+
| Type | Description |
|
|
1304
|
+
|------|-------------|
|
|
1305
|
+
| `Perfect<T>`, `Complete<T>`, `Final<T>`, `Ultimate<T>` | Ultimate type constraints |
|
|
1306
|
+
| `PerfectPick<T, K>`, `PerfectOmit<T, K>`, `PerfectPartial<T>`, `PerfectRequired<T>` | Perfect operations |
|
|
1307
|
+
| `CompleteKeys<T>`, `CompleteValues<T>`, `CompleteEntries<T>` | Completeness types |
|
|
1308
|
+
| `Finalize<T>`, `Frozen<T>`, `Sealed<T>`, `Locked<T>` | Finalization types |
|
|
1309
|
+
| `Validate<T, Schema>`, `Validated<T, Schema>`, `ValidationResult<T>` | Type validation |
|
|
1310
|
+
| `AssertType<T, U>`, `AssertShape<T, Shape>`, `AssertKeys<T, K>` | Type assertions |
|
|
1311
|
+
|
|
1312
|
+
### Higher-Kinded Types *(v1.10.0)*
|
|
1313
|
+
|
|
1314
|
+
| Type | Description |
|
|
1315
|
+
|------|-------------|
|
|
1316
|
+
| `HKT<F, A>`, `Kind<F, A>`, `Kind2<F, A, B>`, `Kind3<F, A, B, C>` | Higher-kinded types |
|
|
1317
|
+
| `Recurse<T, N>`, `RecurseWhile<T, Cond, F>`, `RecurseUntil<T, Cond, F>` | Type recursion |
|
|
1318
|
+
| `Memoize<T>`, `Memoized<T>`, `CacheKey<T>`, `CacheValue<T>` | Type memoization |
|
|
1319
|
+
| `PartialApply<F, Args>`, `Curried<F>`, `Uncurried<F>`, `FlipArgs<F>` | Partial application |
|
|
1320
|
+
| `Compose<F, G>`, `Pipe<F, G>`, `ComposeAll<Fs>`, `PipeAll<Fs>` | Type composition |
|
|
1321
|
+
| `Fix<F>`, `Unfix<F, T>`, `Mu<F>`, `Nu<F>` | Fixpoint types |
|
|
1322
|
+
| `ChurchNumeral`, `ChurchBoolean`, `ChurchList<T>`, `ChurchPair<A, B>` | Church encoding |
|
|
1323
|
+
| `Functor<F>`, `Apply<F>`, `Applicative<F>`, `Monad<F>` | Type classes |
|
|
1324
|
+
| `Either<L, R>`, `Maybe<T>`, `Left<L>`, `Right<R>`, `Just<T>`, `Nothing` | Algebraic types |
|
|
1325
|
+
|
|
1326
|
+
### Framework Integrations *(v1.10.0)*
|
|
1327
|
+
|
|
1328
|
+
| Type | Description |
|
|
1329
|
+
|------|-------------|
|
|
1330
|
+
| `AngularComponent<T>`, `AngularService<T>`, `AngularPipe<I, O>`, `AngularDirective<T>` | Angular types |
|
|
1331
|
+
| `AngularModule`, `AngularSignal<T>`, `AngularComputed<T>`, `AngularEffect` | Angular utilities |
|
|
1332
|
+
| `SvelteComponent<P, E, S>`, `SvelteStore<T>`, `SvelteAction<E, P>`, `SvelteTransition` | Svelte types |
|
|
1333
|
+
| `EmberComponent<A>`, `EmberService<T>`, `EmberRoute<M, P>`, `EmberController<M, Q>` | Ember types |
|
|
1334
|
+
| `BackboneModel<A>`, `BackboneCollection<M>`, `BackboneView<M, E>`, `BackboneRouter` | Backbone types |
|
|
1335
|
+
| `PreactComponent<P, S>`, `PreactFC<P>`, `PreactHooks`, `PreactContext<T>` | Preact types |
|
|
1336
|
+
| `SolidComponent<P>`, `SolidSignal<T>`, `SolidResource<T>`, `SolidMemo<T>` | Solid types |
|
|
1337
|
+
| `LitElement<P>`, `LitPropertyConfig<T>`, `LitDecorator`, `LitCustomElement<T>` | Lit types |
|
|
1338
|
+
| `StencilComponent<P, S>`, `StencilProp<T>`, `StencilEvent<T>`, `StencilEventEmitter<T>` | Stencil types |
|
|
1339
|
+
| `AlpineComponent<D, M>`, `AlpineStore<S>`, `AlpineMagic<T>`, `AlpineReactive<T>` | Alpine.js types |
|
|
1340
|
+
|
|
1341
|
+
### Build Tools *(v1.10.0)*
|
|
1342
|
+
|
|
1343
|
+
| Type | Description |
|
|
1344
|
+
|------|-------------|
|
|
1345
|
+
| `WebpackConfig`, `WebpackModule`, `WebpackPlugin`, `WebpackLoader` | Webpack types |
|
|
1346
|
+
| `WebpackDevServer`, `WebpackOptimization`, `WebpackSplitChunks` | Webpack utilities |
|
|
1347
|
+
| `ViteConfig`, `VitePlugin`, `ViteBuild`, `ViteServer`, `ViteDevServer` | Vite types |
|
|
1348
|
+
| `RollupConfig`, `RollupOutput`, `RollupPlugin`, `RollupBuild` | Rollup types |
|
|
1349
|
+
| `ESBuildOptions`, `ESBuildPlugin`, `ESBuildResult`, `ESBuildMessage` | esbuild types |
|
|
1350
|
+
| `ParcelConfig`, `ParcelTransformer`, `ParcelNamer` | Parcel types |
|
|
1351
|
+
| `TurbopackConfig`, `TurbopackLoader`, `TurbopackPlugin` | Turbopack types |
|
|
1352
|
+
| `BabelConfig`, `BabelPreset<T>`, `BabelPlugin<T>`, `BabelTransformResult` | Babel types |
|
|
1353
|
+
| `SWCConfig`, `SWCParser`, `SWCTransform`, `SWCMinifyOptions` | SWC types |
|
|
1354
|
+
|
|
1355
|
+
### DevOps *(v1.10.0)*
|
|
1356
|
+
|
|
1357
|
+
| Type | Description |
|
|
1358
|
+
|------|-------------|
|
|
1359
|
+
| `Dockerfile`, `DockerImage`, `DockerContainer`, `DockerCompose` | Docker types |
|
|
1360
|
+
| `DockerComposeService`, `DockerComposeBuild`, `DockerComposeDeploy` | Docker Compose |
|
|
1361
|
+
| `K8sDeployment`, `K8sService`, `K8sPod`, `K8sConfigMap`, `K8sSecret`, `K8sIngress` | Kubernetes types |
|
|
1362
|
+
| `K8sContainer`, `K8sVolume`, `K8sProbe`, `K8sAffinity`, `K8sToleration` | K8s utilities |
|
|
1363
|
+
| `TerraformResource<T>`, `TerraformModule<T>`, `TerraformProvider<T>` | Terraform types |
|
|
1364
|
+
| `TerraformVariable<T>`, `TerraformOutput`, `TerraformConfig` | Terraform utilities |
|
|
1365
|
+
| `AnsiblePlaybook`, `AnsibleTask`, `AnsibleRole`, `AnsibleInventory` | Ansible types |
|
|
1366
|
+
| `GitHubWorkflow`, `GitHubJob`, `GitHubStep` | GitHub Actions |
|
|
1367
|
+
| `GitLabPipeline`, `GitLabJob`, `GitLabCache`, `GitLabArtifacts` | GitLab CI |
|
|
1368
|
+
| `JenkinsPipeline`, `JenkinsStage`, `JenkinsStep` | Jenkins types |
|
|
1369
|
+
| `CircleCIConfig`, `CircleCIJob`, `CircleCIStep` | CircleCI types |
|
|
1370
|
+
| `AWSResource<T>`, `AzureResource<T>`, `GCPResource<T>`, `CloudFormation` | Cloud types |
|
|
1371
|
+
| `HelmChart`, `HelmRelease`, `HelmValues` | Helm types |
|
|
1372
|
+
|
|
1373
|
+
### Quality Assurance *(v1.10.0)*
|
|
1374
|
+
|
|
1375
|
+
| Type | Description |
|
|
1376
|
+
|------|-------------|
|
|
1377
|
+
| `ESLintConfig`, `ESLintRule`, `ESLintPlugin`, `ESLintResult` | ESLint types |
|
|
1378
|
+
| `PrettierConfig`, `FormatOptions`, `FormatResult` | Prettier types |
|
|
1379
|
+
| `CodeAnalysis<T>`, `ComplexityReport`, `CodeMetrics` | Code analysis |
|
|
1380
|
+
| `MaintainabilityIndex`, `TechnicalDebt<T>`, `DebtItem` | Code quality |
|
|
1381
|
+
| `SecurityAudit<T>`, `Vulnerability`, `SecurityReport<T>` | Security types |
|
|
1382
|
+
| `DependencyAudit<T>`, `OutdatedPackage`, `LicenseCheck<T>` | Dependency types |
|
|
1383
|
+
| `PerformanceAudit<T>`, `BundleAnalysis<T>`, `PerformanceMetric` | Performance types |
|
|
1384
|
+
| `LighthouseScore`, `QualityGate<T>`, `GateCondition`, `GateResult` | Quality gates |
|
|
1385
|
+
| `TestCoverage`, `TestResult`, `TestSummary`, `TestPerformance` | Testing types |
|
|
1386
|
+
| `CodeQualityMetrics`, `MaintainabilityMetrics`, `SecurityMetrics` | Quality metrics |
|
|
1387
|
+
|
|
1388
|
+
### Architecture Patterns *(v1.10.0)*
|
|
1389
|
+
|
|
1390
|
+
| Type | Description |
|
|
1391
|
+
|------|-------------|
|
|
1392
|
+
| `Layer<T>`, `PresentationLayer<T>`, `BusinessLayer<T>`, `DataAccessLayer<T>` | Layered architecture |
|
|
1393
|
+
| `Entity<T>`, `UseCase<I, O>`, `Gateway<T>`, `Presenter<I, O>` | Clean architecture |
|
|
1394
|
+
| `Port<M>`, `InboundPort<I, O>`, `OutboundPort<I, O>`, `Adapter<P>` | Hexagonal architecture |
|
|
1395
|
+
| `Hexagon<D, I, O>`, `Core<D>` | Hexagonal core |
|
|
1396
|
+
| `Aggregate<E, Es>`, `ValueObject<T>`, `DomainEvent<D>`, `Repository<E, I>` | DDD types |
|
|
1397
|
+
| `DomainService<I, O>`, `BoundedContext<A, R, S, E>`, `ContextMap<C>` | DDD utilities |
|
|
1398
|
+
| `ContextRelationship`, `ContextBoundary` | Bounded context |
|
|
1399
|
+
| `Command<T, P>`, `Query<T, P>`, `CommandHandler<C>`, `QueryHandler<Q>` | CQRS types |
|
|
1400
|
+
| `CommandBus`, `QueryBus` | CQRS bus |
|
|
1401
|
+
| `EventStream<E>`, `EventStore<E>`, `Projection<E, S>`, `Saga<S>` | Event sourcing |
|
|
1402
|
+
| `CoreSystem<F>`, `PluginInterface<P>`, `ExtensionPoint<E>` | Microkernel |
|
|
1403
|
+
| `ProcessingUnit<D>`, `VirtualizedMiddleware<P>`, `DataGrid<D>` | Space-based |
|
|
1404
|
+
|
|
1405
|
+
### Data Formats *(v1.10.0)*
|
|
1406
|
+
|
|
1407
|
+
| Type | Description |
|
|
1408
|
+
|------|-------------|
|
|
1409
|
+
| `JSONValue`, `JSONSchema<T>`, `JSONPath<T>`, `JSONPatch<T>` | JSON types |
|
|
1410
|
+
| `XMLNode<T>`, `XMLAttribute<T>`, `XMLSchema<T>`, `XPath<T>` | XML types |
|
|
1411
|
+
| `YAMLValue<T>`, `YAMLNode<T>`, `YAMLPath<T>` | YAML types |
|
|
1412
|
+
| `CSVRow<T>`, `CSVHeader`, `CSVConfig<T>` | CSV types |
|
|
1413
|
+
| `TOMLValue<T>`, `TOMLTable<T>`, `TOMLKey` | TOML types |
|
|
1414
|
+
| `ProtoMessage<T>`, `ProtoField<T>`, `ProtoEnum<T>`, `ProtoService<T>` | Protocol Buffers |
|
|
1415
|
+
| `MessagePackValue<T>`, `MessagePackType` | MessagePack |
|
|
1416
|
+
| `AvroSchema<T>`, `AvroRecord<T>`, `AvroField<T>` | Avro types |
|
|
1417
|
+
| `BSONValue<T>`, `BSONDocument<T>` | BSON types |
|
|
1418
|
+
|
|
1419
|
+
### Accessibility *(v1.10.0)*
|
|
1420
|
+
|
|
1421
|
+
| Type | Description |
|
|
1422
|
+
|------|-------------|
|
|
1423
|
+
| `ARIARole`, `ARIARoleCategory`, `ARIAProperty`, `ARIAState` | ARIA core types |
|
|
1424
|
+
| `AccessibilityProps`, `ButtonAccessibilityProps`, `InputAccessibilityProps` | Accessibility props |
|
|
1425
|
+
| `FocusState`, `FocusTrap<T>`, `FocusManager<T>`, `FocusableElement` | Focus types |
|
|
1426
|
+
| `ScreenReaderAnnouncement`, `LiveRegion<T>`, `VisuallyHiddenProps` | Screen reader |
|
|
1427
|
+
| `KeyboardNavigation<T>`, `KeyHandler<T>`, `KeyBinding`, `KeyCode` | Keyboard navigation |
|
|
1428
|
+
| `ContrastRatio`, `WCAGLevel`, `ColorContrast<T>`, `ColorContrastResult` | Color contrast |
|
|
1429
|
+
| `MotionPreference`, `AnimationOptions<T>`, `MotionSafeAnimation<T>` | Motion sensitivity |
|
|
1430
|
+
| `AccessibilityNode<T>`, `AccessibilityTree<T>` | Accessibility tree |
|
|
1431
|
+
| `AccessibilityViolation`, `AccessibilityCheckResult`, `WCAGCriterion` | Accessibility check |
|
|
1432
|
+
| `FormFieldAccessibility`, `LandmarkType`, `AltText`, `AccessibleName` | Form & landmarks |
|
|
1433
|
+
|
|
1434
|
+
### Final Polish *(v1.10.0)*
|
|
1435
|
+
|
|
1436
|
+
| Type | Description |
|
|
1437
|
+
|------|-------------|
|
|
1438
|
+
| `Optimize<T>`, `OptimizeDeep<T>`, `OptimizeFor<T, Target>` | Type optimization |
|
|
1439
|
+
| `SimplifyAll<T>`, `FlattenAll<T>`, `NormalizeAll<T>`, `CleanAll<T>` | Simplification |
|
|
1440
|
+
| `Deduplicate<T>`, `RemoveDuplicates<T>`, `Unique<T, S>` | Deduplication |
|
|
1441
|
+
| `Minify<T>`, `Shorten<T>`, `Compact<T>`, `CompactDeep<T>` | Minification |
|
|
1442
|
+
| `DebugType<T>`, `ExplainType<T>`, `PrettyType<T>`, `ShowType<T>` | Debugging |
|
|
1443
|
+
| `TypeInfo<T>`, `TypeStructure<T>`, `TypePath<T, P>`, `TypeAtPath<T, P>` | Type analysis |
|
|
1444
|
+
| `ValidateAll<T, S>`, `CheckAll<T, C>`, `VerifyAll<T, S>`, `TestAll<T, P>` | Validation |
|
|
1445
|
+
| `Document<T, M>`, `Describe<T, D>`, `Example<T, E>`, `Annotate<T, A>` | Documentation |
|
|
1446
|
+
| `Finalize<T>`, `Freeze<T>`, `Lock<T>`, `Seal<T>`, `Immutable<T>` | Finalization |
|
|
1447
|
+
| `IsAny<T>`, `IsNever<T>`, `IsUnknown<T>`, `IsNullable<T>` | Type checks |
|
|
1448
|
+
| `IsArray<T>`, `IsObject<T>`, `IsFunction<T>`, `IsPrimitive<T>` | Type guards |
|
|
1449
|
+
| `IsUnion<T>`, `IsIntersection<T>`, `IsOptional<T, K>`, `IsReadonly<T, K>` | Type utilities |
|
|
1450
|
+
| `Equals<T, U>`, `Extends<T, U>`, `HasKey<T, K>`, `HasKeys<T, K>` | Type comparisons |
|
|
1451
|
+
|
|
1301
1452
|
## Examples
|
|
1302
1453
|
|
|
1303
1454
|
```typescript
|
package/dist/index.cjs
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/accessibility/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* WCAG touch target requirements
|
|
6
|
+
*/
|
|
7
|
+
const WCAGTouchTargetRequirements = {
|
|
8
|
+
minWidth: 44,
|
|
9
|
+
minHeight: 44,
|
|
10
|
+
minSpacing: 0
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
exports.WCAGTouchTargetRequirements = WCAGTouchTargetRequirements;
|