Changes
32 changed files (+120/-112)
-
-
@@ -1,18 +1,18 @@import { attr, el } from "./dom"; import * as figma from "./figma"; import { FrameCanvas } from "./FrameCanvas/FrameCanvas"; import { attr, el } from "./dom.js"; import * as figma from "./figma.js"; import { FrameCanvas } from "./FrameCanvas/FrameCanvas.js"; import { defaultPreferenecs, isEqual as isEqualPreferences, type Preferences, } from "./preferences"; import { compute, effect, Signal } from "./signal"; import { styles } from "./styles"; import * as state from "./state"; } from "./preferences.js"; import { compute, effect, Signal } from "./signal.js"; import { styles } from "./styles.js"; import * as state from "./state.js"; import { ui } from "./ui/ui"; import { infoItems } from "./ui/infoItems/infoItems"; import { selectBox } from "./ui/selectBox/selectBox"; import { ui } from "./ui/ui.js"; import { infoItems } from "./ui/infoItems/infoItems.js"; import { selectBox } from "./ui/selectBox/selectBox.js"; export class FigspecFileViewer extends HTMLElement { #link = new Signal<string | null>(null);
-
-
-
@@ -1,17 +1,17 @@import { attr, el } from "./dom"; import type * as figma from "./figma"; import { FrameCanvas } from "./FrameCanvas/FrameCanvas"; import { attr, el } from "./dom.js"; import type * as figma from "./figma.js"; import { FrameCanvas } from "./FrameCanvas/FrameCanvas.js"; import { defaultPreferenecs, isEqual as isEqualPreferences, type Preferences, } from "./preferences"; import { compute, effect, Signal } from "./signal"; import { styles } from "./styles"; import * as state from "./state"; } from "./preferences.js"; import { compute, effect, Signal } from "./signal.js"; import { styles } from "./styles.js"; import * as state from "./state.js"; import { ui } from "./ui/ui"; import { infoItems } from "./ui/infoItems/infoItems"; import { ui } from "./ui/ui.js"; import { infoItems } from "./ui/infoItems/infoItems.js"; export class FigspecFrameViewer extends HTMLElement { #link = new Signal<string | null>(null);
-
-
-
@@ -1,4 +1,4 @@import type * as figma from "../figma"; import type * as figma from "../figma.js"; /** * Measure bounding box for nodes.
-
-
-
@@ -1,13 +1,13 @@import { attr, className, el, on, style, svg } from "../dom"; import * as figma from "../figma"; import { roundTo } from "../math"; import { type Preferences } from "../preferences"; import { effect, Signal } from "../signal"; import { attr, className, el, on, style, svg } from "../dom.js"; import * as figma from "../figma.js"; import { roundTo } from "../math.js"; import { type Preferences } from "../preferences.js"; import { effect, Signal } from "../signal.js"; import { BoundingBoxMeasurement } from "./BoundingBoxMeasurement"; import { getDistanceGuides } from "./distanceGuide"; import { getRenderBoundingBox } from "./getRenderBoundingBox"; import * as TooltipLayer from "./TooltipLayer"; import { BoundingBoxMeasurement } from "./BoundingBoxMeasurement.js"; import { getDistanceGuides } from "./distanceGuide.js"; import { getRenderBoundingBox } from "./getRenderBoundingBox.js"; import * as TooltipLayer from "./TooltipLayer.js"; const enum DragState { Disabled = 0,
-
-
-
@@ -1,4 +1,4 @@import { attr, className, svg } from "../dom"; import { attr, className, svg } from "../dom.js"; export const CENTER = 0x0; export const LEFT = 0x1;
-
-
-
@@ -1,4 +1,4 @@import type * as figma from "../figma"; import type * as figma from "../figma.js"; interface Point2D { x: number;
-
-
-
@@ -1,4 +1,4 @@import * as figma from "../figma"; import * as figma from "../figma.js"; // Intermediate value, context object. interface MinMaxXY {
-
-
-
@@ -1,4 +1,4 @@import { effect, Signal } from "./signal"; import { effect, Signal } from "./signal.js"; export type ElementFn<T extends HTMLElement | SVGElement> = (el: T) => void;
-
-
-
@@ -1,5 +1,5 @@import { FigspecFrameViewer } from "./FigspecFrameViewer"; import { FigspecFileViewer } from "./FigspecFileViewer"; import { FigspecFrameViewer } from "./FigspecFrameViewer.js"; import { FigspecFileViewer } from "./FigspecFileViewer.js"; if (!customElements.get("figspec-file-viewer")) { customElements.define("figspec-file-viewer", FigspecFileViewer);
-
-
-
@@ -1,4 +1,4 @@import { styles as uiStyles } from "./ui/styles"; import { styles as uiStyles } from "./ui/styles.js"; const commonHostStyles = /* css */ ` :host {
-
-
-
@@ -1,5 +1,5 @@import { className, el } from "../../dom"; import { fullscreenPanel } from "../fullscreenPanel/fullscreenPanel"; import { className, el } from "../../dom.js"; import { fullscreenPanel } from "../fullscreenPanel/fullscreenPanel.js"; export const styles = /* css */ ` .em-container {
-
-
-
@@ -1,7 +1,7 @@import { attr, el, className, svg } from "../../dom"; import { effect } from "../../signal"; import { attr, el, className, svg } from "../../dom.js"; import { effect } from "../../signal.js"; import { iconButton } from "../iconButton/iconButton"; import { iconButton } from "../iconButton/iconButton.js"; export const styles = /* css */ ` .fp-root {
-
-
-
@@ -1,4 +1,4 @@import { attr, className, el, on } from "../../dom"; import { attr, className, el, on } from "../../dom.js"; export const styles = /* css */ ` .ib-button {
-
-
-
@@ -1,5 +1,5 @@import { attr, className, el } from "../../dom"; import { compute, Signal } from "../../signal"; import { attr, className, el } from "../../dom.js"; import { compute, Signal } from "../../signal.js"; export const styles = /* css */ ` .ii-list {
-
-
-
@@ -1,12 +1,12 @@import { attr, className, el, style } from "../../dom"; import { roundTo } from "../../math"; import { type Preferences } from "../../preferences"; import { attr, className, el, style } from "../../dom.js"; import { roundTo } from "../../math.js"; import { type Preferences } from "../../preferences.js"; import { type CSSStyle, type CSSStyleValue, CSSStyleValueTypes, } from "./cssgen/cssgen"; } from "./cssgen/cssgen.js"; export const styles = /* css */ ` .cc-container {
-
-
-
@@ -1,4 +1,4 @@import type * as figma from "../../../figma"; import type * as figma from "../../../figma.js"; /** * Returns whether the given color is a _transparent black_ (value of the `transparent` keyword).
-
-
-
@@ -1,3 +1,3 @@export * from "./CSSStyle"; export { fromNode } from "./fromNode"; export { serializeStyle, serializeValue } from "./serialize"; export * from "./CSSStyle.js"; export { fromNode } from "./fromNode.js"; export { serializeStyle, serializeValue } from "./serialize.js";
-
-
-
@@ -1,10 +1,10 @@import * as figma from "../../../figma"; import { type Preferences } from "../../../preferences"; import * as figma from "../../../figma.js"; import { type Preferences } from "../../../preferences.js"; import { isTransparent, srgbToDisplayP3 } from "./colors"; import { CSSStyle, CSSStyleValue, CSSStyleValueTypes } from "./CSSStyle"; import { getLinearGradientAngle } from "./gradient"; import { serializeValue } from "./serialize"; import { isTransparent, srgbToDisplayP3 } from "./colors.js"; import { CSSStyle, CSSStyleValue, CSSStyleValueTypes } from "./CSSStyle.js"; import { getLinearGradientAngle } from "./gradient.js"; import { serializeValue } from "./serialize.js"; export function fromNode( node: figma.Node,
-
-
-
@@ -1,4 +1,4 @@import type * as figma from "../../../figma"; import type * as figma from "../../../figma.js"; /** * @returns Angle in degrees
-
-
-
@@ -1,7 +1,7 @@import { roundTo } from "../../../math"; import { type Preferences } from "../../../preferences"; import { roundTo } from "../../../math.js"; import { type Preferences } from "../../../preferences.js"; import { CSSStyle, CSSStyleValue, CSSStyleValueTypes } from "./CSSStyle"; import { CSSStyle, CSSStyleValue, CSSStyleValueTypes } from "./CSSStyle.js"; export function serializeValue( value: CSSStyleValue,
-
-
-
@@ -1,4 +1,4 @@import { attr, svg, type ElementFn } from "../../dom"; import { attr, svg, type ElementFn } from "../../dom.js"; export function close( attrs: readonly ElementFn<SVGSVGElement>[] = [],
-
-
-
@@ -1,14 +1,14 @@import { className, el, on } from "../../dom"; import * as figma from "../../figma"; import { roundTo } from "../../math"; import { type Preferences } from "../../preferences"; import { compute, effect, Signal } from "../../signal"; import { className, el, on } from "../../dom.js"; import * as figma from "../../figma.js"; import { roundTo } from "../../math.js"; import { type Preferences } from "../../preferences.js"; import { compute, effect, Signal } from "../../signal.js"; import { type SnackbarContent } from "../snackbar/snackbar"; import { type SnackbarContent } from "../snackbar/snackbar.js"; import { cssCode, styles as cssCodeStyles } from "./cssCode"; import * as cssgen from "./cssgen/cssgen"; import { section } from "./section"; import { cssCode, styles as cssCodeStyles } from "./cssCode.js"; import * as cssgen from "./cssgen/cssgen.js"; import { section } from "./section.js"; export const styles = /* css */ `
-
-
-
@@ -1,8 +1,8 @@import { attr, className, el } from "../../dom"; import { attr, className, el } from "../../dom.js"; import { iconButton } from "../iconButton/iconButton"; import { iconButton } from "../iconButton/iconButton.js"; import * as icons from "./icons"; import * as icons from "./icons.js"; interface SectionProps { title: string;
-
-
-
@@ -1,4 +1,4 @@import { attr, className, svg, style } from "../../dom"; import { attr, className, svg, style } from "../../dom.js"; export const icons = { info: () =>
-
-
-
@@ -1,7 +1,7 @@import { attr, className, el } from "../../dom"; import { attr, className, el } from "../../dom.js"; import { iconButton } from "../iconButton/iconButton"; import { icons } from "./icons"; import { iconButton } from "../iconButton/iconButton.js"; import { icons } from "./icons.js"; export const styles = /* css */ ` .mb-root {
-
-
-
@@ -1,7 +1,7 @@import { attr, className, el, prop, on } from "../../dom"; import { compute, Signal } from "../../signal"; import { attr, className, el, prop, on } from "../../dom.js"; import { compute, Signal } from "../../signal.js"; import { check } from "./icons"; import { check } from "./icons.js"; export const styles = /* css */ ` .pp-choice-container {
-
-
-
@@ -1,4 +1,4 @@import { attr, svg, type ElementFn } from "../../dom"; import { attr, svg, type ElementFn } from "../../dom.js"; export function check( attrs: readonly ElementFn<SVGSVGElement>[] = [],
-
-
-
@@ -1,9 +1,9 @@import { attr, className, el, type ElementFn, on, prop } from "../../dom"; import { roundTo } from "../../math"; import { type Preferences } from "../../preferences"; import { compute, Signal } from "../../signal"; import { attr, className, el, type ElementFn, on, prop } from "../../dom.js"; import { roundTo } from "../../math.js"; import { type Preferences } from "../../preferences.js"; import { compute, Signal } from "../../signal.js"; import { choice, styles as choiceStyles } from "./choice"; import { choice, styles as choiceStyles } from "./choice.js"; export const styles = /* css */ `
-
-
-
@@ -1,5 +1,13 @@import { attr, className, el, on, raf, svg, type ElementFn } from "../../dom"; import { compute, Signal } from "../../signal"; import { attr, className, el, on, raf, svg, type ElementFn, } from "../../dom.js"; import { compute, Signal } from "../../signal.js"; export const styles = /* css */ ` .sl-wrapper {
-
-
-
@@ -1,5 +1,5 @@import { attr, className, el, type ElementFn } from "../../dom"; import { compute, effect, type Signal } from "../../signal"; import { attr, className, el, type ElementFn } from "../../dom.js"; import { compute, effect, type Signal } from "../../signal.js"; export const styles = /* css */ ` .sn-container {
-
-
-
@@ -1,12 +1,12 @@import { styles as empty } from "./empty/empty"; import { styles as fullscreenPanel } from "./fullscreenPanel/fullscreenPanel"; import { styles as iconButton } from "./iconButton/iconButton"; import { styles as infoItems } from "./infoItems/infoItems"; import { styles as inspectorPanel } from "./inspectorPanel/inspectorPanel"; import { styles as menuBar } from "./menuBar/menuBar"; import { styles as preferencesPanel } from "./preferencesPanel/preferencesPanel"; import { styles as selectBox } from "./selectBox/selectBox"; import { styles as snackbar } from "./snackbar/snackbar"; import { styles as empty } from "./empty/empty.js"; import { styles as fullscreenPanel } from "./fullscreenPanel/fullscreenPanel.js"; import { styles as iconButton } from "./iconButton/iconButton.js"; import { styles as infoItems } from "./infoItems/infoItems.js"; import { styles as inspectorPanel } from "./inspectorPanel/inspectorPanel.js"; import { styles as menuBar } from "./menuBar/menuBar.js"; import { styles as preferencesPanel } from "./preferencesPanel/preferencesPanel.js"; import { styles as selectBox } from "./selectBox/selectBox.js"; import { styles as snackbar } from "./snackbar/snackbar.js"; export const styles: string = inspectorPanel +
-
-
-
@@ -1,7 +1,7 @@import { el } from "../dom"; import type * as figma from "../figma"; import { type Preferences } from "../preferences"; import { compute, Signal } from "../signal"; import { el } from "../dom.js"; import type * as figma from "../figma.js"; import { type Preferences } from "../preferences.js"; import { compute, Signal } from "../signal.js"; import { canvas, info,
-
@@ -12,14 +12,14 @@ isInfo,isPreferences, type LoadedState, type State, } from "../state"; } from "../state.js"; import { empty } from "./empty/empty"; import { fullscreenPanel } from "./fullscreenPanel/fullscreenPanel"; import { inspectorPanel } from "./inspectorPanel/inspectorPanel"; import { menuBar } from "./menuBar/menuBar"; import { preferencesPanel } from "./preferencesPanel/preferencesPanel"; import { snackbar, type SnackbarContent } from "./snackbar/snackbar"; import { empty } from "./empty/empty.js"; import { fullscreenPanel } from "./fullscreenPanel/fullscreenPanel.js"; import { inspectorPanel } from "./inspectorPanel/inspectorPanel.js"; import { menuBar } from "./menuBar/menuBar.js"; import { preferencesPanel } from "./preferencesPanel/preferencesPanel.js"; import { snackbar, type SnackbarContent } from "./snackbar/snackbar.js"; const SNACKBAR_LIFETIME = 3000;
-