index-scrollbar
Advanced tools
Comparing version 1.0.14 to 1.0.15
@@ -7,3 +7,3 @@ 'use strict'; | ||
const indexScrollbarCss = ":host{transition:opacity 0.2s ease-in-out;font-size:min(20px, max(12px, 1vh));padding:calc(2 * min(20px, max(12px, 1vh))) 0}:host .visible{opacity:1 !important}:host .container{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-between}:host .container.cursor-pointer{cursor:pointer}:host .container .letter{padding:0 20px;position:relative;pointer-events:none;transition:transform 0.2s ease-in-out;transform-origin:60%}:host .container .letter label{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}:host .container .letter.letter-disabled{opacity:0.3}:host .container .letter.letter-is-hidden-value{transform-origin:center;transform:scale(2)}"; | ||
const indexScrollbarCss = ":host{font-size:min(20px, max(12px, 1vh));padding:calc(2 * min(20px, max(12px, 1vh))) 0}:host .container{transition:opacity 0.2s ease-in-out;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-between}:host .container.visible{opacity:1 !important}:host .container.cursor-pointer{cursor:pointer}:host .container .letter{padding:0 20px;position:relative;pointer-events:none;transition:transform 0.2s ease-in-out;transform-origin:60%}:host .container .letter label{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}:host .container .letter.letter-disabled{opacity:0.3}:host .container .letter.letter-is-hidden-value{transform-origin:center;transform:scale(2)}"; | ||
@@ -85,5 +85,6 @@ let IndexScrollbar = class { | ||
} | ||
onOffsetSizeCheckIntervalChange() { | ||
onOffsetSizeCheckIntervalChange(value) { | ||
if (this._offsetSizeCheckIntervalTimer) | ||
clearInterval(this._offsetSizeCheckIntervalTimer); | ||
this.offsetSizeCheckInterval = value; | ||
this.offsetSizeCheckInterval && ((this._offsetSizeCheckIntervalTimer = setInterval(() => this.checkVisibleLetters())), this.offsetSizeCheckInterval); | ||
@@ -103,14 +104,19 @@ } | ||
setTimeout(() => { | ||
this.onAlphabetChange(this.alphabet); | ||
this.onOverflowDividerChange(this.overflowDivider); | ||
this.onValidLettersChange(); | ||
this.onDisableInvalidLettersChange(); | ||
this.onPrioritizeHidingInvalidLettersChange(); | ||
this.onMagnificationMultiplierChange(); | ||
this.onMagnificationCurveChange(this.magnificationCurve); | ||
this.onLetterSpacingChange(this.letterSpacing); | ||
this.onOffsetSizeCheckIntervalChange(); | ||
this.onExactXChange(); | ||
this.checkVisibleLetters(); | ||
this.rendering = false; | ||
let interval = setInterval(() => { | ||
if (this.alphabetContainer) { | ||
this.onAlphabetChange(this.alphabet); | ||
this.onOverflowDividerChange(this.overflowDivider); | ||
this.onValidLettersChange(); | ||
this.onDisableInvalidLettersChange(); | ||
this.onPrioritizeHidingInvalidLettersChange(); | ||
this.onMagnificationMultiplierChange(); | ||
this.onMagnificationCurveChange(this.magnificationCurve); | ||
this.onLetterSpacingChange(this.letterSpacing); | ||
this.onOffsetSizeCheckIntervalChange(this.offsetSizeCheckInterval); | ||
this.onExactXChange(); | ||
this.checkVisibleLetters(); | ||
this.rendering = false; | ||
clearInterval(interval); | ||
} | ||
}, 100); | ||
}, 100); | ||
@@ -159,3 +165,2 @@ } | ||
} | ||
newAlphabet = 'asonteaontehanth'.split(''); | ||
//Check if there is enough free space for letters | ||
@@ -165,4 +170,3 @@ this._lettersShortened = height / letterSize < newAlphabet.length; | ||
const numHiddenLetters = newAlphabet.length - Math.floor(height / letterSize); | ||
if (numHiddenLetters === newAlphabet.length) | ||
newAlphabet = []; | ||
// if (numHiddenLetters === newAlphabet.length) newAlphabet = []; | ||
//determine how many letters to hide | ||
@@ -181,3 +185,4 @@ const hiddenHalves = this.getNumHiddenHalves(numHiddenLetters, newAlphabet.length) + 1; | ||
if (i > 0) { | ||
prev.push(this.overflowDivider); | ||
if (this.overflowDivider) | ||
prev.push(this.overflowDivider); | ||
} | ||
@@ -189,3 +194,4 @@ prev.push(curr); | ||
if (i > 0) { | ||
prev.push(this.overflowDivider); | ||
if (this.overflowDivider) | ||
prev.push(this.overflowDivider); | ||
} | ||
@@ -195,3 +201,3 @@ prev.push(curr); | ||
}, []); | ||
if (this.alphabet.length % 2 === 0) | ||
if (this.alphabet.length % 2 === 0 && this.overflowDivider) | ||
alphabet1.push(this.overflowDivider); | ||
@@ -198,0 +204,0 @@ newAlphabet = alphabet1.concat(alphabet2.reverse()); |
@@ -74,5 +74,6 @@ import { Component, Host, h, Prop, Event, Element, State, Watch } from '@stencil/core'; | ||
} | ||
onOffsetSizeCheckIntervalChange() { | ||
onOffsetSizeCheckIntervalChange(value) { | ||
if (this._offsetSizeCheckIntervalTimer) | ||
clearInterval(this._offsetSizeCheckIntervalTimer); | ||
this.offsetSizeCheckInterval = value; | ||
this.offsetSizeCheckInterval && ((this._offsetSizeCheckIntervalTimer = setInterval(() => this.checkVisibleLetters())), this.offsetSizeCheckInterval); | ||
@@ -92,14 +93,19 @@ } | ||
setTimeout(() => { | ||
this.onAlphabetChange(this.alphabet); | ||
this.onOverflowDividerChange(this.overflowDivider); | ||
this.onValidLettersChange(); | ||
this.onDisableInvalidLettersChange(); | ||
this.onPrioritizeHidingInvalidLettersChange(); | ||
this.onMagnificationMultiplierChange(); | ||
this.onMagnificationCurveChange(this.magnificationCurve); | ||
this.onLetterSpacingChange(this.letterSpacing); | ||
this.onOffsetSizeCheckIntervalChange(); | ||
this.onExactXChange(); | ||
this.checkVisibleLetters(); | ||
this.rendering = false; | ||
let interval = setInterval(() => { | ||
if (this.alphabetContainer) { | ||
this.onAlphabetChange(this.alphabet); | ||
this.onOverflowDividerChange(this.overflowDivider); | ||
this.onValidLettersChange(); | ||
this.onDisableInvalidLettersChange(); | ||
this.onPrioritizeHidingInvalidLettersChange(); | ||
this.onMagnificationMultiplierChange(); | ||
this.onMagnificationCurveChange(this.magnificationCurve); | ||
this.onLetterSpacingChange(this.letterSpacing); | ||
this.onOffsetSizeCheckIntervalChange(this.offsetSizeCheckInterval); | ||
this.onExactXChange(); | ||
this.checkVisibleLetters(); | ||
this.rendering = false; | ||
clearInterval(interval); | ||
} | ||
}, 100); | ||
}, 100); | ||
@@ -148,3 +154,2 @@ } | ||
} | ||
newAlphabet = 'asonteaontehanth'.split(''); | ||
//Check if there is enough free space for letters | ||
@@ -154,4 +159,3 @@ this._lettersShortened = height / letterSize < newAlphabet.length; | ||
const numHiddenLetters = newAlphabet.length - Math.floor(height / letterSize); | ||
if (numHiddenLetters === newAlphabet.length) | ||
newAlphabet = []; | ||
// if (numHiddenLetters === newAlphabet.length) newAlphabet = []; | ||
//determine how many letters to hide | ||
@@ -170,3 +174,4 @@ const hiddenHalves = this.getNumHiddenHalves(numHiddenLetters, newAlphabet.length) + 1; | ||
if (i > 0) { | ||
prev.push(this.overflowDivider); | ||
if (this.overflowDivider) | ||
prev.push(this.overflowDivider); | ||
} | ||
@@ -178,3 +183,4 @@ prev.push(curr); | ||
if (i > 0) { | ||
prev.push(this.overflowDivider); | ||
if (this.overflowDivider) | ||
prev.push(this.overflowDivider); | ||
} | ||
@@ -184,3 +190,3 @@ prev.push(curr); | ||
}, []); | ||
if (this.alphabet.length % 2 === 0) | ||
if (this.alphabet.length % 2 === 0 && this.overflowDivider) | ||
alphabet1.push(this.overflowDivider); | ||
@@ -187,0 +193,0 @@ newAlphabet = alphabet1.concat(alphabet2.reverse()); |
import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client'; | ||
const indexScrollbarCss = ":host{transition:opacity 0.2s ease-in-out;font-size:min(20px, max(12px, 1vh));padding:calc(2 * min(20px, max(12px, 1vh))) 0}:host .visible{opacity:1 !important}:host .container{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-between}:host .container.cursor-pointer{cursor:pointer}:host .container .letter{padding:0 20px;position:relative;pointer-events:none;transition:transform 0.2s ease-in-out;transform-origin:60%}:host .container .letter label{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}:host .container .letter.letter-disabled{opacity:0.3}:host .container .letter.letter-is-hidden-value{transform-origin:center;transform:scale(2)}"; | ||
const indexScrollbarCss = ":host{font-size:min(20px, max(12px, 1vh));padding:calc(2 * min(20px, max(12px, 1vh))) 0}:host .container{transition:opacity 0.2s ease-in-out;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-between}:host .container.visible{opacity:1 !important}:host .container.cursor-pointer{cursor:pointer}:host .container .letter{padding:0 20px;position:relative;pointer-events:none;transition:transform 0.2s ease-in-out;transform-origin:60%}:host .container .letter label{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}:host .container .letter.letter-disabled{opacity:0.3}:host .container .letter.letter-is-hidden-value{transform-origin:center;transform:scale(2)}"; | ||
@@ -82,5 +82,6 @@ let IndexScrollbar$1 = class extends HTMLElement { | ||
} | ||
onOffsetSizeCheckIntervalChange() { | ||
onOffsetSizeCheckIntervalChange(value) { | ||
if (this._offsetSizeCheckIntervalTimer) | ||
clearInterval(this._offsetSizeCheckIntervalTimer); | ||
this.offsetSizeCheckInterval = value; | ||
this.offsetSizeCheckInterval && ((this._offsetSizeCheckIntervalTimer = setInterval(() => this.checkVisibleLetters())), this.offsetSizeCheckInterval); | ||
@@ -100,14 +101,19 @@ } | ||
setTimeout(() => { | ||
this.onAlphabetChange(this.alphabet); | ||
this.onOverflowDividerChange(this.overflowDivider); | ||
this.onValidLettersChange(); | ||
this.onDisableInvalidLettersChange(); | ||
this.onPrioritizeHidingInvalidLettersChange(); | ||
this.onMagnificationMultiplierChange(); | ||
this.onMagnificationCurveChange(this.magnificationCurve); | ||
this.onLetterSpacingChange(this.letterSpacing); | ||
this.onOffsetSizeCheckIntervalChange(); | ||
this.onExactXChange(); | ||
this.checkVisibleLetters(); | ||
this.rendering = false; | ||
let interval = setInterval(() => { | ||
if (this.alphabetContainer) { | ||
this.onAlphabetChange(this.alphabet); | ||
this.onOverflowDividerChange(this.overflowDivider); | ||
this.onValidLettersChange(); | ||
this.onDisableInvalidLettersChange(); | ||
this.onPrioritizeHidingInvalidLettersChange(); | ||
this.onMagnificationMultiplierChange(); | ||
this.onMagnificationCurveChange(this.magnificationCurve); | ||
this.onLetterSpacingChange(this.letterSpacing); | ||
this.onOffsetSizeCheckIntervalChange(this.offsetSizeCheckInterval); | ||
this.onExactXChange(); | ||
this.checkVisibleLetters(); | ||
this.rendering = false; | ||
clearInterval(interval); | ||
} | ||
}, 100); | ||
}, 100); | ||
@@ -156,3 +162,2 @@ } | ||
} | ||
newAlphabet = 'asonteaontehanth'.split(''); | ||
//Check if there is enough free space for letters | ||
@@ -162,4 +167,3 @@ this._lettersShortened = height / letterSize < newAlphabet.length; | ||
const numHiddenLetters = newAlphabet.length - Math.floor(height / letterSize); | ||
if (numHiddenLetters === newAlphabet.length) | ||
newAlphabet = []; | ||
// if (numHiddenLetters === newAlphabet.length) newAlphabet = []; | ||
//determine how many letters to hide | ||
@@ -178,3 +182,4 @@ const hiddenHalves = this.getNumHiddenHalves(numHiddenLetters, newAlphabet.length) + 1; | ||
if (i > 0) { | ||
prev.push(this.overflowDivider); | ||
if (this.overflowDivider) | ||
prev.push(this.overflowDivider); | ||
} | ||
@@ -186,3 +191,4 @@ prev.push(curr); | ||
if (i > 0) { | ||
prev.push(this.overflowDivider); | ||
if (this.overflowDivider) | ||
prev.push(this.overflowDivider); | ||
} | ||
@@ -192,3 +198,3 @@ prev.push(curr); | ||
}, []); | ||
if (this.alphabet.length % 2 === 0) | ||
if (this.alphabet.length % 2 === 0 && this.overflowDivider) | ||
alphabet1.push(this.overflowDivider); | ||
@@ -195,0 +201,0 @@ newAlphabet = alphabet1.concat(alphabet2.reverse()); |
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5f889f85.js'; | ||
const indexScrollbarCss = ":host{transition:opacity 0.2s ease-in-out;font-size:min(20px, max(12px, 1vh));padding:calc(2 * min(20px, max(12px, 1vh))) 0}:host .visible{opacity:1 !important}:host .container{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-between}:host .container.cursor-pointer{cursor:pointer}:host .container .letter{padding:0 20px;position:relative;pointer-events:none;transition:transform 0.2s ease-in-out;transform-origin:60%}:host .container .letter label{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}:host .container .letter.letter-disabled{opacity:0.3}:host .container .letter.letter-is-hidden-value{transform-origin:center;transform:scale(2)}"; | ||
const indexScrollbarCss = ":host{font-size:min(20px, max(12px, 1vh));padding:calc(2 * min(20px, max(12px, 1vh))) 0}:host .container{transition:opacity 0.2s ease-in-out;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-between}:host .container.visible{opacity:1 !important}:host .container.cursor-pointer{cursor:pointer}:host .container .letter{padding:0 20px;position:relative;pointer-events:none;transition:transform 0.2s ease-in-out;transform-origin:60%}:host .container .letter label{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}:host .container .letter.letter-disabled{opacity:0.3}:host .container .letter.letter-is-hidden-value{transform-origin:center;transform:scale(2)}"; | ||
@@ -80,5 +80,6 @@ let IndexScrollbar = class { | ||
} | ||
onOffsetSizeCheckIntervalChange() { | ||
onOffsetSizeCheckIntervalChange(value) { | ||
if (this._offsetSizeCheckIntervalTimer) | ||
clearInterval(this._offsetSizeCheckIntervalTimer); | ||
this.offsetSizeCheckInterval = value; | ||
this.offsetSizeCheckInterval && ((this._offsetSizeCheckIntervalTimer = setInterval(() => this.checkVisibleLetters())), this.offsetSizeCheckInterval); | ||
@@ -98,14 +99,19 @@ } | ||
setTimeout(() => { | ||
this.onAlphabetChange(this.alphabet); | ||
this.onOverflowDividerChange(this.overflowDivider); | ||
this.onValidLettersChange(); | ||
this.onDisableInvalidLettersChange(); | ||
this.onPrioritizeHidingInvalidLettersChange(); | ||
this.onMagnificationMultiplierChange(); | ||
this.onMagnificationCurveChange(this.magnificationCurve); | ||
this.onLetterSpacingChange(this.letterSpacing); | ||
this.onOffsetSizeCheckIntervalChange(); | ||
this.onExactXChange(); | ||
this.checkVisibleLetters(); | ||
this.rendering = false; | ||
let interval = setInterval(() => { | ||
if (this.alphabetContainer) { | ||
this.onAlphabetChange(this.alphabet); | ||
this.onOverflowDividerChange(this.overflowDivider); | ||
this.onValidLettersChange(); | ||
this.onDisableInvalidLettersChange(); | ||
this.onPrioritizeHidingInvalidLettersChange(); | ||
this.onMagnificationMultiplierChange(); | ||
this.onMagnificationCurveChange(this.magnificationCurve); | ||
this.onLetterSpacingChange(this.letterSpacing); | ||
this.onOffsetSizeCheckIntervalChange(this.offsetSizeCheckInterval); | ||
this.onExactXChange(); | ||
this.checkVisibleLetters(); | ||
this.rendering = false; | ||
clearInterval(interval); | ||
} | ||
}, 100); | ||
}, 100); | ||
@@ -154,3 +160,2 @@ } | ||
} | ||
newAlphabet = 'asonteaontehanth'.split(''); | ||
//Check if there is enough free space for letters | ||
@@ -160,4 +165,3 @@ this._lettersShortened = height / letterSize < newAlphabet.length; | ||
const numHiddenLetters = newAlphabet.length - Math.floor(height / letterSize); | ||
if (numHiddenLetters === newAlphabet.length) | ||
newAlphabet = []; | ||
// if (numHiddenLetters === newAlphabet.length) newAlphabet = []; | ||
//determine how many letters to hide | ||
@@ -176,3 +180,4 @@ const hiddenHalves = this.getNumHiddenHalves(numHiddenLetters, newAlphabet.length) + 1; | ||
if (i > 0) { | ||
prev.push(this.overflowDivider); | ||
if (this.overflowDivider) | ||
prev.push(this.overflowDivider); | ||
} | ||
@@ -184,3 +189,4 @@ prev.push(curr); | ||
if (i > 0) { | ||
prev.push(this.overflowDivider); | ||
if (this.overflowDivider) | ||
prev.push(this.overflowDivider); | ||
} | ||
@@ -190,3 +196,3 @@ prev.push(curr); | ||
}, []); | ||
if (this.alphabet.length % 2 === 0) | ||
if (this.alphabet.length % 2 === 0 && this.overflowDivider) | ||
alphabet1.push(this.overflowDivider); | ||
@@ -193,0 +199,0 @@ newAlphabet = alphabet1.concat(alphabet2.reverse()); |
@@ -1,1 +0,1 @@ | ||
import{p as e,b as i}from"./p-d4d31fe4.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>i([["p-e97f0891",[[1,"index-scrollbar",{alphabet:[16],overflowDivider:[1,"overflow-divider"],validLetters:[16],disableInvalidLetters:[4,"disable-invalid-letters"],prioritizeHidingInvalidLetters:[4,"prioritize-hiding-invalid-letters"],letterMagnification:[4,"letter-magnification"],magnifyDividers:[4,"magnify-dividers"],magnificationMultiplier:[2,"magnification-multiplier"],magnificationCurve:[16],exactX:[4,"exact-x"],navigateOnHover:[4,"navigate-on-hover"],letterSpacing:[8,"letter-spacing"],offsetSizeCheckInterval:[2,"offset-size-check-interval"],_isComponentActive:[32],visibleLetters:[32],rendering:[32],_lastEmittedLetter:[32],magIndex:[32],_isInBounds:[32],visualLetterIndex:[32],letterSelected:[32]}]]]],e))); | ||
import{p as e,b as i}from"./p-d4d31fe4.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>i([["p-0e0aa0b0",[[1,"index-scrollbar",{alphabet:[16],overflowDivider:[1,"overflow-divider"],validLetters:[16],disableInvalidLetters:[4,"disable-invalid-letters"],prioritizeHidingInvalidLetters:[4,"prioritize-hiding-invalid-letters"],letterMagnification:[4,"letter-magnification"],magnifyDividers:[4,"magnify-dividers"],magnificationMultiplier:[2,"magnification-multiplier"],magnificationCurve:[16],exactX:[4,"exact-x"],navigateOnHover:[4,"navigate-on-hover"],letterSpacing:[8,"letter-spacing"],offsetSizeCheckInterval:[2,"offset-size-check-interval"],_isComponentActive:[32],visibleLetters:[32],rendering:[32],_lastEmittedLetter:[32],magIndex:[32],_isInBounds:[32],visualLetterIndex:[32],letterSelected:[32]}]]]],e))); |
@@ -26,3 +26,3 @@ import { EventEmitter } from '../../stencil-public-runtime'; | ||
offsetSizeCheckInterval: number; | ||
onOffsetSizeCheckIntervalChange(): void; | ||
onOffsetSizeCheckIntervalChange(value: number): void; | ||
private _offsetSizeCheckIntervalTimer; | ||
@@ -29,0 +29,0 @@ letterChange: EventEmitter<string>; |
{ | ||
"name": "index-scrollbar", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": "Stencil Component Starter", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
403571
6433