@lls/typings 24.1.31-fe27e141 → 24.1.32-14d20dce
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/internal/page.d.ts +9 -7
- package/internal/school.d.ts +2 -0
- package/overrides/global.d.ts +14 -0
- package/overrides/lodash.d.ts +4 -0
- package/overrides/window.d.ts +2 -0
- package/package.json +2 -1
- package/overrides/cheerio.d.ts +0 -6
package/internal/page.d.ts
CHANGED
|
@@ -4,13 +4,18 @@ export type ScreenMode = 'grid-xs' | 'grid-md'
|
|
|
4
4
|
|
|
5
5
|
export type SubzoneTypeCategory = 'picWord' | 'definition' | 'subZone'
|
|
6
6
|
|
|
7
|
-
export type
|
|
8
|
-
id: string
|
|
7
|
+
export type Rect = {
|
|
9
8
|
x: number
|
|
10
9
|
y: number
|
|
11
10
|
w: number
|
|
12
11
|
h: number
|
|
13
12
|
}
|
|
13
|
+
|
|
14
|
+
export type ZoneType = {
|
|
15
|
+
id: string
|
|
16
|
+
src?: string
|
|
17
|
+
} & Rect
|
|
18
|
+
|
|
14
19
|
export type ZoomZoneType = ZoneType & { type: Extract<SubzoneTypeCategory, 'subZone'> }
|
|
15
20
|
export type DefinitionsType = ZoneType & { type: Extract<SubzoneTypeCategory, 'definition'> }
|
|
16
21
|
export type PicWordType = ZoneType & { type: Extract<SubzoneTypeCategory, 'picWord'>; word?: string }
|
|
@@ -77,11 +82,7 @@ export type LayoutCell = {
|
|
|
77
82
|
|
|
78
83
|
export type PrimaryLayoutItem = {
|
|
79
84
|
id: string
|
|
80
|
-
|
|
81
|
-
y: number
|
|
82
|
-
w: number
|
|
83
|
-
h: number
|
|
84
|
-
}
|
|
85
|
+
} & Rect
|
|
85
86
|
|
|
86
87
|
export type Page<T extends 'primary' | 'default' = 'default'> = {
|
|
87
88
|
id?: number
|
|
@@ -119,6 +120,7 @@ export type Page<T extends 'primary' | 'default' = 'default'> = {
|
|
|
119
120
|
metadata?: TODO | null
|
|
120
121
|
} & (T extends 'primary'
|
|
121
122
|
? {
|
|
123
|
+
picture?: string
|
|
122
124
|
children?: PrimaryDoc[]
|
|
123
125
|
layouts?: {
|
|
124
126
|
primary?: PrimaryLayoutItem[]
|
package/internal/school.d.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type CheerioModule from 'cheerio'
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
// https://stackoverflow.com/questions/35074713/extending-typescript-global-object-in-node-js
|
|
5
|
+
var cheerio: typeof CheerioModule
|
|
6
|
+
var __SERVER__: boolean
|
|
7
|
+
|
|
8
|
+
namespace NodeJS {
|
|
9
|
+
interface ProcessEnv {
|
|
10
|
+
NODE_ENV: 'local' | 'development' | 'production'
|
|
11
|
+
CONF_ENV: 'local' | 'development' | 'test' | 'preprod' | 'production' | 'prod'
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
package/overrides/lodash.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AnyFunction } from '@typings/utils'
|
|
1
2
|
import type lo from 'lodash'
|
|
2
3
|
import type _ from 'lodash/fp'
|
|
3
4
|
import type { ValueOf } from '../utils.d.ts'
|
|
@@ -9,6 +10,9 @@ declare module 'lodash/fp.js' {
|
|
|
9
10
|
collection: Iterable
|
|
10
11
|
) => TResult[]
|
|
11
12
|
}
|
|
13
|
+
interface LodashDebounce {
|
|
14
|
+
convert: (options: { fixed: false }) => <T extends AnyFunction>(delay: number, fn: T, opts: { leading?: boolean; trailing?: boolean }) => T
|
|
15
|
+
}
|
|
12
16
|
|
|
13
17
|
interface LodashForEach {
|
|
14
18
|
convert: (a: { cap: false }) => <Iterable, TResult>(
|
package/overrides/window.d.ts
CHANGED
|
@@ -4,10 +4,12 @@ type TPianoOpts = {
|
|
|
4
4
|
} & Record<string, unknown>
|
|
5
5
|
|
|
6
6
|
interface Window {
|
|
7
|
+
__PRELOADED_STATE__: string | undefined
|
|
7
8
|
opera: any | undefined
|
|
8
9
|
MSStream: any | undefined
|
|
9
10
|
coreOpenWindow?: typeof window.open
|
|
10
11
|
coreHref?: string
|
|
12
|
+
outerHTML: unknown
|
|
11
13
|
pa?: {
|
|
12
14
|
user?: {
|
|
13
15
|
setUser?: (user_id: TPianoOpts['user_id'], user_category: TPianoOpts['user_category']) => void
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lls/typings",
|
|
3
|
-
"version": "24.1.
|
|
3
|
+
"version": "24.1.32-14d20dce",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"keywords": [],
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"@types/domhandler": "2.4.5",
|
|
11
11
|
"@types/lodash": "4.14.202",
|
|
12
12
|
"@types/react": "18.2.45",
|
|
13
|
+
"cheerio": "1.0.0-rc.12",
|
|
13
14
|
"typescript": "5.4.5"
|
|
14
15
|
},
|
|
15
16
|
"peerDependencies": {
|