intelliwaketssveltekitv25 1.0.70 → 1.0.72

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.
@@ -9,6 +9,7 @@
9
9
  import Icon from './Icon.svelte'
10
10
  import { cubicInOut } from 'svelte/easing'
11
11
  import { fly } from 'svelte/transition'
12
+ import path from 'node:path'
12
13
 
13
14
  let {
14
15
  tabHrefs,
@@ -22,7 +23,8 @@
22
23
  consoleLogs = false,
23
24
  noResolveHidden = false,
24
25
  printAllTabs = false,
25
- rounded = false
26
+ rounded = false,
27
+ slug = $bindable(null)
26
28
  }: {
27
29
  tabHrefs: ITabHref[]
28
30
  basePath?: string | undefined
@@ -36,6 +38,7 @@
36
38
  noResolveHidden?: boolean
37
39
  printAllTabs?: boolean
38
40
  rounded?: boolean
41
+ slug?: string | null
39
42
  } = $props()
40
43
 
41
44
  let tabPrefix = $derived(noTabAdjustments ? '' : 'Tab')
@@ -118,70 +121,73 @@
118
121
  }
119
122
 
120
123
  async function mountAction() {
121
- if (browser && pathAnalyzer && storage && pathAnalyzer?.basePath.endsWith(
122
- `/${basePath}`) && (pathAnalyzer.activePageComponents?.length ?? 0) < 3) {
123
- await tick()
124
-
125
- if (consoleLogs) console.info('mountAction', pathAnalyzer.activePageSlugs)
126
-
127
- if (!noResolveHidden && pathAnalyzer?.activePageSlug && !visibleItems?.some(
128
- item => getSlug(item)?.includes(pathAnalyzer?.activePageFull ?? '(NoNe)') ?? true)) {
129
- const toItem = visibleItems.find(item => item.isInitial) ?? visibleItems.find(() => true)
130
- if (toItem) {
131
- goto(toItem.href, { replaceState: true })
132
- return
124
+ slug = pathAnalyzer?.activePageSlug ?? null
125
+ if (!reclickToClose) {
126
+ if (browser && pathAnalyzer && storage && pathAnalyzer?.basePath.endsWith(
127
+ `/${basePath}`) && (pathAnalyzer.activePageComponents?.length ?? 0) < 3) {
128
+ await tick()
129
+
130
+ if (consoleLogs) console.info('mountAction', pathAnalyzer.activePageSlugs)
131
+
132
+ if (!noResolveHidden && pathAnalyzer?.activePageSlug && !visibleItems?.some(
133
+ item => getSlug(item)?.includes(pathAnalyzer?.activePageFull ?? '(NoNe)') ?? true)) {
134
+ const toItem = visibleItems.find(item => item.isInitial) ?? visibleItems.find(() => true)
135
+ if (toItem) {
136
+ goto(toItem.href, { replaceState: true })
137
+ return
138
+ }
133
139
  }
134
- }
135
140
 
136
- let previousID: string | number | null | undefined = null
137
- let newTab: string | null | undefined = null
141
+ let previousID: string | number | null | undefined = null
142
+ let newTab: string | null | undefined = null
138
143
 
139
- if (!pathAnalyzer?.activePageSlug) {
140
- if (consoleLogs) {
141
- console.info(
144
+ if (!pathAnalyzer?.activePageSlug) {
145
+ if (consoleLogs) {
146
+ console.info(
147
+ getTabSetting(),
148
+ getSlug(tabHrefs.find(tabHref => !tabHref.hidden && tabHref.isInitial)),
149
+ getSlug(tabHrefs.find(tabHref => !tabHref.hidden))
150
+ )
151
+ }
152
+
153
+ newTab = CoalesceFalsey(
142
154
  getTabSetting(),
143
155
  getSlug(tabHrefs.find(tabHref => !tabHref.hidden && tabHref.isInitial)),
144
156
  getSlug(tabHrefs.find(tabHref => !tabHref.hidden))
145
157
  )
146
158
  }
147
159
 
148
- newTab = CoalesceFalsey(
149
- getTabSetting(),
150
- getSlug(tabHrefs.find(tabHref => !tabHref.hidden && tabHref.isInitial)),
151
- getSlug(tabHrefs.find(tabHref => !tabHref.hidden))
152
- )
153
- }
154
-
155
- if (!basePathDigits) {
156
- previousID = getIDSetting()
157
- }
160
+ if (!basePathDigits) {
161
+ previousID = getIDSetting()
162
+ }
158
163
 
159
- if (previousID) {
160
- // const newPathAnalyzer = new PathAnalyzer(page, basePath)
161
- // newPathAnalyzer.base = `${noDigitsBasePath}${previousID}`
164
+ if (previousID) {
165
+ // const newPathAnalyzer = new PathAnalyzer(page, basePath)
166
+ // newPathAnalyzer.base = `${noDigitsBasePath}${previousID}`
162
167
 
163
- await tick()
168
+ await tick()
164
169
 
165
- if (consoleLogs) {
166
- console.info(
167
- 'ID', previousID, 'newTab', newTab, 'slug', pathAnalyzer?.activePageSlug, 'URL',
168
- pathAnalyzer?.open(newTab ?? '', false),
169
- pathAnalyzer.basePathReplaced(`${noDigitsBasePath}${previousID}`,
170
- newTab ?? pathAnalyzer?.activePageSlug ?? ''
170
+ if (consoleLogs) {
171
+ console.info(
172
+ 'ID', previousID, 'newTab', newTab, 'slug', pathAnalyzer?.activePageSlug, 'URL',
173
+ pathAnalyzer?.open(newTab ?? '', false),
174
+ pathAnalyzer.basePathReplaced(`${noDigitsBasePath}${previousID}`,
175
+ newTab ?? pathAnalyzer?.activePageSlug ?? ''
176
+ )
171
177
  )
172
- )
173
- }
178
+ }
174
179
 
175
- // await goto(pathAnalyzer.basePathReplaced(`${noDigitsBasePath}${previousID}`, newTab ?? pathAnalyzer?.activePageSlug ?? ''), {replaceState: true})
176
- } else {
177
- setIDSetting()
180
+ // await goto(pathAnalyzer.basePathReplaced(`${noDigitsBasePath}${previousID}`, newTab ?? pathAnalyzer?.activePageSlug ?? ''), {replaceState: true})
181
+ } else {
182
+ setIDSetting()
178
183
 
179
- if (newTab) {
180
- await tick()
181
- if (consoleLogs) {
182
- console.info('No ID newTab', newTab, pathAnalyzer?.open(newTab, false))
184
+ if (newTab) {
185
+ await tick()
186
+ if (consoleLogs) {
187
+ console.info('No ID newTab', newTab, pathAnalyzer?.open(newTab, false))
188
+ }
189
+ await goto(pathAnalyzer?.open(newTab, false), { replaceState: true })
183
190
  }
184
- await goto(pathAnalyzer?.open(newTab, false), { replaceState: true })
185
191
  }
186
192
  }
187
193
  }
@@ -193,7 +199,7 @@
193
199
 
194
200
  afterNavigate(() => {
195
201
  if (consoleLogs) console.info('aN', pathAnalyzer?.activePageSlug)
196
- if (browser && storage && pathAnalyzer && pathAnalyzer?.activePageSlug && pathAnalyzer?.activePageSlug != getTabSetting() && pathAnalyzer?.basePath.endsWith(
202
+ if (browser && storage && !reclickToClose && pathAnalyzer && pathAnalyzer?.activePageSlug && pathAnalyzer?.activePageSlug != getTabSetting() && pathAnalyzer?.basePath.endsWith(
197
203
  `/${basePath}`)) {
198
204
  setTabSetting(pathAnalyzer?.activePageSlug)
199
205
  }
@@ -239,6 +245,7 @@
239
245
  >
240
246
  <div
241
247
  class="tab_href_indicator absolute h-8 z-10 bg-transparent border-b-2 border-b-primary-selected transition-all duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] select-none pointer-events-none"
248
+ hidden={!pathAnalyzer?.activePageSlug}
242
249
  style={indicatorStyles}
243
250
  in:fly={{ y: 10, duration: 200, easing: cubicInOut }}>
244
251
  &nbsp;
@@ -12,7 +12,8 @@ type $$ComponentProps = {
12
12
  noResolveHidden?: boolean;
13
13
  printAllTabs?: boolean;
14
14
  rounded?: boolean;
15
+ slug?: string | null;
15
16
  };
16
- declare const TabHref: import("svelte").Component<$$ComponentProps, {}, "">;
17
+ declare const TabHref: import("svelte").Component<$$ComponentProps, {}, "slug">;
17
18
  type TabHref = ReturnType<typeof TabHref>;
18
19
  export default TabHref;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelliwaketssveltekitv25",
3
- "version": "1.0.70",
3
+ "version": "1.0.72",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "exports": {
@@ -90,6 +90,7 @@
90
90
  "lint": "prettier --check . && eslint .",
91
91
  "format": "prettier --write .",
92
92
  "Install-IntelliWake": "pnpm install && pnpm update -P @solidbasisventures/intelliwaketsfoundation",
93
+ "NPM-Login": "npm login",
93
94
  "Publish": "pnpm version patch && git push --tags && git push && pnpm publish",
94
95
  "Version-Minor-Advance": "pnpm version minor"
95
96
  }