Skip to content

Commit

Permalink
[COMPLIANCE] Add Copyright and License Headers
Browse files Browse the repository at this point in the history
  • Loading branch information
hashicorp-copywrite[bot] authored Jun 26, 2023
1 parent 15e6f2c commit 9ba57e4
Show file tree
Hide file tree
Showing 58 changed files with 290 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/basic/app/(app)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export default function RootLayout({
children,
}: {
Expand Down
5 changes: 5 additions & 0 deletions examples/basic/app/(app)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export default function Index() {
return <h1>Hello world</h1>
}
5 changes: 5 additions & 0 deletions examples/basic/app/(swingset)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import layout from 'swingset/theme'

export default layout
5 changes: 5 additions & 0 deletions examples/basic/app/(swingset)/swingset/[...path]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { generateStaticParams } from 'swingset/meta'
import { Page } from 'swingset/theme'

Expand Down
5 changes: 5 additions & 0 deletions examples/basic/app/(swingset)/swingset/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import Content from './content.mdx'

export default async function SwingsetRoot() {
Expand Down
5 changes: 5 additions & 0 deletions examples/basic/components/accordion/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { ReactElement } from 'react'

interface AccordionProps {
Expand Down
5 changes: 5 additions & 0 deletions examples/basic/components/button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { ReactElement } from 'react'

interface ButtonProps {
Expand Down
5 changes: 5 additions & 0 deletions examples/basic/components/card/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export function Card({ children }) {
return (
<div style={{ border: '1px solid gray', borderRadius: '4px' }}>
Expand Down
5 changes: 5 additions & 0 deletions examples/basic/components/checkbox/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export function Checkbox(props) {
return <input type="checkbox" {...props} />
}
5 changes: 5 additions & 0 deletions examples/basic/components/nested/title/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export function Title({ children }) {
return <h1>{children}</h1>
}
5 changes: 5 additions & 0 deletions examples/basic/components/text-input/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export function TextInput(props) {
return <input {...props} />
}
5 changes: 5 additions & 0 deletions examples/basic/components/text/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export default function Text({ children }) {
return <span>{children}</span>
}
5 changes: 5 additions & 0 deletions examples/basic/mdx-components.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import themeComponents from 'swingset-theme-hashicorp/components'

export function useMDXComponents(components) {
Expand Down
5 changes: 5 additions & 0 deletions examples/basic/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

/// <reference types="next" />
/// <reference types="next/image-types/global" />

Expand Down
5 changes: 5 additions & 0 deletions examples/basic/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import withSwingset from 'swingset'
import remarkGfm from 'remark-gfm'

Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

module.exports = {
plugins: {
'postcss-import': {},
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/src/components.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { PropsTable } from './components/props-table'
import { Heading } from './components/heading'

Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/src/components/heading.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { type HTMLAttributes } from 'react'
import { cx, cva } from 'class-variance-authority'

Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/src/components/link.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { type ComponentProps } from 'react'
import NextLink from 'next/link'
import { cx } from 'class-variance-authority'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

'use client'

export function OpenInEditor({ path }: { path: string }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { ComponentType, ReactNode } from 'react'

interface PropsTableProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { NavigationNode, ComponentNode } from 'swingset/types'
import { LinkItem } from './link-item'
import { cx } from 'class-variance-authority'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { NavigationTree } from 'swingset/types'
import Category from './category'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { Link } from "../link"
import { cx } from "class-variance-authority"

Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/src/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

@tailwind base;
@tailwind components;
@tailwind utilities;
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

// NOTE: global css import needs to be at the top so component-specific CSS is loaded after the theme reset (component-specific CSS is loaded as a result of the swingset/meta import below)
import '../style.css'

Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/src/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { ComponentEntity, EvaluatedEntity } from 'swingset/types'
import { Heading } from './components/heading'
import { OpenInEditor } from './components/open-in-editor'
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/tailwind.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

/** @type {import('tailwindcss').Config} */
module.exports = {
prefix: 'ss-',
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { Buffer } from 'node:buffer'
import { defineConfig } from 'tsup'

Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/__tests__/get-navigation-tree.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { describe, it } from 'vitest'
import { getNavigationTree } from '../src/get-navigation-tree'
import { ComponentEntity, NavigationTree } from '../src/types'
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/__tests__/parse-component-path.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { describe, it } from 'vitest'
import { parseComponentPath } from '../src/parse-component-path'

Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/loader.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

/**
* @typedef {import('webpack').LoaderContext<unknown>} LoaderContext
*
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

module.exports = {
plugins: {
'postcss-import': {},
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { CompileOptions } from '@mdx-js/mdx'

const DEFAULT_CONFIG = {
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export const MARKDOWN_EXTENSION_REGEX = /\.mdx?$/
export const COMPONENT_DOCS_FILENAME = 'docs.mdx'

Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/src/create-page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import React from 'react'
// note: this uses swingset/meta as the import statement, instead of a relative path, so the application build step can pick this up
import { getEntity } from 'swingset/meta'
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/src/default-theme/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

@tailwind base;
@tailwind components;
@tailwind utilities;
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/src/default-theme/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import React from 'react'
import Link from 'next/link'
// note: this uses swingset/meta as the import statement, instead of a relative path, so the application build step can pick this up
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/src/default-theme/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export default async function Page({
data,
content,
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/src/get-frontmatter.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { VFile } from 'vfile'
import { matter } from 'vfile-matter'

Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/src/get-navigation-tree.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import {
ComponentEntity,
DocsEntity,
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/src/get-props.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import path from 'node:path'
import fs from 'node:fs'

Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import type { NextConfig } from 'next'
import {
MARKDOWN_EXTENSION_REGEX,
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset/src/loader.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import path from 'node:path'
import { compile, CompileOptions } from '@mdx-js/mdx'
import { VFile } from 'vfile'
Expand Down
Loading

0 comments on commit 9ba57e4

Please sign in to comment.