@lls/typings 24.1.31-fdeea818 → 24.1.32-0c894e04
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 +10 -10
- 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,16 +4,20 @@ 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
|
+
} & Rect
|
|
17
|
+
|
|
14
18
|
export type ZoomZoneType = ZoneType & { type: Extract<SubzoneTypeCategory, 'subZone'> }
|
|
15
|
-
export type DefinitionsType = ZoneType & { type: Extract<SubzoneTypeCategory, 'definition'
|
|
16
|
-
export type PicWordType = ZoneType & { type: Extract<SubzoneTypeCategory, 'picWord'>; word?: string }
|
|
19
|
+
export type DefinitionsType = ZoneType & { type: Extract<SubzoneTypeCategory, 'definition'>; src?: string }
|
|
20
|
+
export type PicWordType = ZoneType & { type: Extract<SubzoneTypeCategory, 'picWord'>; word?: string; src?: string }
|
|
17
21
|
|
|
18
22
|
export type SubZoneType = ZoomZoneType | DefinitionsType | PicWordType
|
|
19
23
|
|
|
@@ -23,7 +27,6 @@ export type DocJson<T extends 'primary' | 'default' = 'default'> = {
|
|
|
23
27
|
contentMd?: string
|
|
24
28
|
} & (T extends 'primary'
|
|
25
29
|
? {
|
|
26
|
-
src?: string
|
|
27
30
|
picWords?: PicWordType[]
|
|
28
31
|
definitions?: DefinitionsType[]
|
|
29
32
|
subZones?: ZoomZoneType[]
|
|
@@ -77,11 +80,7 @@ export type LayoutCell = {
|
|
|
77
80
|
|
|
78
81
|
export type PrimaryLayoutItem = {
|
|
79
82
|
id: string
|
|
80
|
-
|
|
81
|
-
y: number
|
|
82
|
-
w: number
|
|
83
|
-
h: number
|
|
84
|
-
}
|
|
83
|
+
} & Rect
|
|
85
84
|
|
|
86
85
|
export type Page<T extends 'primary' | 'default' = 'default'> = {
|
|
87
86
|
id?: number
|
|
@@ -119,6 +118,7 @@ export type Page<T extends 'primary' | 'default' = 'default'> = {
|
|
|
119
118
|
metadata?: TODO | null
|
|
120
119
|
} & (T extends 'primary'
|
|
121
120
|
? {
|
|
121
|
+
picture?: string
|
|
122
122
|
children?: PrimaryDoc[]
|
|
123
123
|
layouts?: {
|
|
124
124
|
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-0c894e04",
|
|
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": {
|