Coder Social home page Coder Social logo

yuta-hidaka / numba-solidjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from monstar-lab-oss/numba-solidjs

0.0 0.0 0.0 2.99 MB

This tool provides easy assigning the numbers to your designs.

Home Page: https://www.figma.com/community/plugin/1222075513348183192/NUMBA

License: MIT License

JavaScript 1.18% TypeScript 89.27% CSS 8.28% HTML 0.29% MDX 0.98%

numba-solidjs's Introduction

NUMBA

License: MIT

Figma plugin for easy numbering with 1-click.

Installation

Install it with pnpm:

pnpm i

Getting started with plugin development

First start vite:

pnpm dev

It will automatically build if you make changes to the code.

Then in Figma go to File Menu > Plugins > Development > Import plugin from manifest... and select the manifest.json file.

Build

Builds the app for production to the dist folder.

pnpm build

Update to new versions

Please refer to the Release-Assets page for this and other information.

Architecture

How rendering works

Renderer architecture displayed on the scheme:

mermaid
graph LR

subgraph Figma
  M[main]
end

M ----|message| S[Store]

subgraph UI
  H[Hooks] -->|dispatch| S

  C1[Component] --> H
  C2[Component] --> H
  C3[Component] --> H

  S -->|render| C1
  S -->|render| C2
  S -->|render| C3
end

File structure

├── manifest.json
├── src
|  ├── app.tsx
|  ├── components
|  |  ├── ComponentName.module.css
|  |  ├── ComponentName.stories.tsx
|  |  └── ComponentName.tsx
|  ├── constants.ts
|  ├── lib
|  |  ├── dispatch.ts
|  |  ├── hooks
|  |  ├── store.ts
|  |  └── utils
|  └── main.ts
└──   types
  • /manifest.json - Figma plugin need to be configured with manifest.json should contains main and ui threads.
  • /src
    • app.tsx - Core of UI renderer based on Solid.
    • /components - UI functions that return JSX and called by JSX in other components.
    • /constants - Literal values that can be called from any expression.
    • /lib
      • /dispatch - A function to posts a message to the main and ui threads.
      • /hooks - Functions to reuse stateful logic with fully isolated states.
      • /store.ts - Proxy objects that allow a tree of signals to be independently tracked and modified.
      • /utils - Helper functions.
    • /main.ts - Functions that can create/update specific Figma nodes and handle the messages.
    • /types - Common type of components.

numba-solidjs's People

Contributors

yuta-hidaka avatar jinmayamashita avatar github-actions[bot] avatar n-igarashi avatar test-user-jinma-ml avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.