@imagexmedia/typescript 0.0.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 +21 -0
- package/README.md +1 -0
- package/configs/default.tsconfig.json +8 -0
- package/package.json +30 -0
- package/tsconfig.json +12 -0
- package/types/drupal/11.x/ajax.d.ts +1 -0
- package/types/drupal/11.x/announce.d.ts +9 -0
- package/types/drupal/11.x/autocomplete.d.ts +1 -0
- package/types/drupal/11.x/debounce.d.ts +9 -0
- package/types/drupal/11.x/details-summarized-content.d.ts +1 -0
- package/types/drupal/11.x/dialog.d.ts +2 -0
- package/types/drupal/11.x/displace.d.ts +1 -0
- package/types/drupal/11.x/dropbutton.d.ts +1 -0
- package/types/drupal/11.x/drupal.d.ts +54 -0
- package/types/drupal/11.x/message.d.ts +1 -0
- package/types/drupal/11.x/modules/user.d.ts +12 -0
- package/types/drupal/11.x/once.d.ts +19 -0
- package/types/drupal/11.x/progress.d.ts +1 -0
- package/types/drupal/11.x/states.d.ts +1 -0
- package/types/drupal/11.x/tabbingmanager.d.ts +39 -0
- package/types/drupal/11.x/table-responsive.d.ts +1 -0
- package/types/drupal/11.x/table-select.d.ts +1 -0
- package/types/drupal/11.x/tabledrag.d.ts +2 -0
- package/types/drupal/11.x/time-diff.d.ts +1 -0
- package/types/drupal/11.x/vertical-tabs.d.ts +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [year] [fullname]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# SWAT TypeScript
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@imagexmedia/typescript",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"description": "The ImageX SWAT TypeScript package.",
|
|
6
|
+
"author": "ImageX Media",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"files": [
|
|
9
|
+
"LICENSE",
|
|
10
|
+
"README.md",
|
|
11
|
+
"configs",
|
|
12
|
+
"tsconfig.json",
|
|
13
|
+
"types"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "mkdir -p packs && npm pack --pack-destination packs"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"@tsconfig/node-ts": "^23.6.2",
|
|
20
|
+
"@tsconfig/node24": "^24.0.3",
|
|
21
|
+
"@tsconfig/recommended": "^1.0.13",
|
|
22
|
+
"@tsconfig/vite-react": "^3.4.0",
|
|
23
|
+
"@types/jquery": "^3.5.33",
|
|
24
|
+
"@types/jquery.form": "^3.26.35",
|
|
25
|
+
"@types/jqueryui": "^1.12.24",
|
|
26
|
+
"@types/node": "^24.10.2",
|
|
27
|
+
"tabbable": "^6.3.0",
|
|
28
|
+
"typescript": "^5.9.3"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": [
|
|
4
|
+
"@tsconfig/recommended/tsconfig.json",
|
|
5
|
+
"@tsconfig/node24/tsconfig.json",
|
|
6
|
+
"@tsconfig/node-ts/tsconfig.json",
|
|
7
|
+
"@tsconfig/vite-react/tsconfig.json"
|
|
8
|
+
],
|
|
9
|
+
"compilerOptions": {
|
|
10
|
+
"resolveJsonModule": true
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/ajax.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/autocomplete.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/details-summarized-content.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/displace.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/dropbutton/dropbutton.js
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/drupal.js
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
interface DrupalSettings {
|
|
5
|
+
[key: string]: any
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type DrupalContext = Document | HTMLElement
|
|
9
|
+
type DrupalDetachTrigger = 'unload' | 'move' | 'serialize'
|
|
10
|
+
type DrupalStringReplacement = Record<string, string | number>
|
|
11
|
+
|
|
12
|
+
interface DrupalLocaleOptions { context?: string }
|
|
13
|
+
|
|
14
|
+
interface DrupalTheme {
|
|
15
|
+
[key: string]: (...args: any[]) => string
|
|
16
|
+
placeholder: (value: string) => string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface Drupal {
|
|
20
|
+
[key: string]: any
|
|
21
|
+
throwError: (error: Error | string) => void
|
|
22
|
+
attachBehaviors: (context?: DrupalContext, settings?: DrupalSettings) => any
|
|
23
|
+
detachBehaviors: (context?: DrupalContext, settings?: DrupalSettings, trigger?: DrupalDetachTrigger) => any
|
|
24
|
+
behaviors: {
|
|
25
|
+
[key: string]: {
|
|
26
|
+
attach?: (context: DrupalContext, settings: DrupalSettings) => any
|
|
27
|
+
detach?: (context: DrupalContext, settings: DrupalSettings, trigger: DrupalDetachTrigger) => any
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
checkPlain: (value: string) => string
|
|
31
|
+
formatString: (value: string, args: DrupalStringReplacement) => string
|
|
32
|
+
stringReplace: (value: string, args: DrupalStringReplacement, keys?: string[]) => string
|
|
33
|
+
t: (value: string, args?: DrupalStringReplacement, options?: DrupalLocaleOptions) => string
|
|
34
|
+
formatPlural: (count: number, singular: string, plural: string, args?: DrupalStringReplacement, options?: DrupalLocaleOptions) => string
|
|
35
|
+
url: ((path: string) => string) & {
|
|
36
|
+
toAbsolute: (url: string) => string
|
|
37
|
+
isLocal: (url: string) => boolean
|
|
38
|
+
}
|
|
39
|
+
encodePath: (path: string) => string
|
|
40
|
+
theme: ((fn: string, ...args: any[]) => any) & DrupalTheme
|
|
41
|
+
elementIsVisible: (element: HTMLElement) => boolean
|
|
42
|
+
elementIsHidden: (element: HTMLElement) => boolean
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const drupalSettings: DrupalSettings
|
|
46
|
+
const Drupal: Drupal
|
|
47
|
+
|
|
48
|
+
interface Window {
|
|
49
|
+
drupalSettings: DrupalSettings
|
|
50
|
+
Drupal: Drupal
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/message.js
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/assets/vendor/once/once.js
|
|
2
|
+
|
|
3
|
+
type OnceSelector = NodeListOf<HTMLElement> | HTMLElement | HTMLElement[] | JQuery | string
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
type DrupalOnce = ((id: string, selector: OnceSelector, context?: DrupalContext) => HTMLElement[]) & {
|
|
7
|
+
filter: (id: string, selector: OnceSelector, context?: DrupalContext) => HTMLElement[]
|
|
8
|
+
find: (id: string, context?: DrupalContext) => HTMLElement[]
|
|
9
|
+
remove: (id: string, selector: OnceSelector, context?: DrupalContext) => HTMLElement[]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const once: DrupalOnce
|
|
13
|
+
|
|
14
|
+
interface Window {
|
|
15
|
+
once: DrupalOnce
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/progress.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/states.js
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/tabbingmanager.js
|
|
2
|
+
|
|
3
|
+
import type { tabbable as tabbableType } from 'tabbable'
|
|
4
|
+
|
|
5
|
+
type TabbingSelector = HTMLElement | HTMLElement[] | JQuery | Selection | string
|
|
6
|
+
|
|
7
|
+
declare global {
|
|
8
|
+
interface DrupalTabbingContext {
|
|
9
|
+
level?: number
|
|
10
|
+
$tabbableElements: JQuery
|
|
11
|
+
$disabledElements: JQuery
|
|
12
|
+
released: boolean
|
|
13
|
+
active: boolean
|
|
14
|
+
trapFocus: boolean
|
|
15
|
+
release: () => void
|
|
16
|
+
activate: () => void
|
|
17
|
+
deactivate: () => void
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface Drupal {
|
|
21
|
+
tabbingManager: {
|
|
22
|
+
stack: DrupalTabbingContext[]
|
|
23
|
+
constrain: (element: TabbingSelector, options: { trapFocus: boolean }) => DrupalTabbingContext[]
|
|
24
|
+
release: () => void
|
|
25
|
+
activate: (context: DrupalTabbingContext) => DrupalTabbingContext[]
|
|
26
|
+
deactivate: (context: DrupalTabbingContext) => DrupalTabbingContext[]
|
|
27
|
+
recordTabindex: (element: JQuery, level: number) => void
|
|
28
|
+
restoreTabindex: (element: JQuery, level: number) => void
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const tabbable: typeof tabbableType
|
|
33
|
+
|
|
34
|
+
interface Window {
|
|
35
|
+
tabbable: typeof tabbableType
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/tableresponsive.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/tableselect.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/time-diff.js
|
|
File without changes
|