Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

5.0 KB
Raw Blame

.emojis {
  --emojis-background: var(--b3-theme-surface);

  word-break: break-all;
  white-space: normal;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  height: 100%;
  box-sizing: border-box;

  &__tabheader {
    display: flex;
    border-bottom: 1px solid var(--b3-border-color);
    padding: 0 8px 8px;
  }

  &__tabbody {
    flex: 1;
    overflow: auto;

    div[data-type="tab-emoji"] {
      display: flex;
      flex-direction: column;
      height: 100%;
    }
  }

  .emoji__dynamic {
    &-item {
      width: 73px;
      margin: 8px;
      cursor: pointer;
      transition: var(--b3-transition);

      &:hover,
      &--current {
        background-color: var(--b3-theme-background);
        border-radius: var(--b3-border-radius);
        box-shadow: 0 0 0 1px var(--b3-list-hover) inset, 0 0 0 4px var(--b3-theme-background);
      }
    }

    &-color {
      padding: 8px 8px 4px 4px;
    }
  }

  &__item {
    box-sizing: border-box;
    font-size: 19px;
    font-family: var(--b3-font-family-emoji);
    font-variant-emoji: emoji;
    text-align: center;
    height: 32px;
    padding: 4px;
    cursor: pointer;
    display: inline-block;
    transition: var(--b3-transition);
    background-color: transparent;
    border: 0;
    margin: 1px;
    overflow: hidden;
    border-radius: var(--b3-border-radius);
    width: 32px;

    img, svg {
      height: 24px;
      display: block;
      width: 24px;
    }

    &--current,
    &:hover {
      background: var(--b3-list-hover);
    }
  }

  &__title {
    position: sticky;
    z-index: 1;
    top: 0;
    color: var(--b3-theme-on-surface);
    background-color: var(--emojis-background);
    padding: 8px 4px 4px 4px;
  }

  &__section {
    position: relative;

    &:first-child > .emojis__title {
      padding-top: 0;
    }
  }

  &__panel {
    flex: 1;
    overflow: auto;
    margin-right: 4px;
    padding: 0 4px 0 8px;
  }

  &__link {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
    outline: none;
    padding: 16px;

    &-empty,
    &-input,
    &-detail {
      display: flex;
      flex: 1;
      flex-direction: column;
      min-height: 0;
    }

    &-empty {
      &-content {
        display: flex;
        flex: 1;
        flex-direction: column;
      }
    }

    &-source {
      align-self: center;
      margin-top: 12px;
    }

    &-upload {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      height: 120px;
      border: 0;
      border-radius: var(--b3-border-radius-b);
      background-color: var(--b3-theme-surface-lighter);
      color: var(--b3-theme-on-surface);
      cursor: pointer;
      font-size: 16px;

      svg {
        width: 20px;
        height: 20px;
      }

      &:hover {
        background-color: var(--b3-list-hover);
      }
    }

    &-tip {
      margin-top: 12px;
      text-align: center;
    }

    &-value {
      textarea {
        height: 120px;
        margin-top: 4px;
        resize: none;
        word-break: break-all;
      }
    }

    &-preview {
      display: flex;
      align-items: center;
      flex: 0 0 120px;
      flex-direction: column;
      justify-content: center;
      border-radius: var(--b3-border-radius-b);
      background-color: var(--b3-theme-surface-lighter);
    }

    &-samples {
      display: flex;
      gap: 8px;
    }

    &-sample {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 72px;
      height: 72px;
      border: 1px solid var(--b3-border-color);
      border-radius: var(--b3-border-radius-b);

      &--light {
        background-color: #fff;
      }

      &--dark {
        background-color: #1e1e1e;
      }

      img {
        width: 56px;
        height: 56px;
        object-fit: contain;
      }
    }

    &-name {
      margin-top: 16px;

      .b3-text-field {
        margin-top: 4px;
      }
    }

    &-footer {
      display: flex;
      flex-shrink: 0;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      padding-top: 16px;

      &--choice {
        flex-wrap: wrap;
      }
    }

    &-choice-back {
      margin-right: auto;
    }
  }

  &__content {
    display: flex;
    flex-wrap: wrap;
  }

  &__chunk {
    overflow: hidden;
    contain: layout paint;
  }

  &__types {
    display: flex;
    flex-shrink: 0;
    gap: 2px;
    padding: 4px 8px 0;
  }

  &__type {
    cursor: pointer;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 28px;
    line-height: 1;
    transition: var(--b3-list-hover);
    font-size: 16px;
    background-color: transparent;
    border: 0;
    border-radius: var(--b3-border-radius);
    padding: 0;
    font-family: var(--b3-font-family-emoji);
    font-variant-emoji: emoji;

    &--current,
    &:hover {
      background-color: var(--b3-theme-surface-lighter);
    }

    svg {
      height: 16px;
      width: 16px;
    }
  }
}

.protyle-hint .emojis {
  --emojis-background: var(--b3-menu-background);
}