Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hotwired/turbo

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hotwired/turbo - npm Package Compare versions

Comparing version 7.0.0-beta.8 to 7.0.0-rc.1

dist/types/tests/functional/pausable_rendering_tests.d.ts

3

dist/types/core/drive/navigator.d.ts

@@ -9,2 +9,3 @@ import { Action } from "../types";

visitProposedToLocation(location: URL, options: Partial<VisitOptions>): void;
notifyApplicationAfterVisitingSamePageLocation(oldURL: URL, newURL: URL): void;
};

@@ -30,2 +31,4 @@ export declare class Navigator {

visitCompleted(visit: Visit): void;
locationWithActionIsSamePage(location: URL, action: Action): boolean;
visitScrolledToSamePageLocation(oldURL: URL, newURL: URL): void;
get location(): URL;

@@ -32,0 +35,0 @@ get restorationIdentifier(): string;

2

dist/types/core/drive/page_view.d.ts

@@ -14,3 +14,3 @@ import { View, ViewDelegate } from "../view";

renderPage(snapshot: PageSnapshot, isPreview?: boolean): Promise<void>;
renderError(snapshot: PageSnapshot): void;
renderError(snapshot: PageSnapshot): Promise<void>;
clearSnapshotCache(): void;

@@ -17,0 +17,0 @@ cacheSnapshot(): Promise<void>;

@@ -14,2 +14,4 @@ import { Adapter } from "../native/adapter";

visitCompleted(visit: Visit): void;
locationWithActionIsSamePage(location: URL, action: Action): boolean;
visitScrolledToSamePageLocation(oldURL: URL, newURL: URL): void;
}

