From a81fc0c75ca2e0d95c0b1406617512fea4b36d51 Mon Sep 17 00:00:00 2001 From: ienaga Date: Thu, 12 Mar 2026 21:35:44 +0900 Subject: [PATCH 1/2] #26 update to astro v6 --- .../framework/animation-tool/index.html | 2 +- docs/cn/reference/framework/config/index.html | 2 +- docs/cn/reference/framework/index.html | 367 ---- .../cn/reference/framework/routing/index.html | 2 +- docs/cn/reference/framework/view/index.html | 2 +- .../player/display-object/index.html | 2 +- docs/cn/reference/player/events/index.html | 2 +- docs/cn/reference/player/filters/index.html | 2 +- docs/cn/reference/player/index.html | 184 -- .../cn/reference/player/movie-clip/index.html | 2 +- docs/cn/reference/player/shape/index.html | 2 +- docs/cn/reference/player/sound/index.html | 2 +- docs/cn/reference/player/sprite/index.html | 2 +- .../cn/reference/player/text-field/index.html | 2 +- docs/cn/reference/player/tween/index.html | 2 +- docs/cn/reference/player/video/index.html | 2 +- .../framework/animation-tool/index.html | 2 +- docs/en/reference/framework/config/index.html | 2 +- docs/en/reference/framework/index.html | 367 ---- .../en/reference/framework/routing/index.html | 2 +- docs/en/reference/framework/view/index.html | 2 +- .../player/display-object/index.html | 2 +- docs/en/reference/player/events/index.html | 2 +- docs/en/reference/player/filters/index.html | 2 +- docs/en/reference/player/index.html | 184 -- .../en/reference/player/movie-clip/index.html | 2 +- docs/en/reference/player/shape/index.html | 2 +- docs/en/reference/player/sound/index.html | 2 +- docs/en/reference/player/sprite/index.html | 2 +- .../en/reference/player/text-field/index.html | 2 +- docs/en/reference/player/tween/index.html | 2 +- docs/en/reference/player/video/index.html | 2 +- .../framework/animation-tool/index.html | 2 +- docs/ja/reference/framework/config/index.html | 2 +- docs/ja/reference/framework/index.html | 367 ---- .../ja/reference/framework/routing/index.html | 2 +- docs/ja/reference/framework/view/index.html | 2 +- .../player/display-object/index.html | 2 +- docs/ja/reference/player/events/index.html | 2 +- docs/ja/reference/player/filters/index.html | 2 +- docs/ja/reference/player/index.html | 185 -- .../ja/reference/player/movie-clip/index.html | 2 +- docs/ja/reference/player/shape/index.html | 2 +- docs/ja/reference/player/sound/index.html | 2 +- docs/ja/reference/player/sprite/index.html | 2 +- .../ja/reference/player/text-field/index.html | 2 +- docs/ja/reference/player/tween/index.html | 2 +- docs/ja/reference/player/video/index.html | 2 +- docs/sitemap-0.xml | 2 +- package-lock.json | 1570 +++++------------ package.json | 8 +- src/content.config.ts | 25 + src/content/config.ts | 15 - .../reference/framework/[...slug].astro | 4 +- .../[lang]/reference/player/[...slug].astro | 4 +- 55 files changed, 475 insertions(+), 2891 deletions(-) delete mode 100644 docs/cn/reference/framework/index.html delete mode 100644 docs/cn/reference/player/index.html delete mode 100644 docs/en/reference/framework/index.html delete mode 100644 docs/en/reference/player/index.html delete mode 100644 docs/ja/reference/framework/index.html delete mode 100644 docs/ja/reference/player/index.html create mode 100644 src/content.config.ts delete mode 100644 src/content/config.ts diff --git a/docs/cn/reference/framework/animation-tool/index.html b/docs/cn/reference/framework/animation-tool/index.html index e3943f3b..310da84e 100644 --- a/docs/cn/reference/framework/animation-tool/index.html +++ b/docs/cn/reference/framework/animation-tool/index.html @@ -142,4 +142,4 @@

