@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.
Files changed (39) hide show
  1. package/dist/index.d.ts +3 -2
  2. package/dist/index.js +1750 -8254
  3. package/dist/index.js.map +4 -4
  4. package/dist/{next-Cwun29WQ.d.ts → next-Cdtr1evW.d.ts} +4 -90
  5. package/dist/next-plugin.cjs +12 -35
  6. package/dist/next-plugin.cjs.map +1 -1
  7. package/dist/next-plugin.d.cts +2 -7
  8. package/dist/next-plugin.d.ts +2 -7
  9. package/dist/next-plugin.js +12 -35
  10. package/dist/next-plugin.js.map +1 -1
  11. package/dist/next.d.ts +2 -1
  12. package/dist/next.js +654 -7623
  13. package/dist/next.js.map +4 -4
  14. package/dist/vite-plugin.d.ts +4 -9
  15. package/dist/vite-plugin.js +20 -74
  16. package/dist/vite-plugin.js.map +1 -1
  17. package/package.json +3 -5
  18. package/src/shims/native-stub.ts +6 -0
  19. package/src/shims/slider-deps.ts +2 -2
  20. package/dist/core-shims.js +0 -46163
  21. package/dist/core-shims.js.map +0 -7
  22. package/src/browser-buffer.ts +0 -715
  23. package/src/core-shims/index.ts +0 -269
  24. package/src/core-shims/renderable-types.ts +0 -4
  25. package/src/core-shims/rgba.ts +0 -195
  26. package/src/core-shims/types.ts +0 -132
  27. package/src/shims/console-stub.ts +0 -13
  28. package/src/shims/console.ts +0 -3
  29. package/src/shims/filters-stub.ts +0 -4
  30. package/src/shims/native-span-feed-stub.ts +0 -7
  31. package/src/shims/node-buffer.ts +0 -39
  32. package/src/shims/node-fs.ts +0 -20
  33. package/src/shims/node-os.ts +0 -6
  34. package/src/shims/node-path.ts +0 -35
  35. package/src/shims/node-stream.ts +0 -10
  36. package/src/shims/node-url.ts +0 -8
  37. package/src/shims/node-util.ts +0 -33
  38. package/src/shims/renderer-stub.ts +0 -21
  39. package/src/shims/timeline-stub.ts +0 -43
@@ -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 }
@@ -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 }
@@ -1,8 +0,0 @@
1
- // Browser stub for node:url
2
- export function fileURLToPath(url: string): string {
3
- return url.replace("file://", "")
4
- }
5
- export function pathToFileURL(path: string): URL {
6
- return new URL(`file://${path}`)
7
- }
8
- export default { fileURLToPath, pathToFileURL }
@@ -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
- }