 
 (def TerminalFont
   "Schema for a terminal font"
-  {:family s/Str
-   :ratio [(s/one s/Num "x-ratio")
-           (s/one s/Num "y-ratio")]})
+  {:family schema/Str
+   :ratio [(schema/one schema/Num "x-ratio")
+           (schema/one schema/Num "y-ratio")]})
 
 (def TerminalOffset
-  [(s/one s/Num "col-offset")
-   (s/one s/Num "row-offset")])
+  [(schema/one schema/Num "col-offset")
+   (schema/one schema/Num "row-offset")])
 
 (def TerminalOptions
   "Schema for Terminal Options"

(ns fluch.schemas
  (:require [schema.core :as s :include-macros true]))

(enable-console-print!)

(defn in-unit-interval? [x]
  (and (>= x 0.0) (<= 1.0)))
(def UnitInterval (s/constrained s/Num in-unit-interval?))

(defn in-byte-range? [x]
  (and (<= x 255) (>= x 0) (integer? x)))

  "Schema for a Terminal"
  {:context js/CanvasRenderingContext2D
   :options TerminalOptions
   :rows (schema/pred integer?)
   :cols (schema/pred integer?)
   :size (schema/constrained schema/Num >zero?)
   :content TerminalContent})
