<commit_before>{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}

module Guide.Views.Utils where

import Imports

-- Lists
import Data.List.Split
-- Containers
import qualified Data.Map as M
-- import Data.Tree
-- Text
import qualified Data.Text.All as T
import qualified Data.Text.Lazy.All as TL
-- import NeatInterpolation
-- Web
import Lucid hiding (for_)
-- Files
import qualified System.FilePath.Find as F
-- -- Network
-- import Data.IP
-- -- Time
-- import Data.Time.Format.Human
-- -- Markdown
-- import qualified CMark as MD
-- Mustache (templates)
import Text.Mustache.Plus<commit_msg>Add an export list to Guide.Views.Utils<commit_after>{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}


module Guide.Views.Utils
(
  -- * Script utils
  onPageLoad,
  onEnter,
  onCtrlEnter,
  onEscape,
  onFormSubmit,
  inputValue,
  clearInput,

  -- * HTML utils
  emptySpan,
  mkLink,
  selectedIf,
  checkedIf,
  hiddenIf,
  categoryLink,
  itemLink,

  -- * HTML components
  button,
  textButton,
  imgButton,
  textInput,
  markdownEditor,
  smallMarkdownEditor,

  -- * Node identifiers
  thisNode,
  itemNodeId,
  categoryNodeId,

  -- * Sections system
  shown,
  noScriptShown,
  section,
  sectionSpan,

  -- * Widget system & templates
  mustache,
  readWidgets,
  getJS,
  getCSS,
)
where


import Imports

-- Lists
import Data.List.Split
-- Containers
import qualified Data.Map as M
-- import Data.Tree
-- Text
import qualified Data.Text.All as T
import qualified Data.Text.Lazy.All as TL
-- import NeatInterpolation
-- Web
import Lucid hiding (for_)
-- Files
import qualified System.FilePath.Find as F
-- -- Network
-- import Data.IP
-- -- Time
-- import Data.Time.Format.Human
-- -- Markdown
-- import qualified CMark as MD
-- Mustache (templates)
import Text.Mustache.Plus
{'fraction_non_alphanumeric': 0.10849315068493151, 'fraction_numerical': 0.0, 'mean_word_length': 3.15, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2939656', 'n_tokens_mistral': 604, 'n_tokens_neox': 594, 'n_words': 170}