Giter VIP home page Giter VIP logo

nuxt-pandacss's Introduction

Anurag's GitHub stats Top Langs

nuxt-pandacss's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

shingangan

nuxt-pandacss's Issues

feat: Support `autoImports` options

Feature Issue

私は普段のNuxt開発においてstyled-systemをAuto-importsして利用しています。
Auto-imports設定を利用することでcss()cva()stack()などよく使用するメソッドをimport不要で使え開発体験が向上しています。

本モジュール側でNuxt Auto-imports機能をサポートできるとユーザー側での追加設定が不要となり、開発体験にに良い影響を与えられるのではないかと考えています。
そのため、本モジュールにおけるAuto-imports optionの追加可否を検討できたらと思っています。

Context

昨今、Nuxtモジュール側でAuto-importsをサポートする例が増えています。例えば、以下のモジュールです。

また@vueuse/nuxtモジュールは設定不要でAuto-imports機能が利用できる様になっています。

以上のように、Nuxtモジュール側でAuto-importsの設定可否を選択できるモジュールは今後も増えてくることが予想されます。
他モジュールと開発体験を合わせることでユーザー体験に良い影響を与えられるのではないかと考えています。

Design (my opinion)

autoImports optionを追加し、設定値によってauto-importsの設定追加可否を決定する。
下記の設定方法@vee-validate/nuxtを参考にしています。

// types.ts
export interface ModuleOptions extends Config {
  configPath?: string;
  cssPath?: string;
+ /**
+  * @default 'false'
+  */
+  autoImports: boolean;
}

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Using npm packages for Renovate presets is now deprecated. Please migrate to repository-based presets instead.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/release-please.yml
  • google-github-actions/release-please-action v4.0.2@cc61a07e2da466bebbc19b3a7dd01d6aecb20d1e
.github/workflows/release.yml
  • actions/checkout v4
  • pnpm/action-setup v3.0.0
  • actions/setup-node v4
npm
docs/package.json
  • @iconify-json/heroicons ^1.1.19
  • @iconify-json/simple-icons ^1.1.90
  • @nuxt/content ^2.11.0
  • @nuxtjs/fontaine ^0.4.1
  • @nuxtjs/google-fonts ^3.1.3
  • nuxt-og-image ^2.2.4
  • @nuxthq/studio ^1.0.10
package.json
  • @nuxt/kit 3.9.3
  • @pandacss/dev ^0.27.3
  • @pandacss/node ^0.27.3
  • pathe ^1.1.2
  • @nuxt/devtools ^1.0.8
  • @nuxt/eslint-config ^0.2.0
  • @nuxt/module-builder ^0.5.5
  • @nuxt/schema 3.9.3
  • @nuxt/test-utils 3.11.0
  • @types/node ^20.11.10
  • changelogen ^0.5.5
  • eslint ^8.56.0
  • nuxt 3.9.3
  • vitest ^1.2.2
  • pnpm 8.15.0
playground/package.json

  • Check this box to trigger a request for Renovate to run again on this repository

Bug: settings are not reflected when settings configPath options.

観測したバグ・原因

発生した事象

configPath オプションを利用してpanda.config.tsの設定を行いました。
すると、panda.configで設定した内容がstyled-system/*に反映されていませんでした。

備考1:/playground/nuxt.config.tsと同様の設定を行った場合、問題ない設定の反映を確認済み。
備考2: nuxt.config.tsで設定した場合、@pandacss/preset-pandaを用いたpresetsテーマの利用も問題なく出来ています。

原因

findConfigFile()関数を用いてpanda.configのサーチを行っているが、引数でoptions.configPathを渡していない。
options.configPathを渡していないため、options.configPathの設定可否に関わらず<buildDir>/panda.config.mjsが生成される形となる。

const configFile = findConfigFile({ cwd });

対応PR

docs: add Storybook usage guide

Context

Components stories such as Storybook, Histoire, etc. are often prepared for web application development.
With vite support for Storybook, I believe there are many opportunities for users to use Storybook together with Panda CSS Module (I use Panda CSS + Storybook + Storybook Module in my product development).

Considering the opportunities for users, it would be great if Panda CSS Module can provide storybook: boolean option + automatic setup.
However, we also think it is beyond the responsibility of Panda CSS Module. Might as well keep it to "clearly state how to use in Docs".

So, I would like to hear the owner's ( @wattanx ) view.

Design: if you want to provide a storybook option.

if storybook(sb) = true:

  1. install Storybook Module and npx storybook-module init
  2. add Storybook Module to nuxt.config.ts

Note

We consider the result of the discussion of this feature to have an impact of one minor version up.
Therefore, we recognize that the priority of response and discussion is low (because it does not require urgency, such as a malfunctioning bug).

Ref

feat: Support `alias` Options

Context

現在、aliasオプションはstyled-system固定値となっている。

outdir名を変更した場合、このalias設定が固有値なためimportで失敗する。
例えば、outdir: .pandacssに変更した場合などである。

そこでalias OptionsをNuxt Module Optionsとしてサポートする。

Note

本PRと合わせて以下2点のrefactorも混ぜられたらと考えています(レビュー対応数の削減目的。目的ごとにPR分けた方がよければPR分けます。言及なければ混ぜてしまいますのでお気軽に指摘ください) 

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.