@sc4rfurryx/proteusjs 1.0.0 → 1.1.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/LICENSE +1 -1
- package/README.md +331 -77
- package/dist/.tsbuildinfo +1 -1
- package/dist/adapters/react.d.ts +140 -0
- package/dist/adapters/react.esm.js +849 -0
- package/dist/adapters/react.esm.js.map +1 -0
- package/dist/adapters/svelte.d.ts +181 -0
- package/dist/adapters/svelte.esm.js +909 -0
- package/dist/adapters/svelte.esm.js.map +1 -0
- package/dist/adapters/vue.d.ts +205 -0
- package/dist/adapters/vue.esm.js +873 -0
- package/dist/adapters/vue.esm.js.map +1 -0
- package/dist/modules/a11y-audit.d.ts +31 -0
- package/dist/modules/a11y-audit.esm.js +64 -0
- package/dist/modules/a11y-audit.esm.js.map +1 -0
- package/dist/modules/a11y-primitives.d.ts +36 -0
- package/dist/modules/a11y-primitives.esm.js +114 -0
- package/dist/modules/a11y-primitives.esm.js.map +1 -0
- package/dist/modules/anchor.d.ts +30 -0
- package/dist/modules/anchor.esm.js +219 -0
- package/dist/modules/anchor.esm.js.map +1 -0
- package/dist/modules/container.d.ts +60 -0
- package/dist/modules/container.esm.js +194 -0
- package/dist/modules/container.esm.js.map +1 -0
- package/dist/modules/perf.d.ts +82 -0
- package/dist/modules/perf.esm.js +257 -0
- package/dist/modules/perf.esm.js.map +1 -0
- package/dist/modules/popover.d.ts +33 -0
- package/dist/modules/popover.esm.js +191 -0
- package/dist/modules/popover.esm.js.map +1 -0
- package/dist/modules/scroll.d.ts +43 -0
- package/dist/modules/scroll.esm.js +195 -0
- package/dist/modules/scroll.esm.js.map +1 -0
- package/dist/modules/transitions.d.ts +35 -0
- package/dist/modules/transitions.esm.js +120 -0
- package/dist/modules/transitions.esm.js.map +1 -0
- package/dist/modules/typography.d.ts +72 -0
- package/dist/modules/typography.esm.js +168 -0
- package/dist/modules/typography.esm.js.map +1 -0
- package/dist/proteus.cjs.js +1554 -12
- package/dist/proteus.cjs.js.map +1 -1
- package/dist/proteus.d.ts +516 -12
- package/dist/proteus.esm.js +1545 -12
- package/dist/proteus.esm.js.map +1 -1
- package/dist/proteus.esm.min.js +3 -3
- package/dist/proteus.esm.min.js.map +1 -1
- package/dist/proteus.js +1554 -12
- package/dist/proteus.js.map +1 -1
- package/dist/proteus.min.js +3 -3
- package/dist/proteus.min.js.map +1 -1
- package/package.json +69 -7
- package/src/adapters/react.ts +264 -0
- package/src/adapters/svelte.ts +321 -0
- package/src/adapters/vue.ts +268 -0
- package/src/index.ts +33 -6
- package/src/modules/a11y-audit/index.ts +84 -0
- package/src/modules/a11y-primitives/index.ts +152 -0
- package/src/modules/anchor/index.ts +259 -0
- package/src/modules/container/index.ts +230 -0
- package/src/modules/perf/index.ts +291 -0
- package/src/modules/popover/index.ts +238 -0
- package/src/modules/scroll/index.ts +251 -0
- package/src/modules/transitions/index.ts +145 -0
- package/src/modules/typography/index.ts +239 -0
- package/src/utils/version.ts +1 -1
package/dist/proteus.d.ts
CHANGED
@@ -312,7 +312,7 @@ interface SupportInfo {
|
|
312
312
|
/**
|
313
313
|
* Check if the current environment supports ProteusJS features
|
314
314
|
*/
|
315
|
-
declare function isSupported(): boolean;
|
315
|
+
declare function isSupported$1(): boolean;
|
316
316
|
|
317
317
|
/**
|
318
318
|
* Core type definitions for ProteusJS
|
@@ -588,7 +588,7 @@ interface ContainerState {
|
|
588
588
|
activeBreakpoints: string[];
|
589
589
|
lastUpdate: number;
|
590
590
|
}
|
591
|
-
interface ContainerOptions {
|
591
|
+
interface ContainerOptions$1 {
|
592
592
|
breakpoints?: BreakpointConfig$1;
|
593
593
|
containerType?: 'inline-size' | 'size' | 'block-size' | 'auto';
|
594
594
|
debounceMs?: number;
|
@@ -610,7 +610,7 @@ declare class SmartContainer {
|
|
610
610
|
private debouncedUpdate;
|
611
611
|
private isActive;
|
612
612
|
private liveRegion;
|
613
|
-
constructor(element: Element, options: ContainerOptions | undefined, observerManager: ObserverManager, memoryManager: MemoryManager);
|
613
|
+
constructor(element: Element, options: ContainerOptions$1 | undefined, observerManager: ObserverManager, memoryManager: MemoryManager);
|
614
614
|
/**
|
615
615
|
* Start observing the container
|
616
616
|
*/
|
@@ -1047,7 +1047,7 @@ declare class ContainerManager {
|
|
1047
1047
|
/**
|
1048
1048
|
* Create and manage a container
|
1049
1049
|
*/
|
1050
|
-
container(selector: string | Element | Element[], options?: ContainerOptions): SmartContainer | SmartContainer[];
|
1050
|
+
container(selector: string | Element | Element[], options?: ContainerOptions$1): SmartContainer | SmartContainer[];
|
1051
1051
|
/**
|
1052
1052
|
* Remove container management from element(s)
|
1053
1053
|
*/
|
@@ -2862,7 +2862,7 @@ declare class ProteusJS {
|
|
2862
2862
|
/**
|
2863
2863
|
* Create a container with responsive behavior
|
2864
2864
|
*/
|
2865
|
-
container(selector: string | Element | Element[], options?: ContainerOptions): SmartContainer | SmartContainer[];
|
2865
|
+
container(selector: string | Element | Element[], options?: ContainerOptions$1): SmartContainer | SmartContainer[];
|
2866
2866
|
/**
|
2867
2867
|
* Create fluid typography scaling
|
2868
2868
|
*/
|
@@ -2997,22 +2997,526 @@ declare class ProteusJS {
|
|
2997
2997
|
};
|
2998
2998
|
}
|
2999
2999
|
|
3000
|
+
/**
|
3001
|
+
* @sc4rfurryx/proteusjs/transitions
|
3002
|
+
* View Transitions API wrapper with safe fallbacks
|
3003
|
+
*
|
3004
|
+
* @version 1.1.0
|
3005
|
+
* @author sc4rfurry
|
3006
|
+
* @license MIT
|
3007
|
+
*/
|
3008
|
+
interface TransitionOptions {
|
3009
|
+
name?: string;
|
3010
|
+
duration?: number;
|
3011
|
+
onBefore?: () => void;
|
3012
|
+
onAfter?: () => void;
|
3013
|
+
allowInterrupt?: boolean;
|
3014
|
+
}
|
3015
|
+
interface NavigateOptions {
|
3016
|
+
name?: string;
|
3017
|
+
prerender?: boolean;
|
3018
|
+
}
|
3019
|
+
/**
|
3020
|
+
* One API for animating DOM state changes and cross-document navigations
|
3021
|
+
* using the View Transitions API with safe fallbacks.
|
3022
|
+
*/
|
3023
|
+
declare function transition(run: () => Promise<any> | any, opts?: TransitionOptions): Promise<void>;
|
3024
|
+
/**
|
3025
|
+
* MPA-friendly navigation with view transitions when supported
|
3026
|
+
*/
|
3027
|
+
declare function navigate(url: string, opts?: NavigateOptions): Promise<void>;
|
3028
|
+
declare const _default$8: {
|
3029
|
+
transition: typeof transition;
|
3030
|
+
navigate: typeof navigate;
|
3031
|
+
};
|
3032
|
+
|
3033
|
+
type index$8_NavigateOptions = NavigateOptions;
|
3034
|
+
type index$8_TransitionOptions = TransitionOptions;
|
3035
|
+
declare const index$8_navigate: typeof navigate;
|
3036
|
+
declare const index$8_transition: typeof transition;
|
3037
|
+
declare namespace index$8 {
|
3038
|
+
export { _default$8 as default, index$8_navigate as navigate, index$8_transition as transition };
|
3039
|
+
export type { index$8_NavigateOptions as NavigateOptions, index$8_TransitionOptions as TransitionOptions };
|
3040
|
+
}
|
3041
|
+
|
3042
|
+
/**
|
3043
|
+
* @sc4rfurryx/proteusjs/scroll
|
3044
|
+
* Scroll-driven animations with CSS Scroll-Linked Animations
|
3045
|
+
*
|
3046
|
+
* @version 1.1.0
|
3047
|
+
* @author sc4rfurry
|
3048
|
+
* @license MIT
|
3049
|
+
*/
|
3050
|
+
interface ScrollAnimateOptions {
|
3051
|
+
keyframes: Keyframe[];
|
3052
|
+
range?: [string, string];
|
3053
|
+
timeline?: {
|
3054
|
+
axis?: 'block' | 'inline';
|
3055
|
+
start?: string;
|
3056
|
+
end?: string;
|
3057
|
+
};
|
3058
|
+
fallback?: 'io' | false;
|
3059
|
+
}
|
3060
|
+
/**
|
3061
|
+
* Zero-boilerplate setup for CSS Scroll-Linked Animations with fallbacks
|
3062
|
+
*/
|
3063
|
+
declare function scrollAnimate(target: Element | string, opts: ScrollAnimateOptions): void;
|
3064
|
+
/**
|
3065
|
+
* Create a scroll-triggered animation that plays once when element enters viewport
|
3066
|
+
*/
|
3067
|
+
declare function scrollTrigger(target: Element | string, keyframes: Keyframe[], options?: KeyframeAnimationOptions): void;
|
3068
|
+
/**
|
3069
|
+
* Parallax effect using scroll-driven animations
|
3070
|
+
*/
|
3071
|
+
declare function parallax(target: Element | string, speed?: number): void;
|
3072
|
+
/**
|
3073
|
+
* Cleanup function to remove scroll animations
|
3074
|
+
*/
|
3075
|
+
declare function cleanup$2(target: Element | string): void;
|
3076
|
+
declare const _default$7: {
|
3077
|
+
scrollAnimate: typeof scrollAnimate;
|
3078
|
+
scrollTrigger: typeof scrollTrigger;
|
3079
|
+
parallax: typeof parallax;
|
3080
|
+
cleanup: typeof cleanup$2;
|
3081
|
+
};
|
3082
|
+
|
3083
|
+
type index$7_ScrollAnimateOptions = ScrollAnimateOptions;
|
3084
|
+
declare const index$7_parallax: typeof parallax;
|
3085
|
+
declare const index$7_scrollAnimate: typeof scrollAnimate;
|
3086
|
+
declare const index$7_scrollTrigger: typeof scrollTrigger;
|
3087
|
+
declare namespace index$7 {
|
3088
|
+
export { cleanup$2 as cleanup, _default$7 as default, index$7_parallax as parallax, index$7_scrollAnimate as scrollAnimate, index$7_scrollTrigger as scrollTrigger };
|
3089
|
+
export type { index$7_ScrollAnimateOptions as ScrollAnimateOptions };
|
3090
|
+
}
|
3091
|
+
|
3092
|
+
/**
|
3093
|
+
* @sc4rfurryx/proteusjs/anchor
|
3094
|
+
* CSS Anchor Positioning utilities with robust JS fallback
|
3095
|
+
*
|
3096
|
+
* @version 1.1.0
|
3097
|
+
* @author sc4rfurry
|
3098
|
+
* @license MIT
|
3099
|
+
*/
|
3100
|
+
interface TetherOptions {
|
3101
|
+
anchor: Element | string;
|
3102
|
+
placement?: 'top' | 'bottom' | 'left' | 'right' | 'auto';
|
3103
|
+
align?: 'start' | 'center' | 'end';
|
3104
|
+
offset?: number;
|
3105
|
+
strategy?: 'absolute' | 'fixed';
|
3106
|
+
}
|
3107
|
+
interface TetherController {
|
3108
|
+
update(): void;
|
3109
|
+
destroy(): void;
|
3110
|
+
}
|
3111
|
+
/**
|
3112
|
+
* Declarative tethers (tooltips, callouts) via CSS Anchor Positioning when available;
|
3113
|
+
* robust JS fallback with flip/collision detection
|
3114
|
+
*/
|
3115
|
+
declare function tether(floating: Element | string, opts: TetherOptions): TetherController;
|
3116
|
+
declare const _default$6: {
|
3117
|
+
tether: typeof tether;
|
3118
|
+
};
|
3119
|
+
|
3120
|
+
type index$6_TetherController = TetherController;
|
3121
|
+
type index$6_TetherOptions = TetherOptions;
|
3122
|
+
declare const index$6_tether: typeof tether;
|
3123
|
+
declare namespace index$6 {
|
3124
|
+
export { _default$6 as default, index$6_tether as tether };
|
3125
|
+
export type { index$6_TetherController as TetherController, index$6_TetherOptions as TetherOptions };
|
3126
|
+
}
|
3127
|
+
|
3128
|
+
/**
|
3129
|
+
* @sc4rfurryx/proteusjs/popover
|
3130
|
+
* HTML Popover API wrapper with robust focus/inert handling
|
3131
|
+
*
|
3132
|
+
* @version 1.1.0
|
3133
|
+
* @author sc4rfurry
|
3134
|
+
* @license MIT
|
3135
|
+
*/
|
3136
|
+
interface PopoverOptions {
|
3137
|
+
type?: 'menu' | 'dialog' | 'tooltip';
|
3138
|
+
trapFocus?: boolean;
|
3139
|
+
restoreFocus?: boolean;
|
3140
|
+
closeOnEscape?: boolean;
|
3141
|
+
onOpen?: () => void;
|
3142
|
+
onClose?: () => void;
|
3143
|
+
}
|
3144
|
+
interface PopoverController {
|
3145
|
+
open(): void;
|
3146
|
+
close(): void;
|
3147
|
+
toggle(): void;
|
3148
|
+
destroy(): void;
|
3149
|
+
}
|
3150
|
+
/**
|
3151
|
+
* Unified API for menus, tooltips, and dialogs using the native Popover API
|
3152
|
+
* with robust focus/inert handling
|
3153
|
+
*/
|
3154
|
+
declare function attach(trigger: Element | string, panel: Element | string, opts?: PopoverOptions): PopoverController;
|
3155
|
+
declare const _default$5: {
|
3156
|
+
attach: typeof attach;
|
3157
|
+
};
|
3158
|
+
|
3159
|
+
type index$5_PopoverController = PopoverController;
|
3160
|
+
type index$5_PopoverOptions = PopoverOptions;
|
3161
|
+
declare const index$5_attach: typeof attach;
|
3162
|
+
declare namespace index$5 {
|
3163
|
+
export { index$5_attach as attach, _default$5 as default };
|
3164
|
+
export type { index$5_PopoverController as PopoverController, index$5_PopoverOptions as PopoverOptions };
|
3165
|
+
}
|
3166
|
+
|
3167
|
+
/**
|
3168
|
+
* @sc4rfurryx/proteusjs/container
|
3169
|
+
* Container/Style Query helpers with visualization devtools
|
3170
|
+
*
|
3171
|
+
* @version 1.1.0
|
3172
|
+
* @author sc4rfurry
|
3173
|
+
* @license MIT
|
3174
|
+
*/
|
3175
|
+
interface ContainerOptions {
|
3176
|
+
type?: 'size' | 'style';
|
3177
|
+
inlineSize?: boolean;
|
3178
|
+
}
|
3179
|
+
/**
|
3180
|
+
* Sugar on native container queries with dev visualization
|
3181
|
+
*/
|
3182
|
+
declare function defineContainer(target: Element | string, name?: string, opts?: ContainerOptions): void;
|
3183
|
+
/**
|
3184
|
+
* Helper to create container query CSS rules
|
3185
|
+
*/
|
3186
|
+
declare function createContainerQuery(containerName: string, condition: string, styles: Record<string, string>): string;
|
3187
|
+
/**
|
3188
|
+
* Apply container query styles dynamically
|
3189
|
+
*/
|
3190
|
+
declare function applyContainerQuery(containerName: string, condition: string, styles: Record<string, string>): void;
|
3191
|
+
/**
|
3192
|
+
* Remove container query styles
|
3193
|
+
*/
|
3194
|
+
declare function removeContainerQuery(containerName: string): void;
|
3195
|
+
/**
|
3196
|
+
* Get container size information
|
3197
|
+
*/
|
3198
|
+
declare function getContainerSize(target: Element | string): {
|
3199
|
+
width: number;
|
3200
|
+
height: number;
|
3201
|
+
};
|
3202
|
+
/**
|
3203
|
+
* Check if container queries are supported
|
3204
|
+
*/
|
3205
|
+
declare function isSupported(): boolean;
|
3206
|
+
/**
|
3207
|
+
* Cleanup container overlays and observers
|
3208
|
+
*/
|
3209
|
+
declare function cleanup$1(target: Element | string): void;
|
3210
|
+
/**
|
3211
|
+
* Toggle dev overlay visibility
|
3212
|
+
*/
|
3213
|
+
declare function toggleDevOverlay(visible?: boolean): void;
|
3214
|
+
declare const _default$4: {
|
3215
|
+
defineContainer: typeof defineContainer;
|
3216
|
+
createContainerQuery: typeof createContainerQuery;
|
3217
|
+
applyContainerQuery: typeof applyContainerQuery;
|
3218
|
+
removeContainerQuery: typeof removeContainerQuery;
|
3219
|
+
getContainerSize: typeof getContainerSize;
|
3220
|
+
isSupported: typeof isSupported;
|
3221
|
+
cleanup: typeof cleanup$1;
|
3222
|
+
toggleDevOverlay: typeof toggleDevOverlay;
|
3223
|
+
};
|
3224
|
+
|
3225
|
+
type index$4_ContainerOptions = ContainerOptions;
|
3226
|
+
declare const index$4_applyContainerQuery: typeof applyContainerQuery;
|
3227
|
+
declare const index$4_createContainerQuery: typeof createContainerQuery;
|
3228
|
+
declare const index$4_defineContainer: typeof defineContainer;
|
3229
|
+
declare const index$4_getContainerSize: typeof getContainerSize;
|
3230
|
+
declare const index$4_isSupported: typeof isSupported;
|
3231
|
+
declare const index$4_removeContainerQuery: typeof removeContainerQuery;
|
3232
|
+
declare const index$4_toggleDevOverlay: typeof toggleDevOverlay;
|
3233
|
+
declare namespace index$4 {
|
3234
|
+
export { index$4_applyContainerQuery as applyContainerQuery, cleanup$1 as cleanup, index$4_createContainerQuery as createContainerQuery, _default$4 as default, index$4_defineContainer as defineContainer, index$4_getContainerSize as getContainerSize, index$4_isSupported as isSupported, index$4_removeContainerQuery as removeContainerQuery, index$4_toggleDevOverlay as toggleDevOverlay };
|
3235
|
+
export type { index$4_ContainerOptions as ContainerOptions };
|
3236
|
+
}
|
3237
|
+
|
3238
|
+
/**
|
3239
|
+
* @sc4rfurryx/proteusjs/typography
|
3240
|
+
* Fluid typography with CSS-first approach
|
3241
|
+
*
|
3242
|
+
* @version 1.1.0
|
3243
|
+
* @author sc4rfurry
|
3244
|
+
* @license MIT
|
3245
|
+
*/
|
3246
|
+
interface FluidTypeOptions {
|
3247
|
+
minViewportPx?: number;
|
3248
|
+
maxViewportPx?: number;
|
3249
|
+
lineHeight?: number;
|
3250
|
+
containerUnits?: boolean;
|
3251
|
+
}
|
3252
|
+
interface FluidTypeResult {
|
3253
|
+
css: string;
|
3254
|
+
}
|
3255
|
+
/**
|
3256
|
+
* Generate pure-CSS clamp() rules for fluid typography
|
3257
|
+
*/
|
3258
|
+
declare function fluidType(minRem: number, maxRem: number, options?: FluidTypeOptions): FluidTypeResult;
|
3259
|
+
/**
|
3260
|
+
* Apply fluid typography to elements
|
3261
|
+
*/
|
3262
|
+
declare function applyFluidType(selector: string, minRem: number, maxRem: number, options?: FluidTypeOptions): void;
|
3263
|
+
/**
|
3264
|
+
* Create a complete typographic scale
|
3265
|
+
*/
|
3266
|
+
declare function createTypographicScale(baseSize?: number, ratio?: number, steps?: number, options?: FluidTypeOptions): Record<string, FluidTypeResult>;
|
3267
|
+
/**
|
3268
|
+
* Generate CSS custom properties for a typographic scale
|
3269
|
+
*/
|
3270
|
+
declare function generateScaleCSS(scale: Record<string, FluidTypeResult>, prefix?: string): string;
|
3271
|
+
/**
|
3272
|
+
* Optimize line height for readability
|
3273
|
+
*/
|
3274
|
+
declare function optimizeLineHeight(fontSize: number, measure?: number): number;
|
3275
|
+
/**
|
3276
|
+
* Calculate optimal font size for container width
|
3277
|
+
*/
|
3278
|
+
declare function calculateOptimalSize(containerWidth: number, targetCharacters?: number, baseCharWidth?: number): number;
|
3279
|
+
/**
|
3280
|
+
* Apply responsive typography to an element
|
3281
|
+
*/
|
3282
|
+
declare function makeResponsive(target: Element | string, options?: {
|
3283
|
+
minSize?: number;
|
3284
|
+
maxSize?: number;
|
3285
|
+
targetCharacters?: number;
|
3286
|
+
autoLineHeight?: boolean;
|
3287
|
+
}): void;
|
3288
|
+
/**
|
3289
|
+
* Remove applied typography styles
|
3290
|
+
*/
|
3291
|
+
declare function cleanup(target?: Element | string): void;
|
3292
|
+
/**
|
3293
|
+
* Check if container query units are supported
|
3294
|
+
*/
|
3295
|
+
declare function supportsContainerUnits(): boolean;
|
3296
|
+
declare const _default$3: {
|
3297
|
+
fluidType: typeof fluidType;
|
3298
|
+
applyFluidType: typeof applyFluidType;
|
3299
|
+
createTypographicScale: typeof createTypographicScale;
|
3300
|
+
generateScaleCSS: typeof generateScaleCSS;
|
3301
|
+
optimizeLineHeight: typeof optimizeLineHeight;
|
3302
|
+
calculateOptimalSize: typeof calculateOptimalSize;
|
3303
|
+
makeResponsive: typeof makeResponsive;
|
3304
|
+
cleanup: typeof cleanup;
|
3305
|
+
supportsContainerUnits: typeof supportsContainerUnits;
|
3306
|
+
};
|
3307
|
+
|
3308
|
+
type index$3_FluidTypeOptions = FluidTypeOptions;
|
3309
|
+
type index$3_FluidTypeResult = FluidTypeResult;
|
3310
|
+
declare const index$3_applyFluidType: typeof applyFluidType;
|
3311
|
+
declare const index$3_calculateOptimalSize: typeof calculateOptimalSize;
|
3312
|
+
declare const index$3_cleanup: typeof cleanup;
|
3313
|
+
declare const index$3_createTypographicScale: typeof createTypographicScale;
|
3314
|
+
declare const index$3_fluidType: typeof fluidType;
|
3315
|
+
declare const index$3_generateScaleCSS: typeof generateScaleCSS;
|
3316
|
+
declare const index$3_makeResponsive: typeof makeResponsive;
|
3317
|
+
declare const index$3_optimizeLineHeight: typeof optimizeLineHeight;
|
3318
|
+
declare const index$3_supportsContainerUnits: typeof supportsContainerUnits;
|
3319
|
+
declare namespace index$3 {
|
3320
|
+
export { index$3_applyFluidType as applyFluidType, index$3_calculateOptimalSize as calculateOptimalSize, index$3_cleanup as cleanup, index$3_createTypographicScale as createTypographicScale, _default$3 as default, index$3_fluidType as fluidType, index$3_generateScaleCSS as generateScaleCSS, index$3_makeResponsive as makeResponsive, index$3_optimizeLineHeight as optimizeLineHeight, index$3_supportsContainerUnits as supportsContainerUnits };
|
3321
|
+
export type { index$3_FluidTypeOptions as FluidTypeOptions, index$3_FluidTypeResult as FluidTypeResult };
|
3322
|
+
}
|
3323
|
+
|
3324
|
+
/**
|
3325
|
+
* @sc4rfurryx/proteusjs/a11y-audit
|
3326
|
+
* Lightweight accessibility audits for development
|
3327
|
+
*
|
3328
|
+
* @version 1.1.0
|
3329
|
+
* @author sc4rfurry
|
3330
|
+
* @license MIT
|
3331
|
+
*/
|
3332
|
+
interface AuditOptions {
|
3333
|
+
rules?: string[];
|
3334
|
+
format?: 'console' | 'json';
|
3335
|
+
}
|
3336
|
+
interface AuditViolation {
|
3337
|
+
id: string;
|
3338
|
+
impact: 'minor' | 'moderate' | 'serious' | 'critical';
|
3339
|
+
nodes: number;
|
3340
|
+
help: string;
|
3341
|
+
}
|
3342
|
+
interface AuditReport {
|
3343
|
+
violations: AuditViolation[];
|
3344
|
+
passes: number;
|
3345
|
+
timestamp: number;
|
3346
|
+
url: string;
|
3347
|
+
}
|
3348
|
+
declare function audit(target?: Document | Element, options?: AuditOptions): Promise<AuditReport>;
|
3349
|
+
declare const _default$2: {
|
3350
|
+
audit: typeof audit;
|
3351
|
+
};
|
3352
|
+
|
3353
|
+
type index$2_AuditOptions = AuditOptions;
|
3354
|
+
type index$2_AuditReport = AuditReport;
|
3355
|
+
type index$2_AuditViolation = AuditViolation;
|
3356
|
+
declare const index$2_audit: typeof audit;
|
3357
|
+
declare namespace index$2 {
|
3358
|
+
export { index$2_audit as audit, _default$2 as default };
|
3359
|
+
export type { index$2_AuditOptions as AuditOptions, index$2_AuditReport as AuditReport, index$2_AuditViolation as AuditViolation };
|
3360
|
+
}
|
3361
|
+
|
3362
|
+
/**
|
3363
|
+
* @sc4rfurryx/proteusjs/a11y-primitives
|
3364
|
+
* Lightweight accessibility patterns
|
3365
|
+
*
|
3366
|
+
* @version 1.1.0
|
3367
|
+
* @author sc4rfurry
|
3368
|
+
* @license MIT
|
3369
|
+
*/
|
3370
|
+
interface Controller {
|
3371
|
+
destroy(): void;
|
3372
|
+
}
|
3373
|
+
interface DialogOptions {
|
3374
|
+
modal?: boolean;
|
3375
|
+
restoreFocus?: boolean;
|
3376
|
+
}
|
3377
|
+
interface TooltipOptions {
|
3378
|
+
delay?: number;
|
3379
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
3380
|
+
}
|
3381
|
+
interface FocusTrapController {
|
3382
|
+
activate(): void;
|
3383
|
+
deactivate(): void;
|
3384
|
+
}
|
3385
|
+
declare function dialog(root: Element | string, opts?: DialogOptions): Controller;
|
3386
|
+
declare function tooltip(trigger: Element, content: Element, opts?: TooltipOptions): Controller;
|
3387
|
+
declare function focusTrap(container: Element): FocusTrapController;
|
3388
|
+
declare function menu(container: Element): Controller;
|
3389
|
+
declare const _default$1: {
|
3390
|
+
dialog: typeof dialog;
|
3391
|
+
tooltip: typeof tooltip;
|
3392
|
+
focusTrap: typeof focusTrap;
|
3393
|
+
menu: typeof menu;
|
3394
|
+
};
|
3395
|
+
|
3396
|
+
type index$1_Controller = Controller;
|
3397
|
+
type index$1_DialogOptions = DialogOptions;
|
3398
|
+
type index$1_FocusTrapController = FocusTrapController;
|
3399
|
+
type index$1_TooltipOptions = TooltipOptions;
|
3400
|
+
declare const index$1_dialog: typeof dialog;
|
3401
|
+
declare const index$1_focusTrap: typeof focusTrap;
|
3402
|
+
declare const index$1_menu: typeof menu;
|
3403
|
+
declare const index$1_tooltip: typeof tooltip;
|
3404
|
+
declare namespace index$1 {
|
3405
|
+
export { _default$1 as default, index$1_dialog as dialog, index$1_focusTrap as focusTrap, index$1_menu as menu, index$1_tooltip as tooltip };
|
3406
|
+
export type { index$1_Controller as Controller, index$1_DialogOptions as DialogOptions, index$1_FocusTrapController as FocusTrapController, index$1_TooltipOptions as TooltipOptions };
|
3407
|
+
}
|
3408
|
+
|
3409
|
+
/**
|
3410
|
+
* @sc4rfurryx/proteusjs/perf
|
3411
|
+
* Performance guardrails and CWV-friendly patterns
|
3412
|
+
*
|
3413
|
+
* @version 1.1.0
|
3414
|
+
* @author sc4rfurry
|
3415
|
+
* @license MIT
|
3416
|
+
*/
|
3417
|
+
interface SpeculationOptions {
|
3418
|
+
prerender?: string[];
|
3419
|
+
prefetch?: string[];
|
3420
|
+
sameOriginOnly?: boolean;
|
3421
|
+
}
|
3422
|
+
interface ContentVisibilityOptions {
|
3423
|
+
containIntrinsicSize?: string;
|
3424
|
+
}
|
3425
|
+
/**
|
3426
|
+
* Apply content-visibility for performance optimization
|
3427
|
+
*/
|
3428
|
+
declare function contentVisibility(selector: string | Element, mode?: 'auto' | 'hidden', opts?: ContentVisibilityOptions): void;
|
3429
|
+
/**
|
3430
|
+
* Set fetch priority for resources
|
3431
|
+
*/
|
3432
|
+
declare function fetchPriority(selector: string | Element, priority: 'high' | 'low' | 'auto'): void;
|
3433
|
+
/**
|
3434
|
+
* Set up speculation rules for prerendering and prefetching
|
3435
|
+
*/
|
3436
|
+
declare function speculate(opts: SpeculationOptions): void;
|
3437
|
+
/**
|
3438
|
+
* Yield to browser using scheduler.yield or postTask when available
|
3439
|
+
*/
|
3440
|
+
declare function yieldToBrowser(): Promise<void>;
|
3441
|
+
/**
|
3442
|
+
* Optimize images with loading and decoding hints
|
3443
|
+
*/
|
3444
|
+
declare function optimizeImages(selector?: string | Element): void;
|
3445
|
+
/**
|
3446
|
+
* Preload critical resources
|
3447
|
+
*/
|
3448
|
+
declare function preloadCritical(resources: Array<{
|
3449
|
+
href: string;
|
3450
|
+
as: string;
|
3451
|
+
type?: string;
|
3452
|
+
}>): void;
|
3453
|
+
/**
|
3454
|
+
* Measure and report Core Web Vitals
|
3455
|
+
*/
|
3456
|
+
declare function measureCWV(): Promise<{
|
3457
|
+
lcp?: number;
|
3458
|
+
fid?: number;
|
3459
|
+
cls?: number;
|
3460
|
+
}>;
|
3461
|
+
declare const boost: {
|
3462
|
+
contentVisibility: typeof contentVisibility;
|
3463
|
+
fetchPriority: typeof fetchPriority;
|
3464
|
+
speculate: typeof speculate;
|
3465
|
+
yieldToBrowser: typeof yieldToBrowser;
|
3466
|
+
optimizeImages: typeof optimizeImages;
|
3467
|
+
preloadCritical: typeof preloadCritical;
|
3468
|
+
measureCWV: typeof measureCWV;
|
3469
|
+
};
|
3470
|
+
declare const _default: {
|
3471
|
+
contentVisibility: typeof contentVisibility;
|
3472
|
+
fetchPriority: typeof fetchPriority;
|
3473
|
+
speculate: typeof speculate;
|
3474
|
+
yieldToBrowser: typeof yieldToBrowser;
|
3475
|
+
optimizeImages: typeof optimizeImages;
|
3476
|
+
preloadCritical: typeof preloadCritical;
|
3477
|
+
measureCWV: typeof measureCWV;
|
3478
|
+
boost: {
|
3479
|
+
contentVisibility: typeof contentVisibility;
|
3480
|
+
fetchPriority: typeof fetchPriority;
|
3481
|
+
speculate: typeof speculate;
|
3482
|
+
yieldToBrowser: typeof yieldToBrowser;
|
3483
|
+
optimizeImages: typeof optimizeImages;
|
3484
|
+
preloadCritical: typeof preloadCritical;
|
3485
|
+
measureCWV: typeof measureCWV;
|
3486
|
+
};
|
3487
|
+
};
|
3488
|
+
|
3489
|
+
type index_ContentVisibilityOptions = ContentVisibilityOptions;
|
3490
|
+
type index_SpeculationOptions = SpeculationOptions;
|
3491
|
+
declare const index_boost: typeof boost;
|
3492
|
+
declare const index_contentVisibility: typeof contentVisibility;
|
3493
|
+
declare const index_fetchPriority: typeof fetchPriority;
|
3494
|
+
declare const index_measureCWV: typeof measureCWV;
|
3495
|
+
declare const index_optimizeImages: typeof optimizeImages;
|
3496
|
+
declare const index_preloadCritical: typeof preloadCritical;
|
3497
|
+
declare const index_speculate: typeof speculate;
|
3498
|
+
declare const index_yieldToBrowser: typeof yieldToBrowser;
|
3499
|
+
declare namespace index {
|
3500
|
+
export { index_boost as boost, index_contentVisibility as contentVisibility, _default as default, index_fetchPriority as fetchPriority, index_measureCWV as measureCWV, index_optimizeImages as optimizeImages, index_preloadCritical as preloadCritical, index_speculate as speculate, index_yieldToBrowser as yieldToBrowser };
|
3501
|
+
export type { index_ContentVisibilityOptions as ContentVisibilityOptions, index_SpeculationOptions as SpeculationOptions };
|
3502
|
+
}
|
3503
|
+
|
3000
3504
|
/**
|
3001
3505
|
* Version utilities for ProteusJS
|
3002
3506
|
*/
|
3003
|
-
declare const version = "1.
|
3507
|
+
declare const version = "1.1.0";
|
3004
3508
|
|
3005
3509
|
/**
|
3006
|
-
* ProteusJS -
|
3510
|
+
* ProteusJS - Native-first Web Development Primitives
|
3007
3511
|
* Shape-shifting responsive design that adapts like the sea god himself
|
3008
3512
|
*
|
3009
|
-
* @version 1.
|
3010
|
-
* @author
|
3513
|
+
* @version 1.1.0
|
3514
|
+
* @author sc4rfurry
|
3011
3515
|
* @license MIT
|
3012
3516
|
*/
|
3013
3517
|
|
3014
|
-
declare const VERSION = "1.
|
3518
|
+
declare const VERSION = "1.1.0";
|
3015
3519
|
declare const LIBRARY_NAME = "ProteusJS";
|
3016
3520
|
|
3017
|
-
export { LIBRARY_NAME, ProteusJS, VERSION, ProteusJS as default, isSupported, version };
|
3018
|
-
export type { AccessibilityConfig$1 as AccessibilityConfig, AnimationConfig, BreakpointConfig$1 as BreakpointConfig, ContainerConfig, LayoutConfig, PerformanceConfig, ProteusConfig, ProteusPlugin, TypographyConfig };
|
3521
|
+
export { LIBRARY_NAME, ProteusJS, VERSION, index$2 as a11yAudit, index$1 as a11yPrimitives, index$6 as anchor, index$4 as container, ProteusJS as default, isSupported$1 as isSupported, index as perf, index$5 as popover, index$7 as scroll, index$8 as transitions, index$3 as typography, version };
|
3522
|
+
export type { AccessibilityConfig$1 as AccessibilityConfig, AnimationConfig, AuditOptions, AuditReport, AuditViolation, BreakpointConfig$1 as BreakpointConfig, ContainerConfig, ContainerOptions, ContentVisibilityOptions, Controller, DialogOptions, FluidTypeOptions, FluidTypeResult, FocusTrapController, LayoutConfig, NavigateOptions, PerformanceConfig, PopoverController, PopoverOptions, ProteusConfig, ProteusPlugin, ScrollAnimateOptions, SpeculationOptions, TetherController, TetherOptions, TooltipOptions, TransitionOptions, TypographyConfig };
|