@aurigma/design-atoms

中文文档
7.4.0发布于 2026/10/19SEE LICENSE IN License.mdTypeScript近 30 天下载 6541

Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.

原始使用文档
文档目录5 节
  1. Getting started
  2. Install Design Atoms frontend library
  3. Creating a custom backend
  4. Connecting to Backend
  5. What's next?

Aurigma Customer's Canvas SDK - Design Atoms Framework

Design Atoms is a part of Customer's Canvas SDK which allows manipulating individual elements of a design edited in the Customer's Canvas web-to-print editor. If you think of Customer's Canvas editor as a browser, you may consider Design Atoms as a DOM API.

For example, you may import a template to Customer's Canvas, then use Design Atoms to iterate all items, find, say, text elements named, say, Name and change its value. Or you can create a brand new design and pass it to Customer's Canvas.

Important! This package won't work alone. Design Atoms consists of a frontend part (this package) and a backend part (search for a package called Aurigma.DesignAtoms in NuGet). To be able to use Design Atoms, you need to connect it to a backend. See below for details.

Getting started

Install Design Atoms frontend library

Just run

npm install @aurigma/design-atoms --save

Then, you may import modules to your project and start using them.

import { Product } from "@aurigma/design-atoms/Model/Product";

let product = new Product([new Surface(100, 100)]);
// ...  

However, to be able to use it in a full force, you need to connect it with a backend.

There are two main ways to get a backend - create your own backend using the Aurigma.DesignAtoms NuGet package or hook it to an existing Customer's Canvas instance.

Creating a custom backend

This way is a good option if you don't need the editor but rather need to manipulate designs through the JavaScript/TypeScript or C# code and render the result in your application. Also, it is a way to go if you want to create a custom editor based on the Viewer control. Another purpose is to handle the output from Customer's Canvas in a separate application.

To do it, you need to create a .NET Web API project, add a reference to Aurigma.DesignAtoms NuGet package and expose the necessary endpoints.

You can download a sample backend implementation from GitHub and use this sample solution as a separate object or merge it with your existing ASP.NET application.

Connecting to Backend

You can use a running instance of either custom backend or Customer's Canvas 7. To connect to your backend, add the following code.

const backendUrl = "http://<yourInstanceUrl>";
const holderId = "#id-of-your-div";
const holder = document.querySelector(holderId) as HTMLDivElement;
const viewer = new Viewer({
    holderElement: holder,
    backendUrl: backendUrl,
    canvasBackground: { color: "white" }
});

What's next?

Refer Customer's Canvas documentation for more details on how to use this package:

版本与发布记录

@aurigma/design-atoms 共发布 274 个版本,首次发布于 2019/04/23;过去 12 个月发布了 15 个版本。

版本发布日期距今
7.4.0latest2026/10/1919 天前
7.3.62026/09/101 个月前
7.3.42026/08/063 个月前
7.3.22026/07/074 个月前
7.2.82026/06/104 个月前
7.2.72026/06/045 个月前

关于 @aurigma/design-atoms 的常见问题

@aurigma/design-atoms 是什么?

Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.

如何安装 @aurigma/design-atoms?

在项目目录运行 npm install @aurigma/design-atoms,或使用 pnpm add / yarn add / bun add。

@aurigma/design-atoms 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@aurigma/design-atoms 可以商用吗?

@aurigma/design-atoms 使用 SEE LICENSE IN License.md 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@aurigma/design-atoms 的下载量有多少?

根据 npm 官方下载统计,@aurigma/design-atoms 在 2026/10/07 – 2026/11/05 这 30 天内被下载 6,541 次,日均约 218 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aurigma/design-atoms 还在维护吗?

最新版本 7.4.0 发布于 2026/10/19(19 天前);至今共发布 274 个版本,其中过去 12 个月发布了 15 个;首次发布于 2019/04/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。