Area restrita - Questionario

This commit is contained in:
2026-06-08 23:50:59 -03:00
parent f2e2400637
commit ef968f10ae
6972 changed files with 23454 additions and 2267883 deletions
+6
View File
@@ -0,0 +1,6 @@
{
"version": 1,
"features": ["auth","db"],
"app_id": "19ea9897-40f2-8c3c-8000-0000bdf34d18",
"initialized_at": "2026-06-08T23:21:32Z"
}
+5
View File
@@ -0,0 +1,5 @@
node_modules
dist
.git
*.swp
*.log
+17
View File
@@ -0,0 +1,17 @@
# ── Backend ─────────────────────────────────────────────────────
APP_ID= # Application ID
APP_SECRET= # Application secret (used for JWT signing)
# ── Database ───────────────────────────────────────────────────
DATABASE_URL= # MySQL connection string (mysql://user:pass@host:port/db)
# ── Frontend (exposed to browser via Vite) ──────────────────────
VITE_KIMI_AUTH_URL= # Kimi OAuth server URL (e.g. https://auth.kimi.com)
VITE_APP_ID= # OAuth application ID
# ── Backend (Auth) ─────────────────────────────────────────────
KIMI_AUTH_URL= # Kimi OAuth server URL (backend)
KIMI_OPEN_URL= # Kimi Open Platform URL (e.g. https://open.kimi.com)
# ── Admin Role ──────────────────────────────────────────────────
OWNER_UNION_ID= # Union ID of the app creator; this user gets role "admin" on first login
+20 -25
View File
@@ -7,40 +7,35 @@ yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
# Build
node_modules
dist
dist-ssr
*.local
# Cache
.cache
.vite
# Dependencias
node_modules
# Ambiente (NUNCA commite!)
.env
.env.local
.env.*.local
# Editor
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# OS
.DS_Store
Thumbs.db
# Scripts de deploy local
scripts/.env.local
# ZIPs internos (nunca commite!)
*.zip
avanzato-*.zip
# Environment variables
.env
.env.local
.env.*.local
# Database
*.db
*.sqlite
*.sqlite3
db/migrations/*.sql
# TypeScript cache
*.tsbuildinfo
# Build outputs
dist/
build/
# Test coverage
coverage/
.nyc_output/
+35
View File
@@ -0,0 +1,35 @@
# Dependencies
node_modules/
.pnpm-store/
# Build outputs
dist/
build/
*.dist
# Generated files
*.tsbuildinfo
coverage/
# Package files
package-lock.json
pnpm-lock.yaml
# Database
*.db
*.sqlite
*.sqlite3
# Logs
*.log
# Environment files
.env*
# IDE files
.vscode/
.idea/
# OS files
.DS_Store
Thumbs.db
+15
View File
@@ -0,0 +1,15 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": false,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "avoid",
"endOfLine": "lf",
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"proseWrap": "preserve"
}
+22
View File
@@ -0,0 +1,22 @@
import * as cookie from "cookie";
import { Session } from "@contracts/constants";
import { getSessionCookieOptions } from "./lib/cookies";
import { createRouter, authedQuery } from "./middleware";
export const authRouter = createRouter({
me: authedQuery.query((opts) => opts.ctx.user),
logout: authedQuery.mutation(async ({ ctx }) => {
const opts = getSessionCookieOptions(ctx.req.headers);
ctx.resHeaders.append(
"set-cookie",
cookie.serialize(Session.cookieName, "", {
httpOnly: opts.httpOnly,
path: opts.path,
sameSite: opts.sameSite?.toLowerCase() as "lax" | "none",
secure: opts.secure,
maxAge: 0,
}),
);
return { success: true };
}),
});
+36
View File
@@ -0,0 +1,36 @@
import { Hono } from "hono";
import { bodyLimit } from "hono/body-limit";
import type { HttpBindings } from "@hono/node-server";
import { fetchRequestHandler } from "@trpc/server/adapters/fetch";
import { appRouter } from "./router";
import { createContext } from "./context";
import { env } from "./lib/env";
import { createOAuthCallbackHandler } from "./kimi/auth";
import { Paths } from "@contracts/constants";
const app = new Hono<{ Bindings: HttpBindings }>();
app.use(bodyLimit({ maxSize: 50 * 1024 * 1024 }));
app.get(Paths.oauthCallback, createOAuthCallbackHandler());
app.use("/api/trpc/*", async (c) => {
return fetchRequestHandler({
endpoint: "/api/trpc",
req: c.req.raw,
router: appRouter,
createContext,
});
});
app.all("/api/*", (c) => c.json({ error: "Not Found" }, 404));
export default app;
if (env.isProduction) {
const { serve } = await import("@hono/node-server");
const { serveStaticFiles } = await import("./lib/vite");
serveStaticFiles(app);
const port = parseInt(process.env.PORT || "3000");
serve({ fetch: app.fetch, port }, () => {
console.log(`Server running on http://localhost:${port}/`);
});
}
+21
View File
@@ -0,0 +1,21 @@
import type { FetchCreateContextFnOptions } from "@trpc/server/adapters/fetch";
import type { User } from "@db/schema";
import { authenticateRequest } from "./kimi/auth";
export type TrpcContext = {
req: Request;
resHeaders: Headers;
user?: User;
};
export async function createContext(
opts: FetchCreateContextFnOptions,
): Promise<TrpcContext> {
const ctx: TrpcContext = { req: opts.req, resHeaders: opts.resHeaders };
try {
ctx.user = await authenticateRequest(opts.req.headers);
} catch {
// Authentication is optional here
}
return ctx;
}
+211
View File
@@ -0,0 +1,211 @@
// ============================================================================
// FORM ROUTER - Area do Cliente Avanzato
// ============================================================================
// Routers para gestao de formularios e respostas
// ============================================================================
import { z } from "zod";
import { createRouter, publicQuery, authedQuery } from "./middleware";
import { getDb } from "./queries/connection";
import { clientForms, formSections, formQuestions, formAnswers, formSubmissions } from "../db/schema";
import { eq, desc, and } from "drizzle-orm";
// Gerar codigo aleatorio de 8 caracteres
function generateCode(): string {
return Math.random().toString(36).substring(2, 10).toUpperCase();
}
export const formRouter = createRouter({
// ==========================================================================
// ADMIN - Gerenciamento de Formularios
// ==========================================================================
// Listar todos os formularios
list: publicQuery.query(async () => {
const db = getDb();
const forms = await db.select().from(clientForms).orderBy(desc(clientForms.createdAt));
return forms;
}),
// Criar novo formulario
create: publicQuery
.input(
z.object({
title: z.string().min(1),
description: z.string().optional(),
clientName: z.string().min(1),
clientEmail: z.string().email().optional(),
})
)
.mutation(async ({ input }) => {
const db = getDb();
const code = generateCode();
await db.insert(clientForms).values({
title: input.title,
description: input.description || "",
clientName: input.clientName,
clientEmail: input.clientEmail || "",
status: "active",
accessCode: code,
createdBy: "Avanzato",
});
return { code, message: "Formulario criado com sucesso" };
}),
// Atualizar status (active/inactive/archived)
updateStatus: publicQuery
.input(
z.object({
accessCode: z.string(),
status: z.enum(["active", "inactive", "archived"]),
})
)
.mutation(async ({ input }) => {
const db = getDb();
await db
.update(clientForms)
.set({ status: input.status })
.where(eq(clientForms.accessCode, input.accessCode));
return { message: "Status atualizado" };
}),
// Excluir formulario
delete: publicQuery
.input(z.object({ accessCode: z.string() }))
.mutation(async ({ input }) => {
const db = getDb();
// Primeiro excluir respostas e perguntas
await db.delete(formAnswers).where(eq(formAnswers.formId, input.accessCode));
await db.delete(formQuestions).where(eq(formQuestions.formId, input.accessCode));
await db.delete(formSections).where(eq(formSections.formId, input.accessCode));
await db.delete(formSubmissions).where(eq(formSubmissions.formId, input.accessCode));
await db.delete(clientForms).where(eq(clientForms.accessCode, input.accessCode));
return { message: "Formulario excluido" };
}),
// Renovar codigo de acesso
regenerateCode: publicQuery
.input(z.object({ accessCode: z.string() }))
.mutation(async ({ input }) => {
const db = getDb();
const newCode = generateCode();
await db
.update(clientForms)
.set({ accessCode: newCode })
.where(eq(clientForms.accessCode, input.accessCode));
return { newCode };
}),
// ==========================================================================
// PUBLICO - Acesso ao Formulario via Codigo
// ==========================================================================
// Buscar formulario por codigo (publico)
getByCode: publicQuery
.input(z.object({ code: z.string() }))
.query(async ({ input }) => {
const db = getDb();
const [form] = await db
.select()
.from(clientForms)
.where(eq(clientForms.accessCode, input.code));
if (!form) return null;
if (form.status !== "active") return { ...form, _blocked: true };
// Buscar perguntas agrupadas por secao
const questions = await db
.select()
.from(formQuestions)
.where(eq(formQuestions.formId, input.code))
.orderBy(formQuestions.id);
const sections = await db
.select()
.from(formSections)
.where(eq(formSections.formId, input.code))
.orderBy(formSections.id);
return { ...form, questions, sections };
}),
// Submeter respostas do formulario
submit: publicQuery
.input(
z.object({
formId: z.string(),
code: z.string(),
answers: z.array(
z.object({
questionId: z.string(),
answer: z.string(),
})
),
submittedBy: z.string().optional(),
submittedByEmail: z.string().optional(),
})
)
.mutation(async ({ input }) => {
const db = getDb();
// Verificar se formulario esta ativo
const [form] = await db
.select()
.from(clientForms)
.where(eq(clientForms.accessCode, input.code));
if (!form || form.status !== "active") {
throw new Error("Formulario nao encontrado ou inativo");
}
// Inserir submissao
await db.insert(formSubmissions).values({
formId: input.formId,
submittedBy: input.submittedBy || "Anonimo",
submittedByEmail: input.submittedByEmail || "",
});
// Inserir respostas
for (const a of input.answers) {
await db.insert(formAnswers).values({
formId: input.formId,
questionId: a.questionId,
answer: a.answer,
});
}
return { message: "Respostas submetidas com sucesso" };
}),
// ==========================================================================
// ADMIN - Visualizar Respostas
// ==========================================================================
// Listar submissoes de um formulario
getSubmissions: publicQuery
.input(z.object({ accessCode: z.string() }))
.query(async ({ input }) => {
const db = getDb();
const submissions = await db
.select()
.from(formSubmissions)
.where(eq(formSubmissions.formId, input.accessCode))
.orderBy(desc(formSubmissions.createdAt));
return submissions;
}),
// Obter todas as respostas de uma submissao
getAnswers: publicQuery
.input(z.object({ formId: z.string() }))
.query(async ({ input }) => {
const db = getDb();
const answers = await db
.select()
.from(formAnswers)
.where(eq(formAnswers.formId, input.formId))
.orderBy(formAnswers.id);
return answers;
}),
});
+130
View File
@@ -0,0 +1,130 @@
import type { Context } from "hono";
import { setCookie } from "hono/cookie";
import * as jose from "jose";
import * as cookie from "cookie";
import { env } from "../lib/env";
import { getSessionCookieOptions } from "../lib/cookies";
import { Session } from "@contracts/constants";
import { Errors } from "@contracts/errors";
import { signSessionToken, verifySessionToken } from "./session";
import { users as kimiUsers } from "./platform";
import { findUserByUnionId, upsertUser } from "../queries/users";
import type { TokenResponse } from "./types";
async function exchangeAuthCode(
code: string,
redirectUri: string,
): Promise<TokenResponse> {
const body = new URLSearchParams({
grant_type: "authorization_code",
code,
client_id: env.appId,
redirect_uri: redirectUri,
client_secret: env.appSecret,
});
const resp = await fetch(`${env.kimiAuthUrl}/api/oauth/token`, {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: body.toString(),
});
if (!resp.ok) {
const text = await resp.text();
throw new Error(`Token exchange failed (${resp.status}): ${text}`);
}
return resp.json() as Promise<TokenResponse>;
}
const jwks = jose.createRemoteJWKSet(
new URL(`${env.kimiAuthUrl}/api/.well-known/jwks.json`),
);
async function verifyAccessToken(
accessToken: string,
): Promise<{ userId: string; clientId: string }> {
const { payload } = await jose.jwtVerify(accessToken, jwks);
const userId = payload.user_id as string;
const clientId = payload.client_id as string;
if (!userId) {
throw new Error("user_id missing from access token");
}
return { userId, clientId };
}
export async function authenticateRequest(headers: Headers) {
const cookies = cookie.parse(headers.get("cookie") || "");
const token = cookies[Session.cookieName];
if (!token) {
console.warn("[auth] No session cookie found in request.");
throw Errors.forbidden("Invalid authentication token.");
}
const claim = await verifySessionToken(token);
if (!claim) {
throw Errors.forbidden("Invalid authentication token.");
}
const user = await findUserByUnionId(claim.unionId);
if (!user) {
throw Errors.forbidden("User not found. Please re-login.");
}
return user;
}
export function createOAuthCallbackHandler() {
return async (c: Context) => {
const code = c.req.query("code");
const state = c.req.query("state");
const error = c.req.query("error");
const errorDescription = c.req.query("error_description");
if (error) {
if (error === "access_denied") {
return c.redirect("/", 302);
}
return c.json(
{ error, error_description: errorDescription },
400,
);
}
if (!code || !state) {
return c.json({ error: "code and state are required" }, 400);
}
try {
const redirectUri = atob(state);
const tokenResp = await exchangeAuthCode(code, redirectUri);
const { userId } = await verifyAccessToken(tokenResp.access_token);
const userProfile = await kimiUsers.getProfile(tokenResp.access_token);
if (!userProfile) {
throw new Error("Failed to fetch user profile from Kimi Open");
}
await upsertUser({
unionId: userId,
name: userProfile.name,
avatar: userProfile.avatar_url,
lastSignInAt: new Date(),
});
const token = await signSessionToken({
unionId: userId,
clientId: env.appId,
});
const cookieOpts = getSessionCookieOptions(c.req.raw.headers);
setCookie(c, Session.cookieName, token, {
...cookieOpts,
maxAge: Session.maxAgeMs / 1000,
});
return c.redirect("/", 302);
} catch (error) {
console.error("[OAuth] Callback failed", error);
return c.json({ error: "OAuth callback failed" }, 500);
}
};
}
export { exchangeAuthCode, verifyAccessToken };
+30
View File
@@ -0,0 +1,30 @@
import { env } from "../lib/env";
import type { UserProfile } from "./types";
async function kimiRequest<T>(
path: string,
token: string,
init?: RequestInit,
): Promise<T | null> {
const resp = await fetch(`${env.kimiOpenUrl}${path}`, {
...init,
headers: {
Accept: "application/json",
Authorization: `Bearer ${token}`,
...init?.headers,
},
});
if (!resp.ok) {
const text = await resp.text();
console.warn(
`[kimi] Request to ${path} failed (${resp.status}): ${text}`,
);
return null;
}
return resp.json() as Promise<T>;
}
export const users = {
getProfile: (token: string) =>
kimiRequest<UserProfile>("/v1/users/me/profile", token),
};
+40
View File
@@ -0,0 +1,40 @@
import * as jose from "jose";
import { env } from "../lib/env";
import type { SessionPayload } from "./types";
const JWT_ALG = "HS256";
export async function signSessionToken(
payload: SessionPayload,
): Promise<string> {
const secret = new TextEncoder().encode(env.appSecret);
return new jose.SignJWT(payload)
.setProtectedHeader({ alg: JWT_ALG })
.setIssuedAt()
.setExpirationTime("1 year")
.sign(secret);
}
export async function verifySessionToken(
token: string,
): Promise<SessionPayload | null> {
if (!token) {
console.warn("[session] No token provided for verification.");
return null;
}
try {
const secret = new TextEncoder().encode(env.appSecret);
const { payload } = await jose.jwtVerify(token, secret, {
algorithms: [JWT_ALG],
});
const { unionId, clientId } = payload;
if (!unionId || !clientId) {
console.warn("[session] JWT payload missing required fields.");
return null;
}
return { unionId, clientId } as SessionPayload;
} catch (error) {
console.warn("[session] JWT verification failed:", error);
return null;
}
}
+18
View File
@@ -0,0 +1,18 @@
export type TokenResponse = {
access_token: string;
token_type: string;
expires_in: number;
refresh_token?: string;
scope: string;
};
export type SessionPayload = {
unionId: string;
clientId: string;
};
export type UserProfile = {
user_id: string;
name: string;
avatar_url: string;
};
+17
View File
@@ -0,0 +1,17 @@
import type { CookieOptions } from "hono/utils/cookie";
function isLocalhost(headers: Headers): boolean {
const host = headers.get("host") || "";
return host.startsWith("localhost:") || host.startsWith("127.0.0.1:");
}
export function getSessionCookieOptions(headers: Headers): CookieOptions {
const localhost = isLocalhost(headers);
return {
httpOnly: true,
path: "/",
sameSite: localhost ? "Lax" : "None",
secure: !localhost,
};
}
+19
View File
@@ -0,0 +1,19 @@
import "dotenv/config";
function required(name: string): string {
const value = process.env[name];
if (!value && process.env.NODE_ENV === "production") {
throw new Error(`Missing required environment variable: ${name}`);
}
return value ?? "";
}
export const env = {
appId: required("APP_ID"),
appSecret: required("APP_SECRET"),
isProduction: process.env.NODE_ENV === "production",
databaseUrl: required("DATABASE_URL"),
kimiAuthUrl: required("KIMI_AUTH_URL"),
kimiOpenUrl: required("KIMI_OPEN_URL"),
ownerUnionId: process.env.OWNER_UNION_ID ?? "",
};
+77
View File
@@ -0,0 +1,77 @@
interface RequestConfig extends RequestInit {
baseUrl?: string;
params?: Record<string, string | number>;
timeout?: number;
}
export class HttpClient {
private baseUrl: string;
private defaultHeaders: Record<string, string>;
constructor(baseURL: string, opts?: { headers?: Record<string, string> }) {
this.baseUrl = baseURL;
this.defaultHeaders = {
"Content-Type": "application/json",
...opts?.headers,
};
}
async request<T>(endpoint: string, config: RequestConfig = {}): Promise<T> {
const {
method = "GET",
params,
body,
headers,
timeout = 30000,
...rest
} = config;
const url = new URL(`${this.baseUrl}${endpoint}`);
if (params) {
Object.entries(params).forEach(([key, value]) =>
url.searchParams.append(key, value.toString()),
);
}
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), timeout);
try {
const response = await fetch(url.toString(), {
...rest,
method,
headers: { ...this.defaultHeaders, ...headers },
body: body ? JSON.stringify(body) : undefined,
signal: controller.signal,
});
clearTimeout(timeoutId);
if (!response.ok) {
const errorData = (await response
.json()
.catch(() => ({}))) as Record<string, string>;
throw new Error(errorData.message || `HTTP Error: ${response.status}`);
}
return (await response.json()) as T;
} catch (error: any) {
if (error.name === "AbortError") {
throw new Error("Request timeout");
}
throw error;
}
}
get<T>(
url: string,
params?: RequestConfig["params"],
config?: RequestConfig,
) {
return this.request<T>(url, { ...config, method: "GET", params });
}
post<T>(url: string, body?: any, config?: RequestConfig) {
return this.request<T>(url, { ...config, method: "POST", body });
}
}
+23
View File
@@ -0,0 +1,23 @@
import type { Hono } from "hono";
import type { HttpBindings } from "@hono/node-server";
import { serveStatic } from "@hono/node-server/serve-static";
import fs from "fs";
import path from "path";
type App = Hono<{ Bindings: HttpBindings }>;
export function serveStaticFiles(app: App) {
const distPath = path.resolve(import.meta.dirname, "../dist/public");
app.use("*", serveStatic({ root: "./dist/public" }));
app.notFound((c) => {
const accept = c.req.header("accept") ?? "";
if (!accept.includes("text/html")) {
return c.json({ error: "Not Found" }, 404);
}
const indexPath = path.resolve(distPath, "index.html");
const content = fs.readFileSync(indexPath, "utf-8");
return c.html(content);
});
}
+42
View File
@@ -0,0 +1,42 @@
import { ErrorMessages } from "@contracts/constants";
import { initTRPC, TRPCError } from "@trpc/server";
import superjson from "superjson";
import type { TrpcContext } from "./context";
const t = initTRPC.context<TrpcContext>().create({
transformer: superjson,
});
export const createRouter = t.router;
export const publicQuery = t.procedure;
const requireAuth = t.middleware(async (opts) => {
const { ctx, next } = opts;
if (!ctx.user) {
throw new TRPCError({
code: "UNAUTHORIZED",
message: ErrorMessages.unauthenticated,
});
}
return next({ ctx: { ...ctx, user: ctx.user } });
});
function requireRole(role: string) {
return t.middleware(async (opts) => {
const { ctx, next } = opts;
if (!ctx.user || ctx.user.role !== role) {
throw new TRPCError({
code: "FORBIDDEN",
message: ErrorMessages.insufficientRole,
});
}
return next({ ctx: { ...ctx, user: ctx.user } });
});
}
export const authedQuery = t.procedure.use(requireAuth);
export const adminQuery = authedQuery.use(requireRole("admin"));
+18
View File
@@ -0,0 +1,18 @@
import { drizzle } from "drizzle-orm/mysql2";
import { env } from "../lib/env";
import * as schema from "@db/schema";
import * as relations from "@db/relations";
const fullSchema = { ...schema, ...relations };
let instance: ReturnType<typeof drizzle<typeof fullSchema>>;
export function getDb() {
if (!instance) {
instance = drizzle(env.databaseUrl, {
mode: "planetscale",
schema: fullSchema,
});
}
return instance;
}
+36
View File
@@ -0,0 +1,36 @@
import { eq } from "drizzle-orm";
import * as schema from "@db/schema";
import type { InsertUser } from "@db/schema";
import { getDb } from "./connection";
import { env } from "../lib/env";
export async function findUserByUnionId(unionId: string) {
const rows = await getDb()
.select()
.from(schema.users)
.where(eq(schema.users.unionId, unionId))
.limit(1);
return rows.at(0);
}
export async function upsertUser(data: InsertUser) {
const values = { ...data };
const updateSet: Partial<InsertUser> = {
lastSignInAt: new Date(),
...data,
};
if (
values.role === undefined &&
values.unionId &&
values.unionId === env.ownerUnionId
) {
values.role = "admin";
updateSet.role = "admin";
}
await getDb()
.insert(schema.users)
.values(values)
.onDuplicateKeyUpdate({ set: updateSet });
}
+11
View File
@@ -0,0 +1,11 @@
import { authRouter } from "./auth-router";
import { formRouter } from "./form-router";
import { createRouter, publicQuery } from "./middleware";
export const appRouter = createRouter({
ping: publicQuery.query(() => ({ ok: true, ts: Date.now() })),
auth: authRouter,
form: formRouter,
});
export type AppRouter = typeof appRouter;
+14
View File
@@ -0,0 +1,14 @@
export const Session = {
cookieName: "kimi_sid",
maxAgeMs: 365 * 24 * 60 * 60 * 1000,
} as const;
export const ErrorMessages = {
unauthenticated: "Authentication required",
insufficientRole: "Insufficient permissions",
} as const;
export const Paths = {
login: "/login",
oauthCallback: "/api/oauth/callback",
} as const;
+15
View File
@@ -0,0 +1,15 @@
type AppError = { tag: "app_error"; status: number; message: string };
function appError(status: number, message: string): AppError {
return { tag: "app_error", status, message };
}
export const Errors = {
badRequest: (msg: string) => appError(400, msg),
unauthorized: (msg: string) => appError(401, msg),
forbidden: (msg: string) => appError(403, msg),
notFound: (msg: string) => appError(404, msg),
internal: (msg: string) => appError(500, msg),
} as const;
export type { AppError };
+2
View File
@@ -0,0 +1,2 @@
export type * from "../db/schema";
export * from "./errors";
+1
View File
@@ -0,0 +1 @@
import {} from "./schema";
+109
View File
@@ -0,0 +1,109 @@
import {
mysqlTable,
mysqlEnum,
serial,
varchar,
text,
timestamp,
// bigint,
} from "drizzle-orm/mysql-core";
export const users = mysqlTable("users", {
id: serial("id").primaryKey(),
unionId: varchar("unionId", { length: 255 }).notNull().unique(),
name: varchar("name", { length: 255 }),
email: varchar("email", { length: 320 }),
avatar: text("avatar"),
role: mysqlEnum("role", ["user", "admin"]).default("user").notNull(),
createdAt: timestamp("createdAt").defaultNow().notNull(),
updatedAt: timestamp("updatedAt")
.defaultNow()
.notNull()
.$onUpdate(() => new Date()),
lastSignInAt: timestamp("lastSignInAt").defaultNow().notNull(),
});
export type User = typeof users.$inferSelect;
export type InsertUser = typeof users.$inferInsert;
// ============================================================================
// SISTEMA DE FORMULARIOS - Area do Cliente Avanzato
// ============================================================================
// Formularios criados pela Avanzato para clientes
export const clientForms = mysqlTable("client_forms", {
id: serial("id").primaryKey(),
title: varchar("title", { length: 255 }).notNull(),
description: text("description"),
clientName: varchar("clientName", { length: 255 }).notNull(),
clientEmail: varchar("clientEmail", { length: 320 }),
status: mysqlEnum("status", ["active", "inactive", "archived"]).default("inactive").notNull(),
accessCode: varchar("access_code", { length: 32 }).notNull().unique(),
createdBy: varchar("created_by", { length: 255 }),
createdAt: timestamp("created_at").defaultNow().notNull(),
updatedAt: timestamp("updated_at").defaultNow().notNull().$onUpdate(() => new Date()),
});
export type ClientForm = typeof clientForms.$inferSelect;
export type InsertClientForm = typeof clientForms.$inferInsert;
// Secoes de cada formulario
export const formSections = mysqlTable("form_sections", {
id: serial("id").primaryKey(),
formId: varchar("form_id", { length: 32 }).notNull(),
title: varchar("title", { length: 255 }).notNull(),
description: text("description"),
orderNum: serial("order_num"),
createdAt: timestamp("created_at").defaultNow().notNull(),
});
export type FormSection = typeof formSections.$inferSelect;
// Perguntas/Campos de cada secao
export const formQuestions = mysqlTable("form_questions", {
id: serial("id").primaryKey(),
formId: varchar("form_id", { length: 32 }).notNull(),
sectionId: varchar("section_id", { length: 32 }),
question: text("question").notNull(),
fieldType: mysqlEnum("field_type", ["text", "textarea", "number", "select", "multiselect", "date", "file"]).default("text").notNull(),
options: text("options"), // JSON string para select/multiselect
required: mysqlEnum("required", ["yes", "no"]).default("no").notNull(),
orderNum: serial("order_num"),
createdAt: timestamp("created_at").defaultNow().notNull(),
});
export type FormQuestion = typeof formQuestions.$inferSelect;
// Respostas submetidas pelos clientes
export const formAnswers = mysqlTable("form_answers", {
id: serial("id").primaryKey(),
formId: varchar("form_id", { length: 32 }).notNull(),
questionId: varchar("question_id", { length: 32 }).notNull(),
answer: text("answer"),
createdAt: timestamp("created_at").defaultNow().notNull(),
});
export type FormAnswer = typeof formAnswers.$inferSelect;
// Submissoes completas (uma por formulario preenchido)
export const formSubmissions = mysqlTable("form_submissions", {
id: serial("id").primaryKey(),
formId: varchar("form_id", { length: 32 }).notNull(),
submittedBy: varchar("submitted_by", { length: 255 }),
submittedByEmail: varchar("submitted_by_email", { length: 320 }),
notes: text("notes"),
createdAt: timestamp("created_at").defaultNow().notNull(),
});
export type FormSubmission = typeof formSubmissions.$inferSelect;
//
// Example:
// export const posts = mysqlTable("posts", {
// id: serial("id").primaryKey(),
// title: varchar("title", { length: 255 }).notNull(),
// content: text("content"),
// createdAt: timestamp("created_at").notNull().defaultNow(),
// });
//
// Note: FK columns referencing a serial() PK must use:
// bigint("columnName", { mode: "number", unsigned: true }).notNull()
+181
View File
@@ -0,0 +1,181 @@
// ============================================================================
// SEED - Formulario UEA-PRODEM-ANGOLA
// ============================================================================
// Executar: npx tsx db/seed.ts
// ============================================================================
import { getDb } from "../api/queries/connection";
import { clientForms, formSections, formQuestions } from "./schema";
const FORM_ID = "uea-prodem-angola";
const sections = [
{ id: "s1", title: "1. DADOS INSTITUCIONAIS", description: "Informacoes sobre a estrutura atual da UEA", order: 1 },
{ id: "s2", title: "2. PROJECAO DE CRESCIMENTO", description: "Estimativas de crescimento para os proximos 36 meses", order: 2 },
{ id: "s3", title: "3. REGISTO E VALIDACAO", description: "Processo de aprovacao e validacao de membros", order: 3 },
{ id: "s4", title: "4. ESTRUTURA DE MEMBROS", description: "Categorias, niveis e beneficios", order: 4 },
{ id: "s5", title: "5. PAGAMENTOS", description: "Plataformas e regras de faturacao", order: 5 },
{ id: "s6", title: "6. INCUBADORA EMPRESARIAL", description: "Funil de evolucao e acompanhamento", order: 6 },
{ id: "s7", title: "7. FORMACAO E CERTIFICACAO", description: "Cursos, conteudos e certificados", order: 7 },
{ id: "s8", title: "8. MARKETPLACE B2B", description: "Produtos, servicos e intermedicao", order: 8 },
{ id: "s9", title: "9. EVENTOS", description: "Gestao e transmissao de eventos", order: 9 },
{ id: "s10", title: "10. BANCO CENTRAL DE DADOS (BCD)", description: "Objetivos, dados e dashboards", order: 10 },
{ id: "s11", title: "11. DOCUMENTACAO LEGAL", description: "Documentos necessarios para o projeto", order: 11 },
{ id: "s12", title: "12. INFRAESTRUTURA E HOSPEDAGEM", description: "Ambiente, cloud e suporte tecnico", order: 12 },
{ id: "s13", title: "13. RELATORIOS EXECUTIVOS", description: "Relatorios para a Direcao", order: 13 },
];
const questions = [
// SECAO 1 - DADOS INSTITUCIONAIS
{ sectionId: "s1", q: "1.1 Quantidade atual de membros individuais ativos", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.2 Quantidade atual de empresas associadas", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.3 Quantidade total de cadastros existentes", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.4 Quantidade de membros pagantes", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.5 Quantidade de membros inadimplentes", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.6 Quantidade de provincias atualmente representadas", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.7 Quantidade de colaboradores administrativos da UEA", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.8 Quantidade de utilizadores internos que terao acesso administrativo ao sistema", type: "number" as const, required: "yes" as const },
// SECAO 2 - PROJECAO DE CRESCIMENTO
{ sectionId: "s2", q: "2.1 Membros previstos para 12 meses", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.1 Membros previstos para 24 meses", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.1 Membros previstos para 36 meses", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.2 Empresas previstas para 12 meses", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.2 Empresas previstas para 24 meses", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.2 Empresas previstas para 36 meses", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.3 Numero medio de novos cadastros esperado por mes", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.4 Numero medio de acessos simultaneos esperado durante eventos ou campanhas nacionais", type: "number" as const, required: "yes" as const },
// SECAO 3 - REGISTO E VALIDACAO
{ sectionId: "s3", q: "3.1 Quem aprovara os novos membros?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s3", q: "3.2 Existirao administradores provinciais?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s3", q: "3.3 Existirao administradores municipais?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s3", q: "3.4 O processo de validacao sera centralizado ou descentralizado?", type: "select" as const, options: JSON.stringify(["Centralizado", "Descentralizado", "Misto", "A definir"]), required: "yes" as const },
{ sectionId: "s3", q: "3.5 Quais documentos serao obrigatorios para cada categoria de membro?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s3", q: "3.6 Sera necessaria assinatura digital dos documentos?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s3", q: "3.7 O certificado digital do membro devera possuir QR Code de validacao publica?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
// SECAO 4 - ESTRUTURA DE MEMBROS
{ sectionId: "s4", q: "4.1 Confirmar todas as categorias de membros", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s4", q: "4.2 Confirmar niveis de adesao: Bronze, Prata, Ouro, Platina - havera outros?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s4", q: "4.3 Quais beneficios especificos existirao em cada categoria?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s4", q: "4.4 Cada categoria tera valor de quota diferente?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s4", q: "4.5 O associado podera alterar sua categoria diretamente pela plataforma?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
// SECAO 5 - PAGAMENTOS
{ sectionId: "s5", q: "5.1 Quais plataformas de pagamento serao utilizadas? (Multicaixa Express, Referencia Bancaria, Transferencia, Cartao, Outras)", type: "multiselect" as const, options: JSON.stringify(["Multicaixa Express", "Referencia Bancaria", "Transferencia Bancaria", "Cartao", "Outras"]), required: "yes" as const },
{ sectionId: "s5", q: "5.2 Existe fornecedor ja homologado para integracao de pagamentos?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s5", q: "5.3 O sistema de faturacao ja foi definido?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "Em desenvolvimento"]), required: "yes" as const },
{ sectionId: "s5", q: "5.4 Sera necessaria emissao automatica de: Faturas, Recibos, Declaracoes de pagamento?", type: "multiselect" as const, options: JSON.stringify(["Faturas", "Recibos", "Declaracoes de pagamento"]), required: "yes" as const },
{ sectionId: "s5", q: "5.5 Qual sera a regra de bloqueio por inadimplencia?", type: "textarea" as const, required: "yes" as const },
// SECAO 6 - INCUBADORA EMPRESARIAL
{ sectionId: "s6", q: "6.1 Quais etapas existirao no funil de evolucao das empresas? (Ideia, Planeamento, MVP, Operacao, Crescimento, Escala)", type: "multiselect" as const, options: JSON.stringify(["Ideia", "Planeamento", "MVP", "Operacao", "Crescimento", "Escala"]), required: "yes" as const },
{ sectionId: "s6", q: "6.2 Quem acompanhara os incubados?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s6", q: "6.3 Havera metas obrigatorias?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s6", q: "6.4 Havera indicadores de desempenho (KPIs)?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s6", q: "6.5 Quais relatorios deverao ser produzidos?", type: "textarea" as const, required: "yes" as const },
// SECAO 7 - FORMACAO E CERTIFICACAO
{ sectionId: "s7", q: "7.1 Quantidade estimada de cursos", type: "number" as const, required: "yes" as const },
{ sectionId: "s7", q: "7.2 Os cursos serao hospedados na propria plataforma ou em ambiente externo?", type: "select" as const, options: JSON.stringify(["Plataforma propria", "Ambiente externo", "Misto", "A definir"]), required: "yes" as const },
{ sectionId: "s7", q: "7.3 Quem produzira os conteudos?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s7", q: "7.4 Os certificados possuirao validacao online?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s7", q: "7.5 Sera necessario historico academico dos membros?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
// SECAO 8 - MARKETPLACE B2B
{ sectionId: "s8", q: "8.1 Quais tipos de produtos e servicos poderao ser anunciados?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s8", q: "8.2 Existira intermediacao financeira pela UEA?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s8", q: "8.3 Existirao avaliacoes dos fornecedores?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s8", q: "8.4 Existira sistema de mensagens entre membros?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
// SECAO 9 - EVENTOS
{ sectionId: "s9", q: "9.1 Quantidade media de eventos por ano", type: "number" as const, required: "yes" as const },
{ sectionId: "s9", q: "9.2 Existira venda de ingressos?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s9", q: "9.3 Existira transmissao online?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s9", q: "9.4 Existira emissao de certificados por participacao?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
// SECAO 10 - BANCO CENTRAL DE DADOS
{ sectionId: "s10", q: "10.1 Qual o objetivo operacional do BCD?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s10", q: "10.2 Quais dados deverao ser consolidados?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s10", q: "10.3 Quem tera acesso aos dados?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s10", q: "10.4 Existirao dashboards provinciais?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s10", q: "10.5 Existirao dashboards nacionais?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s10", q: "10.6 Quais indicadores deverao ser acompanhados em tempo real?", type: "textarea" as const, required: "yes" as const },
// SECAO 11 - DOCUMENTACAO LEGAL
{ sectionId: "s11", q: "11.1 Estatuto completo da UEA - sera enviado?", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.2 Certidao de Registo", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.3 Regulamentos internos", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.4 Organograma oficial", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.5 Politica de privacidade", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.6 Politica de protecao de dados", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.7 Manual de identidade visual", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.8 Logotipos oficiais em formato vetorial", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
// SECAO 12 - INFRAESTRUTURA
{ sectionId: "s12", q: "12.1 O ambiente sera hospedado em Angola ou internacionalmente?", type: "select" as const, options: JSON.stringify(["Angola", "Internacional", "Hibrido", "A definir"]), required: "yes" as const },
{ sectionId: "s12", q: "12.2 Existe preferencia por provedor cloud? (AWS, Azure, Google Cloud, Digital Ocean, Infraestrutura propria)", type: "multiselect" as const, options: JSON.stringify(["AWS", "Azure", "Google Cloud", "Digital Ocean", "Infraestrutura propria", "A definir"]), required: "yes" as const },
{ sectionId: "s12", q: "12.3 Qual o orcamento previsto para hospedagem mensal?", type: "text" as const, required: "no" as const },
{ sectionId: "s12", q: "12.4 Existe equipa tecnica interna para suporte?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "Parcial"]), required: "yes" as const },
// SECAO 13 - RELATORIOS EXECUTIVOS
{ sectionId: "s13", q: "13.1 Relatorios desejados: Novos associados por periodo", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.2 Relatorios desejados: Associados por provincia", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.3 Relatorios desejados: Empresas incubadas", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.4 Relatorios desejados: Quotas recebidas", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.5 Relatorios desejados: Quotas em atraso", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.6 Relatorios desejados: Participacao em cursos", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.7 Relatorios desejados: Participacao em eventos", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.8 Relatorios desejados: Crescimento por sector economico", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.9 Relatorios desejados: Crescimento por provincia", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.10 Relatorios desejados: Indicadores de empregabilidade", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.11 Relatorios desejados: Indicadores de impacto economico", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
];
async function seed() {
const db = getDb();
console.log("[Seed] Inserindo formulario UEA-PRODEM-ANGOLA...");
// Criar formulario
const code = Math.random().toString(36).substring(2, 10).toUpperCase();
await db.insert(clientForms).values({
id: 1,
title: "Levantamento de Requisitos - Portal e Plataforma Digital UEA-PRODEM-ANGOLA",
description: "Formulario completo para levantamento de requisitos do ecossistema digital composto por Portal Institucional, Gestao de Associados, BCD, Area Restrita, Sistema de Pagamento, Biblioteca Digital, Plataforma de Formacao, Sistema de Certificacao, Incubadora Empresarial, Gestao de Mentorias, Marketplace B2B, Dashboard Executivo, Gestao de Eventos e Relatorios Gerenciais.",
clientName: "UEA-PRODEM-ANGOLA",
clientEmail: "",
status: "active",
accessCode: code,
createdBy: "Avanzato",
});
console.log(`[Seed] Formulario criado com codigo: ${code}`);
// Inserir secoes
for (const s of sections) {
await db.insert(formSections).values({
formId: FORM_ID,
title: s.title,
description: s.description,
});
}
console.log(`[Seed] ${sections.length} secoes inseridas`);
// Inserir perguntas
let count = 0;
for (const q of questions) {
await db.insert(formQuestions).values({
formId: FORM_ID,
sectionId: q.sectionId,
question: q.q,
fieldType: q.type,
options: q.options || null,
required: q.required,
});
count++;
}
console.log(`[Seed] ${count} perguntas inseridas`);
console.log("[Seed] Concluido! Acesse o formulario em: /formulario/" + code);
}
seed().catch(console.error);
+16
View File
@@ -0,0 +1,16 @@
import "dotenv/config";
import { defineConfig } from "drizzle-kit";
const connectionString = process.env.DATABASE_URL;
if (!connectionString) {
throw new Error("DATABASE_URL is required to run drizzle commands");
}
export default defineConfig({
schema: "./db/schema.ts",
out: "./db/migrations",
dialect: "mysql",
dbCredentials: {
url: connectionString,
},
});
+2 -252
View File
@@ -1,262 +1,12 @@
<!doctype html>
<html lang="pt-BR">
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- DETECAO DE AMBIENTE - Inline (executa antes de tudo) -->
<script>
(function() {
var h = location.hostname;
var IS_PROD = h === 'avanzato.com.br' || h === 'www.avanzato.com.br';
// Torna disponivel para outros scripts
window.__IS_PROD__ = IS_PROD;
// Se NAO for producao, desativa tracking globalmente
if (!IS_PROD) {
window.__AVANZATO_ENV__ = h === 'hml.avanzato.com.br' ? 'homologation' : 'development';
// Bloqueia gtag
window.dataLayer = { push: function(){} };
window.gtag = function(){};
// Bloqueia fbq (Facebook Pixel)
window.fbq = function(){};
// Bloqueia Mautic
window.MauticSDKLoaded = true;
console.log('[Avanzato] Ambiente: ' + window.__AVANZATO_ENV__ + ' | Tracking bloqueado');
} else {
window.__AVANZATO_ENV__ = 'production';
}
})();
</script>
<!-- Google tag (gtag.js) - Ads + Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-16714813566"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// LGPD/GDPR Consent Mode v2
// analytics_storage = 'denied' → GA4 coleta dados ANONIMIZADOS (sem cookies)
// Isso permite ver trafego SEM precisar de consentimento explicito
gtag('consent', 'default', {
ad_storage: 'denied',
analytics_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
functionality_storage: 'granted', // Permite funcionalidade basica
security_storage: 'granted', // Permite seguranca
wait_for_update: 500
});
// IMPORTANTE: Ativar Consent Mode no painel do GA4
// GA4 → Admin → Account Settings → Consent Settings → Enable
gtag('js', new Date());
gtag('config', 'AW-16714813566');
gtag('config', 'G-LMHX8RJ3LH', { // GA4 - Avanzato
'send_page_view': true,
'cookie_expires': 63072000, // 2 anos
'cookie_update': true
});
</script>
<!-- Meta Pixel (Facebook) - ID: 1223271852059785 -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1223271852059785');
fbq('track', 'PageView');
</script>
<!-- Mautic Tracking -->
<script>
(function(w,d,t,u,n,a,m){
w['MauticTrackingObject']=n;
w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t),
m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://mkt.avanzato.com.br/mtc.js','mt');
mt('send', 'pageview');
</script>
<!-- FIM Mautic Tracking -->
<!-- Preconnect to Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
<!-- Primary Meta Tags -->
<title>Avanzato Tecnologia | TI Gerenciada, Cloud e Seguranca em Guarulhos/SP</title>
<meta name="title" content="Avanzato Tecnologia | TI Gerenciada, Cloud e Seguranca em Guarulhos/SP" />
<meta name="description" content="Solucoes em TI Gerenciada, Cloud Computing e Seguranca da Informacao. +23 anos de experiencia, +500 clientes atendidos. Suporte 24/7 em Guarulhos e regiao." />
<meta name="app-version" content="1.0.0" />
<meta name="keywords" content="TI Gerenciada, Cloud Computing, Seguranca da Informacao, Suporte Tecnico, Tecnologia da Informacao, Guarulhos, Sao Paulo, Infraestrutura de TI, Backup, Firewall, Consultoria TI" />
<meta name="author" content="Avanzato Tecnologia" />
<meta name="robots" content="index, follow" id="meta-robots" />
<meta name="googlebot" content="index, follow" id="meta-googlebot" />
<!-- BLOQUEAR INDEXACAO EM HOMOLOGACAO -->
<script>
(function() {
// Usa IS_PROD ja definido no inicio do documento
if (!window.__IS_PROD__) {
// Homologacao/Desenvolvimento: bloquear indexacao
document.getElementById('meta-robots').setAttribute('content', 'noindex, nofollow');
document.getElementById('meta-googlebot').setAttribute('content', 'noindex, nofollow');
// Adicionar tambem X-Robots-Tag via meta http-equiv
var meta = document.createElement('meta');
meta.httpEquiv = 'X-Robots-Tag';
meta.content = 'noindex, nofollow';
document.head.appendChild(meta);
console.log('%c[SEO] ' + (window.__AVANZATO_ENV__ || 'nao-producao') + ' - indexacao BLOQUEADA', 'background:#dc2626;color:#fff;font-weight:bold;padding:2px 6px;border-radius:3px');
} else {
console.log('%c[SEO] Producao - indexacao PERMITIDA (index, follow)', 'background:#16a34a;color:#fff;font-weight:bold;padding:2px 6px;border-radius:3px');
}
})();
</script>
<!-- Canonical URL -->
<link rel="canonical" href="https://avanzato.com.br" />
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://avanzato.com.br" />
<meta property="og:title" content="Avanzato Tecnologia | TI Gerenciada, Cloud e Seguranca" />
<meta property="og:description" content="Solucoes em TI Gerenciada, Cloud Computing e Seguranca da Informacao. +23 anos de experiencia, suporte 24/7." />
<meta property="og:image" content="https://avanzato.com.br/og-image.jpg" />
<meta property="og:locale" content="pt_BR" />
<meta property="og:site_name" content="Avanzato Tecnologia" />
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://avanzato.com.br" />
<meta property="twitter:title" content="Avanzato Tecnologia | TI Gerenciada, Cloud e Seguranca" />
<meta property="twitter:description" content="Solucoes em TI Gerenciada, Cloud Computing e Seguranca da Informacao. +23 anos de experiencia, suporte 24/7." />
<meta property="twitter:image" content="https://avanzato.com.br/og-image.jpg" />
<!-- Favicon -->
<link rel="icon" type="image/png" href="https://avanzato.com.br/favicon.png" />
<link rel="shortcut icon" type="image/png" href="https://avanzato.com.br/favicon.png" />
<link rel="manifest" href="/site.webmanifest" />
<!-- Theme Color -->
<meta name="theme-color" content="#cbf400" />
<meta name="msapplication-TileColor" content="#0e0e0e" />
<!-- Structured Data / Schema.org -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Avanzato Tecnologia",
"alternateName": "Avanzato Tecnologia e Informatica",
"url": "https://avanzato.com.br",
"logo": "https://avanzato.com.br/logo.svg",
"description": "Solucoes em TI Gerenciada, Cloud Computing e Seguranca da Informacao. +23 anos de experiencia.",
"foundingDate": "2001",
"address": {
"@type": "PostalAddress",
"streetAddress": "Av. Dr. Carlos de Campos, 43 - Sl 05/06",
"addressLocality": "Guarulhos",
"addressRegion": "SP",
"postalCode": "07040-000",
"addressCountry": "BR"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": "-23.4686",
"longitude": "-46.5326"
},
"contactPoint": {
"@type": "ContactPoint",
"telephone": "+55-11-4810-1704",
"contactType": "customer service",
"availableLanguage": ["Portuguese"],
"areaServed": "BR"
},
"sameAs": [
"https://www.facebook.com/avanzatotec",
"https://www.linkedin.com/company/avanzato-tecnologia-e-informatica/",
"https://www.instagram.com/avanzato.tecnologia/",
"https://www.youtube.com/@AvanzatoTecnologia"
],
"openingHoursSpecification": {
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"opens": "08:00",
"closes": "18:00"
}
}
</script>
<!-- Local Business Schema -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Avanzato Tecnologia",
"image": "https://avanzato.com.br/logo.svg",
"@id": "https://avanzato.com.br",
"url": "https://avanzato.com.br",
"telephone": "+55-11-4810-1704",
"priceRange": "$$",
"address": {
"@type": "PostalAddress",
"streetAddress": "Av. Dr. Carlos de Campos, 43 - Sl 05/06, Parque Renato Maia",
"addressLocality": "Guarulhos",
"addressRegion": "SP",
"postalCode": "07040-000",
"addressCountry": "BR"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": -23.4686,
"longitude": -46.5326
},
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"opens": "08:00",
"closes": "18:00"
}
],
"department": {
"@type": "ComputerStore",
"name": "Departamento de TI",
"openingHours": "24/7"
}
}
</script>
<title>Avanzato Area do Cliente</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<!-- Facebook Pixel noscript (moved from head to body to fix parse5 warning) -->
<noscript>
<img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1223271852059785&ev=PageView&noscript=1"/>
</noscript>
<!-- Noscript content for SEO -->
<noscript>
<div style="padding: 20px; text-align: center; font-family: Urbanist, Arial, sans-serif; background: #0e0e0e; color: white; min-height: 100vh;">
<h1 style="color: #cbf400;">Avanzato Tecnologia</h1>
<p>Para visualizar nosso site completo, por favor habilite o JavaScript no seu navegador.</p>
<p>Entre em contato: (11) 4810-1704 | contato@avanzato.com.br</p>
</div>
</noscript>
</body>
</html>
+31
View File
@@ -0,0 +1,31 @@
Using Node.js 20, Tailwind CSS v3.4.19, and Vite v7.2.4
Tailwind CSS has been set up with the shadcn theme
Setup complete: /mnt/agents/output/app
Components (40+):
accordion, alert-dialog, alert, aspect-ratio, avatar, badge, breadcrumb,
button-group, button, calendar, card, carousel, chart, checkbox, collapsible,
command, context-menu, dialog, drawer, dropdown-menu, empty, field, form,
hover-card, input-group, input-otp, input, item, kbd, label, menubar,
navigation-menu, pagination, popover, progress, radio-group, resizable,
scroll-area, select, separator, sheet, sidebar, skeleton, slider, sonner,
spinner, switch, table, tabs, textarea, toggle-group, toggle, tooltip
Usage:
import { Button } from '@/components/ui/button'
import { Card, CardHeader, CardTitle } from '@/components/ui/card'
Structure:
src/sections/ Page sections
src/hooks/ Custom hooks
src/types/ Type definitions
src/App.css Styles specific to the Webapp
src/App.tsx Root React component
src/index.css Global styles
src/main.tsx Entry point for rendering the Webapp
index.html Entry point for the Webapp
tailwind.config.js Configures Tailwind's theme, plugins, etc.
vite.config.ts Main build and dev server settings for Vite
postcss.config.js Config file for CSS post-processing tools
-57
View File
@@ -1,57 +0,0 @@
# Release HML
Data: qua 3 jun 2026 22:07:59 -03
Ambiente:
HML
Descrição:
Aplicativos de Atrair Leads
Branch:
develop
Arquivos alterados antes do commit:
M dist/index.html
D infra/releases/2026-06-02_22-34-39_HML.md
M src/App.tsx
M src/sections/About.tsx
M src/sections/CondominiosCTA.tsx
M src/sections/Hero.tsx
M src/sections/Navigation.tsx
M src/sections/Services.tsx
?? infra/releases/2026-06-03_22-07-58_HML.md
?? nginx/
?? public/about-image.webp
?? public/hero-dashboard.webp
?? public/service-cloud.webp
?? public/service-security.webp
?? public/service-support.webp
?? public/service-ti.webp
Status:
Preparado para publicação
Commit:
fdfb4606
Arquivos no commit:
dist/index.html
infra/releases/2026-06-02_22-34-39_HML.md
infra/releases/2026-06-03_22-07-58_HML.md
nginx/avanzato.conf
public/about-image.webp
public/hero-dashboard.webp
public/service-cloud.webp
public/service-security.webp
public/service-support.webp
public/service-ti.webp
src/App.tsx
src/sections/About.tsx
src/sections/CondominiosCTA.tsx
src/sections/Hero.tsx
src/sections/Navigation.tsx
src/sections/Services.tsx
Status final:
Publicado no Gitea / aguardando pipeline HML
-29
View File
@@ -1,29 +0,0 @@
# Release HML
Data: seg 8 jun 2026 20:45:14 -03
Ambiente:
HML
Descrição:
Aplicativos de Atrair Leads
Branch:
develop
Arquivos alterados antes do commit:
M .DS_Store
?? infra/releases/2026-06-08_20-45-14_HML.md
Status:
Preparado para publicação
Commit:
27b4c9e7
Arquivos no commit:
.DS_Store
infra/releases/2026-06-08_20-45-14_HML.md
Status final:
Publicado no Gitea / aguardando pipeline HML
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1 +0,0 @@
../cross-env/src/bin/cross-env.js
-1
View File
@@ -1 +0,0 @@
../cross-env/src/bin/cross-env-shell.js
Generated Vendored
+1 -1
View File
@@ -1 +1 @@
../nanoid/bin/nanoid.cjs
../nanoid/bin/nanoid.js
+2418 -1273
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -1,7 +1,7 @@
"use client";
import {
Presence
} from "./chunk-INCCO7S4.js";
} from "./chunk-THQIQPZA.js";
import {
Combination_default,
DismissableLayer,
@@ -9,7 +9,7 @@ import {
Portal,
hideOthers,
useFocusGuards
} from "./chunk-LIWCVBQK.js";
} from "./chunk-AFOUPPSL.js";
import {
Primitive,
composeEventHandlers,
@@ -17,12 +17,12 @@ import {
createContextScope,
useControllableState,
useId
} from "./chunk-MOFDO34C.js";
} from "./chunk-VURJIDBW.js";
import "./chunk-YF4B4G2L.js";
import {
composeRefs,
useComposedRefs
} from "./chunk-2VUH7NEY.js";
import "./chunk-YF4B4G2L.js";
import {
require_jsx_runtime
} from "./chunk-2YVA4HRZ.js";
+1 -1
View File
@@ -2,10 +2,10 @@
import {
createSlot
} from "./chunk-YWBEB5PG.js";
import "./chunk-2VUH7NEY.js";
import {
require_react_dom
} from "./chunk-YF4B4G2L.js";
import "./chunk-2VUH7NEY.js";
import {
require_jsx_runtime
} from "./chunk-2YVA4HRZ.js";
+4 -4
View File
@@ -1,13 +1,13 @@
"use client";
import {
Presence
} from "./chunk-INCCO7S4.js";
} from "./chunk-THQIQPZA.js";
import {
createCollection,
useDirection,
usePrevious,
useSize
} from "./chunk-L2OGOWTU.js";
} from "./chunk-BZDTGYB5.js";
import {
Primitive,
composeEventHandlers,
@@ -15,11 +15,11 @@ import {
useCallbackRef,
useControllableState,
useId
} from "./chunk-MOFDO34C.js";
} from "./chunk-VURJIDBW.js";
import "./chunk-YF4B4G2L.js";
import {
useComposedRefs
} from "./chunk-2VUH7NEY.js";
import "./chunk-YF4B4G2L.js";
import {
require_jsx_runtime
} from "./chunk-2YVA4HRZ.js";
+6 -6
View File
@@ -6,13 +6,13 @@ import {
Portal,
hideOthers,
useFocusGuards
} from "./chunk-LIWCVBQK.js";
} from "./chunk-AFOUPPSL.js";
import {
createCollection,
useDirection,
usePrevious,
useSize
} from "./chunk-L2OGOWTU.js";
} from "./chunk-BZDTGYB5.js";
import {
Primitive,
composeEventHandlers,
@@ -21,14 +21,14 @@ import {
useControllableState,
useId,
useLayoutEffect2
} from "./chunk-MOFDO34C.js";
} from "./chunk-VURJIDBW.js";
import {
require_react_dom
} from "./chunk-YF4B4G2L.js";
import {
composeRefs,
useComposedRefs
} from "./chunk-2VUH7NEY.js";
import {
require_react_dom
} from "./chunk-YF4B4G2L.js";
import {
require_jsx_runtime
} from "./chunk-2YVA4HRZ.js";
+73 -34
View File
@@ -1,143 +1,182 @@
{
"hash": "bef2a67d",
"configHash": "eccf13b4",
"lockfileHash": "c4c8a51c",
"browserHash": "e7109be1",
"hash": "3027357f",
"configHash": "79477533",
"lockfileHash": "cc556dfa",
"browserHash": "a4d0689f",
"optimized": {
"react": {
"src": "../../react/index.js",
"file": "react.js",
"fileHash": "dd97ceba",
"fileHash": "554f9983",
"needsInterop": true
},
"react-dom": {
"src": "../../react-dom/index.js",
"file": "react-dom.js",
"fileHash": "8becf687",
"fileHash": "ad984ce0",
"needsInterop": true
},
"react/jsx-dev-runtime": {
"src": "../../react/jsx-dev-runtime.js",
"file": "react_jsx-dev-runtime.js",
"fileHash": "2c7217d2",
"fileHash": "4d4232e1",
"needsInterop": true
},
"react/jsx-runtime": {
"src": "../../react/jsx-runtime.js",
"file": "react_jsx-runtime.js",
"fileHash": "e28ec614",
"fileHash": "4eeb30cd",
"needsInterop": true
},
"@radix-ui/react-dialog": {
"src": "../../@radix-ui/react-dialog/dist/index.mjs",
"file": "@radix-ui_react-dialog.js",
"fileHash": "22041c72",
"fileHash": "e7cdc883",
"needsInterop": false
},
"@radix-ui/react-label": {
"src": "../../@radix-ui/react-label/dist/index.mjs",
"file": "@radix-ui_react-label.js",
"fileHash": "d33ac0ed",
"fileHash": "d639f3af",
"needsInterop": false
},
"@radix-ui/react-radio-group": {
"src": "../../@radix-ui/react-radio-group/dist/index.mjs",
"file": "@radix-ui_react-radio-group.js",
"fileHash": "2be9d4b7",
"fileHash": "af0ec47d",
"needsInterop": false
},
"@radix-ui/react-select": {
"src": "../../@radix-ui/react-select/dist/index.mjs",
"file": "@radix-ui_react-select.js",
"fileHash": "51dd47da",
"fileHash": "abaf0a20",
"needsInterop": false
},
"@radix-ui/react-slot": {
"src": "../../@radix-ui/react-slot/dist/index.mjs",
"file": "@radix-ui_react-slot.js",
"fileHash": "32dfa860",
"fileHash": "ebd9dde0",
"needsInterop": false
},
"@tanstack/react-query": {
"src": "../../@tanstack/react-query/build/modern/index.js",
"file": "@tanstack_react-query.js",
"fileHash": "a13ea524",
"needsInterop": false
},
"@trpc/client": {
"src": "../../@trpc/client/dist/index.mjs",
"file": "@trpc_client.js",
"fileHash": "c7aefcb2",
"needsInterop": false
},
"@trpc/react-query": {
"src": "../../@trpc/react-query/dist/index.mjs",
"file": "@trpc_react-query.js",
"fileHash": "a5734117",
"needsInterop": false
},
"class-variance-authority": {
"src": "../../class-variance-authority/dist/index.mjs",
"file": "class-variance-authority.js",
"fileHash": "f4a8c6f4",
"fileHash": "77515f47",
"needsInterop": false
},
"clsx": {
"src": "../../clsx/dist/clsx.mjs",
"file": "clsx.js",
"fileHash": "e5a299ae",
"fileHash": "f3033bff",
"needsInterop": false
},
"gsap": {
"src": "../../gsap/index.js",
"file": "gsap.js",
"fileHash": "76791308",
"fileHash": "c80894df",
"needsInterop": false
},
"gsap/ScrollTrigger": {
"src": "../../gsap/ScrollTrigger.js",
"file": "gsap_ScrollTrigger.js",
"fileHash": "187ec0aa",
"fileHash": "e62c79bc",
"needsInterop": false
},
"lucide-react": {
"src": "../../lucide-react/dist/esm/lucide-react.js",
"file": "lucide-react.js",
"fileHash": "58304198",
"fileHash": "42086d0d",
"needsInterop": false
},
"react-dom/client": {
"src": "../../react-dom/client.js",
"file": "react-dom_client.js",
"fileHash": "b30625c8",
"fileHash": "d8b51de0",
"needsInterop": true
},
"react-helmet-async": {
"src": "../../react-helmet-async/lib/index.esm.js",
"file": "react-helmet-async.js",
"fileHash": "79a82144",
"fileHash": "71acdb41",
"needsInterop": false
},
"react-router": {
"src": "../../react-router/dist/development/index.mjs",
"file": "react-router.js",
"fileHash": "d5b54b72",
"needsInterop": false
},
"react-router-dom": {
"src": "../../react-router-dom/dist/index.mjs",
"file": "react-router-dom.js",
"fileHash": "4427109e",
"fileHash": "2b8d6b0b",
"needsInterop": false
},
"superjson": {
"src": "../../superjson/dist/index.js",
"file": "superjson.js",
"fileHash": "c81c6cdc",
"needsInterop": false
},
"tailwind-merge": {
"src": "../../tailwind-merge/dist/bundle-mjs.mjs",
"file": "tailwind-merge.js",
"fileHash": "9511be49",
"fileHash": "10519efc",
"needsInterop": false
}
},
"chunks": {
"chunk-PXXDNLPL": {
"file": "chunk-PXXDNLPL.js"
},
"chunk-MD5BUWWK": {
"file": "chunk-MD5BUWWK.js"
},
"chunk-U7P2NEEE": {
"file": "chunk-U7P2NEEE.js"
},
"chunk-5M2SSBTA": {
"file": "chunk-5M2SSBTA.js"
},
"chunk-THQIQPZA": {
"file": "chunk-THQIQPZA.js"
},
"chunk-YWBEB5PG": {
"file": "chunk-YWBEB5PG.js"
},
"chunk-INCCO7S4": {
"file": "chunk-INCCO7S4.js"
"chunk-AFOUPPSL": {
"file": "chunk-AFOUPPSL.js"
},
"chunk-LIWCVBQK": {
"file": "chunk-LIWCVBQK.js"
"chunk-BZDTGYB5": {
"file": "chunk-BZDTGYB5.js"
},
"chunk-L2OGOWTU": {
"file": "chunk-L2OGOWTU.js"
},
"chunk-MOFDO34C": {
"file": "chunk-MOFDO34C.js"
},
"chunk-2VUH7NEY": {
"file": "chunk-2VUH7NEY.js"
"chunk-VURJIDBW": {
"file": "chunk-VURJIDBW.js"
},
"chunk-YF4B4G2L": {
"file": "chunk-YF4B4G2L.js"
},
"chunk-2VUH7NEY": {
"file": "chunk-2VUH7NEY.js"
},
"chunk-2YVA4HRZ": {
"file": "chunk-2YVA4HRZ.js"
},
-143
View File
@@ -1,143 +0,0 @@
import {
useLayoutEffect2
} from "./chunk-MOFDO34C.js";
import {
useComposedRefs
} from "./chunk-2VUH7NEY.js";
import {
require_react
} from "./chunk-WUR7D6NS.js";
import {
__toESM
} from "./chunk-G3PMV62Z.js";
// node_modules/@radix-ui/react-presence/dist/index.mjs
var React2 = __toESM(require_react(), 1);
var React = __toESM(require_react(), 1);
function useStateMachine(initialState, machine) {
return React.useReducer((state, event) => {
const nextState = machine[state][event];
return nextState ?? state;
}, initialState);
}
var Presence = (props) => {
const { present, children } = props;
const presence = usePresence(present);
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React2.Children.only(children);
const ref = useComposedRefs(presence.ref, getElementRef(child));
const forceMount = typeof children === "function";
return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;
};
Presence.displayName = "Presence";
function usePresence(present) {
const [node, setNode] = React2.useState();
const stylesRef = React2.useRef(null);
const prevPresentRef = React2.useRef(present);
const prevAnimationNameRef = React2.useRef("none");
const initialState = present ? "mounted" : "unmounted";
const [state, send] = useStateMachine(initialState, {
mounted: {
UNMOUNT: "unmounted",
ANIMATION_OUT: "unmountSuspended"
},
unmountSuspended: {
MOUNT: "mounted",
ANIMATION_END: "unmounted"
},
unmounted: {
MOUNT: "mounted"
}
});
React2.useEffect(() => {
const currentAnimationName = getAnimationName(stylesRef.current);
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
}, [state]);
useLayoutEffect2(() => {
const styles = stylesRef.current;
const wasPresent = prevPresentRef.current;
const hasPresentChanged = wasPresent !== present;
if (hasPresentChanged) {
const prevAnimationName = prevAnimationNameRef.current;
const currentAnimationName = getAnimationName(styles);
if (present) {
send("MOUNT");
} else if (currentAnimationName === "none" || styles?.display === "none") {
send("UNMOUNT");
} else {
const isAnimating = prevAnimationName !== currentAnimationName;
if (wasPresent && isAnimating) {
send("ANIMATION_OUT");
} else {
send("UNMOUNT");
}
}
prevPresentRef.current = present;
}
}, [present, send]);
useLayoutEffect2(() => {
if (node) {
let timeoutId;
const ownerWindow = node.ownerDocument.defaultView ?? window;
const handleAnimationEnd = (event) => {
const currentAnimationName = getAnimationName(stylesRef.current);
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
if (event.target === node && isCurrentAnimation) {
send("ANIMATION_END");
if (!prevPresentRef.current) {
const currentFillMode = node.style.animationFillMode;
node.style.animationFillMode = "forwards";
timeoutId = ownerWindow.setTimeout(() => {
if (node.style.animationFillMode === "forwards") {
node.style.animationFillMode = currentFillMode;
}
});
}
}
};
const handleAnimationStart = (event) => {
if (event.target === node) {
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
}
};
node.addEventListener("animationstart", handleAnimationStart);
node.addEventListener("animationcancel", handleAnimationEnd);
node.addEventListener("animationend", handleAnimationEnd);
return () => {
ownerWindow.clearTimeout(timeoutId);
node.removeEventListener("animationstart", handleAnimationStart);
node.removeEventListener("animationcancel", handleAnimationEnd);
node.removeEventListener("animationend", handleAnimationEnd);
};
} else {
send("ANIMATION_END");
}
}, [node, send]);
return {
isPresent: ["mounted", "unmountSuspended"].includes(state),
ref: React2.useCallback((node2) => {
stylesRef.current = node2 ? getComputedStyle(node2) : null;
setNode(node2);
}, [])
};
}
function getAnimationName(styles) {
return styles?.animationName || "none";
}
function getElementRef(element) {
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.ref;
}
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.props.ref;
}
return element.props.ref || element.ref;
}
export {
Presence
};
//# sourceMappingURL=chunk-INCCO7S4.js.map
File diff suppressed because one or more lines are too long
-248
View File
@@ -1,248 +0,0 @@
import {
createContextScope,
useLayoutEffect2
} from "./chunk-MOFDO34C.js";
import {
composeRefs,
useComposedRefs
} from "./chunk-2VUH7NEY.js";
import {
require_jsx_runtime
} from "./chunk-2YVA4HRZ.js";
import {
require_react
} from "./chunk-WUR7D6NS.js";
import {
__toESM
} from "./chunk-G3PMV62Z.js";
// node_modules/@radix-ui/react-collection/dist/index.mjs
var import_react = __toESM(require_react(), 1);
// node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs
var React = __toESM(require_react(), 1);
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
function createSlot(ownerName) {
const SlotClone = createSlotClone(ownerName);
const Slot2 = React.forwardRef((props, forwardedRef) => {
const { children, ...slotProps } = props;
const childrenArray = React.Children.toArray(children);
const slottable = childrenArray.find(isSlottable);
if (slottable) {
const newElement = slottable.props.children;
const newChildren = childrenArray.map((child) => {
if (child === slottable) {
if (React.Children.count(newElement) > 1) return React.Children.only(null);
return React.isValidElement(newElement) ? newElement.props.children : null;
} else {
return child;
}
});
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
}
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
});
Slot2.displayName = `${ownerName}.Slot`;
return Slot2;
}
var Slot = createSlot("Slot");
function createSlotClone(ownerName) {
const SlotClone = React.forwardRef((props, forwardedRef) => {
const { children, ...slotProps } = props;
if (React.isValidElement(children)) {
const childrenRef = getElementRef(children);
const props2 = mergeProps(slotProps, children.props);
if (children.type !== React.Fragment) {
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
}
return React.cloneElement(children, props2);
}
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
});
SlotClone.displayName = `${ownerName}.SlotClone`;
return SlotClone;
}
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
function createSlottable(ownerName) {
const Slottable2 = ({ children }) => {
return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
};
Slottable2.displayName = `${ownerName}.Slottable`;
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
return Slottable2;
}
var Slottable = createSlottable("Slottable");
function isSlottable(child) {
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
}
function mergeProps(slotProps, childProps) {
const overrideProps = { ...childProps };
for (const propName in childProps) {
const slotPropValue = slotProps[propName];
const childPropValue = childProps[propName];
const isHandler = /^on[A-Z]/.test(propName);
if (isHandler) {
if (slotPropValue && childPropValue) {
overrideProps[propName] = (...args) => {
const result = childPropValue(...args);
slotPropValue(...args);
return result;
};
} else if (slotPropValue) {
overrideProps[propName] = slotPropValue;
}
} else if (propName === "style") {
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
} else if (propName === "className") {
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
}
}
return { ...slotProps, ...overrideProps };
}
function getElementRef(element) {
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.ref;
}
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.props.ref;
}
return element.props.ref || element.ref;
}
// node_modules/@radix-ui/react-collection/dist/index.mjs
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
var import_react2 = __toESM(require_react(), 1);
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
function createCollection(name) {
const PROVIDER_NAME = name + "CollectionProvider";
const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
PROVIDER_NAME,
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
);
const CollectionProvider = (props) => {
const { scope, children } = props;
const ref = import_react.default.useRef(null);
const itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;
return (0, import_jsx_runtime2.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
};
CollectionProvider.displayName = PROVIDER_NAME;
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
const CollectionSlot = import_react.default.forwardRef(
(props, forwardedRef) => {
const { scope, children } = props;
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
return (0, import_jsx_runtime2.jsx)(CollectionSlotImpl, { ref: composedRefs, children });
}
);
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
const ITEM_DATA_ATTR = "data-radix-collection-item";
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
const CollectionItemSlot = import_react.default.forwardRef(
(props, forwardedRef) => {
const { scope, children, ...itemData } = props;
const ref = import_react.default.useRef(null);
const composedRefs = useComposedRefs(forwardedRef, ref);
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
import_react.default.useEffect(() => {
context.itemMap.set(ref, { ref, ...itemData });
return () => void context.itemMap.delete(ref);
});
return (0, import_jsx_runtime2.jsx)(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
}
);
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
function useCollection(scope) {
const context = useCollectionContext(name + "CollectionConsumer", scope);
const getItems = import_react.default.useCallback(() => {
const collectionNode = context.collectionRef.current;
if (!collectionNode) return [];
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
const items = Array.from(context.itemMap.values());
const orderedItems = items.sort(
(a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
);
return orderedItems;
}, [context.collectionRef, context.itemMap]);
return getItems;
}
return [
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
useCollection,
createCollectionScope
];
}
// node_modules/@radix-ui/react-direction/dist/index.mjs
var React3 = __toESM(require_react(), 1);
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
var DirectionContext = React3.createContext(void 0);
function useDirection(localDir) {
const globalDir = React3.useContext(DirectionContext);
return localDir || globalDir || "ltr";
}
// node_modules/@radix-ui/react-use-size/dist/index.mjs
var React4 = __toESM(require_react(), 1);
function useSize(element) {
const [size, setSize] = React4.useState(void 0);
useLayoutEffect2(() => {
if (element) {
setSize({ width: element.offsetWidth, height: element.offsetHeight });
const resizeObserver = new ResizeObserver((entries) => {
if (!Array.isArray(entries)) {
return;
}
if (!entries.length) {
return;
}
const entry = entries[0];
let width;
let height;
if ("borderBoxSize" in entry) {
const borderSizeEntry = entry["borderBoxSize"];
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
width = borderSize["inlineSize"];
height = borderSize["blockSize"];
} else {
width = element.offsetWidth;
height = element.offsetHeight;
}
setSize({ width, height });
});
resizeObserver.observe(element, { box: "border-box" });
return () => resizeObserver.unobserve(element);
} else {
setSize(void 0);
}
}, [element]);
return size;
}
// node_modules/@radix-ui/react-use-previous/dist/index.mjs
var React5 = __toESM(require_react(), 1);
function usePrevious(value) {
const ref = React5.useRef({ value, previous: value });
return React5.useMemo(() => {
if (ref.current.value !== value) {
ref.current.previous = ref.current.value;
ref.current.value = value;
}
return ref.current.previous;
}, [value]);
}
export {
createCollection,
useDirection,
useSize,
usePrevious
};
//# sourceMappingURL=chunk-L2OGOWTU.js.map
File diff suppressed because one or more lines are too long
-1352
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
-354
View File
@@ -1,354 +0,0 @@
import {
composeRefs
} from "./chunk-2VUH7NEY.js";
import {
require_react_dom
} from "./chunk-YF4B4G2L.js";
import {
require_jsx_runtime
} from "./chunk-2YVA4HRZ.js";
import {
require_react
} from "./chunk-WUR7D6NS.js";
import {
__toESM
} from "./chunk-G3PMV62Z.js";
// node_modules/@radix-ui/primitive/dist/index.mjs
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
return function handleEvent(event) {
originalEventHandler?.(event);
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
return ourEventHandler?.(event);
}
};
}
// node_modules/@radix-ui/react-context/dist/index.mjs
var React = __toESM(require_react(), 1);
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
function createContext2(rootComponentName, defaultContext) {
const Context = React.createContext(defaultContext);
const Provider = (props) => {
const { children, ...context } = props;
const value = React.useMemo(() => context, Object.values(context));
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
};
Provider.displayName = rootComponentName + "Provider";
function useContext2(consumerName) {
const context = React.useContext(Context);
if (context) return context;
if (defaultContext !== void 0) return defaultContext;
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
}
return [Provider, useContext2];
}
function createContextScope(scopeName, createContextScopeDeps = []) {
let defaultContexts = [];
function createContext3(rootComponentName, defaultContext) {
const BaseContext = React.createContext(defaultContext);
const index = defaultContexts.length;
defaultContexts = [...defaultContexts, defaultContext];
const Provider = (props) => {
const { scope, children, ...context } = props;
const Context = scope?.[scopeName]?.[index] || BaseContext;
const value = React.useMemo(() => context, Object.values(context));
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
};
Provider.displayName = rootComponentName + "Provider";
function useContext2(consumerName, scope) {
const Context = scope?.[scopeName]?.[index] || BaseContext;
const context = React.useContext(Context);
if (context) return context;
if (defaultContext !== void 0) return defaultContext;
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
}
return [Provider, useContext2];
}
const createScope = () => {
const scopeContexts = defaultContexts.map((defaultContext) => {
return React.createContext(defaultContext);
});
return function useScope(scope) {
const contexts = scope?.[scopeName] || scopeContexts;
return React.useMemo(
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
[scope, contexts]
);
};
};
createScope.scopeName = scopeName;
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
}
function composeContextScopes(...scopes) {
const baseScope = scopes[0];
if (scopes.length === 1) return baseScope;
const createScope = () => {
const scopeHooks = scopes.map((createScope2) => ({
useScope: createScope2(),
scopeName: createScope2.scopeName
}));
return function useComposedScopes(overrideScopes) {
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
const scopeProps = useScope(overrideScopes);
const currentScope = scopeProps[`__scope${scopeName}`];
return { ...nextScopes2, ...currentScope };
}, {});
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
};
};
createScope.scopeName = baseScope.scopeName;
return createScope;
}
// node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
var React2 = __toESM(require_react(), 1);
var useLayoutEffect2 = globalThis?.document ? React2.useLayoutEffect : () => {
};
// node_modules/@radix-ui/react-id/dist/index.mjs
var React3 = __toESM(require_react(), 1);
var useReactId = React3[" useId ".trim().toString()] || (() => void 0);
var count = 0;
function useId(deterministicId) {
const [id, setId] = React3.useState(useReactId());
useLayoutEffect2(() => {
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
}, [deterministicId]);
return deterministicId || (id ? `radix-${id}` : "");
}
// node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
var React5 = __toESM(require_react(), 1);
var React22 = __toESM(require_react(), 1);
// node_modules/@radix-ui/react-use-effect-event/dist/index.mjs
var React4 = __toESM(require_react(), 1);
var useReactEffectEvent = React4[" useEffectEvent ".trim().toString()];
var useReactInsertionEffect = React4[" useInsertionEffect ".trim().toString()];
// node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
function useControllableState({
prop,
defaultProp,
onChange = () => {
},
caller
}) {
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
defaultProp,
onChange
});
const isControlled = prop !== void 0;
const value = isControlled ? prop : uncontrolledProp;
if (true) {
const isControlledRef = React5.useRef(prop !== void 0);
React5.useEffect(() => {
const wasControlled = isControlledRef.current;
if (wasControlled !== isControlled) {
const from = wasControlled ? "controlled" : "uncontrolled";
const to = isControlled ? "controlled" : "uncontrolled";
console.warn(
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
);
}
isControlledRef.current = isControlled;
}, [isControlled, caller]);
}
const setValue = React5.useCallback(
(nextValue) => {
if (isControlled) {
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
if (value2 !== prop) {
onChangeRef.current?.(value2);
}
} else {
setUncontrolledProp(nextValue);
}
},
[isControlled, prop, setUncontrolledProp, onChangeRef]
);
return [value, setValue];
}
function useUncontrolledState({
defaultProp,
onChange
}) {
const [value, setValue] = React5.useState(defaultProp);
const prevValueRef = React5.useRef(value);
const onChangeRef = React5.useRef(onChange);
useInsertionEffect(() => {
onChangeRef.current = onChange;
}, [onChange]);
React5.useEffect(() => {
if (prevValueRef.current !== value) {
onChangeRef.current?.(value);
prevValueRef.current = value;
}
}, [value, prevValueRef]);
return [value, setValue, onChangeRef];
}
function isFunction(value) {
return typeof value === "function";
}
// node_modules/@radix-ui/react-primitive/dist/index.mjs
var React7 = __toESM(require_react(), 1);
var ReactDOM = __toESM(require_react_dom(), 1);
// node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs
var React6 = __toESM(require_react(), 1);
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
function createSlot(ownerName) {
const SlotClone = createSlotClone(ownerName);
const Slot2 = React6.forwardRef((props, forwardedRef) => {
const { children, ...slotProps } = props;
const childrenArray = React6.Children.toArray(children);
const slottable = childrenArray.find(isSlottable);
if (slottable) {
const newElement = slottable.props.children;
const newChildren = childrenArray.map((child) => {
if (child === slottable) {
if (React6.Children.count(newElement) > 1) return React6.Children.only(null);
return React6.isValidElement(newElement) ? newElement.props.children : null;
} else {
return child;
}
});
return (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React6.isValidElement(newElement) ? React6.cloneElement(newElement, void 0, newChildren) : null });
}
return (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
});
Slot2.displayName = `${ownerName}.Slot`;
return Slot2;
}
var Slot = createSlot("Slot");
function createSlotClone(ownerName) {
const SlotClone = React6.forwardRef((props, forwardedRef) => {
const { children, ...slotProps } = props;
if (React6.isValidElement(children)) {
const childrenRef = getElementRef(children);
const props2 = mergeProps(slotProps, children.props);
if (children.type !== React6.Fragment) {
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
}
return React6.cloneElement(children, props2);
}
return React6.Children.count(children) > 1 ? React6.Children.only(null) : null;
});
SlotClone.displayName = `${ownerName}.SlotClone`;
return SlotClone;
}
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
function createSlottable(ownerName) {
const Slottable2 = ({ children }) => {
return (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children });
};
Slottable2.displayName = `${ownerName}.Slottable`;
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
return Slottable2;
}
var Slottable = createSlottable("Slottable");
function isSlottable(child) {
return React6.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
}
function mergeProps(slotProps, childProps) {
const overrideProps = { ...childProps };
for (const propName in childProps) {
const slotPropValue = slotProps[propName];
const childPropValue = childProps[propName];
const isHandler = /^on[A-Z]/.test(propName);
if (isHandler) {
if (slotPropValue && childPropValue) {
overrideProps[propName] = (...args) => {
const result = childPropValue(...args);
slotPropValue(...args);
return result;
};
} else if (slotPropValue) {
overrideProps[propName] = slotPropValue;
}
} else if (propName === "style") {
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
} else if (propName === "className") {
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
}
}
return { ...slotProps, ...overrideProps };
}
function getElementRef(element) {
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.ref;
}
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.props.ref;
}
return element.props.ref || element.ref;
}
// node_modules/@radix-ui/react-primitive/dist/index.mjs
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
var NODES = [
"a",
"button",
"div",
"form",
"h2",
"h3",
"img",
"input",
"label",
"li",
"nav",
"ol",
"p",
"select",
"span",
"svg",
"ul"
];
var Primitive = NODES.reduce((primitive, node) => {
const Slot2 = createSlot(`Primitive.${node}`);
const Node = React7.forwardRef((props, forwardedRef) => {
const { asChild, ...primitiveProps } = props;
const Comp = asChild ? Slot2 : node;
if (typeof window !== "undefined") {
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
}
return (0, import_jsx_runtime3.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
});
Node.displayName = `Primitive.${node}`;
return { ...primitive, [node]: Node };
}, {});
function dispatchDiscreteCustomEvent(target, event) {
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
}
// node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
var React8 = __toESM(require_react(), 1);
function useCallbackRef(callback) {
const callbackRef = React8.useRef(callback);
React8.useEffect(() => {
callbackRef.current = callback;
});
return React8.useMemo(() => (...args) => callbackRef.current?.(...args), []);
}
export {
composeEventHandlers,
createContext2,
createContextScope,
useLayoutEffect2,
useId,
useControllableState,
Primitive,
dispatchDiscreteCustomEvent,
useCallbackRef
};
//# sourceMappingURL=chunk-MOFDO34C.js.map
File diff suppressed because one or more lines are too long
+30 -43
View File
@@ -1056,24 +1056,6 @@ var _invertEase = function _invertEase2(ease) {
return 1 - ease(1 - p);
};
};
var _propagateYoyoEase = function _propagateYoyoEase2(timeline2, isYoyo) {
var child = timeline2._first, ease;
while (child) {
if (child instanceof Timeline) {
_propagateYoyoEase2(child, isYoyo);
} else if (child.vars.yoyoEase && (!child._yoyo || !child._repeat) && child._yoyo !== isYoyo) {
if (child.timeline) {
_propagateYoyoEase2(child.timeline, isYoyo);
} else {
ease = child._ease;
child._ease = child._yEase;
child._yEase = ease;
child._yoyo = isYoyo;
}
}
child = child._next;
}
};
var _parseEase = function _parseEase2(ease, defaultEase) {
return !ease ? defaultEase : (_isFunction(ease) ? ease : _easeMap[ease] || _configEaseFromString(ease)) || defaultEase;
};
@@ -1579,7 +1561,6 @@ var Timeline = (function(_Animation) {
if (!this._ts && !prevPaused) {
return this;
}
_propagateYoyoEase(this, isYoyo);
}
}
if (this._hasPause && !this._forcing && this._lock < 2) {
@@ -1590,7 +1571,7 @@ var Timeline = (function(_Animation) {
}
this._tTime = tTime;
this._time = time;
this._act = !timeScale;
this._act = !!timeScale;
if (!this._initted) {
this._onUpdate = this.vars.onUpdate;
this._initted = 1;
@@ -2038,16 +2019,12 @@ var _checkPlugin = function _checkPlugin2(property, vars, tween, index, target,
var _overwritingTween;
var _forceAllPropTweens;
var _initTween = function _initTween2(tween, time, tTime) {
var vars = tween.vars, ease = vars.ease, startAt = vars.startAt, immediateRender = vars.immediateRender, lazy = vars.lazy, onUpdate = vars.onUpdate, runBackwards = vars.runBackwards, yoyoEase = vars.yoyoEase, keyframes = vars.keyframes, autoRevert = vars.autoRevert, dur = tween._dur, prevStartAt = tween._startAt, targets = tween._targets, parent = tween.parent, fullTargets = parent && parent.data === "nested" ? parent.vars.targets : targets, autoOverwrite = tween._overwrite === "auto" && !_suppressOverwrites, tl = tween.timeline, cleanVars, i, p, pt, target, hasPriority, gsData, harness, plugin, ptLookup, index, harnessVars, overwritten;
var vars = tween.vars, ease = vars.ease, startAt = vars.startAt, immediateRender = vars.immediateRender, lazy = vars.lazy, onUpdate = vars.onUpdate, runBackwards = vars.runBackwards, yoyoEase = vars.yoyoEase, keyframes = vars.keyframes, autoRevert = vars.autoRevert, dur = tween._dur, prevStartAt = tween._startAt, targets = tween._targets, parent = tween.parent, fullTargets = parent && parent.data === "nested" ? parent.vars.targets : targets, autoOverwrite = tween._overwrite === "auto" && !_suppressOverwrites, tl = tween.timeline, reverseEase = vars.easeReverse || yoyoEase, cleanVars, i, p, pt, target, hasPriority, gsData, harness, plugin, ptLookup, index, harnessVars, overwritten;
tl && (!keyframes || !ease) && (ease = "none");
tween._ease = _parseEase(ease, _defaults.ease);
tween._yEase = yoyoEase ? _invertEase(_parseEase(yoyoEase === true ? ease : yoyoEase, _defaults.ease)) : 0;
if (yoyoEase && tween._yoyo && !tween._repeat) {
yoyoEase = tween._yEase;
tween._yEase = tween._ease;
tween._ease = yoyoEase;
}
tween._rEase = reverseEase && (_parseEase(reverseEase) || tween._ease);
tween._from = !tl && !!vars.runBackwards;
if (tween._from) tween.ratio = 1;
if (!tl || keyframes && !vars.stagger) {
harness = targets[0] ? _getCache(targets[0]).harness : 0;
harnessVars = harness && vars[harness.prop];
@@ -2166,7 +2143,7 @@ var _updatePropTweens = function _updatePropTweens2(tween, property, value, star
tween.vars[property] = "+=0";
_initTween(tween, time);
_forceAllPropTweens = 0;
return skipRecursion ? _warn(property + " not eligible for reset") : 1;
return skipRecursion ? _warn(property + " not eligible for reset. Try splitting into individual properties") : 1;
}
ptCache.push(pt);
}
@@ -2223,7 +2200,7 @@ var _parseKeyframe = function _parseKeyframe2(prop, obj, allProps, easeEach) {
var _parseFuncOrString = function _parseFuncOrString2(value, tween, i, target, targets) {
return _isFunction(value) ? value.call(tween, i, target, targets) : _isString(value) && ~value.indexOf("random(") ? _replaceRandom(value) : value;
};
var _staggerTweenProps = _callbackNames + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert";
var _staggerTweenProps = _callbackNames + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert";
var _staggerPropsToSkip = {};
_forEachName(_staggerTweenProps + ",id,stagger,delay,duration,paused,scrollTrigger", function(name) {
return _staggerPropsToSkip[name] = 1;
@@ -2238,12 +2215,13 @@ var Tween = (function(_Animation2) {
position = null;
}
_this3 = _Animation2.call(this, skipInherit ? vars : _inheritDefaults(vars)) || this;
var _this3$vars = _this3.vars, duration = _this3$vars.duration, delay = _this3$vars.delay, immediateRender = _this3$vars.immediateRender, stagger = _this3$vars.stagger, overwrite = _this3$vars.overwrite, keyframes = _this3$vars.keyframes, defaults2 = _this3$vars.defaults, scrollTrigger = _this3$vars.scrollTrigger, yoyoEase = _this3$vars.yoyoEase, parent = vars.parent || _globalTimeline, parsedTargets = (_isArray(targets) || _isTypedArray(targets) ? _isNumber(targets[0]) : "length" in vars) ? [targets] : toArray(targets), tl, i, copy, l, p, curTarget, staggerFunc, staggerVarsToMerge;
var _this3$vars = _this3.vars, duration = _this3$vars.duration, delay = _this3$vars.delay, immediateRender = _this3$vars.immediateRender, stagger = _this3$vars.stagger, overwrite = _this3$vars.overwrite, keyframes = _this3$vars.keyframes, defaults2 = _this3$vars.defaults, scrollTrigger = _this3$vars.scrollTrigger, parent = vars.parent || _globalTimeline, parsedTargets = (_isArray(targets) || _isTypedArray(targets) ? _isNumber(targets[0]) : "length" in vars) ? [targets] : toArray(targets), tl, i, copy, l, p, curTarget, staggerFunc, staggerVarsToMerge;
_this3._targets = parsedTargets.length ? _harness(parsedTargets) : _warn("GSAP target " + targets + " not found. https://gsap.com", !_config.nullTargetWarn) || [];
_this3._ptLookup = [];
_this3._overwrite = overwrite;
if (keyframes || stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) {
vars = _this3.vars;
var easeReverse = vars.easeReverse || vars.yoyoEase;
tl = _this3.timeline = new Timeline({
data: "nested",
defaults: defaults2 || {},
@@ -2266,7 +2244,7 @@ var Tween = (function(_Animation2) {
for (i = 0; i < l; i++) {
copy = _copyExcluding(vars, _staggerPropsToSkip);
copy.stagger = 0;
yoyoEase && (copy.yoyoEase = yoyoEase);
easeReverse && (copy.easeReverse = easeReverse);
staggerVarsToMerge && _merge(copy, staggerVarsToMerge);
curTarget = parsedTargets[i];
copy.duration = +_parseFuncOrString(duration, _assertThisInitialized(_this3), i, curTarget, parsedTargets);
@@ -2338,7 +2316,7 @@ var Tween = (function(_Animation2) {
}
var _proto3 = Tween2.prototype;
_proto3.render = function render3(totalTime, suppressEvents, force) {
var prevTime = this._time, tDur = this._tDur, dur = this._dur, isNegative = totalTime < 0, tTime = totalTime > tDur - _tinyNum && !isNegative ? tDur : totalTime < _tinyNum ? 0 : totalTime, time, pt, iteration, cycleDuration, prevIteration, isYoyo, ratio, timeline2, yoyoEase;
var prevTime = this._time, tDur = this._tDur, dur = this._dur, isNegative = totalTime < 0, tTime = totalTime > tDur - _tinyNum && !isNegative ? tDur : totalTime < _tinyNum ? 0 : totalTime, time, pt, iteration, cycleDuration, prevIteration, isYoyo, ratio, timeline2;
if (!dur) {
_renderZeroDurationTween(this, totalTime, suppressEvents, force);
} else if (tTime !== this._tTime || !totalTime || force || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== isNegative || this._lazy) {
@@ -2364,17 +2342,13 @@ var Tween = (function(_Animation2) {
}
}
isYoyo = this._yoyo && iteration & 1;
if (isYoyo) {
yoyoEase = this._yEase;
time = dur - time;
}
if (isYoyo) time = dur - time;
prevIteration = _animationCycle(this._tTime, cycleDuration);
if (time === prevTime && !force && this._initted && iteration === prevIteration) {
this._tTime = tTime;
return this;
}
if (iteration !== prevIteration) {
timeline2 && this._yEase && _propagateYoyoEase(timeline2, isYoyo);
if (this.vars.repeatRefresh && !isYoyo && !this._lock && time !== cycleDuration && this._initted) {
this._lock = force = 1;
this.render(_roundPrecise(cycleDuration * iteration), true).invalidate()._lock = 0;
@@ -2393,16 +2367,29 @@ var Tween = (function(_Animation2) {
return this.render(totalTime, suppressEvents, force);
}
}
if (this._rEase) {
var inv = time < prevTime;
if (inv !== this._inv) {
var segDur = inv ? prevTime : dur - prevTime;
this._inv = inv;
if (this._from) this.ratio = 1 - this.ratio;
this._invRatio = this.ratio;
this._invTime = prevTime;
this._invRecip = segDur ? (inv ? -1 : 1) / segDur : 0;
this._invScale = inv ? -this.ratio : 1 - this.ratio;
this._invEase = inv ? this._rEase : this._ease;
}
this.ratio = ratio = this._invRatio + this._invScale * this._invEase((time - this._invTime) * this._invRecip);
} else {
this.ratio = ratio = this._ease(time / dur);
}
if (this._from) this.ratio = ratio = 1 - ratio;
this._tTime = tTime;
this._time = time;
if (!this._act && this._ts) {
this._act = 1;
this._lazy = 0;
}
this.ratio = ratio = (yoyoEase || this._ease)(time / dur);
if (this._from) {
this.ratio = ratio = 1 - ratio;
}
if (!prevTime && tTime && !suppressEvents && !prevIteration) {
_callback(this, "onStart");
if (this._tTime !== tTime) {
@@ -2674,7 +2661,7 @@ var PropTween = (function() {
};
return PropTween2;
})();
_forEachName(_callbackNames + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger", function(name) {
_forEachName(_callbackNames + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse", function(name) {
return _reservedProps[name] = 1;
});
_globals.TweenMax = _globals.TweenLite = Tween;
@@ -3146,7 +3133,7 @@ var gsap = _gsap.registerPlugin({
}
}
}, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap;
Tween.version = Timeline.version = gsap.version = "3.14.2";
Tween.version = Timeline.version = gsap.version = "3.15.0";
_coreReady = 1;
_windowExists() && _wake();
var Power0 = _easeMap.Power0;
+3 -3
View File
File diff suppressed because one or more lines are too long
+19 -13
View File
@@ -168,7 +168,7 @@ var _getVelocityProp = function _getVelocityProp2(value, minTimeRefresh, useDelt
};
};
var _getEvent = function _getEvent2(e, preventDefault) {
preventDefault && !e._gsapAllow && e.preventDefault();
preventDefault && !e._gsapAllow && e.cancelable !== false && e.preventDefault();
return e.changedTouches ? e.changedTouches[0] : e;
};
var _getAbsoluteMax = function _getAbsoluteMax2(a) {
@@ -196,9 +196,9 @@ var _initCore = function _initCore2(core) {
setTimeout(function() {
return _startup = 0;
}, 500);
_setScrollTrigger();
_coreInitted = 1;
}
ScrollTrigger || _setScrollTrigger();
return _coreInitted;
};
_horizontal.op = _vertical;
@@ -468,7 +468,7 @@ var Observer = (function() {
}]);
return Observer2;
})();
Observer.version = "3.14.2";
Observer.version = "3.15.0";
Observer.create = function(vars) {
return new Observer(vars);
};
@@ -604,11 +604,11 @@ var _isObject = function _isObject2(value) {
var _endAnimation = function _endAnimation2(animation, reversed, pause) {
return animation && animation.progress(reversed ? 0 : 1) && pause && animation.pause();
};
var _callback = function _callback2(self, func) {
var _callback = function _callback2(self, func, extraParam) {
if (self.enabled) {
var result = self._ctx ? self._ctx.add(function() {
return func(self);
}) : func(self);
return func(self, extraParam);
}) : func(self, extraParam);
result && result.totalTime && (self.callbackAnimation = result);
}
};
@@ -629,7 +629,7 @@ var _Width = "Width";
var _Height = "Height";
var _px = "px";
var _getComputedStyle = function _getComputedStyle2(element) {
return _win2.getComputedStyle(element);
return _win2.getComputedStyle(element.nodeType === Node.DOCUMENT_NODE ? element.scrollingElement : element);
};
var _makePositionable = function _makePositionable2(element) {
var position = _getComputedStyle(element).position;
@@ -653,7 +653,7 @@ var _getBounds = function _getBounds2(element, withoutTransforms) {
scale: 1,
skewX: 0,
skewY: 0
}).progress(1), bounds = element.getBoundingClientRect();
}).progress(1), bounds = element.getBoundingClientRect ? element.getBoundingClientRect() : element.scrollingElement.getBoundingClientRect();
tween && tween.progress(0).kill();
return bounds;
};
@@ -768,7 +768,7 @@ var _offsetToPx = function _offsetToPx2(value, size) {
};
var _createMarker = function _createMarker2(type, name, container, direction, _ref4, offset, matchWidthEl, containerAnimation) {
var startColor = _ref4.startColor, endColor = _ref4.endColor, fontSize = _ref4.fontSize, indent = _ref4.indent, fontWeight = _ref4.fontWeight;
var e = _doc2.createElement("div"), useFixedPosition = _isViewport3(container) || _getProxyProp(container, "pinType") === "fixed", isScroller = type.indexOf("scroller") !== -1, parent = useFixedPosition ? _body2 : container, isStart = type.indexOf("start") !== -1, color = isStart ? startColor : endColor, css = "border-color:" + color + ";font-size:" + fontSize + ";color:" + color + ";font-weight:" + fontWeight + ";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";
var e = _doc2.createElement("div"), useFixedPosition = _isViewport3(container) || _getProxyProp(container, "pinType") === "fixed", isScroller = type.indexOf("scroller") !== -1, parent = useFixedPosition ? _body2 : container.tagName === "IFRAME" ? container.contentDocument.body : container, isStart = type.indexOf("start") !== -1, color = isStart ? startColor : endColor, css = "border-color:" + color + ";font-size:" + fontSize + ";color:" + color + ";font-weight:" + fontWeight + ";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";
css += "position:" + ((isScroller || containerAnimation) && useFixedPosition ? "fixed;" : "absolute;");
(isScroller || containerAnimation || !useFixedPosition) && (css += (direction === _vertical ? _right : _bottom) + ":" + (offset + parseFloat(indent)) + "px;");
matchWidthEl && (css += "box-sizing:border-box;text-align:left;width:" + matchWidthEl.offsetWidth + "px;");
@@ -1293,7 +1293,7 @@ var ScrollTrigger2 = (function() {
data: _abs(endScroll - scroll),
// record the distance so that if another snap tween occurs (conflict) we can prioritize the closest snap.
onInterrupt: function onInterrupt() {
return snapDelayedCall.restart(true) && _onInterrupt && _onInterrupt(self);
return snapDelayedCall.restart(true) && _onInterrupt && _callback(self, _onInterrupt);
},
onComplete: function onComplete() {
self.update();
@@ -1303,10 +1303,10 @@ var ScrollTrigger2 = (function() {
}
snap1 = snap2 = animation && !isToggle ? animation.totalProgress() : self.progress;
onSnapComplete && onSnapComplete(self);
_onComplete && _onComplete(self);
_onComplete && _callback(self, _onComplete);
}
}, scroll, change1 * change, endScroll - scroll - change1 * change);
onStart && onStart(self, tweenTo.tween);
onStart && _callback(self, onStart, tweenTo.tween);
}
} else if (self.isActive && lastSnap !== scroll) {
snapDelayedCall.restart(true);
@@ -2000,6 +2000,12 @@ var ScrollTrigger2 = (function() {
_wheelListener(_removeListener3, _scrollers[i], _scrollers[i + 1]);
_wheelListener(_removeListener3, _scrollers[i], _scrollers[i + 2]);
}
} else if (_doc2) {
var onLoad = function onLoad2() {
ScrollTrigger3.enable();
_doc2.removeEventListener("DOMContentLoaded", onLoad2);
};
_doc2.addEventListener("DOMContentLoaded", onLoad);
}
}
};
@@ -2050,7 +2056,7 @@ var ScrollTrigger2 = (function() {
};
return ScrollTrigger3;
})();
ScrollTrigger2.version = "3.14.2";
ScrollTrigger2.version = "3.15.0";
ScrollTrigger2.saveStyles = function(targets) {
return targets ? _toArray(targets).forEach(function(target) {
if (target && target.style) {
+3 -3
View File
File diff suppressed because one or more lines are too long
+156 -13985
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
File diff suppressed because one or more lines are too long
+15 -1
View File
@@ -54,6 +54,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "41",
"electron": "1.2"
},
@@ -219,6 +220,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "41",
"electron": "1.2"
},
@@ -280,6 +282,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "41",
"electron": "1.2"
},
@@ -1075,6 +1078,7 @@
"deno": "1",
"ios": "10",
"samsung": "7",
"rhino": "1.9",
"opera_mobile": "43",
"electron": "1.7"
},
@@ -1216,7 +1220,6 @@
"deno": "1",
"ios": "11.3",
"samsung": "8",
"rhino": "1.7.15",
"opera_mobile": "46",
"electron": "3.0"
},
@@ -1452,6 +1455,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "37",
"electron": "1.1"
},
@@ -1465,6 +1469,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "37",
"electron": "1.1"
},
@@ -1968,6 +1973,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "41",
"electron": "1.2"
},
@@ -1981,6 +1987,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "41",
"electron": "1.2"
},
@@ -1994,6 +2001,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "41",
"electron": "1.2"
},
@@ -2007,6 +2015,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "41",
"electron": "1.2"
},
@@ -2020,6 +2029,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "41",
"electron": "1.2"
},
@@ -2033,6 +2043,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "41",
"electron": "1.2"
},
@@ -2046,6 +2057,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "41",
"electron": "1.2"
},
@@ -2059,6 +2071,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "41",
"electron": "1.2"
},
@@ -2072,6 +2085,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "41",
"electron": "1.2"
},
+3
View File
@@ -13,6 +13,9 @@
"bugfix/transform-safari-block-shadowing",
"bugfix/transform-safari-for-shadowing"
],
"transform-destructuring": [
"bugfix/transform-safari-rest-destructuring-rhs-array"
],
"transform-template-literals": [
"bugfix/transform-tagged-template-caching"
],
+28
View File
@@ -35,6 +35,7 @@
"deno": "1",
"ios": "10",
"samsung": "5",
"rhino": "1.9",
"opera_mobile": "41",
"electron": "1.2"
},
@@ -80,6 +81,19 @@
"opera_mobile": "36",
"electron": "0.37"
},
"bugfix/transform-safari-rest-destructuring-rhs-array": {
"chrome": "49",
"opera": "36",
"edge": "14",
"firefox": "34",
"safari": "14.1",
"node": "6",
"deno": "1",
"ios": "14.5",
"samsung": "5",
"opera_mobile": "36",
"electron": "0.37"
},
"bugfix/transform-tagged-template-caching": {
"chrome": "41",
"opera": "28",
@@ -171,6 +185,7 @@
"deno": "1",
"ios": "9",
"samsung": "3.4",
"rhino": "1.9",
"opera_mobile": "28",
"electron": "0.21"
},
@@ -187,6 +202,19 @@
"opera_mobile": "41",
"electron": "1.2"
},
"transform-destructuring": {
"chrome": "51",
"opera": "38",
"edge": "15",
"firefox": "53",
"safari": "10",
"node": "6.5",
"deno": "1",
"ios": "10",
"samsung": "5",
"opera_mobile": "41",
"electron": "1.2"
},
"transform-block-scoping": {
"chrome": "50",
"opera": "37",
+11 -6
View File
@@ -1,10 +1,10 @@
{
"transform-explicit-resource-management": {
"chrome": "134",
"edge": "134",
"chrome": "141",
"edge": "141",
"firefox": "141",
"node": "24",
"electron": "35.0"
"node": "25",
"electron": "39.0"
},
"transform-duplicate-named-capturing-groups-regex": {
"chrome": "126",
@@ -14,6 +14,7 @@
"safari": "17.4",
"node": "23",
"ios": "17.4",
"rhino": "1.9",
"electron": "31.0"
},
"transform-regexp-modifiers": {
@@ -432,6 +433,7 @@
"deno": "1",
"ios": "11.3",
"samsung": "9",
"rhino": "1.9",
"opera_mobile": "47",
"electron": "3.0"
},
@@ -445,6 +447,7 @@
"deno": "1",
"ios": "11.3",
"samsung": "9",
"rhino": "1.9",
"opera_mobile": "47",
"electron": "3.0"
},
@@ -458,6 +461,7 @@
"deno": "1",
"ios": "11.3",
"samsung": "9",
"rhino": "1.9",
"opera_mobile": "47",
"electron": "3.0"
},
@@ -498,6 +502,7 @@
"deno": "1",
"ios": "13",
"samsung": "3.4",
"rhino": "1.9",
"opera_mobile": "28",
"electron": "0.21"
},
@@ -695,10 +700,10 @@
"opera": "38",
"edge": "15",
"firefox": "53",
"safari": "10",
"safari": "14.1",
"node": "6.5",
"deno": "1",
"ios": "10",
"ios": "14.5",
"samsung": "5",
"opera_mobile": "41",
"electron": "1.2"
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/compat-data",
"version": "7.28.6",
"version": "7.29.7",
"author": "The Babel Team (https://babel.dev/team)",
"license": "MIT",
"description": "The compat-data to determine required Babel plugins",
@@ -30,8 +30,8 @@
],
"devDependencies": {
"@mdn/browser-compat-data": "^6.0.8",
"core-js-compat": "^3.43.0",
"electron-to-chromium": "^1.5.140"
"core-js-compat": "^3.48.0",
"electron-to-chromium": "^1.5.278"
},
"engines": {
"node": ">=6.9.0"
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/helper-annotate-as-pure",
"version": "7.27.3",
"version": "7.29.7",
"description": "Helper function to annotate paths and nodes with #__PURE__ comment",
"repository": {
"type": "git",
@@ -14,10 +14,10 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/types": "^7.27.3"
"@babel/types": "^7.29.7"
},
"devDependencies": {
"@babel/traverse": "^7.27.3"
"@babel/traverse": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/helper-compilation-targets",
"version": "7.28.6",
"version": "7.29.7",
"author": "The Babel Team (https://babel.dev/team)",
"license": "MIT",
"description": "Helper functions on Babel compilation targets",
@@ -25,14 +25,14 @@
"babel-plugin"
],
"dependencies": {
"@babel/compat-data": "^7.28.6",
"@babel/helper-validator-option": "^7.27.1",
"@babel/compat-data": "^7.29.7",
"@babel/helper-validator-option": "^7.29.7",
"browserslist": "^4.24.0",
"lru-cache": "^5.1.1",
"semver": "^6.3.1"
},
"devDependencies": {
"@babel/helper-plugin-test-runner": "^7.27.1",
"@babel/helper-plugin-test-runner": "^7.29.7",
"@types/lru-cache": "^5.1.1",
"@types/semver": "^5.5.0"
},
+11 -9
View File
@@ -877,6 +877,17 @@ function transformClass(path, state, constantSuper, ignoreFunctionLength, classN
classLocals.push(classIdLocal, classInitLocal);
const statics = [];
path.get("body.body").forEach(element => {
if (element.isStaticBlock() || !element.isClassMethod() && element.node.static) {
const replaceSupers = new _helperReplaceSupers.default({
constantSuper,
methodPath: element,
objectRef: classIdLocal,
superRef: path.node.superClass,
file: state.file,
refToPreserve: classIdLocal
});
replaceSupers.replace();
}
if (element.isStaticBlock()) {
if (hasInstancePrivateAccess(element, instancePrivateNames)) {
const staticBlockClosureId = memoiseExpression(staticBlockToFunctionClosure(element.node), "staticBlock", staticClosures);
@@ -904,15 +915,6 @@ function transformClass(path, state, constantSuper, ignoreFunctionLength, classN
static: true
})) {
if (hasInstancePrivateAccess(element, instancePrivateNames)) {
const replaceSupers = new _helperReplaceSupers.default({
constantSuper,
methodPath: element,
objectRef: classIdLocal,
superRef: path.node.superClass,
file: state.file,
refToPreserve: classIdLocal
});
replaceSupers.replace();
const privateMethodDelegateId = memoiseExpression(createFunctionExpressionFromPrivateMethod(element.node), element.get("key.id").node.name, staticClosures);
if (ignoreFunctionLength) {
element.node.params = [_core.types.restElement(_core.types.identifier("arg"))];
File diff suppressed because one or more lines are too long
+5 -5
View File
@@ -95,18 +95,18 @@ function createClassFeaturePlugin({
pre(file) {
(0, _features.enableFeature)(file, feature, loose);
if (typeof file.get(versionKey) === "number") {
file.set(versionKey, "7.28.6");
file.set(versionKey, "7.29.7");
return;
}
if (!file.get(versionKey) || _semver.lt(file.get(versionKey), "7.28.6")) {
file.set(versionKey, "7.28.6");
if (!file.get(versionKey) || _semver.lt(file.get(versionKey), "7.29.7")) {
file.set(versionKey, "7.29.7");
}
},
visitor: {
Class(path, {
file
}) {
if (file.get(versionKey) !== "7.28.6") return;
if (file.get(versionKey) !== "7.29.7") return;
if (!(0, _features.shouldTransform)(path, file)) return;
const pathIsClassDeclaration = path.isClassDeclaration();
if (pathIsClassDeclaration) (0, _typescript.assertFieldTransformed)(path);
@@ -218,7 +218,7 @@ function createClassFeaturePlugin({
ExportDefaultDeclaration(path, {
file
}) {
if (file.get(versionKey) !== "7.28.6") return;
if (file.get(versionKey) !== "7.29.7") return;
const decl = path.get("declaration");
if (decl.isClassDeclaration() && (0, _decorators.hasDecorators)(decl.node)) {
if (decl.node.id) {
+10 -10
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/helper-create-class-features-plugin",
"version": "7.28.6",
"version": "7.29.7",
"author": "The Babel Team (https://babel.dev/team)",
"license": "MIT",
"description": "Compile class public and private fields, private methods and decorators to ES6",
@@ -18,21 +18,21 @@
"babel-plugin"
],
"dependencies": {
"@babel/helper-annotate-as-pure": "^7.27.3",
"@babel/helper-member-expression-to-functions": "^7.28.5",
"@babel/helper-optimise-call-expression": "^7.27.1",
"@babel/helper-replace-supers": "^7.28.6",
"@babel/helper-skip-transparent-expression-wrappers": "^7.27.1",
"@babel/traverse": "^7.28.6",
"@babel/helper-annotate-as-pure": "^7.29.7",
"@babel/helper-member-expression-to-functions": "^7.29.7",
"@babel/helper-optimise-call-expression": "^7.29.7",
"@babel/helper-replace-supers": "^7.29.7",
"@babel/helper-skip-transparent-expression-wrappers": "^7.29.7",
"@babel/traverse": "^7.29.7",
"semver": "^6.3.1"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
},
"devDependencies": {
"@babel/core": "^7.28.6",
"@babel/helper-plugin-test-runner": "^7.27.1",
"@babel/preset-env": "^7.28.6",
"@babel/core": "^7.29.7",
"@babel/helper-plugin-test-runner": "^7.29.7",
"@babel/preset-env": "^7.29.7",
"@types/charcodes": "^0.2.0",
"charcodes": "^0.2.0"
},
+3 -5
View File
@@ -47,14 +47,12 @@ function createRegExpFeaturePlugin({
file.set(_features.runtimeKey, runtime);
}
}
{
if (typeof file.get(versionKey) === "number") {
file.set(versionKey, "7.28.5");
file.set(versionKey, "7.29.7");
return;
}
}
if (!file.get(versionKey) || _semver.lt(file.get(versionKey), "7.28.5")) {
file.set(versionKey, "7.28.5");
if (!file.get(versionKey) || _semver.lt(file.get(versionKey), "7.29.7")) {
file.set(versionKey, "7.29.7");
}
},
visitor: {
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/helper-create-regexp-features-plugin",
"version": "7.28.5",
"version": "7.29.7",
"author": "The Babel Team (https://babel.dev/team)",
"license": "MIT",
"description": "Compile ESNext Regular Expressions to ES5",
@@ -18,7 +18,7 @@
"babel-plugin"
],
"dependencies": {
"@babel/helper-annotate-as-pure": "^7.27.3",
"@babel/helper-annotate-as-pure": "^7.29.7",
"regexpu-core": "^6.3.1",
"semver": "^6.3.1"
},
@@ -26,8 +26,8 @@
"@babel/core": "^7.0.0"
},
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/helper-plugin-test-runner": "^7.27.1"
"@babel/core": "^7.29.7",
"@babel/helper-plugin-test-runner": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
+235 -19
View File
@@ -6,6 +6,7 @@ const {
types: t$1,
template: template
} = _babel.default || _babel;
const PossibleGlobalObjects = new Set(["global", "globalThis", "self", "window"]);
function intersection(a, b) {
const result = new Set();
a.forEach(v => b.has(v) && result.add(v));
@@ -14,18 +15,18 @@ function intersection(a, b) {
function has$1(object, key) {
return Object.prototype.hasOwnProperty.call(object, key);
}
function resolve$1(path, resolved = new Set()) {
if (resolved.has(path)) return;
resolved.add(path);
function resolve$1(path, seen = new Set()) {
if (seen.has(path)) return;
seen.add(path);
if (path.isVariableDeclarator()) {
if (path.get("id").isIdentifier()) {
return resolve$1(path.get("init"), resolved);
return resolve$1(path.get("init"), seen);
}
} else if (path.isReferencedIdentifier()) {
const binding = path.scope.getBinding(path.node.name);
if (!binding) return path;
if (!binding.constant) return;
return resolve$1(binding.path, resolved);
return resolve$1(binding.path, seen);
}
return path;
}
@@ -33,6 +34,17 @@ function resolveId(path) {
if (path.isIdentifier() && !path.scope.hasBinding(path.node.name, /* noGlobals */true)) {
return path.node.name;
}
// globalThis.Object / window.Array / self.Map / global.Set -> resolve to
// the property name, because accessing a built-in through a global object
// reference is equivalent to accessing it directly.
if (path.isMemberExpression() && !path.node.computed) {
const object = path.get("object");
const property = path.get("property");
if (object.isIdentifier() && !object.scope.hasBinding(object.node.name, /* noGlobals */true) && PossibleGlobalObjects.has(object.node.name) && property.isIdentifier()) {
return property.node.name;
}
}
const resolved = resolve$1(path);
if (resolved != null && resolved.isIdentifier()) {
return resolved.node.name;
@@ -60,7 +72,18 @@ function resolveKey(path, computed = false) {
if (typeof value === "string") return value;
}
}
function resolveSource(obj) {
function resolveInstance(obj, seen) {
const source = resolveSource(obj, seen);
return source.placement === "prototype" ? source.id : null;
}
function resolveSource(obj, seen) {
if (seen.has(obj)) {
return {
id: null,
placement: null
};
}
seen.add(obj);
if (obj.isMemberExpression() && obj.get("property").isIdentifier({
name: "prototype"
})) {
@@ -85,22 +108,23 @@ function resolveSource(obj) {
}
const path = resolve$1(obj);
switch (path == null ? void 0 : path.type) {
case "NullLiteral":
return {
id: null,
placement: null
};
case "RegExpLiteral":
return {
id: "RegExp",
placement: "prototype"
};
case "FunctionExpression":
return {
id: "Function",
placement: "prototype"
};
case "StringLiteral":
case "TemplateLiteral":
return {
id: "String",
placement: "prototype"
};
case "NumberLiteral":
case "NumericLiteral":
return {
id: "Number",
placement: "prototype"
@@ -110,6 +134,11 @@ function resolveSource(obj) {
id: "Boolean",
placement: "prototype"
};
case "BigIntLiteral":
return {
id: "BigInt",
placement: "prototype"
};
case "ObjectExpression":
return {
id: "Object",
@@ -120,6 +149,192 @@ function resolveSource(obj) {
id: "Array",
placement: "prototype"
};
case "FunctionExpression":
case "ArrowFunctionExpression":
case "ClassExpression":
return {
id: "Function",
placement: "prototype"
};
// new Constructor() -> resolve the constructor name
case "NewExpression":
{
const calleeId = resolveId(path.get("callee"));
if (calleeId) return {
id: calleeId,
placement: "prototype"
};
return {
id: null,
placement: null
};
}
// Unary expressions -> result type depends on operator
case "UnaryExpression":
{
const {
operator
} = path.node;
if (operator === "typeof") return {
id: "String",
placement: "prototype"
};
if (operator === "!" || operator === "delete") return {
id: "Boolean",
placement: "prototype"
};
// Unary + always produces Number (throws on BigInt)
if (operator === "+") return {
id: "Number",
placement: "prototype"
};
// Unary - and ~ can produce Number or BigInt depending on operand
if (operator === "-" || operator === "~") {
const arg = resolveInstance(path.get("argument"), seen);
if (arg === "BigInt") return {
id: "BigInt",
placement: "prototype"
};
if (arg !== null) return {
id: "Number",
placement: "prototype"
};
return {
id: null,
placement: null
};
}
return {
id: null,
placement: null
};
}
// ++i, i++ produce Number or BigInt depending on the argument
case "UpdateExpression":
{
const arg = resolveInstance(path.get("argument"), seen);
if (arg === "BigInt") return {
id: "BigInt",
placement: "prototype"
};
if (arg !== null) return {
id: "Number",
placement: "prototype"
};
return {
id: null,
placement: null
};
}
// Binary expressions -> result type depends on operator
case "BinaryExpression":
{
const {
operator
} = path.node;
if (operator === "==" || operator === "!=" || operator === "===" || operator === "!==" || operator === "<" || operator === ">" || operator === "<=" || operator === ">=" || operator === "instanceof" || operator === "in") {
return {
id: "Boolean",
placement: "prototype"
};
}
// >>> always produces Number
if (operator === ">>>") {
return {
id: "Number",
placement: "prototype"
};
}
// Arithmetic and bitwise operators can produce Number or BigInt
if (operator === "-" || operator === "*" || operator === "/" || operator === "%" || operator === "**" || operator === "&" || operator === "|" || operator === "^" || operator === "<<" || operator === ">>") {
const left = resolveInstance(path.get("left"), seen);
const right = resolveInstance(path.get("right"), seen);
if (left === "BigInt" && right === "BigInt") {
return {
id: "BigInt",
placement: "prototype"
};
}
if (left !== null && right !== null) {
return {
id: "Number",
placement: "prototype"
};
}
return {
id: null,
placement: null
};
}
// + depends on operand types: string wins, otherwise number or bigint
if (operator === "+") {
const left = resolveInstance(path.get("left"), seen);
const right = resolveInstance(path.get("right"), seen);
if (left === "String" || right === "String") {
return {
id: "String",
placement: "prototype"
};
}
if (left === "Number" && right === "Number") {
return {
id: "Number",
placement: "prototype"
};
}
if (left === "BigInt" && right === "BigInt") {
return {
id: "BigInt",
placement: "prototype"
};
}
}
return {
id: null,
placement: null
};
}
// (a, b, c) -> the result is the last expression
case "SequenceExpression":
{
const expressions = path.get("expressions");
return resolveSource(expressions[expressions.length - 1], seen);
}
// a = b -> the result is the right side
case "AssignmentExpression":
{
if (path.node.operator === "=") {
return resolveSource(path.get("right"), seen);
}
return {
id: null,
placement: null
};
}
// a ? b : c -> if both branches resolve to the same type, use it
case "ConditionalExpression":
{
const consequent = resolveSource(path.get("consequent"), seen);
const alternate = resolveSource(path.get("alternate"), seen);
if (consequent.id && consequent.id === alternate.id) {
return consequent;
}
return {
id: null,
placement: null
};
}
// (expr) -> unwrap parenthesized expressions
case "ParenthesizedExpression":
return resolveSource(path.get("expression"), seen);
// TypeScript / Flow type wrappers -> unwrap to the inner expression
case "TSAsExpression":
case "TSSatisfiesExpression":
case "TSNonNullExpression":
case "TSInstantiationExpression":
case "TSTypeAssertion":
case "TypeCastExpression":
return resolveSource(path.get("expression"), seen);
}
return {
id: null,
@@ -419,10 +634,12 @@ var usage = callProvider => {
objectIsGlobalIdentifier = false;
}
}
const source = resolveSource(object);
let skipObject = property(source.id, key, source.placement, path);
skipObject || (skipObject = !objectIsGlobalIdentifier || path.shouldSkip || object.shouldSkip || isRemoved(object));
if (!skipObject) handleReferencedIdentifier(object);
const source = resolveSource(object, new Set());
const skipObject = property(source.id, key, source.placement, path);
const canHandleObject = objectIsGlobalIdentifier && !path.shouldSkip && !object.shouldSkip && !isRemoved(object);
if (canHandleObject && (!skipObject || PossibleGlobalObjects.has(source.id))) {
handleReferencedIdentifier(object);
}
},
ObjectPattern(path) {
const {
@@ -452,7 +669,7 @@ var usage = callProvider => {
if (obj) ({
id,
placement
} = resolveSource(obj));
} = resolveSource(obj, new Set()));
for (const prop of path.get("properties")) {
if (prop.isObjectProperty()) {
const key = resolveKey(prop.get("key"));
@@ -462,7 +679,7 @@ var usage = callProvider => {
},
BinaryExpression(path) {
if (path.node.operator !== "in") return;
const source = resolveSource(path.get("right"));
const source = resolveSource(path.get("right"), new Set());
const key = resolveKey(path.get("left"), true);
if (!key) return;
callProvider({
@@ -512,7 +729,6 @@ function logMissing(missingDeps) {}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function laterLogMissing(missingDeps) {}
const PossibleGlobalObjects = new Set(["global", "globalThis", "self", "window"]);
function createMetaResolver(polyfills) {
const {
static: staticP,
File diff suppressed because one or more lines are too long
+235 -19
View File
@@ -10,6 +10,7 @@ const {
types: t$1,
template: template
} = _babel.default || _babel;
const PossibleGlobalObjects = new Set(["global", "globalThis", "self", "window"]);
function intersection(a, b) {
const result = new Set();
a.forEach(v => b.has(v) && result.add(v));
@@ -18,18 +19,18 @@ function intersection(a, b) {
function has$1(object, key) {
return Object.prototype.hasOwnProperty.call(object, key);
}
function resolve$1(path, resolved = new Set()) {
if (resolved.has(path)) return;
resolved.add(path);
function resolve$1(path, seen = new Set()) {
if (seen.has(path)) return;
seen.add(path);
if (path.isVariableDeclarator()) {
if (path.get("id").isIdentifier()) {
return resolve$1(path.get("init"), resolved);
return resolve$1(path.get("init"), seen);
}
} else if (path.isReferencedIdentifier()) {
const binding = path.scope.getBinding(path.node.name);
if (!binding) return path;
if (!binding.constant) return;
return resolve$1(binding.path, resolved);
return resolve$1(binding.path, seen);
}
return path;
}
@@ -37,6 +38,17 @@ function resolveId(path) {
if (path.isIdentifier() && !path.scope.hasBinding(path.node.name, /* noGlobals */true)) {
return path.node.name;
}
// globalThis.Object / window.Array / self.Map / global.Set -> resolve to
// the property name, because accessing a built-in through a global object
// reference is equivalent to accessing it directly.
if (path.isMemberExpression() && !path.node.computed) {
const object = path.get("object");
const property = path.get("property");
if (object.isIdentifier() && !object.scope.hasBinding(object.node.name, /* noGlobals */true) && PossibleGlobalObjects.has(object.node.name) && property.isIdentifier()) {
return property.node.name;
}
}
const resolved = resolve$1(path);
if (resolved != null && resolved.isIdentifier()) {
return resolved.node.name;
@@ -64,7 +76,18 @@ function resolveKey(path, computed = false) {
if (typeof value === "string") return value;
}
}
function resolveSource(obj) {
function resolveInstance(obj, seen) {
const source = resolveSource(obj, seen);
return source.placement === "prototype" ? source.id : null;
}
function resolveSource(obj, seen) {
if (seen.has(obj)) {
return {
id: null,
placement: null
};
}
seen.add(obj);
if (obj.isMemberExpression() && obj.get("property").isIdentifier({
name: "prototype"
})) {
@@ -89,22 +112,23 @@ function resolveSource(obj) {
}
const path = resolve$1(obj);
switch (path == null ? void 0 : path.type) {
case "NullLiteral":
return {
id: null,
placement: null
};
case "RegExpLiteral":
return {
id: "RegExp",
placement: "prototype"
};
case "FunctionExpression":
return {
id: "Function",
placement: "prototype"
};
case "StringLiteral":
case "TemplateLiteral":
return {
id: "String",
placement: "prototype"
};
case "NumberLiteral":
case "NumericLiteral":
return {
id: "Number",
placement: "prototype"
@@ -114,6 +138,11 @@ function resolveSource(obj) {
id: "Boolean",
placement: "prototype"
};
case "BigIntLiteral":
return {
id: "BigInt",
placement: "prototype"
};
case "ObjectExpression":
return {
id: "Object",
@@ -124,6 +153,192 @@ function resolveSource(obj) {
id: "Array",
placement: "prototype"
};
case "FunctionExpression":
case "ArrowFunctionExpression":
case "ClassExpression":
return {
id: "Function",
placement: "prototype"
};
// new Constructor() -> resolve the constructor name
case "NewExpression":
{
const calleeId = resolveId(path.get("callee"));
if (calleeId) return {
id: calleeId,
placement: "prototype"
};
return {
id: null,
placement: null
};
}
// Unary expressions -> result type depends on operator
case "UnaryExpression":
{
const {
operator
} = path.node;
if (operator === "typeof") return {
id: "String",
placement: "prototype"
};
if (operator === "!" || operator === "delete") return {
id: "Boolean",
placement: "prototype"
};
// Unary + always produces Number (throws on BigInt)
if (operator === "+") return {
id: "Number",
placement: "prototype"
};
// Unary - and ~ can produce Number or BigInt depending on operand
if (operator === "-" || operator === "~") {
const arg = resolveInstance(path.get("argument"), seen);
if (arg === "BigInt") return {
id: "BigInt",
placement: "prototype"
};
if (arg !== null) return {
id: "Number",
placement: "prototype"
};
return {
id: null,
placement: null
};
}
return {
id: null,
placement: null
};
}
// ++i, i++ produce Number or BigInt depending on the argument
case "UpdateExpression":
{
const arg = resolveInstance(path.get("argument"), seen);
if (arg === "BigInt") return {
id: "BigInt",
placement: "prototype"
};
if (arg !== null) return {
id: "Number",
placement: "prototype"
};
return {
id: null,
placement: null
};
}
// Binary expressions -> result type depends on operator
case "BinaryExpression":
{
const {
operator
} = path.node;
if (operator === "==" || operator === "!=" || operator === "===" || operator === "!==" || operator === "<" || operator === ">" || operator === "<=" || operator === ">=" || operator === "instanceof" || operator === "in") {
return {
id: "Boolean",
placement: "prototype"
};
}
// >>> always produces Number
if (operator === ">>>") {
return {
id: "Number",
placement: "prototype"
};
}
// Arithmetic and bitwise operators can produce Number or BigInt
if (operator === "-" || operator === "*" || operator === "/" || operator === "%" || operator === "**" || operator === "&" || operator === "|" || operator === "^" || operator === "<<" || operator === ">>") {
const left = resolveInstance(path.get("left"), seen);
const right = resolveInstance(path.get("right"), seen);
if (left === "BigInt" && right === "BigInt") {
return {
id: "BigInt",
placement: "prototype"
};
}
if (left !== null && right !== null) {
return {
id: "Number",
placement: "prototype"
};
}
return {
id: null,
placement: null
};
}
// + depends on operand types: string wins, otherwise number or bigint
if (operator === "+") {
const left = resolveInstance(path.get("left"), seen);
const right = resolveInstance(path.get("right"), seen);
if (left === "String" || right === "String") {
return {
id: "String",
placement: "prototype"
};
}
if (left === "Number" && right === "Number") {
return {
id: "Number",
placement: "prototype"
};
}
if (left === "BigInt" && right === "BigInt") {
return {
id: "BigInt",
placement: "prototype"
};
}
}
return {
id: null,
placement: null
};
}
// (a, b, c) -> the result is the last expression
case "SequenceExpression":
{
const expressions = path.get("expressions");
return resolveSource(expressions[expressions.length - 1], seen);
}
// a = b -> the result is the right side
case "AssignmentExpression":
{
if (path.node.operator === "=") {
return resolveSource(path.get("right"), seen);
}
return {
id: null,
placement: null
};
}
// a ? b : c -> if both branches resolve to the same type, use it
case "ConditionalExpression":
{
const consequent = resolveSource(path.get("consequent"), seen);
const alternate = resolveSource(path.get("alternate"), seen);
if (consequent.id && consequent.id === alternate.id) {
return consequent;
}
return {
id: null,
placement: null
};
}
// (expr) -> unwrap parenthesized expressions
case "ParenthesizedExpression":
return resolveSource(path.get("expression"), seen);
// TypeScript / Flow type wrappers -> unwrap to the inner expression
case "TSAsExpression":
case "TSSatisfiesExpression":
case "TSNonNullExpression":
case "TSInstantiationExpression":
case "TSTypeAssertion":
case "TypeCastExpression":
return resolveSource(path.get("expression"), seen);
}
return {
id: null,
@@ -423,10 +638,12 @@ var usage = callProvider => {
objectIsGlobalIdentifier = false;
}
}
const source = resolveSource(object);
let skipObject = property(source.id, key, source.placement, path);
skipObject || (skipObject = !objectIsGlobalIdentifier || path.shouldSkip || object.shouldSkip || isRemoved(object));
if (!skipObject) handleReferencedIdentifier(object);
const source = resolveSource(object, new Set());
const skipObject = property(source.id, key, source.placement, path);
const canHandleObject = objectIsGlobalIdentifier && !path.shouldSkip && !object.shouldSkip && !isRemoved(object);
if (canHandleObject && (!skipObject || PossibleGlobalObjects.has(source.id))) {
handleReferencedIdentifier(object);
}
},
ObjectPattern(path) {
const {
@@ -456,7 +673,7 @@ var usage = callProvider => {
if (obj) ({
id,
placement
} = resolveSource(obj));
} = resolveSource(obj, new Set()));
for (const prop of path.get("properties")) {
if (prop.isObjectProperty()) {
const key = resolveKey(prop.get("key"));
@@ -466,7 +683,7 @@ var usage = callProvider => {
},
BinaryExpression(path) {
if (path.node.operator !== "in") return;
const source = resolveSource(path.get("right"));
const source = resolveSource(path.get("right"), new Set());
const key = resolveKey(path.get("left"), true);
if (!key) return;
callProvider({
@@ -556,7 +773,6 @@ function laterLogMissing(missingDeps) {
laterLogMissingDependencies();
}
const PossibleGlobalObjects = new Set(["global", "globalThis", "self", "window"]);
function createMetaResolver(polyfills) {
const {
static: staticP,
File diff suppressed because one or more lines are too long
+1 -2
View File
@@ -3,7 +3,6 @@
exports.__esModule = true;
exports.default = createMetaResolver;
var _utils = require("./utils");
const PossibleGlobalObjects = new Set(["global", "globalThis", "self", "window"]);
function createMetaResolver(polyfills) {
const {
static: staticP,
@@ -25,7 +24,7 @@ function createMetaResolver(polyfills) {
key
} = meta;
if (object && placement === "static") {
if (globalP && PossibleGlobalObjects.has(object) && (0, _utils.has)(globalP, key)) {
if (globalP && _utils.PossibleGlobalObjects.has(object) && (0, _utils.has)(globalP, key)) {
return {
kind: "global",
desc: globalP[key],
+228 -12
View File
@@ -1,6 +1,7 @@
"use strict";
exports.__esModule = true;
exports.PossibleGlobalObjects = void 0;
exports.createUtilsGetter = createUtilsGetter;
exports.getImportSource = getImportSource;
exports.getRequireSource = getRequireSource;
@@ -14,6 +15,7 @@ const {
types: t,
template: template
} = _babel.default || _babel;
const PossibleGlobalObjects = exports.PossibleGlobalObjects = new Set(["global", "globalThis", "self", "window"]);
function intersection(a, b) {
const result = new Set();
a.forEach(v => b.has(v) && result.add(v));
@@ -22,18 +24,18 @@ function intersection(a, b) {
function has(object, key) {
return Object.prototype.hasOwnProperty.call(object, key);
}
function resolve(path, resolved = new Set()) {
if (resolved.has(path)) return;
resolved.add(path);
function resolve(path, seen = new Set()) {
if (seen.has(path)) return;
seen.add(path);
if (path.isVariableDeclarator()) {
if (path.get("id").isIdentifier()) {
return resolve(path.get("init"), resolved);
return resolve(path.get("init"), seen);
}
} else if (path.isReferencedIdentifier()) {
const binding = path.scope.getBinding(path.node.name);
if (!binding) return path;
if (!binding.constant) return;
return resolve(binding.path, resolved);
return resolve(binding.path, seen);
}
return path;
}
@@ -41,6 +43,17 @@ function resolveId(path) {
if (path.isIdentifier() && !path.scope.hasBinding(path.node.name, /* noGlobals */true)) {
return path.node.name;
}
// globalThis.Object / window.Array / self.Map / global.Set -> resolve to
// the property name, because accessing a built-in through a global object
// reference is equivalent to accessing it directly.
if (path.isMemberExpression() && !path.node.computed) {
const object = path.get("object");
const property = path.get("property");
if (object.isIdentifier() && !object.scope.hasBinding(object.node.name, /* noGlobals */true) && PossibleGlobalObjects.has(object.node.name) && property.isIdentifier()) {
return property.node.name;
}
}
const resolved = resolve(path);
if (resolved != null && resolved.isIdentifier()) {
return resolved.node.name;
@@ -68,7 +81,18 @@ function resolveKey(path, computed = false) {
if (typeof value === "string") return value;
}
}
function resolveSource(obj) {
function resolveInstance(obj, seen) {
const source = resolveSource(obj, seen);
return source.placement === "prototype" ? source.id : null;
}
function resolveSource(obj, seen) {
if (seen.has(obj)) {
return {
id: null,
placement: null
};
}
seen.add(obj);
if (obj.isMemberExpression() && obj.get("property").isIdentifier({
name: "prototype"
})) {
@@ -93,22 +117,23 @@ function resolveSource(obj) {
}
const path = resolve(obj);
switch (path == null ? void 0 : path.type) {
case "NullLiteral":
return {
id: null,
placement: null
};
case "RegExpLiteral":
return {
id: "RegExp",
placement: "prototype"
};
case "FunctionExpression":
return {
id: "Function",
placement: "prototype"
};
case "StringLiteral":
case "TemplateLiteral":
return {
id: "String",
placement: "prototype"
};
case "NumberLiteral":
case "NumericLiteral":
return {
id: "Number",
placement: "prototype"
@@ -118,6 +143,11 @@ function resolveSource(obj) {
id: "Boolean",
placement: "prototype"
};
case "BigIntLiteral":
return {
id: "BigInt",
placement: "prototype"
};
case "ObjectExpression":
return {
id: "Object",
@@ -128,6 +158,192 @@ function resolveSource(obj) {
id: "Array",
placement: "prototype"
};
case "FunctionExpression":
case "ArrowFunctionExpression":
case "ClassExpression":
return {
id: "Function",
placement: "prototype"
};
// new Constructor() -> resolve the constructor name
case "NewExpression":
{
const calleeId = resolveId(path.get("callee"));
if (calleeId) return {
id: calleeId,
placement: "prototype"
};
return {
id: null,
placement: null
};
}
// Unary expressions -> result type depends on operator
case "UnaryExpression":
{
const {
operator
} = path.node;
if (operator === "typeof") return {
id: "String",
placement: "prototype"
};
if (operator === "!" || operator === "delete") return {
id: "Boolean",
placement: "prototype"
};
// Unary + always produces Number (throws on BigInt)
if (operator === "+") return {
id: "Number",
placement: "prototype"
};
// Unary - and ~ can produce Number or BigInt depending on operand
if (operator === "-" || operator === "~") {
const arg = resolveInstance(path.get("argument"), seen);
if (arg === "BigInt") return {
id: "BigInt",
placement: "prototype"
};
if (arg !== null) return {
id: "Number",
placement: "prototype"
};
return {
id: null,
placement: null
};
}
return {
id: null,
placement: null
};
}
// ++i, i++ produce Number or BigInt depending on the argument
case "UpdateExpression":
{
const arg = resolveInstance(path.get("argument"), seen);
if (arg === "BigInt") return {
id: "BigInt",
placement: "prototype"
};
if (arg !== null) return {
id: "Number",
placement: "prototype"
};
return {
id: null,
placement: null
};
}
// Binary expressions -> result type depends on operator
case "BinaryExpression":
{
const {
operator
} = path.node;
if (operator === "==" || operator === "!=" || operator === "===" || operator === "!==" || operator === "<" || operator === ">" || operator === "<=" || operator === ">=" || operator === "instanceof" || operator === "in") {
return {
id: "Boolean",
placement: "prototype"
};
}
// >>> always produces Number
if (operator === ">>>") {
return {
id: "Number",
placement: "prototype"
};
}
// Arithmetic and bitwise operators can produce Number or BigInt
if (operator === "-" || operator === "*" || operator === "/" || operator === "%" || operator === "**" || operator === "&" || operator === "|" || operator === "^" || operator === "<<" || operator === ">>") {
const left = resolveInstance(path.get("left"), seen);
const right = resolveInstance(path.get("right"), seen);
if (left === "BigInt" && right === "BigInt") {
return {
id: "BigInt",
placement: "prototype"
};
}
if (left !== null && right !== null) {
return {
id: "Number",
placement: "prototype"
};
}
return {
id: null,
placement: null
};
}
// + depends on operand types: string wins, otherwise number or bigint
if (operator === "+") {
const left = resolveInstance(path.get("left"), seen);
const right = resolveInstance(path.get("right"), seen);
if (left === "String" || right === "String") {
return {
id: "String",
placement: "prototype"
};
}
if (left === "Number" && right === "Number") {
return {
id: "Number",
placement: "prototype"
};
}
if (left === "BigInt" && right === "BigInt") {
return {
id: "BigInt",
placement: "prototype"
};
}
}
return {
id: null,
placement: null
};
}
// (a, b, c) -> the result is the last expression
case "SequenceExpression":
{
const expressions = path.get("expressions");
return resolveSource(expressions[expressions.length - 1], seen);
}
// a = b -> the result is the right side
case "AssignmentExpression":
{
if (path.node.operator === "=") {
return resolveSource(path.get("right"), seen);
}
return {
id: null,
placement: null
};
}
// a ? b : c -> if both branches resolve to the same type, use it
case "ConditionalExpression":
{
const consequent = resolveSource(path.get("consequent"), seen);
const alternate = resolveSource(path.get("alternate"), seen);
if (consequent.id && consequent.id === alternate.id) {
return consequent;
}
return {
id: null,
placement: null
};
}
// (expr) -> unwrap parenthesized expressions
case "ParenthesizedExpression":
return resolveSource(path.get("expression"), seen);
// TypeScript / Flow type wrappers -> unwrap to the inner expression
case "TSAsExpression":
case "TSSatisfiesExpression":
case "TSNonNullExpression":
case "TSInstantiationExpression":
case "TSTypeAssertion":
case "TypeCastExpression":
return resolveSource(path.get("expression"), seen);
}
return {
id: null,
+8 -6
View File
@@ -72,10 +72,12 @@ var _default = callProvider => {
objectIsGlobalIdentifier = false;
}
}
const source = (0, _utils.resolveSource)(object);
let skipObject = property(source.id, key, source.placement, path);
skipObject || (skipObject = !objectIsGlobalIdentifier || path.shouldSkip || object.shouldSkip || isRemoved(object));
if (!skipObject) handleReferencedIdentifier(object);
const source = (0, _utils.resolveSource)(object, new Set());
const skipObject = property(source.id, key, source.placement, path);
const canHandleObject = objectIsGlobalIdentifier && !path.shouldSkip && !object.shouldSkip && !isRemoved(object);
if (canHandleObject && (!skipObject || _utils.PossibleGlobalObjects.has(source.id))) {
handleReferencedIdentifier(object);
}
},
ObjectPattern(path) {
const {
@@ -105,7 +107,7 @@ var _default = callProvider => {
if (obj) ({
id,
placement
} = (0, _utils.resolveSource)(obj));
} = (0, _utils.resolveSource)(obj, new Set()));
for (const prop of path.get("properties")) {
if (prop.isObjectProperty()) {
const key = (0, _utils.resolveKey)(prop.get("key"));
@@ -115,7 +117,7 @@ var _default = callProvider => {
},
BinaryExpression(path) {
if (path.node.operator !== "in") return;
const source = (0, _utils.resolveSource)(path.get("right"));
const source = (0, _utils.resolveSource)(path.get("right"), new Set());
const key = (0, _utils.resolveKey)(path.get("left"), true);
if (!key) return;
callProvider({
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/helper-define-polyfill-provider",
"version": "0.6.6",
"version": "0.6.8",
"description": "Babel helper to create your own polyfill provider",
"repository": {
"type": "git",
@@ -55,5 +55,5 @@
"webpack": "^4.47.0",
"webpack-cli": "^3.3.12"
},
"gitHead": "9b040e303af7d703a57f16d46538d1b0d5462237"
"gitHead": "86eff78e98adc17cdf0eb9ba4d94140eb7cb0da0"
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/helper-member-expression-to-functions",
"version": "7.28.5",
"version": "7.29.7",
"description": "Helper function to replace certain member expressions with function calls",
"repository": {
"type": "git",
@@ -15,8 +15,8 @@
"main": "./lib/index.js",
"author": "The Babel Team (https://babel.dev/team)",
"dependencies": {
"@babel/traverse": "^7.28.5",
"@babel/types": "^7.28.5"
"@babel/traverse": "^7.29.7",
"@babel/types": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/helper-optimise-call-expression",
"version": "7.27.1",
"version": "7.29.7",
"description": "Helper function to optimise call expression",
"repository": {
"type": "git",
@@ -14,11 +14,11 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/types": "^7.27.1"
"@babel/types": "^7.29.7"
},
"devDependencies": {
"@babel/generator": "^7.27.1",
"@babel/parser": "^7.27.1"
"@babel/generator": "^7.29.7",
"@babel/parser": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/helper-remap-async-to-generator",
"version": "7.27.1",
"version": "7.29.7",
"description": "Helper function to remap async functions to generators",
"repository": {
"type": "git",
@@ -14,12 +14,12 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/helper-annotate-as-pure": "^7.27.1",
"@babel/helper-wrap-function": "^7.27.1",
"@babel/traverse": "^7.27.1"
"@babel/helper-annotate-as-pure": "^7.29.7",
"@babel/helper-wrap-function": "^7.29.7",
"@babel/traverse": "^7.29.7"
},
"devDependencies": {
"@babel/core": "^7.27.1"
"@babel/core": "^7.29.7"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/helper-replace-supers",
"version": "7.28.6",
"version": "7.29.7",
"description": "Helper function to replace supers",
"repository": {
"type": "git",
@@ -14,12 +14,12 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/helper-member-expression-to-functions": "^7.28.5",
"@babel/helper-optimise-call-expression": "^7.27.1",
"@babel/traverse": "^7.28.6"
"@babel/helper-member-expression-to-functions": "^7.29.7",
"@babel/helper-optimise-call-expression": "^7.29.7",
"@babel/traverse": "^7.29.7"
},
"devDependencies": {
"@babel/core": "^7.28.6"
"@babel/core": "^7.29.7"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
@@ -1,6 +1,6 @@
{
"name": "@babel/helper-skip-transparent-expression-wrappers",
"version": "7.27.1",
"version": "7.29.7",
"description": "Helper which skips types and parentheses",
"repository": {
"type": "git",
@@ -20,8 +20,8 @@
"./package.json": "./package.json"
},
"dependencies": {
"@babel/traverse": "^7.27.1",
"@babel/types": "^7.27.1"
"@babel/traverse": "^7.29.7",
"@babel/types": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/helper-validator-option",
"version": "7.27.1",
"version": "7.29.7",
"description": "Validate plugin/preset options",
"repository": {
"type": "git",
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/helper-wrap-function",
"version": "7.28.6",
"version": "7.29.7",
"description": "Helper to wrap functions inside a function call.",
"repository": {
"type": "git",
@@ -14,9 +14,9 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/template": "^7.28.6",
"@babel/traverse": "^7.28.6",
"@babel/types": "^7.28.6"
"@babel/template": "^7.29.7",
"@babel/traverse": "^7.29.7",
"@babel/types": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
@@ -36,9 +36,7 @@ var _default = exports.default = (0, _helperPluginUtils.declare)(({
const state = {
found: false
};
{
path.traverse(containsClassExpressionVisitor, state);
}
return state.found;
}
function wrap(path) {
@@ -46,9 +44,7 @@ var _default = exports.default = (0, _helperPluginUtils.declare)(({
yield: t.isYieldExpression(path.node),
await: t.isAwaitExpression(path.node)
};
{
path.traverse(containsYieldOrAwaitVisitor, context);
}
let replacement;
if (context.yield) {
const fn = t.functionExpression(null, [], t.blockStatement([t.returnStatement(path.node)]), true, context.await);
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-bugfix-firefox-class-in-computed-class-key",
"version": "7.28.5",
"version": "7.29.7",
"description": "Wraps classes defined in computed keys of other classes affected by https://bugzilla.mozilla.org/show_bug.cgi?id=1887677",
"repository": {
"type": "git",
@@ -25,15 +25,15 @@
"bugfix"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.27.1",
"@babel/traverse": "^7.28.5"
"@babel/helper-plugin-utils": "^7.29.7",
"@babel/traverse": "^7.29.7"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
},
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/helper-plugin-test-runner": "^7.27.1"
"@babel/core": "^7.29.7",
"@babel/helper-plugin-test-runner": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-bugfix-safari-class-field-initializer-scope",
"version": "7.27.1",
"version": "7.29.7",
"description": "Wrap class field initializers with IIFE to workaround https://webkit.org/b/236843",
"repository": {
"type": "git",
@@ -25,15 +25,15 @@
"bugfix"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.27.1"
"@babel/helper-plugin-utils": "^7.29.7"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
},
"devDependencies": {
"@babel/core": "^7.27.1",
"@babel/helper-plugin-test-runner": "^7.27.1",
"@babel/traverse": "^7.27.1"
"@babel/core": "^7.29.7",
"@babel/helper-plugin-test-runner": "^7.29.7",
"@babel/traverse": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression",
"version": "7.27.1",
"version": "7.29.7",
"description": "Rename destructuring parameter to workaround https://bugs.webkit.org/show_bug.cgi?id=220517",
"repository": {
"type": "git",
@@ -25,15 +25,15 @@
"bugfix"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.27.1"
"@babel/helper-plugin-utils": "^7.29.7"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
},
"devDependencies": {
"@babel/core": "^7.27.1",
"@babel/helper-plugin-test-runner": "^7.27.1",
"@babel/traverse": "^7.27.1"
"@babel/core": "^7.29.7",
"@babel/helper-plugin-test-runner": "^7.29.7",
"@babel/traverse": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining",
"version": "7.27.1",
"version": "7.29.7",
"description": "Transform optional chaining operators to workaround https://crbug.com/v8/11558",
"repository": {
"type": "git",
@@ -25,17 +25,17 @@
"bugfix"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.27.1",
"@babel/helper-skip-transparent-expression-wrappers": "^7.27.1",
"@babel/plugin-transform-optional-chaining": "^7.27.1"
"@babel/helper-plugin-utils": "^7.29.7",
"@babel/helper-skip-transparent-expression-wrappers": "^7.29.7",
"@babel/plugin-transform-optional-chaining": "^7.29.7"
},
"peerDependencies": {
"@babel/core": "^7.13.0"
},
"devDependencies": {
"@babel/core": "^7.27.1",
"@babel/helper-plugin-test-runner": "^7.27.1",
"@babel/traverse": "^7.27.1"
"@babel/core": "^7.29.7",
"@babel/helper-plugin-test-runner": "^7.29.7",
"@babel/traverse": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly",
"version": "7.28.6",
"version": "7.29.7",
"description": "Transform static class fields assignments that are affected by https://crbug.com/v8/12421",
"repository": {
"type": "git",
@@ -25,16 +25,16 @@
"bugfix"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.28.6",
"@babel/traverse": "^7.28.6"
"@babel/helper-plugin-utils": "^7.29.7",
"@babel/traverse": "^7.29.7"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
},
"devDependencies": {
"@babel/core": "^7.28.6",
"@babel/helper-plugin-test-runner": "^7.27.1",
"@babel/traverse": "^7.28.6"
"@babel/core": "^7.29.7",
"@babel/helper-plugin-test-runner": "^7.29.7",
"@babel/traverse": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-proposal-decorators",
"version": "7.28.6",
"version": "7.29.7",
"author": "The Babel Team (https://babel.dev/team)",
"license": "MIT",
"publishConfig": {
@@ -20,19 +20,19 @@
"decorators"
],
"dependencies": {
"@babel/helper-create-class-features-plugin": "^7.28.6",
"@babel/helper-plugin-utils": "^7.28.6",
"@babel/plugin-syntax-decorators": "^7.28.6"
"@babel/helper-create-class-features-plugin": "^7.29.7",
"@babel/helper-plugin-utils": "^7.29.7",
"@babel/plugin-syntax-decorators": "^7.29.7"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.28.6",
"@babel/helper-plugin-test-runner": "^7.27.1",
"@babel/traverse": "^7.28.6",
"@babel/core": "^7.29.7",
"@babel/helper-plugin-test-runner": "^7.29.7",
"@babel/traverse": "^7.29.7",
"array.prototype.concat": "^1.0.2",
"babel-plugin-polyfill-es-shims": "^0.10.8",
"babel-plugin-polyfill-es-shims": "^0.10.9",
"object.getownpropertydescriptors": "^2.1.1"
},
"engines": {
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-syntax-decorators",
"version": "7.28.6",
"version": "7.29.7",
"description": "Allow parsing of decorators",
"repository": {
"type": "git",
@@ -17,13 +17,13 @@
"babel-plugin"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.28.6"
"@babel/helper-plugin-utils": "^7.29.7"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.28.6"
"@babel/core": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-syntax-import-assertions",
"version": "7.28.6",
"version": "7.29.7",
"description": "Allow parsing of the module assertion attributes in the import statement",
"repository": {
"type": "git",
@@ -16,13 +16,13 @@
"babel-plugin"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.28.6"
"@babel/helper-plugin-utils": "^7.29.7"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.28.6"
"@babel/core": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-syntax-import-attributes",
"version": "7.28.6",
"version": "7.29.7",
"description": "Allow parsing of the module attributes in the import statement",
"repository": {
"type": "git",
@@ -16,14 +16,14 @@
"babel-plugin"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.28.6"
"@babel/helper-plugin-utils": "^7.29.7"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.28.6",
"@babel/helper-plugin-test-runner": "^7.27.1"
"@babel/core": "^7.29.7",
"@babel/helper-plugin-test-runner": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-syntax-jsx",
"version": "7.28.6",
"version": "7.29.7",
"description": "Allow parsing of jsx",
"repository": {
"type": "git",
@@ -17,13 +17,13 @@
"babel-plugin"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.28.6"
"@babel/helper-plugin-utils": "^7.29.7"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.28.6"
"@babel/core": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-syntax-typescript",
"version": "7.28.6",
"version": "7.29.7",
"description": "Allow parsing of TypeScript syntax",
"repository": {
"type": "git",
@@ -18,14 +18,14 @@
"typescript"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.28.6"
"@babel/helper-plugin-utils": "^7.29.7"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.28.6",
"@babel/helper-plugin-test-runner": "^7.27.1"
"@babel/core": "^7.29.7",
"@babel/helper-plugin-test-runner": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"

Some files were not shown because too many files have changed in this diff Show More