Coder Social home page Coder Social logo

catsjuice / dockbar Goto Github PK

View Code? Open in Web Editor NEW
137.0 137.0 8.0 1.3 MB

A macOS-like dock component made with WebComponents

Home Page: https://dock.oooo.so

License: MIT License

JavaScript 4.42% HTML 8.44% TypeScript 38.28% CSS 1.67% Dockerfile 0.51% Vue 44.79% SCSS 1.89%
dock macos-dock macos-hack

dockbar's Introduction

dockbar's People

Contributors

catsjuice avatar lotwt avatar

Stargazers

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

Watchers

 avatar  avatar

dockbar's Issues

Formatting HTML Breaks This Package

Issue: Formatting HTML Breaks This Package

Description
When formatting the HTML(usually done by VS Code's auto formatting), the component does not behave as expected. The issue occurs when the HTML is formatted with indents and newline characters. The non-formatted version of the HTML works fine, but after formatting, the functionality breaks.

Steps to reproduce

  1. In packages/dockbar/index.html, add a new hardcoded dock-item in the dock wrapper

    <dock-wrapper class="glass" id="dock">
    	<dock-item><div class="my-item full flex-center">T</div></dock-item>
    </dock-wrapper>
    

    this went well as expected

  2. Format the code above as

    <dock-wrapper class="glass" id="dock">
      <dock-item>
        <div class="my-item full flex-center">T</div>
      </dock-item>
    </dock-wrapper>
    

    then the dock became static with wrong styles.
    CleanShot 2023-07-15 at 15 00 26@2x

Environment

  • OS: macOS Ventura & Ubuntu 22 LTS
  • Node Version: 20.4.0
  • pnpm version: 8.6.6
  • Browser: Chrome
  • Package Version: 0.1.0

Additional context
I initially encountered this issue when using VS Code, which automatically formats HTML on save. This issue could be a major inconvenience for developers who have auto-formatting enabled in their IDEs.

Is it a better way to add framework-oriented dts files for better typescript support?

I tried this fantastic dockbar in React and it's my first time to use Web Component in React.

issue

I need to add the following type definitions for better use and I still can't get the right props.

declare namespace JSX {
  interface IntrinsicElements {
    "dock-wrapper": any
    "dock-item": any
  }
}

expectation

Is it a better way that the repo offers dts files?
Or it is just my turn to add them to my repo?

optimize publish related settings

Situation

In #9, it fixes the playground import in a hacked way which adds the ./dist field of the exports in the package.json.

Alternative solution

I think adding a files field in the package.json is a better solution.

  • remove the ./dist of the publish() in the .build.mjs
  • add files in the package.json
    {
      "files": ["dist"]
    }
  • update related fields in the package.json such as exports, main, module, and types
  • pnpm build and can also run npm pack --dry-run to see the tarball contents if need
  • change the import statements in the playground

After doing the above, I think the imports and exports are unified.

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.