THERE ARE few books in American literature with a more curious or intriguing genesis than this slender excerpt from the diary of a young girl growing up in an Oregon lumber camp shortly after the turn of the century.

Originally published by the Atlantic Monthly in 1920, Opal records the girl's adventures with a whimsical retinue of friends, including Felix Mendelssohn (her favorite mouse), Lars Porsena (a wise crow), Peter Paul Rubens (the pet pig who follows her to school), Michael Raphael (a tree she jumps into for comfort), along with a fine supporting cast of marginal lumber camp characters such as "the man who wears grey neckties and is kind to mice" and "the pens,ee girl with the faraway look."

The five-year-old who sat by the kerosene lamp at night writing in her diary was unusual not only for her imagination and command of often obscure references to European history, but also her extensive French vocabulary, familiarity with the Catholic liturgy, and consuming love of nature in all forms. In each of these respects she stood in stark contrast to the other members of her family, who neither shared her interests nor had any means of feeding her fancies.

They called her Opal Whiteley, but she was actually not the biological child of the Ma and Pa Kettlesque Whiteleys. They had adopted her a year or more before, giving her the name of a daughter her age who had died. She herself said her name was Francoise, and it ultimately developed that she was probably Francoise d'Orleans, the daughter of Henri, Duc d'Orleans, noted explorer, naturalist and author. Both her biological mother and father -- who may never have married -- were killed in separate, nearly simultaneous incidents in 1901. Francoise remembers traveling with her nanny to see her grandfather ("Grandp Duke of Chartres), but somehow on the way the little girl was either lost or abducted, and launched on a crazy journey that carried her to the far side of another continent, and into another culture, language and identity.

She took with her nothing but two books her parents had written in for her, and which were hidden in the false bottom of a box her new masters let her keep because "I was more quiet with it in my arms," as she later recalled. To these she added many years of her own colored-pencil chronicles, but about the time she was 12 all three were lost to her when a sibling discovered them in their hiding place and destroyed them. Although Opal picked up and saved the thousands of pieces into which her sister had torn her diary, it was as if the last tenuous connections with her origins had also been shredded. By the time Atlantic editor Ellery Sedgwick became intrigued with the young freelancer who brought a natural history manuscript to him -- he called her "something very young and eager and fluttering, like a bird in a thicket" -- Opal was no longer conscious of much of her early history.

SEDGWICK did not buy the young writer's story, but when he learned of her shredded childhood diary, he took her into his own home and supervised the reconstruction of the portion that is known to us today. Following the diary's publication, someone noted that the list of French rivers that her "Angel Father" taught her ("I sang it the Chant . . . de Havre et Essone et Nonette et Roullon et Iron . . .") form an anagram of the name, Henri d'Orleans. The Duc d'Orleans was apparently addicted to anagrams and similar word games, and all the rivers mentioned in Opal's little song were in fact located in the vicinity of his home. On the strength of this and a body of similarly suggestive -- but nonetheless circumstantial -- evidence of her relation to Henri and the house of Orleans, Opal obtained an introduction to the woman who might be her "Grandmess of Chartres.

The grand old dame received Opal cordially, and Opal took the royal name upon the duchess' death a short time later, calling herself Francoise d'Orleans. From then on Opal became increasingly preoccupied with genealogy and the identity of her biological parents. It is probably not surprising that the odd young woman from the rough Oregon frontier should have become so engaged in establishing her connection to royalty -- combining as it did a heady mixture of the Anastasia and Cinderella fables -- but what is surprising is the degree to which the ultimately unknowable question of exactly who Opal Whiteley was, has diverted critical discussion away from the book which started the debate in the first place, namely Opal's childhood diary.

This is a pity, since The Journal of an Understanding Heart, as it was originally titled in the Atlantic, belongs in very select literary company. For young people, it is the true story of a fellow kid's fanciful friends and adventures on the edge of the wilderness. Opal herself comes across as a spunky and surprisingly gifted child who has a profound effect on the unsuspecting adults around her, as when she turns matchmaker for the pens,ee girl and the young man who leaves flowers in the forest for her. She is misunderstood and sometimes very sad, but her courage (as when she bites the man who whipped the horse William Shakespeare) and cleverness seem equal to any task.

For adult readers, the charming children's story becomes part of a more complex and deeply hued tale. The little girl's valiant, almost clairvoyant effort to maintain some thread of personal identity and connection with her beloved, departed "Angel Father" and "Angel Mother" -- whoever they were -- is made all the more poignant when one realizes how long the odds are against her. What really gives Opal dimension though, is her perceptive, childish honesty. Because she is so clear in her accounts of situations, one can see through her to meanings she never dreamed of. Thus a scene where she gives names like Dallan Forgaill and Alfric of Canterbury to the members of a neighboring flock of sheep is charged with the unintentional humor of the flabbergasted shepherd's reaction:

When we were come a little way the shepherd did ask me again what were the names I did call his sheep, and I told him all over again. And he did say them after me.

The only modern edition of The Journal of an Understanding Heart is generally excellent both in its selection from the original and in editor Jane Bouton's decision to set Opal's words in verse form. Originally published in 1976 by Macmillan and reissued last year by Tioga Publishing Company of Palo Alto, California, Opal makes a satisfying and surprising bedtime story that may have you reading on to yourself quietly after the little ones have gone to sleep.

Opal does not offer a final answer to the mystery of the little orphan girl's parentage, but now that Opal the woman is nearly 87 years old, perhaps the time has come to recognize her childhood diary for what it is: an authentically quirky American masterpiece.