@@ -59,2 +61,3 @@ export declare enum TimingMetric {

location: URL;
isSamePage: boolean;
redirectedToLocation?: URL;

@@ -88,2 +91,3 @@ request?: FetchRequest;

followRedirect(): void;
goToSamePageAnchor(): void;
requestStarted(): void;

@@ -90,0 +94,0 @@ requestPreventedHandlingResponse(request: FetchRequest, response: FetchResponse): void;

@@ -48,3 +48,3 @@ import { FrameElement, FrameElementDelegate, FrameLoadingStyle } from "../../elements/frame_element";

formSubmissionFinished(formSubmission: FormSubmission): void;
viewWillRenderSnapshot(snapshot: Snapshot, isPreview: boolean): void;
allowsImmediateRender(snapshot: Snapshot, resume: (value: any) => void): boolean;
viewRenderedSnapshot(snapshot: Snapshot, isPreview: boolean): void;

@@ -51,0 +51,0 @@ viewInvalidated(): void;

@@ -15,4 +15,3 @@ export interface LinkInterceptorDelegate {

willVisit: () => void;
convertLinkWithMethodClickToFormSubmission(link: Element): false | CustomEvent<any>;
respondsToEventTarget(target: EventTarget | null): boolean | null;
}

@@ -6,4 +6,6 @@ import { Adapter } from "./native/adapter";

import { VisitOptions } from "./drive/visit";
import { PageRenderer } from "./drive/page_renderer";
import { PageSnapshot } from "./drive/page_snapshot";
declare const navigator: import("./drive/navigator").Navigator;
export { navigator };
export { navigator, PageRenderer, PageSnapshot };
export declare function start(): void;

@@ -10,0 +12,0 @@ export declare function registerAdapter(adapter: Adapter): void;

@@ -49,2 +49,3 @@ import { Adapter } from "./native/adapter";

followedLinkToLocation(link: Element, location: URL): void;
convertLinkWithMethodClickToFormSubmission(link: Element): false | CustomEvent<any>;
allowsVisitingLocation(location: URL): boolean;

@@ -54,2 +55,4 @@ visitProposedToLocation(location: URL, options: Partial<VisitOptions>): void;

visitCompleted(visit: Visit): void;
locationWithActionIsSamePage(location: URL, action: Action): boolean;
visitScrolledToSamePageLocation(oldURL: URL, newURL: URL): void;
willSubmitForm(form: HTMLFormElement, submitter?: HTMLElement): boolean;

@@ -62,3 +65,3 @@ formSubmitted(form: HTMLFormElement, submitter?: HTMLElement): void;

viewWillCacheSnapshot(): void;
viewWillRenderSnapshot({ element }: PageSnapshot, isPreview: boolean): void;
allowsImmediateRender({ element }: PageSnapshot, resume: (value: any) => void): boolean;
viewRenderedSnapshot(snapshot: PageSnapshot, isPreview: boolean): void;

@@ -70,7 +73,8 @@ viewInvalidated(): void;

notifyApplicationBeforeVisitingLocation(location: URL): CustomEvent<any>;
notifyApplicationAfterVisitingLocation(location: URL): CustomEvent<any>;
notifyApplicationAfterVisitingLocation(location: URL, action: Action): CustomEvent<any>;
notifyApplicationBeforeCachingSnapshot(): CustomEvent<any>;
notifyApplicationBeforeRender(newBody: HTMLBodyElement): CustomEvent<any>;
notifyApplicationBeforeRender(newBody: HTMLBodyElement, resume: (value: any) => void): CustomEvent<any>;
notifyApplicationAfterRender(): CustomEvent<any>;
notifyApplicationAfterPageLoad(timing?: TimingData): CustomEvent<any>;
notifyApplicationAfterVisitingSamePageLocation(oldURL: URL, newURL: URL): void;
getActionForLink(link: Element): Action;

@@ -77,0 +81,0 @@ locationIsVisitable(location: URL): boolean;

@@ -5,4 +5,4 @@ export declare class Snapshot<E extends Element = Element> {

get children(): Element[];
hasAnchor(anchor: string): boolean;
getElementForAnchor(anchor: string): Element | null;
hasAnchor(anchor: string | undefined): boolean;
getElementForAnchor(anchor: string | undefined): Element | null;
get isConnected(): boolean;

@@ -9,0 +9,0 @@ get firstAutofocusableElement(): Element | null;

export declare type Locatable = URL | string;
export declare function expandURL(locatable: Locatable): URL;
export declare function getAnchor(url: URL): string;
export declare function getAnchor(url: URL): string | undefined;
export declare function getExtension(url: URL): string;
export declare function isHTML(url: URL): boolean;
export declare function isPrefixedBy(baseURL: URL, url: URL): boolean;
export declare function getRequestURL(url: URL): string;
export declare function toCacheKey(url: URL): string;
export declare function urlsAreEqual(left: string, right: string): boolean;

@@ -5,3 +5,3 @@ import { Renderer } from "./renderer";

export interface ViewDelegate<S extends Snapshot> {
viewWillRenderSnapshot(snapshot: S, isPreview: boolean): void;
allowsImmediateRender(snapshot: S, resume: (value: any) => void): boolean;
viewRenderedSnapshot(snapshot: S, isPreview: boolean): void;

@@ -15,5 +15,10 @@ viewInvalidated(): void;

abstract readonly snapshot: S;
renderPromise?: Promise<void>;
private resolveRenderPromise;
private resolveInterceptionPromise;
constructor(delegate: D, element: E);
scrollToAnchor(anchor: string): void;
scrollToAnchor(anchor: string | undefined): void;
scrollToAnchorFromLocation(location: URL): void;
scrollToElement(element: Element): void;
focusElement(element: Element): void;
scrollToPosition({ x, y }: Position): void;

@@ -20,0 +25,0 @@ get scrollRoot(): {

@@ -24,2 +24,3 @@ import { FetchResponse } from "../http/fetch_response";

disconnectedCallback(): void;
reload(): void;
attributeChangedCallback(name: string): void;

@@ -26,0 +27,0 @@ get src(): string | null;

@@ -35,2 +35,3 @@ import { FetchResponse } from "./fetch_response";

readonly abortController: AbortController;
private resolveRequestPromise;
constructor(delegate: FetchRequestDelegate, method: FetchMethod, location: URL, body?: FetchRequestBody);

@@ -49,2 +50,3 @@ get location(): URL;

get abortSignal(): AbortSignal;
private allowRequestToBeIntercepted;
}

@@ -37,4 +37,5 @@ import { TurboDriveTestCase } from "../helpers/turbo_drive_test_case";

"test form submission targeting a frame submits the Turbo-Frame header"(): Promise<void>;
"test link method form submission"(): Promise<void>;
"test link method form submission inside frame"(): Promise<void>;
"test link method form submission outside frame"(): Promise<void>;
get formSubmitted(): Promise<boolean>;
}

@@ -9,2 +9,4 @@ export * from "./async_script_tests";

export * from "./navigation_tests";
export * from "./pausable_rendering_tests";
export * from "./pausable_requests_tests";
export * from "./rendering_tests";

@@ -11,0 +13,0 @@ export * from "./scroll_restoration_tests";

@@ -15,4 +15,5 @@ import { TurboDriveTestCase } from "../helpers/turbo_drive_test_case";

"test changing src attribute on a frame with loading=eager navigates"(): Promise<void>;
"test reloading a frame reloads the content"(): Promise<void>;
"test navigating away from a page does not reload its frames"(): Promise<void>;
"test disconnecting and reconnecting a frame does not reload the frame"(): Promise<void>;
}

@@ -23,2 +23,5 @@ import { TurboDriveTestCase } from "../helpers/turbo_drive_test_case";

"test link targeting a disabled turbo-frame navigates the page"(): Promise<void>;
"test skip link with hash-only path scrolls to the anchor without a visit"(): Promise<void>;
"test skip link with hash-only path moves focus and changes tab order"(): Promise<void>;
"test navigating back to anchored URL"(): Promise<void>;
}