相关

  • 配置
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/cn/reference/framework/config/index.html b/docs/cn/reference/framework/config/index.html index 7a7c2e6e..1a934dde 100644 --- a/docs/cn/reference/framework/config/index.html +++ b/docs/cn/reference/framework/config/index.html @@ -349,4 +349,4 @@

    相关

  • View/ViewModel
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/cn/reference/framework/index.html b/docs/cn/reference/framework/index.html deleted file mode 100644 index 15726991..00000000 --- a/docs/cn/reference/framework/index.html +++ /dev/null @@ -1,367 +0,0 @@ - Next2D | Framework

    Next2D Framework

    -

    Next2D Framework 是一个用于构建 Next2D Player 应用程序的 MVVM 框架。它提供单页应用程序(SPA)的路由、View/ViewModel 管理和配置管理。

    -

    主要特性

    -
      -
    • MVVM 模式:通过 Model-View-ViewModel 分离关注点
    • -
    • Clean Architecture:依赖倒置和松耦合设计
    • -
    • 单页应用程序:基于 URL 的场景管理
    • -
    • Animation Tool 集成:与 Animation Tool 资源无缝集成
    • -
    • TypeScript 支持:类型安全的开发
    • -
    • 原子设计:推荐的可重用组件设计
    • -
    -

    架构概述

    -

    本项目实现了 Clean Architecture 和 MVVM 模式的组合。

    -
    graph TB
    -    subgraph ViewLayer["视图层"]
    -        View["View"]
    -        ViewModel["ViewModel"]
    -        UI["UI 组件"]
    -    end
    -
    -    subgraph InterfaceLayer["接口层"]
    -        IDraggable["IDraggable"]
    -        ITextField["ITextField"]
    -        IResponse["IResponse"]
    -    end
    -
    -    subgraph ApplicationLayer["应用层"]
    -        UseCase["UseCase"]
    -    end
    -
    -    subgraph DomainLayer["领域层"]
    -        DomainLogic["领域逻辑"]
    -        DomainService["Service"]
    -    end
    -
    -    subgraph InfraLayer["基础设施层"]
    -        Repository["Repository"]
    -        ExternalAPI["外部 API"]
    -    end
    -
    -    ViewLayer -.->|通过接口| InterfaceLayer
    -    ViewLayer -.->|调用| ApplicationLayer
    -    ApplicationLayer -.->|通过接口| InterfaceLayer
    -    ApplicationLayer -.->|使用| DomainLayer
    -    ApplicationLayer -.->|调用| InfraLayer
    -    InfraLayer -.->|访问| ExternalAPI
    -

    层职责

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    路径角色
    Viewview/*, ui/*处理画面结构和显示
    ViewModelview/*View 和 Model 之间的桥梁,事件处理
    Interfaceinterface/*抽象层,类型定义
    Applicationmodel/application/*/usecase/*业务逻辑实现(UseCase)
    Domainmodel/domain/*核心业务规则
    Infrastructuremodel/infrastructure/repository/*数据访问,外部 API 集成
    -

    依赖方向

    -

    遵循 Clean Architecture 原则,依赖始终指向内部(领域层)。

    -
      -
    • 视图层:通过接口使用应用层
    • -
    • 应用层:通过接口使用领域层和基础设施层
    • -
    • 领域层:不依赖任何东西(纯业务逻辑)
    • -
    • 基础设施层:实现领域层接口
    • -
    -

    目录结构

    -
    my-app/
    -├── src/
    -│   ├── config/                    # 配置文件
    -│   │   ├── stage.json             # 舞台设置
    -│   │   ├── config.json            # 环境设置
    -│   │   ├── routing.json           # 路由设置
    -│   │   └── Config.ts              # 配置类型定义和导出
    -│   │
    -│   ├── interface/                 # 接口定义
    -│   │   ├── IDraggable.ts          # 可拖动对象
    -│   │   ├── ITextField.ts          # 文本字段
    -│   │   ├── IHomeTextResponse.ts   # API 响应类型
    -│   │   └── IViewName.ts           # 视图名称类型定义
    -│   │
    -│   ├── view/                      # View 和 ViewModel
    -│   │   ├── top/
    -│   │   │   ├── TopView.ts         # 画面结构定义
    -│   │   │   └── TopViewModel.ts    # 业务逻辑桥梁
    -│   │   └── home/
    -│   │       ├── HomeView.ts
    -│   │       └── HomeViewModel.ts
    -│   │
    -│   ├── model/
    -│   │   ├── application/           # 应用层
    -│   │   │   ├── top/
    -│   │   │   │   └── usecase/
    -│   │   │   │       └── NavigateToViewUseCase.ts
    -│   │   │   └── home/
    -│   │   │       └── usecase/
    -│   │   │           ├── StartDragUseCase.ts
    -│   │   │           ├── StopDragUseCase.ts
    -│   │   │           └── CenterTextFieldUseCase.ts
    -│   │   │
    -│   │   ├── domain/                # 领域层
    -│   │   │   └── callback/
    -│   │   │       ├── Background.ts
    -│   │   │       └── Background/
    -│   │   │           └── service/
    -│   │   │               ├── BackgroundDrawService.ts
    -│   │   │               └── BackgroundChangeScaleService.ts
    -│   │   │
    -│   │   └── infrastructure/        # 基础设施层
    -│   │       └── repository/
    -│   │           └── HomeTextRepository.ts
    -│   │
    -│   ├── ui/                        # UI 组件
    -│   │   ├── animation/             # 动画定义
    -│   │   │   └── top/
    -│   │   │       └── TopBtnShowAnimation.ts
    -│   │   │
    -│   │   ├── component/             # 原子设计
    -│   │   │   ├── atom/              # 最小单元组件
    -│   │   │   │   ├── ButtonAtom.ts
    -│   │   │   │   └── TextAtom.ts
    -│   │   │   ├── molecule/          # 组合的 Atom 组件
    -│   │   │   │   ├── HomeBtnMolecule.ts
    -│   │   │   │   └── TopBtnMolecule.ts
    -│   │   │   ├── organism/          # 多个 Molecule 组合
    -│   │   │   ├── template/          # 页面模板
    -│   │   │   └── page/              # 页面组件
    -│   │   │       ├── top/
    -│   │   │       │   └── TopPage.ts
    -│   │   │       └── home/
    -│   │   │           └── HomePage.ts
    -│   │   │
    -│   │   └── content/               # Animation Tool 生成的内容
    -│   │       ├── TopContent.ts
    -│   │       └── HomeContent.ts
    -│   │
    -│   ├── assets/                    # 静态资源
    -│   │
    -│   ├── Packages.ts                # 包导出
    -│   └── index.ts                   # 入口点
    -
    -├── file/                          # Animation Tool 输出文件
    -│   └── sample.n2d
    -
    -├── mock/                          # 模拟数据
    -│   ├── api/                       # API 模拟
    -│   ├── content/                   # 内容模拟
    -│   └── img/                       # 图像模拟
    -
    -└── package.json
    -

    框架流程图

    -

    使用 gotoView 函数的画面转换详细流程。

    -
    graph TD
    -    User([用户]) -->|请求| GotoView[gotoView Path]
    -
    -    GotoView --> LoadingCheck{使用加载?<br/>默认: true}
    -
    -    LoadingCheck -->|是| ScreenOverlay[画面遮罩]
    -    LoadingCheck -->|否| RemoveResponse
    -    ScreenOverlay --> LoadingStart[开始加载]
    -    LoadingStart --> RemoveResponse
    -
    -    RemoveResponse[移除前一个响应数据] --> ParseQuery[解析查询字符串]
    -    ParseQuery --> UpdateHistory{SPA 模式?}
    -
    -    UpdateHistory -->|是| PushState[推送历史状态]
    -    UpdateHistory -->|否| RequestType
    -    PushState --> RequestType
    -
    -    RequestType[请求类型]
    -
    -    RequestType --> JSON[JSON: 获取外部 JSON 数据]
    -    RequestType --> CONTENT[CONTENT: 获取 Animation Tool JSON]
    -    RequestType --> CUSTOM[CUSTOM: 请求外部 API]
    -
    -    JSON --> CacheCheck{使用缓存?<br/>默认: false}
    -    CONTENT --> CacheCheck
    -    CUSTOM --> CacheCheck
    -
    -    CacheCheck -->|是| CacheData[(缓存)]
    -    CacheCheck -->|否| GlobalData{{全球网络}}
    -
    -    CacheData --> Cached{已缓存?}
    -
    -    Cached -->|否| GlobalData
    -    Cached -->|是| RegisterResponse
    -    GlobalData --> RegisterResponse
    -
    -    RegisterResponse[注册响应数据] --> RequestCallback{请求回调?}
    -
    -    RequestCallback -->|是| ExecRequestCallback[执行请求回调]
    -    RequestCallback -->|否| UnbindView
    -    ExecRequestCallback --> UnbindView
    -
    -    UnbindView[前一个 View: onExit 和解绑] --> BindView[新 View/ViewModel: 绑定]
    -    BindView --> ViewModelInit[ViewModel: initialize]
    -
    -    ViewModelInit --> ViewInit[View: initialize]
    -    ViewInit --> AddToStage[将 View 添加到舞台]
    -    AddToStage --> GotoViewCallback{gotoView 回调?}
    -
    -    GotoViewCallback -->|是| ExecGotoViewCallback[执行 gotoView 回调]
    -    GotoViewCallback -->|否| LoadingEndCheck
    -    ExecGotoViewCallback --> LoadingEndCheck
    -
    -    LoadingEndCheck{使用加载?<br/>默认: true}
    -
    -    LoadingEndCheck -->|是| LoadingEnd[结束加载]
    -    LoadingEndCheck -->|否| OnEnter
    -    LoadingEnd --> DisposeOverlay[释放画面遮罩]
    -    DisposeOverlay --> OnEnter
    -
    -    OnEnter[View: onEnter] --> StartDrawing
    -
    -    StartDrawing[开始绘制] -->|响应| User
    -
    -    style User fill:#d5e8d4,stroke:#82b366
    -    style StartDrawing fill:#dae8fc,stroke:#6c8ebf
    -    style CacheData fill:#fff2cc,stroke:#d6b656
    -    style GlobalData fill:#f5f5f5,stroke:#666666
    -

    关键流程步骤

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    步骤说明
    gotoView画面转换的入口点
    Loading加载画面显示/隐藏控制
    Request Type三种请求类型:JSON、CONTENT、CUSTOM
    Cache响应数据缓存控制
    View/ViewModel Bind新 View/ViewModel 的绑定过程
    onEnter画面显示完成后的回调
    -

    关键设计模式

    -

    1. MVVM(Model-View-ViewModel)

    -
      -
    • View:处理画面结构和显示。没有业务逻辑
    • -
    • ViewModel:View 和 Model 之间的桥梁。持有 UseCase 并处理事件
    • -
    • Model:处理业务逻辑和数据访问
    • -
    -

    2. UseCase 模式

    -

    为每个用户操作创建专用的 UseCase 类:

    -
    export class StartDragUseCase
    -{
    -    execute(target: IDraggable): void
    -    {
    -        target.startDrag();
    -    }
    -}
    -

    3. 依赖倒置

    -

    依赖接口,而不是具体类:

    -
    // 好:依赖接口
    -import type { IDraggable } from "@/interface/IDraggable";
    -
    -function startDrag(target: IDraggable): void
    -{
    -    target.startDrag();
    -}
    -

    4. Repository 模式

    -

    抽象数据访问并实现错误处理:

    -
    export class HomeTextRepository
    -{
    -    static async get(): Promise<IHomeTextResponse>
    -    {
    -        try {
    -            const response = await fetch(`${config.api.endPoint}api/home.json`);
    -            if (!response.ok) {
    -                throw new Error(`HTTP error! status: ${response.status}`);
    -            }
    -            return await response.json();
    -        } catch (error) {
    -            console.error("Failed to fetch:", error);
    -            throw error;
    -        }
    -    }
    -}
    -

    快速开始

    -

    创建项目

    -
    npx create-next2d-app my-app
    -cd my-app
    -npm install
    -npm start
    -

    自动生成 View/ViewModel

    -
    npm run generate
    -

    此命令解析 routing.json 中的顶级属性并生成相应的 View 和 ViewModel 类。

    -

    最佳实践

    -
      -
    1. 接口优先:始终依赖接口,而不是具体类型
    2. -
    3. 单一职责原则:每个类只有一个职责
    4. -
    5. 依赖注入:通过构造函数注入依赖
    6. -
    7. 错误处理:在 Repository 层适当处理错误
    8. -
    9. 类型安全:避免 any 类型,使用显式类型定义
    10. -
    -

    相关文档

    -

    基础

    - -

    Next2D Player 集成

    -
    \ No newline at end of file diff --git a/docs/cn/reference/framework/routing/index.html b/docs/cn/reference/framework/routing/index.html index 3a5bcafe..8ad756ad 100644 --- a/docs/cn/reference/framework/routing/index.html +++ b/docs/cn/reference/framework/routing/index.html @@ -385,4 +385,4 @@

    相关

  • 配置
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/cn/reference/framework/view/index.html b/docs/cn/reference/framework/view/index.html index 783a42c2..a4beac18 100644 --- a/docs/cn/reference/framework/view/index.html +++ b/docs/cn/reference/framework/view/index.html @@ -419,4 +419,4 @@

    相关

  • 配置
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/cn/reference/player/display-object/index.html b/docs/cn/reference/player/display-object/index.html index 0ece6384..3c63b75e 100644 --- a/docs/cn/reference/player/display-object/index.html +++ b/docs/cn/reference/player/display-object/index.html @@ -406,4 +406,4 @@

    相关

  • Sprite
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/cn/reference/player/events/index.html b/docs/cn/reference/player/events/index.html index a861acb9..53ae56fc 100644 --- a/docs/cn/reference/player/events/index.html +++ b/docs/cn/reference/player/events/index.html @@ -439,4 +439,4 @@

    相关

  • MovieClip
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/cn/reference/player/filters/index.html b/docs/cn/reference/player/filters/index.html index 191d0808..90550789 100644 --- a/docs/cn/reference/player/filters/index.html +++ b/docs/cn/reference/player/filters/index.html @@ -808,4 +808,4 @@

    相关

  • MovieClip
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/cn/reference/player/index.html b/docs/cn/reference/player/index.html deleted file mode 100644 index 8be5dff8..00000000 --- a/docs/cn/reference/player/index.html +++ /dev/null @@ -1,184 +0,0 @@ - Next2D | Player

    Next2D Player

    -

    Next2D Player 是一个使用 WebGL/WebGPU 的高性能 2D 渲染引擎。它在 Web 上提供类似 Flash Player 的功能,支持矢量图形、补间动画、文本、音频、视频等。

    -

    主要特性

    -
      -
    • 高速渲染:使用 WebGL/WebGPU 进行快速 2D 渲染
    • -
    • 多平台支持:支持从桌面到移动设备
    • -
    • 丰富的滤镜:支持模糊、投影、发光、斜角等效果
    • -
    -

    渲染管线

    -

    Next2D Player 实现高速渲染的管线概述。

    -
    flowchart TB
    -    %% Main Drawing Flow Chart
    -    subgraph MainFlow["绘制流程图 - 主渲染管线"]
    -        direction TB
    -
    -        subgraph Inputs["显示对象"]
    -            Shape["Shape<br/>(位图/矢量)"]
    -            TextField["TextField<br/>(canvas2d)"]
    -            Video["Video 元素"]
    -        end
    -
    -        Shape --> MaskCheck
    -        TextField --> MaskCheck
    -        Video --> MaskCheck
    -
    -        MaskCheck{"遮罩<br/>渲染?"}
    -
    -        MaskCheck -->|是| DirectRender["直接渲染"]
    -        DirectRender -->|drawArrays| FinalRender
    -
    -        MaskCheck -->|否| CacheCheck1{"缓存<br/>存在?"}
    -
    -        CacheCheck1 -->|否| TextureAtlas["纹理图集<br/>(二叉树打包)"]
    -        TextureAtlas --> Coordinates
    -
    -        CacheCheck1 -->|是| Coordinates["坐标数据库<br/>(x, y, w, h)"]
    -
    -        Coordinates --> FilterBlendCheck{"滤镜或<br/>混合?"}
    -
    -        FilterBlendCheck -->|否| MainArrays
    -        FilterBlendCheck -->|是| NeedCache{"缓存<br/>存在?"}
    -
    -        NeedCache -->|否| CacheRender["渲染到缓存"]
    -        CacheRender --> TextureCache
    -        NeedCache -->|是| TextureCache["纹理缓存"]
    -
    -        TextureCache -->|drawArrays| FinalRender
    -
    -        MainArrays["实例化数组<br/>━━━━━━━━━━━━━━━<br/>matrix<br/>colorTransform<br/>Coordinates<br/>━━━━━━━━━━━━━━━<br/><b>批量渲染</b>"]
    -
    -        MainArrays -->|drawArraysInstanced<br/><b>一次调用渲染多个对象</b>| FinalRender["最终渲染"]
    -
    -        FinalRender -->|60fps| MainFramebuffer["主帧缓冲<br/>(显示)"]
    -    end
    -
    -    %% Branch Flow for Filter/Blend/Mask
    -    subgraph BranchFlow["滤镜/混合/遮罩 - 分支处理"]
    -        direction TB
    -
    -        subgraph FilterInputs["显示对象"]
    -            Shape2["Shape<br/>(位图/矢量)"]
    -            TextField2["TextField<br/>(canvas2d)"]
    -            Video2["Video 元素"]
    -        end
    -
    -        Shape2 --> CacheCheck2
    -        TextField2 --> CacheCheck2
    -        Video2 --> CacheCheck2
    -
    -        CacheCheck2{"缓存<br/>存在?"}
    -
    -        CacheCheck2 -->|否| EffectRender["效果渲染"]
    -        CacheCheck2 -->|是| BranchArrays
    -        EffectRender --> BranchArrays
    -
    -        BranchArrays["实例化数组<br/>━━━━━━━━━━━━━━━<br/>matrix<br/>colorTransform<br/>Coordinates<br/>━━━━━━━━━━━━━━━<br/><b>批量渲染</b>"]
    -
    -        BranchArrays -->|drawArraysInstanced<br/><b>一次调用渲染多个对象</b>| BranchRender["效果结果"]
    -
    -        BranchRender -->|滤镜/混合| TextureCache
    -    end
    -
    -    %% Connections between flows
    -    FilterBlendCheck -.->|"触发<br/>分支流程"| BranchFlow
    -    BranchArrays -.->|"渲染信息<br/>(坐标)"| MainArrays
    -

    管线特性

    -
      -
    • 批量渲染:一次 GPU 调用渲染多个对象
    • -
    • 纹理缓存:高效处理滤镜和混合效果
    • -
    • 二叉树打包:纹理图集的最佳内存使用
    • -
    • 60fps 渲染:高帧率的流畅动画
    • -
    -

    DisplayList 架构

    -

    Next2D Player 使用与 Flash Player 类似的 DisplayList 架构。

    -

    主要类层次结构

    -
    DisplayObject (基类)
    -├── InteractiveObject
    -│   ├── DisplayObjectContainer
    -│   │   ├── Sprite
    -│   │   ├── MovieClip
    -│   │   └── Stage
    -│   └── TextField
    -├── Shape
    -├── Video
    -└── Bitmap
    -

    DisplayObjectContainer

    -

    可以容纳子对象的容器类:

    -
      -
    • addChild(child):将子对象添加到前面
    • -
    • addChildAt(child, index):在指定索引添加子对象
    • -
    • removeChild(child):移除子对象
    • -
    • getChildAt(index):通过索引获取子对象
    • -
    • getChildByName(name):通过名称获取子对象
    • -
    -

    MovieClip

    -

    具有时间轴动画的 DisplayObject:

    -
      -
    • play():开始时间轴播放
    • -
    • stop():停止时间轴
    • -
    • gotoAndPlay(frame):跳转到帧并播放
    • -
    • gotoAndStop(frame):跳转到帧并停止
    • -
    • currentFrame:当前帧号
    • -
    • totalFrames:总帧数
    • -
    -

    基本用法

    -
    const { MovieClip } = next2d.display;
    -const { DropShadowFilter } = next2d.filters;
    -
    -// 初始化舞台
    -const root = await next2d.createRootMovieClip(800, 600, 60, {
    -    tagId: "container",
    -    bgColor: "#ffffff"
    -});
    -
    -// 创建 MovieClip
    -const mc = new MovieClip();
    -root.addChild(mc);
    -
    -// 设置位置和大小
    -mc.x = 100;
    -mc.y = 100;
    -mc.scaleX = 2;
    -mc.scaleY = 2;
    -mc.rotation = 45;
    -
    -// 应用滤镜
    -mc.filters = [
    -    new DropShadowFilter(4, 45, 0x000000, 0.5)
    -];
    -

    加载 JSON 数据

    -

    加载并渲染使用 Open Animation Tool 创建的 JSON 文件:

    -
    const { Loader } = next2d.display;
    -const { URLRequest } = next2d.net;
    -
    -const loader = new Loader();
    -await loader.load(new URLRequest("animation.json"));
    -
    -const mc = loader.content;
    -stage.addChild(mc);
    -

    相关文档

    -

    显示对象

    - -

    系统

    -
    \ No newline at end of file diff --git a/docs/cn/reference/player/movie-clip/index.html b/docs/cn/reference/player/movie-clip/index.html index 2cedd2d6..ea208013 100644 --- a/docs/cn/reference/player/movie-clip/index.html +++ b/docs/cn/reference/player/movie-clip/index.html @@ -341,4 +341,4 @@

    相关

  • 事件系统
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/cn/reference/player/shape/index.html b/docs/cn/reference/player/shape/index.html index 9b1f0fca..44c839bb 100644 --- a/docs/cn/reference/player/shape/index.html +++ b/docs/cn/reference/player/shape/index.html @@ -641,4 +641,4 @@

    相关

  • 滤镜
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/cn/reference/player/sound/index.html b/docs/cn/reference/player/sound/index.html index 4cf3dc29..ad1af60a 100644 --- a/docs/cn/reference/player/sound/index.html +++ b/docs/cn/reference/player/sound/index.html @@ -332,4 +332,4 @@

    相关

  • 事件系统
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/cn/reference/player/sprite/index.html b/docs/cn/reference/player/sprite/index.html index 4f5b339b..b7bb029f 100644 --- a/docs/cn/reference/player/sprite/index.html +++ b/docs/cn/reference/player/sprite/index.html @@ -604,4 +604,4 @@

    相关

  • Shape
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/cn/reference/player/text-field/index.html b/docs/cn/reference/player/text-field/index.html index ef800dea..b9d2decc 100644 --- a/docs/cn/reference/player/text-field/index.html +++ b/docs/cn/reference/player/text-field/index.html @@ -596,4 +596,4 @@

    相关

  • 事件系统
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/cn/reference/player/tween/index.html b/docs/cn/reference/player/tween/index.html index 12400fed..bf3cc0ba 100644 --- a/docs/cn/reference/player/tween/index.html +++ b/docs/cn/reference/player/tween/index.html @@ -441,4 +441,4 @@

    相关

  • 事件系统
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/cn/reference/player/video/index.html b/docs/cn/reference/player/video/index.html index 4f167ddf..88afb85d 100644 --- a/docs/cn/reference/player/video/index.html +++ b/docs/cn/reference/player/video/index.html @@ -335,4 +335,4 @@

    相关

  • 事件系统
  • \ No newline at end of file +

    播放器 (Player)

    动画制作工具 (Animation Tool)

    框架 (Framework)

    关于我们

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/framework/animation-tool/index.html b/docs/en/reference/framework/animation-tool/index.html index b4196f09..83cddf25 100644 --- a/docs/en/reference/framework/animation-tool/index.html +++ b/docs/en/reference/framework/animation-tool/index.html @@ -142,4 +142,4 @@
  • Configuration
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/framework/config/index.html b/docs/en/reference/framework/config/index.html index 9bd6a17c..6268dcd0 100644 --- a/docs/en/reference/framework/config/index.html +++ b/docs/en/reference/framework/config/index.html @@ -349,4 +349,4 @@
  • View/ViewModel
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/framework/index.html b/docs/en/reference/framework/index.html deleted file mode 100644 index 53bb448a..00000000 --- a/docs/en/reference/framework/index.html +++ /dev/null @@ -1,367 +0,0 @@ - Next2D | Framework

    Next2D Framework

    -

    Next2D Framework is an MVVM framework for building applications with Next2D Player. It provides routing for single-page applications (SPA), View/ViewModel management, and configuration management.

    -

    Key Features

    -
      -
    • MVVM Pattern: Separation of concerns with Model-View-ViewModel
    • -
    • Clean Architecture: Dependency inversion and loosely coupled design
    • -
    • Single Page Application: URL-based scene management
    • -
    • Animation Tool Integration: Seamless integration with Animation Tool assets
    • -
    • TypeScript Support: Type-safe development
    • -
    • Atomic Design: Recommended component design for reusability
    • -
    -

    Architecture Overview

    -

    This project implements a combination of Clean Architecture and MVVM pattern.

    -
    graph TB
    -    subgraph ViewLayer["View Layer"]
    -        View["View"]
    -        ViewModel["ViewModel"]
    -        UI["UI Components"]
    -    end
    -
    -    subgraph InterfaceLayer["Interface Layer"]
    -        IDraggable["IDraggable"]
    -        ITextField["ITextField"]
    -        IResponse["IResponse"]
    -    end
    -
    -    subgraph ApplicationLayer["Application Layer"]
    -        UseCase["UseCase"]
    -    end
    -
    -    subgraph DomainLayer["Domain Layer"]
    -        DomainLogic["Domain Logic"]
    -        DomainService["Service"]
    -    end
    -
    -    subgraph InfraLayer["Infrastructure Layer"]
    -        Repository["Repository"]
    -        ExternalAPI["External API"]
    -    end
    -
    -    ViewLayer -.->|via interface| InterfaceLayer
    -    ViewLayer -.->|calls| ApplicationLayer
    -    ApplicationLayer -.->|via interface| InterfaceLayer
    -    ApplicationLayer -.->|uses| DomainLayer
    -    ApplicationLayer -.->|calls| InfraLayer
    -    InfraLayer -.->|accesses| ExternalAPI
    -

    Layer Responsibilities

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    LayerPathRole
    Viewview/*, ui/*Handles screen structure and display
    ViewModelview/*Bridge between View and Model, event handling
    Interfaceinterface/*Abstraction layer, type definitions
    Applicationmodel/application/*/usecase/*Business logic implementation (UseCase)
    Domainmodel/domain/*Core business rules
    Infrastructuremodel/infrastructure/repository/*Data access, external API integration
    -

    Dependency Direction

    -

    Following Clean Architecture principles, dependencies always point inward (toward the Domain layer).

    -
      -
    • View Layer: Uses Application layer through interfaces
    • -
    • Application Layer: Uses Domain and Infrastructure layers through interfaces
    • -
    • Domain Layer: Depends on nothing (pure business logic)
    • -
    • Infrastructure Layer: Implements Domain layer interfaces
    • -
    -

    Directory Structure

    -
    my-app/
    -├── src/
    -│   ├── config/                    # Configuration files
    -│   │   ├── stage.json             # Stage settings
    -│   │   ├── config.json            # Environment settings
    -│   │   ├── routing.json           # Routing settings
    -│   │   └── Config.ts              # Config type definitions and exports
    -│   │
    -│   ├── interface/                 # Interface definitions
    -│   │   ├── IDraggable.ts          # Draggable object
    -│   │   ├── ITextField.ts          # Text field
    -│   │   ├── IHomeTextResponse.ts   # API response type
    -│   │   └── IViewName.ts           # View name type definition
    -│   │
    -│   ├── view/                      # View & ViewModel
    -│   │   ├── top/
    -│   │   │   ├── TopView.ts         # Screen structure definition
    -│   │   │   └── TopViewModel.ts    # Bridge to business logic
    -│   │   └── home/
    -│   │       ├── HomeView.ts
    -│   │       └── HomeViewModel.ts
    -│   │
    -│   ├── model/
    -│   │   ├── application/           # Application layer
    -│   │   │   ├── top/
    -│   │   │   │   └── usecase/
    -│   │   │   │       └── NavigateToViewUseCase.ts
    -│   │   │   └── home/
    -│   │   │       └── usecase/
    -│   │   │           ├── StartDragUseCase.ts
    -│   │   │           ├── StopDragUseCase.ts
    -│   │   │           └── CenterTextFieldUseCase.ts
    -│   │   │
    -│   │   ├── domain/                # Domain layer
    -│   │   │   └── callback/
    -│   │   │       ├── Background.ts
    -│   │   │       └── Background/
    -│   │   │           └── service/
    -│   │   │               ├── BackgroundDrawService.ts
    -│   │   │               └── BackgroundChangeScaleService.ts
    -│   │   │
    -│   │   └── infrastructure/        # Infrastructure layer
    -│   │       └── repository/
    -│   │           └── HomeTextRepository.ts
    -│   │
    -│   ├── ui/                        # UI Components
    -│   │   ├── animation/             # Animation definitions
    -│   │   │   └── top/
    -│   │   │       └── TopBtnShowAnimation.ts
    -│   │   │
    -│   │   ├── component/             # Atomic Design
    -│   │   │   ├── atom/              # Smallest unit components
    -│   │   │   │   ├── ButtonAtom.ts
    -│   │   │   │   └── TextAtom.ts
    -│   │   │   ├── molecule/          # Combined Atom components
    -│   │   │   │   ├── HomeBtnMolecule.ts
    -│   │   │   │   └── TopBtnMolecule.ts
    -│   │   │   ├── organism/          # Multiple Molecule combinations
    -│   │   │   ├── template/          # Page templates
    -│   │   │   └── page/              # Page components
    -│   │   │       ├── top/
    -│   │   │       │   └── TopPage.ts
    -│   │   │       └── home/
    -│   │   │           └── HomePage.ts
    -│   │   │
    -│   │   └── content/               # Animation Tool generated content
    -│   │       ├── TopContent.ts
    -│   │       └── HomeContent.ts
    -│   │
    -│   ├── assets/                    # Static assets
    -│   │
    -│   ├── Packages.ts                # Package exports
    -│   └── index.ts                   # Entry point
    -
    -├── file/                          # Animation Tool output files
    -│   └── sample.n2d
    -
    -├── mock/                          # Mock data
    -│   ├── api/                       # API mocks
    -│   ├── content/                   # Content mocks
    -│   └── img/                       # Image mocks
    -
    -└── package.json
    -

    Framework Flowchart

    -

    Detailed flow of screen transitions using the gotoView function.

    -
    graph TD
    -    User([User]) -->|Request| GotoView[gotoView Path]
    -
    -    GotoView --> LoadingCheck{use loading?<br/>Default: true}
    -
    -    LoadingCheck -->|YES| ScreenOverlay[Screen Overlay]
    -    LoadingCheck -->|NO| RemoveResponse
    -    ScreenOverlay --> LoadingStart[Start Loading]
    -    LoadingStart --> RemoveResponse
    -
    -    RemoveResponse[Remove Previous Response Data] --> ParseQuery[Parse Query String]
    -    ParseQuery --> UpdateHistory{SPA mode?}
    -
    -    UpdateHistory -->|YES| PushState[Push History State]
    -    UpdateHistory -->|NO| RequestType
    -    PushState --> RequestType
    -
    -    RequestType[Request Type]
    -
    -    RequestType --> JSON[JSON: Get external JSON data]
    -    RequestType --> CONTENT[CONTENT: Get Animation Tool JSON]
    -    RequestType --> CUSTOM[CUSTOM: Request to external API]
    -
    -    JSON --> CacheCheck{use cache?<br/>Default: false}
    -    CONTENT --> CacheCheck
    -    CUSTOM --> CacheCheck
    -
    -    CacheCheck -->|YES| CacheData[(Cache)]
    -    CacheCheck -->|NO| GlobalData{{Global Network}}
    -
    -    CacheData --> Cached{Cached?}
    -
    -    Cached -->|NO| GlobalData
    -    Cached -->|YES| RegisterResponse
    -    GlobalData --> RegisterResponse
    -
    -    RegisterResponse[Register Response Data] --> RequestCallback{request callback?}
    -
    -    RequestCallback -->|YES| ExecRequestCallback[Execute Request Callback]
    -    RequestCallback -->|NO| UnbindView
    -    ExecRequestCallback --> UnbindView
    -
    -    UnbindView[Previous View: onExit & Unbind] --> BindView[New View/ViewModel: Bind]
    -    BindView --> ViewModelInit[ViewModel: initialize]
    -
    -    ViewModelInit --> ViewInit[View: initialize]
    -    ViewInit --> AddToStage[Add View to Stage]
    -    AddToStage --> GotoViewCallback{gotoView callback?}
    -
    -    GotoViewCallback -->|YES| ExecGotoViewCallback[Execute gotoView Callback]
    -    GotoViewCallback -->|NO| LoadingEndCheck
    -    ExecGotoViewCallback --> LoadingEndCheck
    -
    -    LoadingEndCheck{use loading?<br/>Default: true}
    -
    -    LoadingEndCheck -->|YES| LoadingEnd[End Loading]
    -    LoadingEndCheck -->|NO| OnEnter
    -    LoadingEnd --> DisposeOverlay[Dispose Screen Overlay]
    -    DisposeOverlay --> OnEnter
    -
    -    OnEnter[View: onEnter] --> StartDrawing
    -
    -    StartDrawing[Start Drawing] -->|Response| User
    -
    -    style User fill:#d5e8d4,stroke:#82b366
    -    style StartDrawing fill:#dae8fc,stroke:#6c8ebf
    -    style CacheData fill:#fff2cc,stroke:#d6b656
    -    style GlobalData fill:#f5f5f5,stroke:#666666
    -

    Key Flow Steps

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    StepDescription
    gotoViewEntry point for screen transitions
    LoadingLoading screen show/hide control
    Request TypeThree types of requests: JSON, CONTENT, CUSTOM
    CacheResponse data cache control
    View/ViewModel BindBinding process for new View/ViewModel
    onEnterCallback after screen display is complete
    -

    Key Design Patterns

    -

    1. MVVM (Model-View-ViewModel)

    -
      -
    • View: Handles screen structure and display. No business logic
    • -
    • ViewModel: Bridge between View and Model. Holds UseCases and processes events
    • -
    • Model: Handles business logic and data access
    • -
    -

    2. UseCase Pattern

    -

    Create a dedicated UseCase class for each user action:

    -
    export class StartDragUseCase
    -{
    -    execute(target: IDraggable): void
    -    {
    -        target.startDrag();
    -    }
    -}
    -

    3. Dependency Inversion

    -

    Depend on interfaces, not concrete classes:

    -
    // Good: Depend on interfaces
    -import type { IDraggable } from "@/interface/IDraggable";
    -
    -function startDrag(target: IDraggable): void
    -{
    -    target.startDrag();
    -}
    -

    4. Repository Pattern

    -

    Abstract data access and implement error handling:

    -
    export class HomeTextRepository
    -{
    -    static async get(): Promise<IHomeTextResponse>
    -    {
    -        try {
    -            const response = await fetch(`${config.api.endPoint}api/home.json`);
    -            if (!response.ok) {
    -                throw new Error(`HTTP error! status: ${response.status}`);
    -            }
    -            return await response.json();
    -        } catch (error) {
    -            console.error("Failed to fetch:", error);
    -            throw error;
    -        }
    -    }
    -}
    -

    Quick Start

    -

    Create Project

    -
    npx create-next2d-app my-app
    -cd my-app
    -npm install
    -npm start
    -

    Auto-generate View/ViewModel

    -
    npm run generate
    -

    This command parses top properties in routing.json and generates corresponding View and ViewModel classes.

    -

    Best Practices

    -
      -
    1. Interface First: Always depend on interfaces, not concrete types
    2. -
    3. Single Responsibility Principle: Each class has only one responsibility
    4. -
    5. Dependency Injection: Inject dependencies via constructor
    6. -
    7. Error Handling: Handle errors appropriately in Repository layer
    8. -
    9. Type Safety: Avoid any type, use explicit type definitions
    10. -
    - -

    Basics

    - -

    Next2D Player Integration

    -
    \ No newline at end of file diff --git a/docs/en/reference/framework/routing/index.html b/docs/en/reference/framework/routing/index.html index 448d5fdc..2945c3d1 100644 --- a/docs/en/reference/framework/routing/index.html +++ b/docs/en/reference/framework/routing/index.html @@ -385,4 +385,4 @@
  • Configuration
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/framework/view/index.html b/docs/en/reference/framework/view/index.html index b7e45120..d1b09df2 100644 --- a/docs/en/reference/framework/view/index.html +++ b/docs/en/reference/framework/view/index.html @@ -419,4 +419,4 @@
  • Configuration
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/player/display-object/index.html b/docs/en/reference/player/display-object/index.html index 42421433..0ba97229 100644 --- a/docs/en/reference/player/display-object/index.html +++ b/docs/en/reference/player/display-object/index.html @@ -406,4 +406,4 @@
  • Sprite
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/player/events/index.html b/docs/en/reference/player/events/index.html index 3788b373..c1211575 100644 --- a/docs/en/reference/player/events/index.html +++ b/docs/en/reference/player/events/index.html @@ -439,4 +439,4 @@
  • MovieClip
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/player/filters/index.html b/docs/en/reference/player/filters/index.html index f07f9a94..96ae5d27 100644 --- a/docs/en/reference/player/filters/index.html +++ b/docs/en/reference/player/filters/index.html @@ -808,4 +808,4 @@
  • MovieClip
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/player/index.html b/docs/en/reference/player/index.html deleted file mode 100644 index d5b06232..00000000 --- a/docs/en/reference/player/index.html +++ /dev/null @@ -1,184 +0,0 @@ - Next2D | Player

    Next2D Player

    -

    Next2D Player is a high-performance 2D rendering engine using WebGL/WebGPU. It provides Flash Player-like functionality on the web, supporting vector graphics, Tween animations, text, audio, video, and more.

    -

    Key Features

    -
      -
    • High-Speed Rendering: Fast 2D rendering using WebGL/WebGPU
    • -
    • Multi-Platform: Supports desktop to mobile devices
    • -
    • Rich Filters: Supports Blur, DropShadow, Glow, Bevel, and more
    • -
    -

    Rendering Pipeline

    -

    An overview of the pipeline that enables Next2D Player’s high-speed rendering.

    -
    flowchart TB
    -    %% Main Drawing Flow Chart
    -    subgraph MainFlow["Drawing Flow Chart - Main Rendering Pipeline"]
    -        direction TB
    -
    -        subgraph Inputs["Display Objects"]
    -            Shape["Shape<br/>(Bitmap/Vector)"]
    -            TextField["TextField<br/>(canvas2d)"]
    -            Video["Video Element"]
    -        end
    -
    -        Shape --> MaskCheck
    -        TextField --> MaskCheck
    -        Video --> MaskCheck
    -
    -        MaskCheck{"mask<br/>rendering?"}
    -
    -        MaskCheck -->|YES| DirectRender["Direct Rendering"]
    -        DirectRender -->|drawArrays| FinalRender
    -
    -        MaskCheck -->|NO| CacheCheck1{"cache<br/>exists?"}
    -
    -        CacheCheck1 -->|NO| TextureAtlas["Texture Atlas<br/>(Binary Tree Packing)"]
    -        TextureAtlas --> Coordinates
    -
    -        CacheCheck1 -->|YES| Coordinates["Coordinates DB<br/>(x, y, w, h)"]
    -
    -        Coordinates --> FilterBlendCheck{"filter or<br/>blend?"}
    -
    -        FilterBlendCheck -->|NO| MainArrays
    -        FilterBlendCheck -->|YES| NeedCache{"cache<br/>exists?"}
    -
    -        NeedCache -->|NO| CacheRender["Render to Cache"]
    -        CacheRender --> TextureCache
    -        NeedCache -->|YES| TextureCache["Texture Cache"]
    -
    -        TextureCache -->|drawArrays| FinalRender
    -
    -        MainArrays["Instanced Arrays<br/>━━━━━━━━━━━━━━━<br/>matrix<br/>colorTransform<br/>Coordinates<br/>━━━━━━━━━━━━━━━<br/><b>Batch Rendering</b>"]
    -
    -        MainArrays -->|drawArraysInstanced<br/><b>Multiple objects in one call</b>| FinalRender["Final Rendering"]
    -
    -        FinalRender -->|60fps| MainFramebuffer["Main Framebuffer<br/>(Display)"]
    -    end
    -
    -    %% Branch Flow for Filter/Blend/Mask
    -    subgraph BranchFlow["Filter/Blend/Mask - Branch Processing"]
    -        direction TB
    -
    -        subgraph FilterInputs["Display Objects"]
    -            Shape2["Shape<br/>(Bitmap/Vector)"]
    -            TextField2["TextField<br/>(canvas2d)"]
    -            Video2["Video Element"]
    -        end
    -
    -        Shape2 --> CacheCheck2
    -        TextField2 --> CacheCheck2
    -        Video2 --> CacheCheck2
    -
    -        CacheCheck2{"cache<br/>exists?"}
    -
    -        CacheCheck2 -->|NO| EffectRender["Effect Rendering"]
    -        CacheCheck2 -->|YES| BranchArrays
    -        EffectRender --> BranchArrays
    -
    -        BranchArrays["Instanced Arrays<br/>━━━━━━━━━━━━━━━<br/>matrix<br/>colorTransform<br/>Coordinates<br/>━━━━━━━━━━━━━━━<br/><b>Batch Rendering</b>"]
    -
    -        BranchArrays -->|drawArraysInstanced<br/><b>Multiple objects in one call</b>| BranchRender["Effect Result"]
    -
    -        BranchRender -->|filter/blend| TextureCache
    -    end
    -
    -    %% Connections between flows
    -    FilterBlendCheck -.->|"trigger<br/>branch flow"| BranchFlow
    -    BranchArrays -.->|"rendering info<br/>(coordinates)"| MainArrays
    -

    Pipeline Features

    -
      -
    • Batch Rendering: Render multiple objects in a single GPU call
    • -
    • Texture Cache: Efficiently process filters and blend effects
    • -
    • Binary Tree Packing: Optimal memory usage with texture atlas
    • -
    • 60fps Rendering: Smooth animations at high frame rates
    • -
    -

    DisplayList Architecture

    -

    Next2D Player uses a DisplayList architecture similar to Flash Player.

    -

    Main Class Hierarchy

    -
    DisplayObject (Base class)
    -├── InteractiveObject
    -│   ├── DisplayObjectContainer
    -│   │   ├── Sprite
    -│   │   ├── MovieClip
    -│   │   └── Stage
    -│   └── TextField
    -├── Shape
    -├── Video
    -└── Bitmap
    -

    DisplayObjectContainer

    -

    Container class that can hold child objects:

    -
      -
    • addChild(child): Add child to the front
    • -
    • addChildAt(child, index): Add child at specified index
    • -
    • removeChild(child): Remove child
    • -
    • getChildAt(index): Get child by index
    • -
    • getChildByName(name): Get child by name
    • -
    -

    MovieClip

    -

    DisplayObject with timeline animation:

    -
      -
    • play(): Start timeline playback
    • -
    • stop(): Stop timeline
    • -
    • gotoAndPlay(frame): Go to frame and play
    • -
    • gotoAndStop(frame): Go to frame and stop
    • -
    • currentFrame: Current frame number
    • -
    • totalFrames: Total number of frames
    • -
    -

    Basic Usage

    -
    const { MovieClip } = next2d.display;
    -const { DropShadowFilter } = next2d.filters;
    -
    -// Initialize stage
    -const root = await next2d.createRootMovieClip(800, 600, 60, {
    -    tagId: "container",
    -    bgColor: "#ffffff"
    -});
    -
    -// Create MovieClip
    -const mc = new MovieClip();
    -root.addChild(mc);
    -
    -// Set position and size
    -mc.x = 100;
    -mc.y = 100;
    -mc.scaleX = 2;
    -mc.scaleY = 2;
    -mc.rotation = 45;
    -
    -// Apply filters
    -mc.filters = [
    -    new DropShadowFilter(4, 45, 0x000000, 0.5)
    -];
    -

    Loading JSON Data

    -

    Load and render JSON files created with Open Animation Tool:

    -
    const { Loader } = next2d.display;
    -const { URLRequest } = next2d.net;
    -
    -const loader = new Loader();
    -await loader.load(new URLRequest("animation.json"));
    -
    -const mc = loader.content;
    -stage.addChild(mc);
    - -

    Display Objects

    - -

    Systems

    -
    \ No newline at end of file diff --git a/docs/en/reference/player/movie-clip/index.html b/docs/en/reference/player/movie-clip/index.html index 2ab7aa74..58d7adb6 100644 --- a/docs/en/reference/player/movie-clip/index.html +++ b/docs/en/reference/player/movie-clip/index.html @@ -341,4 +341,4 @@
  • Event System
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/player/shape/index.html b/docs/en/reference/player/shape/index.html index c74b6a9a..9d9c0b77 100644 --- a/docs/en/reference/player/shape/index.html +++ b/docs/en/reference/player/shape/index.html @@ -641,4 +641,4 @@
  • Filters
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/player/sound/index.html b/docs/en/reference/player/sound/index.html index e7efacf2..2ec0f0cf 100644 --- a/docs/en/reference/player/sound/index.html +++ b/docs/en/reference/player/sound/index.html @@ -332,4 +332,4 @@
  • Event System
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/player/sprite/index.html b/docs/en/reference/player/sprite/index.html index 8a803ddb..b8fa874d 100644 --- a/docs/en/reference/player/sprite/index.html +++ b/docs/en/reference/player/sprite/index.html @@ -604,4 +604,4 @@
  • Shape
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/player/text-field/index.html b/docs/en/reference/player/text-field/index.html index 1d027e20..f1f5fed5 100644 --- a/docs/en/reference/player/text-field/index.html +++ b/docs/en/reference/player/text-field/index.html @@ -596,4 +596,4 @@
  • Event System
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/player/tween/index.html b/docs/en/reference/player/tween/index.html index 198b2dea..573d2f26 100644 --- a/docs/en/reference/player/tween/index.html +++ b/docs/en/reference/player/tween/index.html @@ -441,4 +441,4 @@
  • Event System
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/en/reference/player/video/index.html b/docs/en/reference/player/video/index.html index 8915cc68..fd6515dd 100644 --- a/docs/en/reference/player/video/index.html +++ b/docs/en/reference/player/video/index.html @@ -335,4 +335,4 @@
  • Event System
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/framework/animation-tool/index.html b/docs/ja/reference/framework/animation-tool/index.html index 6670ed26..695f5e08 100644 --- a/docs/ja/reference/framework/animation-tool/index.html +++ b/docs/ja/reference/framework/animation-tool/index.html @@ -142,4 +142,4 @@

    関連項目

  • 設定ファイル
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/framework/config/index.html b/docs/ja/reference/framework/config/index.html index f7ad337e..264fbd28 100644 --- a/docs/ja/reference/framework/config/index.html +++ b/docs/ja/reference/framework/config/index.html @@ -349,4 +349,4 @@

    関連項目

  • View/ViewModel
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/framework/index.html b/docs/ja/reference/framework/index.html deleted file mode 100644 index e5e97578..00000000 --- a/docs/ja/reference/framework/index.html +++ /dev/null @@ -1,367 +0,0 @@ - Next2D | Framework

    Next2D Framework

    -

    Next2D Frameworkは、Next2D Playerを用いたアプリケーション開発のためのMVVMフレームワークです。シングルページアプリケーション(SPA)のためのルーティング、View/ViewModel管理、環境設定管理などの機能を提供します。

    -

    主な特徴

    -
      -
    • MVVMパターン: Model-View-ViewModelパターンによる関心の分離
    • -
    • クリーンアーキテクチャ: 依存性の逆転と疎結合な設計
    • -
    • シングルページアプリケーション: URLベースのシーン管理
    • -
    • Animation Tool連携: Animation Toolで作成したアセットとの連携
    • -
    • TypeScriptサポート: 型安全な開発が可能
    • -
    • アトミックデザイン: 再利用可能なコンポーネント設計を推奨
    • -
    -

    アーキテクチャ概要

    -

    このプロジェクトはクリーンアーキテクチャとMVVMパターンを組み合わせて実装されています。

    -
    graph TB
    -    subgraph ViewLayer["View Layer"]
    -        View["View"]
    -        ViewModel["ViewModel"]
    -        UI["UI Components"]
    -    end
    -
    -    subgraph InterfaceLayer["Interface Layer"]
    -        IDraggable["IDraggable"]
    -        ITextField["ITextField"]
    -        IResponse["IResponse"]
    -    end
    -
    -    subgraph ApplicationLayer["Application Layer"]
    -        UseCase["UseCase"]
    -    end
    -
    -    subgraph DomainLayer["Domain Layer"]
    -        DomainLogic["Domain Logic"]
    -        DomainService["Service"]
    -    end
    -
    -    subgraph InfraLayer["Infrastructure Layer"]
    -        Repository["Repository"]
    -        ExternalAPI["External API"]
    -    end
    -
    -    ViewLayer -.->|interface経由| InterfaceLayer
    -    ViewLayer -.->|calls| ApplicationLayer
    -    ApplicationLayer -.->|interface経由| InterfaceLayer
    -    ApplicationLayer -.->|uses| DomainLayer
    -    ApplicationLayer -.->|calls| InfraLayer
    -    InfraLayer -.->|accesses| ExternalAPI
    -

    レイヤーの責務

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    レイヤーパス役割
    Viewview/*, ui/*画面の構造と表示を担当
    ViewModelview/*ViewとModelの橋渡し、イベントハンドリング
    Interfaceinterface/*抽象化レイヤー、型定義
    Applicationmodel/application/*/usecase/*ビジネスロジックの実装(UseCase)
    Domainmodel/domain/*コアビジネスルール
    Infrastructuremodel/infrastructure/repository/*データアクセス、外部API連携
    -

    依存関係の方向

    -

    クリーンアーキテクチャの原則に従い、依存関係は常に内側(Domain層)に向かいます。

    -
      -
    • View層: インターフェースを通じてApplication層を使用
    • -
    • Application層: インターフェースを通じてDomain層とInfrastructure層を使用
    • -
    • Domain層: 何にも依存しない(純粋なビジネスロジック)
    • -
    • Infrastructure層: Domain層のインターフェースを実装
    • -
    -

    ディレクトリ構造

    -
    my-app/
    -├── src/
    -│   ├── config/                    # 設定ファイル
    -│   │   ├── stage.json             # ステージ設定
    -│   │   ├── config.json            # 環境設定
    -│   │   ├── routing.json           # ルーティング設定
    -│   │   └── Config.ts              # 設定の型定義とエクスポート
    -│   │
    -│   ├── interface/                 # インターフェース定義
    -│   │   ├── IDraggable.ts          # ドラッグ可能なオブジェクト
    -│   │   ├── ITextField.ts          # テキストフィールド
    -│   │   ├── IHomeTextResponse.ts   # APIレスポンス型
    -│   │   └── IViewName.ts           # 画面名の型定義
    -│   │
    -│   ├── view/                      # View & ViewModel
    -│   │   ├── top/
    -│   │   │   ├── TopView.ts         # 画面の構造定義
    -│   │   │   └── TopViewModel.ts    # ビジネスロジックとの橋渡し
    -│   │   └── home/
    -│   │       ├── HomeView.ts
    -│   │       └── HomeViewModel.ts
    -│   │
    -│   ├── model/
    -│   │   ├── application/           # アプリケーション層
    -│   │   │   ├── top/
    -│   │   │   │   └── usecase/
    -│   │   │   │       └── NavigateToViewUseCase.ts
    -│   │   │   └── home/
    -│   │   │       └── usecase/
    -│   │   │           ├── StartDragUseCase.ts
    -│   │   │           ├── StopDragUseCase.ts
    -│   │   │           └── CenterTextFieldUseCase.ts
    -│   │   │
    -│   │   ├── domain/                # ドメイン層
    -│   │   │   └── callback/
    -│   │   │       ├── Background.ts
    -│   │   │       └── Background/
    -│   │   │           └── service/
    -│   │   │               ├── BackgroundDrawService.ts
    -│   │   │               └── BackgroundChangeScaleService.ts
    -│   │   │
    -│   │   └── infrastructure/        # インフラ層
    -│   │       └── repository/
    -│   │           └── HomeTextRepository.ts
    -│   │
    -│   ├── ui/                        # UIコンポーネント
    -│   │   ├── animation/             # アニメーション定義
    -│   │   │   └── top/
    -│   │   │       └── TopBtnShowAnimation.ts
    -│   │   │
    -│   │   ├── component/             # アトミックデザイン
    -│   │   │   ├── atom/              # 最小単位のコンポーネント
    -│   │   │   │   ├── ButtonAtom.ts
    -│   │   │   │   └── TextAtom.ts
    -│   │   │   ├── molecule/          # Atomを組み合わせたコンポーネント
    -│   │   │   │   ├── HomeBtnMolecule.ts
    -│   │   │   │   └── TopBtnMolecule.ts
    -│   │   │   ├── organism/          # 複数Moleculeの組み合わせ
    -│   │   │   ├── template/          # ページテンプレート
    -│   │   │   └── page/              # ページコンポーネント
    -│   │   │       ├── top/
    -│   │   │       │   └── TopPage.ts
    -│   │   │       └── home/
    -│   │   │           └── HomePage.ts
    -│   │   │
    -│   │   └── content/               # Animation Tool生成コンテンツ
    -│   │       ├── TopContent.ts
    -│   │       └── HomeContent.ts
    -│   │
    -│   ├── assets/                    # 静的アセット
    -│   │
    -│   ├── Packages.ts                # パッケージエクスポート
    -│   └── index.ts                   # エントリーポイント
    -
    -├── file/                          # Animation Tool出力ファイル
    -│   └── sample.n2d
    -
    -├── mock/                          # モックデータ
    -│   ├── api/                       # APIモック
    -│   ├── content/                   # コンテンツモック
    -│   └── img/                       # 画像モック
    -
    -└── package.json
    -

    フレームワークフローチャート

    -

    gotoView関数による画面遷移の詳細なフローを示します。

    -
    graph TD
    -    User([User]) -->|Request| GotoView[gotoView Path]
    -
    -    GotoView --> LoadingCheck{use loading?<br/>Default: true}
    -
    -    LoadingCheck -->|YES| ScreenOverlay[Screen Overlay]
    -    LoadingCheck -->|NO| RemoveResponse
    -    ScreenOverlay --> LoadingStart[Start Loading]
    -    LoadingStart --> RemoveResponse
    -
    -    RemoveResponse[Remove Previous Response Data] --> ParseQuery[Parse Query String]
    -    ParseQuery --> UpdateHistory{SPA mode?}
    -
    -    UpdateHistory -->|YES| PushState[Push History State]
    -    UpdateHistory -->|NO| RequestType
    -    PushState --> RequestType
    -
    -    RequestType[Request Type]
    -
    -    RequestType --> JSON[JSON: Get external JSON data]
    -    RequestType --> CONTENT[CONTENT: Get Animation Tool JSON]
    -    RequestType --> CUSTOM[CUSTOM: Request to external API]
    -
    -    JSON --> CacheCheck{use cache?<br/>Default: false}
    -    CONTENT --> CacheCheck
    -    CUSTOM --> CacheCheck
    -
    -    CacheCheck -->|YES| CacheData[(Cache)]
    -    CacheCheck -->|NO| GlobalData{{Global Network}}
    -
    -    CacheData --> Cached{Cached?}
    -
    -    Cached -->|NO| GlobalData
    -    Cached -->|YES| RegisterResponse
    -    GlobalData --> RegisterResponse
    -
    -    RegisterResponse[Register Response Data] --> RequestCallback{request callback?}
    -
    -    RequestCallback -->|YES| ExecRequestCallback[Execute Request Callback]
    -    RequestCallback -->|NO| UnbindView
    -    ExecRequestCallback --> UnbindView
    -
    -    UnbindView[Previous View: onExit & Unbind] --> BindView[New View/ViewModel: Bind]
    -    BindView --> ViewModelInit[ViewModel: initialize]
    -
    -    ViewModelInit --> ViewInit[View: initialize]
    -    ViewInit --> AddToStage[Add View to Stage]
    -    AddToStage --> GotoViewCallback{gotoView callback?}
    -
    -    GotoViewCallback -->|YES| ExecGotoViewCallback[Execute gotoView Callback]
    -    GotoViewCallback -->|NO| LoadingEndCheck
    -    ExecGotoViewCallback --> LoadingEndCheck
    -
    -    LoadingEndCheck{use loading?<br/>Default: true}
    -
    -    LoadingEndCheck -->|YES| LoadingEnd[End Loading]
    -    LoadingEndCheck -->|NO| OnEnter
    -    LoadingEnd --> DisposeOverlay[Dispose Screen Overlay]
    -    DisposeOverlay --> OnEnter
    -
    -    OnEnter[View: onEnter] --> StartDrawing
    -
    -    StartDrawing[Start Drawing] -->|Response| User
    -
    -    style User fill:#d5e8d4,stroke:#82b366
    -    style StartDrawing fill:#dae8fc,stroke:#6c8ebf
    -    style CacheData fill:#fff2cc,stroke:#d6b656
    -    style GlobalData fill:#f5f5f5,stroke:#666666
    -

    フローの主要ステップ

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ステップ説明
    gotoView画面遷移のエントリーポイント
    Loadingローディング画面の表示/非表示制御
    Request TypeJSON、CONTENT、CUSTOMの3種類のリクエスト
    Cacheレスポンスデータのキャッシュ制御
    View/ViewModel Bind新しいView/ViewModelのバインド処理
    onEnter画面表示完了後のコールバック
    -

    主要な設計パターン

    -

    1. MVVM (Model-View-ViewModel)

    -
      -
    • View: 画面の構造と表示を担当。ビジネスロジックは持たない
    • -
    • ViewModel: ViewとModelの橋渡し。UseCaseを保持し、イベントを処理
    • -
    • Model: ビジネスロジックとデータアクセスを担当
    • -
    -

    2. UseCaseパターン

    -

    各ユーザーアクションに対して、専用のUseCaseクラスを作成:

    -
    export class StartDragUseCase
    -{
    -    execute(target: IDraggable): void
    -    {
    -        target.startDrag();
    -    }
    -}
    -

    3. 依存性の逆転 (Dependency Inversion)

    -

    具象クラスではなく、インターフェースに依存:

    -
    // 良い例: インターフェースに依存
    -import type { IDraggable } from "@/interface/IDraggable";
    -
    -function startDrag(target: IDraggable): void
    -{
    -    target.startDrag();
    -}
    -

    4. Repositoryパターン

    -

    データアクセスを抽象化し、エラーハンドリングも実装:

    -
    export class HomeTextRepository
    -{
    -    static async get(): Promise<IHomeTextResponse>
    -    {
    -        try {
    -            const response = await fetch(`${config.api.endPoint}api/home.json`);
    -            if (!response.ok) {
    -                throw new Error(`HTTP error! status: ${response.status}`);
    -            }
    -            return await response.json();
    -        } catch (error) {
    -            console.error("Failed to fetch:", error);
    -            throw error;
    -        }
    -    }
    -}
    -

    クイックスタート

    -

    プロジェクトの作成

    -
    npx create-next2d-app my-app
    -cd my-app
    -npm install
    -npm start
    -

    View/ViewModelの自動生成

    -
    npm run generate
    -

    このコマンドはrouting.jsonのトッププロパティを解析し、対応するViewとViewModelクラスを生成します。

    -

    ベストプラクティス

    -
      -
    1. インターフェース優先: 具象型ではなく、常にインターフェースに依存
    2. -
    3. 単一責任の原則: 各クラスは1つの責務のみを持つ
    4. -
    5. 依存性注入: コンストラクタで依存を注入
    6. -
    7. エラーハンドリング: Repository層で適切にエラーを処理
    8. -
    9. 型安全性: any型を避け、明示的な型定義を使用
    10. -
    -

    関連ドキュメント

    -

    基本

    - -

    Next2D Player連携

    -
    \ No newline at end of file diff --git a/docs/ja/reference/framework/routing/index.html b/docs/ja/reference/framework/routing/index.html index 2ec4d06e..6c28b6a5 100644 --- a/docs/ja/reference/framework/routing/index.html +++ b/docs/ja/reference/framework/routing/index.html @@ -385,4 +385,4 @@

    関連項目

  • 設定ファイル
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/framework/view/index.html b/docs/ja/reference/framework/view/index.html index 02569dce..556403a8 100644 --- a/docs/ja/reference/framework/view/index.html +++ b/docs/ja/reference/framework/view/index.html @@ -419,4 +419,4 @@

    関連項目

  • 設定ファイル
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/player/display-object/index.html b/docs/ja/reference/player/display-object/index.html index 359835d7..56929acb 100644 --- a/docs/ja/reference/player/display-object/index.html +++ b/docs/ja/reference/player/display-object/index.html @@ -406,4 +406,4 @@

    関連項目

  • Sprite
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/player/events/index.html b/docs/ja/reference/player/events/index.html index c53f303e..b8cae76a 100644 --- a/docs/ja/reference/player/events/index.html +++ b/docs/ja/reference/player/events/index.html @@ -439,4 +439,4 @@

    関連項目

  • MovieClip
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/player/filters/index.html b/docs/ja/reference/player/filters/index.html index 5ad5e41a..c794cf49 100644 --- a/docs/ja/reference/player/filters/index.html +++ b/docs/ja/reference/player/filters/index.html @@ -808,4 +808,4 @@

    関連項目

  • MovieClip
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/player/index.html b/docs/ja/reference/player/index.html deleted file mode 100644 index 746d7cb3..00000000 --- a/docs/ja/reference/player/index.html +++ /dev/null @@ -1,185 +0,0 @@ - Next2D | Player

    Next2D Player

    -

    Next2D Playerは、WebGL/WebGPUを用いた高速2Dレンダリングエンジンです。Flash Playerのような機能をWeb上で実現し、ベクター描画、Tweenアニメーション、テキスト、音声、動画など、さまざまな要素をサポートしています。

    -

    主な特徴

    -
      -
    • 高速レンダリング: WebGL/WebGPUを活用した高速2D描画
    • -
    • マルチプラットフォーム: デスクトップからモバイルまで対応
    • -
    • 豊富なフィルター: Blur、DropShadow、Glow、Bevelなど多数のフィルターをサポート
    • -
    -

    レンダリングパイプライン

    -

    Next2D Playerの高速レンダリングを実現するパイプラインの全体像です。

    -
    flowchart TB
    -    %% Main Drawing Flow Chart
    -    subgraph MainFlow["描画フローチャート - メインレンダリングパイプライン"]
    -        direction TB
    -
    -        subgraph Inputs["表示オブジェクト"]
    -            Shape["Shape<br/>(Bitmap/Vector)"]
    -            TextField["TextField<br/>(canvas2d)"]
    -            Video["Video Element"]
    -        end
    -
    -        Shape --> MaskCheck
    -        TextField --> MaskCheck
    -        Video --> MaskCheck
    -
    -        MaskCheck{"マスク<br/>レンダリング?"}
    -
    -        MaskCheck -->|YES| DirectRender["直接レンダリング"]
    -        DirectRender -->|drawArrays| FinalRender
    -
    -        MaskCheck -->|NO| CacheCheck1{"キャッシュ<br/>あり?"}
    -
    -        CacheCheck1 -->|NO| TextureAtlas["テクスチャアトラス<br/>(二分木パッキング)"]
    -        TextureAtlas --> Coordinates
    -
    -        CacheCheck1 -->|YES| Coordinates["座標データベース<br/>(x, y, w, h)"]
    -
    -        Coordinates --> FilterBlendCheck{"フィルター or<br/>ブレンド?"}
    -
    -        FilterBlendCheck -->|NO| MainArrays
    -        FilterBlendCheck -->|YES| NeedCache{"キャッシュ<br/>あり?"}
    -
    -        NeedCache -->|NO| CacheRender["キャッシュにレンダリング"]
    -        CacheRender --> TextureCache
    -        NeedCache -->|YES| TextureCache["テクスチャキャッシュ"]
    -
    -        TextureCache -->|drawArrays| FinalRender
    -
    -        MainArrays["インスタンス配列<br/>━━━━━━━━━━━━━━━<br/>matrix<br/>colorTransform<br/>Coordinates<br/>━━━━━━━━━━━━━━━<br/><b>バッチレンダリング</b>"]
    -
    -        MainArrays -->|drawArraysInstanced<br/><b>複数オブジェクトを1回で描画</b>| FinalRender["最終レンダリング"]
    -
    -        FinalRender -->|60fps| MainFramebuffer["メインフレームバッファ<br/>(ディスプレイ)"]
    -    end
    -
    -    %% Branch Flow for Filter/Blend/Mask
    -    subgraph BranchFlow["フィルター/ブレンド/マスク - 分岐処理"]
    -        direction TB
    -
    -        subgraph FilterInputs["表示オブジェクト"]
    -            Shape2["Shape<br/>(Bitmap/Vector)"]
    -            TextField2["TextField<br/>(canvas2d)"]
    -            Video2["Video Element"]
    -        end
    -
    -        Shape2 --> CacheCheck2
    -        TextField2 --> CacheCheck2
    -        Video2 --> CacheCheck2
    -
    -        CacheCheck2{"キャッシュ<br/>あり?"}
    -
    -        CacheCheck2 -->|NO| EffectRender["エフェクトレンダリング"]
    -        CacheCheck2 -->|YES| BranchArrays
    -        EffectRender --> BranchArrays
    -
    -        BranchArrays["インスタンス配列<br/>━━━━━━━━━━━━━━━<br/>matrix<br/>colorTransform<br/>Coordinates<br/>━━━━━━━━━━━━━━━<br/><b>バッチレンダリング</b>"]
    -
    -        BranchArrays -->|drawArraysInstanced<br/><b>複数オブジェクトを1回で描画</b>| BranchRender["エフェクト結果"]
    -
    -        BranchRender -->|filter/blend| TextureCache
    -    end
    -
    -    %% Connections between flows
    -    FilterBlendCheck -.->|"分岐フローを<br/>トリガー"| BranchFlow
    -    BranchArrays -.->|"レンダリング情報<br/>(座標)"| MainArrays
    -

    パイプラインの特徴

    -
      -
    • バッチレンダリング: 複数のオブジェクトを1回のGPUコールで描画
    • -
    • テクスチャキャッシュ: フィルターやブレンド効果を効率的に処理
    • -
    • 二分木パッキング: テクスチャアトラスで最適なメモリ使用
    • -
    • 60fps描画: 高フレームレートでのスムーズなアニメーション
    • -
    -

    DisplayListアーキテクチャ

    -

    Next2D Playerは、Flash Playerと同様のDisplayListアーキテクチャを採用しています。

    -

    主要クラス階層

    -
    DisplayObject (基底クラス)
    -├── InteractiveObject
    -│   ├── DisplayObjectContainer
    -│   │   ├── Sprite
    -│   │   ├── MovieClip
    -│   │   └── Stage
    -│   └── TextField
    -├── Shape
    -├── Video
    -└── Bitmap
    -

    DisplayObjectContainer

    -

    子オブジェクトを持つことができるコンテナクラス:

    -
      -
    • addChild(child): 子要素を最前面に追加
    • -
    • addChildAt(child, index): 指定インデックスに子要素を追加
    • -
    • removeChild(child): 子要素を削除
    • -
    • getChildAt(index): インデックスから子要素を取得
    • -
    • getChildByName(name): 名前から子要素を取得
    • -
    -

    MovieClip

    -

    タイムラインアニメーションを持つDisplayObject:

    -
      -
    • play(): タイムラインを再生
    • -
    • stop(): タイムラインを停止
    • -
    • gotoAndPlay(frame): 指定フレームに移動して再生
    • -
    • gotoAndStop(frame): 指定フレームに移動して停止
    • -
    • currentFrame: 現在のフレーム番号
    • -
    • totalFrames: 総フレーム数
    • -
    -

    基本的な使い方

    -
    const { MovieClip } = next2d.display;
    -const { DropShadowFilter } = next2d.filters;
    -
    -// ルートMovieClipを作成
    -const root = await next2d.createRootMovieClip(800, 600, 60, {
    -    tagId: "container",
    -    bgColor: "#ffffff"
    -});
    -
    -// MovieClipの作成
    -const mc = new MovieClip();
    -root.addChild(mc);
    -
    -// 位置とサイズの設定
    -mc.x = 100;
    -mc.y = 100;
    -mc.scaleX = 2;
    -mc.scaleY = 2;
    -mc.rotation = 45;
    -
    -// フィルターの適用
    -mc.filters = [
    -    new DropShadowFilter(4, 45, 0x000000, 0.5)
    -];
    -

    JSONデータの読み込み

    -

    Open Animation Toolで作成したJSONファイルを読み込んで描画:

    -
    const { Loader } = next2d.display;
    -const { URLRequest } = next2d.net;
    -
    -const loader = new Loader();
    -await loader.load(new URLRequest("animation.json"));
    -
    -// 読み込み完了後、直接contentにアクセス
    -const mc = loader.content;
    -stage.addChild(mc);
    -

    関連ドキュメント

    -

    表示オブジェクト

    -
      -
    • DisplayObject - 全ての表示オブジェクトの基底クラス
    • -
    • MovieClip - タイムラインアニメーション
    • -
    • Sprite - グラフィックス描画とインタラクション
    • -
    • Shape - 軽量なベクター描画
    • -
    • TextField - テキスト表示と入力
    • -
    • Video - 動画再生
    • -
    -

    システム

    -
    \ No newline at end of file diff --git a/docs/ja/reference/player/movie-clip/index.html b/docs/ja/reference/player/movie-clip/index.html index 3ec9a2dd..411bc3b1 100644 --- a/docs/ja/reference/player/movie-clip/index.html +++ b/docs/ja/reference/player/movie-clip/index.html @@ -341,4 +341,4 @@

    関連項目

  • イベントシステム
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/player/shape/index.html b/docs/ja/reference/player/shape/index.html index 7817b7cb..ebe68569 100644 --- a/docs/ja/reference/player/shape/index.html +++ b/docs/ja/reference/player/shape/index.html @@ -641,4 +641,4 @@

    関連項目

  • フィルター
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/player/sound/index.html b/docs/ja/reference/player/sound/index.html index 207f656f..56b334da 100644 --- a/docs/ja/reference/player/sound/index.html +++ b/docs/ja/reference/player/sound/index.html @@ -341,4 +341,4 @@

    関連項目

  • イベントシステム
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/player/sprite/index.html b/docs/ja/reference/player/sprite/index.html index 1a0801d0..b7a5216c 100644 --- a/docs/ja/reference/player/sprite/index.html +++ b/docs/ja/reference/player/sprite/index.html @@ -604,4 +604,4 @@

    関連項目

  • Shape
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/player/text-field/index.html b/docs/ja/reference/player/text-field/index.html index 8cb8ba1d..bc30c165 100644 --- a/docs/ja/reference/player/text-field/index.html +++ b/docs/ja/reference/player/text-field/index.html @@ -598,4 +598,4 @@

    関連項目

  • イベントシステム
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/player/tween/index.html b/docs/ja/reference/player/tween/index.html index e4d506d3..dbacceee 100644 --- a/docs/ja/reference/player/tween/index.html +++ b/docs/ja/reference/player/tween/index.html @@ -441,4 +441,4 @@

    関連項目

  • イベントシステム
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/ja/reference/player/video/index.html b/docs/ja/reference/player/video/index.html index 88aae9b4..8eeb3b87 100644 --- a/docs/ja/reference/player/video/index.html +++ b/docs/ja/reference/player/video/index.html @@ -335,4 +335,4 @@

    関連項目

  • イベントシステム
  • \ No newline at end of file +

    Animation Tool

    © Copyrights Next2D. All rights reserved.

    \ No newline at end of file diff --git a/docs/sitemap-0.xml b/docs/sitemap-0.xml index eda6c1c8..628e44e0 100644 --- a/docs/sitemap-0.xml +++ b/docs/sitemap-0.xml @@ -1 +1 @@ -https://next2d.app/https://next2d.app/cn/https://next2d.app/cn/casestudy/slimetenpuzzle/https://next2d.app/cn/casestudy/worldflipper/https://next2d.app/cn/privacy/https://next2d.app/cn/reference/framework/https://next2d.app/cn/reference/framework/animation-tool/https://next2d.app/cn/reference/framework/config/https://next2d.app/cn/reference/framework/routing/https://next2d.app/cn/reference/framework/view/https://next2d.app/cn/reference/player/https://next2d.app/cn/reference/player/display-object/https://next2d.app/cn/reference/player/events/https://next2d.app/cn/reference/player/filters/https://next2d.app/cn/reference/player/movie-clip/https://next2d.app/cn/reference/player/shape/https://next2d.app/cn/reference/player/sound/https://next2d.app/cn/reference/player/sprite/https://next2d.app/cn/reference/player/text-field/https://next2d.app/cn/reference/player/tween/https://next2d.app/cn/reference/player/video/https://next2d.app/cn/usage/https://next2d.app/cn/usage/controller/https://next2d.app/cn/usage/controller/blend-mode/https://next2d.app/cn/usage/controller/color-transform/https://next2d.app/cn/usage/controller/filters/https://next2d.app/cn/usage/controller/frame-picker/https://next2d.app/cn/usage/controller/library/https://next2d.app/cn/usage/controller/object-setting/https://next2d.app/cn/usage/controller/sound/https://next2d.app/cn/usage/controller/stage-setting/https://next2d.app/cn/usage/controller/transform/https://next2d.app/cn/usage/screen/https://next2d.app/cn/usage/screen/align/https://next2d.app/cn/usage/screen/distribute/https://next2d.app/cn/usage/screen/layer/https://next2d.app/cn/usage/screen/tabs/https://next2d.app/cn/usage/timeline/https://next2d.app/cn/usage/timeline/custom-tweening/https://next2d.app/cn/usage/timeline/frame-keyframe/https://next2d.app/cn/usage/timeline/javascript/https://next2d.app/cn/usage/timeline/mask-layer/https://next2d.app/cn/usage/timeline/motion-tweening/https://next2d.app/cn/usage/timeline/normal-layer/https://next2d.app/cn/usage/timeline/onion-skin/https://next2d.app/cn/usage/timeline/preview/https://next2d.app/cn/usage/tool/https://next2d.app/cn/usage/tool/ellipse/https://next2d.app/cn/usage/tool/pen/https://next2d.app/cn/usage/tool/rectangle/https://next2d.app/cn/usage/tool/rounded-rectangle/https://next2d.app/cn/usage/tool/shape-transform/https://next2d.app/cn/usage/tool/text/https://next2d.app/cn/usage/tool/transform/https://next2d.app/en/https://next2d.app/en/casestudy/slimetenpuzzle/https://next2d.app/en/casestudy/worldflipper/https://next2d.app/en/privacy/https://next2d.app/en/reference/framework/https://next2d.app/en/reference/framework/animation-tool/https://next2d.app/en/reference/framework/config/https://next2d.app/en/reference/framework/routing/https://next2d.app/en/reference/framework/view/https://next2d.app/en/reference/player/https://next2d.app/en/reference/player/display-object/https://next2d.app/en/reference/player/events/https://next2d.app/en/reference/player/filters/https://next2d.app/en/reference/player/movie-clip/https://next2d.app/en/reference/player/shape/https://next2d.app/en/reference/player/sound/https://next2d.app/en/reference/player/sprite/https://next2d.app/en/reference/player/text-field/https://next2d.app/en/reference/player/tween/https://next2d.app/en/reference/player/video/https://next2d.app/en/usage/https://next2d.app/en/usage/controller/https://next2d.app/en/usage/controller/blend-mode/https://next2d.app/en/usage/controller/color-transform/https://next2d.app/en/usage/controller/filters/https://next2d.app/en/usage/controller/frame-picker/https://next2d.app/en/usage/controller/library/https://next2d.app/en/usage/controller/object-setting/https://next2d.app/en/usage/controller/sound/https://next2d.app/en/usage/controller/stage-setting/https://next2d.app/en/usage/controller/transform/https://next2d.app/en/usage/screen/https://next2d.app/en/usage/screen/align/https://next2d.app/en/usage/screen/distribute/https://next2d.app/en/usage/screen/layer/https://next2d.app/en/usage/screen/tabs/https://next2d.app/en/usage/timeline/https://next2d.app/en/usage/timeline/custom-tweening/https://next2d.app/en/usage/timeline/frame-keyframe/https://next2d.app/en/usage/timeline/javascript/https://next2d.app/en/usage/timeline/mask-layer/https://next2d.app/en/usage/timeline/motion-tweening/https://next2d.app/en/usage/timeline/normal-layer/https://next2d.app/en/usage/timeline/onion-skin/https://next2d.app/en/usage/timeline/preview/https://next2d.app/en/usage/tool/https://next2d.app/en/usage/tool/ellipse/https://next2d.app/en/usage/tool/pen/https://next2d.app/en/usage/tool/rectangle/https://next2d.app/en/usage/tool/rounded-rectangle/https://next2d.app/en/usage/tool/shape-transform/https://next2d.app/en/usage/tool/text/https://next2d.app/en/usage/tool/transform/https://next2d.app/ja/https://next2d.app/ja/casestudy/slimetenpuzzle/https://next2d.app/ja/casestudy/worldflipper/https://next2d.app/ja/privacy/https://next2d.app/ja/reference/framework/https://next2d.app/ja/reference/framework/animation-tool/https://next2d.app/ja/reference/framework/config/https://next2d.app/ja/reference/framework/routing/https://next2d.app/ja/reference/framework/view/https://next2d.app/ja/reference/player/https://next2d.app/ja/reference/player/display-object/https://next2d.app/ja/reference/player/events/https://next2d.app/ja/reference/player/filters/https://next2d.app/ja/reference/player/movie-clip/https://next2d.app/ja/reference/player/shape/https://next2d.app/ja/reference/player/sound/https://next2d.app/ja/reference/player/sprite/https://next2d.app/ja/reference/player/text-field/https://next2d.app/ja/reference/player/tween/https://next2d.app/ja/reference/player/video/https://next2d.app/ja/usage/https://next2d.app/ja/usage/controller/https://next2d.app/ja/usage/controller/blend-mode/https://next2d.app/ja/usage/controller/color-transform/https://next2d.app/ja/usage/controller/filters/https://next2d.app/ja/usage/controller/frame-picker/https://next2d.app/ja/usage/controller/library/https://next2d.app/ja/usage/controller/object-setting/https://next2d.app/ja/usage/controller/sound/https://next2d.app/ja/usage/controller/stage-setting/https://next2d.app/ja/usage/controller/transform/https://next2d.app/ja/usage/screen/https://next2d.app/ja/usage/screen/align/https://next2d.app/ja/usage/screen/distribute/https://next2d.app/ja/usage/screen/layer/https://next2d.app/ja/usage/screen/tabs/https://next2d.app/ja/usage/timeline/https://next2d.app/ja/usage/timeline/custom-tweening/https://next2d.app/ja/usage/timeline/frame-keyframe/https://next2d.app/ja/usage/timeline/javascript/https://next2d.app/ja/usage/timeline/mask-layer/https://next2d.app/ja/usage/timeline/motion-tweening/https://next2d.app/ja/usage/timeline/normal-layer/https://next2d.app/ja/usage/timeline/onion-skin/https://next2d.app/ja/usage/timeline/preview/https://next2d.app/ja/usage/tool/https://next2d.app/ja/usage/tool/ellipse/https://next2d.app/ja/usage/tool/pen/https://next2d.app/ja/usage/tool/rectangle/https://next2d.app/ja/usage/tool/rounded-rectangle/https://next2d.app/ja/usage/tool/shape-transform/https://next2d.app/ja/usage/tool/text/https://next2d.app/ja/usage/tool/transform/ \ No newline at end of file +https://next2d.app/https://next2d.app/cn/https://next2d.app/cn/casestudy/slimetenpuzzle/https://next2d.app/cn/casestudy/worldflipper/https://next2d.app/cn/privacy/https://next2d.app/cn/reference/framework/animation-tool/https://next2d.app/cn/reference/framework/config/https://next2d.app/cn/reference/framework/routing/https://next2d.app/cn/reference/framework/view/https://next2d.app/cn/reference/player/display-object/https://next2d.app/cn/reference/player/events/https://next2d.app/cn/reference/player/filters/https://next2d.app/cn/reference/player/movie-clip/https://next2d.app/cn/reference/player/shape/https://next2d.app/cn/reference/player/sound/https://next2d.app/cn/reference/player/sprite/https://next2d.app/cn/reference/player/text-field/https://next2d.app/cn/reference/player/tween/https://next2d.app/cn/reference/player/video/https://next2d.app/cn/usage/https://next2d.app/cn/usage/controller/https://next2d.app/cn/usage/controller/blend-mode/https://next2d.app/cn/usage/controller/color-transform/https://next2d.app/cn/usage/controller/filters/https://next2d.app/cn/usage/controller/frame-picker/https://next2d.app/cn/usage/controller/library/https://next2d.app/cn/usage/controller/object-setting/https://next2d.app/cn/usage/controller/sound/https://next2d.app/cn/usage/controller/stage-setting/https://next2d.app/cn/usage/controller/transform/https://next2d.app/cn/usage/screen/https://next2d.app/cn/usage/screen/align/https://next2d.app/cn/usage/screen/distribute/https://next2d.app/cn/usage/screen/layer/https://next2d.app/cn/usage/screen/tabs/https://next2d.app/cn/usage/timeline/https://next2d.app/cn/usage/timeline/custom-tweening/https://next2d.app/cn/usage/timeline/frame-keyframe/https://next2d.app/cn/usage/timeline/javascript/https://next2d.app/cn/usage/timeline/mask-layer/https://next2d.app/cn/usage/timeline/motion-tweening/https://next2d.app/cn/usage/timeline/normal-layer/https://next2d.app/cn/usage/timeline/onion-skin/https://next2d.app/cn/usage/timeline/preview/https://next2d.app/cn/usage/tool/https://next2d.app/cn/usage/tool/ellipse/https://next2d.app/cn/usage/tool/pen/https://next2d.app/cn/usage/tool/rectangle/https://next2d.app/cn/usage/tool/rounded-rectangle/https://next2d.app/cn/usage/tool/shape-transform/https://next2d.app/cn/usage/tool/text/https://next2d.app/cn/usage/tool/transform/https://next2d.app/en/https://next2d.app/en/casestudy/slimetenpuzzle/https://next2d.app/en/casestudy/worldflipper/https://next2d.app/en/privacy/https://next2d.app/en/reference/framework/animation-tool/https://next2d.app/en/reference/framework/config/https://next2d.app/en/reference/framework/routing/https://next2d.app/en/reference/framework/view/https://next2d.app/en/reference/player/display-object/https://next2d.app/en/reference/player/events/https://next2d.app/en/reference/player/filters/https://next2d.app/en/reference/player/movie-clip/https://next2d.app/en/reference/player/shape/https://next2d.app/en/reference/player/sound/https://next2d.app/en/reference/player/sprite/https://next2d.app/en/reference/player/text-field/https://next2d.app/en/reference/player/tween/https://next2d.app/en/reference/player/video/https://next2d.app/en/usage/https://next2d.app/en/usage/controller/https://next2d.app/en/usage/controller/blend-mode/https://next2d.app/en/usage/controller/color-transform/https://next2d.app/en/usage/controller/filters/https://next2d.app/en/usage/controller/frame-picker/https://next2d.app/en/usage/controller/library/https://next2d.app/en/usage/controller/object-setting/https://next2d.app/en/usage/controller/sound/https://next2d.app/en/usage/controller/stage-setting/https://next2d.app/en/usage/controller/transform/https://next2d.app/en/usage/screen/https://next2d.app/en/usage/screen/align/https://next2d.app/en/usage/screen/distribute/https://next2d.app/en/usage/screen/layer/https://next2d.app/en/usage/screen/tabs/https://next2d.app/en/usage/timeline/https://next2d.app/en/usage/timeline/custom-tweening/https://next2d.app/en/usage/timeline/frame-keyframe/https://next2d.app/en/usage/timeline/javascript/https://next2d.app/en/usage/timeline/mask-layer/https://next2d.app/en/usage/timeline/motion-tweening/https://next2d.app/en/usage/timeline/normal-layer/https://next2d.app/en/usage/timeline/onion-skin/https://next2d.app/en/usage/timeline/preview/https://next2d.app/en/usage/tool/https://next2d.app/en/usage/tool/ellipse/https://next2d.app/en/usage/tool/pen/https://next2d.app/en/usage/tool/rectangle/https://next2d.app/en/usage/tool/rounded-rectangle/https://next2d.app/en/usage/tool/shape-transform/https://next2d.app/en/usage/tool/text/https://next2d.app/en/usage/tool/transform/https://next2d.app/ja/https://next2d.app/ja/casestudy/slimetenpuzzle/https://next2d.app/ja/casestudy/worldflipper/https://next2d.app/ja/privacy/https://next2d.app/ja/reference/framework/animation-tool/https://next2d.app/ja/reference/framework/config/https://next2d.app/ja/reference/framework/routing/https://next2d.app/ja/reference/framework/view/https://next2d.app/ja/reference/player/display-object/https://next2d.app/ja/reference/player/events/https://next2d.app/ja/reference/player/filters/https://next2d.app/ja/reference/player/movie-clip/https://next2d.app/ja/reference/player/shape/https://next2d.app/ja/reference/player/sound/https://next2d.app/ja/reference/player/sprite/https://next2d.app/ja/reference/player/text-field/https://next2d.app/ja/reference/player/tween/https://next2d.app/ja/reference/player/video/https://next2d.app/ja/usage/https://next2d.app/ja/usage/controller/https://next2d.app/ja/usage/controller/blend-mode/https://next2d.app/ja/usage/controller/color-transform/https://next2d.app/ja/usage/controller/filters/https://next2d.app/ja/usage/controller/frame-picker/https://next2d.app/ja/usage/controller/library/https://next2d.app/ja/usage/controller/object-setting/https://next2d.app/ja/usage/controller/sound/https://next2d.app/ja/usage/controller/stage-setting/https://next2d.app/ja/usage/controller/transform/https://next2d.app/ja/usage/screen/https://next2d.app/ja/usage/screen/align/https://next2d.app/ja/usage/screen/distribute/https://next2d.app/ja/usage/screen/layer/https://next2d.app/ja/usage/screen/tabs/https://next2d.app/ja/usage/timeline/https://next2d.app/ja/usage/timeline/custom-tweening/https://next2d.app/ja/usage/timeline/frame-keyframe/https://next2d.app/ja/usage/timeline/javascript/https://next2d.app/ja/usage/timeline/mask-layer/https://next2d.app/ja/usage/timeline/motion-tweening/https://next2d.app/ja/usage/timeline/normal-layer/https://next2d.app/ja/usage/timeline/onion-skin/https://next2d.app/ja/usage/timeline/preview/https://next2d.app/ja/usage/tool/https://next2d.app/ja/usage/tool/ellipse/https://next2d.app/ja/usage/tool/pen/https://next2d.app/ja/usage/tool/rectangle/https://next2d.app/ja/usage/tool/rounded-rectangle/https://next2d.app/ja/usage/tool/shape-transform/https://next2d.app/ja/usage/tool/text/https://next2d.app/ja/usage/tool/transform/ \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ba1139d1..535cb033 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,35 @@ { "name": "next2d-web-site", - "version": "2.0.1", + "version": "2.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "next2d-web-site", - "version": "2.0.1", + "version": "2.0.2", "license": "Next2D", "dependencies": { - "@astrojs/sitemap": "^3.7.0", + "@astrojs/sitemap": "^3.7.1", "aos": "^2.3.4", - "astro": "^5.18.0", + "astro": "^6.0.3", "bootstrap": "^5.3.8", "bootstrap-icons": "^1.13.1", "unist-util-visit": "^5.1.0" }, "devDependencies": { - "@astrojs/check": "^0.9.6", + "@astrojs/check": "^0.9.7", "typescript": "^5.9.3" } }, "node_modules/@astrojs/check": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/@astrojs/check/-/check-0.9.6.tgz", - "integrity": "sha512-jlaEu5SxvSgmfGIFfNgcn5/f+29H61NJzEMfAZ82Xopr4XBchXB1GVlcJsE+elUlsYSbXlptZLX+JMG3b/wZEA==", + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/@astrojs/check/-/check-0.9.7.tgz", + "integrity": "sha512-dA7U5/OFg8/xaMUb2vUOOJuuJXnMpHy6F0BM8ZhL7WT5OkTBwJ0GoW38n4fC4CXt+lT9mLWL0y8Pa74tFByBpQ==", "dev": true, "license": "MIT", "dependencies": { "@astrojs/language-server": "^2.16.1", - "chokidar": "^4.0.1", + "chokidar": "^4.0.3", "kleur": "^4.1.5", "yargs": "^17.7.2" }, @@ -44,28 +44,32 @@ "version": "2.13.1", "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.13.1.tgz", "integrity": "sha512-f3FN83d2G/v32ipNClRKgYv30onQlMZX1vCeZMjPsMMPl1mDpmbl0+N5BYo4S/ofzqJyS5hvwacEo0CCVDn/Qg==", + "dev": true, "license": "MIT" }, "node_modules/@astrojs/internal-helpers": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.7.5.tgz", - "integrity": "sha512-vreGnYSSKhAjFJCWAwe/CNhONvoc5lokxtRoZims+0wa3KbHBdPHSSthJsKxPd8d/aic6lWKpRTYGY/hsgK6EA==", - "license": "MIT" + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.8.0.tgz", + "integrity": "sha512-J56GrhEiV+4dmrGLPNOl2pZjpHXAndWVyiVDYGDuw6MWKpBSEMLdFxHzeM/6sqaknw9M+HFfHZAcvi3OfT3D/w==", + "license": "MIT", + "dependencies": { + "picomatch": "^4.0.3" + } }, "node_modules/@astrojs/language-server": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/@astrojs/language-server/-/language-server-2.16.3.tgz", - "integrity": "sha512-yO5K7RYCMXUfeDlnU6UnmtnoXzpuQc0yhlaCNZ67k1C/MiwwwvMZz+LGa+H35c49w5QBfvtr4w4Zcf5PcH8uYA==", + "version": "2.16.4", + "resolved": "https://registry.npmjs.org/@astrojs/language-server/-/language-server-2.16.4.tgz", + "integrity": "sha512-42oqz9uX+hU1/rFniJvtYW9FbfZJ6syM2fYZFi7Ub71/kOvF1GSeMS8sA3Ogs3iOeNUWefk/ImwBiiHeNmJfSA==", "dev": true, "license": "MIT", "dependencies": { - "@astrojs/compiler": "^2.13.0", - "@astrojs/yaml2ts": "^0.2.2", + "@astrojs/compiler": "^2.13.1", + "@astrojs/yaml2ts": "^0.2.3", "@jridgewell/sourcemap-codec": "^1.5.5", - "@volar/kit": "~2.4.27", - "@volar/language-core": "~2.4.27", - "@volar/language-server": "~2.4.27", - "@volar/language-service": "~2.4.27", + "@volar/kit": "~2.4.28", + "@volar/language-core": "~2.4.28", + "@volar/language-server": "~2.4.28", + "@volar/language-service": "~2.4.28", "muggle-string": "^0.4.1", "tinyglobby": "^0.2.15", "volar-service-css": "0.0.68", @@ -95,17 +99,16 @@ } }, "node_modules/@astrojs/markdown-remark": { - "version": "6.3.10", - "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-6.3.10.tgz", - "integrity": "sha512-kk4HeYR6AcnzC4QV8iSlOfh+N8TZ3MEStxPyenyCtemqn8IpEATBFMTJcfrNW32dgpt6MY3oCkMM/Tv3/I4G3A==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-7.0.0.tgz", + "integrity": "sha512-jTAXHPy45L7o1ljH4jYV+ShtOHtyQUa1mGp3a5fJp1soX8lInuTJQ6ihmldHzVM4Q7QptU4SzIDIcKbBJO7sXQ==", "license": "MIT", "dependencies": { - "@astrojs/internal-helpers": "0.7.5", - "@astrojs/prism": "3.3.0", + "@astrojs/internal-helpers": "0.8.0", + "@astrojs/prism": "4.0.0", "github-slugger": "^2.0.0", "hast-util-from-html": "^2.0.3", "hast-util-to-text": "^4.0.2", - "import-meta-resolve": "^4.2.0", "js-yaml": "^4.1.1", "mdast-util-definitions": "^6.0.0", "rehype-raw": "^7.0.0", @@ -114,36 +117,36 @@ "remark-parse": "^11.0.0", "remark-rehype": "^11.1.2", "remark-smartypants": "^3.0.2", - "shiki": "^3.19.0", - "smol-toml": "^1.5.2", + "shiki": "^4.0.0", + "smol-toml": "^1.6.0", "unified": "^11.0.5", "unist-util-remove-position": "^5.0.0", - "unist-util-visit": "^5.0.0", + "unist-util-visit": "^5.1.0", "unist-util-visit-parents": "^6.0.2", "vfile": "^6.0.3" } }, "node_modules/@astrojs/prism": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-3.3.0.tgz", - "integrity": "sha512-q8VwfU/fDZNoDOf+r7jUnMC2//H2l0TuQ6FkGJL8vD8nw/q5KiL3DS1KKBI3QhI9UQhpJ5dc7AtqfbXWuOgLCQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-4.0.0.tgz", + "integrity": "sha512-NndtNPpxaGinRpRytljGBvYHpTOwHycSZ/c+lQi5cHvkqqrHKWdkPEhImlODBNmbuB+vyQUNUDXyjzt66CihJg==", "license": "MIT", "dependencies": { "prismjs": "^1.30.0" }, "engines": { - "node": "18.20.8 || ^20.3.0 || >=22.0.0" + "node": "^20.19.1 || >=22.12.0" } }, "node_modules/@astrojs/sitemap": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.7.0.tgz", - "integrity": "sha512-+qxjUrz6Jcgh+D5VE1gKUJTA3pSthuPHe6Ao5JCxok794Lewx8hBFaWHtOnN0ntb2lfOf7gvOi9TefUswQ/ZVA==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.7.1.tgz", + "integrity": "sha512-IzQqdTeskaMX+QDZCzMuJIp8A8C1vgzMBp/NmHNnadepHYNHcxQdGLQZYfkbd2EbRXUfOS+UDIKx8sKg0oWVdw==", "license": "MIT", "dependencies": { - "sitemap": "^8.0.2", + "sitemap": "^9.0.0", "stream-replace-string": "^2.0.0", - "zod": "^3.25.76" + "zod": "^4.3.6" } }, "node_modules/@astrojs/telemetry": { @@ -165,13 +168,13 @@ } }, "node_modules/@astrojs/yaml2ts": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@astrojs/yaml2ts/-/yaml2ts-0.2.2.tgz", - "integrity": "sha512-GOfvSr5Nqy2z5XiwqTouBBpy5FyI6DEe+/g/Mk5am9SjILN1S5fOEvYK0GuWHg98yS/dobP4m8qyqw/URW35fQ==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@astrojs/yaml2ts/-/yaml2ts-0.2.3.tgz", + "integrity": "sha512-PJzRmgQzUxI2uwpdX2lXSHtP4G8ocp24/t+bZyf5Fy0SZLSF9f9KXZoMlFM/XCGue+B0nH/2IZ7FpBYQATBsCg==", "dev": true, "license": "MIT", "dependencies": { - "yaml": "^2.5.0" + "yaml": "^2.8.2" } }, "node_modules/@babel/helper-string-parser": { @@ -232,6 +235,25 @@ "node": ">=18" } }, + "node_modules/@clack/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@clack/core/-/core-1.1.0.tgz", + "integrity": "sha512-SVcm4Dqm2ukn64/8Gub2wnlA5nS2iWJyCkdNHcvNHPIeBTGojpdJ+9cZKwLfmqy7irD4N5qLteSilJlE0WLAtA==", + "license": "MIT", + "dependencies": { + "sisteransi": "^1.0.5" + } + }, + "node_modules/@clack/prompts": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-1.1.0.tgz", + "integrity": "sha512-pkqbPGtohJAvm4Dphs2M8xE29ggupihHdy1x84HNojZuMtFsHiUlRvqD24tM2+XmI+61LlfNceM3Wr7U5QES5g==", + "license": "MIT", + "dependencies": { + "@clack/core": "1.1.0", + "sisteransi": "^1.0.5" + } + }, "node_modules/@emmetio/abbreviation": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/@emmetio/abbreviation/-/abbreviation-2.3.3.tgz", @@ -295,9 +317,9 @@ "license": "MIT" }, "node_modules/@emnapi/runtime": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.8.1.tgz", - "integrity": "sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.0.tgz", + "integrity": "sha512-QN75eB0IH2ywSpRpNddCRfQIhmJYBCJ1x5Lb3IscKAL8bMnVAKnRg8dCoXbHzVLLH7P38N2Z3mtulB7W0J0FKw==", "license": "MIT", "optional": true, "dependencies": { @@ -1231,12 +1253,6 @@ } } }, - "node_modules/@rollup/pluginutils/node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "license": "MIT" - }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.59.0", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz", @@ -1563,64 +1579,97 @@ ] }, "node_modules/@shikijs/core": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.23.0.tgz", - "integrity": "sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.0.2.tgz", + "integrity": "sha512-hxT0YF4ExEqB8G/qFdtJvpmHXBYJ2lWW7qTHDarVkIudPFE6iCIrqdgWxGn5s+ppkGXI0aEGlibI0PAyzP3zlw==", "license": "MIT", "dependencies": { - "@shikijs/types": "3.23.0", + "@shikijs/primitive": "4.0.2", + "@shikijs/types": "4.0.2", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.5" + }, + "engines": { + "node": ">=20" } }, "node_modules/@shikijs/engine-javascript": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.23.0.tgz", - "integrity": "sha512-aHt9eiGFobmWR5uqJUViySI1bHMqrAgamWE1TYSUoftkAeCCAiGawPMwM+VCadylQtF4V3VNOZ5LmfItH5f3yA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-4.0.2.tgz", + "integrity": "sha512-7PW0Nm49DcoUIQEXlJhNNBHyoGMjalRETTCcjMqEaMoJRLljy1Bi/EGV3/qLBgLKQejdspiiYuHGQW6dX94Nag==", "license": "MIT", "dependencies": { - "@shikijs/types": "3.23.0", + "@shikijs/types": "4.0.2", "@shikijs/vscode-textmate": "^10.0.2", "oniguruma-to-es": "^4.3.4" + }, + "engines": { + "node": ">=20" } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.23.0.tgz", - "integrity": "sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-4.0.2.tgz", + "integrity": "sha512-UpCB9Y2sUKlS9z8juFSKz7ZtysmeXCgnRF0dlhXBkmQnek7lAToPte8DkxmEYGNTMii72zU/lyXiCB6StuZeJg==", "license": "MIT", "dependencies": { - "@shikijs/types": "3.23.0", + "@shikijs/types": "4.0.2", "@shikijs/vscode-textmate": "^10.0.2" + }, + "engines": { + "node": ">=20" } }, "node_modules/@shikijs/langs": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.23.0.tgz", - "integrity": "sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-4.0.2.tgz", + "integrity": "sha512-KaXby5dvoeuZzN0rYQiPMjFoUrz4hgwIE+D6Du9owcHcl6/g16/yT5BQxSW5cGt2MZBz6Hl0YuRqf12omRfUUg==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "4.0.2" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/primitive": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/primitive/-/primitive-4.0.2.tgz", + "integrity": "sha512-M6UMPrSa3fN5ayeJwFVl9qWofl273wtK1VG8ySDZ1mQBfhCpdd8nEx7nPZ/tk7k+TYcpqBZzj/AnwxT9lO+HJw==", "license": "MIT", "dependencies": { - "@shikijs/types": "3.23.0" + "@shikijs/types": "4.0.2", + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.4" + }, + "engines": { + "node": ">=20" } }, "node_modules/@shikijs/themes": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.23.0.tgz", - "integrity": "sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-4.0.2.tgz", + "integrity": "sha512-mjCafwt8lJJaVSsQvNVrJumbnnj1RI8jbUKrPKgE6E3OvQKxnuRoBaYC51H4IGHePsGN/QtALglWBU7DoKDFnA==", "license": "MIT", "dependencies": { - "@shikijs/types": "3.23.0" + "@shikijs/types": "4.0.2" + }, + "engines": { + "node": ">=20" } }, "node_modules/@shikijs/types": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.23.0.tgz", - "integrity": "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-4.0.2.tgz", + "integrity": "sha512-qzbeRooUTPnLE+sHD/Z8DStmaDgnbbc/pMrU203950aRqjX/6AFHeDYT+j00y2lPdz0ywJKx7o/7qnqTivtlXg==", "license": "MIT", "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" + }, + "engines": { + "node": ">=20" } }, "node_modules/@shikijs/vscode-textmate": { @@ -1678,12 +1727,12 @@ } }, "node_modules/@types/node": { - "version": "25.3.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.3.tgz", - "integrity": "sha512-DpzbrH7wIcBaJibpKo9nnSQL0MTRdnWttGyE5haGwK86xgMOkFLp7vEyfQPGLOJh5wNYiJ3V9PmUMDhV9u8kkQ==", + "version": "24.12.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.0.tgz", + "integrity": "sha512-GYDxsZi3ChgmckRT9HPU0WEhKLP08ev/Yfcq2AstjrDASOYCSXeyjDsHg4v5t4jOj7cyDX3vmprafKlWIG9MXQ==", "license": "MIT", "dependencies": { - "undici-types": "~7.18.0" + "undici-types": "~7.16.0" } }, "node_modules/@types/sax": { @@ -1805,18 +1854,6 @@ "dev": true, "license": "MIT" }, - "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/ajv": { "version": "8.18.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", @@ -1849,75 +1886,27 @@ } } }, - "node_modules/ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "license": "ISC", - "dependencies": { - "string-width": "^4.1.0" - } - }, - "node_modules/ansi-align/node_modules/ansi-regex": { + "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/ansi-align/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/ansi-align/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-align/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1" + "color-convert": "^2.0.1" }, "engines": { "node": ">=8" - } - }, - "node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "license": "MIT", - "engines": { - "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" @@ -1991,80 +1980,72 @@ } }, "node_modules/astro": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/astro/-/astro-5.18.0.tgz", - "integrity": "sha512-CHiohwJIS4L0G6/IzE1Fx3dgWqXBCXus/od0eGUfxrZJD2um2pE7ehclMmgL/fXqbU7NfE1Ze2pq34h2QaA6iQ==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/astro/-/astro-6.0.3.tgz", + "integrity": "sha512-M0s9KMmGeaLQPB0shVNqr3ZypEXBDFE/VsexBoA0nWVFwr84BnGxffXH8LG0KPxnVTRwpC3/zPjllVAlRLYJuw==", "license": "MIT", "dependencies": { - "@astrojs/compiler": "^2.13.0", - "@astrojs/internal-helpers": "0.7.5", - "@astrojs/markdown-remark": "6.3.10", + "@astrojs/compiler": "^3.0.0", + "@astrojs/internal-helpers": "0.8.0", + "@astrojs/markdown-remark": "7.0.0", "@astrojs/telemetry": "3.3.0", "@capsizecss/unpack": "^4.0.0", + "@clack/prompts": "^1.0.1", "@oslojs/encoding": "^1.1.0", "@rollup/pluginutils": "^5.3.0", - "acorn": "^8.15.0", "aria-query": "^5.3.2", "axobject-query": "^4.1.0", - "boxen": "8.0.1", - "ci-info": "^4.3.1", + "ci-info": "^4.4.0", "clsx": "^2.1.1", - "common-ancestor-path": "^1.0.1", + "common-ancestor-path": "^2.0.0", "cookie": "^1.1.1", - "cssesc": "^3.0.0", - "debug": "^4.4.3", - "deterministic-object-hash": "^2.0.2", - "devalue": "^5.6.2", + "devalue": "^5.6.3", "diff": "^8.0.3", "dlv": "^1.1.3", "dset": "^3.1.4", - "es-module-lexer": "^1.7.0", + "es-module-lexer": "^2.0.0", "esbuild": "^0.27.3", - "estree-walker": "^3.0.3", "flattie": "^1.1.1", - "fontace": "~0.4.0", + "fontace": "~0.4.1", "github-slugger": "^2.0.0", "html-escaper": "3.0.3", "http-cache-semantics": "^4.2.0", - "import-meta-resolve": "^4.2.0", "js-yaml": "^4.1.1", "magic-string": "^0.30.21", - "magicast": "^0.5.1", + "magicast": "^0.5.2", "mrmime": "^2.0.1", "neotraverse": "^0.6.18", - "p-limit": "^6.2.0", - "p-queue": "^8.1.1", + "obug": "^2.1.1", + "p-limit": "^7.3.0", + "p-queue": "^9.1.0", "package-manager-detector": "^1.6.0", "piccolore": "^0.1.3", "picomatch": "^4.0.3", - "prompts": "^2.4.2", "rehype": "^13.0.2", - "semver": "^7.7.3", - "shiki": "^3.21.0", + "semver": "^7.7.4", + "shiki": "^4.0.0", "smol-toml": "^1.6.0", "svgo": "^4.0.0", + "tinyclip": "^0.1.6", "tinyexec": "^1.0.2", "tinyglobby": "^0.2.15", "tsconfck": "^3.1.6", "ultrahtml": "^1.6.0", - "unifont": "~0.7.3", - "unist-util-visit": "^5.0.0", + "unifont": "~0.7.4", + "unist-util-visit": "^5.1.0", "unstorage": "^1.17.4", "vfile": "^6.0.3", - "vite": "^6.4.1", - "vitefu": "^1.1.1", + "vite": "^7.3.1", + "vitefu": "^1.1.2", "xxhash-wasm": "^1.1.0", - "yargs-parser": "^21.1.1", - "yocto-spinner": "^0.2.3", - "zod": "^3.25.76", - "zod-to-json-schema": "^3.25.1", - "zod-to-ts": "^1.2.0" + "yargs-parser": "^22.0.0", + "zod": "^4.3.6" }, "bin": { - "astro": "astro.js" + "astro": "bin/astro.mjs" }, "engines": { - "node": "18.20.8 || ^20.3.0 || >=22.0.0", + "node": "^20.19.1 || >=22.12.0", "npm": ">=9.6.5", "pnpm": ">=7.1.0" }, @@ -2076,6 +2057,12 @@ "sharp": "^0.34.0" } }, + "node_modules/astro/node_modules/@astrojs/compiler": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-3.0.0.tgz", + "integrity": "sha512-MwAbDE5mawZ1SS+D8qWiHdprdME5Tlj2e0YjxnEICvcOpbSukNS7Sa7hA5PK+6RrmUr/t6Gi5YgrdZKjbO/WPQ==", + "license": "MIT" + }, "node_modules/axobject-query": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", @@ -2095,12 +2082,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/base-64": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz", - "integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==", - "license": "MIT" - }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -2142,40 +2123,6 @@ ], "license": "MIT" }, - "node_modules/boxen": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-8.0.1.tgz", - "integrity": "sha512-F3PH5k5juxom4xktynS7MoFY+NUWH5LC4CnH11YB8NPew+HLpmBLCybSAEyb2F+4pRXhuhWqFesoQd6DAyc2hw==", - "license": "MIT", - "dependencies": { - "ansi-align": "^3.0.1", - "camelcase": "^8.0.0", - "chalk": "^5.3.0", - "cli-boxes": "^3.0.0", - "string-width": "^7.2.0", - "type-fest": "^4.21.0", - "widest-line": "^5.0.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/camelcase": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz", - "integrity": "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==", - "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ccount": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", @@ -2186,18 +2133,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/chalk": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", - "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/character-entities": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", @@ -2265,18 +2200,6 @@ "integrity": "sha512-GzIjNdcEtH4ieA2S8NmrSxv7DfEV5fmixQeyTmqmRmRJPGpRBaSnA2a0VrCjyT8iW8JjEdMbKzDotAJf+ajgaQ==", "license": "Unlicense" }, - "node_modules/cli-boxes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", - "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -2292,85 +2215,6 @@ "node": ">=12" } }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/clsx": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", @@ -2420,10 +2264,13 @@ } }, "node_modules/common-ancestor-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", - "integrity": "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==", - "license": "ISC" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-2.0.0.tgz", + "integrity": "sha512-dnN3ibLeoRf2HNC+OlCiNc5d2zxbLJXOtiZUudNFSXZrNSydxcCsSpRzXwfu7BBWCIfHPw+xTayeBvJCP/D8Ng==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">= 18" + } }, "node_modules/cookie": { "version": "1.1.1", @@ -2470,13 +2317,13 @@ } }, "node_modules/css-tree": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.1.0.tgz", - "integrity": "sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz", + "integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==", "license": "MIT", "dependencies": { - "mdn-data": "2.12.2", - "source-map-js": "^1.0.1" + "mdn-data": "2.27.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" @@ -2494,22 +2341,10 @@ "url": "https://github.com/sponsors/fb55" } }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "license": "MIT", - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/csso": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", - "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", + "node_modules/csso": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", + "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", "license": "MIT", "dependencies": { "css-tree": "~2.2.0" @@ -2600,22 +2435,10 @@ "node": ">=8" } }, - "node_modules/deterministic-object-hash": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/deterministic-object-hash/-/deterministic-object-hash-2.0.2.tgz", - "integrity": "sha512-KxektNH63SrbfUyDiwXqRb1rLwKt33AmMv+5Nhsw1kqZ13SJBRTgZHtGbE+hH3a1mVW1cz+4pqSWVPAtLVXTzQ==", - "license": "MIT", - "dependencies": { - "base-64": "^1.0.0" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/devalue": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.6.3.tgz", - "integrity": "sha512-nc7XjUU/2Lb+SvEFVGcWLiKkzfw8+qHI7zn8WYXKkLMgfGSHbgCEaR6bJpev8Cm6Rmrb19Gfd/tZvGqx9is3wg==", + "version": "5.6.4", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.6.4.tgz", + "integrity": "sha512-Gp6rDldRsFh/7XuouDbxMH3Mx8GMCcgzIb1pDTvNyn8pZGQ22u+Wa+lGV9dQCltFQ7uVw0MhRyb8XDskNFOReA==", "license": "MIT" }, "node_modules/devlop": { @@ -2740,9 +2563,10 @@ } }, "node_modules/emoji-regex": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, "license": "MIT" }, "node_modules/entities": { @@ -2758,9 +2582,9 @@ } }, "node_modules/es-module-lexer": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", - "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.0.0.tgz", + "integrity": "sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==", "license": "MIT" }, "node_modules/esbuild": { @@ -2827,13 +2651,10 @@ } }, "node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" }, "node_modules/eventemitter3": { "version": "5.0.4", @@ -2907,9 +2728,9 @@ } }, "node_modules/fontkitten": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/fontkitten/-/fontkitten-1.0.2.tgz", - "integrity": "sha512-piJxbLnkD9Xcyi7dWJRnqszEURixe7CrF/efBfbffe2DPyabmuIuqraruY8cXTs19QoM8VJzx47BDRVNXETM7Q==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/fontkitten/-/fontkitten-1.0.3.tgz", + "integrity": "sha512-Wp1zXWPVUPBmfoa3Cqc9ctaKuzKAV6uLstRqlR56kSjplf5uAce+qeyYym7F+PHbGTk+tCEdkCW6RD7DX/gBZw==", "license": "MIT", "dependencies": { "tiny-inflate": "^1.0.3" @@ -2942,18 +2763,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-east-asian-width": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz", - "integrity": "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/github-slugger": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz", @@ -2961,9 +2770,9 @@ "license": "ISC" }, "node_modules/h3": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.5.tgz", - "integrity": "sha512-xEyq3rSl+dhGX2Lm0+eFQIAzlDN6Fs0EcC4f7BNUmzaRX/PTzeuM+Tr2lHB8FoXggsQIeXLj8EDVgs5ywxyxmg==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.6.tgz", + "integrity": "sha512-oi15ESLW5LRthZ+qPCi5GNasY/gvynSKUQxgiovrY63bPAtG59wtM+LSrlcwvOHAXzGrXVLnI97brbkdPF9WoQ==", "license": "MIT", "dependencies": { "cookie-es": "^1.2.2", @@ -3176,16 +2985,6 @@ "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", "license": "BSD-2-Clause" }, - "node_modules/import-meta-resolve": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz", - "integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/iron-webcrypto": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz", @@ -3214,6 +3013,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -3594,9 +3394,9 @@ } }, "node_modules/mdn-data": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.12.2.tgz", - "integrity": "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==", + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz", + "integrity": "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==", "license": "CC0-1.0" }, "node_modules/micromark": { @@ -4257,6 +4057,16 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/obug": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", + "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==", + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT" + }, "node_modules/ofetch": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.5.1.tgz", @@ -4292,43 +4102,43 @@ } }, "node_modules/p-limit": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-6.2.0.tgz", - "integrity": "sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-7.3.0.tgz", + "integrity": "sha512-7cIXg/Z0M5WZRblrsOla88S4wAK+zOQQWeBYfV3qJuJXMr+LnbYjaadrFaS0JILfEDPVqHyKnZ1Z/1d6J9VVUw==", "license": "MIT", "dependencies": { - "yocto-queue": "^1.1.1" + "yocto-queue": "^1.2.1" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-queue": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-8.1.1.tgz", - "integrity": "sha512-aNZ+VfjobsWryoiPnEApGGmf5WmNsCo9xu8dfaYamG5qaLP7ClhLN6NgsFe6SwJ2UbLEBK5dv9x8Mn5+RVhMWQ==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-9.1.0.tgz", + "integrity": "sha512-O/ZPaXuQV29uSLbxWBGGZO1mCQXV2BLIwUr59JUU9SoH76mnYvtms7aafH/isNSNGwuEfP6W/4xD0/TJXxrizw==", "license": "MIT", "dependencies": { "eventemitter3": "^5.0.1", - "p-timeout": "^6.1.2" + "p-timeout": "^7.0.0" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-timeout": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.1.4.tgz", - "integrity": "sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-7.0.1.tgz", + "integrity": "sha512-AxTM2wDGORHGEkPCt8yqxOTMgpfbEHqF51f/5fJCmwFC3C/zNcGT63SymH2ttOAaiIws2zVg4+izQCjrakcwHg==", "license": "MIT", "engines": { - "node": ">=14.16" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4402,9 +4212,9 @@ } }, "node_modules/postcss": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", - "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "version": "8.5.8", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", + "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", "funding": [ { "type": "opencollective", @@ -4454,28 +4264,6 @@ "node": ">=6" } }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/prompts/node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/property-information": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz", @@ -4805,9 +4593,9 @@ } }, "node_modules/sax": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.4.tgz", - "integrity": "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.5.0.tgz", + "integrity": "sha512-21IYA3Q5cQf089Z6tgaUTr7lDAyzoTPx5HRtbhsME8Udispad8dC/+sziTNugOEx54ilvatQ9YCzl4KQLPcRHA==", "license": "BlueOak-1.0.0", "engines": { "node": ">=11.0.0" @@ -4871,19 +4659,22 @@ } }, "node_modules/shiki": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-3.23.0.tgz", - "integrity": "sha512-55Dj73uq9ZXL5zyeRPzHQsK7Nbyt6Y10k5s7OjuFZGMhpp4r/rsLBH0o/0fstIzX1Lep9VxefWljK/SKCzygIA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-4.0.2.tgz", + "integrity": "sha512-eAVKTMedR5ckPo4xne/PjYQYrU3qx78gtJZ+sHlXEg5IHhhoQhMfZVzetTYuaJS0L2Ef3AcCRzCHV8T0WI6nIQ==", "license": "MIT", "dependencies": { - "@shikijs/core": "3.23.0", - "@shikijs/engine-javascript": "3.23.0", - "@shikijs/engine-oniguruma": "3.23.0", - "@shikijs/langs": "3.23.0", - "@shikijs/themes": "3.23.0", - "@shikijs/types": "3.23.0", + "@shikijs/core": "4.0.2", + "@shikijs/engine-javascript": "4.0.2", + "@shikijs/engine-oniguruma": "4.0.2", + "@shikijs/langs": "4.0.2", + "@shikijs/themes": "4.0.2", + "@shikijs/types": "4.0.2", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" + }, + "engines": { + "node": ">=20" } }, "node_modules/sisteransi": { @@ -4893,30 +4684,24 @@ "license": "MIT" }, "node_modules/sitemap": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-8.0.3.tgz", - "integrity": "sha512-9Ew1tR2WYw8RGE2XLy7GjkusvYXy8Rg6y8TYuBuQMfIEdGcWoJpY2Wr5DzsEiL/TKCw56+YKTCCUHglorEYK+A==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-9.0.1.tgz", + "integrity": "sha512-S6hzjGJSG3d6if0YoF5kTyeRJvia6FSTBroE5fQ0bu1QNxyJqhhinfUsXi9fH3MgtXODWvwo2BDyQSnhPQ88uQ==", "license": "MIT", "dependencies": { - "@types/node": "^17.0.5", + "@types/node": "^24.9.2", "@types/sax": "^1.2.1", "arg": "^5.0.0", "sax": "^1.4.1" }, "bin": { - "sitemap": "dist/cli.js" + "sitemap": "dist/esm/cli.js" }, "engines": { - "node": ">=14.0.0", - "npm": ">=6.0.0" + "node": ">=20.19.5", + "npm": ">=10.8.2" } }, - "node_modules/sitemap/node_modules/@types/node": { - "version": "17.0.45", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", - "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", - "license": "MIT" - }, "node_modules/smol-toml": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.0.tgz", @@ -4955,20 +4740,18 @@ "license": "MIT" }, "node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "license": "MIT", "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/stringify-entities": { @@ -4986,24 +4769,22 @@ } }, "node_modules/strip-ansi": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", - "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.2.2" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "node": ">=8" } }, "node_modules/svgo": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-4.0.0.tgz", - "integrity": "sha512-VvrHQ+9uniE+Mvx3+C9IEe/lWasXCU0nXMY2kZeLrHNICuRiC8uMPyM14UEaMOFA5mhyQqEkB02VoQ16n3DLaw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-4.0.1.tgz", + "integrity": "sha512-XDpWUOPC6FEibaLzjfe0ucaV0YrOjYotGJO1WpF0Zd+n6ZGEQUsSugaoLq9QkEZtAfQIxT42UChcssDVPP3+/w==", "license": "MIT", "dependencies": { "commander": "^11.1.0", @@ -5012,7 +4793,7 @@ "css-what": "^6.1.0", "csso": "^5.0.5", "picocolors": "^1.1.1", - "sax": "^1.4.1" + "sax": "^1.5.0" }, "bin": { "svgo": "bin/svgo.js" @@ -5031,6 +4812,15 @@ "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==", "license": "MIT" }, + "node_modules/tinyclip": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/tinyclip/-/tinyclip-0.1.12.tgz", + "integrity": "sha512-Ae3OVUqifDw0wBriIBS7yVaW44Dp6eSHQcyq4Igc7eN2TJH/2YsicswaW+J/OuMvhpDPOKEgpAZCjkb4hpoyeA==", + "license": "MIT", + "engines": { + "node": "^16.14.0 || >= 17.3.0" + } + }, "node_modules/tinyexec": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", @@ -5103,18 +4893,6 @@ "license": "0BSD", "optional": true }, - "node_modules/type-fest": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", - "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/typesafe-path": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/typesafe-path/-/typesafe-path-0.2.2.tgz", @@ -5126,6 +4904,7 @@ "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -5164,9 +4943,9 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", - "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", "license": "MIT" }, "node_modules/unified": { @@ -5489,23 +5268,23 @@ } }, "node_modules/vite": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", - "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz", + "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==", "license": "MIT", "dependencies": { - "esbuild": "^0.25.0", - "fdir": "^6.4.4", - "picomatch": "^4.0.2", - "postcss": "^8.5.3", - "rollup": "^4.34.9", - "tinyglobby": "^0.2.13" + "esbuild": "^0.27.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + "node": "^20.19.0 || >=22.12.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" @@ -5514,14 +5293,14 @@ "fsevents": "~2.3.3" }, "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", - "less": "*", + "less": "^4.0.0", "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" @@ -5562,548 +5341,91 @@ } } }, - "node_modules/vite/node_modules/@esbuild/aix-ppc64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", - "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/android-arm": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", - "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", - "cpu": [ - "arm" - ], + "node_modules/vitefu": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.2.tgz", + "integrity": "sha512-zpKATdUbzbsycPFBN71nS2uzBUQiVnFoOrr2rvqv34S1lcAgMKKkjWleLGeiJlZ8lwCXvtWaRn7R3ZC16SYRuw==", "license": "MIT", - "optional": true, - "os": [ - "android" + "workspaces": [ + "tests/deps/*", + "tests/projects/*", + "tests/projects/workspace/packages/*" ], - "engines": { - "node": ">=18" + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-beta.0" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } } }, - "node_modules/vite/node_modules/@esbuild/android-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", - "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", - "cpu": [ - "arm64" - ], + "node_modules/volar-service-css": { + "version": "0.0.68", + "resolved": "https://registry.npmjs.org/volar-service-css/-/volar-service-css-0.0.68.tgz", + "integrity": "sha512-lJSMh6f3QzZ1tdLOZOzovLX0xzAadPhx8EKwraDLPxBndLCYfoTvnNuiFFV8FARrpAlW5C0WkH+TstPaCxr00Q==", + "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" + "dependencies": { + "vscode-css-languageservice": "^6.3.0", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-uri": "^3.0.8" + }, + "peerDependencies": { + "@volar/language-service": "~2.4.0" + }, + "peerDependenciesMeta": { + "@volar/language-service": { + "optional": true + } } }, - "node_modules/vite/node_modules/@esbuild/android-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", - "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", - "cpu": [ - "x64" - ], + "node_modules/volar-service-emmet": { + "version": "0.0.68", + "resolved": "https://registry.npmjs.org/volar-service-emmet/-/volar-service-emmet-0.0.68.tgz", + "integrity": "sha512-nHvixrRQ83EzkQ4G/jFxu9Y4eSsXS/X2cltEPDM+K9qZmIv+Ey1w0tg1+6caSe8TU5Hgw4oSTwNMf/6cQb3LzQ==", + "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" + "dependencies": { + "@emmetio/css-parser": "^0.4.1", + "@emmetio/html-matcher": "^1.3.0", + "@vscode/emmet-helper": "^2.9.3", + "vscode-uri": "^3.0.8" + }, + "peerDependencies": { + "@volar/language-service": "~2.4.0" + }, + "peerDependenciesMeta": { + "@volar/language-service": { + "optional": true + } } }, - "node_modules/vite/node_modules/@esbuild/darwin-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", - "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", - "cpu": [ - "arm64" - ], + "node_modules/volar-service-html": { + "version": "0.0.68", + "resolved": "https://registry.npmjs.org/volar-service-html/-/volar-service-html-0.0.68.tgz", + "integrity": "sha512-fru9gsLJxy33xAltXOh4TEdi312HP80hpuKhpYQD4O5hDnkNPEBdcQkpB+gcX0oK0VxRv1UOzcGQEUzWCVHLfA==", + "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" + "dependencies": { + "vscode-html-languageservice": "^5.3.0", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-uri": "^3.0.8" + }, + "peerDependencies": { + "@volar/language-service": "~2.4.0" + }, + "peerDependenciesMeta": { + "@volar/language-service": { + "optional": true + } } }, - "node_modules/vite/node_modules/@esbuild/darwin-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", - "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", - "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/freebsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", - "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-arm": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", - "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", - "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-ia32": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", - "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-loong64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", - "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", - "cpu": [ - "loong64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-mips64el": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", - "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", - "cpu": [ - "mips64el" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-ppc64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", - "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-riscv64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", - "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-s390x": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", - "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", - "cpu": [ - "s390x" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", - "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", - "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/netbsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", - "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", - "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/openbsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", - "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", - "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/sunos-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", - "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/win32-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", - "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/win32-ia32": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", - "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/@esbuild/win32-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", - "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/vite/node_modules/esbuild": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", - "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.12", - "@esbuild/android-arm": "0.25.12", - "@esbuild/android-arm64": "0.25.12", - "@esbuild/android-x64": "0.25.12", - "@esbuild/darwin-arm64": "0.25.12", - "@esbuild/darwin-x64": "0.25.12", - "@esbuild/freebsd-arm64": "0.25.12", - "@esbuild/freebsd-x64": "0.25.12", - "@esbuild/linux-arm": "0.25.12", - "@esbuild/linux-arm64": "0.25.12", - "@esbuild/linux-ia32": "0.25.12", - "@esbuild/linux-loong64": "0.25.12", - "@esbuild/linux-mips64el": "0.25.12", - "@esbuild/linux-ppc64": "0.25.12", - "@esbuild/linux-riscv64": "0.25.12", - "@esbuild/linux-s390x": "0.25.12", - "@esbuild/linux-x64": "0.25.12", - "@esbuild/netbsd-arm64": "0.25.12", - "@esbuild/netbsd-x64": "0.25.12", - "@esbuild/openbsd-arm64": "0.25.12", - "@esbuild/openbsd-x64": "0.25.12", - "@esbuild/openharmony-arm64": "0.25.12", - "@esbuild/sunos-x64": "0.25.12", - "@esbuild/win32-arm64": "0.25.12", - "@esbuild/win32-ia32": "0.25.12", - "@esbuild/win32-x64": "0.25.12" - } - }, - "node_modules/vitefu": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.2.tgz", - "integrity": "sha512-zpKATdUbzbsycPFBN71nS2uzBUQiVnFoOrr2rvqv34S1lcAgMKKkjWleLGeiJlZ8lwCXvtWaRn7R3ZC16SYRuw==", - "license": "MIT", - "workspaces": [ - "tests/deps/*", - "tests/projects/*", - "tests/projects/workspace/packages/*" - ], - "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-beta.0" - }, - "peerDependenciesMeta": { - "vite": { - "optional": true - } - } - }, - "node_modules/volar-service-css": { - "version": "0.0.68", - "resolved": "https://registry.npmjs.org/volar-service-css/-/volar-service-css-0.0.68.tgz", - "integrity": "sha512-lJSMh6f3QzZ1tdLOZOzovLX0xzAadPhx8EKwraDLPxBndLCYfoTvnNuiFFV8FARrpAlW5C0WkH+TstPaCxr00Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "vscode-css-languageservice": "^6.3.0", - "vscode-languageserver-textdocument": "^1.0.11", - "vscode-uri": "^3.0.8" - }, - "peerDependencies": { - "@volar/language-service": "~2.4.0" - }, - "peerDependenciesMeta": { - "@volar/language-service": { - "optional": true - } - } - }, - "node_modules/volar-service-emmet": { - "version": "0.0.68", - "resolved": "https://registry.npmjs.org/volar-service-emmet/-/volar-service-emmet-0.0.68.tgz", - "integrity": "sha512-nHvixrRQ83EzkQ4G/jFxu9Y4eSsXS/X2cltEPDM+K9qZmIv+Ey1w0tg1+6caSe8TU5Hgw4oSTwNMf/6cQb3LzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@emmetio/css-parser": "^0.4.1", - "@emmetio/html-matcher": "^1.3.0", - "@vscode/emmet-helper": "^2.9.3", - "vscode-uri": "^3.0.8" - }, - "peerDependencies": { - "@volar/language-service": "~2.4.0" - }, - "peerDependenciesMeta": { - "@volar/language-service": { - "optional": true - } - } - }, - "node_modules/volar-service-html": { - "version": "0.0.68", - "resolved": "https://registry.npmjs.org/volar-service-html/-/volar-service-html-0.0.68.tgz", - "integrity": "sha512-fru9gsLJxy33xAltXOh4TEdi312HP80hpuKhpYQD4O5hDnkNPEBdcQkpB+gcX0oK0VxRv1UOzcGQEUzWCVHLfA==", - "dev": true, - "license": "MIT", - "dependencies": { - "vscode-html-languageservice": "^5.3.0", - "vscode-languageserver-textdocument": "^1.0.11", - "vscode-uri": "^3.0.8" - }, - "peerDependencies": { - "@volar/language-service": "~2.4.0" - }, - "peerDependenciesMeta": { - "@volar/language-service": { - "optional": true - } - } - }, - "node_modules/volar-service-prettier": { - "version": "0.0.68", - "resolved": "https://registry.npmjs.org/volar-service-prettier/-/volar-service-prettier-0.0.68.tgz", - "integrity": "sha512-grUmWHkHlebMOd6V8vXs2eNQUw/bJGJMjekh/EPf/p2ZNTK0Uyz7hoBRngcvGfJHMsSXZH8w/dZTForIW/4ihw==", - "dev": true, + "node_modules/volar-service-prettier": { + "version": "0.0.68", + "resolved": "https://registry.npmjs.org/volar-service-prettier/-/volar-service-prettier-0.0.68.tgz", + "integrity": "sha512-grUmWHkHlebMOd6V8vXs2eNQUw/bJGJMjekh/EPf/p2ZNTK0Uyz7hoBRngcvGfJHMsSXZH8w/dZTForIW/4ihw==", + "dev": true, "license": "MIT", "dependencies": { "vscode-uri": "^3.0.8" @@ -6312,33 +5634,19 @@ "node": ">=4" } }, - "node_modules/widest-line": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-5.0.0.tgz", - "integrity": "sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA==", - "license": "MIT", - "dependencies": { - "string-width": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/wrap-ansi": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", - "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=18" + "node": ">=10" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" @@ -6440,57 +5748,22 @@ } }, "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", "license": "ISC", "engines": { - "node": ">=12" + "node": "^20.19.0 || ^22.12.0 || >=23" } }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/yargs/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, + "license": "ISC", "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/yocto-queue": { @@ -6505,60 +5778,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yocto-spinner": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/yocto-spinner/-/yocto-spinner-0.2.3.tgz", - "integrity": "sha512-sqBChb33loEnkoXte1bLg45bEBsOP9N1kzQh5JZNKj/0rik4zAPTNSAVPj3uQAdc6slYJ0Ksc403G2XgxsJQFQ==", - "license": "MIT", - "dependencies": { - "yoctocolors": "^2.1.1" - }, - "engines": { - "node": ">=18.19" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yoctocolors": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.2.tgz", - "integrity": "sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", + "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" } }, - "node_modules/zod-to-json-schema": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz", - "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==", - "license": "ISC", - "peerDependencies": { - "zod": "^3.25 || ^4" - } - }, - "node_modules/zod-to-ts": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/zod-to-ts/-/zod-to-ts-1.2.0.tgz", - "integrity": "sha512-x30XE43V+InwGpvTySRNz9kB7qFU8DlyEy7BsSTCHPH1R0QasMmHWZDCzYm6bVXtj/9NNJAZF3jW8rzFvH5OFA==", - "peerDependencies": { - "typescript": "^4.9.4 || ^5.0.2", - "zod": "^3" - } - }, "node_modules/zwitch": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", diff --git a/package.json b/package.json index 557601d9..d8a5aaaa 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "next2d-web-site", "type": "module", "description": "Next2D project provides a WebGL/WebGPU 2D rendering engine, animation tools for creating animations, and a framework to support team development.", - "version": "2.0.1", + "version": "2.0.2", "author": "Toshiyuki Ienaga", "license": "Next2D", "scripts": { @@ -12,15 +12,15 @@ "astro": "astro" }, "dependencies": { - "@astrojs/sitemap": "^3.7.0", + "@astrojs/sitemap": "^3.7.1", "aos": "^2.3.4", - "astro": "^5.18.0", + "astro": "^6.0.3", "bootstrap": "^5.3.8", "bootstrap-icons": "^1.13.1", "unist-util-visit": "^5.1.0" }, "devDependencies": { - "@astrojs/check": "^0.9.6", + "@astrojs/check": "^0.9.7", "typescript": "^5.9.3" }, "overrides": { diff --git a/src/content.config.ts b/src/content.config.ts new file mode 100644 index 00000000..aad90525 --- /dev/null +++ b/src/content.config.ts @@ -0,0 +1,25 @@ +import { defineCollection, z } from 'astro:content'; +import { glob } from 'astro/loaders'; + +const playerSpecsCollection = defineCollection({ + loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/player-specs' }), + schema: z.object({ + title: z.string().optional(), + description: z.string().optional(), + order: z.number().optional() + }).optional() +}); + +const frameworkSpecsCollection = defineCollection({ + loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/framework-specs' }), + schema: z.object({ + title: z.string().optional(), + description: z.string().optional(), + order: z.number().optional() + }).optional() +}); + +export const collections = { + 'player-specs': playerSpecsCollection, + 'framework-specs': frameworkSpecsCollection +}; diff --git a/src/content/config.ts b/src/content/config.ts deleted file mode 100644 index 1e9be7c2..00000000 --- a/src/content/config.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { defineCollection, z } from 'astro:content'; - -const specsCollection = defineCollection({ - type: 'content', - schema: z.object({ - title: z.string().optional(), - description: z.string().optional(), - order: z.number().optional() - }).optional() -}); - -export const collections = { - 'player-specs': specsCollection, - 'framework-specs': specsCollection -}; diff --git a/src/pages/[lang]/reference/framework/[...slug].astro b/src/pages/[lang]/reference/framework/[...slug].astro index f8c4f807..9f86e2d7 100644 --- a/src/pages/[lang]/reference/framework/[...slug].astro +++ b/src/pages/[lang]/reference/framework/[...slug].astro @@ -1,5 +1,5 @@ --- -import { getCollection } from 'astro:content'; +import { getCollection, render } from 'astro:content'; import DocsLayout from '../../../../layouts/DocsLayout.astro'; import { getTranslations, supportedLanguages, isValidLanguage } from '../../../../i18n'; @@ -41,7 +41,7 @@ if (!isValidLanguage(lang)) { const t = await getTranslations(lang); const basePath = import.meta.env.BASE_URL; -const { Content } = await entry.render(); +const { Content } = await render(entry); // Markdownの最初の# からタイトルを抽出 const titleMatch = entry.body.match(/^#\s+(.+)$/m); diff --git a/src/pages/[lang]/reference/player/[...slug].astro b/src/pages/[lang]/reference/player/[...slug].astro index 0b2eb2ea..e8906517 100644 --- a/src/pages/[lang]/reference/player/[...slug].astro +++ b/src/pages/[lang]/reference/player/[...slug].astro @@ -1,5 +1,5 @@ --- -import { getCollection } from 'astro:content'; +import { getCollection, render } from 'astro:content'; import DocsLayout from '../../../../layouts/DocsLayout.astro'; import { getTranslations, supportedLanguages, isValidLanguage } from '../../../../i18n'; @@ -42,7 +42,7 @@ if (!isValidLanguage(lang)) { const t = await getTranslations(lang); const basePath = import.meta.env.BASE_URL; -const { Content } = await entry.render(); +const { Content } = await render(entry); // Markdownの最初の# からタイトルを抽出 const titleMatch = entry.body.match(/^#\s+(.+)$/m); From 57d16a4750b80eb7087c5fb5e132e5544ab11772 Mon Sep 17 00:00:00 2001 From: ienaga Date: Thu, 12 Mar 2026 22:43:39 +0900 Subject: [PATCH 2/2] #26 update astro v6 --- docs/cn/reference/framework/index.html | 367 ++++++++++++++++++ docs/cn/reference/player/index.html | 184 +++++++++ docs/en/reference/framework/index.html | 367 ++++++++++++++++++ docs/en/reference/player/index.html | 184 +++++++++ docs/ja/reference/framework/index.html | 367 ++++++++++++++++++ docs/ja/reference/player/index.html | 185 +++++++++ docs/sitemap-0.xml | 2 +- .../reference/framework/[...slug].astro | 4 +- .../[lang]/reference/framework/index.astro | 110 ++++++ .../[lang]/reference/player/[...slug].astro | 4 +- src/pages/[lang]/reference/player/index.astro | 110 ++++++ 11 files changed, 1879 insertions(+), 5 deletions(-) create mode 100644 docs/cn/reference/framework/index.html create mode 100644 docs/cn/reference/player/index.html create mode 100644 docs/en/reference/framework/index.html create mode 100644 docs/en/reference/player/index.html create mode 100644 docs/ja/reference/framework/index.html create mode 100644 docs/ja/reference/player/index.html create mode 100644 src/pages/[lang]/reference/framework/index.astro create mode 100644 src/pages/[lang]/reference/player/index.astro diff --git a/docs/cn/reference/framework/index.html b/docs/cn/reference/framework/index.html new file mode 100644 index 00000000..38176103 --- /dev/null +++ b/docs/cn/reference/framework/index.html @@ -0,0 +1,367 @@ + Next2D | Framework

    Next2D Framework

    +

    Next2D Framework 是一个用于构建 Next2D Player 应用程序的 MVVM 框架。它提供单页应用程序(SPA)的路由、View/ViewModel 管理和配置管理。

    +

    主要特性

    +
      +
    • MVVM 模式:通过 Model-View-ViewModel 分离关注点
    • +
    • Clean Architecture:依赖倒置和松耦合设计
    • +
    • 单页应用程序:基于 URL 的场景管理
    • +
    • Animation Tool 集成:与 Animation Tool 资源无缝集成
    • +
    • TypeScript 支持:类型安全的开发
    • +
    • 原子设计:推荐的可重用组件设计
    • +
    +

    架构概述

    +

    本项目实现了 Clean Architecture 和 MVVM 模式的组合。

    +
    graph TB
    +    subgraph ViewLayer["视图层"]
    +        View["View"]
    +        ViewModel["ViewModel"]
    +        UI["UI 组件"]
    +    end
    +
    +    subgraph InterfaceLayer["接口层"]
    +        IDraggable["IDraggable"]
    +        ITextField["ITextField"]
    +        IResponse["IResponse"]
    +    end
    +
    +    subgraph ApplicationLayer["应用层"]
    +        UseCase["UseCase"]
    +    end
    +
    +    subgraph DomainLayer["领域层"]
    +        DomainLogic["领域逻辑"]
    +        DomainService["Service"]
    +    end
    +
    +    subgraph InfraLayer["基础设施层"]
    +        Repository["Repository"]
    +        ExternalAPI["外部 API"]
    +    end
    +
    +    ViewLayer -.->|通过接口| InterfaceLayer
    +    ViewLayer -.->|调用| ApplicationLayer
    +    ApplicationLayer -.->|通过接口| InterfaceLayer
    +    ApplicationLayer -.->|使用| DomainLayer
    +    ApplicationLayer -.->|调用| InfraLayer
    +    InfraLayer -.->|访问| ExternalAPI
    +

    层职责

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    路径角色
    Viewview/*, ui/*处理画面结构和显示
    ViewModelview/*View 和 Model 之间的桥梁,事件处理
    Interfaceinterface/*抽象层,类型定义
    Applicationmodel/application/*/usecase/*业务逻辑实现(UseCase)
    Domainmodel/domain/*核心业务规则
    Infrastructuremodel/infrastructure/repository/*数据访问,外部 API 集成
    +

    依赖方向

    +

    遵循 Clean Architecture 原则,依赖始终指向内部(领域层)。

    +
      +
    • 视图层:通过接口使用应用层
    • +
    • 应用层:通过接口使用领域层和基础设施层
    • +
    • 领域层:不依赖任何东西(纯业务逻辑)
    • +
    • 基础设施层:实现领域层接口
    • +
    +

    目录结构

    +
    my-app/
    +├── src/
    +│   ├── config/                    # 配置文件
    +│   │   ├── stage.json             # 舞台设置
    +│   │   ├── config.json            # 环境设置
    +│   │   ├── routing.json           # 路由设置
    +│   │   └── Config.ts              # 配置类型定义和导出
    +│   │
    +│   ├── interface/                 # 接口定义
    +│   │   ├── IDraggable.ts          # 可拖动对象
    +│   │   ├── ITextField.ts          # 文本字段
    +│   │   ├── IHomeTextResponse.ts   # API 响应类型
    +│   │   └── IViewName.ts           # 视图名称类型定义
    +│   │
    +│   ├── view/                      # View 和 ViewModel
    +│   │   ├── top/
    +│   │   │   ├── TopView.ts         # 画面结构定义
    +│   │   │   └── TopViewModel.ts    # 业务逻辑桥梁
    +│   │   └── home/
    +│   │       ├── HomeView.ts
    +│   │       └── HomeViewModel.ts
    +│   │
    +│   ├── model/
    +│   │   ├── application/           # 应用层
    +│   │   │   ├── top/
    +│   │   │   │   └── usecase/
    +│   │   │   │       └── NavigateToViewUseCase.ts
    +│   │   │   └── home/
    +│   │   │       └── usecase/
    +│   │   │           ├── StartDragUseCase.ts
    +│   │   │           ├── StopDragUseCase.ts
    +│   │   │           └── CenterTextFieldUseCase.ts
    +│   │   │
    +│   │   ├── domain/                # 领域层
    +│   │   │   └── callback/
    +│   │   │       ├── Background.ts
    +│   │   │       └── Background/
    +│   │   │           └── service/
    +│   │   │               ├── BackgroundDrawService.ts
    +│   │   │               └── BackgroundChangeScaleService.ts
    +│   │   │
    +│   │   └── infrastructure/        # 基础设施层
    +│   │       └── repository/
    +│   │           └── HomeTextRepository.ts
    +│   │
    +│   ├── ui/                        # UI 组件
    +│   │   ├── animation/             # 动画定义
    +│   │   │   └── top/
    +│   │   │       └── TopBtnShowAnimation.ts
    +│   │   │
    +│   │   ├── component/             # 原子设计
    +│   │   │   ├── atom/              # 最小单元组件
    +│   │   │   │   ├── ButtonAtom.ts
    +│   │   │   │   └── TextAtom.ts
    +│   │   │   ├── molecule/          # 组合的 Atom 组件
    +│   │   │   │   ├── HomeBtnMolecule.ts
    +│   │   │   │   └── TopBtnMolecule.ts
    +│   │   │   ├── organism/          # 多个 Molecule 组合
    +│   │   │   ├── template/          # 页面模板
    +│   │   │   └── page/              # 页面组件
    +│   │   │       ├── top/
    +│   │   │       │   └── TopPage.ts
    +│   │   │       └── home/
    +│   │   │           └── HomePage.ts
    +│   │   │
    +│   │   └── content/               # Animation Tool 生成的内容
    +│   │       ├── TopContent.ts
    +│   │       └── HomeContent.ts
    +│   │
    +│   ├── assets/                    # 静态资源
    +│   │
    +│   ├── Packages.ts                # 包导出
    +│   └── index.ts                   # 入口点
    +
    +├── file/                          # Animation Tool 输出文件
    +│   └── sample.n2d
    +
    +├── mock/                          # 模拟数据
    +│   ├── api/                       # API 模拟
    +│   ├── content/                   # 内容模拟
    +│   └── img/                       # 图像模拟
    +
    +└── package.json
    +

    框架流程图

    +

    使用 gotoView 函数的画面转换详细流程。

    +
    graph TD
    +    User([用户]) -->|请求| GotoView[gotoView Path]
    +
    +    GotoView --> LoadingCheck{使用加载?<br/>默认: true}
    +
    +    LoadingCheck -->|是| ScreenOverlay[画面遮罩]
    +    LoadingCheck -->|否| RemoveResponse
    +    ScreenOverlay --> LoadingStart[开始加载]
    +    LoadingStart --> RemoveResponse
    +
    +    RemoveResponse[移除前一个响应数据] --> ParseQuery[解析查询字符串]
    +    ParseQuery --> UpdateHistory{SPA 模式?}
    +
    +    UpdateHistory -->|是| PushState[推送历史状态]
    +    UpdateHistory -->|否| RequestType
    +    PushState --> RequestType
    +
    +    RequestType[请求类型]
    +
    +    RequestType --> JSON[JSON: 获取外部 JSON 数据]
    +    RequestType --> CONTENT[CONTENT: 获取 Animation Tool JSON]
    +    RequestType --> CUSTOM[CUSTOM: 请求外部 API]
    +
    +    JSON --> CacheCheck{使用缓存?<br/>默认: false}
    +    CONTENT --> CacheCheck
    +    CUSTOM --> CacheCheck
    +
    +    CacheCheck -->|是| CacheData[(缓存)]
    +    CacheCheck -->|否| GlobalData{{全球网络}}
    +
    +    CacheData --> Cached{已缓存?}
    +
    +    Cached -->|否| GlobalData
    +    Cached -->|是| RegisterResponse
    +    GlobalData --> RegisterResponse
    +
    +    RegisterResponse[注册响应数据] --> RequestCallback{请求回调?}
    +
    +    RequestCallback -->|是| ExecRequestCallback[执行请求回调]
    +    RequestCallback -->|否| UnbindView
    +    ExecRequestCallback --> UnbindView
    +
    +    UnbindView[前一个 View: onExit 和解绑] --> BindView[新 View/ViewModel: 绑定]
    +    BindView --> ViewModelInit[ViewModel: initialize]
    +
    +    ViewModelInit --> ViewInit[View: initialize]
    +    ViewInit --> AddToStage[将 View 添加到舞台]
    +    AddToStage --> GotoViewCallback{gotoView 回调?}
    +
    +    GotoViewCallback -->|是| ExecGotoViewCallback[执行 gotoView 回调]
    +    GotoViewCallback -->|否| LoadingEndCheck
    +    ExecGotoViewCallback --> LoadingEndCheck
    +
    +    LoadingEndCheck{使用加载?<br/>默认: true}
    +
    +    LoadingEndCheck -->|是| LoadingEnd[结束加载]
    +    LoadingEndCheck -->|否| OnEnter
    +    LoadingEnd --> DisposeOverlay[释放画面遮罩]
    +    DisposeOverlay --> OnEnter
    +
    +    OnEnter[View: onEnter] --> StartDrawing
    +
    +    StartDrawing[开始绘制] -->|响应| User
    +
    +    style User fill:#d5e8d4,stroke:#82b366
    +    style StartDrawing fill:#dae8fc,stroke:#6c8ebf
    +    style CacheData fill:#fff2cc,stroke:#d6b656
    +    style GlobalData fill:#f5f5f5,stroke:#666666
    +

    关键流程步骤

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    步骤说明
    gotoView画面转换的入口点
    Loading加载画面显示/隐藏控制
    Request Type三种请求类型:JSON、CONTENT、CUSTOM
    Cache响应数据缓存控制
    View/ViewModel Bind新 View/ViewModel 的绑定过程
    onEnter画面显示完成后的回调
    +

    关键设计模式

    +

    1. MVVM(Model-View-ViewModel)

    +
      +
    • View:处理画面结构和显示。没有业务逻辑
    • +
    • ViewModel:View 和 Model 之间的桥梁。持有 UseCase 并处理事件
    • +
    • Model:处理业务逻辑和数据访问
    • +
    +

    2. UseCase 模式

    +

    为每个用户操作创建专用的 UseCase 类:

    +
    export class StartDragUseCase
    +{
    +    execute(target: IDraggable): void
    +    {
    +        target.startDrag();
    +    }
    +}
    +

    3. 依赖倒置

    +

    依赖接口,而不是具体类:

    +
    // 好:依赖接口
    +import type { IDraggable } from "@/interface/IDraggable";
    +
    +function startDrag(target: IDraggable): void
    +{
    +    target.startDrag();
    +}
    +

    4. Repository 模式

    +

    抽象数据访问并实现错误处理:

    +
    export class HomeTextRepository
    +{
    +    static async get(): Promise<IHomeTextResponse>
    +    {
    +        try {
    +            const response = await fetch(`${config.api.endPoint}api/home.json`);
    +            if (!response.ok) {
    +                throw new Error(`HTTP error! status: ${response.status}`);
    +            }
    +            return await response.json();
    +        } catch (error) {
    +            console.error("Failed to fetch:", error);
    +            throw error;
    +        }
    +    }
    +}
    +

    快速开始

    +

    创建项目

    +
    npx create-next2d-app my-app
    +cd my-app
    +npm install
    +npm start
    +

    自动生成 View/ViewModel

    +
    npm run generate
    +

    此命令解析 routing.json 中的顶级属性并生成相应的 View 和 ViewModel 类。

    +

    最佳实践

    +
      +
    1. 接口优先:始终依赖接口,而不是具体类型
    2. +
    3. 单一职责原则:每个类只有一个职责
    4. +
    5. 依赖注入:通过构造函数注入依赖
    6. +
    7. 错误处理:在 Repository 层适当处理错误
    8. +
    9. 类型安全:避免 any 类型,使用显式类型定义
    10. +
    +

    相关文档

    +

    基础

    + +

    Next2D Player 集成

    +
    \ No newline at end of file diff --git a/docs/cn/reference/player/index.html b/docs/cn/reference/player/index.html new file mode 100644 index 00000000..3e0a1629 --- /dev/null +++ b/docs/cn/reference/player/index.html @@ -0,0 +1,184 @@ + Next2D | Player

    Next2D Player

    +

    Next2D Player 是一个使用 WebGL/WebGPU 的高性能 2D 渲染引擎。它在 Web 上提供类似 Flash Player 的功能,支持矢量图形、补间动画、文本、音频、视频等。

    +

    主要特性

    +
      +
    • 高速渲染:使用 WebGL/WebGPU 进行快速 2D 渲染
    • +
    • 多平台支持:支持从桌面到移动设备
    • +
    • 丰富的滤镜:支持模糊、投影、发光、斜角等效果
    • +
    +

    渲染管线

    +

    Next2D Player 实现高速渲染的管线概述。

    +
    flowchart TB
    +    %% Main Drawing Flow Chart
    +    subgraph MainFlow["绘制流程图 - 主渲染管线"]
    +        direction TB
    +
    +        subgraph Inputs["显示对象"]
    +            Shape["Shape<br/>(位图/矢量)"]
    +            TextField["TextField<br/>(canvas2d)"]
    +            Video["Video 元素"]
    +        end
    +
    +        Shape --> MaskCheck
    +        TextField --> MaskCheck
    +        Video --> MaskCheck
    +
    +        MaskCheck{"遮罩<br/>渲染?"}
    +
    +        MaskCheck -->|是| DirectRender["直接渲染"]
    +        DirectRender -->|drawArrays| FinalRender
    +
    +        MaskCheck -->|否| CacheCheck1{"缓存<br/>存在?"}
    +
    +        CacheCheck1 -->|否| TextureAtlas["纹理图集<br/>(二叉树打包)"]
    +        TextureAtlas --> Coordinates
    +
    +        CacheCheck1 -->|是| Coordinates["坐标数据库<br/>(x, y, w, h)"]
    +
    +        Coordinates --> FilterBlendCheck{"滤镜或<br/>混合?"}
    +
    +        FilterBlendCheck -->|否| MainArrays
    +        FilterBlendCheck -->|是| NeedCache{"缓存<br/>存在?"}
    +
    +        NeedCache -->|否| CacheRender["渲染到缓存"]
    +        CacheRender --> TextureCache
    +        NeedCache -->|是| TextureCache["纹理缓存"]
    +
    +        TextureCache -->|drawArrays| FinalRender
    +
    +        MainArrays["实例化数组<br/>━━━━━━━━━━━━━━━<br/>matrix<br/>colorTransform<br/>Coordinates<br/>━━━━━━━━━━━━━━━<br/><b>批量渲染</b>"]
    +
    +        MainArrays -->|drawArraysInstanced<br/><b>一次调用渲染多个对象</b>| FinalRender["最终渲染"]
    +
    +        FinalRender -->|60fps| MainFramebuffer["主帧缓冲<br/>(显示)"]
    +    end
    +
    +    %% Branch Flow for Filter/Blend/Mask
    +    subgraph BranchFlow["滤镜/混合/遮罩 - 分支处理"]
    +        direction TB
    +
    +        subgraph FilterInputs["显示对象"]
    +            Shape2["Shape<br/>(位图/矢量)"]
    +            TextField2["TextField<br/>(canvas2d)"]
    +            Video2["Video 元素"]
    +        end
    +
    +        Shape2 --> CacheCheck2
    +        TextField2 --> CacheCheck2
    +        Video2 --> CacheCheck2
    +
    +        CacheCheck2{"缓存<br/>存在?"}
    +
    +        CacheCheck2 -->|否| EffectRender["效果渲染"]
    +        CacheCheck2 -->|是| BranchArrays
    +        EffectRender --> BranchArrays
    +
    +        BranchArrays["实例化数组<br/>━━━━━━━━━━━━━━━<br/>matrix<br/>colorTransform<br/>Coordinates<br/>━━━━━━━━━━━━━━━<br/><b>批量渲染</b>"]
    +
    +        BranchArrays -->|drawArraysInstanced<br/><b>一次调用渲染多个对象</b>| BranchRender["效果结果"]
    +
    +        BranchRender -->|滤镜/混合| TextureCache
    +    end
    +
    +    %% Connections between flows
    +    FilterBlendCheck -.->|"触发<br/>分支流程"| BranchFlow
    +    BranchArrays -.->|"渲染信息<br/>(坐标)"| MainArrays
    +

    管线特性

    +
      +
    • 批量渲染:一次 GPU 调用渲染多个对象
    • +
    • 纹理缓存:高效处理滤镜和混合效果
    • +
    • 二叉树打包:纹理图集的最佳内存使用
    • +
    • 60fps 渲染:高帧率的流畅动画
    • +
    +

    DisplayList 架构

    +

    Next2D Player 使用与 Flash Player 类似的 DisplayList 架构。

    +

    主要类层次结构

    +
    DisplayObject (基类)
    +├── InteractiveObject
    +│   ├── DisplayObjectContainer
    +│   │   ├── Sprite
    +│   │   ├── MovieClip
    +│   │   └── Stage
    +│   └── TextField
    +├── Shape
    +├── Video
    +└── Bitmap
    +

    DisplayObjectContainer

    +

    可以容纳子对象的容器类:

    +
      +
    • addChild(child):将子对象添加到前面
    • +
    • addChildAt(child, index):在指定索引添加子对象
    • +
    • removeChild(child):移除子对象
    • +
    • getChildAt(index):通过索引获取子对象
    • +
    • getChildByName(name):通过名称获取子对象
    • +
    +

    MovieClip

    +

    具有时间轴动画的 DisplayObject:

    +
      +
    • play():开始时间轴播放
    • +
    • stop():停止时间轴
    • +
    • gotoAndPlay(frame):跳转到帧并播放
    • +
    • gotoAndStop(frame):跳转到帧并停止
    • +
    • currentFrame:当前帧号
    • +
    • totalFrames:总帧数
    • +
    +

    基本用法

    +
    const { MovieClip } = next2d.display;
    +const { DropShadowFilter } = next2d.filters;
    +
    +// 初始化舞台
    +const root = await next2d.createRootMovieClip(800, 600, 60, {
    +    tagId: "container",
    +    bgColor: "#ffffff"
    +});
    +
    +// 创建 MovieClip
    +const mc = new MovieClip();
    +root.addChild(mc);
    +
    +// 设置位置和大小
    +mc.x = 100;
    +mc.y = 100;
    +mc.scaleX = 2;
    +mc.scaleY = 2;
    +mc.rotation = 45;
    +
    +// 应用滤镜
    +mc.filters = [
    +    new DropShadowFilter(4, 45, 0x000000, 0.5)
    +];
    +

    加载 JSON 数据

    +

    加载并渲染使用 Open Animation Tool 创建的 JSON 文件:

    +
    const { Loader } = next2d.display;
    +const { URLRequest } = next2d.net;
    +
    +const loader = new Loader();
    +await loader.load(new URLRequest("animation.json"));
    +
    +const mc = loader.content;
    +stage.addChild(mc);
    +

    相关文档

    +

    显示对象

    + +

    系统

    +
    \ No newline at end of file diff --git a/docs/en/reference/framework/index.html b/docs/en/reference/framework/index.html new file mode 100644 index 00000000..3d87a6cf --- /dev/null +++ b/docs/en/reference/framework/index.html @@ -0,0 +1,367 @@ + Next2D | Framework

    Next2D Framework

    +

    Next2D Framework is an MVVM framework for building applications with Next2D Player. It provides routing for single-page applications (SPA), View/ViewModel management, and configuration management.

    +

    Key Features

    +
      +
    • MVVM Pattern: Separation of concerns with Model-View-ViewModel
    • +
    • Clean Architecture: Dependency inversion and loosely coupled design
    • +
    • Single Page Application: URL-based scene management
    • +
    • Animation Tool Integration: Seamless integration with Animation Tool assets
    • +
    • TypeScript Support: Type-safe development
    • +
    • Atomic Design: Recommended component design for reusability
    • +
    +

    Architecture Overview

    +

    This project implements a combination of Clean Architecture and MVVM pattern.

    +
    graph TB
    +    subgraph ViewLayer["View Layer"]
    +        View["View"]
    +        ViewModel["ViewModel"]
    +        UI["UI Components"]
    +    end
    +
    +    subgraph InterfaceLayer["Interface Layer"]
    +        IDraggable["IDraggable"]
    +        ITextField["ITextField"]
    +        IResponse["IResponse"]
    +    end
    +
    +    subgraph ApplicationLayer["Application Layer"]
    +        UseCase["UseCase"]
    +    end
    +
    +    subgraph DomainLayer["Domain Layer"]
    +        DomainLogic["Domain Logic"]
    +        DomainService["Service"]
    +    end
    +
    +    subgraph InfraLayer["Infrastructure Layer"]
    +        Repository["Repository"]
    +        ExternalAPI["External API"]
    +    end
    +
    +    ViewLayer -.->|via interface| InterfaceLayer
    +    ViewLayer -.->|calls| ApplicationLayer
    +    ApplicationLayer -.->|via interface| InterfaceLayer
    +    ApplicationLayer -.->|uses| DomainLayer
    +    ApplicationLayer -.->|calls| InfraLayer
    +    InfraLayer -.->|accesses| ExternalAPI
    +

    Layer Responsibilities

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    LayerPathRole
    Viewview/*, ui/*Handles screen structure and display
    ViewModelview/*Bridge between View and Model, event handling
    Interfaceinterface/*Abstraction layer, type definitions
    Applicationmodel/application/*/usecase/*Business logic implementation (UseCase)
    Domainmodel/domain/*Core business rules
    Infrastructuremodel/infrastructure/repository/*Data access, external API integration
    +

    Dependency Direction

    +

    Following Clean Architecture principles, dependencies always point inward (toward the Domain layer).

    +
      +
    • View Layer: Uses Application layer through interfaces
    • +
    • Application Layer: Uses Domain and Infrastructure layers through interfaces
    • +
    • Domain Layer: Depends on nothing (pure business logic)
    • +
    • Infrastructure Layer: Implements Domain layer interfaces
    • +
    +

    Directory Structure

    +
    my-app/
    +├── src/
    +│   ├── config/                    # Configuration files
    +│   │   ├── stage.json             # Stage settings
    +│   │   ├── config.json            # Environment settings
    +│   │   ├── routing.json           # Routing settings
    +│   │   └── Config.ts              # Config type definitions and exports
    +│   │
    +│   ├── interface/                 # Interface definitions
    +│   │   ├── IDraggable.ts          # Draggable object
    +│   │   ├── ITextField.ts          # Text field
    +│   │   ├── IHomeTextResponse.ts   # API response type
    +│   │   └── IViewName.ts           # View name type definition
    +│   │
    +│   ├── view/                      # View & ViewModel
    +│   │   ├── top/
    +│   │   │   ├── TopView.ts         # Screen structure definition
    +│   │   │   └── TopViewModel.ts    # Bridge to business logic
    +│   │   └── home/
    +│   │       ├── HomeView.ts
    +│   │       └── HomeViewModel.ts
    +│   │
    +│   ├── model/
    +│   │   ├── application/           # Application layer
    +│   │   │   ├── top/
    +│   │   │   │   └── usecase/
    +│   │   │   │       └── NavigateToViewUseCase.ts
    +│   │   │   └── home/
    +│   │   │       └── usecase/
    +│   │   │           ├── StartDragUseCase.ts
    +│   │   │           ├── StopDragUseCase.ts
    +│   │   │           └── CenterTextFieldUseCase.ts
    +│   │   │
    +│   │   ├── domain/                # Domain layer
    +│   │   │   └── callback/
    +│   │   │       ├── Background.ts
    +│   │   │       └── Background/
    +│   │   │           └── service/
    +│   │   │               ├── BackgroundDrawService.ts
    +│   │   │               └── BackgroundChangeScaleService.ts
    +│   │   │
    +│   │   └── infrastructure/        # Infrastructure layer
    +│   │       └── repository/
    +│   │           └── HomeTextRepository.ts
    +│   │
    +│   ├── ui/                        # UI Components
    +│   │   ├── animation/             # Animation definitions
    +│   │   │   └── top/
    +│   │   │       └── TopBtnShowAnimation.ts
    +│   │   │
    +│   │   ├── component/             # Atomic Design
    +│   │   │   ├── atom/              # Smallest unit components
    +│   │   │   │   ├── ButtonAtom.ts
    +│   │   │   │   └── TextAtom.ts
    +│   │   │   ├── molecule/          # Combined Atom components
    +│   │   │   │   ├── HomeBtnMolecule.ts
    +│   │   │   │   └── TopBtnMolecule.ts
    +│   │   │   ├── organism/          # Multiple Molecule combinations
    +│   │   │   ├── template/          # Page templates
    +│   │   │   └── page/              # Page components
    +│   │   │       ├── top/
    +│   │   │       │   └── TopPage.ts
    +│   │   │       └── home/
    +│   │   │           └── HomePage.ts
    +│   │   │
    +│   │   └── content/               # Animation Tool generated content
    +│   │       ├── TopContent.ts
    +│   │       └── HomeContent.ts
    +│   │
    +│   ├── assets/                    # Static assets
    +│   │
    +│   ├── Packages.ts                # Package exports
    +│   └── index.ts                   # Entry point
    +
    +├── file/                          # Animation Tool output files
    +│   └── sample.n2d
    +
    +├── mock/                          # Mock data
    +│   ├── api/                       # API mocks
    +│   ├── content/                   # Content mocks
    +│   └── img/                       # Image mocks
    +
    +└── package.json
    +

    Framework Flowchart

    +

    Detailed flow of screen transitions using the gotoView function.

    +
    graph TD
    +    User([User]) -->|Request| GotoView[gotoView Path]
    +
    +    GotoView --> LoadingCheck{use loading?<br/>Default: true}
    +
    +    LoadingCheck -->|YES| ScreenOverlay[Screen Overlay]
    +    LoadingCheck -->|NO| RemoveResponse
    +    ScreenOverlay --> LoadingStart[Start Loading]
    +    LoadingStart --> RemoveResponse
    +
    +    RemoveResponse[Remove Previous Response Data] --> ParseQuery[Parse Query String]
    +    ParseQuery --> UpdateHistory{SPA mode?}
    +
    +    UpdateHistory -->|YES| PushState[Push History State]
    +    UpdateHistory -->|NO| RequestType
    +    PushState --> RequestType
    +
    +    RequestType[Request Type]
    +
    +    RequestType --> JSON[JSON: Get external JSON data]
    +    RequestType --> CONTENT[CONTENT: Get Animation Tool JSON]
    +    RequestType --> CUSTOM[CUSTOM: Request to external API]
    +
    +    JSON --> CacheCheck{use cache?<br/>Default: false}
    +    CONTENT --> CacheCheck
    +    CUSTOM --> CacheCheck
    +
    +    CacheCheck -->|YES| CacheData[(Cache)]
    +    CacheCheck -->|NO| GlobalData{{Global Network}}
    +
    +    CacheData --> Cached{Cached?}
    +
    +    Cached -->|NO| GlobalData
    +    Cached -->|YES| RegisterResponse
    +    GlobalData --> RegisterResponse
    +
    +    RegisterResponse[Register Response Data] --> RequestCallback{request callback?}
    +
    +    RequestCallback -->|YES| ExecRequestCallback[Execute Request Callback]
    +    RequestCallback -->|NO| UnbindView
    +    ExecRequestCallback --> UnbindView
    +
    +    UnbindView[Previous View: onExit & Unbind] --> BindView[New View/ViewModel: Bind]
    +    BindView --> ViewModelInit[ViewModel: initialize]
    +
    +    ViewModelInit --> ViewInit[View: initialize]
    +    ViewInit --> AddToStage[Add View to Stage]
    +    AddToStage --> GotoViewCallback{gotoView callback?}
    +
    +    GotoViewCallback -->|YES| ExecGotoViewCallback[Execute gotoView Callback]
    +    GotoViewCallback -->|NO| LoadingEndCheck
    +    ExecGotoViewCallback --> LoadingEndCheck
    +
    +    LoadingEndCheck{use loading?<br/>Default: true}
    +
    +    LoadingEndCheck -->|YES| LoadingEnd[End Loading]
    +    LoadingEndCheck -->|NO| OnEnter
    +    LoadingEnd --> DisposeOverlay[Dispose Screen Overlay]
    +    DisposeOverlay --> OnEnter
    +
    +    OnEnter[View: onEnter] --> StartDrawing
    +
    +    StartDrawing[Start Drawing] -->|Response| User
    +
    +    style User fill:#d5e8d4,stroke:#82b366
    +    style StartDrawing fill:#dae8fc,stroke:#6c8ebf
    +    style CacheData fill:#fff2cc,stroke:#d6b656
    +    style GlobalData fill:#f5f5f5,stroke:#666666
    +

    Key Flow Steps

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StepDescription
    gotoViewEntry point for screen transitions
    LoadingLoading screen show/hide control
    Request TypeThree types of requests: JSON, CONTENT, CUSTOM
    CacheResponse data cache control
    View/ViewModel BindBinding process for new View/ViewModel
    onEnterCallback after screen display is complete
    +

    Key Design Patterns

    +

    1. MVVM (Model-View-ViewModel)

    +
      +
    • View: Handles screen structure and display. No business logic
    • +
    • ViewModel: Bridge between View and Model. Holds UseCases and processes events
    • +
    • Model: Handles business logic and data access
    • +
    +

    2. UseCase Pattern

    +

    Create a dedicated UseCase class for each user action:

    +
    export class StartDragUseCase
    +{
    +    execute(target: IDraggable): void
    +    {
    +        target.startDrag();
    +    }
    +}
    +

    3. Dependency Inversion

    +

    Depend on interfaces, not concrete classes:

    +
    // Good: Depend on interfaces
    +import type { IDraggable } from "@/interface/IDraggable";
    +
    +function startDrag(target: IDraggable): void
    +{
    +    target.startDrag();
    +}
    +

    4. Repository Pattern

    +

    Abstract data access and implement error handling:

    +
    export class HomeTextRepository
    +{
    +    static async get(): Promise<IHomeTextResponse>
    +    {
    +        try {
    +            const response = await fetch(`${config.api.endPoint}api/home.json`);
    +            if (!response.ok) {
    +                throw new Error(`HTTP error! status: ${response.status}`);
    +            }
    +            return await response.json();
    +        } catch (error) {
    +            console.error("Failed to fetch:", error);
    +            throw error;
    +        }
    +    }
    +}
    +

    Quick Start

    +

    Create Project

    +
    npx create-next2d-app my-app
    +cd my-app
    +npm install
    +npm start
    +

    Auto-generate View/ViewModel

    +
    npm run generate
    +

    This command parses top properties in routing.json and generates corresponding View and ViewModel classes.

    +

    Best Practices

    +
      +
    1. Interface First: Always depend on interfaces, not concrete types
    2. +
    3. Single Responsibility Principle: Each class has only one responsibility
    4. +
    5. Dependency Injection: Inject dependencies via constructor
    6. +
    7. Error Handling: Handle errors appropriately in Repository layer
    8. +
    9. Type Safety: Avoid any type, use explicit type definitions
    10. +
    + +

    Basics

    + +

    Next2D Player Integration

    +
    \ No newline at end of file diff --git a/docs/en/reference/player/index.html b/docs/en/reference/player/index.html new file mode 100644 index 00000000..d1195487 --- /dev/null +++ b/docs/en/reference/player/index.html @@ -0,0 +1,184 @@ + Next2D | Player

    Next2D Player

    +

    Next2D Player is a high-performance 2D rendering engine using WebGL/WebGPU. It provides Flash Player-like functionality on the web, supporting vector graphics, Tween animations, text, audio, video, and more.

    +

    Key Features

    +
      +
    • High-Speed Rendering: Fast 2D rendering using WebGL/WebGPU
    • +
    • Multi-Platform: Supports desktop to mobile devices
    • +
    • Rich Filters: Supports Blur, DropShadow, Glow, Bevel, and more
    • +
    +

    Rendering Pipeline

    +

    An overview of the pipeline that enables Next2D Player’s high-speed rendering.

    +
    flowchart TB
    +    %% Main Drawing Flow Chart
    +    subgraph MainFlow["Drawing Flow Chart - Main Rendering Pipeline"]
    +        direction TB
    +
    +        subgraph Inputs["Display Objects"]
    +            Shape["Shape<br/>(Bitmap/Vector)"]
    +            TextField["TextField<br/>(canvas2d)"]
    +            Video["Video Element"]
    +        end
    +
    +        Shape --> MaskCheck
    +        TextField --> MaskCheck
    +        Video --> MaskCheck
    +
    +        MaskCheck{"mask<br/>rendering?"}
    +
    +        MaskCheck -->|YES| DirectRender["Direct Rendering"]
    +        DirectRender -->|drawArrays| FinalRender
    +
    +        MaskCheck -->|NO| CacheCheck1{"cache<br/>exists?"}
    +
    +        CacheCheck1 -->|NO| TextureAtlas["Texture Atlas<br/>(Binary Tree Packing)"]
    +        TextureAtlas --> Coordinates
    +
    +        CacheCheck1 -->|YES| Coordinates["Coordinates DB<br/>(x, y, w, h)"]
    +
    +        Coordinates --> FilterBlendCheck{"filter or<br/>blend?"}
    +
    +        FilterBlendCheck -->|NO| MainArrays
    +        FilterBlendCheck -->|YES| NeedCache{"cache<br/>exists?"}
    +
    +        NeedCache -->|NO| CacheRender["Render to Cache"]
    +        CacheRender --> TextureCache
    +        NeedCache -->|YES| TextureCache["Texture Cache"]
    +
    +        TextureCache -->|drawArrays| FinalRender
    +
    +        MainArrays["Instanced Arrays<br/>━━━━━━━━━━━━━━━<br/>matrix<br/>colorTransform<br/>Coordinates<br/>━━━━━━━━━━━━━━━<br/><b>Batch Rendering</b>"]
    +
    +        MainArrays -->|drawArraysInstanced<br/><b>Multiple objects in one call</b>| FinalRender["Final Rendering"]
    +
    +        FinalRender -->|60fps| MainFramebuffer["Main Framebuffer<br/>(Display)"]
    +    end
    +
    +    %% Branch Flow for Filter/Blend/Mask
    +    subgraph BranchFlow["Filter/Blend/Mask - Branch Processing"]
    +        direction TB
    +
    +        subgraph FilterInputs["Display Objects"]
    +            Shape2["Shape<br/>(Bitmap/Vector)"]
    +            TextField2["TextField<br/>(canvas2d)"]
    +            Video2["Video Element"]
    +        end
    +
    +        Shape2 --> CacheCheck2
    +        TextField2 --> CacheCheck2
    +        Video2 --> CacheCheck2
    +
    +        CacheCheck2{"cache<br/>exists?"}
    +
    +        CacheCheck2 -->|NO| EffectRender["Effect Rendering"]
    +        CacheCheck2 -->|YES| BranchArrays
    +        EffectRender --> BranchArrays
    +
    +        BranchArrays["Instanced Arrays<br/>━━━━━━━━━━━━━━━<br/>matrix<br/>colorTransform<br/>Coordinates<br/>━━━━━━━━━━━━━━━<br/><b>Batch Rendering</b>"]
    +
    +        BranchArrays -->|drawArraysInstanced<br/><b>Multiple objects in one call</b>| BranchRender["Effect Result"]
    +
    +        BranchRender -->|filter/blend| TextureCache
    +    end
    +
    +    %% Connections between flows
    +    FilterBlendCheck -.->|"trigger<br/>branch flow"| BranchFlow
    +    BranchArrays -.->|"rendering info<br/>(coordinates)"| MainArrays
    +

    Pipeline Features

    +
      +
    • Batch Rendering: Render multiple objects in a single GPU call
    • +
    • Texture Cache: Efficiently process filters and blend effects
    • +
    • Binary Tree Packing: Optimal memory usage with texture atlas
    • +
    • 60fps Rendering: Smooth animations at high frame rates
    • +
    +

    DisplayList Architecture

    +

    Next2D Player uses a DisplayList architecture similar to Flash Player.

    +

    Main Class Hierarchy

    +
    DisplayObject (Base class)
    +├── InteractiveObject
    +│   ├── DisplayObjectContainer
    +│   │   ├── Sprite
    +│   │   ├── MovieClip
    +│   │   └── Stage
    +│   └── TextField
    +├── Shape
    +├── Video
    +└── Bitmap
    +

    DisplayObjectContainer

    +

    Container class that can hold child objects:

    +
      +
    • addChild(child): Add child to the front
    • +
    • addChildAt(child, index): Add child at specified index
    • +
    • removeChild(child): Remove child
    • +
    • getChildAt(index): Get child by index
    • +
    • getChildByName(name): Get child by name
    • +
    +

    MovieClip

    +

    DisplayObject with timeline animation:

    +
      +
    • play(): Start timeline playback
    • +
    • stop(): Stop timeline
    • +
    • gotoAndPlay(frame): Go to frame and play
    • +
    • gotoAndStop(frame): Go to frame and stop
    • +
    • currentFrame: Current frame number
    • +
    • totalFrames: Total number of frames
    • +
    +

    Basic Usage

    +
    const { MovieClip } = next2d.display;
    +const { DropShadowFilter } = next2d.filters;
    +
    +// Initialize stage
    +const root = await next2d.createRootMovieClip(800, 600, 60, {
    +    tagId: "container",
    +    bgColor: "#ffffff"
    +});
    +
    +// Create MovieClip
    +const mc = new MovieClip();
    +root.addChild(mc);
    +
    +// Set position and size
    +mc.x = 100;
    +mc.y = 100;
    +mc.scaleX = 2;
    +mc.scaleY = 2;
    +mc.rotation = 45;
    +
    +// Apply filters
    +mc.filters = [
    +    new DropShadowFilter(4, 45, 0x000000, 0.5)
    +];
    +

    Loading JSON Data

    +

    Load and render JSON files created with Open Animation Tool:

    +
    const { Loader } = next2d.display;
    +const { URLRequest } = next2d.net;
    +
    +const loader = new Loader();
    +await loader.load(new URLRequest("animation.json"));
    +
    +const mc = loader.content;
    +stage.addChild(mc);
    + +

    Display Objects

    + +

    Systems

    +
    \ No newline at end of file diff --git a/docs/ja/reference/framework/index.html b/docs/ja/reference/framework/index.html new file mode 100644 index 00000000..68e4493b --- /dev/null +++ b/docs/ja/reference/framework/index.html @@ -0,0 +1,367 @@ + Next2D | Framework

    Next2D Framework

    +

    Next2D Frameworkは、Next2D Playerを用いたアプリケーション開発のためのMVVMフレームワークです。シングルページアプリケーション(SPA)のためのルーティング、View/ViewModel管理、環境設定管理などの機能を提供します。

    +

    主な特徴

    +
      +
    • MVVMパターン: Model-View-ViewModelパターンによる関心の分離
    • +
    • クリーンアーキテクチャ: 依存性の逆転と疎結合な設計
    • +
    • シングルページアプリケーション: URLベースのシーン管理
    • +
    • Animation Tool連携: Animation Toolで作成したアセットとの連携
    • +
    • TypeScriptサポート: 型安全な開発が可能
    • +
    • アトミックデザイン: 再利用可能なコンポーネント設計を推奨
    • +
    +

    アーキテクチャ概要

    +

    このプロジェクトはクリーンアーキテクチャとMVVMパターンを組み合わせて実装されています。

    +
    graph TB
    +    subgraph ViewLayer["View Layer"]
    +        View["View"]
    +        ViewModel["ViewModel"]
    +        UI["UI Components"]
    +    end
    +
    +    subgraph InterfaceLayer["Interface Layer"]
    +        IDraggable["IDraggable"]
    +        ITextField["ITextField"]
    +        IResponse["IResponse"]
    +    end
    +
    +    subgraph ApplicationLayer["Application Layer"]
    +        UseCase["UseCase"]
    +    end
    +
    +    subgraph DomainLayer["Domain Layer"]
    +        DomainLogic["Domain Logic"]
    +        DomainService["Service"]
    +    end
    +
    +    subgraph InfraLayer["Infrastructure Layer"]
    +        Repository["Repository"]
    +        ExternalAPI["External API"]
    +    end
    +
    +    ViewLayer -.->|interface経由| InterfaceLayer
    +    ViewLayer -.->|calls| ApplicationLayer
    +    ApplicationLayer -.->|interface経由| InterfaceLayer
    +    ApplicationLayer -.->|uses| DomainLayer
    +    ApplicationLayer -.->|calls| InfraLayer
    +    InfraLayer -.->|accesses| ExternalAPI
    +

    レイヤーの責務

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    レイヤーパス役割
    Viewview/*, ui/*画面の構造と表示を担当
    ViewModelview/*ViewとModelの橋渡し、イベントハンドリング
    Interfaceinterface/*抽象化レイヤー、型定義
    Applicationmodel/application/*/usecase/*ビジネスロジックの実装(UseCase)
    Domainmodel/domain/*コアビジネスルール
    Infrastructuremodel/infrastructure/repository/*データアクセス、外部API連携
    +

    依存関係の方向

    +

    クリーンアーキテクチャの原則に従い、依存関係は常に内側(Domain層)に向かいます。

    +
      +
    • View層: インターフェースを通じてApplication層を使用
    • +
    • Application層: インターフェースを通じてDomain層とInfrastructure層を使用
    • +
    • Domain層: 何にも依存しない(純粋なビジネスロジック)
    • +
    • Infrastructure層: Domain層のインターフェースを実装
    • +
    +

    ディレクトリ構造

    +
    my-app/
    +├── src/
    +│   ├── config/                    # 設定ファイル
    +│   │   ├── stage.json             # ステージ設定
    +│   │   ├── config.json            # 環境設定
    +│   │   ├── routing.json           # ルーティング設定
    +│   │   └── Config.ts              # 設定の型定義とエクスポート
    +│   │
    +│   ├── interface/                 # インターフェース定義
    +│   │   ├── IDraggable.ts          # ドラッグ可能なオブジェクト
    +│   │   ├── ITextField.ts          # テキストフィールド
    +│   │   ├── IHomeTextResponse.ts   # APIレスポンス型
    +│   │   └── IViewName.ts           # 画面名の型定義
    +│   │
    +│   ├── view/                      # View & ViewModel
    +│   │   ├── top/
    +│   │   │   ├── TopView.ts         # 画面の構造定義
    +│   │   │   └── TopViewModel.ts    # ビジネスロジックとの橋渡し
    +│   │   └── home/
    +│   │       ├── HomeView.ts
    +│   │       └── HomeViewModel.ts
    +│   │
    +│   ├── model/
    +│   │   ├── application/           # アプリケーション層
    +│   │   │   ├── top/
    +│   │   │   │   └── usecase/
    +│   │   │   │       └── NavigateToViewUseCase.ts
    +│   │   │   └── home/
    +│   │   │       └── usecase/
    +│   │   │           ├── StartDragUseCase.ts
    +│   │   │           ├── StopDragUseCase.ts
    +│   │   │           └── CenterTextFieldUseCase.ts
    +│   │   │
    +│   │   ├── domain/                # ドメイン層
    +│   │   │   └── callback/
    +│   │   │       ├── Background.ts
    +│   │   │       └── Background/
    +│   │   │           └── service/
    +│   │   │               ├── BackgroundDrawService.ts
    +│   │   │               └── BackgroundChangeScaleService.ts
    +│   │   │
    +│   │   └── infrastructure/        # インフラ層
    +│   │       └── repository/
    +│   │           └── HomeTextRepository.ts
    +│   │
    +│   ├── ui/                        # UIコンポーネント
    +│   │   ├── animation/             # アニメーション定義
    +│   │   │   └── top/
    +│   │   │       └── TopBtnShowAnimation.ts
    +│   │   │
    +│   │   ├── component/             # アトミックデザイン
    +│   │   │   ├── atom/              # 最小単位のコンポーネント
    +│   │   │   │   ├── ButtonAtom.ts
    +│   │   │   │   └── TextAtom.ts
    +│   │   │   ├── molecule/          # Atomを組み合わせたコンポーネント
    +│   │   │   │   ├── HomeBtnMolecule.ts
    +│   │   │   │   └── TopBtnMolecule.ts
    +│   │   │   ├── organism/          # 複数Moleculeの組み合わせ
    +│   │   │   ├── template/          # ページテンプレート
    +│   │   │   └── page/              # ページコンポーネント
    +│   │   │       ├── top/
    +│   │   │       │   └── TopPage.ts
    +│   │   │       └── home/
    +│   │   │           └── HomePage.ts
    +│   │   │
    +│   │   └── content/               # Animation Tool生成コンテンツ
    +│   │       ├── TopContent.ts
    +│   │       └── HomeContent.ts
    +│   │
    +│   ├── assets/                    # 静的アセット
    +│   │
    +│   ├── Packages.ts                # パッケージエクスポート
    +│   └── index.ts                   # エントリーポイント
    +
    +├── file/                          # Animation Tool出力ファイル
    +│   └── sample.n2d
    +
    +├── mock/                          # モックデータ
    +│   ├── api/                       # APIモック
    +│   ├── content/                   # コンテンツモック
    +│   └── img/                       # 画像モック
    +
    +└── package.json
    +

    フレームワークフローチャート

    +

    gotoView関数による画面遷移の詳細なフローを示します。

    +
    graph TD
    +    User([User]) -->|Request| GotoView[gotoView Path]
    +
    +    GotoView --> LoadingCheck{use loading?<br/>Default: true}
    +
    +    LoadingCheck -->|YES| ScreenOverlay[Screen Overlay]
    +    LoadingCheck -->|NO| RemoveResponse
    +    ScreenOverlay --> LoadingStart[Start Loading]
    +    LoadingStart --> RemoveResponse
    +
    +    RemoveResponse[Remove Previous Response Data] --> ParseQuery[Parse Query String]
    +    ParseQuery --> UpdateHistory{SPA mode?}
    +
    +    UpdateHistory -->|YES| PushState[Push History State]
    +    UpdateHistory -->|NO| RequestType
    +    PushState --> RequestType
    +
    +    RequestType[Request Type]
    +
    +    RequestType --> JSON[JSON: Get external JSON data]
    +    RequestType --> CONTENT[CONTENT: Get Animation Tool JSON]
    +    RequestType --> CUSTOM[CUSTOM: Request to external API]
    +
    +    JSON --> CacheCheck{use cache?<br/>Default: false}
    +    CONTENT --> CacheCheck
    +    CUSTOM --> CacheCheck
    +
    +    CacheCheck -->|YES| CacheData[(Cache)]
    +    CacheCheck -->|NO| GlobalData{{Global Network}}
    +
    +    CacheData --> Cached{Cached?}
    +
    +    Cached -->|NO| GlobalData
    +    Cached -->|YES| RegisterResponse
    +    GlobalData --> RegisterResponse
    +
    +    RegisterResponse[Register Response Data] --> RequestCallback{request callback?}
    +
    +    RequestCallback -->|YES| ExecRequestCallback[Execute Request Callback]
    +    RequestCallback -->|NO| UnbindView
    +    ExecRequestCallback --> UnbindView
    +
    +    UnbindView[Previous View: onExit & Unbind] --> BindView[New View/ViewModel: Bind]
    +    BindView --> ViewModelInit[ViewModel: initialize]
    +
    +    ViewModelInit --> ViewInit[View: initialize]
    +    ViewInit --> AddToStage[Add View to Stage]
    +    AddToStage --> GotoViewCallback{gotoView callback?}
    +
    +    GotoViewCallback -->|YES| ExecGotoViewCallback[Execute gotoView Callback]
    +    GotoViewCallback -->|NO| LoadingEndCheck
    +    ExecGotoViewCallback --> LoadingEndCheck
    +
    +    LoadingEndCheck{use loading?<br/>Default: true}
    +
    +    LoadingEndCheck -->|YES| LoadingEnd[End Loading]
    +    LoadingEndCheck -->|NO| OnEnter
    +    LoadingEnd --> DisposeOverlay[Dispose Screen Overlay]
    +    DisposeOverlay --> OnEnter
    +
    +    OnEnter[View: onEnter] --> StartDrawing
    +
    +    StartDrawing[Start Drawing] -->|Response| User
    +
    +    style User fill:#d5e8d4,stroke:#82b366
    +    style StartDrawing fill:#dae8fc,stroke:#6c8ebf
    +    style CacheData fill:#fff2cc,stroke:#d6b656
    +    style GlobalData fill:#f5f5f5,stroke:#666666
    +

    フローの主要ステップ

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ステップ説明
    gotoView画面遷移のエントリーポイント
    Loadingローディング画面の表示/非表示制御
    Request TypeJSON、CONTENT、CUSTOMの3種類のリクエスト
    Cacheレスポンスデータのキャッシュ制御
    View/ViewModel Bind新しいView/ViewModelのバインド処理
    onEnter画面表示完了後のコールバック
    +

    主要な設計パターン

    +

    1. MVVM (Model-View-ViewModel)

    +
      +
    • View: 画面の構造と表示を担当。ビジネスロジックは持たない
    • +
    • ViewModel: ViewとModelの橋渡し。UseCaseを保持し、イベントを処理
    • +
    • Model: ビジネスロジックとデータアクセスを担当
    • +
    +

    2. UseCaseパターン

    +

    各ユーザーアクションに対して、専用のUseCaseクラスを作成:

    +
    export class StartDragUseCase
    +{
    +    execute(target: IDraggable): void
    +    {
    +        target.startDrag();
    +    }
    +}
    +

    3. 依存性の逆転 (Dependency Inversion)

    +

    具象クラスではなく、インターフェースに依存:

    +
    // 良い例: インターフェースに依存
    +import type { IDraggable } from "@/interface/IDraggable";
    +
    +function startDrag(target: IDraggable): void
    +{
    +    target.startDrag();
    +}
    +

    4. Repositoryパターン

    +

    データアクセスを抽象化し、エラーハンドリングも実装:

    +
    export class HomeTextRepository
    +{
    +    static async get(): Promise<IHomeTextResponse>
    +    {
    +        try {
    +            const response = await fetch(`${config.api.endPoint}api/home.json`);
    +            if (!response.ok) {
    +                throw new Error(`HTTP error! status: ${response.status}`);
    +            }
    +            return await response.json();
    +        } catch (error) {
    +            console.error("Failed to fetch:", error);
    +            throw error;
    +        }
    +    }
    +}
    +

    クイックスタート

    +

    プロジェクトの作成

    +
    npx create-next2d-app my-app
    +cd my-app
    +npm install
    +npm start
    +

    View/ViewModelの自動生成

    +
    npm run generate
    +

    このコマンドはrouting.jsonのトッププロパティを解析し、対応するViewとViewModelクラスを生成します。

    +

    ベストプラクティス

    +
      +
    1. インターフェース優先: 具象型ではなく、常にインターフェースに依存
    2. +
    3. 単一責任の原則: 各クラスは1つの責務のみを持つ
    4. +
    5. 依存性注入: コンストラクタで依存を注入
    6. +
    7. エラーハンドリング: Repository層で適切にエラーを処理
    8. +
    9. 型安全性: any型を避け、明示的な型定義を使用
    10. +
    +

    関連ドキュメント

    +

    基本

    + +

    Next2D Player連携

    +
    \ No newline at end of file diff --git a/docs/ja/reference/player/index.html b/docs/ja/reference/player/index.html new file mode 100644 index 00000000..65841e2a --- /dev/null +++ b/docs/ja/reference/player/index.html @@ -0,0 +1,185 @@ + Next2D | Player

    Next2D Player

    +

    Next2D Playerは、WebGL/WebGPUを用いた高速2Dレンダリングエンジンです。Flash Playerのような機能をWeb上で実現し、ベクター描画、Tweenアニメーション、テキスト、音声、動画など、さまざまな要素をサポートしています。

    +

    主な特徴

    +
      +
    • 高速レンダリング: WebGL/WebGPUを活用した高速2D描画
    • +
    • マルチプラットフォーム: デスクトップからモバイルまで対応
    • +
    • 豊富なフィルター: Blur、DropShadow、Glow、Bevelなど多数のフィルターをサポート
    • +
    +

    レンダリングパイプライン

    +

    Next2D Playerの高速レンダリングを実現するパイプラインの全体像です。

    +
    flowchart TB
    +    %% Main Drawing Flow Chart
    +    subgraph MainFlow["描画フローチャート - メインレンダリングパイプライン"]
    +        direction TB
    +
    +        subgraph Inputs["表示オブジェクト"]
    +            Shape["Shape<br/>(Bitmap/Vector)"]
    +            TextField["TextField<br/>(canvas2d)"]
    +            Video["Video Element"]
    +        end
    +
    +        Shape --> MaskCheck
    +        TextField --> MaskCheck
    +        Video --> MaskCheck
    +
    +        MaskCheck{"マスク<br/>レンダリング?"}
    +
    +        MaskCheck -->|YES| DirectRender["直接レンダリング"]
    +        DirectRender -->|drawArrays| FinalRender
    +
    +        MaskCheck -->|NO| CacheCheck1{"キャッシュ<br/>あり?"}
    +
    +        CacheCheck1 -->|NO| TextureAtlas["テクスチャアトラス<br/>(二分木パッキング)"]
    +        TextureAtlas --> Coordinates
    +
    +        CacheCheck1 -->|YES| Coordinates["座標データベース<br/>(x, y, w, h)"]
    +
    +        Coordinates --> FilterBlendCheck{"フィルター or<br/>ブレンド?"}
    +
    +        FilterBlendCheck -->|NO| MainArrays
    +        FilterBlendCheck -->|YES| NeedCache{"キャッシュ<br/>あり?"}
    +
    +        NeedCache -->|NO| CacheRender["キャッシュにレンダリング"]
    +        CacheRender --> TextureCache
    +        NeedCache -->|YES| TextureCache["テクスチャキャッシュ"]
    +
    +        TextureCache -->|drawArrays| FinalRender
    +
    +        MainArrays["インスタンス配列<br/>━━━━━━━━━━━━━━━<br/>matrix<br/>colorTransform<br/>Coordinates<br/>━━━━━━━━━━━━━━━<br/><b>バッチレンダリング</b>"]
    +
    +        MainArrays -->|drawArraysInstanced<br/><b>複数オブジェクトを1回で描画</b>| FinalRender["最終レンダリング"]
    +
    +        FinalRender -->|60fps| MainFramebuffer["メインフレームバッファ<br/>(ディスプレイ)"]
    +    end
    +
    +    %% Branch Flow for Filter/Blend/Mask
    +    subgraph BranchFlow["フィルター/ブレンド/マスク - 分岐処理"]
    +        direction TB
    +
    +        subgraph FilterInputs["表示オブジェクト"]
    +            Shape2["Shape<br/>(Bitmap/Vector)"]
    +            TextField2["TextField<br/>(canvas2d)"]
    +            Video2["Video Element"]
    +        end
    +
    +        Shape2 --> CacheCheck2
    +        TextField2 --> CacheCheck2
    +        Video2 --> CacheCheck2
    +
    +        CacheCheck2{"キャッシュ<br/>あり?"}
    +
    +        CacheCheck2 -->|NO| EffectRender["エフェクトレンダリング"]
    +        CacheCheck2 -->|YES| BranchArrays
    +        EffectRender --> BranchArrays
    +
    +        BranchArrays["インスタンス配列<br/>━━━━━━━━━━━━━━━<br/>matrix<br/>colorTransform<br/>Coordinates<br/>━━━━━━━━━━━━━━━<br/><b>バッチレンダリング</b>"]
    +
    +        BranchArrays -->|drawArraysInstanced<br/><b>複数オブジェクトを1回で描画</b>| BranchRender["エフェクト結果"]
    +
    +        BranchRender -->|filter/blend| TextureCache
    +    end
    +
    +    %% Connections between flows
    +    FilterBlendCheck -.->|"分岐フローを<br/>トリガー"| BranchFlow
    +    BranchArrays -.->|"レンダリング情報<br/>(座標)"| MainArrays
    +

    パイプラインの特徴

    +
      +
    • バッチレンダリング: 複数のオブジェクトを1回のGPUコールで描画
    • +
    • テクスチャキャッシュ: フィルターやブレンド効果を効率的に処理
    • +
    • 二分木パッキング: テクスチャアトラスで最適なメモリ使用
    • +
    • 60fps描画: 高フレームレートでのスムーズなアニメーション
    • +
    +

    DisplayListアーキテクチャ

    +

    Next2D Playerは、Flash Playerと同様のDisplayListアーキテクチャを採用しています。

    +

    主要クラス階層

    +
    DisplayObject (基底クラス)
    +├── InteractiveObject
    +│   ├── DisplayObjectContainer
    +│   │   ├── Sprite
    +│   │   ├── MovieClip
    +│   │   └── Stage
    +│   └── TextField
    +├── Shape
    +├── Video
    +└── Bitmap
    +

    DisplayObjectContainer

    +

    子オブジェクトを持つことができるコンテナクラス:

    +
      +
    • addChild(child): 子要素を最前面に追加
    • +
    • addChildAt(child, index): 指定インデックスに子要素を追加
    • +
    • removeChild(child): 子要素を削除
    • +
    • getChildAt(index): インデックスから子要素を取得
    • +
    • getChildByName(name): 名前から子要素を取得
    • +
    +

    MovieClip

    +

    タイムラインアニメーションを持つDisplayObject:

    +
      +
    • play(): タイムラインを再生
    • +
    • stop(): タイムラインを停止
    • +
    • gotoAndPlay(frame): 指定フレームに移動して再生
    • +
    • gotoAndStop(frame): 指定フレームに移動して停止
    • +
    • currentFrame: 現在のフレーム番号
    • +
    • totalFrames: 総フレーム数
    • +
    +

    基本的な使い方

    +
    const { MovieClip } = next2d.display;
    +const { DropShadowFilter } = next2d.filters;
    +
    +// ルートMovieClipを作成
    +const root = await next2d.createRootMovieClip(800, 600, 60, {
    +    tagId: "container",
    +    bgColor: "#ffffff"
    +});
    +
    +// MovieClipの作成
    +const mc = new MovieClip();
    +root.addChild(mc);
    +
    +// 位置とサイズの設定
    +mc.x = 100;
    +mc.y = 100;
    +mc.scaleX = 2;
    +mc.scaleY = 2;
    +mc.rotation = 45;
    +
    +// フィルターの適用
    +mc.filters = [
    +    new DropShadowFilter(4, 45, 0x000000, 0.5)
    +];
    +

    JSONデータの読み込み

    +

    Open Animation Toolで作成したJSONファイルを読み込んで描画:

    +
    const { Loader } = next2d.display;
    +const { URLRequest } = next2d.net;
    +
    +const loader = new Loader();
    +await loader.load(new URLRequest("animation.json"));
    +
    +// 読み込み完了後、直接contentにアクセス
    +const mc = loader.content;
    +stage.addChild(mc);
    +

    関連ドキュメント

    +

    表示オブジェクト

    +
      +
    • DisplayObject - 全ての表示オブジェクトの基底クラス
    • +
    • MovieClip - タイムラインアニメーション
    • +
    • Sprite - グラフィックス描画とインタラクション
    • +
    • Shape - 軽量なベクター描画
    • +
    • TextField - テキスト表示と入力
    • +
    • Video - 動画再生
    • +
    +

    システム

    +
    \ No newline at end of file diff --git a/docs/sitemap-0.xml b/docs/sitemap-0.xml index 628e44e0..eda6c1c8 100644 --- a/docs/sitemap-0.xml +++ b/docs/sitemap-0.xml @@ -1 +1 @@ -https://next2d.app/https://next2d.app/cn/https://next2d.app/cn/casestudy/slimetenpuzzle/https://next2d.app/cn/casestudy/worldflipper/https://next2d.app/cn/privacy/https://next2d.app/cn/reference/framework/animation-tool/https://next2d.app/cn/reference/framework/config/https://next2d.app/cn/reference/framework/routing/https://next2d.app/cn/reference/framework/view/https://next2d.app/cn/reference/player/display-object/https://next2d.app/cn/reference/player/events/https://next2d.app/cn/reference/player/filters/https://next2d.app/cn/reference/player/movie-clip/https://next2d.app/cn/reference/player/shape/https://next2d.app/cn/reference/player/sound/https://next2d.app/cn/reference/player/sprite/https://next2d.app/cn/reference/player/text-field/https://next2d.app/cn/reference/player/tween/https://next2d.app/cn/reference/player/video/https://next2d.app/cn/usage/https://next2d.app/cn/usage/controller/https://next2d.app/cn/usage/controller/blend-mode/https://next2d.app/cn/usage/controller/color-transform/https://next2d.app/cn/usage/controller/filters/https://next2d.app/cn/usage/controller/frame-picker/https://next2d.app/cn/usage/controller/library/https://next2d.app/cn/usage/controller/object-setting/https://next2d.app/cn/usage/controller/sound/https://next2d.app/cn/usage/controller/stage-setting/https://next2d.app/cn/usage/controller/transform/https://next2d.app/cn/usage/screen/https://next2d.app/cn/usage/screen/align/https://next2d.app/cn/usage/screen/distribute/https://next2d.app/cn/usage/screen/layer/https://next2d.app/cn/usage/screen/tabs/https://next2d.app/cn/usage/timeline/https://next2d.app/cn/usage/timeline/custom-tweening/https://next2d.app/cn/usage/timeline/frame-keyframe/https://next2d.app/cn/usage/timeline/javascript/https://next2d.app/cn/usage/timeline/mask-layer/https://next2d.app/cn/usage/timeline/motion-tweening/https://next2d.app/cn/usage/timeline/normal-layer/https://next2d.app/cn/usage/timeline/onion-skin/https://next2d.app/cn/usage/timeline/preview/https://next2d.app/cn/usage/tool/https://next2d.app/cn/usage/tool/ellipse/https://next2d.app/cn/usage/tool/pen/https://next2d.app/cn/usage/tool/rectangle/https://next2d.app/cn/usage/tool/rounded-rectangle/https://next2d.app/cn/usage/tool/shape-transform/https://next2d.app/cn/usage/tool/text/https://next2d.app/cn/usage/tool/transform/https://next2d.app/en/https://next2d.app/en/casestudy/slimetenpuzzle/https://next2d.app/en/casestudy/worldflipper/https://next2d.app/en/privacy/https://next2d.app/en/reference/framework/animation-tool/https://next2d.app/en/reference/framework/config/https://next2d.app/en/reference/framework/routing/https://next2d.app/en/reference/framework/view/https://next2d.app/en/reference/player/display-object/https://next2d.app/en/reference/player/events/https://next2d.app/en/reference/player/filters/https://next2d.app/en/reference/player/movie-clip/https://next2d.app/en/reference/player/shape/https://next2d.app/en/reference/player/sound/https://next2d.app/en/reference/player/sprite/https://next2d.app/en/reference/player/text-field/https://next2d.app/en/reference/player/tween/https://next2d.app/en/reference/player/video/https://next2d.app/en/usage/https://next2d.app/en/usage/controller/https://next2d.app/en/usage/controller/blend-mode/https://next2d.app/en/usage/controller/color-transform/https://next2d.app/en/usage/controller/filters/https://next2d.app/en/usage/controller/frame-picker/https://next2d.app/en/usage/controller/library/https://next2d.app/en/usage/controller/object-setting/https://next2d.app/en/usage/controller/sound/https://next2d.app/en/usage/controller/stage-setting/https://next2d.app/en/usage/controller/transform/https://next2d.app/en/usage/screen/https://next2d.app/en/usage/screen/align/https://next2d.app/en/usage/screen/distribute/https://next2d.app/en/usage/screen/layer/https://next2d.app/en/usage/screen/tabs/https://next2d.app/en/usage/timeline/https://next2d.app/en/usage/timeline/custom-tweening/https://next2d.app/en/usage/timeline/frame-keyframe/https://next2d.app/en/usage/timeline/javascript/https://next2d.app/en/usage/timeline/mask-layer/https://next2d.app/en/usage/timeline/motion-tweening/https://next2d.app/en/usage/timeline/normal-layer/https://next2d.app/en/usage/timeline/onion-skin/https://next2d.app/en/usage/timeline/preview/https://next2d.app/en/usage/tool/https://next2d.app/en/usage/tool/ellipse/https://next2d.app/en/usage/tool/pen/https://next2d.app/en/usage/tool/rectangle/https://next2d.app/en/usage/tool/rounded-rectangle/https://next2d.app/en/usage/tool/shape-transform/https://next2d.app/en/usage/tool/text/https://next2d.app/en/usage/tool/transform/https://next2d.app/ja/https://next2d.app/ja/casestudy/slimetenpuzzle/https://next2d.app/ja/casestudy/worldflipper/https://next2d.app/ja/privacy/https://next2d.app/ja/reference/framework/animation-tool/https://next2d.app/ja/reference/framework/config/https://next2d.app/ja/reference/framework/routing/https://next2d.app/ja/reference/framework/view/https://next2d.app/ja/reference/player/display-object/https://next2d.app/ja/reference/player/events/https://next2d.app/ja/reference/player/filters/https://next2d.app/ja/reference/player/movie-clip/https://next2d.app/ja/reference/player/shape/https://next2d.app/ja/reference/player/sound/https://next2d.app/ja/reference/player/sprite/https://next2d.app/ja/reference/player/text-field/https://next2d.app/ja/reference/player/tween/https://next2d.app/ja/reference/player/video/https://next2d.app/ja/usage/https://next2d.app/ja/usage/controller/https://next2d.app/ja/usage/controller/blend-mode/https://next2d.app/ja/usage/controller/color-transform/https://next2d.app/ja/usage/controller/filters/https://next2d.app/ja/usage/controller/frame-picker/https://next2d.app/ja/usage/controller/library/https://next2d.app/ja/usage/controller/object-setting/https://next2d.app/ja/usage/controller/sound/https://next2d.app/ja/usage/controller/stage-setting/https://next2d.app/ja/usage/controller/transform/https://next2d.app/ja/usage/screen/https://next2d.app/ja/usage/screen/align/https://next2d.app/ja/usage/screen/distribute/https://next2d.app/ja/usage/screen/layer/https://next2d.app/ja/usage/screen/tabs/https://next2d.app/ja/usage/timeline/https://next2d.app/ja/usage/timeline/custom-tweening/https://next2d.app/ja/usage/timeline/frame-keyframe/https://next2d.app/ja/usage/timeline/javascript/https://next2d.app/ja/usage/timeline/mask-layer/https://next2d.app/ja/usage/timeline/motion-tweening/https://next2d.app/ja/usage/timeline/normal-layer/https://next2d.app/ja/usage/timeline/onion-skin/https://next2d.app/ja/usage/timeline/preview/https://next2d.app/ja/usage/tool/https://next2d.app/ja/usage/tool/ellipse/https://next2d.app/ja/usage/tool/pen/https://next2d.app/ja/usage/tool/rectangle/https://next2d.app/ja/usage/tool/rounded-rectangle/https://next2d.app/ja/usage/tool/shape-transform/https://next2d.app/ja/usage/tool/text/https://next2d.app/ja/usage/tool/transform/ \ No newline at end of file +https://next2d.app/https://next2d.app/cn/https://next2d.app/cn/casestudy/slimetenpuzzle/https://next2d.app/cn/casestudy/worldflipper/https://next2d.app/cn/privacy/https://next2d.app/cn/reference/framework/https://next2d.app/cn/reference/framework/animation-tool/https://next2d.app/cn/reference/framework/config/https://next2d.app/cn/reference/framework/routing/https://next2d.app/cn/reference/framework/view/https://next2d.app/cn/reference/player/https://next2d.app/cn/reference/player/display-object/https://next2d.app/cn/reference/player/events/https://next2d.app/cn/reference/player/filters/https://next2d.app/cn/reference/player/movie-clip/https://next2d.app/cn/reference/player/shape/https://next2d.app/cn/reference/player/sound/https://next2d.app/cn/reference/player/sprite/https://next2d.app/cn/reference/player/text-field/https://next2d.app/cn/reference/player/tween/https://next2d.app/cn/reference/player/video/https://next2d.app/cn/usage/https://next2d.app/cn/usage/controller/https://next2d.app/cn/usage/controller/blend-mode/https://next2d.app/cn/usage/controller/color-transform/https://next2d.app/cn/usage/controller/filters/https://next2d.app/cn/usage/controller/frame-picker/https://next2d.app/cn/usage/controller/library/https://next2d.app/cn/usage/controller/object-setting/https://next2d.app/cn/usage/controller/sound/https://next2d.app/cn/usage/controller/stage-setting/https://next2d.app/cn/usage/controller/transform/https://next2d.app/cn/usage/screen/https://next2d.app/cn/usage/screen/align/https://next2d.app/cn/usage/screen/distribute/https://next2d.app/cn/usage/screen/layer/https://next2d.app/cn/usage/screen/tabs/https://next2d.app/cn/usage/timeline/https://next2d.app/cn/usage/timeline/custom-tweening/https://next2d.app/cn/usage/timeline/frame-keyframe/https://next2d.app/cn/usage/timeline/javascript/https://next2d.app/cn/usage/timeline/mask-layer/https://next2d.app/cn/usage/timeline/motion-tweening/https://next2d.app/cn/usage/timeline/normal-layer/https://next2d.app/cn/usage/timeline/onion-skin/https://next2d.app/cn/usage/timeline/preview/https://next2d.app/cn/usage/tool/https://next2d.app/cn/usage/tool/ellipse/https://next2d.app/cn/usage/tool/pen/https://next2d.app/cn/usage/tool/rectangle/https://next2d.app/cn/usage/tool/rounded-rectangle/https://next2d.app/cn/usage/tool/shape-transform/https://next2d.app/cn/usage/tool/text/https://next2d.app/cn/usage/tool/transform/https://next2d.app/en/https://next2d.app/en/casestudy/slimetenpuzzle/https://next2d.app/en/casestudy/worldflipper/https://next2d.app/en/privacy/https://next2d.app/en/reference/framework/https://next2d.app/en/reference/framework/animation-tool/https://next2d.app/en/reference/framework/config/https://next2d.app/en/reference/framework/routing/https://next2d.app/en/reference/framework/view/https://next2d.app/en/reference/player/https://next2d.app/en/reference/player/display-object/https://next2d.app/en/reference/player/events/https://next2d.app/en/reference/player/filters/https://next2d.app/en/reference/player/movie-clip/https://next2d.app/en/reference/player/shape/https://next2d.app/en/reference/player/sound/https://next2d.app/en/reference/player/sprite/https://next2d.app/en/reference/player/text-field/https://next2d.app/en/reference/player/tween/https://next2d.app/en/reference/player/video/https://next2d.app/en/usage/https://next2d.app/en/usage/controller/https://next2d.app/en/usage/controller/blend-mode/https://next2d.app/en/usage/controller/color-transform/https://next2d.app/en/usage/controller/filters/https://next2d.app/en/usage/controller/frame-picker/https://next2d.app/en/usage/controller/library/https://next2d.app/en/usage/controller/object-setting/https://next2d.app/en/usage/controller/sound/https://next2d.app/en/usage/controller/stage-setting/https://next2d.app/en/usage/controller/transform/https://next2d.app/en/usage/screen/https://next2d.app/en/usage/screen/align/https://next2d.app/en/usage/screen/distribute/https://next2d.app/en/usage/screen/layer/https://next2d.app/en/usage/screen/tabs/https://next2d.app/en/usage/timeline/https://next2d.app/en/usage/timeline/custom-tweening/https://next2d.app/en/usage/timeline/frame-keyframe/https://next2d.app/en/usage/timeline/javascript/https://next2d.app/en/usage/timeline/mask-layer/https://next2d.app/en/usage/timeline/motion-tweening/https://next2d.app/en/usage/timeline/normal-layer/https://next2d.app/en/usage/timeline/onion-skin/https://next2d.app/en/usage/timeline/preview/https://next2d.app/en/usage/tool/https://next2d.app/en/usage/tool/ellipse/https://next2d.app/en/usage/tool/pen/https://next2d.app/en/usage/tool/rectangle/https://next2d.app/en/usage/tool/rounded-rectangle/https://next2d.app/en/usage/tool/shape-transform/https://next2d.app/en/usage/tool/text/https://next2d.app/en/usage/tool/transform/https://next2d.app/ja/https://next2d.app/ja/casestudy/slimetenpuzzle/https://next2d.app/ja/casestudy/worldflipper/https://next2d.app/ja/privacy/https://next2d.app/ja/reference/framework/https://next2d.app/ja/reference/framework/animation-tool/https://next2d.app/ja/reference/framework/config/https://next2d.app/ja/reference/framework/routing/https://next2d.app/ja/reference/framework/view/https://next2d.app/ja/reference/player/https://next2d.app/ja/reference/player/display-object/https://next2d.app/ja/reference/player/events/https://next2d.app/ja/reference/player/filters/https://next2d.app/ja/reference/player/movie-clip/https://next2d.app/ja/reference/player/shape/https://next2d.app/ja/reference/player/sound/https://next2d.app/ja/reference/player/sprite/https://next2d.app/ja/reference/player/text-field/https://next2d.app/ja/reference/player/tween/https://next2d.app/ja/reference/player/video/https://next2d.app/ja/usage/https://next2d.app/ja/usage/controller/https://next2d.app/ja/usage/controller/blend-mode/https://next2d.app/ja/usage/controller/color-transform/https://next2d.app/ja/usage/controller/filters/https://next2d.app/ja/usage/controller/frame-picker/https://next2d.app/ja/usage/controller/library/https://next2d.app/ja/usage/controller/object-setting/https://next2d.app/ja/usage/controller/sound/https://next2d.app/ja/usage/controller/stage-setting/https://next2d.app/ja/usage/controller/transform/https://next2d.app/ja/usage/screen/https://next2d.app/ja/usage/screen/align/https://next2d.app/ja/usage/screen/distribute/https://next2d.app/ja/usage/screen/layer/https://next2d.app/ja/usage/screen/tabs/https://next2d.app/ja/usage/timeline/https://next2d.app/ja/usage/timeline/custom-tweening/https://next2d.app/ja/usage/timeline/frame-keyframe/https://next2d.app/ja/usage/timeline/javascript/https://next2d.app/ja/usage/timeline/mask-layer/https://next2d.app/ja/usage/timeline/motion-tweening/https://next2d.app/ja/usage/timeline/normal-layer/https://next2d.app/ja/usage/timeline/onion-skin/https://next2d.app/ja/usage/timeline/preview/https://next2d.app/ja/usage/tool/https://next2d.app/ja/usage/tool/ellipse/https://next2d.app/ja/usage/tool/pen/https://next2d.app/ja/usage/tool/rectangle/https://next2d.app/ja/usage/tool/rounded-rectangle/https://next2d.app/ja/usage/tool/shape-transform/https://next2d.app/ja/usage/tool/text/https://next2d.app/ja/usage/tool/transform/ \ No newline at end of file diff --git a/src/pages/[lang]/reference/framework/[...slug].astro b/src/pages/[lang]/reference/framework/[...slug].astro index 9f86e2d7..f2d79232 100644 --- a/src/pages/[lang]/reference/framework/[...slug].astro +++ b/src/pages/[lang]/reference/framework/[...slug].astro @@ -12,11 +12,11 @@ export async function getStaticPaths() { const langEntries = entries.filter(entry => entry.id.startsWith(`${lang}/`)); for (const entry of langEntries) { - // ja/index.md → slug: undefined (index page) + // ja/index.md は index.astro で処理するためスキップ // ja/view.md → slug: view let slug = entry.id.replace(`${lang}/`, '').replace('.md', ''); if (slug === 'index') { - slug = undefined; + continue; } else if (slug.endsWith('/index')) { slug = slug.replace('/index', ''); } diff --git a/src/pages/[lang]/reference/framework/index.astro b/src/pages/[lang]/reference/framework/index.astro new file mode 100644 index 00000000..511ad99c --- /dev/null +++ b/src/pages/[lang]/reference/framework/index.astro @@ -0,0 +1,110 @@ +--- +import { getCollection, render } from 'astro:content'; +import DocsLayout from '../../../../layouts/DocsLayout.astro'; +import { getTranslations, supportedLanguages, isValidLanguage } from '../../../../i18n'; + +export async function getStaticPaths() { + const paths: any[] = []; + + for (const lang of supportedLanguages) { + paths.push({ + params: { lang } + }); + } + + return paths; +} + +const { lang } = Astro.params; + +if (!isValidLanguage(lang)) { + return Astro.redirect('/ja/reference/framework/'); +} + +const t = await getTranslations(lang); +const basePath = import.meta.env.BASE_URL; + +// 言語の index.md を取得 +const entries = await getCollection('framework-specs'); +const indexEntry = entries.find(e => e.id === lang || e.id === `${lang}/index`); + +if (!indexEntry) { + return Astro.redirect(`${basePath}${lang}/`); +} + +const { Content } = await render(indexEntry); + +// Markdown の最初の# からタイトルを抽出 +const titleMatch = indexEntry.body?.match(/^#\s+(.+)$/m); +let title = titleMatch ? titleMatch[1] : 'Framework Documentation'; +// "Next2D "の重複を避ける(BaseLayout で"Next2D | "が付くため) +title = title.replace(/^Next2D\s+/, ''); + +const breadcrumbs = [ + { label: t.navbar?.home || 'Home', href: `${basePath}${lang}/` }, + { label: 'Framework', href: `${basePath}${lang}/reference/framework/` } +]; +--- + + +
    + +
    +
    + + diff --git a/src/pages/[lang]/reference/player/[...slug].astro b/src/pages/[lang]/reference/player/[...slug].astro index e8906517..0dfd42ed 100644 --- a/src/pages/[lang]/reference/player/[...slug].astro +++ b/src/pages/[lang]/reference/player/[...slug].astro @@ -12,12 +12,12 @@ export async function getStaticPaths() { const langEntries = entries.filter(entry => entry.id.startsWith(`${lang}/`)); for (const entry of langEntries) { - // ja/index.md → slug: undefined (index page) + // ja/index.md は index.astro で処理するためスキップ // ja/display-object.md → slug: display-object // ja/filters/index.md → slug: filters let slug = entry.id.replace(`${lang}/`, '').replace('.md', ''); if (slug === 'index') { - slug = undefined; + continue; } else if (slug.endsWith('/index')) { slug = slug.replace('/index', ''); } diff --git a/src/pages/[lang]/reference/player/index.astro b/src/pages/[lang]/reference/player/index.astro new file mode 100644 index 00000000..6983f4d2 --- /dev/null +++ b/src/pages/[lang]/reference/player/index.astro @@ -0,0 +1,110 @@ +--- +import { getCollection, render } from 'astro:content'; +import DocsLayout from '../../../../layouts/DocsLayout.astro'; +import { getTranslations, supportedLanguages, isValidLanguage } from '../../../../i18n'; + +export async function getStaticPaths() { + const paths: any[] = []; + + for (const lang of supportedLanguages) { + paths.push({ + params: { lang } + }); + } + + return paths; +} + +const { lang } = Astro.params; + +if (!isValidLanguage(lang)) { + return Astro.redirect('/ja/reference/player/'); +} + +const t = await getTranslations(lang); +const basePath = import.meta.env.BASE_URL; + +// 言語の index.md を取得 +const entries = await getCollection('player-specs'); +const indexEntry = entries.find(e => e.id === lang || e.id === `${lang}/index`); + +if (!indexEntry) { + return Astro.redirect(`${basePath}${lang}/`); +} + +const { Content } = await render(indexEntry); + +// Markdown の最初の# からタイトルを抽出 +const titleMatch = indexEntry.body?.match(/^#\s+(.+)$/m); +let title = titleMatch ? titleMatch[1] : 'Player Documentation'; +// "Next2D "の重複を避ける(BaseLayout で"Next2D | "が付くため) +title = title.replace(/^Next2D\s+/, ''); + +const breadcrumbs = [ + { label: t.navbar?.home || 'Home', href: `${basePath}${lang}/` }, + { label: 'Player', href: `${basePath}${lang}/reference/player/` } +]; +--- + + +
    + +
    +
    + +