@scaloster_971/scaleadjus 1.0.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/LICENSE +0 -0
- package/README.md +215 -0
- package/dist/adapters/angular.d.ts +19 -0
- package/dist/adapters/angular.d.ts.map +1 -0
- package/dist/adapters/react.d.ts +11 -0
- package/dist/adapters/react.d.ts.map +1 -0
- package/dist/adapters/vanilla.d.ts +3 -0
- package/dist/adapters/vanilla.d.ts.map +1 -0
- package/dist/adapters/vue.d.ts +11 -0
- package/dist/adapters/vue.d.ts.map +1 -0
- package/dist/angular.js +535 -0
- package/dist/angular.js.map +1 -0
- package/dist/angular.mjs +533 -0
- package/dist/angular.mjs.map +1 -0
- package/dist/core/ScaleAdjus.d.ts +42 -0
- package/dist/core/ScaleAdjus.d.ts.map +1 -0
- package/dist/core/constants.d.ts +47 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/types.d.ts +80 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +590 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +2 -0
- package/dist/index.min.js.map +1 -0
- package/dist/index.mjs +582 -0
- package/dist/index.mjs.map +1 -0
- package/dist/index.umd.js +596 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/plugins/css.d.ts +3 -0
- package/dist/plugins/css.d.ts.map +1 -0
- package/dist/plugins/tailwind.d.ts +3 -0
- package/dist/plugins/tailwind.d.ts.map +1 -0
- package/dist/react.js +454 -0
- package/dist/react.js.map +1 -0
- package/dist/react.mjs +452 -0
- package/dist/react.mjs.map +1 -0
- package/dist/styles.css +1 -0
- package/dist/utils/debounce.d.ts +3 -0
- package/dist/utils/debounce.d.ts.map +1 -0
- package/dist/utils/device.d.ts +12 -0
- package/dist/utils/device.d.ts.map +1 -0
- package/dist/utils/dom.d.ts +13 -0
- package/dist/utils/dom.d.ts.map +1 -0
- package/dist/utils/events.d.ts +12 -0
- package/dist/utils/events.d.ts.map +1 -0
- package/dist/vue.js +452 -0
- package/dist/vue.js.map +1 -0
- package/dist/vue.mjs +450 -0
- package/dist/vue.mjs.map +1 -0
- package/package.json +116 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
const DEFAULT_OPTIONS = {
|
|
2
|
+
baseScale: 1,
|
|
3
|
+
minScale: 0.5,
|
|
4
|
+
maxScale: 1.5,
|
|
5
|
+
enableMobile: true,
|
|
6
|
+
enableTablet: true,
|
|
7
|
+
enableDesktop: true,
|
|
8
|
+
enableLargeMonitor: true,
|
|
9
|
+
smoothTransition: true,
|
|
10
|
+
transitionDuration: 300,
|
|
11
|
+
debug: false,
|
|
12
|
+
autoInit: true,
|
|
13
|
+
breakpoints: {
|
|
14
|
+
mobile: 768,
|
|
15
|
+
tablet: 1024,
|
|
16
|
+
desktop: 1200,
|
|
17
|
+
largeMonitor: 1600,
|
|
18
|
+
},
|
|
19
|
+
scaleFactors: {
|
|
20
|
+
mobile: 0.8,
|
|
21
|
+
tablet: 0.9,
|
|
22
|
+
desktop: 1,
|
|
23
|
+
largeMonitor: 1.1,
|
|
24
|
+
},
|
|
25
|
+
excludeSelectors: [],
|
|
26
|
+
includeSelectors: ['*'],
|
|
27
|
+
customCSS: '',
|
|
28
|
+
};
|
|
29
|
+
const CSS_PREFIX = 'sa';
|
|
30
|
+
const EVENTS = {
|
|
31
|
+
INIT: 'scaleadjus:init',
|
|
32
|
+
SCALE: 'scaleadjus:scale',
|
|
33
|
+
RESET: 'scaleadjus:reset',
|
|
34
|
+
DESTROY: 'scaleadjus:destroy',
|
|
35
|
+
UPDATE: 'scaleadjus:update',
|
|
36
|
+
DEVICE_CHANGE: 'scaleadjus:device-change'};
|
|
37
|
+
const TRANSFORM_ORIGIN = 'top left';
|
|
38
|
+
|
|
39
|
+
function debounce(func, wait) {
|
|
40
|
+
let timeout = null;
|
|
41
|
+
return function executedFunction(...args) {
|
|
42
|
+
const later = () => {
|
|
43
|
+
timeout = null;
|
|
44
|
+
func(...args);
|
|
45
|
+
};
|
|
46
|
+
if (timeout)
|
|
47
|
+
clearTimeout(timeout);
|
|
48
|
+
timeout = setTimeout(later, wait);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function throttle(func, limit) {
|
|
52
|
+
let inThrottle = false;
|
|
53
|
+
return function executedFunction(...args) {
|
|
54
|
+
if (!inThrottle) {
|
|
55
|
+
func(...args);
|
|
56
|
+
inThrottle = true;
|
|
57
|
+
setTimeout(() => {
|
|
58
|
+
inThrottle = false;
|
|
59
|
+
}, limit);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function getDeviceType(width, breakpoints = DEFAULT_OPTIONS.breakpoints) {
|
|
65
|
+
if (width <= breakpoints.mobile)
|
|
66
|
+
return 'mobile';
|
|
67
|
+
if (width <= breakpoints.tablet)
|
|
68
|
+
return 'tablet';
|
|
69
|
+
if (breakpoints.largeMonitor && width <= breakpoints.largeMonitor)
|
|
70
|
+
return 'desktop';
|
|
71
|
+
if (breakpoints.largeMonitor && width > breakpoints.largeMonitor)
|
|
72
|
+
return 'large-monitor';
|
|
73
|
+
return 'desktop';
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
class EventEmitter {
|
|
77
|
+
constructor() {
|
|
78
|
+
this.events = new Map();
|
|
79
|
+
}
|
|
80
|
+
on(event, callback) {
|
|
81
|
+
if (!this.events.has(event)) {
|
|
82
|
+
this.events.set(event, []);
|
|
83
|
+
}
|
|
84
|
+
this.events.get(event)?.push(callback);
|
|
85
|
+
}
|
|
86
|
+
off(event, callback) {
|
|
87
|
+
if (!this.events.has(event))
|
|
88
|
+
return;
|
|
89
|
+
const callbacks = this.events.get(event) || [];
|
|
90
|
+
const index = callbacks.indexOf(callback);
|
|
91
|
+
if (index !== -1) {
|
|
92
|
+
callbacks.splice(index, 1);
|
|
93
|
+
}
|
|
94
|
+
if (callbacks.length === 0) {
|
|
95
|
+
this.events.delete(event);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
emit(event, data) {
|
|
99
|
+
const callbacks = this.events.get(event) || [];
|
|
100
|
+
callbacks.forEach(callback => {
|
|
101
|
+
try {
|
|
102
|
+
callback(data);
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
console.error(`Error in event handler for ${event}:`, error);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
removeAllListeners() {
|
|
110
|
+
this.events.clear();
|
|
111
|
+
}
|
|
112
|
+
listenerCount(event) {
|
|
113
|
+
return this.events.get(event)?.length || 0;
|
|
114
|
+
}
|
|
115
|
+
eventNames() {
|
|
116
|
+
return Array.from(this.events.keys());
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
class ScaleAdjus {
|
|
121
|
+
constructor(options = {}) {
|
|
122
|
+
this.initialized = false;
|
|
123
|
+
this.styleElement = null;
|
|
124
|
+
this.resizeObserver = null;
|
|
125
|
+
this.mutationObserver = null;
|
|
126
|
+
this.cleanupFunctions = [];
|
|
127
|
+
this.options = { ...DEFAULT_OPTIONS, ...options };
|
|
128
|
+
this.currentScale = this.options.baseScale || 1;
|
|
129
|
+
this.deviceInfo = this.getDeviceInfo();
|
|
130
|
+
this.eventEmitter = new EventEmitter();
|
|
131
|
+
if (this.options.autoInit) {
|
|
132
|
+
this.init();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
init() {
|
|
136
|
+
if (this.initialized)
|
|
137
|
+
return;
|
|
138
|
+
this.injectStyles();
|
|
139
|
+
this.applyScale();
|
|
140
|
+
this.setupResizeListener();
|
|
141
|
+
this.setupMutationObserver();
|
|
142
|
+
this.setupDeviceChangeListener();
|
|
143
|
+
this.initialized = true;
|
|
144
|
+
this.emitEvent(EVENTS.INIT, this.createEventData());
|
|
145
|
+
}
|
|
146
|
+
destroy() {
|
|
147
|
+
if (!this.initialized)
|
|
148
|
+
return;
|
|
149
|
+
this.removeInjectedStyles();
|
|
150
|
+
this.removeEventListeners();
|
|
151
|
+
this.resetAllElements();
|
|
152
|
+
this.initialized = false;
|
|
153
|
+
this.emitEvent(EVENTS.DESTROY, this.createEventData());
|
|
154
|
+
this.eventEmitter.removeAllListeners();
|
|
155
|
+
}
|
|
156
|
+
setScale(scale) {
|
|
157
|
+
const clampedScale = this.clampScale(scale);
|
|
158
|
+
this.currentScale = clampedScale;
|
|
159
|
+
this.applyScale();
|
|
160
|
+
this.emitEvent(EVENTS.SCALE, this.createEventData());
|
|
161
|
+
}
|
|
162
|
+
resetScale() {
|
|
163
|
+
this.currentScale = this.options.baseScale || 1;
|
|
164
|
+
this.applyScale();
|
|
165
|
+
this.emitEvent(EVENTS.RESET, this.createEventData());
|
|
166
|
+
}
|
|
167
|
+
updateOptions(options) {
|
|
168
|
+
this.options = { ...this.options, ...options };
|
|
169
|
+
this.deviceInfo = this.getDeviceInfo();
|
|
170
|
+
this.applyScale();
|
|
171
|
+
this.emitEvent(EVENTS.UPDATE, this.createEventData());
|
|
172
|
+
}
|
|
173
|
+
getCurrentScale() {
|
|
174
|
+
return this.currentScale;
|
|
175
|
+
}
|
|
176
|
+
getDeviceInfo() {
|
|
177
|
+
const width = window.innerWidth;
|
|
178
|
+
const height = window.innerHeight;
|
|
179
|
+
const deviceType = getDeviceType(width, this.options.breakpoints);
|
|
180
|
+
const scale = this.calculateScale(width);
|
|
181
|
+
return {
|
|
182
|
+
type: deviceType,
|
|
183
|
+
width,
|
|
184
|
+
height,
|
|
185
|
+
scale,
|
|
186
|
+
isMobile: deviceType === 'mobile',
|
|
187
|
+
isTablet: deviceType === 'tablet',
|
|
188
|
+
isDesktop: deviceType === 'desktop',
|
|
189
|
+
isLargeMonitor: deviceType === 'large-monitor',
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
getElementScale(element) {
|
|
193
|
+
const computedStyle = getComputedStyle(element);
|
|
194
|
+
const transform = computedStyle.transform;
|
|
195
|
+
if (transform && transform !== 'none') {
|
|
196
|
+
const match = transform.match(/scale\(([^)]+)\)/);
|
|
197
|
+
if (match) {
|
|
198
|
+
return parseFloat(match[1]);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return this.currentScale;
|
|
202
|
+
}
|
|
203
|
+
setElementScale(element, scale) {
|
|
204
|
+
const clampedScale = this.clampScale(scale);
|
|
205
|
+
element.style.transform = `scale(${clampedScale})`;
|
|
206
|
+
element.style.transformOrigin = TRANSFORM_ORIGIN;
|
|
207
|
+
}
|
|
208
|
+
resetElementScale(element) {
|
|
209
|
+
element.style.transform = '';
|
|
210
|
+
element.style.transformOrigin = '';
|
|
211
|
+
}
|
|
212
|
+
addEventListener(event, callback) {
|
|
213
|
+
this.eventEmitter.on(event, callback);
|
|
214
|
+
}
|
|
215
|
+
removeEventListener(event, callback) {
|
|
216
|
+
this.eventEmitter.off(event, callback);
|
|
217
|
+
}
|
|
218
|
+
injectStyles() {
|
|
219
|
+
if (this.styleElement)
|
|
220
|
+
return;
|
|
221
|
+
this.styleElement = document.createElement('style');
|
|
222
|
+
this.styleElement.id = `${CSS_PREFIX}-styles`;
|
|
223
|
+
this.styleElement.textContent = this.generateCSS();
|
|
224
|
+
document.head.appendChild(this.styleElement);
|
|
225
|
+
}
|
|
226
|
+
removeInjectedStyles() {
|
|
227
|
+
if (this.styleElement) {
|
|
228
|
+
this.styleElement.remove();
|
|
229
|
+
this.styleElement = null;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
generateCSS() {
|
|
233
|
+
const prefix = CSS_PREFIX;
|
|
234
|
+
const duration = this.options.smoothTransition ? this.options.transitionDuration : 0;
|
|
235
|
+
return `
|
|
236
|
+
[data-${prefix}] {
|
|
237
|
+
transition: all ${duration}ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
238
|
+
transform-origin: ${TRANSFORM_ORIGIN};
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.${prefix}-scaled {
|
|
242
|
+
transition: all ${duration}ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.${prefix}-container {
|
|
246
|
+
width: 100%;
|
|
247
|
+
max-width: 100%;
|
|
248
|
+
box-sizing: border-box;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.${prefix}-no-scale {
|
|
252
|
+
transform: none !important;
|
|
253
|
+
transition: none !important;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.${prefix}-responsive {
|
|
257
|
+
font-size: calc(1rem * var(--${prefix}-scale, 1));
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
${this.options.customCSS || ''}
|
|
261
|
+
`;
|
|
262
|
+
}
|
|
263
|
+
applyScale() {
|
|
264
|
+
const elements = this.getTargetElements();
|
|
265
|
+
const scale = this.currentScale;
|
|
266
|
+
elements.forEach(element => {
|
|
267
|
+
if (this.shouldExcludeElement(element))
|
|
268
|
+
return;
|
|
269
|
+
if (element === document.body || element === document.documentElement) {
|
|
270
|
+
element.style.transform = `scale(${scale})`;
|
|
271
|
+
element.style.transformOrigin = TRANSFORM_ORIGIN;
|
|
272
|
+
element.style.width = `${100 / scale}%`;
|
|
273
|
+
element.style.minHeight = '100vh';
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
element.setAttribute(`data-${CSS_PREFIX}`, '');
|
|
277
|
+
element.style.transform = `scale(${scale})`;
|
|
278
|
+
element.style.transformOrigin = TRANSFORM_ORIGIN;
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
this.updateCSSVariables();
|
|
282
|
+
}
|
|
283
|
+
resetAllElements() {
|
|
284
|
+
const elements = this.getTargetElements();
|
|
285
|
+
elements.forEach(element => {
|
|
286
|
+
element.style.transform = '';
|
|
287
|
+
element.style.transformOrigin = '';
|
|
288
|
+
element.style.width = '';
|
|
289
|
+
element.style.minHeight = '';
|
|
290
|
+
element.removeAttribute(`data-${CSS_PREFIX}`);
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
getTargetElements() {
|
|
294
|
+
const selectors = this.options.includeSelectors || ['*'];
|
|
295
|
+
const elements = [];
|
|
296
|
+
if (selectors.includes('*')) {
|
|
297
|
+
elements.push(document.body);
|
|
298
|
+
const allElements = document.body.querySelectorAll('*');
|
|
299
|
+
elements.push(...Array.from(allElements));
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
selectors.forEach(selector => {
|
|
303
|
+
const found = document.querySelectorAll(selector);
|
|
304
|
+
elements.push(...Array.from(found));
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
return [...new Set(elements)];
|
|
308
|
+
}
|
|
309
|
+
shouldExcludeElement(element) {
|
|
310
|
+
const excludeSelectors = this.options.excludeSelectors || [];
|
|
311
|
+
return excludeSelectors.some(selector => element.matches(selector) || element.closest(selector) !== null);
|
|
312
|
+
}
|
|
313
|
+
calculateScale(width) {
|
|
314
|
+
const deviceType = getDeviceType(width, this.options.breakpoints);
|
|
315
|
+
const factors = this.options.scaleFactors || DEFAULT_OPTIONS.scaleFactors;
|
|
316
|
+
const factor = factors[deviceType] || 1;
|
|
317
|
+
const baseScale = this.options.baseScale || 1;
|
|
318
|
+
const scale = factor * baseScale;
|
|
319
|
+
return this.clampScale(scale);
|
|
320
|
+
}
|
|
321
|
+
clampScale(scale) {
|
|
322
|
+
const min = this.options.minScale || 0.5;
|
|
323
|
+
const max = this.options.maxScale || 1.5;
|
|
324
|
+
return Math.max(min, Math.min(max, scale));
|
|
325
|
+
}
|
|
326
|
+
updateCSSVariables() {
|
|
327
|
+
const prefix = CSS_PREFIX;
|
|
328
|
+
const root = document.documentElement;
|
|
329
|
+
root.style.setProperty(`--${prefix}-scale`, String(this.currentScale));
|
|
330
|
+
root.style.setProperty(`--${prefix}-device`, this.deviceInfo.type);
|
|
331
|
+
root.setAttribute(`data-${prefix}-device`, this.deviceInfo.type);
|
|
332
|
+
}
|
|
333
|
+
setupResizeListener() {
|
|
334
|
+
const handleResize = debounce(() => {
|
|
335
|
+
this.deviceInfo = this.getDeviceInfo();
|
|
336
|
+
const newScale = this.calculateScale(window.innerWidth);
|
|
337
|
+
if (newScale !== this.currentScale) {
|
|
338
|
+
this.currentScale = newScale;
|
|
339
|
+
this.applyScale();
|
|
340
|
+
this.emitEvent(EVENTS.SCALE, this.createEventData());
|
|
341
|
+
}
|
|
342
|
+
}, 250);
|
|
343
|
+
window.addEventListener('resize', handleResize);
|
|
344
|
+
this.cleanupFunctions.push(() => window.removeEventListener('resize', handleResize));
|
|
345
|
+
if (window.ResizeObserver) {
|
|
346
|
+
this.resizeObserver = new ResizeObserver(throttle(handleResize, 100));
|
|
347
|
+
this.resizeObserver.observe(document.body);
|
|
348
|
+
this.cleanupFunctions.push(() => this.resizeObserver?.disconnect());
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
setupMutationObserver() {
|
|
352
|
+
if (!window.MutationObserver)
|
|
353
|
+
return;
|
|
354
|
+
const handleMutation = debounce(() => {
|
|
355
|
+
this.applyScale();
|
|
356
|
+
}, 100);
|
|
357
|
+
this.mutationObserver = new MutationObserver(handleMutation);
|
|
358
|
+
this.mutationObserver.observe(document.body, {
|
|
359
|
+
childList: true,
|
|
360
|
+
subtree: true,
|
|
361
|
+
attributes: false,
|
|
362
|
+
});
|
|
363
|
+
this.cleanupFunctions.push(() => this.mutationObserver?.disconnect());
|
|
364
|
+
}
|
|
365
|
+
setupDeviceChangeListener() {
|
|
366
|
+
const handleOrientationChange = () => {
|
|
367
|
+
setTimeout(() => {
|
|
368
|
+
this.deviceInfo = this.getDeviceInfo();
|
|
369
|
+
const newScale = this.calculateScale(window.innerWidth);
|
|
370
|
+
if (newScale !== this.currentScale) {
|
|
371
|
+
this.currentScale = newScale;
|
|
372
|
+
this.applyScale();
|
|
373
|
+
this.emitEvent(EVENTS.DEVICE_CHANGE, this.createEventData());
|
|
374
|
+
}
|
|
375
|
+
}, 300);
|
|
376
|
+
};
|
|
377
|
+
if (window.screen?.orientation) {
|
|
378
|
+
window.screen.orientation.addEventListener('change', handleOrientationChange);
|
|
379
|
+
this.cleanupFunctions.push(() => window.screen?.orientation?.removeEventListener('change', handleOrientationChange));
|
|
380
|
+
}
|
|
381
|
+
window.addEventListener('orientationchange', handleOrientationChange);
|
|
382
|
+
this.cleanupFunctions.push(() => window.removeEventListener('orientationchange', handleOrientationChange));
|
|
383
|
+
}
|
|
384
|
+
removeEventListeners() {
|
|
385
|
+
this.cleanupFunctions.forEach(cleanup => cleanup());
|
|
386
|
+
this.cleanupFunctions = [];
|
|
387
|
+
}
|
|
388
|
+
createEventData() {
|
|
389
|
+
return {
|
|
390
|
+
device: this.deviceInfo.type,
|
|
391
|
+
scale: this.currentScale,
|
|
392
|
+
width: this.deviceInfo.width,
|
|
393
|
+
height: this.deviceInfo.height,
|
|
394
|
+
timestamp: Date.now(),
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
emitEvent(event, data) {
|
|
398
|
+
this.eventEmitter.emit(event, data);
|
|
399
|
+
const customEvent = new CustomEvent(event, {
|
|
400
|
+
detail: data,
|
|
401
|
+
bubbles: true,
|
|
402
|
+
cancelable: true,
|
|
403
|
+
});
|
|
404
|
+
document.dispatchEvent(customEvent);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function vanillaAdapter(options = {}) {
|
|
409
|
+
const instance = new ScaleAdjus({
|
|
410
|
+
...options,
|
|
411
|
+
autoInit: true,
|
|
412
|
+
});
|
|
413
|
+
return instance;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
const tailwindPlugin = {
|
|
417
|
+
name: 'tailwind',
|
|
418
|
+
version: '1.0.0',
|
|
419
|
+
apply(config) {
|
|
420
|
+
config.theme = {
|
|
421
|
+
...config.theme,
|
|
422
|
+
extend: {
|
|
423
|
+
...config.theme?.extend,
|
|
424
|
+
screens: {
|
|
425
|
+
...config.theme?.extend?.screens,
|
|
426
|
+
'sa-mobile': '768px',
|
|
427
|
+
'sa-tablet': '1024px',
|
|
428
|
+
'sa-desktop': '1200px',
|
|
429
|
+
'sa-large': '1600px',
|
|
430
|
+
},
|
|
431
|
+
spacing: {
|
|
432
|
+
...config.theme?.extend?.spacing,
|
|
433
|
+
'sa': 'var(--sa-scale)',
|
|
434
|
+
},
|
|
435
|
+
fontSize: {
|
|
436
|
+
...config.theme?.extend?.fontSize,
|
|
437
|
+
'sa-fluid': 'calc(1rem * var(--sa-scale))',
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
};
|
|
441
|
+
config.plugins = [
|
|
442
|
+
...(config.plugins || []),
|
|
443
|
+
function ({ addUtilities, addComponents }) {
|
|
444
|
+
addUtilities({
|
|
445
|
+
'.sa-scale': {
|
|
446
|
+
'--sa-scale': '1',
|
|
447
|
+
transform: 'scale(var(--sa-scale))',
|
|
448
|
+
transformOrigin: 'top left',
|
|
449
|
+
},
|
|
450
|
+
'.sa-no-scale': {
|
|
451
|
+
transform: 'none !important',
|
|
452
|
+
transition: 'none !important',
|
|
453
|
+
},
|
|
454
|
+
'.sa-responsive': {
|
|
455
|
+
'font-size': 'calc(1rem * var(--sa-scale))',
|
|
456
|
+
},
|
|
457
|
+
});
|
|
458
|
+
addComponents({
|
|
459
|
+
'.sa-container': {
|
|
460
|
+
width: '100%',
|
|
461
|
+
maxWidth: '100%',
|
|
462
|
+
boxSizing: 'border-box',
|
|
463
|
+
padding: '0 15px',
|
|
464
|
+
margin: '0 auto',
|
|
465
|
+
},
|
|
466
|
+
'.sa-grid': {
|
|
467
|
+
display: 'grid',
|
|
468
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))',
|
|
469
|
+
gap: '20px',
|
|
470
|
+
},
|
|
471
|
+
});
|
|
472
|
+
},
|
|
473
|
+
];
|
|
474
|
+
},
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
const cssPlugin = {
|
|
478
|
+
name: 'css',
|
|
479
|
+
version: '1.0.0',
|
|
480
|
+
apply(options = {}) {
|
|
481
|
+
const prefix = options.prefix || CSS_PREFIX;
|
|
482
|
+
const customProperties = options.customProperties || {};
|
|
483
|
+
const css = `
|
|
484
|
+
:root {
|
|
485
|
+
--${prefix}-scale: 1;
|
|
486
|
+
--${prefix}-device: desktop;
|
|
487
|
+
${Object.entries(customProperties).map(([key, value]) => `--${prefix}-${key}: ${value};`).join('\n')}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
[data-${prefix}] {
|
|
491
|
+
transform: scale(var(--${prefix}-scale));
|
|
492
|
+
transform-origin: top left;
|
|
493
|
+
transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.${prefix}-container {
|
|
497
|
+
width: 100%;
|
|
498
|
+
max-width: 100%;
|
|
499
|
+
box-sizing: border-box;
|
|
500
|
+
padding: 0 15px;
|
|
501
|
+
margin: 0 auto;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.${prefix}-flex {
|
|
505
|
+
display: flex;
|
|
506
|
+
flex-wrap: wrap;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.${prefix}-grid {
|
|
510
|
+
display: grid;
|
|
511
|
+
gap: 20px;
|
|
512
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.${prefix}-fluid-text {
|
|
516
|
+
font-size: calc(1rem * var(--${prefix}-scale));
|
|
517
|
+
line-height: 1.6;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.${prefix}-fluid-heading {
|
|
521
|
+
font-size: calc(2rem * var(--${prefix}-scale));
|
|
522
|
+
line-height: 1.2;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.${prefix}-responsive-image {
|
|
526
|
+
max-width: 100%;
|
|
527
|
+
height: auto;
|
|
528
|
+
display: block;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.${prefix}-video-container {
|
|
532
|
+
position: relative;
|
|
533
|
+
padding-bottom: 56.25%;
|
|
534
|
+
height: 0;
|
|
535
|
+
overflow: hidden;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.${prefix}-video-container iframe,
|
|
539
|
+
.${prefix}-video-container video {
|
|
540
|
+
position: absolute;
|
|
541
|
+
top: 0;
|
|
542
|
+
left: 0;
|
|
543
|
+
width: 100%;
|
|
544
|
+
height: 100%;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
@media (max-width: 768px) {
|
|
548
|
+
.${prefix}-hidden-mobile {
|
|
549
|
+
display: none !important;
|
|
550
|
+
}
|
|
551
|
+
.${prefix}-visible-mobile {
|
|
552
|
+
display: block !important;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
@media (min-width: 769px) and (max-width: 1024px) {
|
|
557
|
+
.${prefix}-grid {
|
|
558
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
@media (min-width: 1025px) and (max-width: 1600px) {
|
|
563
|
+
.${prefix}-grid {
|
|
564
|
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
@media (min-width: 1601px) {
|
|
569
|
+
.${prefix}-grid {
|
|
570
|
+
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
`;
|
|
574
|
+
const styleElement = document.createElement('style');
|
|
575
|
+
styleElement.id = `${prefix}-plugin-styles`;
|
|
576
|
+
styleElement.textContent = css;
|
|
577
|
+
document.head.appendChild(styleElement);
|
|
578
|
+
},
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
export { cssPlugin as CSSScaleAdjus, ScaleAdjus, tailwindPlugin as TailwindScaleAdjus, vanillaAdapter as VanillaScaleAdjus, ScaleAdjus as default };
|
|
582
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/core/constants.ts","../src/utils/debounce.ts","../src/utils/device.ts","../src/utils/events.ts","../src/core/ScaleAdjus.ts","../src/adapters/vanilla.ts","../src/plugins/tailwind.ts","../src/plugins/css.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":[],"mappings":"AAAO,MAAM,eAAe,GAAG;AAC7B,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,QAAQ,EAAE,GAAG;AACb,IAAA,QAAQ,EAAE,GAAG;AACb,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,kBAAkB,EAAE,IAAI;AACxB,IAAA,gBAAgB,EAAE,IAAI;AACtB,IAAA,kBAAkB,EAAE,GAAG;AACvB,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,WAAW,EAAE;AACX,QAAA,MAAM,EAAE,GAAG;AACX,QAAA,MAAM,EAAE,IAAI;AACZ,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,YAAY,EAAE,IAAI;AACnB,KAAA;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,MAAM,EAAE,GAAG;AACX,QAAA,MAAM,EAAE,GAAG;AACX,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,YAAY,EAAE,GAAG;AAClB,KAAA;AACD,IAAA,gBAAgB,EAAE,EAAE;IACpB,gBAAgB,EAAE,CAAC,GAAG,CAAC;AACvB,IAAA,SAAS,EAAE,EAAE;CACd;AAEM,MAAM,UAAU,GAAG,IAAI;AAEvB,MAAM,MAAM,GAAG;AACpB,IAAA,IAAI,EAAE,iBAAiB;AACvB,IAAA,KAAK,EAAE,kBAAkB;AACzB,IAAA,KAAK,EAAE,kBAAkB;AACzB,IAAA,OAAO,EAAE,oBAAoB;AAC7B,IAAA,MAAM,E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