@gridland/web 0.2.33 → 0.2.34
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/dist/index.d.ts +3 -2
- package/dist/index.js +1750 -8254
- package/dist/index.js.map +4 -4
- package/dist/{next-Cwun29WQ.d.ts → next-Cdtr1evW.d.ts} +4 -90
- package/dist/next-plugin.cjs +12 -35
- package/dist/next-plugin.cjs.map +1 -1
- package/dist/next-plugin.d.cts +2 -7
- package/dist/next-plugin.d.ts +2 -7
- package/dist/next-plugin.js +12 -35
- package/dist/next-plugin.js.map +1 -1
- package/dist/next.d.ts +2 -1
- package/dist/next.js +654 -7623
- package/dist/next.js.map +4 -4
- package/dist/vite-plugin.d.ts +4 -9
- package/dist/vite-plugin.js +20 -74
- package/dist/vite-plugin.js.map +1 -1
- package/package.json +3 -5
- package/src/shims/native-stub.ts +6 -0
- package/src/shims/slider-deps.ts +2 -2
- package/dist/core-shims.js +0 -46163
- package/dist/core-shims.js.map +0 -7
- package/src/browser-buffer.ts +0 -715
- package/src/core-shims/index.ts +0 -269
- package/src/core-shims/renderable-types.ts +0 -4
- package/src/core-shims/rgba.ts +0 -195
- package/src/core-shims/types.ts +0 -132
- package/src/shims/console-stub.ts +0 -13
- package/src/shims/console.ts +0 -3
- package/src/shims/filters-stub.ts +0 -4
- package/src/shims/native-span-feed-stub.ts +0 -7
- package/src/shims/node-buffer.ts +0 -39
- package/src/shims/node-fs.ts +0 -20
- package/src/shims/node-os.ts +0 -6
- package/src/shims/node-path.ts +0 -35
- package/src/shims/node-stream.ts +0 -10
- package/src/shims/node-url.ts +0 -8
- package/src/shims/node-util.ts +0 -33
- package/src/shims/renderer-stub.ts +0 -21
- package/src/shims/timeline-stub.ts +0 -43
package/src/shims/node-path.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// Browser shim for node:path
|
|
2
|
-
export function join(...parts: string[]): string {
|
|
3
|
-
return parts.join("/").replace(/\/+/g, "/")
|
|
4
|
-
}
|
|
5
|
-
export function resolve(...parts: string[]): string {
|
|
6
|
-
return join(...parts)
|
|
7
|
-
}
|
|
8
|
-
export function dirname(p: string): string {
|
|
9
|
-
return p.split("/").slice(0, -1).join("/") || "/"
|
|
10
|
-
}
|
|
11
|
-
export function basename(p: string, ext?: string): string {
|
|
12
|
-
const base = p.split("/").pop() || ""
|
|
13
|
-
if (ext && base.endsWith(ext)) return base.slice(0, -ext.length)
|
|
14
|
-
return base
|
|
15
|
-
}
|
|
16
|
-
export function extname(p: string): string {
|
|
17
|
-
const base = basename(p)
|
|
18
|
-
const idx = base.lastIndexOf(".")
|
|
19
|
-
return idx >= 0 ? base.slice(idx) : ""
|
|
20
|
-
}
|
|
21
|
-
export function parse(p: string): { root: string; dir: string; base: string; ext: string; name: string } {
|
|
22
|
-
const dir = dirname(p)
|
|
23
|
-
const base = basename(p)
|
|
24
|
-
const ext = extname(p)
|
|
25
|
-
const name = ext ? base.slice(0, -ext.length) : base
|
|
26
|
-
return { root: p.startsWith("/") ? "/" : "", dir, base, ext, name }
|
|
27
|
-
}
|
|
28
|
-
export function isAbsolute(p: string): boolean {
|
|
29
|
-
return p.startsWith("/")
|
|
30
|
-
}
|
|
31
|
-
export function relative(from: string, to: string): string {
|
|
32
|
-
return to.replace(from, "").replace(/^\//, "")
|
|
33
|
-
}
|
|
34
|
-
export const sep = "/"
|
|
35
|
-
export default { join, resolve, dirname, basename, extname, parse, isAbsolute, relative, sep }
|
package/src/shims/node-stream.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// Browser stub for node:stream
|
|
2
|
-
export class Writable {
|
|
3
|
-
write(_chunk: any): boolean { return true }
|
|
4
|
-
end(): void {}
|
|
5
|
-
}
|
|
6
|
-
export class Readable {
|
|
7
|
-
read(): any { return null }
|
|
8
|
-
}
|
|
9
|
-
export class Transform extends Writable {}
|
|
10
|
-
export default { Writable, Readable, Transform }
|
package/src/shims/node-url.ts
DELETED
package/src/shims/node-util.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// Browser stub for node:util
|
|
2
|
-
export function inspect(obj: any, _options?: any): string {
|
|
3
|
-
try {
|
|
4
|
-
return JSON.stringify(obj, null, 2)
|
|
5
|
-
} catch {
|
|
6
|
-
return String(obj)
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function format(fmt: string, ...args: any[]): string {
|
|
11
|
-
let i = 0
|
|
12
|
-
return fmt.replace(/%[sdjifoO%]/g, (match) => {
|
|
13
|
-
if (match === "%%") return "%"
|
|
14
|
-
if (i >= args.length) return match
|
|
15
|
-
return String(args[i++])
|
|
16
|
-
})
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function promisify(fn: Function): Function {
|
|
20
|
-
return (...args: any[]) =>
|
|
21
|
-
new Promise((resolve, reject) => {
|
|
22
|
-
fn(...args, (err: any, result: any) => {
|
|
23
|
-
if (err) reject(err)
|
|
24
|
-
else resolve(result)
|
|
25
|
-
})
|
|
26
|
-
})
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function isDeepStrictEqual(a: any, b: any): boolean {
|
|
30
|
-
return JSON.stringify(a) === JSON.stringify(b)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default { inspect, format, promisify, isDeepStrictEqual }
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// Stub for opentui/packages/core/src/renderer.ts
|
|
2
|
-
import { EventEmitter } from "events"
|
|
3
|
-
|
|
4
|
-
export enum CliRenderEvents {
|
|
5
|
-
DESTROY = "destroy",
|
|
6
|
-
DEBUG_OVERLAY_TOGGLE = "debug_overlay_toggle",
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export class CliRenderer extends EventEmitter {
|
|
10
|
-
root: any = null
|
|
11
|
-
keyInput: any = new EventEmitter()
|
|
12
|
-
destroy(): void {
|
|
13
|
-
this.emit(CliRenderEvents.DESTROY)
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type MouseEvent = any
|
|
18
|
-
|
|
19
|
-
export function createCliRenderer(): Promise<CliRenderer> {
|
|
20
|
-
return Promise.resolve(new CliRenderer())
|
|
21
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// Stub for opentui/packages/core/src/animation/Timeline.ts
|
|
2
|
-
export class Timeline {
|
|
3
|
-
public isPlaying: boolean = false
|
|
4
|
-
public isComplete: boolean = false
|
|
5
|
-
public duration: number = 1000
|
|
6
|
-
public loop: boolean = false
|
|
7
|
-
public synced: boolean = false
|
|
8
|
-
public currentTime: number = 0
|
|
9
|
-
public items: any[] = []
|
|
10
|
-
public subTimelines: any[] = []
|
|
11
|
-
|
|
12
|
-
constructor(_options: any = {}) {}
|
|
13
|
-
addStateChangeListener(_listener: any): void {}
|
|
14
|
-
removeStateChangeListener(_listener: any): void {}
|
|
15
|
-
add(_target: any, _options: any): this { return this }
|
|
16
|
-
call(_callback: () => void): this { return this }
|
|
17
|
-
play(): this {
|
|
18
|
-
this.isPlaying = true
|
|
19
|
-
return this
|
|
20
|
-
}
|
|
21
|
-
pause(): this {
|
|
22
|
-
this.isPlaying = false
|
|
23
|
-
return this
|
|
24
|
-
}
|
|
25
|
-
restart(): void {}
|
|
26
|
-
update(_deltaTime: number): void {}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
class TimelineEngine {
|
|
30
|
-
defaults = { frameRate: 60 }
|
|
31
|
-
attach(_renderer: any): void {}
|
|
32
|
-
detach(): void {}
|
|
33
|
-
register(_timeline: Timeline): void {}
|
|
34
|
-
unregister(_timeline: Timeline): void {}
|
|
35
|
-
clear(): void {}
|
|
36
|
-
update(_deltaTime: number): void {}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export const engine = new TimelineEngine()
|
|
40
|
-
|
|
41
|
-
export function createTimeline(options: any = {}): Timeline {
|
|
42
|
-
return new Timeline(options)
|
|
43
|
-
}
|