@@ -11,2 +11,4 @@ import { TurboDriveTestCase } from "../helpers/turbo_drive_test_case";

"test replaces provisional elements in head"(): Promise<void>;
"test evaluates head stylesheet elements"(): Promise<void>;
"test does not evaluate head stylesheet elements inside noscript elements"(): Promise<void>;
"skip evaluates head script elements once"(): Promise<void>;

@@ -28,2 +30,4 @@ "test evaluates body script elements on each render"(): Promise<void>;

get bodyScriptEvaluationCount(): Promise<number | undefined>;
get isStylesheetEvaluated(): Promise<boolean>;
get isNoscriptStylesheetEvaluated(): Promise<boolean>;
modifyBodyBeforeCaching(): Promise<any>;

@@ -30,0 +34,0 @@ beforeCache(callback: (body: HTMLElement) => void): Promise<any>;

@@ -9,4 +9,5 @@ import { TurboDriveTestCase } from "../helpers/turbo_drive_test_case";

"test navigation by history is not cancelable"(): Promise<void>;
"test turbo:before-fetch-request event.detail"(): Promise<void>;
visitLocation(location: string): Promise<void>;
cancelNextVisit(): Promise<void>;
}

@@ -10,2 +10,3 @@ import { InternTestCase } from "./intern_test_case";

hasSelector(selector: string): Promise<boolean>;
selectorHasFocus(selector: string): Promise<boolean>;
querySelector(selector: string): Promise<Element>;

@@ -15,2 +16,3 @@ querySelectorAll(selector: string): Promise<Element[]>;

scrollToSelector(selector: string): Promise<void>;
pressTab(): Promise<void>;
outerHTMLForSelector(selector: string): Promise<string>;

@@ -38,2 +40,5 @@ innerHTMLForSelector(selector: string): Promise<string>;

get hash(): Promise<string>;
acceptAlert(): Promise<void>;
dismissAlert(): Promise<void>;
getAlertText(): Promise<string>;
}
{
"name": "@hotwired/turbo",
"version": "7.0.0-beta.8",
"version": "7.0.0-rc.1",
"description": "The speed of a single-page web application without having to write any JavaScript",

@@ -28,3 +28,3 @@ "module": "dist/turbo.es2017-esm.js",

},
"homepage": "https://turbo.hotwire.dev",
"homepage": "https://turbo.hotwired.dev",
"publishConfig": {

@@ -38,2 +38,3 @@ "access": "public"

"intern": "^4.9.0",
"arg": "^4.1.0",
"multer": "^1.4.2",

@@ -40,0 +41,0 @@ "rollup": "^2.35.1",

@@ -12,3 +12,3 @@ # Turbo

Read more on [turbo.hotwire.dev](https://turbo.hotwire.dev).
Read more on [turbo.hotwired.dev](https://turbo.hotwired.dev).

@@ -15,0 +15,0 @@ _Note: Turbo is currently in beta. We're using it in production with [HEY](https://hey.com), but expect that significant changes might be made in response to early feedback ✌️❤️_

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc