retouche-dev 0.0.0-stage → 0.1.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/dist/next.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ import { t as ServerOptions } from "./options-BFTQdEZa.js";
2
+ type RouteHandler = (request: Request) => Promise<Response>;
3
+ export interface NextRoute {
4
+ GET: RouteHandler;
5
+ POST: RouteHandler;
6
+ }
7
+ export declare function createRoute(options?: ServerOptions): NextRoute;
8
+ export declare const GET: RouteHandler, POST: RouteHandler;
9
+ export type { ServerOptions };
package/dist/next.js ADDED
@@ -0,0 +1,16 @@
1
+ import { a as withoutEnvFiles, t as createRouteHandler } from "./handler-BHcVQ8_D.js";
2
+ // src/server/next.ts
3
+ function createRoute(options = {}) {
4
+ let handler = null;
5
+ const serve = async (request) => {
6
+ if (process.env.NODE_ENV !== "development") return new Response(null, { status: 404 });
7
+ handler ??= createRouteHandler(options, withoutEnvFiles(process.env, options));
8
+ return await handler(request);
9
+ };
10
+ return {
11
+ GET: serve,
12
+ POST: serve
13
+ };
14
+ }
15
+ const { GET, POST } = createRoute();
16
+ export { GET, POST, createRoute };
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ declare const EDITORS: readonly ["cursor", "vscode", "webstorm", "windsurf", "zed"];
3
+ type EditorId = (typeof EDITORS)[number];
4
+ declare const voiceOptionsSchema: z.ZodObject<{
5
+ agents: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
6
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
7
+ command: z.ZodString;
8
+ kind: z.ZodLiteral<"acp">;
9
+ mode: z.ZodOptional<z.ZodString>;
10
+ name: z.ZodString;
11
+ }, z.core.$strip>, z.ZodObject<{
12
+ apiKeyEnv: z.ZodOptional<z.ZodString>;
13
+ baseUrl: z.ZodURL;
14
+ model: z.ZodString;
15
+ name: z.ZodString;
16
+ kind: z.ZodLiteral<"endpoint">;
17
+ }, z.core.$strip>], "kind">>>;
18
+ transcriber: z.ZodDefault<z.ZodNullable<z.ZodObject<{
19
+ apiKeyEnv: z.ZodOptional<z.ZodString>;
20
+ baseUrl: z.ZodURL;
21
+ model: z.ZodString;
22
+ name: z.ZodString;
23
+ }, z.core.$strip>>>;
24
+ }, z.core.$strip>;
25
+ type VoiceOptions = z.input<typeof voiceOptionsSchema>;
26
+ interface ServerOptions {
27
+ allowedHosts?: string[];
28
+ editor?: EditorId;
29
+ root?: string;
30
+ voice?: VoiceOptions;
31
+ }
32
+ export { ServerOptions as t };
@@ -0,0 +1,144 @@
1
+ /**
2
+ * @license bippy
3
+ *
4
+ * Copyright (c) Aiden Bai
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ const t = `bippy-0.7.3`;
10
+ const n = Object.defineProperty;
11
+ const r = () => {};
12
+ const i = (e) => e.__REACT_DEVTOOLS_GLOBAL_HOOK__;
13
+ const a = (e) => Object.assign(e, { [Symbol.dispose]: e });
14
+ const o = (e) => {
15
+ let t = e.current.memoizedState;
16
+ return t === null || t !== void 0 && (t.element === null || t.element === void 0);
17
+ };
18
+ const s = (e) => {
19
+ try {
20
+ Function.prototype.toString.call(e).indexOf(`^_^`) > -1 && setTimeout(() => {
21
+ throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://react.dev/link/perf-use-production-build`);
22
+ });
23
+ } catch {}
24
+ };
25
+ const c = (e = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__) => !!(e && `getFiberRoots` in e && e._isBippyHook !== !0);
26
+ const l = (e = globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__) => {
27
+ if (!e || typeof e.inject != `function` || c(e)) return !1;
28
+ try {
29
+ return Function.prototype.toString.call(e.inject).includes(`(injected)`);
30
+ } catch {
31
+ return !1;
32
+ }
33
+ };
34
+ const u = /* @__PURE__ */ new Set();
35
+ const d = /* @__PURE__ */ new Set();
36
+ const f = /* @__PURE__ */ new WeakMap();
37
+ const p = /* @__PURE__ */ new Set();
38
+ const m = /* @__PURE__ */ new Set();
39
+ const h = /* @__PURE__ */ new WeakMap();
40
+ const g = (e, t) => {
41
+ u.add(e);
42
+ let n = f.get(e) ?? /* @__PURE__ */ new Set();
43
+ n.add(t), f.set(e, n);
44
+ };
45
+ const _ = (e, t) => {
46
+ let n = f.get(e);
47
+ n?.delete(t), (!n || n.size === 0) && (f.delete(e), u.delete(e));
48
+ };
49
+ const v = (e) => {
50
+ for (let t of u) f.get(t)?.has(e) && t();
51
+ };
52
+ const y = (e, t) => {
53
+ for (let n of p) n.target === e && n.listener(t);
54
+ };
55
+ const b = (e, t) => {
56
+ for (let n of m) n(e, t);
57
+ };
58
+ const S = (e) => (m.add(e), a(() => {
59
+ m.delete(e);
60
+ }));
61
+ const C = (e) => Object.prototype.toString.call(e) === `[object Map]`;
62
+ const w = (e) => (C(e.renderers) || (e.renderers = /* @__PURE__ */ new Map()), e.renderers);
63
+ const T = (e, t, n, r, i) => {
64
+ n.set(r, i), d.add(i), e._instrumentationIsActive || (e._instrumentationIsActive = !0, v(t));
65
+ let a = h.get(t) ?? /* @__PURE__ */ new WeakSet();
66
+ h.set(t, a), !a.has(i) && (a.add(i), y(t, i));
67
+ };
68
+ const E = (e, i = globalThis) => {
69
+ e && g(e, i);
70
+ let a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = (e) => {
71
+ let t = c.get(e) ?? /* @__PURE__ */ new Set();
72
+ return c.set(e, t), t;
73
+ }, u = 0, f = {
74
+ _instrumentationIsActive: !1,
75
+ _instrumentationSource: t,
76
+ _isBippyHook: !0,
77
+ checkDCE: s,
78
+ getFiberRoots: l,
79
+ hasUnsupportedRendererAttached: !1,
80
+ inject: (e) => {
81
+ let t = ++u;
82
+ return T(f, i, a, t, e), t;
83
+ },
84
+ on: r,
85
+ onCommitFiberRoot: (e, t) => {
86
+ let n = l(e);
87
+ o(t) ? n.delete(t) : n.add(t);
88
+ },
89
+ onCommitFiberUnmount: r,
90
+ onPostCommitFiberRoot: r,
91
+ renderers: a,
92
+ supportsFiber: !0,
93
+ supportsFlight: !0
94
+ };
95
+ try {
96
+ if (n(i, `__REACT_DEVTOOLS_GLOBAL_HOOK__`, {
97
+ configurable: !0,
98
+ enumerable: !0,
99
+ get: () => f,
100
+ set: (t) => {
101
+ if (t && typeof t == `object`) {
102
+ let n = f.renderers;
103
+ f = t;
104
+ let r = w(f);
105
+ n.forEach((e, t) => {
106
+ d.add(e), r.set(t, e);
107
+ }), (n.size > 0 || m.size > 0) && D(e, i), b(f, i);
108
+ }
109
+ }
110
+ }), i === globalThis && typeof window < `u`) {
111
+ let e = window.hasOwnProperty.bind(window), t = Object.getOwnPropertyDescriptor(window, `hasOwnProperty`), r = !1, i = () => {
112
+ t ? n(window, `hasOwnProperty`, t) : Reflect.deleteProperty(window, `hasOwnProperty`);
113
+ };
114
+ n(window, `hasOwnProperty`, {
115
+ configurable: !0,
116
+ value: (t) => !r && t === `__REACT_DEVTOOLS_GLOBAL_HOOK__` ? (r = !0, i(), globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__ = void 0, !1) : e(t),
117
+ writable: !0
118
+ });
119
+ }
120
+ } catch {
121
+ D(e, i);
122
+ }
123
+ return f;
124
+ };
125
+ const D = (e, n = globalThis) => {
126
+ e && g(e, n);
127
+ let a = !1, o = i(n);
128
+ if (!o) return;
129
+ let u = w(o);
130
+ if (!o._instrumentationSource) {
131
+ o.checkDCE = s, o.supportsFiber = !0, o.supportsFlight = !0, o.hasUnsupportedRendererAttached = !1, o._instrumentationSource = t, o._instrumentationIsActive = !1;
132
+ let e = c(o);
133
+ e || (o.on = r), u.size ? (u.forEach((e) => d.add(e)), o._instrumentationIsActive = !0, v(n), a = !0) : !e && l(o) && (o._instrumentationIsActive = !0, v(n), a = !0);
134
+ let i = o.inject;
135
+ o.inject = (e) => {
136
+ let t = i.call(o, e);
137
+ return T(o, n, u, t, e), t;
138
+ };
139
+ }
140
+ !a && (u.size || o._instrumentationIsActive) && e?.();
141
+ };
142
+ const O = (e = globalThis) => Object.hasOwn(e, `__REACT_DEVTOOLS_GLOBAL_HOOK__`);
143
+ const k = (e, t = globalThis) => O(t) ? (D(e, t), i(t) ?? E(e, t)) : E(e, t);
144
+ export { a, o as c, _ as i, t as l, O as n, d as o, S as r, k as s, C as t };