@genexus/gemini

中文文档
2.0.1发布于 2024/10/02MITTypeScriptESM + CJS近 30 天下载 2745

Gemini design system

原始使用文档
文档目录14 节
  1. ⚠️ Gemini is no longer under development
  2. About Gemini
  3. Getting Started
  4. Running the tests
  5. Building for production
  6. Using this design system
  7. Script tag
  8. Node Modules
  9. Dark Theme
  10. Right to left reading direction
  11. Using this design system with Stencil
  12. Install Gemini
  13. Authors
  14. License

Built With Stencil CircleCI Netlify Status

Gemini Design System


⚠️ Gemini is no longer under development

This controls library is no longer under development. For the development of GeneXus extensions, the Chameleon Controls Library is being used together with the Mercury Design System.


About Gemini

A design system for GeneXus IDEs (GeneXus M and GeneXus for Windows). Here you can find an overview of palette, typography, styles, and components. You can try the design system components here.

Getting Started

npm install
npm start

Running the tests

To run the unit tests for the custom elements, run:

npm test

Building for production

To build the design for production, run:

npm run build

Using this design system

Script tag

  • Put a script tag similar to this <script src='https://unpkg.com/@genexus/gemini/dist/gemini.js'></script> in the head of your index.html
  • Put a link tag similar to this <link href="https://unpkg.com/@genexus/gemini/dist/gemini/gemini.css" rel="stylesheet" /> in the head of your index.html
  • Then you can start using the layout editor in your template, JSX, html etc.

Node Modules

  • Run npm install @genexus/gemini --save
  • Put a script tag similar to this <script src='node_modules/@genexus/gemini/dist/gemini.js'></script> in the head of your index.html
  • Put a link tag similar to this <link href="node_modules/@genexus/gemini/dist/gemini/gemini.css" rel="stylesheet" /> in the head of your index.html
  • Then you can start using the layout editor in your template, JSX, html etc.

Dark Theme

  • Simply add the dark class to the html tag.

Right to left reading direction

  • Gemini also works with "right to left" reading direction languages. Just set the dir attribute value to rtl on the html tag.

Using this design system with Stencil

Install Gemini

  1. npm install @genexus/gemini --save
  2. Install the SASS plugin for Stencil: npm install @stencil/sass --save-dev
  3. Edit stencil.config.ts as explained here.
  4. Also, add globalStyle in stencil.config.ts pointing to src/globals/global.scss

The stencil.config.ts file should look something like this:

import { Config } from "@stencil/core";
import { sass } from "@stencil/sass";

export const config: Config = {
   namespace: "project-name",
   outputTargets: [
      {
         type: "dist",
         esmLoaderPath: "../loader"
      },
      {
         type: "docs-readme"
      },
      {
         type: "www",
         serviceWorker: null
      }
   ],
   globalStyle: "src/globals/global.scss",
   plugins: [sass()]
};
  1. Create the global.scss file under src/globals.
  2. Add an import to Gemini's stylesheet inside global.scss:

@import "../../node_modules/@genexus/gemini/dist/gemini/gemini.css";

  1. Add an import to Gemini's JavaScript file inside src/index.ts: import "@genexus/gemini";
  2. After defining a globalStyle in point 4, your components library will output a CSS file. You must include this CSS file in your src/index.html file. The name of the stylesheet will be the same as the project name: <link rel="stylesheet" href="/build/project-name.css" />
  3. Done! You can now consume Gemini's web components and use its CSS variables: <gxg-button>Button</gxg-button>

Authors

See the list of contributors who participated in this project.

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

版本与发布记录

@genexus/gemini 共发布 635 个版本,首次发布于 2019/11/08;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.0.1latest2024/10/022 年前
1.0.32024/10/022 年前
2.0.02024/10/022 年前
1.0.22024/08/132 年前
1.0.12024/05/242 年前
1.0.02024/05/222 年前

关于 @genexus/gemini 的常见问题

@genexus/gemini 是什么?

Gemini design system

如何安装 @genexus/gemini?

在项目目录运行 npm install @genexus/gemini,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@genexus/chameleon-controls-library(>=6.0.0-next.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@genexus/gemini 支持 TypeScript 吗?

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

@genexus/gemini 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@genexus/gemini 可以商用吗?

@genexus/gemini 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@genexus/gemini 的下载量有多少?

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

@genexus/gemini 还在维护吗?

最新版本 2.0.1 发布于 2024/10/02(2 年前);至今共发布 635 个版本,其中过去 12 个月发布了 0 个;首次发布于 2019/11/08。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。